mirror of https://github.com/OpenTTD/OpenTTD.git
(svn r607) -Patch: [ 985102 ] static cleanup
Thanks to lvoge
This commit is contained in:
parent
200d3fdbe8
commit
249a170ace
2
ai.c
2
ai.c
|
@ -2772,7 +2772,7 @@ static const uint16 _ai_road_table_and[4] = {
|
|||
0x2A00,
|
||||
};
|
||||
|
||||
bool AiCheckRoadFinished(Player *p)
|
||||
static bool AiCheckRoadFinished(Player *p)
|
||||
{
|
||||
AiRoadEnum are;
|
||||
uint tile;
|
||||
|
|
|
@ -77,7 +77,7 @@ void DrawAircraftEngineInfo(int engine, int x, int y, int maxw)
|
|||
}
|
||||
|
||||
/* Allocate many vehicles */
|
||||
bool AllocateVehicles(Vehicle **vl, int num)
|
||||
static bool AllocateVehicles(Vehicle **vl, int num)
|
||||
{
|
||||
int i;
|
||||
Vehicle *v;
|
||||
|
@ -293,7 +293,7 @@ static bool CheckStoppedInHangar(Vehicle *v)
|
|||
}
|
||||
|
||||
|
||||
void DoDeleteAircraft(Vehicle *v)
|
||||
static void DoDeleteAircraft(Vehicle *v)
|
||||
{
|
||||
DeleteWindowById(WC_VEHICLE_VIEW, v->index);
|
||||
_vehicle_sort_dirty[VEHAIRCRAFT] = true; // delete aircraft
|
||||
|
|
|
@ -761,7 +761,7 @@ static void ClickTile_Clear(uint tile)
|
|||
/* not used */
|
||||
}
|
||||
|
||||
uint32 GetTileTrackStatus_Clear(uint tile, TransportType mode)
|
||||
static uint32 GetTileTrackStatus_Clear(uint tile, TransportType mode)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -940,7 +940,7 @@ static const DisasterYears _dis_years[8] = {
|
|||
};
|
||||
|
||||
|
||||
void DoDisaster()
|
||||
static void DoDisaster()
|
||||
{
|
||||
byte buf[8];
|
||||
byte year = _cur_year;
|
||||
|
|
2
engine.c
2
engine.c
|
@ -404,7 +404,7 @@ bool isWagon(byte index)
|
|||
return false;
|
||||
}
|
||||
|
||||
void NewVehicleAvailable(Engine *e)
|
||||
static void NewVehicleAvailable(Engine *e)
|
||||
{
|
||||
Vehicle *v;
|
||||
Player *p;
|
||||
|
|
6
gfx.c
6
gfx.c
|
@ -160,7 +160,7 @@ void GfxFillRect(int left, int top, int right, int bottom, int color) {
|
|||
}
|
||||
}
|
||||
|
||||
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 @@ static void GfxMainBlitter(byte *sprite, int x, int y, int mode)
|
|||
}
|
||||
|
||||
|
||||
void GfxScalePalette(int pal, byte scaling)
|
||||
static void GfxScalePalette(int pal, byte scaling)
|
||||
{
|
||||
byte *dst, *src;
|
||||
size_t count;
|
||||
|
@ -1661,7 +1661,7 @@ void DrawMouseCursor()
|
|||
_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;
|
||||
|
||||
|
|
|
@ -35,7 +35,7 @@ typedef struct GraphDrawer {
|
|||
|
||||
#define INVALID_VALUE 0x80000000
|
||||
|
||||
void DrawGraph(GraphDrawer *gw)
|
||||
static void DrawGraph(GraphDrawer *gw)
|
||||
{
|
||||
|
||||
int i,j,k;
|
||||
|
|
|
@ -428,7 +428,7 @@ static const byte _industry_min_cargo[] = {
|
|||
5, 5, 5, 5, 5,
|
||||
};
|
||||
|
||||
void TransportIndustryGoods(uint tile)
|
||||
static void TransportIndustryGoods(uint tile)
|
||||
{
|
||||
Industry *i;
|
||||
int type;
|
||||
|
|
66
main_gui.c
66
main_gui.c
|
@ -104,7 +104,7 @@ static void ToolbarFastForwardClick(Window *w)
|
|||
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 MenuClickSettings(int index)
|
|||
}
|
||||
}
|
||||
|
||||
void MenuClickSaveLoad(int index)
|
||||
static void MenuClickSaveLoad(int index)
|
||||
{
|
||||
if (_game_mode == GM_EDITOR) {
|
||||
switch(index) {
|
||||
|
@ -155,7 +155,7 @@ void MenuClickSaveLoad(int index)
|
|||
}
|
||||
}
|
||||
|
||||
void MenuClickMap(int index)
|
||||
static void MenuClickMap(int index)
|
||||
{
|
||||
switch(index) {
|
||||
case 0: ShowSmallMap(); break;
|
||||
|
@ -163,12 +163,12 @@ void MenuClickMap(int index)
|
|||
}
|
||||
}
|
||||
|
||||
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 MenuClickScenMap(int index)
|
|||
}
|
||||
}
|
||||
|
||||
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 MenuClickGraphs(int index)
|
|||
}
|
||||
}
|
||||
|
||||
void MenuClickLeague(int index)
|
||||
static void MenuClickLeague(int index)
|
||||
{
|
||||
switch(index) {
|
||||
case 0: ShowCompanyLeagueTable(); return;
|
||||
|
@ -218,7 +218,7 @@ void MenuClickLeague(int index)
|
|||
}
|
||||
}
|
||||
|
||||
void MenuClickIndustry(int index)
|
||||
static void MenuClickIndustry(int index)
|
||||
{
|
||||
switch(index) {
|
||||
case 0: ShowIndustryDirectory(); break;
|
||||
|
@ -226,44 +226,44 @@ void MenuClickIndustry(int index)
|
|||
}
|
||||
}
|
||||
|
||||
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 @@ static void SelectSignTool()
|
|||
}
|
||||
}
|
||||
|
||||
void MenuClickForest(int index)
|
||||
static void MenuClickForest(int index)
|
||||
{
|
||||
switch(index) {
|
||||
case 0: ShowTerraformToolbar(); break;
|
||||
|
@ -316,12 +316,12 @@ void MenuClickForest(int index)
|
|||
}
|
||||
}
|
||||
|
||||
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 MenuClickNewspaper(int index)
|
|||
}
|
||||
}
|
||||
|
||||
void MenuClickHelp(int index)
|
||||
static void MenuClickHelp(int index)
|
||||
{
|
||||
switch(index) {
|
||||
case 0: PlaceLandBlockInfo(); break;
|
||||
|
@ -926,7 +926,7 @@ void ZoomInOrOutToCursorWindow(bool in, Window *w)
|
|||
}
|
||||
}
|
||||
|
||||
void ResetLandscape()
|
||||
static void ResetLandscape()
|
||||
{
|
||||
_random_seeds[0][0] = InteractiveRandom();
|
||||
_random_seeds[0][1] = InteractiveRandom();
|
||||
|
@ -1037,12 +1037,12 @@ static void CommonRaiseLowerBigLand(uint tile, int mode)
|
|||
_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_LowerBigLand(uint tile)
|
|||
//}
|
||||
|
||||
|
||||
void PlaceProc_RockyArea(uint tile)
|
||||
static void PlaceProc_RockyArea(uint tile)
|
||||
{
|
||||
if (!IS_TILETYPE(tile, MP_CLEAR))
|
||||
return;
|
||||
|
@ -1071,7 +1071,7 @@ void PlaceProc_RockyArea(uint tile)
|
|||
SndPlayTileFx(0x1D, tile);
|
||||
}
|
||||
|
||||
void PlaceProc_LightHouse(uint tile)
|
||||
static void PlaceProc_LightHouse(uint tile)
|
||||
{
|
||||
TileInfo ti;
|
||||
|
||||
|
@ -1083,7 +1083,7 @@ void PlaceProc_LightHouse(uint tile)
|
|||
SndPlayTileFx(0x1D, tile);
|
||||
}
|
||||
|
||||
void PlaceProc_Transmitter(uint tile)
|
||||
static void PlaceProc_Transmitter(uint tile)
|
||||
{
|
||||
TileInfo ti;
|
||||
|
||||
|
@ -1095,7 +1095,7 @@ void PlaceProc_Transmitter(uint tile)
|
|||
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 @@ static void CcBuildTown(bool success, uint tile, uint32 p1, uint32 p2)
|
|||
}
|
||||
}
|
||||
|
||||
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 @@ static bool DrawScrollingStatusText(NewsItem *ni, int pos)
|
|||
return x > 0;
|
||||
}
|
||||
|
||||
void StatusBarWndProc(Window *w, WindowEvent *e)
|
||||
static void StatusBarWndProc(Window *w, WindowEvent *e)
|
||||
{
|
||||
Player *p;
|
||||
|
||||
|
|
8
misc.c
8
misc.c
|
@ -98,9 +98,9 @@ void InitializeLandscape();
|
|||
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 @@ byte *GetName(int id, byte *buff)
|
|||
}
|
||||
|
||||
|
||||
void InitializeCheats()
|
||||
static void InitializeCheats()
|
||||
{
|
||||
memset(&_cheats, 0, sizeof(Cheats));
|
||||
}
|
||||
|
||||
|
||||
void InitializeNameMgr()
|
||||
static void InitializeNameMgr()
|
||||
{
|
||||
memset(_name_array, 0, sizeof(_name_array));
|
||||
}
|
||||
|
|
|
@ -1338,14 +1338,14 @@ void AskForNewGameToStart()
|
|||
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) {
|
||||
|
|
|
@ -1026,7 +1026,7 @@ static void FixEngine(Engine *n, OldEngine *o, int num)
|
|||
} 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;
|
||||
|
|
|
@ -122,7 +122,7 @@ extern void dbg_push_tile(uint tile, int track);
|
|||
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 @@ const byte _ffb_64[128] = {
|
|||
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 @@ static bool NtpCheck(NewTrackPathFinder *tpf, uint tile, uint dir, uint length)
|
|||
|
||||
|
||||
// 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;
|
||||
|
|
|
@ -1868,7 +1868,7 @@ void SetSignalsOnBothDir(uint tile, byte track)
|
|||
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 _enter_directions[4] = {5, 7, 1, 3};
|
|||
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;
|
||||
|
|
|
@ -377,7 +377,7 @@ static int GetBestArea(int x, int y)
|
|||
return r;
|
||||
}
|
||||
|
||||
int GetBestFit1x1(int x, int y)
|
||||
static int GetBestFit1x1(int x, int y)
|
||||
{
|
||||
byte m[5];
|
||||
const BestFitStruct *bfs;
|
||||
|
|
|
@ -855,7 +855,7 @@ void DrawRoadDepotSprite(int x, int y, int image)
|
|||
}
|
||||
}
|
||||
|
||||
uint GetSlopeZ_Road(TileInfo *ti)
|
||||
static uint GetSlopeZ_Road(TileInfo *ti)
|
||||
{
|
||||
uint z = ti->z;
|
||||
int th = ti->tileh;
|
||||
|
|
20
saveload.c
20
saveload.c
|
@ -113,38 +113,38 @@ void SlWriteByte(byte v)
|
|||
*_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 SlSetLength(uint length)
|
|||
}
|
||||
}
|
||||
|
||||
void SlCopyBytes(void *ptr, size_t length)
|
||||
static void SlCopyBytes(void *ptr, size_t length)
|
||||
{
|
||||
byte *p = (byte*)ptr;
|
||||
|
||||
|
@ -664,7 +664,7 @@ static void SlSaveChunk(const ChunkHandler *ch)
|
|||
}
|
||||
}
|
||||
|
||||
void SlSaveChunks()
|
||||
static void SlSaveChunks()
|
||||
{
|
||||
const ChunkHandler *ch;
|
||||
const ChunkHandler * const * chsc;
|
||||
|
@ -702,7 +702,7 @@ static const ChunkHandler *SlFindChunkHandler(uint32 id)
|
|||
return NULL;
|
||||
}
|
||||
|
||||
void SlLoadChunks()
|
||||
static void SlLoadChunks()
|
||||
{
|
||||
uint32 id;
|
||||
const ChunkHandler *ch;
|
||||
|
@ -953,7 +953,7 @@ static const ReferenceSetup _ref_setup[] = {
|
|||
{_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;
|
||||
|
|
|
@ -374,7 +374,7 @@ void SetScreenshotFormat(int i)
|
|||
}
|
||||
|
||||
// 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 @@ void CurrentScreenCallback(void *userdata, byte *buf, uint y, uint pitch, uint n
|
|||
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;
|
||||
|
|
2
sdl.c
2
sdl.c
|
@ -659,7 +659,7 @@ void redsq_debug(int tile)
|
|||
DrawSurfaceToScreen();
|
||||
}
|
||||
|
||||
void DbgRedraw()
|
||||
static void DbgRedraw()
|
||||
{
|
||||
SdlVideoMakeDirty(0,0,_screen.width,_screen.height);
|
||||
DrawSurfaceToScreen();
|
||||
|
|
|
@ -899,7 +899,7 @@ static void HandleSettingDescs(IniFile *ini, SettingDescProc *proc)
|
|||
proc(ini, debug_settings, "debug", NULL);
|
||||
}
|
||||
|
||||
void LoadGrfSettings(IniFile *ini)
|
||||
static void LoadGrfSettings(IniFile *ini)
|
||||
{
|
||||
IniGroup *group = ini_getgroup(ini, "newgrf", -1);
|
||||
IniItem *item;
|
||||
|
|
|
@ -759,12 +759,6 @@ void Ship_Tick(Vehicle *v)
|
|||
ShipController(v);
|
||||
}
|
||||
|
||||
void OnTick_Ship()
|
||||
{
|
||||
// unused
|
||||
}
|
||||
|
||||
|
||||
void HandleClickOnShip(Vehicle *v)
|
||||
{
|
||||
ShowShipViewWindow(v);
|
||||
|
|
|
@ -687,7 +687,7 @@ restart:
|
|||
#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};
|
||||
|
|
|
@ -186,7 +186,7 @@ int32 GetParamInt32()
|
|||
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));
|
||||
|
|
|
@ -209,7 +209,7 @@ static const WindowDesc _town_authority_desc = {
|
|||
TownAuthorityWndProc
|
||||
};
|
||||
|
||||
void ShowTownAuthorityWindow(uint town)
|
||||
static void ShowTownAuthorityWindow(uint town)
|
||||
{
|
||||
Window *w;
|
||||
|
||||
|
|
|
@ -82,7 +82,7 @@ void UpdateTrainAcceleration(Vehicle *v)
|
|||
|
||||
#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 @@ void DrawTrainEngineInfo(int engine, int x, int y, int maxw)
|
|||
}
|
||||
|
||||
|
||||
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 @@ bool IsTrainDepotTile(TileIndex tile)
|
|||
(_map5[tile] & 0xFC) == 0xC0;
|
||||
}
|
||||
|
||||
bool IsTunnelTile(TileIndex tile)
|
||||
static bool IsTunnelTile(TileIndex tile)
|
||||
{
|
||||
return IS_TILETYPE(tile, MP_TUNNELBRIDGE) &&
|
||||
(_map5[tile]&0x80) == 0;
|
||||
|
|
12
ttd.c
12
ttd.c
|
@ -288,10 +288,6 @@ void LoadDriver(int driver, const char *name)
|
|||
*var = drv;
|
||||
}
|
||||
|
||||
void PrintDriverList()
|
||||
{
|
||||
}
|
||||
|
||||
static void showhelp()
|
||||
{
|
||||
char buf[4096], *p;
|
||||
|
@ -640,7 +636,7 @@ static void ShowScreenshotResult(bool b)
|
|||
|
||||
}
|
||||
|
||||
void LoadIntroGame()
|
||||
static void LoadIntroGame()
|
||||
{
|
||||
char filename[256];
|
||||
_game_mode = GM_MENU;
|
||||
|
@ -696,7 +692,7 @@ void MakeNewGame()
|
|||
MarkWholeScreenDirty();
|
||||
}
|
||||
|
||||
void MakeNewEditorWorld()
|
||||
static void MakeNewEditorWorld()
|
||||
{
|
||||
_game_mode = GM_EDITOR;
|
||||
|
||||
|
@ -768,7 +764,7 @@ void StartScenario()
|
|||
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 @@ normal_load:
|
|||
// 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;
|
||||
|
|
2
unix.c
2
unix.c
|
@ -401,7 +401,7 @@ int GetLanguageList(char **languages, int max)
|
|||
return num;
|
||||
}
|
||||
|
||||
void ChangeWorkingDirectory(char *exe)
|
||||
static void ChangeWorkingDirectory(char *exe)
|
||||
{
|
||||
char *s = strrchr(exe, '/');
|
||||
if (s != NULL) {
|
||||
|
|
|
@ -234,7 +234,7 @@ static const TileIndexDiff _tile_add[4] = {
|
|||
};
|
||||
|
||||
/* 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;
|
||||
|
||||
|
|
|
@ -514,7 +514,7 @@ void Aircraft_Tick(Vehicle *v);
|
|||
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 @@ Vehicle *CreateEffectVehicleRel(Vehicle *v, int x, int y, int z, int type)
|
|||
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);
|
||||
}
|
||||
|
|
24
viewport.c
24
viewport.c
|
@ -564,7 +564,7 @@ static const uint16 _dbg_track_sprite[] = {
|
|||
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 @@ static void DrawTileSelection(const TileInfo *ti)
|
|||
}
|
||||
}
|
||||
|
||||
void ViewportAddLandscape()
|
||||
static void ViewportAddLandscape()
|
||||
{
|
||||
ViewportDrawer *vd = _cur_vd;
|
||||
int x, y, width, height;
|
||||
|
@ -728,7 +728,7 @@ void ViewportAddLandscape()
|
|||
}
|
||||
|
||||
|
||||
void ViewportAddTownNames(DrawPixelInfo *dpi)
|
||||
static void ViewportAddTownNames(DrawPixelInfo *dpi)
|
||||
{
|
||||
Town *t;
|
||||
int left, top, right, bottom;
|
||||
|
@ -785,7 +785,7 @@ void ViewportAddTownNames(DrawPixelInfo *dpi)
|
|||
}
|
||||
}
|
||||
|
||||
void ViewportAddStationNames(DrawPixelInfo *dpi)
|
||||
static void ViewportAddStationNames(DrawPixelInfo *dpi)
|
||||
{
|
||||
int left, top, right, bottom;
|
||||
Station *st;
|
||||
|
@ -856,7 +856,7 @@ void ViewportAddStationNames(DrawPixelInfo *dpi)
|
|||
}
|
||||
}
|
||||
|
||||
void ViewportAddSigns(DrawPixelInfo *dpi)
|
||||
static void ViewportAddSigns(DrawPixelInfo *dpi)
|
||||
{
|
||||
SignStruct *ss;
|
||||
int left, top, right, bottom;
|
||||
|
@ -923,7 +923,7 @@ void ViewportAddSigns(DrawPixelInfo *dpi)
|
|||
}
|
||||
}
|
||||
|
||||
void ViewportAddWaypoints(DrawPixelInfo *dpi)
|
||||
static void ViewportAddWaypoints(DrawPixelInfo *dpi)
|
||||
{
|
||||
Waypoint *cp;
|
||||
|
||||
|
@ -1010,7 +1010,7 @@ void UpdateViewportSignPos(ViewportSign *sign, int left, int top, StringID str)
|
|||
}
|
||||
|
||||
|
||||
void ViewportDrawTileSprites(TileSpriteToDraw *ts)
|
||||
static void ViewportDrawTileSprites(TileSpriteToDraw *ts)
|
||||
{
|
||||
do {
|
||||
Point pt = RemapCoords(ts->x, ts->y, ts->z);
|
||||
|
@ -1018,7 +1018,7 @@ void ViewportDrawTileSprites(TileSpriteToDraw *ts)
|
|||
} 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 ViewportSortParentSprites(ParentSpriteToDraw **psd)
|
|||
}
|
||||
}
|
||||
|
||||
void ViewportDrawParentSprites(ParentSpriteToDraw **psd)
|
||||
static void ViewportDrawParentSprites(ParentSpriteToDraw **psd)
|
||||
{
|
||||
ParentSpriteToDraw *ps;
|
||||
ChildScreenSpriteToDraw *cs;
|
||||
|
@ -1071,7 +1071,7 @@ void ViewportDrawParentSprites(ParentSpriteToDraw **psd)
|
|||
}
|
||||
}
|
||||
|
||||
void ViewportDrawStrings(DrawPixelInfo *dpi, StringSpriteToDraw *ss)
|
||||
static void ViewportDrawStrings(DrawPixelInfo *dpi, StringSpriteToDraw *ss)
|
||||
{
|
||||
DrawPixelInfo dp;
|
||||
byte zoom;
|
||||
|
@ -1309,7 +1309,7 @@ void UpdateViewportPosition(Window *w)
|
|||
}
|
||||
}
|
||||
|
||||
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 MarkTileDirty(int x, int y)
|
|||
);
|
||||
}
|
||||
|
||||
void SetSelectionTilesDirty()
|
||||
static void SetSelectionTilesDirty()
|
||||
{
|
||||
int y_size, x_size;
|
||||
TileHighlightData *thd = _thd_ptr;
|
||||
|
|
|
@ -14,7 +14,7 @@ bool IsShipDepotTile(TileIndex tile)
|
|||
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 @@ void DrawShipDepotSprite(int x, int y, int image)
|
|||
}
|
||||
|
||||
|
||||
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;
|
||||
}
|
||||
|
|
14
window.c
14
window.c
|
@ -585,7 +585,7 @@ void InitWindowSystem()
|
|||
_active_viewports = 0;
|
||||
}
|
||||
|
||||
void DecreaseWindowCounters()
|
||||
static void DecreaseWindowCounters()
|
||||
{
|
||||
Window *w;
|
||||
|
||||
|
@ -616,7 +616,7 @@ Window *GetCallbackWnd()
|
|||
return FindWindowById(_thd.window_class, _thd.window_number);
|
||||
}
|
||||
|
||||
void HandlePlacePresize()
|
||||
static void HandlePlacePresize()
|
||||
{
|
||||
Window *w;
|
||||
WindowEvent e;
|
||||
|
@ -637,7 +637,7 @@ void HandlePlacePresize()
|
|||
w->wndproc(w, &e);
|
||||
}
|
||||
|
||||
bool HandleDragDrop()
|
||||
static bool HandleDragDrop()
|
||||
{
|
||||
Window *w;
|
||||
WindowEvent e;
|
||||
|
@ -663,7 +663,7 @@ bool HandleDragDrop()
|
|||
return false;
|
||||
}
|
||||
|
||||
bool HandlePopupMenu()
|
||||
static bool HandlePopupMenu()
|
||||
{
|
||||
Window *w;
|
||||
WindowEvent e;
|
||||
|
@ -691,7 +691,7 @@ bool HandlePopupMenu()
|
|||
return false;
|
||||
}
|
||||
|
||||
bool HandleWindowDragging()
|
||||
static bool HandleWindowDragging()
|
||||
{
|
||||
Window *w;
|
||||
// Get out immediately if no window is being dragged at all.
|
||||
|
@ -861,7 +861,7 @@ Window *StartWindowSizing(Window *w)
|
|||
}
|
||||
|
||||
|
||||
bool HandleScrollbarScrolling()
|
||||
static bool HandleScrollbarScrolling()
|
||||
{
|
||||
Window *w;
|
||||
int i;
|
||||
|
@ -904,7 +904,7 @@ bool HandleScrollbarScrolling()
|
|||
return false;
|
||||
}
|
||||
|
||||
bool HandleViewportScroll()
|
||||
static bool HandleViewportScroll()
|
||||
{
|
||||
Window *w;
|
||||
ViewPort *vp;
|
||||
|
|
Loading…
Reference in New Issue