mirror of https://github.com/OpenTTD/OpenTTD.git
(svn r9609) -Codechange: Move some function prototypes out of functions.h and into landscape.h, and add a few where they didn't exist.
This commit is contained in:
parent
8cdec9a2ab
commit
ccaaa7d33a
|
@ -5,6 +5,7 @@
|
|||
#include "../../aircraft.h"
|
||||
#include "../../bridge_map.h"
|
||||
#include "../../functions.h"
|
||||
#include "../../landscape.h"
|
||||
#include "../../map.h"
|
||||
#include "../../rail_map.h"
|
||||
#include "../../road_map.h"
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
#include "aircraft.h"
|
||||
#include "debug.h"
|
||||
#include "functions.h"
|
||||
#include "landscape.h"
|
||||
#include "station_map.h"
|
||||
#include "table/strings.h"
|
||||
#include "map.h"
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
#include "openttd.h"
|
||||
#include "table/strings.h"
|
||||
#include "functions.h"
|
||||
#include "landscape.h"
|
||||
#include "map.h"
|
||||
#include "gui.h"
|
||||
#include "command.h"
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
#include "debug.h"
|
||||
#include "engine.h"
|
||||
#include "functions.h"
|
||||
#include "landscape.h"
|
||||
#include "saveload.h"
|
||||
#include "string.h"
|
||||
#include "variables.h"
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
#include "openttd.h"
|
||||
#include "depot.h"
|
||||
#include "functions.h"
|
||||
#include "landscape.h"
|
||||
#include "tile.h"
|
||||
#include "map.h"
|
||||
#include "table/strings.h"
|
||||
|
|
|
@ -19,6 +19,7 @@
|
|||
#include "stdafx.h"
|
||||
#include "openttd.h"
|
||||
#include "functions.h"
|
||||
#include "landscape.h"
|
||||
#include "industry_map.h"
|
||||
#include "station_map.h"
|
||||
#include "table/strings.h"
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
#include "openttd.h"
|
||||
#include "currency.h"
|
||||
#include "functions.h"
|
||||
#include "landscape.h"
|
||||
#include "strings.h" // XXX InjectDParam()
|
||||
#include "table/strings.h"
|
||||
#include "table/sprites.h"
|
||||
|
|
|
@ -52,6 +52,7 @@
|
|||
#include "viewport.h"
|
||||
#include "functions.h" /* We should REALLY get rid of this goddamn file, as it is butt-ugly */
|
||||
#include "variables.h" /* ... same here */
|
||||
#include "landscape.h"
|
||||
#include "rail.h"
|
||||
#include "debug.h"
|
||||
#include "tunnel_map.h"
|
||||
|
|
|
@ -7,35 +7,8 @@
|
|||
|
||||
#include "gfx.h"
|
||||
|
||||
void DoClearSquare(TileIndex tile);
|
||||
void RunTileLoop();
|
||||
|
||||
uint GetPartialZ(int x, int y, Slope corners);
|
||||
uint GetSlopeZ(int x, int y);
|
||||
uint32 GetTileTrackStatus(TileIndex tile, TransportType mode);
|
||||
void GetAcceptedCargo(TileIndex tile, AcceptedCargo ac);
|
||||
void ChangeTileOwner(TileIndex tile, PlayerID old_player, PlayerID new_player);
|
||||
void AnimateTile(TileIndex tile);
|
||||
void ClickTile(TileIndex tile);
|
||||
void GetTileDesc(TileIndex tile, TileDesc *td);
|
||||
void UpdateTownMaxPass(Town *t);
|
||||
|
||||
bool IsValidTile(TileIndex tile);
|
||||
|
||||
static inline Point RemapCoords(int x, int y, int z)
|
||||
{
|
||||
Point pt;
|
||||
pt.x = (y - x) * 2;
|
||||
pt.y = y + x - z;
|
||||
return pt;
|
||||
}
|
||||
|
||||
static inline Point RemapCoords2(int x, int y)
|
||||
{
|
||||
return RemapCoords(x, y, GetSlopeZ(x, y));
|
||||
}
|
||||
|
||||
|
||||
/* clear_land.cpp */
|
||||
void DrawHillyLandTile(const TileInfo *ti);
|
||||
void DrawClearLandTile(const TileInfo *ti, byte set);
|
||||
|
@ -170,8 +143,6 @@ void MarkAllViewportsDirty(int left, int top, int right, int bottom);
|
|||
void ShowCostOrIncomeAnimation(int x, int y, int z, int32 cost);
|
||||
void ShowFeederIncomeAnimation(int x, int y, int z, int32 cost);
|
||||
|
||||
void DrawFoundation(TileInfo *ti, uint f);
|
||||
|
||||
bool CheckIfAuthorityAllows(TileIndex tile);
|
||||
Town *ClosestTownFromTile(TileIndex tile, uint threshold);
|
||||
void ChangeTownRating(Town *t, int add, int max);
|
||||
|
@ -179,7 +150,6 @@ void ChangeTownRating(Town *t, int add, int max);
|
|||
uint GetTownRadiusGroup(const Town* t, TileIndex tile);
|
||||
int FindFirstBit(uint32 x);
|
||||
void ShowHighscoreTable(int difficulty, int8 rank);
|
||||
TileIndex AdjustTileCoordRandomly(TileIndex a, byte rng);
|
||||
|
||||
void AfterLoadTown();
|
||||
void UpdatePatches();
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
#include "stdafx.h"
|
||||
#include "openttd.h"
|
||||
#include "functions.h"
|
||||
#include "landscape.h"
|
||||
#include "player.h"
|
||||
#include "table/sprites.h"
|
||||
#include "variables.h"
|
||||
|
@ -19,7 +20,6 @@
|
|||
#include "heightmap.h"
|
||||
#include "date.h"
|
||||
|
||||
void GenerateLandscape(byte mode);
|
||||
void GenerateClearTile();
|
||||
void GenerateIndustries();
|
||||
void GenerateUnmovables();
|
||||
|
@ -32,8 +32,6 @@ void StartupDisasters();
|
|||
|
||||
void InitializeGame(int mode, uint size_x, uint size_y);
|
||||
|
||||
void ConvertGroundTilesIntoWaterTiles();
|
||||
|
||||
/* Please only use this variable in genworld.h and genworld.c and
|
||||
* nowhere else. For speed improvements we need it to be global, but
|
||||
* in no way the meaning of it is to use it anywhere else besides
|
||||
|
|
|
@ -2,6 +2,9 @@
|
|||
|
||||
/** @file landscape.h */
|
||||
|
||||
#ifndef LANDSCAPE_H
|
||||
#define LANDSCAPE_H
|
||||
|
||||
enum {
|
||||
SNOW_LINE_MONTHS = 12,
|
||||
SNOW_LINE_DAYS = 32,
|
||||
|
@ -17,3 +20,42 @@ void SetSnowLine(byte table[SNOW_LINE_MONTHS][SNOW_LINE_DAYS]);
|
|||
byte GetSnowLine(void);
|
||||
byte HighestSnowLine(void);
|
||||
void ClearSnowLine(void);
|
||||
|
||||
bool IsValidTile(TileIndex tile);
|
||||
|
||||
uint GetPartialZ(int x, int y, Slope corners);
|
||||
uint GetSlopeZ(int x, int y);
|
||||
|
||||
static inline Point RemapCoords(int x, int y, int z)
|
||||
{
|
||||
Point pt;
|
||||
pt.x = (y - x) * 2;
|
||||
pt.y = y + x - z;
|
||||
return pt;
|
||||
}
|
||||
|
||||
static inline Point RemapCoords2(int x, int y)
|
||||
{
|
||||
return RemapCoords(x, y, GetSlopeZ(x, y));
|
||||
}
|
||||
|
||||
void DrawFoundation(TileInfo *ti, uint f);
|
||||
|
||||
void DoClearSquare(TileIndex tile);
|
||||
void RunTileLoop();
|
||||
|
||||
uint32 GetTileTrackStatus(TileIndex tile, TransportType mode);
|
||||
void GetAcceptedCargo(TileIndex tile, AcceptedCargo ac);
|
||||
void ChangeTileOwner(TileIndex tile, PlayerID old_player, PlayerID new_player);
|
||||
void AnimateTile(TileIndex tile);
|
||||
void ClickTile(TileIndex tile);
|
||||
void GetTileDesc(TileIndex tile, TileDesc *td);
|
||||
|
||||
void InitializeLandscape();
|
||||
void GenerateLandscape(byte mode);
|
||||
|
||||
void ConvertGroundTilesIntoWaterTiles();
|
||||
|
||||
TileIndex AdjustTileCoordRandomly(TileIndex a, byte rng);
|
||||
|
||||
#endif /* LANDSCAPE_H */
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
#include "openttd.h"
|
||||
#include "currency.h"
|
||||
#include "functions.h"
|
||||
#include "landscape.h"
|
||||
#include "news.h"
|
||||
#include "player.h"
|
||||
#include "string.h"
|
||||
|
@ -87,7 +88,6 @@ void InitializeAirportGui();
|
|||
void InitializeDockGui();
|
||||
void InitializeIndustries();
|
||||
void InitializeMainGui();
|
||||
void InitializeLandscape();
|
||||
void InitializeTowns();
|
||||
void InitializeTrees();
|
||||
void InitializeSigns();
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
#include "heightmap.h"
|
||||
#include "debug.h"
|
||||
#include "functions.h"
|
||||
#include "landscape.h"
|
||||
#include "newgrf.h"
|
||||
#include "saveload.h"
|
||||
#include "strings.h"
|
||||
|
@ -40,8 +41,6 @@
|
|||
FiosItem *_fios_list;
|
||||
int _saveload_mode;
|
||||
|
||||
extern void GenerateLandscape(byte mode);
|
||||
extern void SwitchMode(int new_mode);
|
||||
|
||||
static bool _fios_path_changed;
|
||||
static bool _savegame_sort_dirty;
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
#include "bridge_map.h"
|
||||
#include "debug.h"
|
||||
#include "functions.h"
|
||||
#include "landscape.h"
|
||||
#include "npf.h"
|
||||
#include "aystar.h"
|
||||
#include "macros.h"
|
||||
|
|
|
@ -24,6 +24,7 @@
|
|||
#include "gfx.h"
|
||||
#include "gfxinit.h"
|
||||
#include "gui.h"
|
||||
#include "landscape.h"
|
||||
#include "station.h"
|
||||
#include "station_map.h"
|
||||
#include "town_map.h"
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
#include "station_map.h"
|
||||
#include "depot.h"
|
||||
#include "functions.h"
|
||||
#include "landscape.h"
|
||||
#include "map.h"
|
||||
#include "tile.h"
|
||||
#include "pathfind.h"
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
#include "table/sprites.h"
|
||||
#include "table/strings.h"
|
||||
#include "functions.h"
|
||||
#include "landscape.h"
|
||||
#include "date.h"
|
||||
#include "map.h"
|
||||
#include "tile.h"
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
#include "openttd.h"
|
||||
#include "bridge_map.h"
|
||||
#include "functions.h"
|
||||
#include "landscape.h"
|
||||
#include "road_map.h"
|
||||
#include "station.h"
|
||||
#include "tunnel_map.h"
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
#include "openttd.h"
|
||||
#include "debug.h"
|
||||
#include "functions.h"
|
||||
#include "landscape.h"
|
||||
#include "road_map.h"
|
||||
#include "roadveh.h"
|
||||
#include "station_map.h"
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
#include "ship.h"
|
||||
#include "table/strings.h"
|
||||
#include "functions.h"
|
||||
#include "landscape.h"
|
||||
#include "map.h"
|
||||
#include "tile.h"
|
||||
#include "vehicle.h"
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
#include "openttd.h"
|
||||
#include "table/strings.h"
|
||||
#include "functions.h"
|
||||
#include "landscape.h"
|
||||
#include "player.h"
|
||||
#include "signs.h"
|
||||
#include "saveload.h"
|
||||
|
|
|
@ -11,6 +11,7 @@
|
|||
#include "station_map.h"
|
||||
#include "table/strings.h"
|
||||
#include "table/sprites.h"
|
||||
#include "landscape.h"
|
||||
#include "map.h"
|
||||
#include "tile.h"
|
||||
#include "gui.h"
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
#include "stdafx.h"
|
||||
#include "openttd.h"
|
||||
#include "functions.h"
|
||||
#include "landscape.h"
|
||||
#include "map.h"
|
||||
#include "mixer.h"
|
||||
#include "sound.h"
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
#include "cmd_helper.h"
|
||||
#include "debug.h"
|
||||
#include "functions.h"
|
||||
#include "landscape.h"
|
||||
#include "station_map.h"
|
||||
#include "table/sprites.h"
|
||||
#include "table/strings.h"
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
#include "macros.h"
|
||||
#include "strings.h"
|
||||
#include "gfx.h"
|
||||
#include "landscape.h"
|
||||
#include "viewport.h"
|
||||
#include "saveload.h"
|
||||
#include "hal.h"
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
#include "bridge_map.h"
|
||||
#include "debug.h"
|
||||
#include "functions.h"
|
||||
#include "landscape.h"
|
||||
#include "gui.h"
|
||||
#include "station_map.h"
|
||||
#include "table/strings.h"
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
#include "table/strings.h"
|
||||
#include "table/sprites.h"
|
||||
#include "functions.h"
|
||||
#include "landscape.h"
|
||||
#include "map.h"
|
||||
#include "tile.h"
|
||||
#include "command.h"
|
||||
|
|
|
@ -11,6 +11,7 @@
|
|||
#include "table/sprites.h"
|
||||
#include "table/strings.h"
|
||||
#include "functions.h"
|
||||
#include "landscape.h"
|
||||
#include "map.h"
|
||||
#include "tile.h"
|
||||
#include "vehicle.h"
|
||||
|
|
|
@ -11,6 +11,7 @@
|
|||
#include "strings.h"
|
||||
#include "table/sprites.h"
|
||||
#include "table/strings.h"
|
||||
#include "landscape.h"
|
||||
#include "map.h"
|
||||
#include "viewport.h"
|
||||
#include "window.h"
|
||||
|
|
|
@ -11,6 +11,7 @@
|
|||
#include "table/sprites.h"
|
||||
#include "table/strings.h"
|
||||
#include "functions.h"
|
||||
#include "landscape.h"
|
||||
#include "map.h"
|
||||
#include "tile.h"
|
||||
#include "vehicle.h"
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
#include "command.h"
|
||||
#include "functions.h"
|
||||
#include "gfx.h"
|
||||
#include "landscape.h"
|
||||
#include "map.h"
|
||||
#include "order.h"
|
||||
#include "rail_map.h"
|
||||
|
|
|
@ -17,6 +17,7 @@
|
|||
#include "../vehicle.h"
|
||||
#include "../date.h"
|
||||
#include "../functions.h"
|
||||
#include "../landscape.h"
|
||||
#include "yapf.h"
|
||||
#include "../pathfind.h"
|
||||
#include "../waypoint.h"
|
||||
|
|
Loading…
Reference in New Issue