2005-07-24 16:12:37 +02:00
|
|
|
/* $Id$ */
|
|
|
|
|
2008-05-06 17:11:33 +02:00
|
|
|
/** @file functions.h Some generic functions that actually shouldn't be here. */
|
2007-03-01 02:24:44 +01:00
|
|
|
|
2004-08-09 19:04:08 +02:00
|
|
|
#ifndef FUNCTIONS_H
|
|
|
|
#define FUNCTIONS_H
|
|
|
|
|
2007-11-21 20:13:38 +01:00
|
|
|
#include "core/random_func.hpp"
|
2007-12-21 23:50:51 +01:00
|
|
|
#include "command_type.h"
|
2007-12-26 00:42:52 +01:00
|
|
|
#include "tile_cmd.h"
|
2007-01-13 15:43:46 +01:00
|
|
|
|
2007-03-01 02:24:44 +01:00
|
|
|
/* clear_land.cpp */
|
2005-09-18 22:56:44 +02:00
|
|
|
void DrawHillyLandTile(const TileInfo *ti);
|
|
|
|
void DrawClearLandTile(const TileInfo *ti, byte set);
|
2005-07-28 21:18:27 +02:00
|
|
|
void DrawClearLandFence(const TileInfo *ti);
|
2005-03-04 11:34:44 +01:00
|
|
|
void TileLoopClearHelper(TileIndex tile);
|
2004-08-09 19:04:08 +02:00
|
|
|
|
2008-09-30 22:39:50 +02:00
|
|
|
/* company_cmd.cpp */
|
|
|
|
bool CheckCompanyHasMoney(CommandCost cost);
|
|
|
|
void SubtractMoneyFromCompany(CommandCost cost);
|
|
|
|
void SubtractMoneyFromCompanyFract(CompanyID company, CommandCost cost);
|
2006-10-15 00:22:48 +02:00
|
|
|
bool CheckOwnership(Owner owner);
|
2005-06-24 14:38:35 +02:00
|
|
|
bool CheckTileOwnership(TileIndex tile);
|
2004-08-09 19:04:08 +02:00
|
|
|
|
|
|
|
void InitializeLandscapeVariables(bool only_constants);
|
|
|
|
|
|
|
|
/* misc functions */
|
2007-09-09 12:13:17 +02:00
|
|
|
/**
|
|
|
|
* Mark a tile given by its coordinate dirty for repaint.
|
|
|
|
*
|
|
|
|
* @ingroup dirty
|
|
|
|
*/
|
2004-08-09 19:04:08 +02:00
|
|
|
void MarkTileDirty(int x, int y);
|
2007-09-09 12:13:17 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Mark a tile given by its index dirty for repaint.
|
|
|
|
*
|
|
|
|
* @ingroup dirty
|
|
|
|
*/
|
2004-08-09 19:04:08 +02:00
|
|
|
void MarkTileDirtyByTile(TileIndex tile);
|
2007-09-09 12:13:17 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Mark all viewports dirty for repaint.
|
|
|
|
*
|
|
|
|
* @ingroup dirty
|
|
|
|
*/
|
2004-08-09 19:04:08 +02:00
|
|
|
void MarkAllViewportsDirty(int left, int top, int right, int bottom);
|
2007-06-21 16:32:27 +02:00
|
|
|
void ShowCostOrIncomeAnimation(int x, int y, int z, Money cost);
|
|
|
|
void ShowFeederIncomeAnimation(int x, int y, int z, Money cost);
|
2004-08-09 19:04:08 +02:00
|
|
|
|
2007-03-07 12:47:46 +01:00
|
|
|
void AskExitGame();
|
|
|
|
void AskExitToGameMenu();
|
2004-08-09 19:04:08 +02:00
|
|
|
|
2007-03-07 12:47:46 +01:00
|
|
|
void RedrawAutosave();
|
2004-08-09 19:04:08 +02:00
|
|
|
|
2009-01-10 01:31:47 +01:00
|
|
|
int ttd_main(int argc, char *argv[]);
|
2007-03-07 12:47:46 +01:00
|
|
|
void HandleExitGameRequest();
|
2004-08-09 19:04:08 +02:00
|
|
|
|
|
|
|
#endif /* FUNCTIONS_H */
|