2005-07-24 14:12:37 +00:00
|
|
|
/* $Id$ */
|
|
|
|
|
2007-03-01 01:24:44 +00:00
|
|
|
/** @file functions.h */
|
|
|
|
|
2004-08-09 17:04:08 +00:00
|
|
|
#ifndef FUNCTIONS_H
|
|
|
|
#define FUNCTIONS_H
|
|
|
|
|
2007-11-21 19:13:38 +00:00
|
|
|
#include "core/random_func.hpp"
|
2007-12-21 22:50:51 +00:00
|
|
|
#include "command_type.h"
|
2007-12-25 23:42:52 +00:00
|
|
|
#include "tile_cmd.h"
|
2007-01-13 14:43:46 +00:00
|
|
|
|
2007-03-01 01:24:44 +00:00
|
|
|
/* clear_land.cpp */
|
2005-09-18 20:56:44 +00:00
|
|
|
void DrawHillyLandTile(const TileInfo *ti);
|
|
|
|
void DrawClearLandTile(const TileInfo *ti, byte set);
|
2005-07-28 19:18:27 +00:00
|
|
|
void DrawClearLandFence(const TileInfo *ti);
|
2005-03-04 10:34:44 +00:00
|
|
|
void TileLoopClearHelper(TileIndex tile);
|
2004-08-09 17:04:08 +00:00
|
|
|
|
2007-03-01 01:24:44 +00:00
|
|
|
/* players.cpp */
|
2007-06-18 10:48:15 +00:00
|
|
|
bool CheckPlayerHasMoney(CommandCost cost);
|
|
|
|
void SubtractMoneyFromPlayer(CommandCost cost);
|
|
|
|
void SubtractMoneyFromPlayerFract(PlayerID player, CommandCost cost);
|
2006-10-14 22:22:48 +00:00
|
|
|
bool CheckOwnership(Owner owner);
|
2005-06-24 12:38:35 +00:00
|
|
|
bool CheckTileOwnership(TileIndex tile);
|
2004-08-09 17:04:08 +00:00
|
|
|
|
2007-03-01 01:24:44 +00:00
|
|
|
/* texteff.cpp */
|
2007-10-08 19:56:21 +00:00
|
|
|
void AddAnimatedTile(TileIndex tile);
|
2005-06-24 12:38:35 +00:00
|
|
|
void DeleteAnimatedTile(TileIndex tile);
|
2007-03-07 11:47:46 +00:00
|
|
|
void AnimateAnimatedTiles();
|
|
|
|
void InitializeAnimatedTiles();
|
2004-08-09 17:04:08 +00:00
|
|
|
|
2007-03-01 01:24:44 +00:00
|
|
|
/* misc_cmd.cpp */
|
2007-03-07 11:47:46 +00:00
|
|
|
void PlaceTreesRandomly();
|
2004-08-09 17:04:08 +00:00
|
|
|
|
|
|
|
void InitializeLandscapeVariables(bool only_constants);
|
|
|
|
|
2007-03-01 01:24:44 +00:00
|
|
|
/* misc.cpp */
|
2006-10-16 10:26:22 +00:00
|
|
|
bool IsCustomName(StringID id);
|
2004-08-09 17:04:08 +00:00
|
|
|
void DeleteName(StringID id);
|
2007-07-24 17:01:23 +00:00
|
|
|
char *GetName(char *buff, StringID id, const char *last);
|
2004-12-04 17:54:56 +00:00
|
|
|
|
|
|
|
#define AllocateName(name, skip) RealAllocateName(name, skip, false)
|
2005-02-06 20:53:31 +00:00
|
|
|
StringID RealAllocateName(const char *name, byte skip, bool check_double);
|
2007-03-07 11:47:46 +00:00
|
|
|
void ConvertNameArray();
|
2004-08-09 17:04:08 +00:00
|
|
|
|
|
|
|
/* misc functions */
|
2007-09-09 10:13:17 +00:00
|
|
|
/**
|
|
|
|
* Mark a tile given by its coordinate dirty for repaint.
|
|
|
|
*
|
|
|
|
* @ingroup dirty
|
|
|
|
*/
|
2004-08-09 17:04:08 +00:00
|
|
|
void MarkTileDirty(int x, int y);
|
2007-09-09 10:13:17 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Mark a tile given by its index dirty for repaint.
|
|
|
|
*
|
|
|
|
* @ingroup dirty
|
|
|
|
*/
|
2004-08-09 17:04:08 +00:00
|
|
|
void MarkTileDirtyByTile(TileIndex tile);
|
2007-09-09 10:13:17 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Mark all viewports dirty for repaint.
|
|
|
|
*
|
|
|
|
* @ingroup dirty
|
|
|
|
*/
|
2004-08-09 17:04:08 +00:00
|
|
|
void MarkAllViewportsDirty(int left, int top, int right, int bottom);
|
2007-06-21 14:32:27 +00:00
|
|
|
void ShowCostOrIncomeAnimation(int x, int y, int z, Money cost);
|
|
|
|
void ShowFeederIncomeAnimation(int x, int y, int z, Money cost);
|
2004-08-09 17:04:08 +00:00
|
|
|
|
2005-01-13 16:28:47 +00:00
|
|
|
void ShowHighscoreTable(int difficulty, int8 rank);
|
2004-08-09 17:04:08 +00:00
|
|
|
|
2007-03-07 11:47:46 +00:00
|
|
|
void AskExitGame();
|
|
|
|
void AskExitToGameMenu();
|
2004-08-09 17:04:08 +00:00
|
|
|
|
2007-03-07 11:47:46 +00:00
|
|
|
void RedrawAutosave();
|
2004-08-09 17:04:08 +00:00
|
|
|
|
|
|
|
StringID RemapOldStringID(StringID s);
|
|
|
|
|
|
|
|
void UpdateViewportSignPos(ViewportSign *sign, int left, int top, StringID str);
|
|
|
|
|
|
|
|
|
2007-03-01 01:24:44 +00:00
|
|
|
/* callback from drivers that is called if the game size changes dynamically */
|
2007-03-07 11:47:46 +00:00
|
|
|
void GameSizeChanged();
|
2006-03-25 09:22:10 +00:00
|
|
|
const char *GetCurrentLocale(const char *param);
|
2004-08-09 17:04:08 +00:00
|
|
|
|
|
|
|
int ttd_main(int argc, char* argv[]);
|
2007-03-07 11:47:46 +00:00
|
|
|
void HandleExitGameRequest();
|
2004-08-09 17:04:08 +00:00
|
|
|
|
|
|
|
#endif /* FUNCTIONS_H */
|