1
0
Fork 0

(svn r2663) Include variables.h only in these files which need it, not globally via openttd.h

release/0.4.5
tron 2005-07-21 18:44:27 +00:00
parent 31e87de71e
commit 284d9ed7fb
22 changed files with 23 additions and 4 deletions

View File

@ -2,6 +2,7 @@
#define AI_NEW_H #define AI_NEW_H
#include "aystar.h" #include "aystar.h"
#include "player.h"
/* /*
* These defines can be altered to change the behavoir of the AI * These defines can be altered to change the behavoir of the AI

View File

@ -13,6 +13,7 @@
#include "economy.h" #include "economy.h"
#include "airport.h" #include "airport.h"
#include "depot.h" #include "depot.h"
#include "variables.h"
// remove some day perhaps? // remove some day perhaps?
static Player *_cur_ai_player; static Player *_cur_ai_player;

View File

@ -6,6 +6,7 @@
#include "command.h" #include "command.h"
#include "ai_new.h" #include "ai_new.h"
#include "depot.h" #include "depot.h"
#include "variables.h"
#define TEST_STATION_NO_DIR 0xFF #define TEST_STATION_NO_DIR 0xFF

View File

@ -2,6 +2,7 @@
#define AIRPORT_H #define AIRPORT_H
#include "airport_movement.h" #include "airport_movement.h"
#include "variables.h"
enum {MAX_TERMINALS = 6}; enum {MAX_TERMINALS = 6};
enum {MAX_HELIPADS = 2}; enum {MAX_HELIPADS = 2};

View File

@ -5,6 +5,7 @@
#include "tile.h" #include "tile.h"
#include "viewport.h" #include "viewport.h"
#include "command.h" #include "command.h"
#include "variables.h"
typedef struct TerraformerHeightMod { typedef struct TerraformerHeightMod {
TileIndex tile; TileIndex tile;

View File

@ -6,6 +6,7 @@
#include "pool.h" #include "pool.h"
#include "tile.h" #include "tile.h"
#include "variables.h"
struct Depot { struct Depot {
TileIndex xy; TileIndex xy;

View File

@ -6,6 +6,7 @@
#include "hal.h" #include "hal.h"
#include "sound.h" #include "sound.h"
#include "string.h" #include "string.h"
#include "variables.h"
#include <fcntl.h> #include <fcntl.h>
#include <sys/types.h> #include <sys/types.h>
#include <sys/wait.h> #include <sys/wait.h>

View File

@ -1,6 +1,7 @@
#include "stdafx.h" #include "stdafx.h"
#include "openttd.h" #include "openttd.h"
#include "fileio.h" #include "fileio.h"
#include "variables.h"
#if defined(UNIX) || defined(__OS2__) #if defined(UNIX) || defined(__OS2__)
#include <ctype.h> // required for tolower() #include <ctype.h> // required for tolower()
#endif #endif

1
gfx.c
View File

@ -6,6 +6,7 @@
#include "gfx.h" #include "gfx.h"
#include "table/palettes.h" #include "table/palettes.h"
#include "hal.h" #include "hal.h"
#include "variables.h"
Colour _cur_palette[256]; Colour _cur_palette[256];

View File

@ -5,6 +5,7 @@
#include "map.h" #include "map.h"
#include "network_data.h" #include "network_data.h"
#include "command.h" #include "command.h"
#include "variables.h"
#if defined(WITH_REV) #if defined(WITH_REV)
extern const char _openttd_revision[]; extern const char _openttd_revision[];

View File

@ -5,6 +5,8 @@
#ifdef ENABLE_NETWORK #ifdef ENABLE_NETWORK
#include "player.h"
// If this line is enable, every frame will have a sync test // If this line is enable, every frame will have a sync test
// this is not needed in normal games. Normal is like 1 sync in 100 // this is not needed in normal games. Normal is like 1 sync in 100
// frames. You can enable this if you have a lot of desyncs on a certain // frames. You can enable this if you have a lot of desyncs on a certain

View File

@ -10,6 +10,7 @@
#include "network_client.h" #include "network_client.h"
#include "command.h" #include "command.h"
#include "callback_table.h" #include "callback_table.h"
#include "variables.h"
// This files handles the send/receive of all packets // This files handles the send/receive of all packets

View File

@ -8,6 +8,7 @@
#include "map.h" #include "map.h"
#include "network_gamelist.h" #include "network_gamelist.h"
#include "network_udp.h" #include "network_udp.h"
#include "variables.h"
extern void UpdateNetworkGameWindow(bool unselect); extern void UpdateNetworkGameWindow(bool unselect);
extern void NetworkPopulateCompanyInfo(void); extern void NetworkPopulateCompanyInfo(void);

View File

@ -72,6 +72,8 @@ typedef uint16 StringID;
typedef uint16 SpriteID; typedef uint16 SpriteID;
typedef uint32 PalSpriteID; typedef uint32 PalSpriteID;
typedef uint32 CursorID; typedef uint32 CursorID;
typedef uint16 EngineID; //! All enginenumbers should be of this type
typedef uint16 UnitID; //! All unitnumber stuff is of this type (or anyway, should be)
typedef uint32 WindowNumber; typedef uint32 WindowNumber;
typedef byte WindowClass; typedef byte WindowClass;
@ -546,6 +548,5 @@ enum {
VARDEF byte _no_scroll; VARDEF byte _no_scroll;
#include "functions.h" #include "functions.h"
#include "variables.h"
#endif /* OPENTTD_H */ #endif /* OPENTTD_H */

View File

@ -5,6 +5,7 @@
#include "pathfind.h" #include "pathfind.h"
#include "rail.h" #include "rail.h"
#include "debug.h" #include "debug.h"
#include "variables.h"
// remember which tiles we have already visited so we don't visit them again. // remember which tiles we have already visited so we don't visit them again.
static bool TPFSetTileBit(TrackPathFinder *tpf, TileIndex tile, int dir) static bool TPFSetTileBit(TrackPathFinder *tpf, TileIndex tile, int dir)

View File

@ -4,6 +4,7 @@
#include "sound.h" #include "sound.h"
#include "spritecache.h" #include "spritecache.h"
#include "string.h" #include "string.h"
#include "variables.h"
#include "table/currency.h" #include "table/currency.h"
#include "network.h" #include "network.h"
#include "settings.h" #include "settings.h"

View File

@ -5,6 +5,7 @@
#include "saveload.h" #include "saveload.h"
#include "command.h" #include "command.h"
#include "strings.h" #include "strings.h"
#include "variables.h"
enum { enum {
/* Max signs: 64000 (4 * 16000) */ /* Max signs: 64000 (4 * 16000) */

View File

@ -4,6 +4,7 @@
#include "openttd.h" #include "openttd.h"
#include "sprite.h" #include "sprite.h"
#include "variables.h"
SpriteGroup *EvalDeterministicSpriteGroup(DeterministicSpriteGroup *dsg, int value) SpriteGroup *EvalDeterministicSpriteGroup(DeterministicSpriteGroup *dsg, int value)

View File

@ -7,6 +7,7 @@
#include "hal.h" #include "hal.h"
#include "console.h" #include "console.h"
#include "string.h" #include "string.h"
#include "variables.h"
#include <stdarg.h> /* va_list */ #include <stdarg.h> /* va_list */
typedef struct TextEffect { typedef struct TextEffect {

View File

@ -9,6 +9,7 @@
#include "command.h" #include "command.h"
#include "town.h" #include "town.h"
#include "sound.h" #include "sound.h"
#include "variables.h"
static int GetRandomTreeType(TileIndex tile, uint seed) static int GetRandomTreeType(TileIndex tile, uint seed)
{ {

View File

@ -8,9 +8,6 @@
# define MAX_PATH 260 # define MAX_PATH 260
#endif #endif
typedef uint16 UnitID; //! All unitnumber stuff is of this type (or anyway, should be)
typedef uint16 EngineID; //! All enginenumbers should be of this type
// Prices and also the fractional part. // Prices and also the fractional part.
VARDEF Prices _price; VARDEF Prices _price;
VARDEF uint16 _price_frac[NUM_PRICES]; VARDEF uint16 _price_frac[NUM_PRICES];

View File

@ -4,6 +4,7 @@
#include "pool.h" #include "pool.h"
#include "order.h" #include "order.h"
#include "rail.h" #include "rail.h"
#include "variables.h"
enum { enum {
VEH_Train = 0x10, VEH_Train = 0x10,