src/functions.h
branchnoai
changeset 9629 66dde6412125
parent 9628 b5c2449616b5
child 9631 8a2d1c2ceb88
equal deleted inserted replaced
9628:b5c2449616b5 9629:66dde6412125
    18 /* water_land.cpp */
    18 /* water_land.cpp */
    19 void DrawShipDepotSprite(int x, int y, int image);
    19 void DrawShipDepotSprite(int x, int y, int image);
    20 void TileLoop_Water(TileIndex tile);
    20 void TileLoop_Water(TileIndex tile);
    21 
    21 
    22 /* players.cpp */
    22 /* players.cpp */
    23 bool CheckPlayerHasMoney(int32 cost);
    23 bool CheckPlayerHasMoney(CommandCost cost);
    24 void SubtractMoneyFromPlayer(int32 cost);
    24 void SubtractMoneyFromPlayer(CommandCost cost);
    25 void SubtractMoneyFromPlayerFract(PlayerID player, int32 cost);
    25 void SubtractMoneyFromPlayerFract(PlayerID player, CommandCost cost);
    26 bool CheckOwnership(Owner owner);
    26 bool CheckOwnership(Owner owner);
    27 bool CheckTileOwnership(TileIndex tile);
    27 bool CheckTileOwnership(TileIndex tile);
    28 StringID GetPlayerNameString(PlayerID player, uint index);
       
    29 
    28 
    30 /* standard */
    29 /* standard */
    31 void ShowInfo(const char *str);
    30 void ShowInfo(const char *str);
    32 void CDECL ShowInfoF(const char *str, ...);
    31 void CDECL ShowInfoF(const char *str, ...);
    33 
    32 
    77 
    76 
    78 uint32 InteractiveRandom(); // Used for random sequences that are not the same on the other end of the multiplayer link
    77 uint32 InteractiveRandom(); // Used for random sequences that are not the same on the other end of the multiplayer link
    79 uint InteractiveRandomRange(uint max);
    78 uint InteractiveRandomRange(uint max);
    80 
    79 
    81 /* texteff.cpp */
    80 /* texteff.cpp */
    82 void MoveAllTextEffects();
       
    83 void AddTextEffect(StringID msg, int x, int y, uint16 duration);
       
    84 void InitTextEffects();
       
    85 void DrawTextEffects(DrawPixelInfo *dpi);
       
    86 
       
    87 void InitTextMessage();
       
    88 void DrawTextMessage();
       
    89 void CDECL AddTextMessage(uint16 color, uint8 duration, const char *message, ...);
       
    90 void UndrawTextMessage();
       
    91 
       
    92 bool AddAnimatedTile(TileIndex tile);
    81 bool AddAnimatedTile(TileIndex tile);
    93 void DeleteAnimatedTile(TileIndex tile);
    82 void DeleteAnimatedTile(TileIndex tile);
    94 void AnimateAnimatedTiles();
    83 void AnimateAnimatedTiles();
    95 void InitializeAnimatedTiles();
    84 void InitializeAnimatedTiles();
    96 
    85 
   137 bool ScrollMainWindowTo(int x, int y, bool instant = false);
   126 bool ScrollMainWindowTo(int x, int y, bool instant = false);
   138 void DrawSprite(SpriteID img, SpriteID pal, int x, int y);
   127 void DrawSprite(SpriteID img, SpriteID pal, int x, int y);
   139 bool EnsureNoVehicle(TileIndex tile);
   128 bool EnsureNoVehicle(TileIndex tile);
   140 bool EnsureNoVehicleOnGround(TileIndex tile);
   129 bool EnsureNoVehicleOnGround(TileIndex tile);
   141 void MarkAllViewportsDirty(int left, int top, int right, int bottom);
   130 void MarkAllViewportsDirty(int left, int top, int right, int bottom);
   142 void ShowCostOrIncomeAnimation(int x, int y, int z, int32 cost);
   131 void ShowCostOrIncomeAnimation(int x, int y, int z, Money cost);
   143 void ShowFeederIncomeAnimation(int x, int y, int z, int32 cost);
   132 void ShowFeederIncomeAnimation(int x, int y, int z, Money cost);
   144 
   133 
   145 bool CheckIfAuthorityAllows(TileIndex tile);
   134 bool CheckIfAuthorityAllows(TileIndex tile);
   146 Town *ClosestTownFromTile(TileIndex tile, uint threshold);
   135 Town *ClosestTownFromTile(TileIndex tile, uint threshold);
   147 void ChangeTownRating(Town *t, int add, int max);
   136 void ChangeTownRating(Town *t, int add, int max);
   148 
   137