summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortron <tron@openttd.org>2006-01-05 12:40:50 +0000
committertron <tron@openttd.org>2006-01-05 12:40:50 +0000
commite272b03feea5b4c870dd4af5be9071c903c6173d (patch)
treed69972d96a0b32848f54422f41b00cf39d06c5f7
parent980e8f525b924491915571c2ed03469bd6751047 (diff)
downloadopenttd-e272b03feea5b4c870dd4af5be9071c903c6173d.tar.xz
(svn r3365) Staticise 36 functions
-rw-r--r--ai/ai.c2
-rw-r--r--console.c10
-rw-r--r--console.h5
-rw-r--r--engine.c2
-rw-r--r--engine.h2
-rw-r--r--functions.h1
-rw-r--r--gui.h3
-rw-r--r--industry_cmd.c2
-rw-r--r--network_client.c4
-rw-r--r--network_server.c10
-rw-r--r--network_udp.c8
-rw-r--r--openttd.c2
-rw-r--r--order.h1
-rw-r--r--order_cmd.c2
-rw-r--r--player.h2
-rw-r--r--players.c8
-rw-r--r--rail.h1
-rw-r--r--rail_cmd.c2
-rw-r--r--road_cmd.c2
-rw-r--r--roadveh_cmd.c2
-rw-r--r--settings_gui.c5
-rw-r--r--ship_cmd.c2
-rw-r--r--station.h1
-rw-r--r--station_cmd.c2
-rw-r--r--terraform_gui.c4
-rw-r--r--town.h1
-rw-r--r--town_cmd.c5
-rw-r--r--train_cmd.c4
-rw-r--r--unmovable_cmd.c2
-rw-r--r--vehicle.c5
-rw-r--r--vehicle.h4
-rw-r--r--viewport.c4
-rw-r--r--viewport.h2
-rw-r--r--waypoint.c2
-rw-r--r--waypoint.h1
-rw-r--r--window.c17
-rw-r--r--window.h4
37 files changed, 68 insertions, 68 deletions
diff --git a/ai/ai.c b/ai/ai.c
index 47d92c6cf..7beb5b1d3 100644
--- a/ai/ai.c
+++ b/ai/ai.c
@@ -46,7 +46,7 @@ static void AI_DequeueCommands(byte player)
* Needed for SP; we need to delay DoCommand with 1 tick, because else events
* will make infinite loops (AIScript).
*/
-void AI_PutCommandInQueue(byte player, uint tile, uint32 p1, uint32 p2, uint procc)
+static void AI_PutCommandInQueue(byte player, uint tile, uint32 p1, uint32 p2, uint procc)
{
AICommand *com;
diff --git a/console.c b/console.c
index d6b60616f..7a52e172f 100644
--- a/console.c
+++ b/console.c
@@ -58,6 +58,10 @@ static void IConsoleClearCommand(void)
static inline void IConsoleResetHistoryPos(void) {_iconsole_historypos = ICON_HISTORY_SIZE - 1;}
+
+static void IConsoleHistoryAdd(const char* cmd);
+static void IConsoleHistoryNavigate(int direction);
+
// ** console window ** //
static void IConsoleWndProc(Window* w, WindowEvent* e)
{
@@ -322,7 +326,7 @@ void IConsoleOpen(void) {if (_iconsole_mode == ICONSOLE_CLOSED) IConsoleSwitch(
* scroll, etc. Put it to the beginning as it is the latest text
* @param cmd Text to be entered into the 'history'
*/
-void IConsoleHistoryAdd(const char *cmd)
+static void IConsoleHistoryAdd(const char* cmd)
{
free(_iconsole_history[ICON_HISTORY_SIZE - 1]);
@@ -335,7 +339,7 @@ void IConsoleHistoryAdd(const char *cmd)
* Navigate Up/Down in the history of typed commands
* @param direction Go further back in history (+1), go to recently typed commands (-1)
*/
-void IConsoleHistoryNavigate(signed char direction)
+static void IConsoleHistoryNavigate(int direction)
{
int i = _iconsole_historypos + direction;
@@ -687,7 +691,7 @@ static inline int IConsoleCopyInParams(char *dst, const char *src, uint bufpos)
* @param tokencount the number of parameters passed
* @param *tokens are the parameters given to the original command (0 is the first param)
*/
-void IConsoleAliasExec(const IConsoleAlias *alias, byte tokencount, char *tokens[ICON_TOKEN_COUNT])
+static void IConsoleAliasExec(const IConsoleAlias* alias, byte tokencount, char* tokens[ICON_TOKEN_COUNT])
{
const char *cmdptr;
char *aliases[ICON_MAX_ALIAS_LINES], aliasstream[ICON_MAX_STREAMSIZE];
diff --git a/console.h b/console.h
index d29e5e341..f0344a748 100644
--- a/console.h
+++ b/console.h
@@ -123,10 +123,6 @@ void IConsoleSwitch(void);
void IConsoleClose(void);
void IConsoleOpen(void);
-// ** console cmd buffer ** //
-void IConsoleHistoryAdd(const char *cmd);
-void IConsoleHistoryNavigate(signed char direction);
-
// ** console output ** //
void IConsolePrint(uint16 color_code, const char *string);
void CDECL IConsolePrintF(uint16 color_code, const char *s, ...);
@@ -150,7 +146,6 @@ void IConsoleVarPrintSetValue(const IConsoleVar *var);
// *** Parser *** //
void IConsoleCmdExec(const char *cmdstr);
void IConsoleVarExec(const IConsoleVar *var, byte tokencount, char *token[]);
-void IConsoleAliasExec(const IConsoleAlias *alias, byte tokencount, char *tokens[]);
// ** console std lib (register ingame commands/aliases/variables) ** //
void IConsoleStdLibRegister(void);
diff --git a/engine.c b/engine.c
index 95fb1c473..20da2c32d 100644
--- a/engine.c
+++ b/engine.c
@@ -829,7 +829,7 @@ StringID GetCustomEngineName(EngineID engine)
}
-void AcceptEnginePreview(Engine *e, PlayerID player)
+static void AcceptEnginePreview(Engine *e, PlayerID player)
{
Player *p = GetPlayer(player);
diff --git a/engine.h b/engine.h
index 8a36f1eb9..3f3ff5507 100644
--- a/engine.h
+++ b/engine.h
@@ -206,8 +206,6 @@ void DrawRoadVehEngine(int x, int y, EngineID engine, uint32 image_ormod);
void DrawShipEngine(int x, int y, EngineID engine, uint32 image_ormod);
void DrawAircraftEngine(int x, int y, EngineID engine, uint32 image_ormod);
-void AcceptEnginePreview(Engine *e, PlayerID player);
-
void LoadCustomEngineNames(void);
void DeleteCustomEngineNames(void);
diff --git a/functions.h b/functions.h
index 731eb0d88..f33f0ce2c 100644
--- a/functions.h
+++ b/functions.h
@@ -216,7 +216,6 @@ Town *ClosestTownFromTile(TileIndex tile, uint threshold);
void ChangeTownRating(Town *t, int add, int max);
uint GetRoadBitsByTile(TileIndex tile);
-void DrawRoadBits(TileInfo *ti, byte road, byte ground_type, bool snow, bool flat);
int GetTownRadiusGroup(const Town *t, TileIndex tile);
void ShowNetworkChatQueryWindow(byte desttype, byte dest);
void ShowNetworkGiveMoneyWindow(byte player);
diff --git a/gui.h b/gui.h
index ce80b2145..6dc454559 100644
--- a/gui.h
+++ b/gui.h
@@ -17,7 +17,6 @@ void ShowGameOptions(void);
void ShowGameDifficulty(void);
void ShowPatchesSelection(void);
void ShowNewgrf(void);
-void ShowCustCurrency(void);
/* graph_gui.c */
void ShowOperatingProfitGraph(void);
@@ -64,8 +63,6 @@ void ShowPlayerAircraft(PlayerID player, StationID station);
void ShowTerraformToolbar(void);
void PlaceProc_DemolishArea(TileIndex tile);
-void PlaceProc_LowerLand(TileIndex tile);
-void PlaceProc_RaiseLand(TileIndex tile);
void PlaceProc_LevelLand(TileIndex tile);
bool GUIPlaceProcDragXY(const WindowEvent *we);
diff --git a/industry_cmd.c b/industry_cmd.c
index 1aad8c926..ac5320005 100644
--- a/industry_cmd.c
+++ b/industry_cmd.c
@@ -27,7 +27,7 @@ enum {
/**
* Called if a new block is added to the industry-pool
*/
-void IndustryPoolNewBlock(uint start_item)
+static void IndustryPoolNewBlock(uint start_item)
{
Industry *i;
diff --git a/network_client.c b/network_client.c
index de22bb9e0..060e230ea 100644
--- a/network_client.c
+++ b/network_client.c
@@ -32,7 +32,7 @@ extern const char _openttd_revision[];
static uint32 last_ack_frame;
-void NetworkRecvPatchSettings(NetworkClientState *cs, Packet *p);
+static void NetworkRecvPatchSettings(NetworkClientState* cs, Packet* p);
// **********
// Sending functions
@@ -823,7 +823,7 @@ extern const SettingDesc patch_settings[];
// This is a TEMPORARY solution to get the patch-settings
// to the client. When the patch-settings are saved in the savegame
// this should be removed!!
-void NetworkRecvPatchSettings(NetworkClientState *cs, Packet *p)
+static void NetworkRecvPatchSettings(NetworkClientState* cs, Packet* p)
{
const SettingDesc *item;
diff --git a/network_server.c b/network_server.c
index 2dd20ffc5..ad0b42f26 100644
--- a/network_server.c
+++ b/network_server.c
@@ -24,9 +24,10 @@
// This file handles all the server-commands
-void NetworkHandleCommandQueue(NetworkClientState *cs);
+static void NetworkHandleCommandQueue(NetworkClientState* cs);
+static void NetworkSendPatchSettings(NetworkClientState* cs);
+
void NetworkPopulateCompanyInfo(void);
-void NetworkSendPatchSettings(NetworkClientState *cs);
// Is the network enabled?
@@ -1190,7 +1191,7 @@ extern const SettingDesc patch_settings[];
// This is a TEMPORARY solution to get the patch-settings
// to the client. When the patch-settings are saved in the savegame
// this should be removed!!
-void NetworkSendPatchSettings(NetworkClientState *cs)
+static void NetworkSendPatchSettings(NetworkClientState* cs)
{
const SettingDesc *item;
Packet *p = NetworkSend_Init(PACKET_SERVER_MAP);
@@ -1484,7 +1485,8 @@ bool NetworkServer_ReadPackets(NetworkClientState *cs)
}
// Handle the local command-queue
-void NetworkHandleCommandQueue(NetworkClientState *cs) {
+static void NetworkHandleCommandQueue(NetworkClientState* cs)
+{
CommandPacket *cp;
while ( (cp = cs->command_queue) != NULL) {
diff --git a/network_udp.c b/network_udp.c
index 1e369d42c..c229d3dcc 100644
--- a/network_udp.c
+++ b/network_udp.c
@@ -41,7 +41,7 @@ enum {
};
#define DEF_UDP_RECEIVE_COMMAND(type) void NetworkPacketReceive_ ## type ## _command(Packet *p, struct sockaddr_in *client_addr)
-void NetworkSendUDP_Packet(SOCKET udp, Packet *p, struct sockaddr_in *recv);
+static void NetworkSendUDP_Packet(SOCKET udp, Packet* p, struct sockaddr_in* recv);
static NetworkClientState _udp_cs;
@@ -303,7 +303,7 @@ static NetworkUDPPacket* const _network_udp_packet[] = {
assert_compile(lengthof(_network_udp_packet) == PACKET_UDP_END);
-void NetworkHandleUDPPacket(Packet *p, struct sockaddr_in *client_addr)
+static void NetworkHandleUDPPacket(Packet* p, struct sockaddr_in* client_addr)
{
byte type;
@@ -322,7 +322,7 @@ void NetworkHandleUDPPacket(Packet *p, struct sockaddr_in *client_addr)
// Send a packet over UDP
-void NetworkSendUDP_Packet(SOCKET udp, Packet *p, struct sockaddr_in *recv)
+static void NetworkSendUDP_Packet(SOCKET udp, Packet* p, struct sockaddr_in* recv)
{
int res;
@@ -451,7 +451,7 @@ void NetworkUDPReceive(SOCKET udp)
}
// Broadcast to all ips
-void NetworkUDPBroadCast(SOCKET udp)
+static void NetworkUDPBroadCast(SOCKET udp)
{
int i;
struct sockaddr_in out_addr;
diff --git a/openttd.c b/openttd.c
index d14861d88..368d8b003 100644
--- a/openttd.c
+++ b/openttd.c
@@ -544,7 +544,7 @@ void OTTD_SendThreadMessage(ThreadMsg msg)
/** Handle the user-messages sent to us
* @param message message sent
*/
-void ProcessSentMessage(ThreadMsg message)
+static void ProcessSentMessage(ThreadMsg message)
{
switch (message) {
case MSG_OTTD_SAVETHREAD_START: SaveFileStart(); break;
diff --git a/order.h b/order.h
index 52ef207e3..6f670b82b 100644
--- a/order.h
+++ b/order.h
@@ -178,7 +178,6 @@ bool IsOrderListShared(const Vehicle *v);
void AssignOrder(Order *order, Order data);
bool CheckForValidOrders(const Vehicle* v);
-Order UnpackVersion4Order(uint16 packed);
Order UnpackOldOrder(uint16 packed);
#endif /* ORDER_H */
diff --git a/order_cmd.c b/order_cmd.c
index 43595e508..9248d1519 100644
--- a/order_cmd.c
+++ b/order_cmd.c
@@ -63,7 +63,7 @@ Order UnpackOldOrder(uint16 packed)
* Unpacks a order from savegames with version 4 and lower
*
*/
-Order UnpackVersion4Order(uint16 packed)
+static Order UnpackVersion4Order(uint16 packed)
{
Order order;
order.type = GB(packed, 0, 4);
diff --git a/player.h b/player.h
index 1b8bbb279..071dcd2ad 100644
--- a/player.h
+++ b/player.h
@@ -266,7 +266,5 @@ int8 SaveHighScoreValueNetwork(void);
void InitialiseEngineReplacement(Player *p);
EngineID EngineReplacement(const Player *p, EngineID engine);
bool EngineHasReplacement(const Player *p, EngineID engine);
-int32 AddEngineReplacement(Player *p, EngineID old_engine, EngineID new_engine, uint32 flags);
-int32 RemoveEngineReplacement(Player *p, EngineID engine, uint32 flags);
#endif /* PLAYER_H */
diff --git a/players.c b/players.c
index 9afa570fc..1b6b99c85 100644
--- a/players.c
+++ b/players.c
@@ -637,6 +637,10 @@ static void DeletePlayerStuff(PlayerID pi)
p->president_name_1 = 0;
}
+
+static int32 AddEngineReplacement(Player* p, EngineID old_engine, EngineID new_engine, uint32 flags);
+static int32 RemoveEngineReplacement(Player* p, EngineID engine, uint32 flags);
+
/** Change engine renewal parameters
* @param x,y unused
* @param p1 bits 0-3 command
@@ -1141,7 +1145,7 @@ bool EngineHasReplacement(const Player *p, EngineID engine)
* @param flags The calling command flags.
* @return 0 on success, CMD_ERROR on failure.
*/
-int32 AddEngineReplacement(Player *p, EngineID old_engine, EngineID new_engine, uint32 flags)
+static int32 AddEngineReplacement(Player* p, EngineID old_engine, EngineID new_engine, uint32 flags)
{
if (flags & DC_EXEC) p->engine_replacement[old_engine] = new_engine;
return 0;
@@ -1154,7 +1158,7 @@ int32 AddEngineReplacement(Player *p, EngineID old_engine, EngineID new_engine,
* @param flags The calling command flags.
* @return 0 on success, CMD_ERROR on failure.
*/
-int32 RemoveEngineReplacement(Player *p, EngineID engine, uint32 flags)
+static int32 RemoveEngineReplacement(Player* p, EngineID engine, uint32 flags)
{
if (flags & DC_EXEC) p->engine_replacement[engine] = INVALID_ENGINE;
return 0;
diff --git a/rail.h b/rail.h
index 04006efc7..0b0ebfb33 100644
--- a/rail.h
+++ b/rail.h
@@ -638,7 +638,6 @@ static inline bool TracksOverlap(TrackBits bits)
return true;
}
-void DrawTrackBits(TileInfo *ti, TrackBits track, bool earth, bool snow, bool flat);
void DrawTrainDepotSprite(int x, int y, int image, RailType railtype);
void DrawDefaultWaypointSprite(int x, int y, RailType railtype);
#endif /* RAIL_H */
diff --git a/rail_cmd.c b/rail_cmd.c
index 8518e319c..b84a7a729 100644
--- a/rail_cmd.c
+++ b/rail_cmd.c
@@ -1342,7 +1342,7 @@ static void DrawSpecialBuilding(uint32 image, uint32 offset,
* @param snow Draw as snow
* @param flat Always draw foundation
*/
-void DrawTrackBits(TileInfo *ti, TrackBits track, bool earth, bool snow, bool flat)
+static void DrawTrackBits(TileInfo* ti, TrackBits track, bool earth, bool snow, bool flat)
{
const RailtypeInfo *rti = GetRailTypeInfo(GetRailType(ti->tile));
PalSpriteID image;
diff --git a/road_cmd.c b/road_cmd.c
index d05a16601..e81e59177 100644
--- a/road_cmd.c
+++ b/road_cmd.c
@@ -773,7 +773,7 @@ const byte _road_sloped_sprites[14] = {
* @param snow Draw snow
* @param flat Draw foundation
*/
-void DrawRoadBits(TileInfo *ti, byte road, byte ground_type, bool snow, bool flat)
+static void DrawRoadBits(TileInfo *ti, byte road, byte ground_type, bool snow, bool flat)
{
const DrawRoadTileStruct *drts;
PalSpriteID image = 0;
diff --git a/roadveh_cmd.c b/roadveh_cmd.c
index c3ca908c6..840284bbb 100644
--- a/roadveh_cmd.c
+++ b/roadveh_cmd.c
@@ -93,7 +93,7 @@ void DrawRoadVehEngine(int x, int y, EngineID engine, uint32 image_ormod)
DrawSprite((6 + _roadveh_images[spritenum]) | image_ormod, x, y);
}
-int32 EstimateRoadVehCost(EngineID engine_type)
+static int32 EstimateRoadVehCost(EngineID engine_type)
{
return ((_price.roadveh_base >> 3) * RoadVehInfo(engine_type)->base_cost) >> 5;
}
diff --git a/settings_gui.c b/settings_gui.c
index 822e65283..64f1b3034 100644
--- a/settings_gui.c
+++ b/settings_gui.c
@@ -83,6 +83,9 @@ static inline bool RoadVehiclesAreBuilt(void)
return false;
}
+
+static void ShowCustCurrency(void);
+
static void GameOptionsWndProc(Window *w, WindowEvent *e)
{
switch (e->event) {
@@ -1506,7 +1509,7 @@ static const WindowDesc _cust_currency_desc = {
CustCurrencyWndProc,
};
-void ShowCustCurrency(void)
+static void ShowCustCurrency(void)
{
_str_separator[0] = _custom_currency.separator;
_str_separator[1] = '\0';
diff --git a/ship_cmd.c b/ship_cmd.c
index 1b117c136..a78a49880 100644
--- a/ship_cmd.c
+++ b/ship_cmd.c
@@ -377,7 +377,7 @@ static bool ShipAccelerate(Vehicle *v)
return (t < v->progress);
}
-int32 EstimateShipCost(EngineID engine_type)
+static int32 EstimateShipCost(EngineID engine_type)
{
return ShipVehInfo(engine_type)->base_cost * (_price.ship_base>>3)>>5;
}
diff --git a/station.h b/station.h
index 6459de6b0..0f2393913 100644
--- a/station.h
+++ b/station.h
@@ -207,7 +207,6 @@ static inline int GetRoadStopType(TileIndex tile)
return (_m[tile].m5 < 0x47) ? RS_TRUCK : RS_BUS;
}
-uint GetNumRoadStops(const Station *st, RoadStopType type);
RoadStop * GetPrimaryRoadStop(const Station *st, RoadStopType type);
RoadStop * AllocateRoadStop( void );
void ClearSlot(Vehicle *v, RoadStop *rs);
diff --git a/station_cmd.c b/station_cmd.c
index dcd8e961a..b55c0ac24 100644
--- a/station_cmd.c
+++ b/station_cmd.c
@@ -118,7 +118,7 @@ RoadStop* GetRoadStopByTile(TileIndex tile, RoadStopType type)
return rs;
}
-uint GetNumRoadStops(const Station *st, RoadStopType type)
+static uint GetNumRoadStops(const Station* st, RoadStopType type)
{
uint num = 0;
const RoadStop *rs;
diff --git a/terraform_gui.c b/terraform_gui.c
index 8b04caf2a..91ddac0dc 100644
--- a/terraform_gui.c
+++ b/terraform_gui.c
@@ -141,12 +141,12 @@ void PlaceProc_DemolishArea(TileIndex tile)
VpStartPlaceSizing(tile, VPM_X_AND_Y | GUI_PlaceProc_DemolishArea);
}
-void PlaceProc_RaiseLand(TileIndex tile)
+static void PlaceProc_RaiseLand(TileIndex tile)
{
GenericRaiseLowerLand(tile, 1);
}
-void PlaceProc_LowerLand(TileIndex tile)
+static void PlaceProc_LowerLand(TileIndex tile)
{
GenericRaiseLowerLand(tile, 0);
}
diff --git a/town.h b/town.h
index 906114725..99567bcb8 100644
--- a/town.h
+++ b/town.h
@@ -83,7 +83,6 @@ void InitializeTown(void);
void ShowTownViewWindow(uint town);
void DeleteTown(Town *t);
void ExpandTown(Town *t);
-bool GrowTown(Town *t);
Town *CreateRandomTown(uint attempts);
enum {
diff --git a/town_cmd.c b/town_cmd.c
index 453ad1340..fe983eea7 100644
--- a/town_cmd.c
+++ b/town_cmd.c
@@ -415,6 +415,9 @@ static const TileIndexDiffC _roadblock_tileadd[] = {
{ 0, 1}
};
+
+static bool GrowTown(Town *t);
+
static void TownTickHandler(Town *t)
{
if (t->flags12&1) {
@@ -762,7 +765,7 @@ static int GenRandomRoadBits(void)
// Grow the town
// Returns true if a house was built, or no if the build failed.
-bool GrowTown(Town *t)
+static bool GrowTown(Town *t)
{
TileIndex tile;
const TileIndexDiffC *ptr;
diff --git a/train_cmd.c b/train_cmd.c
index dd7f19735..0c5ec1b8d 100644
--- a/train_cmd.c
+++ b/train_cmd.c
@@ -354,7 +354,7 @@ static int GetTrainAcceleration(Vehicle *v, bool mode)
}
}
-void UpdateTrainAcceleration(Vehicle *v)
+static void UpdateTrainAcceleration(Vehicle* v)
{
uint power = 0;
uint weight = 0;
@@ -630,7 +630,7 @@ static int32 EstimateTrainCost(const RailVehicleInfo* rvi)
return (rvi->base_cost * (_price.build_railvehicle >> 3)) >> 5;
}
-void AddRearEngineToMultiheadedTrain(Vehicle *v, Vehicle *u, bool building)
+static void AddRearEngineToMultiheadedTrain(Vehicle* v, Vehicle* u, bool building)
{
u->direction = v->direction;
u->owner = v->owner;
diff --git a/unmovable_cmd.c b/unmovable_cmd.c
index 9b2f2e3d2..07cdb76e4 100644
--- a/unmovable_cmd.c
+++ b/unmovable_cmd.c
@@ -23,7 +23,7 @@
* @param tile tile coordinates where HQ is located to destroy
* @param flags docommand flags of calling function
*/
-int32 DestroyCompanyHQ(TileIndex tile, uint32 flags)
+static int32 DestroyCompanyHQ(TileIndex tile, uint32 flags)
{
Player *p;
diff --git a/vehicle.c b/vehicle.c
index c215c42a1..1193d2ebd 100644
--- a/vehicle.c
+++ b/vehicle.c
@@ -191,6 +191,9 @@ Vehicle *FindVehicleBetween(TileIndex from, TileIndex to, byte z)
return NULL;
}
+
+static void UpdateVehiclePosHash(Vehicle* v, int x, int y);
+
void VehiclePositionChanged(Vehicle *v)
{
int img = v->cur_image;
@@ -395,7 +398,7 @@ void *VehicleFromPos(TileIndex tile, void *data, VehicleFromPosProc *proc)
-void UpdateVehiclePosHash(Vehicle *v, int x, int y)
+static void UpdateVehiclePosHash(Vehicle* v, int x, int y)
{
VehicleID *old_hash, *new_hash;
int old_x = v->left_coord;
diff --git a/vehicle.h b/vehicle.h
index d4afef496..1451e17f2 100644
--- a/vehicle.h
+++ b/vehicle.h
@@ -249,7 +249,6 @@ Vehicle *AllocateVehicle(void);
bool AllocateVehicles(Vehicle **vl, int num);
Vehicle *ForceAllocateVehicle(void);
Vehicle *ForceAllocateSpecialVehicle(void);
-void UpdateVehiclePosHash(Vehicle *v, int x, int y);
void VehiclePositionChanged(Vehicle *v);
void AfterLoadVehicles(void);
Vehicle *GetLastVehicleInChain(Vehicle *v);
@@ -272,8 +271,6 @@ void ViewportAddVehicles(DrawPixelInfo *dpi);
void TrainEnterDepot(Vehicle *v, TileIndex tile);
-void AddRearEngineToMultiheadedTrain(Vehicle *v, Vehicle *u, bool building) ;
-
/* train_cmd.h */
int GetTrainImage(const Vehicle *v, byte direction);
int GetAircraftImage(const Vehicle *v, byte direction);
@@ -311,7 +308,6 @@ UnitID GetFreeUnitNumber(byte type);
int LoadUnloadVehicle(Vehicle *v);
void TrainConsistChanged(Vehicle *v);
-void UpdateTrainAcceleration(Vehicle *v);
int32 GetTrainRunningCost(const Vehicle *v);
int CheckTrainStoppedInDepot(const Vehicle *v);
diff --git a/viewport.c b/viewport.c
index d0a287985..acf158b58 100644
--- a/viewport.c
+++ b/viewport.c
@@ -216,7 +216,7 @@ static void DoSetViewportPosition(Window *w, int left, int top, int width, int h
}
}
-void SetViewportPosition(Window *w, int x, int y)
+static void SetViewportPosition(Window* w, int x, int y)
{
ViewPort *vp = w->viewport;
int old_left = vp->virtual_left;
@@ -1939,7 +1939,7 @@ void VpSetPresizeRange(uint from, uint to)
_thd.next_drawstyle = HT_RECT;
}
-void VpStartPreSizing(void)
+static void VpStartPreSizing(void)
{
_thd.selend.x = -1;
_special_mouse_mode = WSM_PRESIZE;
diff --git a/viewport.h b/viewport.h
index 4dace41c3..d0f9c0c37 100644
--- a/viewport.h
+++ b/viewport.h
@@ -18,7 +18,6 @@ void SetSelectionRed(bool);
/* viewport.c */
void AssignWindowViewport(Window *w, int x, int y,
int width, int height, uint32 follow_flags, byte zoom);
-void SetViewportPosition(Window *w, int x, int y);
ViewPort *IsPtInWindowViewport(const Window *w, int x, int y);
Point GetTileBelowCursor(void);
void ZoomInOrOutToCursorWindow(bool in, Window * w);
@@ -44,7 +43,6 @@ void SetTileSelectSize(int w, int h);
void SetTileSelectBigSize(int ox, int oy, int sx, int sy);
void VpStartPlaceSizing(TileIndex tile, int user);
-void VpStartPreSizing(void);
void VpSetPresizeRange(uint from, uint to);
void VpSetPlaceSizingLimit(int limit);
diff --git a/waypoint.c b/waypoint.c
index 8d323eb3a..ee9e04ada 100644
--- a/waypoint.c
+++ b/waypoint.c
@@ -64,7 +64,7 @@ static Waypoint* AllocateWaypoint(void)
}
/* Update the sign for the waypoint */
-void UpdateWaypointSign(Waypoint *wp)
+static void UpdateWaypointSign(Waypoint* wp)
{
Point pt = RemapCoords2(TileX(wp->xy) * 16, TileY(wp->xy) * 16);
SetDParam(0, wp->index);
diff --git a/waypoint.h b/waypoint.h
index 427fd9d79..38915bb35 100644
--- a/waypoint.h
+++ b/waypoint.h
@@ -74,7 +74,6 @@ int32 RemoveTrainWaypoint(TileIndex tile, uint32 flags, bool justremove);
Station *ComposeWaypointStation(TileIndex tile);
void ShowRenameWaypointWindow(const Waypoint *cp);
void DrawWaypointSprite(int x, int y, int image, RailType railtype);
-void UpdateWaypointSign(Waypoint *cp);
void FixOldWaypoints(void);
void UpdateAllWaypointSigns(void);
void UpdateAllWaypointCustomGraphics(void);
diff --git a/window.c b/window.c
index 91fdaca74..1923288ae 100644
--- a/window.c
+++ b/window.c
@@ -23,6 +23,10 @@ void HandleButtonClick(Window *w, byte widget)
InvalidateWidget(w, widget);
}
+
+static Window* StartWindowDrag(Window* w);
+static Window* StartWindowSizing(Window* w);
+
static void DispatchLeftClickEvent(Window* w, int x, int y)
{
WindowEvent e;
@@ -139,6 +143,8 @@ static void DispatchMouseWheelEvent(Window* w, int widget, int wheel)
}
+static void DrawOverlappedWindow(Window* w, int left, int top, int right, int bottom);
+
void DrawOverlappedWindowForAll(int left, int top, int right, int bottom)
{
Window *w;
@@ -155,7 +161,7 @@ void DrawOverlappedWindowForAll(int left, int top, int right, int bottom)
}
}
-void DrawOverlappedWindow(Window *w, int left, int top, int right, int bottom)
+static void DrawOverlappedWindow(Window* w, int left, int top, int right, int bottom)
{
const Window* v = w;
int x;
@@ -287,6 +293,9 @@ void DeleteWindowByClass(WindowClass cls)
}
}
+
+static Window* BringWindowToFront(Window* w);
+
Window *BringWindowToFrontById(WindowClass cls, WindowNumber number)
{
Window *w = FindWindowById(cls, number);
@@ -312,7 +321,7 @@ static inline bool IsVitalWindow(const Window *w)
* - New window, Chatbar (only if open)
* @param w window that is put into the foreground
*/
-Window *BringWindowToFront(Window *w)
+static Window* BringWindowToFront(Window* w)
{
Window *v;
Window temp;
@@ -1057,7 +1066,7 @@ static bool HandleWindowDragging(void)
return false;
}
-Window *StartWindowDrag(Window *w)
+static Window* StartWindowDrag(Window* w)
{
w->flags4 |= WF_DRAGGING;
_dragging_window = true;
@@ -1070,7 +1079,7 @@ Window *StartWindowDrag(Window *w)
return w;
}
-Window *StartWindowSizing(Window *w)
+static Window* StartWindowSizing(Window* w)
{
w->flags4 |= WF_SIZING;
_dragging_window = true;
diff --git a/window.h b/window.h
index e65415994..87e4a36ac 100644
--- a/window.h
+++ b/window.h
@@ -552,7 +552,6 @@ enum WindowFlags {
};
/* window.c */
-void DrawOverlappedWindow(Window *w, int left, int top, int right, int bottom);
void CallWindowEventNP(Window *w, int event);
void CallWindowTickEvent(void);
void SetWindowDirty(const Window* w);
@@ -561,9 +560,6 @@ void SendWindowMessage(WindowClass wnd_class, WindowNumber wnd_num, uint msg, ui
Window *FindWindowById(WindowClass cls, WindowNumber number);
void DeleteWindow(Window *w);
Window *BringWindowToFrontById(WindowClass cls, WindowNumber number);
-Window *BringWindowToFront(Window *w);
-Window *StartWindowDrag(Window *w);
-Window *StartWindowSizing(Window *w);
Window *FindWindowFromPt(int x, int y);
bool IsWindowOfPrototype(const Window* w, const Widget* widget);