(svn r3297) Staticise

This commit is contained in:
tron 2005-12-14 06:20:23 +00:00
parent ce94c90a7b
commit 23bfc03054
12 changed files with 24 additions and 21 deletions

View File

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

View File

@ -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;
}

View File

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

View File

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

View File

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

View File

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

View File

@ -1304,7 +1304,7 @@ static void DetTrackDrawProc_Null(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,
@ -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 */
bool SignalVehicleCheck(TileIndex tile, uint track)
static bool SignalVehicleCheck(TileIndex tile, uint track)
{
SignalVehicleCheckStruct dest;

View File

@ -1343,7 +1343,7 @@ int32 DoConvertStationRail(TileIndex tile, uint totype, bool exec)
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;

View File

@ -13,7 +13,7 @@
// 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
const int _AutorailTilehSprite[31][6] = {
static const int _AutorailTilehSprite[][6] = {
// type 0 1 2 3 4 5
{ 0, 8, 16, 25, 34, 42 }, // tileh = 0
{ 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
// (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 },

View File

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

View File

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

View File

@ -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 };
/* Create a new waypoint */
Waypoint *AllocateWaypoint(void)
static Waypoint* AllocateWaypoint(void)
{
Waypoint *wp;
@ -72,7 +72,7 @@ void UpdateWaypointSign(Waypoint *wp)
}
/* Redraw the sign of a waypoint */
void RedrawWaypointSign(Waypoint *wp)
static void RedrawWaypointSign(const Waypoint* wp)
{
MarkAllViewportsDirty(
wp->sign.left - 6,
@ -93,7 +93,7 @@ void UpdateAllWaypointSigns(void)
}
/* Set the default name for a waypoint */
void MakeDefaultWaypointName(Waypoint *wp)
static void MakeDefaultWaypointName(Waypoint* wp)
{
Waypoint *local_wp;
bool used_waypoint[MAX_WAYPOINTS_PER_TOWN];