# HG changeset patch # User tron # Date 1136464850 0 # Node ID 58dcead3f545d7c676574deaab4e03c16c601673 # Parent 2b74221ae24cb298aca812e578029bad551e2596 (svn r3365) Staticise 36 functions diff -r 2b74221ae24c -r 58dcead3f545 ai/ai.c --- a/ai/ai.c Thu Jan 05 12:00:38 2006 +0000 +++ b/ai/ai.c Thu Jan 05 12:40:50 2006 +0000 @@ -46,7 +46,7 @@ * 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 -r 2b74221ae24c -r 58dcead3f545 console.c --- a/console.c Thu Jan 05 12:00:38 2006 +0000 +++ b/console.c Thu Jan 05 12:40:50 2006 +0000 @@ -58,6 +58,10 @@ 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 @@ * 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 @@ * 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 @@ * @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 -r 2b74221ae24c -r 58dcead3f545 console.h --- a/console.h Thu Jan 05 12:00:38 2006 +0000 +++ b/console.h Thu Jan 05 12:40:50 2006 +0000 @@ -123,10 +123,6 @@ 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 @@ // *** 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 -r 2b74221ae24c -r 58dcead3f545 engine.c --- a/engine.c Thu Jan 05 12:00:38 2006 +0000 +++ b/engine.c Thu Jan 05 12:40:50 2006 +0000 @@ -829,7 +829,7 @@ } -void AcceptEnginePreview(Engine *e, PlayerID player) +static void AcceptEnginePreview(Engine *e, PlayerID player) { Player *p = GetPlayer(player); diff -r 2b74221ae24c -r 58dcead3f545 engine.h --- a/engine.h Thu Jan 05 12:00:38 2006 +0000 +++ b/engine.h Thu Jan 05 12:40:50 2006 +0000 @@ -206,8 +206,6 @@ 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 -r 2b74221ae24c -r 58dcead3f545 functions.h --- a/functions.h Thu Jan 05 12:00:38 2006 +0000 +++ b/functions.h Thu Jan 05 12:40:50 2006 +0000 @@ -216,7 +216,6 @@ 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 -r 2b74221ae24c -r 58dcead3f545 gui.h --- a/gui.h Thu Jan 05 12:00:38 2006 +0000 +++ b/gui.h Thu Jan 05 12:40:50 2006 +0000 @@ -17,7 +17,6 @@ void ShowGameDifficulty(void); void ShowPatchesSelection(void); void ShowNewgrf(void); -void ShowCustCurrency(void); /* graph_gui.c */ void ShowOperatingProfitGraph(void); @@ -64,8 +63,6 @@ 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 -r 2b74221ae24c -r 58dcead3f545 industry_cmd.c --- a/industry_cmd.c Thu Jan 05 12:00:38 2006 +0000 +++ b/industry_cmd.c Thu Jan 05 12:40:50 2006 +0000 @@ -27,7 +27,7 @@ /** * 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 -r 2b74221ae24c -r 58dcead3f545 network_client.c --- a/network_client.c Thu Jan 05 12:00:38 2006 +0000 +++ b/network_client.c Thu Jan 05 12:40:50 2006 +0000 @@ -32,7 +32,7 @@ static uint32 last_ack_frame; -void NetworkRecvPatchSettings(NetworkClientState *cs, Packet *p); +static void NetworkRecvPatchSettings(NetworkClientState* cs, Packet* p); // ********** // Sending functions @@ -823,7 +823,7 @@ // 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 -r 2b74221ae24c -r 58dcead3f545 network_server.c --- a/network_server.c Thu Jan 05 12:00:38 2006 +0000 +++ b/network_server.c Thu Jan 05 12:40:50 2006 +0000 @@ -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 @@ // 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 @@ } // Handle the local command-queue -void NetworkHandleCommandQueue(NetworkClientState *cs) { +static void NetworkHandleCommandQueue(NetworkClientState* cs) +{ CommandPacket *cp; while ( (cp = cs->command_queue) != NULL) { diff -r 2b74221ae24c -r 58dcead3f545 network_udp.c --- a/network_udp.c Thu Jan 05 12:00:38 2006 +0000 +++ b/network_udp.c Thu Jan 05 12:40:50 2006 +0000 @@ -41,7 +41,7 @@ }; #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 @@ 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 @@ // 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 @@ } // Broadcast to all ips -void NetworkUDPBroadCast(SOCKET udp) +static void NetworkUDPBroadCast(SOCKET udp) { int i; struct sockaddr_in out_addr; diff -r 2b74221ae24c -r 58dcead3f545 openttd.c --- a/openttd.c Thu Jan 05 12:00:38 2006 +0000 +++ b/openttd.c Thu Jan 05 12:40:50 2006 +0000 @@ -544,7 +544,7 @@ /** 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 -r 2b74221ae24c -r 58dcead3f545 order.h --- a/order.h Thu Jan 05 12:00:38 2006 +0000 +++ b/order.h Thu Jan 05 12:40:50 2006 +0000 @@ -178,7 +178,6 @@ void AssignOrder(Order *order, Order data); bool CheckForValidOrders(const Vehicle* v); -Order UnpackVersion4Order(uint16 packed); Order UnpackOldOrder(uint16 packed); #endif /* ORDER_H */ diff -r 2b74221ae24c -r 58dcead3f545 order_cmd.c --- a/order_cmd.c Thu Jan 05 12:00:38 2006 +0000 +++ b/order_cmd.c Thu Jan 05 12:40:50 2006 +0000 @@ -63,7 +63,7 @@ * 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 -r 2b74221ae24c -r 58dcead3f545 player.h --- a/player.h Thu Jan 05 12:00:38 2006 +0000 +++ b/player.h Thu Jan 05 12:40:50 2006 +0000 @@ -266,7 +266,5 @@ 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 -r 2b74221ae24c -r 58dcead3f545 players.c --- a/players.c Thu Jan 05 12:00:38 2006 +0000 +++ b/players.c Thu Jan 05 12:40:50 2006 +0000 @@ -637,6 +637,10 @@ 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 @@ * @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 @@ * @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 -r 2b74221ae24c -r 58dcead3f545 rail.h --- a/rail.h Thu Jan 05 12:00:38 2006 +0000 +++ b/rail.h Thu Jan 05 12:40:50 2006 +0000 @@ -638,7 +638,6 @@ 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 -r 2b74221ae24c -r 58dcead3f545 rail_cmd.c --- a/rail_cmd.c Thu Jan 05 12:00:38 2006 +0000 +++ b/rail_cmd.c Thu Jan 05 12:40:50 2006 +0000 @@ -1342,7 +1342,7 @@ * @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 -r 2b74221ae24c -r 58dcead3f545 road_cmd.c --- a/road_cmd.c Thu Jan 05 12:00:38 2006 +0000 +++ b/road_cmd.c Thu Jan 05 12:40:50 2006 +0000 @@ -773,7 +773,7 @@ * @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 -r 2b74221ae24c -r 58dcead3f545 roadveh_cmd.c --- a/roadveh_cmd.c Thu Jan 05 12:00:38 2006 +0000 +++ b/roadveh_cmd.c Thu Jan 05 12:40:50 2006 +0000 @@ -93,7 +93,7 @@ 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 -r 2b74221ae24c -r 58dcead3f545 settings_gui.c --- a/settings_gui.c Thu Jan 05 12:00:38 2006 +0000 +++ b/settings_gui.c Thu Jan 05 12:40:50 2006 +0000 @@ -83,6 +83,9 @@ return false; } + +static void ShowCustCurrency(void); + static void GameOptionsWndProc(Window *w, WindowEvent *e) { switch (e->event) { @@ -1506,7 +1509,7 @@ CustCurrencyWndProc, }; -void ShowCustCurrency(void) +static void ShowCustCurrency(void) { _str_separator[0] = _custom_currency.separator; _str_separator[1] = '\0'; diff -r 2b74221ae24c -r 58dcead3f545 ship_cmd.c --- a/ship_cmd.c Thu Jan 05 12:00:38 2006 +0000 +++ b/ship_cmd.c Thu Jan 05 12:40:50 2006 +0000 @@ -377,7 +377,7 @@ 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 -r 2b74221ae24c -r 58dcead3f545 station.h --- a/station.h Thu Jan 05 12:00:38 2006 +0000 +++ b/station.h Thu Jan 05 12:40:50 2006 +0000 @@ -207,7 +207,6 @@ 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 -r 2b74221ae24c -r 58dcead3f545 station_cmd.c --- a/station_cmd.c Thu Jan 05 12:00:38 2006 +0000 +++ b/station_cmd.c Thu Jan 05 12:40:50 2006 +0000 @@ -118,7 +118,7 @@ return rs; } -uint GetNumRoadStops(const Station *st, RoadStopType type) +static uint GetNumRoadStops(const Station* st, RoadStopType type) { uint num = 0; const RoadStop *rs; diff -r 2b74221ae24c -r 58dcead3f545 terraform_gui.c --- a/terraform_gui.c Thu Jan 05 12:00:38 2006 +0000 +++ b/terraform_gui.c Thu Jan 05 12:40:50 2006 +0000 @@ -141,12 +141,12 @@ 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 -r 2b74221ae24c -r 58dcead3f545 town.h --- a/town.h Thu Jan 05 12:00:38 2006 +0000 +++ b/town.h Thu Jan 05 12:40:50 2006 +0000 @@ -83,7 +83,6 @@ void ShowTownViewWindow(uint town); void DeleteTown(Town *t); void ExpandTown(Town *t); -bool GrowTown(Town *t); Town *CreateRandomTown(uint attempts); enum { diff -r 2b74221ae24c -r 58dcead3f545 town_cmd.c --- a/town_cmd.c Thu Jan 05 12:00:38 2006 +0000 +++ b/town_cmd.c Thu Jan 05 12:40:50 2006 +0000 @@ -415,6 +415,9 @@ { 0, 1} }; + +static bool GrowTown(Town *t); + static void TownTickHandler(Town *t) { if (t->flags12&1) { @@ -762,7 +765,7 @@ // 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 -r 2b74221ae24c -r 58dcead3f545 train_cmd.c --- a/train_cmd.c Thu Jan 05 12:00:38 2006 +0000 +++ b/train_cmd.c Thu Jan 05 12:40:50 2006 +0000 @@ -354,7 +354,7 @@ } } -void UpdateTrainAcceleration(Vehicle *v) +static void UpdateTrainAcceleration(Vehicle* v) { uint power = 0; uint weight = 0; @@ -630,7 +630,7 @@ 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 -r 2b74221ae24c -r 58dcead3f545 unmovable_cmd.c --- a/unmovable_cmd.c Thu Jan 05 12:00:38 2006 +0000 +++ b/unmovable_cmd.c Thu Jan 05 12:40:50 2006 +0000 @@ -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 -r 2b74221ae24c -r 58dcead3f545 vehicle.c --- a/vehicle.c Thu Jan 05 12:00:38 2006 +0000 +++ b/vehicle.c Thu Jan 05 12:40:50 2006 +0000 @@ -191,6 +191,9 @@ 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 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 -r 2b74221ae24c -r 58dcead3f545 vehicle.h --- a/vehicle.h Thu Jan 05 12:00:38 2006 +0000 +++ b/vehicle.h Thu Jan 05 12:40:50 2006 +0000 @@ -249,7 +249,6 @@ 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 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 @@ int LoadUnloadVehicle(Vehicle *v); void TrainConsistChanged(Vehicle *v); -void UpdateTrainAcceleration(Vehicle *v); int32 GetTrainRunningCost(const Vehicle *v); int CheckTrainStoppedInDepot(const Vehicle *v); diff -r 2b74221ae24c -r 58dcead3f545 viewport.c --- a/viewport.c Thu Jan 05 12:00:38 2006 +0000 +++ b/viewport.c Thu Jan 05 12:40:50 2006 +0000 @@ -216,7 +216,7 @@ } } -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 @@ _thd.next_drawstyle = HT_RECT; } -void VpStartPreSizing(void) +static void VpStartPreSizing(void) { _thd.selend.x = -1; _special_mouse_mode = WSM_PRESIZE; diff -r 2b74221ae24c -r 58dcead3f545 viewport.h --- a/viewport.h Thu Jan 05 12:00:38 2006 +0000 +++ b/viewport.h Thu Jan 05 12:40:50 2006 +0000 @@ -18,7 +18,6 @@ /* 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 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 -r 2b74221ae24c -r 58dcead3f545 waypoint.c --- a/waypoint.c Thu Jan 05 12:00:38 2006 +0000 +++ b/waypoint.c Thu Jan 05 12:40:50 2006 +0000 @@ -64,7 +64,7 @@ } /* 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 -r 2b74221ae24c -r 58dcead3f545 waypoint.h --- a/waypoint.h Thu Jan 05 12:00:38 2006 +0000 +++ b/waypoint.h Thu Jan 05 12:40:50 2006 +0000 @@ -74,7 +74,6 @@ 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 -r 2b74221ae24c -r 58dcead3f545 window.c --- a/window.c Thu Jan 05 12:00:38 2006 +0000 +++ b/window.c Thu Jan 05 12:40:50 2006 +0000 @@ -23,6 +23,10 @@ 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 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 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 @@ } } + +static Window* BringWindowToFront(Window* w); + Window *BringWindowToFrontById(WindowClass cls, WindowNumber number) { Window *w = FindWindowById(cls, number); @@ -312,7 +321,7 @@ * - 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 @@ return false; } -Window *StartWindowDrag(Window *w) +static Window* StartWindowDrag(Window* w) { w->flags4 |= WF_DRAGGING; _dragging_window = true; @@ -1070,7 +1079,7 @@ return w; } -Window *StartWindowSizing(Window *w) +static Window* StartWindowSizing(Window* w) { w->flags4 |= WF_SIZING; _dragging_window = true; diff -r 2b74221ae24c -r 58dcead3f545 window.h --- a/window.h Thu Jan 05 12:00:38 2006 +0000 +++ b/window.h Thu Jan 05 12:40:50 2006 +0000 @@ -552,7 +552,6 @@ }; /* 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 @@ 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);