# HG changeset patch # User tron # Date 1100461446 0 # Node ID 8de2aaf2080045a293838cbce50c0060f742ad6d # Parent 98c586218b017d05516296ed7c50ba767275eabf (svn r607) -Patch: [ 985102 ] static cleanup Thanks to lvoge diff -r 98c586218b01 -r 8de2aaf20800 ai.c --- a/ai.c Sun Nov 14 18:20:40 2004 +0000 +++ b/ai.c Sun Nov 14 19:44:06 2004 +0000 @@ -2772,7 +2772,7 @@ 0x2A00, }; -bool AiCheckRoadFinished(Player *p) +static bool AiCheckRoadFinished(Player *p) { AiRoadEnum are; uint tile; diff -r 98c586218b01 -r 8de2aaf20800 aircraft_cmd.c --- a/aircraft_cmd.c Sun Nov 14 18:20:40 2004 +0000 +++ b/aircraft_cmd.c Sun Nov 14 19:44:06 2004 +0000 @@ -77,7 +77,7 @@ } /* Allocate many vehicles */ -bool AllocateVehicles(Vehicle **vl, int num) +static bool AllocateVehicles(Vehicle **vl, int num) { int i; Vehicle *v; @@ -293,7 +293,7 @@ } -void DoDeleteAircraft(Vehicle *v) +static void DoDeleteAircraft(Vehicle *v) { DeleteWindowById(WC_VEHICLE_VIEW, v->index); _vehicle_sort_dirty[VEHAIRCRAFT] = true; // delete aircraft diff -r 98c586218b01 -r 8de2aaf20800 clear_cmd.c --- a/clear_cmd.c Sun Nov 14 18:20:40 2004 +0000 +++ b/clear_cmd.c Sun Nov 14 19:44:06 2004 +0000 @@ -761,7 +761,7 @@ /* not used */ } -uint32 GetTileTrackStatus_Clear(uint tile, TransportType mode) +static uint32 GetTileTrackStatus_Clear(uint tile, TransportType mode) { return 0; } diff -r 98c586218b01 -r 8de2aaf20800 disaster_cmd.c --- a/disaster_cmd.c Sun Nov 14 18:20:40 2004 +0000 +++ b/disaster_cmd.c Sun Nov 14 19:44:06 2004 +0000 @@ -940,7 +940,7 @@ }; -void DoDisaster() +static void DoDisaster() { byte buf[8]; byte year = _cur_year; diff -r 98c586218b01 -r 8de2aaf20800 engine.c --- a/engine.c Sun Nov 14 18:20:40 2004 +0000 +++ b/engine.c Sun Nov 14 19:44:06 2004 +0000 @@ -404,7 +404,7 @@ return false; } -void NewVehicleAvailable(Engine *e) +static void NewVehicleAvailable(Engine *e) { Vehicle *v; Player *p; diff -r 98c586218b01 -r 8de2aaf20800 gfx.c --- a/gfx.c Sun Nov 14 18:20:40 2004 +0000 +++ b/gfx.c Sun Nov 14 19:44:06 2004 +0000 @@ -160,7 +160,7 @@ } } -void GfxSetPixel(int x, int y, int color) +static void GfxSetPixel(int x, int y, int color) { DrawPixelInfo *dpi = _cur_dpi; if ((x-=dpi->left) < 0 || x>=dpi->width || (y-=dpi->top)<0 || y>=dpi->height) @@ -1455,7 +1455,7 @@ } -void GfxScalePalette(int pal, byte scaling) +static void GfxScalePalette(int pal, byte scaling) { byte *dst, *src; size_t count; @@ -1661,7 +1661,7 @@ _cursor.dirty = false; } -void DbgScreenRect(int left, int top, int right, int bottom) +static void DbgScreenRect(int left, int top, int right, int bottom) { DrawPixelInfo dp,*old; diff -r 98c586218b01 -r 8de2aaf20800 graph_gui.c --- a/graph_gui.c Sun Nov 14 18:20:40 2004 +0000 +++ b/graph_gui.c Sun Nov 14 19:44:06 2004 +0000 @@ -35,7 +35,7 @@ #define INVALID_VALUE 0x80000000 -void DrawGraph(GraphDrawer *gw) +static void DrawGraph(GraphDrawer *gw) { int i,j,k; diff -r 98c586218b01 -r 8de2aaf20800 industry_cmd.c --- a/industry_cmd.c Sun Nov 14 18:20:40 2004 +0000 +++ b/industry_cmd.c Sun Nov 14 19:44:06 2004 +0000 @@ -428,7 +428,7 @@ 5, 5, 5, 5, 5, }; -void TransportIndustryGoods(uint tile) +static void TransportIndustryGoods(uint tile) { Industry *i; int type; diff -r 98c586218b01 -r 8de2aaf20800 main_gui.c --- a/main_gui.c Sun Nov 14 18:20:40 2004 +0000 +++ b/main_gui.c Sun Nov 14 19:44:06 2004 +0000 @@ -104,7 +104,7 @@ typedef void MenuClickedProc(int index); -void MenuClickSettings(int index) +static void MenuClickSettings(int index) { switch(index) { case 0: ShowGameOptions(); return; @@ -120,7 +120,7 @@ } } -void MenuClickSaveLoad(int index) +static void MenuClickSaveLoad(int index) { if (_game_mode == GM_EDITOR) { switch(index) { @@ -155,7 +155,7 @@ } } -void MenuClickMap(int index) +static void MenuClickMap(int index) { switch(index) { case 0: ShowSmallMap(); break; @@ -163,12 +163,12 @@ } } -void MenuClickTown(int index) +static void MenuClickTown(int index) { ShowTownDirectory(); } -void MenuClickScenMap(int index) +static void MenuClickScenMap(int index) { switch(index) { case 0: ShowSmallMap(); break; @@ -177,28 +177,28 @@ } } -void MenuClickSubsidies(int index) +static void MenuClickSubsidies(int index) { ShowSubsidiesList(); } -void MenuClickStations(int index) +static void MenuClickStations(int index) { ShowPlayerStations(index); } -void MenuClickFinances(int index) +static void MenuClickFinances(int index) { ShowPlayerFinances(index); } -void MenuClickCompany(int index) +static void MenuClickCompany(int index) { ShowPlayerCompany(index); } -void MenuClickGraphs(int index) +static void MenuClickGraphs(int index) { switch(index) { case 0: ShowOperatingProfitGraph(); return; @@ -210,7 +210,7 @@ } } -void MenuClickLeague(int index) +static void MenuClickLeague(int index) { switch(index) { case 0: ShowCompanyLeagueTable(); return; @@ -218,7 +218,7 @@ } } -void MenuClickIndustry(int index) +static void MenuClickIndustry(int index) { switch(index) { case 0: ShowIndustryDirectory(); break; @@ -226,44 +226,44 @@ } } -void MenuClickShowTrains(int index) +static void MenuClickShowTrains(int index) { ShowPlayerTrains(index); } -void MenuClickShowRoad(int index) +static void MenuClickShowRoad(int index) { ShowPlayerRoadVehicles(index); } -void MenuClickShowShips(int index) +static void MenuClickShowShips(int index) { ShowPlayerShips(index); } -void MenuClickShowAir(int index) +static void MenuClickShowAir(int index) { ShowPlayerAircraft(index); } -void MenuClickBuildRail(int index) +static void MenuClickBuildRail(int index) { Player *p = DEREF_PLAYER(_local_player); _last_built_railtype = min(index, p->max_railtype-1); ShowBuildRailToolbar(_last_built_railtype, -1); } -void MenuClickBuildRoad(int index) +static void MenuClickBuildRoad(int index) { ShowBuildRoadToolbar(); } -void MenuClickBuildWater(int index) +static void MenuClickBuildWater(int index) { ShowBuildDocksToolbar(); } -void MenuClickBuildAir(int index) +static void MenuClickBuildAir(int index) { ShowBuildAirToolbar(); } @@ -307,7 +307,7 @@ } } -void MenuClickForest(int index) +static void MenuClickForest(int index) { switch(index) { case 0: ShowTerraformToolbar(); break; @@ -316,12 +316,12 @@ } } -void MenuClickMusicWindow(int index) +static void MenuClickMusicWindow(int index) { ShowMusicWindow(); } -void MenuClickNewspaper(int index) +static void MenuClickNewspaper(int index) { switch(index) { case 0: ShowLastNewsMessage(); break; @@ -331,7 +331,7 @@ } } -void MenuClickHelp(int index) +static void MenuClickHelp(int index) { switch(index) { case 0: PlaceLandBlockInfo(); break; @@ -926,7 +926,7 @@ } } -void ResetLandscape() +static void ResetLandscape() { _random_seeds[0][0] = InteractiveRandom(); _random_seeds[0][1] = InteractiveRandom(); @@ -1037,12 +1037,12 @@ _generating_world = false; } -void PlaceProc_RaiseBigLand(uint tile) +static void PlaceProc_RaiseBigLand(uint tile) { CommonRaiseLowerBigLand(tile, 1); } -void PlaceProc_LowerBigLand(uint tile) +static void PlaceProc_LowerBigLand(uint tile) { CommonRaiseLowerBigLand(tile, 0); } @@ -1061,7 +1061,7 @@ //} -void PlaceProc_RockyArea(uint tile) +static void PlaceProc_RockyArea(uint tile) { if (!IS_TILETYPE(tile, MP_CLEAR)) return; @@ -1071,7 +1071,7 @@ SndPlayTileFx(0x1D, tile); } -void PlaceProc_LightHouse(uint tile) +static void PlaceProc_LightHouse(uint tile) { TileInfo ti; @@ -1083,7 +1083,7 @@ SndPlayTileFx(0x1D, tile); } -void PlaceProc_Transmitter(uint tile) +static void PlaceProc_Transmitter(uint tile) { TileInfo ti; @@ -1095,7 +1095,7 @@ SndPlayTileFx(0x1D, tile); } -void PlaceProc_Desert(uint tile) +static void PlaceProc_Desert(uint tile) { SetMapExtraBits(tile, GetMapExtraBits(tile) == 1 ? 0 : 1); } @@ -1263,7 +1263,7 @@ } } -void PlaceProc_Town(uint tile) +static void PlaceProc_Town(uint tile) { DoCommandP(tile, 0, 0, CcBuildTown, CMD_BUILD_TOWN | CMD_MSG(STR_0236_CAN_T_BUILD_TOWN_HERE)); } @@ -1999,7 +1999,7 @@ return x > 0; } -void StatusBarWndProc(Window *w, WindowEvent *e) +static void StatusBarWndProc(Window *w, WindowEvent *e) { Player *p; diff -r 98c586218b01 -r 8de2aaf20800 misc.c --- a/misc.c Sun Nov 14 18:20:40 2004 +0000 +++ b/misc.c Sun Nov 14 19:44:06 2004 +0000 @@ -98,9 +98,9 @@ void InitializeTowns(); void InitializeTrees(); void InitializeStations(); -void InitializeNameMgr(); +static void InitializeNameMgr(); void InitializePlayers(); -void InitializeCheats(); +static void InitializeCheats(); void GenerateLandscape(); void GenerateClearTile(); @@ -240,13 +240,13 @@ } -void InitializeCheats() +static void InitializeCheats() { memset(&_cheats, 0, sizeof(Cheats)); } -void InitializeNameMgr() +static void InitializeNameMgr() { memset(_name_array, 0, sizeof(_name_array)); } diff -r 98c586218b01 -r 8de2aaf20800 misc_gui.c --- a/misc_gui.c Sun Nov 14 18:20:40 2004 +0000 +++ b/misc_gui.c Sun Nov 14 19:44:06 2004 +0000 @@ -1338,14 +1338,14 @@ w->vscroll.cap = 27; } -int32 ClickMoneyCheat(int32 p1, int32 p2) +static int32 ClickMoneyCheat(int32 p1, int32 p2) { DoCommandP(0, -10000000, 0, NULL, CMD_MONEY_CHEAT); return true; } // p1 player to set to, p2 is -1 or +1 (down/up) -int32 ClickChangePlayerCheat(int32 p1, int32 p2) +static int32 ClickChangePlayerCheat(int32 p1, int32 p2) { while(p1 >= 0 && p1 < MAX_PLAYERS) { if (_players[p1].is_active) { diff -r 98c586218b01 -r 8de2aaf20800 oldloader.c --- a/oldloader.c Sun Nov 14 18:20:40 2004 +0000 +++ b/oldloader.c Sun Nov 14 19:44:06 2004 +0000 @@ -1026,7 +1026,7 @@ } while (n++,o++,i++,--num); } -void FixGameDifficulty(GameDifficulty *n, OldGameSettings *o) +static void FixGameDifficulty(GameDifficulty *n, OldGameSettings *o) { n->max_no_competitors = o->max_no_competitors; n->competitor_start_time = o->competitor_start_time; diff -r 98c586218b01 -r 8de2aaf20800 pathfind.c --- a/pathfind.c Sun Nov 14 18:20:40 2004 +0000 +++ b/pathfind.c Sun Nov 14 19:44:06 2004 +0000 @@ -122,7 +122,7 @@ extern void dbg_pop_tile(); #endif -void TPFMode2(TrackPathFinder *tpf, uint tile, int direction) +static void TPFMode2(TrackPathFinder *tpf, uint tile, int direction) { uint bits; int i; @@ -254,7 +254,7 @@ 48,56,56,58,56,60,60,62, }; -void TPFMode1(TrackPathFinder *tpf, uint tile, int direction) +static void TPFMode1(TrackPathFinder *tpf, uint tile, int direction) { uint bits; int i; @@ -581,7 +581,7 @@ // new more optimized pathfinder for trains... -void NTPEnum(NewTrackPathFinder *tpf, uint tile, uint direction) +static void NTPEnum(NewTrackPathFinder *tpf, uint tile, uint direction) { uint bits, tile_org; int i; diff -r 98c586218b01 -r 8de2aaf20800 rail_cmd.c --- a/rail_cmd.c Sun Nov 14 18:20:40 2004 +0000 +++ b/rail_cmd.c Sun Nov 14 19:44:06 2004 +0000 @@ -1868,7 +1868,7 @@ UpdateSignalsOnSegment(tile, _search_dir_2[track]); } -uint GetSlopeZ_Track(TileInfo *ti) +static uint GetSlopeZ_Track(TileInfo *ti) { uint z = ti->z; int th = ti->tileh; @@ -2111,7 +2111,7 @@ static const byte _leave_directions[4] = {1, 3, 5, 7}; static const byte _depot_track_mask[4] = {1, 2, 1, 2}; -uint32 VehicleEnter_Track(Vehicle *v, uint tile, int x, int y) +static uint32 VehicleEnter_Track(Vehicle *v, uint tile, int x, int y) { byte fract_coord; int dir; diff -r 98c586218b01 -r 8de2aaf20800 rail_gui.c --- a/rail_gui.c Sun Nov 14 18:20:40 2004 +0000 +++ b/rail_gui.c Sun Nov 14 19:44:06 2004 +0000 @@ -377,7 +377,7 @@ return r; } -int GetBestFit1x1(int x, int y) +static int GetBestFit1x1(int x, int y) { byte m[5]; const BestFitStruct *bfs; diff -r 98c586218b01 -r 8de2aaf20800 road_cmd.c --- a/road_cmd.c Sun Nov 14 18:20:40 2004 +0000 +++ b/road_cmd.c Sun Nov 14 19:44:06 2004 +0000 @@ -855,7 +855,7 @@ } } -uint GetSlopeZ_Road(TileInfo *ti) +static uint GetSlopeZ_Road(TileInfo *ti) { uint z = ti->z; int th = ti->tileh; diff -r 98c586218b01 -r 8de2aaf20800 saveload.c --- a/saveload.c Sun Nov 14 18:20:40 2004 +0000 +++ b/saveload.c Sun Nov 14 19:44:06 2004 +0000 @@ -113,38 +113,38 @@ *_sl.bufp++ = v; } -int SlReadUint16() +static int SlReadUint16() { int x = SlReadByte() << 8; return x | SlReadByte(); } -uint32 SlReadUint32() +static uint32 SlReadUint32() { uint32 x = SlReadUint16() << 16; return x | SlReadUint16(); } -uint64 SlReadUint64() +static uint64 SlReadUint64() { uint32 x = SlReadUint32(); uint32 y = SlReadUint32(); return (uint64)x << 32 | y; } -void SlWriteUint16(uint16 v) +static void SlWriteUint16(uint16 v) { SlWriteByte((byte)(v >> 8)); SlWriteByte((byte)v); } -void SlWriteUint32(uint32 v) +static void SlWriteUint32(uint32 v) { SlWriteUint16((uint16)(v >> 16)); SlWriteUint16((uint16)v); } -void SlWriteUint64(uint64 x) +static void SlWriteUint64(uint64 x) { SlWriteUint32((uint32)(x >> 32)); SlWriteUint32((uint32)x); @@ -260,7 +260,7 @@ } } -void SlCopyBytes(void *ptr, size_t length) +static void SlCopyBytes(void *ptr, size_t length) { byte *p = (byte*)ptr; @@ -664,7 +664,7 @@ } } -void SlSaveChunks() +static void SlSaveChunks() { const ChunkHandler *ch; const ChunkHandler * const * chsc; @@ -702,7 +702,7 @@ return NULL; } -void SlLoadChunks() +static void SlLoadChunks() { uint32 id; const ChunkHandler *ch; @@ -953,7 +953,7 @@ {_towns,sizeof(_towns[0])}, }; -uint ReferenceToInt(void *v, uint t) +static uint ReferenceToInt(void *v, uint t) { if (v == NULL) return 0; return ((byte*)v - (byte*)_ref_setup[t].base) / _ref_setup[t].size + 1; diff -r 98c586218b01 -r 8de2aaf20800 screenshot.c --- a/screenshot.c Sun Nov 14 18:20:40 2004 +0000 +++ b/screenshot.c Sun Nov 14 19:44:06 2004 +0000 @@ -374,7 +374,7 @@ } // screenshot generator that dumps the current video buffer -void CurrentScreenCallback(void *userdata, byte *buf, uint y, uint pitch, uint n) +static void CurrentScreenCallback(void *userdata, byte *buf, uint y, uint pitch, uint n) { for (; n > 0; --n) { @@ -387,7 +387,7 @@ extern void ViewportDoDraw(ViewPort *vp, int left, int top, int right, int bottom); // generate a large piece of the world -void LargeWorldCallback(void *userdata, byte *buf, uint y, uint pitch, uint n) +static void LargeWorldCallback(void *userdata, byte *buf, uint y, uint pitch, uint n) { ViewPort *vp = (ViewPort *)userdata; DrawPixelInfo dpi, *old_dpi; diff -r 98c586218b01 -r 8de2aaf20800 sdl.c --- a/sdl.c Sun Nov 14 18:20:40 2004 +0000 +++ b/sdl.c Sun Nov 14 19:44:06 2004 +0000 @@ -659,7 +659,7 @@ DrawSurfaceToScreen(); } -void DbgRedraw() +static void DbgRedraw() { SdlVideoMakeDirty(0,0,_screen.width,_screen.height); DrawSurfaceToScreen(); diff -r 98c586218b01 -r 8de2aaf20800 settings.c --- a/settings.c Sun Nov 14 18:20:40 2004 +0000 +++ b/settings.c Sun Nov 14 19:44:06 2004 +0000 @@ -899,7 +899,7 @@ proc(ini, debug_settings, "debug", NULL); } -void LoadGrfSettings(IniFile *ini) +static void LoadGrfSettings(IniFile *ini) { IniGroup *group = ini_getgroup(ini, "newgrf", -1); IniItem *item; diff -r 98c586218b01 -r 8de2aaf20800 ship_cmd.c --- a/ship_cmd.c Sun Nov 14 18:20:40 2004 +0000 +++ b/ship_cmd.c Sun Nov 14 19:44:06 2004 +0000 @@ -759,12 +759,6 @@ ShipController(v); } -void OnTick_Ship() -{ - // unused -} - - void HandleClickOnShip(Vehicle *v) { ShowShipViewWindow(v); diff -r 98c586218b01 -r 8de2aaf20800 spritecache.c --- a/spritecache.c Sun Nov 14 18:20:40 2004 +0000 +++ b/spritecache.c Sun Nov 14 19:44:06 2004 +0000 @@ -687,7 +687,7 @@ #define MAP(from,to,map) else if (s >= from && s <= to) { s = map[s - from] + from; } -uint RotateSprite(uint s) +static uint RotateSprite(uint s) { static const byte _rotate_tile_sprite[19] = { 0,2,4,6,8,10,12,14,1,3,5,7,9,11,13,17,18,16,15 }; static const byte _coast_map[9] = {0, 4, 3, 1, 2, 6, 8, 5, 7}; diff -r 98c586218b01 -r 8de2aaf20800 strings.c --- a/strings.c Sun Nov 14 18:20:40 2004 +0000 +++ b/strings.c Sun Nov 14 19:44:06 2004 +0000 @@ -186,7 +186,7 @@ return result; } -int64 GetParamInt64() +static int64 GetParamInt64() { int64 result = GET_DPARAM32(0) + ((uint64)GET_DPARAM32(1) << 32); memcpy_overlapping(&_decode_parameters[0], &_decode_parameters[2], sizeof(uint32) * (lengthof(_decode_parameters)-2)); diff -r 98c586218b01 -r 8de2aaf20800 town_gui.c --- a/town_gui.c Sun Nov 14 18:20:40 2004 +0000 +++ b/town_gui.c Sun Nov 14 19:44:06 2004 +0000 @@ -209,7 +209,7 @@ TownAuthorityWndProc }; -void ShowTownAuthorityWindow(uint town) +static void ShowTownAuthorityWindow(uint town) { Window *w; diff -r 98c586218b01 -r 8de2aaf20800 train_cmd.c --- a/train_cmd.c Sun Nov 14 18:20:40 2004 +0000 +++ b/train_cmd.c Sun Nov 14 19:44:06 2004 +0000 @@ -82,7 +82,7 @@ #define F_CURVE_FACTOR (1/96.f) -bool IsTunnelTile(TileIndex tile); +static bool IsTunnelTile(TileIndex tile); static int GetRealisticAcceleration(Vehicle *v) { @@ -219,7 +219,7 @@ } -int32 CmdBuildRailWagon(uint engine, uint tile, uint32 flags) +static int32 CmdBuildRailWagon(uint engine, uint tile, uint32 flags) { int32 value; Vehicle *v; @@ -513,7 +513,7 @@ (_map5[tile] & 0xFC) == 0xC0; } -bool IsTunnelTile(TileIndex tile) +static bool IsTunnelTile(TileIndex tile) { return IS_TILETYPE(tile, MP_TUNNELBRIDGE) && (_map5[tile]&0x80) == 0; diff -r 98c586218b01 -r 8de2aaf20800 ttd.c --- a/ttd.c Sun Nov 14 18:20:40 2004 +0000 +++ b/ttd.c Sun Nov 14 19:44:06 2004 +0000 @@ -288,10 +288,6 @@ *var = drv; } -void PrintDriverList() -{ -} - static void showhelp() { char buf[4096], *p; @@ -640,7 +636,7 @@ } -void LoadIntroGame() +static void LoadIntroGame() { char filename[256]; _game_mode = GM_MENU; @@ -696,7 +692,7 @@ MarkWholeScreenDirty(); } -void MakeNewEditorWorld() +static void MakeNewEditorWorld() { _game_mode = GM_EDITOR; @@ -768,7 +764,7 @@ MarkWholeScreenDirty(); } -bool SafeSaveOrLoad(const char *filename, int mode, int newgm) +static bool SafeSaveOrLoad(const char *filename, int mode, int newgm) { byte ogm = _game_mode; int r; @@ -879,7 +875,7 @@ // The state must not be changed from anywhere // but here. // That check is enforced in DoCommand. -void StateGameLoop() +static void StateGameLoop() { // dont execute the state loop during pause if (_pause) return; diff -r 98c586218b01 -r 8de2aaf20800 unix.c --- a/unix.c Sun Nov 14 18:20:40 2004 +0000 +++ b/unix.c Sun Nov 14 19:44:06 2004 +0000 @@ -401,7 +401,7 @@ return num; } -void ChangeWorkingDirectory(char *exe) +static void ChangeWorkingDirectory(char *exe) { char *s = strrchr(exe, '/'); if (s != NULL) { diff -r 98c586218b01 -r 8de2aaf20800 unmovable_cmd.c --- a/unmovable_cmd.c Sun Nov 14 18:20:40 2004 +0000 +++ b/unmovable_cmd.c Sun Nov 14 19:44:06 2004 +0000 @@ -234,7 +234,7 @@ }; /* checks, if a radio tower is within a 9x9 tile square around tile */ -bool checkRadioTowerNearby(uint tile) +static bool checkRadioTowerNearby(uint tile) { uint tile_s; diff -r 98c586218b01 -r 8de2aaf20800 vehicle.c --- a/vehicle.c Sun Nov 14 18:20:40 2004 +0000 +++ b/vehicle.c Sun Nov 14 19:44:06 2004 +0000 @@ -514,7 +514,7 @@ void RoadVeh_Tick(Vehicle *v); void Ship_Tick(Vehicle *v); void Train_Tick(Vehicle *v); -void EffectVehicle_Tick(Vehicle *v); +static void EffectVehicle_Tick(Vehicle *v); void DisasterVehicle_Tick(Vehicle *v); VehicleTickProc *_vehicle_tick_procs[] = { @@ -1196,7 +1196,7 @@ return CreateEffectVehicle(v->x_pos + x, v->y_pos + y, v->z_pos + z, type); } -void EffectVehicle_Tick(Vehicle *v) +static void EffectVehicle_Tick(Vehicle *v) { _effect_tick_procs[v->subtype](v); } diff -r 98c586218b01 -r 8de2aaf20800 viewport.c --- a/viewport.c Sun Nov 14 18:20:40 2004 +0000 +++ b/viewport.c Sun Nov 14 19:44:06 2004 +0000 @@ -564,7 +564,7 @@ 0x3F7, }; -int dbg_draw_pushed(const TileInfo *ti) +static int dbg_draw_pushed(const TileInfo *ti) { int i; if (ti->tile==0) @@ -663,7 +663,7 @@ } } -void ViewportAddLandscape() +static void ViewportAddLandscape() { ViewportDrawer *vd = _cur_vd; int x, y, width, height; @@ -728,7 +728,7 @@ } -void ViewportAddTownNames(DrawPixelInfo *dpi) +static void ViewportAddTownNames(DrawPixelInfo *dpi) { Town *t; int left, top, right, bottom; @@ -785,7 +785,7 @@ } } -void ViewportAddStationNames(DrawPixelInfo *dpi) +static void ViewportAddStationNames(DrawPixelInfo *dpi) { int left, top, right, bottom; Station *st; @@ -856,7 +856,7 @@ } } -void ViewportAddSigns(DrawPixelInfo *dpi) +static void ViewportAddSigns(DrawPixelInfo *dpi) { SignStruct *ss; int left, top, right, bottom; @@ -923,7 +923,7 @@ } } -void ViewportAddWaypoints(DrawPixelInfo *dpi) +static void ViewportAddWaypoints(DrawPixelInfo *dpi) { Waypoint *cp; @@ -1010,7 +1010,7 @@ } -void ViewportDrawTileSprites(TileSpriteToDraw *ts) +static void ViewportDrawTileSprites(TileSpriteToDraw *ts) { do { Point pt = RemapCoords(ts->x, ts->y, ts->z); @@ -1018,7 +1018,7 @@ } while ( (ts = ts->next) != NULL); } -void ViewportSortParentSprites(ParentSpriteToDraw **psd) +static void ViewportSortParentSprites(ParentSpriteToDraw **psd) { ParentSpriteToDraw *ps, *ps2,*ps3, **psd2, **psd3; @@ -1054,7 +1054,7 @@ } } -void ViewportDrawParentSprites(ParentSpriteToDraw **psd) +static void ViewportDrawParentSprites(ParentSpriteToDraw **psd) { ParentSpriteToDraw *ps; ChildScreenSpriteToDraw *cs; @@ -1071,7 +1071,7 @@ } } -void ViewportDrawStrings(DrawPixelInfo *dpi, StringSpriteToDraw *ss) +static void ViewportDrawStrings(DrawPixelInfo *dpi, StringSpriteToDraw *ss) { DrawPixelInfo dp; byte zoom; @@ -1309,7 +1309,7 @@ } } -void MarkViewportDirty(ViewPort *vp, int left, int top, int right, int bottom) +static void MarkViewportDirty(ViewPort *vp, int left, int top, int right, int bottom) { if ( (right -= vp->virtual_left) <= 0) return; @@ -1375,7 +1375,7 @@ ); } -void SetSelectionTilesDirty() +static void SetSelectionTilesDirty() { int y_size, x_size; TileHighlightData *thd = _thd_ptr; diff -r 98c586218b01 -r 8de2aaf20800 water_cmd.c --- a/water_cmd.c Sun Nov 14 18:20:40 2004 +0000 +++ b/water_cmd.c Sun Nov 14 19:44:06 2004 +0000 @@ -14,7 +14,7 @@ return IS_TILETYPE(tile, MP_WATER) && (_map5[tile]&~3) == 0x80; } -bool IsClearWaterTile(uint tile) +static bool IsClearWaterTile(uint tile) { TileInfo ti; FindLandscapeHeightByTile(&ti, tile); @@ -440,12 +440,12 @@ } -uint GetSlopeZ_Water(TileInfo *ti) +static uint GetSlopeZ_Water(TileInfo *ti) { return GetPartialZ(ti->x&0xF, ti->y&0xF, ti->tileh) + ti->z; } -uint GetSlopeTileh_Water(TileInfo *ti) +static uint GetSlopeTileh_Water(TileInfo *ti) { return ti->tileh; } diff -r 98c586218b01 -r 8de2aaf20800 window.c --- a/window.c Sun Nov 14 18:20:40 2004 +0000 +++ b/window.c Sun Nov 14 19:44:06 2004 +0000 @@ -585,7 +585,7 @@ _active_viewports = 0; } -void DecreaseWindowCounters() +static void DecreaseWindowCounters() { Window *w; @@ -616,7 +616,7 @@ return FindWindowById(_thd.window_class, _thd.window_number); } -void HandlePlacePresize() +static void HandlePlacePresize() { Window *w; WindowEvent e; @@ -637,7 +637,7 @@ w->wndproc(w, &e); } -bool HandleDragDrop() +static bool HandleDragDrop() { Window *w; WindowEvent e; @@ -663,7 +663,7 @@ return false; } -bool HandlePopupMenu() +static bool HandlePopupMenu() { Window *w; WindowEvent e; @@ -691,7 +691,7 @@ return false; } -bool HandleWindowDragging() +static bool HandleWindowDragging() { Window *w; // Get out immediately if no window is being dragged at all. @@ -861,7 +861,7 @@ } -bool HandleScrollbarScrolling() +static bool HandleScrollbarScrolling() { Window *w; int i; @@ -904,7 +904,7 @@ return false; } -bool HandleViewportScroll() +static bool HandleViewportScroll() { Window *w; ViewPort *vp;