(svn r3297) Staticise

replace/41b28d7194a279bdc17475d4fbe2ea6ec885a466
tron 19 years ago
parent ce94c90a7b
commit 23bfc03054

@ -25,7 +25,7 @@ static uint uids[MAX_PLAYERS];
/** /**
* Dequeues commands put in the queue via AI_PutCommandInQueue. * Dequeues commands put in the queue via AI_PutCommandInQueue.
*/ */
void AI_DequeueCommands(byte player) static void AI_DequeueCommands(byte player)
{ {
AICommand *com, *entry_com; AICommand *com, *entry_com;

@ -121,7 +121,7 @@ void DrawAircraftEngine(int x, int y, EngineID engine, uint32 image_ormod)
} }
} }
int32 EstimateAircraftCost(EngineID engine_type) static int32 EstimateAircraftCost(EngineID engine_type)
{ {
return AircraftVehInfo(engine_type)->base_cost * (_price.aircraft_base>>3)>>5; return AircraftVehInfo(engine_type)->base_cost * (_price.aircraft_base>>3)>>5;
} }

@ -8,11 +8,12 @@
#include "macros.h" #include "macros.h"
#include "variables.h" #include "variables.h"
AirportFTAClass *CountryAirport; static AirportFTAClass* CountryAirport;
AirportFTAClass *CityAirport; static AirportFTAClass* CityAirport;
AirportFTAClass *Heliport, *Oilrig; static AirportFTAClass* Oilrig;
AirportFTAClass *MetropolitanAirport; static AirportFTAClass* Heliport;
AirportFTAClass *InternationalAirport; static AirportFTAClass* MetropolitanAirport;
static AirportFTAClass* InternationalAirport;
static void AirportFTAClass_Constructor(AirportFTAClass *Airport, static void AirportFTAClass_Constructor(AirportFTAClass *Airport,
const byte *terminals, const byte *helipads, const byte *terminals, const byte *helipads,

@ -1276,7 +1276,7 @@ static void VehicleChangeInfo(byte *buf, int len)
* @param value The value that was used to represent this callback result * @param value The value that was used to represent this callback result
* @return A spritegroup representing that callback result * @return A spritegroup representing that callback result
*/ */
SpriteGroup *NewCallBackResultSpriteGroup(uint16 value) static SpriteGroup* NewCallBackResultSpriteGroup(uint16 value)
{ {
SpriteGroup *group = calloc(1, sizeof(*group)); SpriteGroup *group = calloc(1, sizeof(*group));
@ -1300,7 +1300,7 @@ SpriteGroup *NewCallBackResultSpriteGroup(uint16 value)
* @param sprites The number of sprites per set. * @param sprites The number of sprites per set.
* @return A spritegroup representing the sprite number result. * @return A spritegroup representing the sprite number result.
*/ */
SpriteGroup *NewResultSpriteGroup(uint16 value, byte sprites) static SpriteGroup* NewResultSpriteGroup(uint16 value, byte sprites)
{ {
SpriteGroup *group = calloc(1, sizeof(*group)); SpriteGroup *group = calloc(1, sizeof(*group));
group->type = SGT_RESULT; group->type = SGT_RESULT;

@ -455,7 +455,7 @@ static uint32 _old_town_index;
static uint16 _old_string_id; static uint16 _old_string_id;
static uint16 _old_string_id_2; static uint16 _old_string_id_2;
void ReadTTDPatchFlags(void) static void ReadTTDPatchFlags(void)
{ {
int i; int i;

@ -504,7 +504,8 @@ void delete_Hash(Hash* h, bool free_values) {
free(h); free(h);
} }
void stat_Hash(Hash* h) #ifdef HASH_STATS
static void stat_Hash(Hash* h)
{ {
uint used_buckets = 0; uint used_buckets = 0;
uint max_collision = 0; uint max_collision = 0;
@ -546,6 +547,7 @@ void stat_Hash(Hash* h)
} }
printf ("}\n"); printf ("}\n");
} }
#endif
void clear_Hash(Hash* h, bool free_values) void clear_Hash(Hash* h, bool free_values)
{ {

@ -1304,7 +1304,7 @@ static void DetTrackDrawProc_Null(const TileInfo *ti)
} }
typedef void DetailedTrackProc(const TileInfo *ti); typedef void DetailedTrackProc(const TileInfo *ti);
DetailedTrackProc * const _detailed_track_proc[16] = { static DetailedTrackProc* const _detailed_track_proc[] = {
DetTrackDrawProc_Null, DetTrackDrawProc_Null,
DetTrackDrawProc_Null, DetTrackDrawProc_Null,
@ -1719,7 +1719,7 @@ static void *SignalVehicleCheckProc(Vehicle *v, void *data)
} }
/* Special check for SetSignalsAfterProc, to see if there is a vehicle on this tile */ /* Special check for SetSignalsAfterProc, to see if there is a vehicle on this tile */
bool SignalVehicleCheck(TileIndex tile, uint track) static bool SignalVehicleCheck(TileIndex tile, uint track)
{ {
SignalVehicleCheckStruct dest; SignalVehicleCheckStruct dest;

@ -1343,7 +1343,7 @@ int32 DoConvertStationRail(TileIndex tile, uint totype, bool exec)
return _price.build_rail >> 1; return _price.build_rail >> 1;
} }
void FindRoadStationSpot(bool truck_station, Station *st, RoadStop ***currstop, RoadStop **prev) static void FindRoadStationSpot(bool truck_station, Station* st, RoadStop*** currstop, RoadStop** prev)
{ {
RoadStop **primary_stop; RoadStop **primary_stop;

@ -13,7 +13,7 @@
// table maps each of the six rail directions and tileh combinations to a sprite // table maps each of the six rail directions and tileh combinations to a sprite
// invalid entries are required to make sure that this array can be quickly accessed // invalid entries are required to make sure that this array can be quickly accessed
const int _AutorailTilehSprite[31][6] = { static const int _AutorailTilehSprite[][6] = {
// type 0 1 2 3 4 5 // type 0 1 2 3 4 5
{ 0, 8, 16, 25, 34, 42 }, // tileh = 0 { 0, 8, 16, 25, 34, 42 }, // tileh = 0
{ 5, 13, RED(22), RED(31), 35, 42 }, // tileh = 1 { 5, 13, RED(22), RED(31), 35, 42 }, // tileh = 1
@ -52,7 +52,7 @@ const int _AutorailTilehSprite[31][6] = {
// maps each pixel of a tile (16x16) to a selection type // maps each pixel of a tile (16x16) to a selection type
// (0,0) is the top corner, (16,16) the bottom corner // (0,0) is the top corner, (16,16) the bottom corner
const byte _AutorailPiece[16][16] = { static const byte _AutorailPiece[][16] = {
{ 2, 2, 2, 2, 2, 2, 0, 0, 0, 0, 5, 5, 5, 5, 5, 5 }, { 2, 2, 2, 2, 2, 2, 0, 0, 0, 0, 5, 5, 5, 5, 5, 5 },
{ 2, 2, 2, 2, 2, 2, 0, 0, 0, 0, 5, 5, 5, 5, 5, 5 }, { 2, 2, 2, 2, 2, 2, 0, 0, 0, 0, 5, 5, 5, 5, 5, 5 },
{ 2, 2, 2, 2, 2, 2, 0, 0, 0, 0, 5, 5, 5, 5, 5, 5 }, { 2, 2, 2, 2, 2, 2, 0, 0, 0, 0, 5, 5, 5, 5, 5, 5 },

@ -36,7 +36,7 @@ static const byte _state_dir_table[4] = { 0x20, 8, 0x10, 4 };
* the consist changes. * the consist changes.
* @param v First vehicle of the consist. * @param v First vehicle of the consist.
*/ */
void TrainCargoChanged(Vehicle* v) static void TrainCargoChanged(Vehicle* v)
{ {
Vehicle *u; Vehicle *u;
uint16 weight = 0; uint16 weight = 0;

@ -597,7 +597,7 @@ void VehicleEnteredDepotThisTick(Vehicle *v)
} }
} }
VehicleTickProc *_vehicle_tick_procs[] = { static VehicleTickProc* _vehicle_tick_procs[] = {
Train_Tick, Train_Tick,
RoadVeh_Tick, RoadVeh_Tick,
Ship_Tick, Ship_Tick,

@ -41,7 +41,7 @@ static void WaypointPoolNewBlock(uint start_item)
MemoryPool _waypoint_pool = { "Waypoints", WAYPOINT_POOL_MAX_BLOCKS, WAYPOINT_POOL_BLOCK_SIZE_BITS, sizeof(Waypoint), &WaypointPoolNewBlock, 0, 0, NULL }; MemoryPool _waypoint_pool = { "Waypoints", WAYPOINT_POOL_MAX_BLOCKS, WAYPOINT_POOL_BLOCK_SIZE_BITS, sizeof(Waypoint), &WaypointPoolNewBlock, 0, 0, NULL };
/* Create a new waypoint */ /* Create a new waypoint */
Waypoint *AllocateWaypoint(void) static Waypoint* AllocateWaypoint(void)
{ {
Waypoint *wp; Waypoint *wp;
@ -72,7 +72,7 @@ void UpdateWaypointSign(Waypoint *wp)
} }
/* Redraw the sign of a waypoint */ /* Redraw the sign of a waypoint */
void RedrawWaypointSign(Waypoint *wp) static void RedrawWaypointSign(const Waypoint* wp)
{ {
MarkAllViewportsDirty( MarkAllViewportsDirty(
wp->sign.left - 6, wp->sign.left - 6,
@ -93,7 +93,7 @@ void UpdateAllWaypointSigns(void)
} }
/* Set the default name for a waypoint */ /* Set the default name for a waypoint */
void MakeDefaultWaypointName(Waypoint *wp) static void MakeDefaultWaypointName(Waypoint* wp)
{ {
Waypoint *local_wp; Waypoint *local_wp;
bool used_waypoint[MAX_WAYPOINTS_PER_TOWN]; bool used_waypoint[MAX_WAYPOINTS_PER_TOWN];

Loading…
Cancel
Save