Mercurial > hg > openttd
changeset 6247:57363e064324 draft
(svn r9050) -Codechange: Foo(void) -> Foo()
line wrap: on
line diff
--- a/src/ai/ai.cpp +++ b/src/ai/ai.cpp @@ -166,7 +166,7 @@ * The gameloop for AIs. * Handles one tick for all the AIs. */ -void AI_RunGameLoop(void) +void AI_RunGameLoop() { /* Don't do anything if ai is disabled */ if (!_ai.enabled) return; @@ -224,7 +224,7 @@ /** * Initialize some AI-related stuff. */ -void AI_Initialize(void) +void AI_Initialize() { /* First, make sure all AIs are DEAD! */ AI_Uninitialize(); @@ -238,7 +238,7 @@ /** * Deinitializer for AI-related stuff. */ -void AI_Uninitialize(void) +void AI_Uninitialize() { const Player* p;
--- a/src/ai/ai.h +++ b/src/ai/ai.h @@ -40,9 +40,9 @@ // ai.c void AI_StartNewAI(PlayerID player); void AI_PlayerDied(PlayerID player); -void AI_RunGameLoop(void); -void AI_Initialize(void); -void AI_Uninitialize(void); +void AI_RunGameLoop(); +void AI_Initialize(); +void AI_Uninitialize(); int32 AI_DoCommand(TileIndex tile, uint32 p1, uint32 p2, uint32 flags, uint procc); int32 AI_DoCommandCc(TileIndex tile, uint32 p1, uint32 p2, uint32 flags, uint procc, CommandCallback* callback); @@ -50,7 +50,7 @@ * This function checks some boundries to see if we should launch a new AI. * @return True if we can start a new AI. */ -static inline bool AI_AllowNewAI(void) +static inline bool AI_AllowNewAI() { /* If disabled, no AI */ if (!_ai.enabled) @@ -97,7 +97,7 @@ /** * The random-function that should be used by ALL AIs. */ -static inline uint32 AI_Random(void) +static inline uint32 AI_Random() { /* We pick RandomRange if we are in SP (so when saved, we do the same over and over) * but we pick InteractiveRandomRange if we are a network_server or network-client.
--- a/src/ai/default/default.cpp +++ b/src/ai/default/default.cpp @@ -453,12 +453,12 @@ void *to; } FoundRoute; -static Town *AiFindRandomTown(void) +static Town *AiFindRandomTown() { return GetRandomTown(); } -static Industry *AiFindRandomIndustry(void) +static Industry *AiFindRandomIndustry() { return GetRandomIndustry(); }
--- a/src/aircraft_cmd.cpp +++ b/src/aircraft_cmd.cpp @@ -724,7 +724,7 @@ InvalidateWindowClasses(WC_AIRCRAFT_LIST); } -void AircraftYearlyLoop(void) +void AircraftYearlyLoop() { Vehicle *v; @@ -2104,7 +2104,7 @@ /** need to be called to load aircraft from old version */ -void UpdateOldAircraft(void) +void UpdateOldAircraft() { /* set airport_flags to 0 for all airports just to be sure */ Station *st;
--- a/src/airport.cpp +++ b/src/airport.cpp @@ -32,7 +32,7 @@ static AirportFTAClass *HeliStation; -void InitializeAirports(void) +void InitializeAirports() { CountryAirport = new AirportFTAClass( _airport_moving_data_country, @@ -175,7 +175,7 @@ ); } -void UnInitializeAirports(void) +void UnInitializeAirports() { delete CountryAirport; delete CityAirport; @@ -467,7 +467,7 @@ } -uint32 GetValidAirports(void) +uint32 GetValidAirports() { uint32 mask = 0;
--- a/src/airport.h +++ b/src/airport.h @@ -181,8 +181,8 @@ byte heading; // heading (current orders), guiding an airplane to its target on an airport } AirportFTA; -void InitializeAirports(void); -void UnInitializeAirports(void); +void InitializeAirports(); +void UnInitializeAirports(); const AirportFTAClass *GetAirport(const byte airport_type); /** Get buildable airport bitmask. @@ -190,6 +190,6 @@ * Bit 0 means the small airport is buildable, etc. * @todo set availability of airports by year, instead of airplane */ -uint32 GetValidAirports(void); +uint32 GetValidAirports(); #endif /* AIRPORT_H */
--- a/src/airport_gui.cpp +++ b/src/airport_gui.cpp @@ -21,7 +21,7 @@ static byte _selected_airport_type; -static void ShowBuildAirportPicker(void); +static void ShowBuildAirportPicker(); void CcBuildAirport(bool success, TileIndex tile, uint32 p1, uint32 p2) @@ -132,7 +132,7 @@ BuildAirToolbWndProc }; -void ShowBuildAirToolbar(void) +void ShowBuildAirToolbar() { if (!IsValidPlayer(_current_player)) return; @@ -256,12 +256,12 @@ BuildAirportPickerWndProc }; -static void ShowBuildAirportPicker(void) +static void ShowBuildAirportPicker() { AllocateWindowDesc(&_build_airport_desc); } -void InitializeAirportGui(void) +void InitializeAirportGui() { _selected_airport_type = AT_SMALL; }
--- a/src/autoreplace_gui.cpp +++ b/src/autoreplace_gui.cpp @@ -30,7 +30,7 @@ }; /* General Vehicle GUI based procedures that are independent of vehicle types */ -void InitializeVehiclesGuiList(void) +void InitializeVehiclesGuiList() { _railtype_selected_in_replace_gui = RAILTYPE_RAIL; }
--- a/src/clear_cmd.cpp +++ b/src/clear_cmd.cpp @@ -718,7 +718,7 @@ MarkTileDirtyByTile(tile); } -void GenerateClearTile(void) +void GenerateClearTile() { uint i, gi; TileIndex tile; @@ -792,7 +792,7 @@ return; } -void InitializeClearLand(void) +void InitializeClearLand() { _opt.snow_line = _patches.snow_line_height * TILE_HEIGHT; }
--- a/src/command.cpp +++ b/src/command.cpp @@ -395,7 +395,7 @@ return res; } -int32 GetAvailableMoneyForCommand(void) +int32 GetAvailableMoneyForCommand() { PlayerID pid = _current_player; if (!IsValidPlayer(pid)) return 0x7FFFFFFF; // max int
--- a/src/command.h +++ b/src/command.h @@ -209,6 +209,6 @@ bool IsValidCommand(uint cmd); byte GetCommandFlags(uint cmd); -int32 GetAvailableMoneyForCommand(void); +int32 GetAvailableMoneyForCommand(); #endif /* COMMAND_H */
--- a/src/console.cpp +++ b/src/console.cpp @@ -46,7 +46,7 @@ * end of header * * *************** */ -static void IConsoleClearCommand(void) +static void IConsoleClearCommand() { memset(_iconsole_cmdline.buf, 0, ICON_CMDLN_SIZE); _iconsole_cmdline.length = 0; @@ -56,7 +56,7 @@ SetWindowDirty(FindWindowById(WC_CONSOLE, 0)); } -static inline void IConsoleResetHistoryPos(void) {_iconsole_historypos = ICON_HISTORY_SIZE - 1;} +static inline void IConsoleResetHistoryPos() {_iconsole_historypos = ICON_HISTORY_SIZE - 1;} static void IConsoleHistoryAdd(const char *cmd); @@ -207,7 +207,7 @@ IConsoleWndProc, }; -void IConsoleInit(void) +void IConsoleInit() { extern const char _openttd_revision[]; _iconsole_output_file = NULL; @@ -238,7 +238,7 @@ IConsoleHistoryAdd(""); } -void IConsoleClearBuffer(void) +void IConsoleClearBuffer() { uint i; for (i = 0; i <= ICON_BUFFER; i++) { @@ -247,7 +247,7 @@ } } -static void IConsoleClear(void) +static void IConsoleClear() { free(_iconsole_cmdline.buf); IConsoleClearBuffer(); @@ -262,7 +262,7 @@ } } -bool CloseConsoleLogIfActive(void) +bool CloseConsoleLogIfActive() { if (_iconsole_output_file != NULL) { IConsolePrintF(_icolour_def, "file output complete"); @@ -274,7 +274,7 @@ return false; } -void IConsoleFree(void) +void IConsoleFree() { IConsoleClear(); CloseConsoleLogIfActive(); @@ -297,7 +297,7 @@ MarkWholeScreenDirty(); } -void IConsoleSwitch(void) +void IConsoleSwitch() { switch (_iconsole_mode) { case ICONSOLE_CLOSED: { @@ -317,8 +317,8 @@ MarkWholeScreenDirty(); } -void IConsoleClose(void) {if (_iconsole_mode == ICONSOLE_OPENED) IConsoleSwitch();} -void IConsoleOpen(void) {if (_iconsole_mode == ICONSOLE_CLOSED) IConsoleSwitch();} +void IConsoleClose() {if (_iconsole_mode == ICONSOLE_OPENED) IConsoleSwitch();} +void IConsoleOpen() {if (_iconsole_mode == ICONSOLE_CLOSED) IConsoleSwitch();} /** * Add the entered line into the history so you can look it back
--- a/src/console.h +++ b/src/console.h @@ -37,7 +37,7 @@ * access, before execution/change or after execution/change. This allows * for general flow of permissions or special action needed in some cases */ -typedef bool IConsoleHook(void); +typedef bool IConsoleHook(); typedef struct IConsoleHooks{ IConsoleHook *access; ///< trigger when accessing the variable/command IConsoleHook *pre; ///< trigger before the variable/command is changed/executed @@ -117,13 +117,13 @@ VARDEF IConsoleModes _iconsole_mode; /* console functions */ -void IConsoleInit(void); -void IConsoleFree(void); -void IConsoleClearBuffer(void); +void IConsoleInit(); +void IConsoleFree(); +void IConsoleClearBuffer(); void IConsoleResize(Window *w); -void IConsoleSwitch(void); -void IConsoleClose(void); -void IConsoleOpen(void); +void IConsoleSwitch(); +void IConsoleClose(); +void IConsoleOpen(); /* console output */ void IConsolePrint(uint16 color_code, const char *string); @@ -150,7 +150,7 @@ void IConsoleVarExec(const IConsoleVar *var, byte tokencount, char *token[]); /* console std lib (register ingame commands/aliases/variables) */ -void IConsoleStdLibRegister(void); +void IConsoleStdLibRegister(); /* Hooking code */ void IConsoleCmdHookAdd(const char *name, IConsoleHookTypes type, IConsoleHook *proc);
--- a/src/console_cmds.cpp +++ b/src/console_cmds.cpp @@ -32,7 +32,7 @@ // ** console command / variable defines ** // #define DEF_CONSOLE_CMD(function) static bool function(byte argc, char *argv[]) -#define DEF_CONSOLE_HOOK(function) static bool function(void) +#define DEF_CONSOLE_HOOK(function) static bool function() /* **************************** */ @@ -41,7 +41,7 @@ #ifdef ENABLE_NETWORK -static inline bool NetworkAvailable(void) +static inline bool NetworkAvailable() { if (!_network_available) { IConsoleError("You cannot use this command because there is no network available."); @@ -175,7 +175,7 @@ } extern bool SafeSaveOrLoad(const char *filename, int mode, int newgm); -extern void BuildFileList(void); +extern void BuildFileList(); extern void SetFiosType(const byte fiostype); /* Save the map to a file */ @@ -853,7 +853,7 @@ /* **************************** */ /* default console commands */ /* **************************** */ -extern bool CloseConsoleLogIfActive(void); +extern bool CloseConsoleLogIfActive(); DEF_CONSOLE_CMD(ConScript) { @@ -1442,7 +1442,7 @@ /* debug commands and variables */ /* ****************************************** */ -static void IConsoleDebugLibRegister(void) +static void IConsoleDebugLibRegister() { /* debugging variables and functions */ extern bool _stdlib_con_developer; // XXX extern in .cpp @@ -1459,7 +1459,7 @@ /* console command and variable registration */ /* ****************************************** */ -void IConsoleStdLibRegister(void) +void IConsoleStdLibRegister() { /* stdlib */ extern byte _stdlib_developer; // XXX extern in .cpp
--- a/src/currency.cpp +++ b/src/currency.cpp @@ -128,7 +128,7 @@ * get a mask of the allowed currencies depending on the year * @return mask of currencies */ -uint GetMaskOfAllowedCurrencies(void) +uint GetMaskOfAllowedCurrencies() { uint mask = 0; uint i; @@ -147,7 +147,7 @@ /** * Verify if the currency chosen by the user is about to be converted to Euro **/ -void CheckSwitchToEuro(void) +void CheckSwitchToEuro() { if (_currency_specs[_opt.currency].to_euro != CF_NOEURO && _currency_specs[_opt.currency].to_euro != CF_ISEURO && @@ -161,7 +161,7 @@ * Called only from newgrf.c. Will fill _currency_specs array with * default values from origin_currency_specs **/ -void ResetCurrencies(void) +void ResetCurrencies() { memcpy(&_currency_specs, &origin_currency_specs, sizeof(origin_currency_specs)); } @@ -170,7 +170,7 @@ * Build a list of currency names StringIDs to use in a dropdown list * @return Pointer to a (static) array of StringIDs */ -StringID* BuildCurrencyDropdown(void) +StringID* BuildCurrencyDropdown() { /* Allow room for all currencies, plus a terminator entry */ static StringID names[NUM_CURRENCY + 1];
--- a/src/currency.h +++ b/src/currency.h @@ -38,10 +38,10 @@ #define _custom_currency (_currency_specs[CUSTOM_CURRENCY_ID]) #define _currency ((const CurrencySpec*)&_currency_specs[_opt_ptr->currency]) -uint GetMaskOfAllowedCurrencies(void); -void CheckSwitchToEuro(void); -void ResetCurrencies(void); -StringID* BuildCurrencyDropdown(void); +uint GetMaskOfAllowedCurrencies(); +void CheckSwitchToEuro(); +void ResetCurrencies(); +StringID* BuildCurrencyDropdown(); byte GetNewgrfCurrencyIdConverted(byte grfcurr_id); #endif /* CURRENCY_H */
--- a/src/date.cpp +++ b/src/date.cpp @@ -178,24 +178,24 @@ OnNewDay_DisasterVehicle, }; -extern void WaypointsDailyLoop(void); -extern void TextMessageDailyLoop(void); -extern void EnginesDailyLoop(void); -extern void DisasterDailyLoop(void); +extern void WaypointsDailyLoop(); +extern void TextMessageDailyLoop(); +extern void EnginesDailyLoop(); +extern void DisasterDailyLoop(); -extern void PlayersMonthlyLoop(void); -extern void EnginesMonthlyLoop(void); -extern void TownsMonthlyLoop(void); -extern void IndustryMonthlyLoop(void); -extern void StationMonthlyLoop(void); +extern void PlayersMonthlyLoop(); +extern void EnginesMonthlyLoop(); +extern void TownsMonthlyLoop(); +extern void IndustryMonthlyLoop(); +extern void StationMonthlyLoop(); -extern void PlayersYearlyLoop(void); -extern void TrainsYearlyLoop(void); -extern void RoadVehiclesYearlyLoop(void); -extern void AircraftYearlyLoop(void); -extern void ShipsYearlyLoop(void); +extern void PlayersYearlyLoop(); +extern void TrainsYearlyLoop(); +extern void RoadVehiclesYearlyLoop(); +extern void AircraftYearlyLoop(); +extern void ShipsYearlyLoop(); -extern void ShowEndGameChart(void); +extern void ShowEndGameChart(); static const Month _autosave_months[] = { @@ -221,7 +221,7 @@ } } -void IncreaseDate(void) +void IncreaseDate() { YearMonthDay ymd;
--- a/src/debug.cpp +++ b/src/debug.cpp @@ -153,7 +153,7 @@ * Just return a string with the values of all the debug categorites * @return string with debug-levels */ -const char *GetDebugString(void) +const char *GetDebugString() { const DebugLevel *i; static char dbgstr[100];
--- a/src/debug.h +++ b/src/debug.h @@ -84,7 +84,7 @@ #endif /* NO_DEBUG_MESSAGES */ void SetDebugString(const char *s); -const char *GetDebugString(void); +const char *GetDebugString(); /* MSVCRT of course has to have a different syntax for long long *sigh* */ #if defined(_MSC_VER) || defined(__MINGW32__) @@ -95,7 +95,7 @@ /* Used for profiling */ #define TIC() {\ - extern uint64 _rdtsc(void);\ + extern uint64 _rdtsc();\ uint64 _xxx_ = _rdtsc();\ static uint64 __sum__ = 0;\ static uint32 __i__ = 0;
--- a/src/dedicated.cpp +++ b/src/dedicated.cpp @@ -22,7 +22,7 @@ # define PRINTF_PID_T "%d" #endif -void DedicatedFork(void) +void DedicatedFork() { /* Fork the program */ pid_t pid = fork(); @@ -63,6 +63,6 @@ #else -void DedicatedFork(void) {} +void DedicatedFork() {} #endif /* ENABLE_NETWORK */
--- a/src/depot.cpp +++ b/src/depot.cpp @@ -47,7 +47,7 @@ /** * Allocate a new depot */ -Depot *AllocateDepot(void) +Depot *AllocateDepot() { Depot *d; @@ -85,7 +85,7 @@ DeleteWindowById(WC_VEHICLE_DEPOT, depot->xy); } -void InitializeDepots(void) +void InitializeDepots() { CleanPool(&_Depot_pool); AddBlockToPool(&_Depot_pool); @@ -99,7 +99,7 @@ SLE_END() }; -static void Save_DEPT(void) +static void Save_DEPT() { Depot *depot; @@ -109,7 +109,7 @@ } } -static void Load_DEPT(void) +static void Load_DEPT() { int index;
--- a/src/depot.h +++ b/src/depot.h @@ -107,8 +107,8 @@ } Depot *GetDepotByTile(TileIndex tile); -void InitializeDepots(void); -Depot *AllocateDepot(void); +void InitializeDepots(); +Depot *AllocateDepot(); void DeleteDepotHighlightOfVehicle(const Vehicle *v);
--- a/src/disaster_cmd.cpp +++ b/src/disaster_cmd.cpp @@ -758,12 +758,12 @@ // not used } -typedef void DisasterInitProc(void); +typedef void DisasterInitProc(); /** Zeppeliner which crashes on a small airport if one found, * otherwise crashes on a random tile */ -static void Disaster_Zeppeliner_Init(void) +static void Disaster_Zeppeliner_Init() { Vehicle *v = ForceAllocateSpecialVehicle(), *u; Station *st; @@ -797,7 +797,7 @@ /** Ufo which flies around aimlessly from the middle of the map a bit * until it locates a road vehicle which it targets and then destroys */ -static void Disaster_Small_Ufo_Init(void) +static void Disaster_Small_Ufo_Init() { Vehicle *v = ForceAllocateSpecialVehicle(), *u; int x; @@ -821,7 +821,7 @@ /* Combat airplane which destroys an oil refinery */ -static void Disaster_Airplane_Init(void) +static void Disaster_Airplane_Init() { Industry *i, *found; Vehicle *v, *u; @@ -857,7 +857,7 @@ /** Combat helicopter that destroys a factory */ -static void Disaster_Helicopter_Init(void) +static void Disaster_Helicopter_Init() { Industry *i, *found; Vehicle *v, *u, *w; @@ -899,7 +899,7 @@ /* Big Ufo which lands on a piece of rail and will consequently be shot * down by a combat airplane, destroying the surroundings */ -static void Disaster_Big_Ufo_Init(void) +static void Disaster_Big_Ufo_Init() { Vehicle *v = ForceAllocateSpecialVehicle(), *u; int x, y; @@ -924,7 +924,7 @@ /* Curious submarine #1, just floats around */ -static void Disaster_Small_Submarine_Init(void) +static void Disaster_Small_Submarine_Init() { Vehicle *v = ForceAllocateSpecialVehicle(); int x, y; @@ -949,7 +949,7 @@ /* Curious submarine #2, just floats around */ -static void Disaster_Big_Submarine_Init(void) +static void Disaster_Big_Submarine_Init() { Vehicle *v = ForceAllocateSpecialVehicle(); int x,y; @@ -975,7 +975,7 @@ /** Coal mine catastrophe, destroys a stretch of 30 tiles of * land in a certain direction */ -static void Disaster_CoalMine_Init(void) +static void Disaster_CoalMine_Init() { int index = GB(Random(), 0, 4); uint m; @@ -1031,7 +1031,7 @@ }; -static void DoDisaster(void) +static void DoDisaster() { byte buf[lengthof(_dis_years)]; uint i; @@ -1048,12 +1048,12 @@ } -static void ResetDisasterDelay(void) +static void ResetDisasterDelay() { _disaster_delay = GB(Random(), 0, 9) + 730; } -void DisasterDailyLoop(void) +void DisasterDailyLoop() { if (--_disaster_delay != 0) return; @@ -1062,7 +1062,7 @@ if (_opt.diff.disasters != 0) DoDisaster(); } -void StartupDisasters(void) +void StartupDisasters() { ResetDisasterDelay(); }
--- a/src/dock_gui.cpp +++ b/src/dock_gui.cpp @@ -17,8 +17,8 @@ #include "command.h" #include "variables.h" -static void ShowBuildDockStationPicker(void); -static void ShowBuildDocksDepotPicker(void); +static void ShowBuildDockStationPicker(); +static void ShowBuildDocksDepotPicker(); static Axis _ship_depot_direction; @@ -216,7 +216,7 @@ BuildDocksToolbWndProc }; -void ShowBuildDocksToolbar(void) +void ShowBuildDocksToolbar() { if (!IsValidPlayer(_current_player)) return; @@ -290,12 +290,12 @@ BuildDockStationWndProc }; -static void ShowBuildDockStationPicker(void) +static void ShowBuildDockStationPicker() { AllocateWindowDesc(&_build_dock_station_desc); } -static void UpdateDocksDirection(void) +static void UpdateDocksDirection() { if (_ship_depot_direction != AXIS_X) { SetTileSelectSize(1, 2); @@ -360,14 +360,14 @@ }; -static void ShowBuildDocksDepotPicker(void) +static void ShowBuildDocksDepotPicker() { AllocateWindowDesc(&_build_docks_depot_desc); UpdateDocksDirection(); } -void InitializeDockGui(void) +void InitializeDockGui() { _ship_depot_direction = AXIS_X; }
--- a/src/economy.cpp +++ b/src/economy.cpp @@ -581,7 +581,7 @@ return 0; } -static void PlayersGenStatistics(void) +static void PlayersGenStatistics() { Station *st; Player *p; @@ -625,7 +625,7 @@ *value += tmp >> 16; } -static void AddInflation(void) +static void AddInflation() { /* Approximation for (100 + infl_amount)% ** (1 / 12) - 100% * scaled by 65536 @@ -658,7 +658,7 @@ InvalidateWindow(WC_PAYMENT_RATES, 0); } -static void PlayersPayInterest(void) +static void PlayersPayInterest() { const Player* p; int interest = _economy.interest_rate * 54; @@ -676,7 +676,7 @@ } } -static void HandleEconomyFluctuations(void) +static void HandleEconomyFluctuations() { if (_opt.diff.economy == 0) return; @@ -756,7 +756,7 @@ /** * Reset changes to the price base multipliers. */ -void ResetPriceBaseMultipliers(void) +void ResetPriceBaseMultipliers() { uint i; @@ -778,7 +778,7 @@ price_base_multiplier[price] = factor; } -void StartupEconomy(void) +void StartupEconomy() { int i; @@ -995,7 +995,7 @@ } -static void SubsidyMonthlyHandler(void) +static void SubsidyMonthlyHandler() { Subsidy *s; Pair pair; @@ -1074,7 +1074,7 @@ SLE_END() }; -static void Save_SUBS(void) +static void Save_SUBS() { int i; Subsidy *s; @@ -1088,7 +1088,7 @@ } } -static void Load_SUBS(void) +static void Load_SUBS() { int index; while ((index = SlIterateArray()) != -1) @@ -1603,7 +1603,7 @@ return result; } -void PlayersMonthlyLoop(void) +void PlayersMonthlyLoop() { PlayersGenStatistics(); if (_patches.inflation && _cur_year < MAX_YEAR) @@ -1757,14 +1757,14 @@ } /** Prices */ -static void SaveLoad_PRIC(void) +static void SaveLoad_PRIC() { SlArray(&_price, NUM_PRICES, SLE_INT32); SlArray(&_price_frac, NUM_PRICES, SLE_UINT16); } /** Cargo payment rates */ -static void SaveLoad_CAPR(void) +static void SaveLoad_CAPR() { SlArray(&_cargo_payment_rates, NUM_CARGO, SLE_INT32); SlArray(&_cargo_payment_rates_frac, NUM_CARGO, SLE_UINT16); @@ -1781,7 +1781,7 @@ }; /** Economy variables */ -static void SaveLoad_ECMY(void) +static void SaveLoad_ECMY() { SlObject(&_economy, _economy_desc); }
--- a/src/economy.h +++ b/src/economy.h @@ -5,7 +5,7 @@ #ifndef ECONOMY_H #define ECONOMY_H -void ResetPriceBaseMultipliers(void); +void ResetPriceBaseMultipliers(); void SetPriceBaseMultiplier(uint price, byte factor); typedef struct {
--- a/src/engine.cpp +++ b/src/engine.cpp @@ -34,7 +34,7 @@ void ShowEnginePreviewWindow(EngineID engine); -void DeleteCustomEngineNames(void) +void DeleteCustomEngineNames() { uint i; StringID old; @@ -48,13 +48,13 @@ _vehicle_design_names &= ~1; } -void LoadCustomEngineNames(void) +void LoadCustomEngineNames() { /* XXX: not done */ DEBUG(misc, 1, "LoadCustomEngineNames: not done"); } -static void SetupEngineNames(void) +static void SetupEngineNames() { StringID *name; @@ -92,7 +92,7 @@ InvalidateWindowClasses(WC_REPLACE_VEHICLE); } -void AddTypeToEngines(void) +void AddTypeToEngines() { Engine* e = _engines; @@ -102,7 +102,7 @@ do e->type = VEH_Aircraft; while (++e < &_engines[TOTAL_NUM_ENGINES]); } -void StartupEngines(void) +void StartupEngines() { Engine *e; const EngineInfo *ei; @@ -209,7 +209,7 @@ return best_player; } -void EnginesDailyLoop(void) +void EnginesDailyLoop() { EngineID i; @@ -321,7 +321,7 @@ AddNewsItem(index, NEWS_FLAGS(NM_CALLBACK, 0, NT_NEW_VEHICLES, DNC_VEHICLEAVAIL), 0, 0); } -void EnginesMonthlyLoop(void) +void EnginesMonthlyLoop() { Engine *e; @@ -423,7 +423,7 @@ } -static EngineRenew *AllocateEngineRenew(void) +static EngineRenew *AllocateEngineRenew() { EngineRenew *er; @@ -538,7 +538,7 @@ SLE_END() }; -static void Save_ERNW(void) +static void Save_ERNW() { EngineRenew *er; @@ -548,7 +548,7 @@ } } -static void Load_ERNW(void) +static void Load_ERNW() { int index; @@ -590,7 +590,7 @@ SLE_END() }; -static void Save_ENGN(void) +static void Save_ENGN() { uint i; @@ -600,7 +600,7 @@ } } -static void Load_ENGN(void) +static void Load_ENGN() { int index; while ((index = SlIterateArray()) != -1) { @@ -608,7 +608,7 @@ } } -static void LoadSave_ENGS(void) +static void LoadSave_ENGS() { SlArray(_engine_name_strings, lengthof(_engine_name_strings), SLE_STRINGID); } @@ -619,7 +619,7 @@ { 'ERNW', Save_ERNW, Load_ERNW, CH_ARRAY | CH_LAST}, }; -void InitializeEngines(void) +void InitializeEngines() { /* Clean the engine renew pool and create 1 block in it */ CleanPool(&_EngineRenew_pool);
--- a/src/engine.h +++ b/src/engine.h @@ -140,8 +140,8 @@ static const EngineID INVALID_ENGINE = 0xFFFF; -void AddTypeToEngines(void); -void StartupEngines(void); +void AddTypeToEngines(); +void StartupEngines(); void DrawTrainEngine(int x, int y, EngineID engine, SpriteID pal); @@ -149,8 +149,8 @@ void DrawShipEngine(int x, int y, EngineID engine, SpriteID pal); void DrawAircraftEngine(int x, int y, EngineID engine, SpriteID pal); -void LoadCustomEngineNames(void); -void DeleteCustomEngineNames(void); +void LoadCustomEngineNames(); +void DeleteCustomEngineNames(); bool IsEngineBuildable(EngineID engine, byte type, PlayerID player);
--- a/src/fileio.cpp +++ b/src/fileio.cpp @@ -34,7 +34,7 @@ static Fio _fio; /* Get current position in file */ -uint32 FioGetPos(void) +uint32 FioGetPos() { return _fio.pos + (_fio.buffer - _fio.buffer_start) - FIO_BUFFER_SIZE; } @@ -73,7 +73,7 @@ FioSeekTo(GB(pos, 0, 24), SEEK_SET); } -byte FioReadByte(void) +byte FioReadByte() { if (_fio.buffer == _fio.buffer_end) { _fio.pos += FIO_BUFFER_SIZE; @@ -94,13 +94,13 @@ } } -uint16 FioReadWord(void) +uint16 FioReadWord() { byte b = FioReadByte(); return (FioReadByte() << 8) | b; } -uint32 FioReadDword(void) +uint32 FioReadDword() { uint b = FioReadWord(); return (FioReadWord() << 16) | b; @@ -124,7 +124,7 @@ } } -void FioCloseAll(void) +void FioCloseAll() { int i;
--- a/src/fileio.h +++ b/src/fileio.h @@ -7,11 +7,11 @@ void FioSeekTo(uint32 pos, int mode); void FioSeekToFile(uint32 pos); -uint32 FioGetPos(void); -byte FioReadByte(void); -uint16 FioReadWord(void); -uint32 FioReadDword(void); -void FioCloseAll(void); +uint32 FioGetPos(); +byte FioReadByte(); +uint16 FioReadWord(); +uint32 FioReadDword(); +void FioCloseAll(); FILE *FioFOpenFile(const char *filename); void FioOpenFile(int slot, const char *filename); void FioReadBlock(void *ptr, uint size);
--- a/src/fios.cpp +++ b/src/fios.cpp @@ -34,7 +34,7 @@ extern bool FiosIsRoot(const char *path); extern bool FiosIsValidFile(const char *path, const struct dirent *ent, struct stat *sb); extern bool FiosIsHiddenFile(const struct dirent *ent); -extern void FiosGetDrives(void); +extern void FiosGetDrives(); extern bool FiosGetDiskFreeSpace(const char *path, uint32 *tot); /* get the name of an oldstyle savegame */ @@ -44,7 +44,7 @@ * Allocate a new FiosItem. * @return A pointer to the newly allocated FiosItem. */ -FiosItem *FiosAlloc(void) +FiosItem *FiosAlloc() { if (_fios_count == _fios_alloc) { _fios_alloc += 256; @@ -78,7 +78,7 @@ /** * Free the list of savegames */ -void FiosFreeSavegameList(void) +void FiosFreeSavegameList() { free(_fios_items); _fios_items = NULL;
--- a/src/fios.h +++ b/src/fios.h @@ -39,7 +39,7 @@ /* Get a list of Heightmaps */ FiosItem *FiosGetHeightmapList(int mode); /* Free the list of savegames */ -void FiosFreeSavegameList(void); +void FiosFreeSavegameList(); /* Browse to. Returns a filename w/path if we reached a file. */ char *FiosBrowseTo(const FiosItem *item); /* Return path, free space and stringID */ @@ -49,7 +49,7 @@ /* Make a filename from a name */ void FiosMakeSavegameName(char *buf, const char *name, size_t size); /* Allocate a new FiosItem */ -FiosItem *FiosAlloc(void); +FiosItem *FiosAlloc(); int CDECL compare_FiosItems(const void *a, const void *b);
--- a/src/fontcache.cpp +++ b/src/fontcache.cpp @@ -278,7 +278,7 @@ } -void InitFreeType(void) +void InitFreeType() { if (StrEmpty(_freetype.small_font) && StrEmpty(_freetype.medium_font) && StrEmpty(_freetype.large_font)) { DEBUG(freetype, 1, "No font faces specified, using sprite fonts instead"); @@ -492,7 +492,7 @@ } -void InitializeUnicodeGlyphMap(void) +void InitializeUnicodeGlyphMap() { FontSize size; SpriteID base;
--- a/src/fontcache.h +++ b/src/fontcache.h @@ -10,7 +10,7 @@ void SetUnicodeGlyph(FontSize size, uint32 key, SpriteID sprite); /** Initialize the glyph map */ -void InitializeUnicodeGlyphMap(void); +void InitializeUnicodeGlyphMap(); #ifdef WITH_FREETYPE @@ -25,14 +25,14 @@ extern FreeTypeSettings _freetype; -void InitFreeType(void); +void InitFreeType(); const struct Sprite *GetGlyph(FontSize size, uint32 key); uint GetGlyphWidth(FontSize size, uint32 key); #else /* Stub for initializiation */ -static inline void InitFreeType(void) {} +static inline void InitFreeType() {} /** Get the Sprite for a glyph */ static inline const Sprite *GetGlyph(FontSize size, uint32 key)
--- a/src/functions.h +++ b/src/functions.h @@ -8,7 +8,7 @@ #include "gfx.h" void DoClearSquare(TileIndex tile); -void RunTileLoop(void); +void RunTileLoop(); uint GetPartialZ(int x, int y, Slope corners); uint GetSlopeZ(int x, int y); @@ -80,11 +80,11 @@ // Mersenne twister functions void SeedMT(uint32 seed); -uint32 RandomMT(void); +uint32 RandomMT(); #ifdef MERSENNE_TWISTER - static inline uint32 Random(void) { return RandomMT(); } + static inline uint32 Random() { return RandomMT(); } uint RandomRange(uint max); #else @@ -94,33 +94,33 @@ #define RandomRange(max) DoRandomRange(max, __LINE__, __FILE__) uint DoRandomRange(uint max, int line, const char *file); #else - uint32 Random(void); + uint32 Random(); uint RandomRange(uint max); #endif #endif // MERSENNE_TWISTER static inline TileIndex RandomTileSeed(uint32 r) { return TILE_MASK(r); } -static inline TileIndex RandomTile(void) { return TILE_MASK(Random()); } +static inline TileIndex RandomTile() { return TILE_MASK(Random()); } -uint32 InteractiveRandom(void); // Used for random sequences that are not the same on the other end of the multiplayer link +uint32 InteractiveRandom(); // Used for random sequences that are not the same on the other end of the multiplayer link uint InteractiveRandomRange(uint max); /* texteff.cpp */ -void MoveAllTextEffects(void); +void MoveAllTextEffects(); void AddTextEffect(StringID msg, int x, int y, uint16 duration); -void InitTextEffects(void); +void InitTextEffects(); void DrawTextEffects(DrawPixelInfo *dpi); -void InitTextMessage(void); -void DrawTextMessage(void); +void InitTextMessage(); +void DrawTextMessage(); void CDECL AddTextMessage(uint16 color, uint8 duration, const char *message, ...); -void UndrawTextMessage(void); +void UndrawTextMessage(); bool AddAnimatedTile(TileIndex tile); void DeleteAnimatedTile(TileIndex tile); -void AnimateAnimatedTiles(void); -void InitializeAnimatedTiles(void); +void AnimateAnimatedTiles(); +void InitializeAnimatedTiles(); /* tunnelbridge_cmd.cpp */ bool CheckBridge_Stuff(byte bridge_type, uint bridge_len); @@ -128,7 +128,7 @@ int CalcBridgeLenCostFactor(int x); /* misc_cmd.cpp */ -void PlaceTreesRandomly(void); +void PlaceTreesRandomly(); void InitializeLandscapeVariables(bool only_constants); @@ -142,7 +142,7 @@ #define AllocateNameUnique(name, skip) RealAllocateName(name, skip, true) #define AllocateName(name, skip) RealAllocateName(name, skip, false) StringID RealAllocateName(const char *name, byte skip, bool check_double); -void ConvertNameArray(void); +void ConvertNameArray(); /* misc functions */ void MarkTileDirty(int x, int y); @@ -157,7 +157,7 @@ void SetObjectToPlaceWnd(CursorID icon, SpriteID pal, byte mode, Window *w); void SetObjectToPlace(CursorID icon, SpriteID pal, byte mode, WindowClass window_class, WindowNumber window_num); -void ResetObjectToPlace(void); +void ResetObjectToPlace(); bool ScrollWindowTo(int x, int y, Window * w); @@ -181,12 +181,12 @@ void ShowHighscoreTable(int difficulty, int8 rank); TileIndex AdjustTileCoordRandomly(TileIndex a, byte rng); -void AfterLoadTown(void); -void UpdatePatches(void); -void AskExitGame(void); -void AskExitToGameMenu(void); +void AfterLoadTown(); +void UpdatePatches(); +void AskExitGame(); +void AskExitToGameMenu(); -void RedrawAutosave(void); +void RedrawAutosave(); StringID RemapOldStringID(StringID s); @@ -203,19 +203,19 @@ void ShowSaveLoadDialog(int mode); /* callback from drivers that is called if the game size changes dynamically */ -void GameSizeChanged(void); +void GameSizeChanged(); bool FileExists(const char *filename); bool ReadLanguagePack(int index); -void InitializeLanguagePacks(void); +void InitializeLanguagePacks(); const char *GetCurrentLocale(const char *param); void *ReadFileToMem(const char *filename, size_t *lenp, size_t maxsize); -void LoadFromConfig(void); -void SaveToConfig(void); -void CheckConfig(void); +void LoadFromConfig(); +void SaveToConfig(); +void CheckConfig(); int ttd_main(int argc, char* argv[]); -void HandleExitGameRequest(void); +void HandleExitGameRequest(); -void DeterminePaths(void); +void DeterminePaths(); #endif /* FUNCTIONS_H */
--- a/src/genworld.cpp +++ b/src/genworld.cpp @@ -20,19 +20,19 @@ #include "date.h" void GenerateLandscape(byte mode); -void GenerateClearTile(void); -void GenerateIndustries(void); -void GenerateUnmovables(void); -bool GenerateTowns(void); -void GenerateTrees(void); +void GenerateClearTile(); +void GenerateIndustries(); +void GenerateUnmovables(); +bool GenerateTowns(); +void GenerateTrees(); -void StartupEconomy(void); -void StartupPlayers(void); -void StartupDisasters(void); +void StartupEconomy(); +void StartupPlayers(); +void StartupDisasters(); void InitializeGame(int mode, uint size_x, uint size_y); -void ConvertGroundTilesIntoWaterTiles(void); +void ConvertGroundTilesIntoWaterTiles(); /* Please only use this variable in genworld.h and genworld.c and * nowhere else. For speed improvements we need it to be global, but @@ -58,7 +58,7 @@ * writing in a thread, it can cause damaged data (reading and writing the * same tile at the same time). */ -bool IsGeneratingWorldReadyForPaint(void) +bool IsGeneratingWorldReadyForPaint() { /* If we are in quit_thread mode, ignore this and always return false. This * forces the screen to not be drawn, and the GUI not to wait for a draw. */ @@ -70,7 +70,7 @@ /** * Tells if the world generation is done in a thread or not. */ -bool IsGenerateWorldThreaded(void) +bool IsGenerateWorldThreaded() { return _gw.threaded && !_gw.quit_thread; } @@ -180,7 +180,7 @@ * This will wait for the thread to finish up his work. It will not continue * till the work is done. */ -void WaitTillGeneratedWorld(void) +void WaitTillGeneratedWorld() { if (_gw.thread == NULL) return; _gw.quit_thread = true; @@ -192,7 +192,7 @@ /** * Initializes the abortion process */ -void AbortGeneratingWorld(void) +void AbortGeneratingWorld() { _gw.abort = true; } @@ -200,7 +200,7 @@ /** * Is the generation being aborted? */ -bool IsGeneratingWorldAborted(void) +bool IsGeneratingWorldAborted() { return _gw.abort; } @@ -208,7 +208,7 @@ /** * Really handle the abortion, i.e. clean up some of the mess */ -void HandleGeneratingWorldAbortion(void) +void HandleGeneratingWorldAbortion() { /* Clean up - in SE create an empty map, otherwise, go to intro menu */ _switch_mode = (_game_mode == GM_EDITOR) ? SM_EDITOR : SM_MENU;
--- a/src/genworld.h +++ b/src/genworld.h @@ -26,8 +26,8 @@ GENERATE_NEW_SEED = (uint)-1, ///< Create a new random seed }; -typedef void gw_done_proc(void); -typedef void gw_abort_proc(void); +typedef void gw_done_proc(); +typedef void gw_abort_proc(); typedef struct gw_info { bool active; ///< Is generating world active @@ -66,7 +66,7 @@ /** * Check if we are currently in the process of generating a world. */ -static inline bool IsGeneratingWorld(void) +static inline bool IsGeneratingWorld() { extern gw_info _gw; @@ -75,23 +75,23 @@ /* genworld.cpp */ void SetGeneratingWorldPaintStatus(bool status); -bool IsGeneratingWorldReadyForPaint(void); -bool IsGenerateWorldThreaded(void); +bool IsGeneratingWorldReadyForPaint(); +bool IsGenerateWorldThreaded(); void GenerateWorldSetCallback(gw_done_proc *proc); void GenerateWorldSetAbortCallback(gw_abort_proc *proc); -void WaitTillGeneratedWorld(void); +void WaitTillGeneratedWorld(); void GenerateWorld(int mode, uint size_x, uint size_y); -void AbortGeneratingWorld(void); -bool IsGeneratingWorldAborted(void); -void HandleGeneratingWorldAbortion(void); +void AbortGeneratingWorld(); +bool IsGeneratingWorldAborted(); +void HandleGeneratingWorldAbortion(); /* genworld_gui.cpp */ void SetGeneratingWorldProgress(gwp_class cls, uint total); void IncreaseGeneratingWorldProgress(gwp_class cls); -void PrepareGenerateWorldProgress(void); -void ShowGenerateWorldProgress(void); +void PrepareGenerateWorldProgress(); +void ShowGenerateWorldProgress(); void StartNewGameWithoutGUI(uint seed); -void ShowCreateScenario(void); -void StartScenarioEditor(void); +void ShowCreateScenario(); +void StartScenarioEditor(); #endif /* GENWORLD_H */
--- a/src/genworld_gui.cpp +++ b/src/genworld_gui.cpp @@ -533,17 +533,17 @@ if (w != NULL) InvalidateWindow(WC_GENERATE_LANDSCAPE, mode); } -void ShowGenerateLandscape(void) +void ShowGenerateLandscape() { _ShowGenerateLandscape(GLWP_GENERATE); } -void ShowHeightmapLoad(void) +void ShowHeightmapLoad() { _ShowGenerateLandscape(GLWP_HEIGHTMAP); } -void StartScenarioEditor(void) +void StartScenarioEditor() { StartGeneratingLandscape(GLWP_SCENARIO); } @@ -726,7 +726,7 @@ CreateScenarioWndProc, }; -void ShowCreateScenario(void) +void ShowCreateScenario() { DeleteWindowByClass(WC_GENERATE_LANDSCAPE); AllocateWindowDescFront(&_create_scenario_desc, GLWP_SCENARIO); @@ -809,7 +809,7 @@ /** * Initializes the progress counters to the starting point. */ -void PrepareGenerateWorldProgress(void) +void PrepareGenerateWorldProgress() { _tp.cls = STR_WORLD_GENERATION; _tp.current = 0; @@ -821,7 +821,7 @@ /** * Show the window where a user can follow the process of the map generation. */ -void ShowGenerateWorldProgress(void) +void ShowGenerateWorldProgress() { AllocateWindowDescFront(&_show_terrain_progress_desc, 0); }
--- a/src/gfx.cpp +++ b/src/gfx.cpp @@ -1524,9 +1524,9 @@ } } -void DoPaletteAnimations(void); +void DoPaletteAnimations(); -void GfxInitPalettes(void) +void GfxInitPalettes() { memcpy(_cur_palette, _palettes[_use_dos_palette ? 1 : 0], sizeof(_cur_palette)); @@ -1538,7 +1538,7 @@ #define EXTR(p, q) (((uint16)(_timer_counter * (p)) * (q)) >> 16) #define EXTR2(p, q) (((uint16)(~_timer_counter * (p)) * (q)) >> 16) -void DoPaletteAnimations(void) +void DoPaletteAnimations() { const Colour *s; Colour *d; @@ -1649,7 +1649,7 @@ } -void LoadStringWidthTable(void) +void LoadStringWidthTable() { uint i; @@ -1678,7 +1678,7 @@ } -void ScreenSizeChanged(void) +void ScreenSizeChanged() { /* check the dirty rect */ if (_invalid_rect.right >= _screen.width) _invalid_rect.right = _screen.width; @@ -1688,7 +1688,7 @@ _cursor.visible = false; } -void UndrawMouseCursor(void) +void UndrawMouseCursor() { if (_cursor.visible) { _cursor.visible = false; @@ -1701,7 +1701,7 @@ } } -void DrawMouseCursor(void) +void DrawMouseCursor() { int x; int y; @@ -1794,7 +1794,7 @@ _video_driver->make_dirty(left, top, right - left, bottom - top); } -void DrawDirtyBlocks(void) +void DrawDirtyBlocks() { byte *b = _dirty_blocks; const int w = ALIGN(_screen.width, 64); @@ -1916,7 +1916,7 @@ } while (--height != 0); } -void MarkWholeScreenDirty(void) +void MarkWholeScreenDirty() { SetDirtyBlocks(0, 0, _screen.width, _screen.height); } @@ -1995,7 +1995,7 @@ cv->dirty = true; } -static void SwitchAnimatedCursor(void) +static void SwitchAnimatedCursor() { const AnimCursor *cur = _cursor.animate_cur; @@ -2007,7 +2007,7 @@ _cursor.animate_cur = cur + 1; } -void CursorTick(void) +void CursorTick() { if (_cursor.animate_timeout != 0 && --_cursor.animate_timeout == 0) SwitchAnimatedCursor();
--- a/src/gfx.h +++ b/src/gfx.h @@ -86,9 +86,9 @@ GM_EDITOR }; -void GameLoop(void); +void GameLoop(); -void CreateConsole(void); +void CreateConsole(); typedef int32 CursorID; typedef byte Pixel; @@ -166,18 +166,18 @@ extern Colour _cur_palette[256]; void HandleKeypress(uint32 key); -void HandleMouseEvents(void); +void HandleMouseEvents(); void CSleep(int milliseconds); -void UpdateWindows(void); +void UpdateWindows(); -uint32 InteractiveRandom(void); //< Used for random sequences that are not the same on the other end of the multiplayer link +uint32 InteractiveRandom(); //< Used for random sequences that are not the same on the other end of the multiplayer link uint InteractiveRandomRange(uint max); -void DrawTextMessage(void); -void DrawMouseCursor(void); -void ScreenSizeChanged(void); -void HandleExitGameRequest(void); -void GameSizeChanged(void); -void UndrawMouseCursor(void); +void DrawTextMessage(); +void DrawMouseCursor(); +void ScreenSizeChanged(); +void HandleExitGameRequest(); +void GameSizeChanged(); +void UndrawMouseCursor(); #include "helpers.hpp" @@ -222,14 +222,14 @@ BoundingRect GetStringBoundingBox(const char *str); uint32 FormatStringLinebreaks(char *str, int maxw); -void LoadStringWidthTable(void); +void LoadStringWidthTable(); void DrawStringMultiCenter(int x, int y, StringID str, int maxw); uint DrawStringMultiLine(int x, int y, StringID str, int maxw); -void DrawDirtyBlocks(void); +void DrawDirtyBlocks(); void SetDirtyBlocks(int left, int top, int right, int bottom); -void MarkWholeScreenDirty(void); +void MarkWholeScreenDirty(); -void GfxInitPalettes(void); +void GfxInitPalettes(); bool FillDrawPixelInfo(DrawPixelInfo* n, int left, int top, int width, int height); @@ -239,10 +239,10 @@ void SetMouseCursor(CursorID cursor); void SetMouseCursor(SpriteID sprite, SpriteID pal); void SetAnimatedMouseCursor(const AnimCursor *table); -void CursorTick(void); -void DrawMouseCursor(void); -void ScreenSizeChanged(void); -void UndrawMouseCursor(void); +void CursorTick(); +void DrawMouseCursor(); +void ScreenSizeChanged(); +void UndrawMouseCursor(); bool ChangeResInGame(int w, int h); void SortResolutions(int count); void ToggleFullScreen(bool fs);
--- a/src/gfxinit.cpp +++ b/src/gfxinit.cpp @@ -162,7 +162,7 @@ * If neither are found, Windows palette is assumed. * * (Note: Also checks sample.cat for corruption) */ -void CheckExternalFiles(void) +void CheckExternalFiles() { uint i; /* count of files from this version */ @@ -340,7 +340,7 @@ }; -static void LoadSpriteTables(void) +static void LoadSpriteTables() { const FileList* files = _use_dos_palette ? &files_dos : &files_win; uint load_index; @@ -400,7 +400,7 @@ } -void GfxLoadSprites(void) +void GfxLoadSprites() { DEBUG(sprite, 2, "Loading sprite set %d", _opt.landscape);
--- a/src/gfxinit.h +++ b/src/gfxinit.h @@ -5,7 +5,7 @@ #ifndef GFXINIT_H #define GFXINIT_H -void CheckExternalFiles(void); -void GfxLoadSprites(void); +void CheckExternalFiles(); +void GfxLoadSprites(); #endif /* GFXINIT_H */
--- a/src/graph_gui.cpp +++ b/src/graph_gui.cpp @@ -316,7 +316,7 @@ GraphLegendWndProc }; -static void ShowGraphLegend(void) +static void ShowGraphLegend() { AllocateWindowDescFront(&_graph_legend_desc, 0); } @@ -415,7 +415,7 @@ }; -void ShowOperatingProfitGraph(void) +void ShowOperatingProfitGraph() { if (AllocateWindowDescFront(&_operating_profit_desc, 0)) { InvalidateWindow(WC_GRAPH_LEGEND, 0); @@ -483,7 +483,7 @@ IncomeGraphWndProc }; -void ShowIncomeGraph(void) +void ShowIncomeGraph() { if (AllocateWindowDescFront(&_income_graph_desc, 0)) { InvalidateWindow(WC_GRAPH_LEGEND, 0); @@ -550,7 +550,7 @@ DeliveredCargoGraphWndProc }; -void ShowDeliveredCargoGraph(void) +void ShowDeliveredCargoGraph() { if (AllocateWindowDescFront(&_delivered_cargo_graph_desc, 0)) { InvalidateWindow(WC_GRAPH_LEGEND, 0); @@ -619,7 +619,7 @@ PerformanceHistoryWndProc }; -void ShowPerformanceHistoryGraph(void) +void ShowPerformanceHistoryGraph() { if (AllocateWindowDescFront(&_performance_history_desc, 0)) { InvalidateWindow(WC_GRAPH_LEGEND, 0); @@ -686,7 +686,7 @@ CompanyValueGraphWndProc }; -void ShowCompanyValueGraph(void) +void ShowCompanyValueGraph() { if (AllocateWindowDescFront(&_company_value_graph_desc, 0)) { InvalidateWindow(WC_GRAPH_LEGEND, 0); @@ -784,7 +784,7 @@ }; -void ShowCargoPaymentRates(void) +void ShowCargoPaymentRates() { Window *w = AllocateWindowDescFront(&_cargo_payment_rates_desc, 0); if (w == NULL) return; @@ -905,7 +905,7 @@ CompanyLeagueWndProc }; -void ShowCompanyLeagueTable(void) +void ShowCompanyLeagueTable() { AllocateWindowDescFront(&_company_league_desc,0); } @@ -1144,7 +1144,7 @@ PerformanceRatingDetailWndProc }; -void ShowPerformanceRatingDetail(void) +void ShowPerformanceRatingDetail() { AllocateWindowDescFront(&_performance_rating_detail_desc, 0); }
--- a/src/gui.h +++ b/src/gui.h @@ -10,31 +10,31 @@ #include "string.h" /* main_gui.cpp */ -void SetupColorsAndInitialWindow(void); +void SetupColorsAndInitialWindow(); void CcPlaySound10(bool success, TileIndex tile, uint32 p1, uint32 p2); void CcBuildCanal(bool success, TileIndex tile, uint32 p1, uint32 p2); void CcTerraform(bool success, TileIndex tile, uint32 p1, uint32 p2); /* settings_gui.cpp */ -void ShowGameOptions(void); -void ShowGameDifficulty(void); -void ShowPatchesSelection(void); +void ShowGameOptions(); +void ShowGameDifficulty(); +void ShowPatchesSelection(); void DrawArrowButtons(int x, int y, int ctab, byte state, bool clickable_left, bool clickable_right); /* graph_gui.cpp */ -void ShowOperatingProfitGraph(void); -void ShowIncomeGraph(void); -void ShowDeliveredCargoGraph(void); -void ShowPerformanceHistoryGraph(void); -void ShowCompanyValueGraph(void); -void ShowCargoPaymentRates(void); -void ShowCompanyLeagueTable(void); -void ShowPerformanceRatingDetail(void); +void ShowOperatingProfitGraph(); +void ShowIncomeGraph(); +void ShowDeliveredCargoGraph(); +void ShowPerformanceHistoryGraph(); +void ShowCompanyValueGraph(); +void ShowCargoPaymentRates(); +void ShowCompanyLeagueTable(); +void ShowPerformanceRatingDetail(); /* news_gui.cpp */ -void ShowLastNewsMessage(void); -void ShowMessageOptions(void); -void ShowMessageHistory(void); +void ShowLastNewsMessage(); +void ShowMessageOptions(); +void ShowMessageHistory(); /* rail_gui.cpp */ void ShowBuildRailToolbar(RailType railtype, int button); @@ -46,23 +46,23 @@ void ShowOrdersWindow(const Vehicle *v); /* road_gui.cpp */ -void ShowBuildRoadToolbar(void); -void ShowBuildRoadScenToolbar(void); +void ShowBuildRoadToolbar(); +void ShowBuildRoadScenToolbar(); void ShowRoadVehViewWindow(const Vehicle *v); /* dock_gui.cpp */ -void ShowBuildDocksToolbar(void); +void ShowBuildDocksToolbar(); void ShowShipViewWindow(const Vehicle *v); /* aircraft_gui.cpp */ -void ShowBuildAirToolbar(void); +void ShowBuildAirToolbar(); /* terraform_gui.cpp */ void ShowTerraformToolbar(Window *link = NULL); /* tgp_gui.cpp */ -void ShowGenerateLandscape(void); -void ShowHeightmapLoad(void); +void ShowGenerateLandscape(); +void ShowHeightmapLoad(); void PlaceProc_DemolishArea(TileIndex tile); void PlaceProc_LevelLand(TileIndex tile); @@ -78,13 +78,13 @@ }; /* misc_gui.cpp */ -void PlaceLandBlockInfo(void); -void ShowAboutWindow(void); -void ShowBuildTreesToolbar(void); -void ShowBuildTreesScenToolbar(void); -void ShowTownDirectory(void); -void ShowIndustryDirectory(void); -void ShowSubsidiesList(void); +void PlaceLandBlockInfo(); +void ShowAboutWindow(); +void ShowBuildTreesToolbar(); +void ShowBuildTreesScenToolbar(); +void ShowTownDirectory(); +void ShowIndustryDirectory(); +void ShowSubsidiesList(); void ShowPlayerStations(PlayerID player); void ShowPlayerFinances(PlayerID player); void ShowPlayerCompany(PlayerID player); @@ -95,13 +95,13 @@ void DrawStationCoverageAreaText(int sx, int sy, uint mask,int rad); void CheckRedrawStationCoverage(const Window *w); -void ShowSmallMap(void); -void ShowExtraViewPortWindow(void); +void ShowSmallMap(); +void ShowExtraViewPortWindow(); void SetVScrollCount(Window *w, int num); void SetVScroll2Count(Window *w, int num); void SetHScrollCount(Window *w, int num); -void ShowCheatWindow(void); +void ShowCheatWindow(); void DrawEditBox(Window *w, querystr_d *string, int wid); void HandleEditBox(Window *w, querystr_d *string, int wid); @@ -116,7 +116,7 @@ void InitializeTextBuffer(Textbuf *tb, const char *buf, uint16 maxlength, uint16 maxwidth); void UpdateTextBufferSize(Textbuf *tb); -void BuildFileList(void); +void BuildFileList(); void SetFiosType(const byte fiostype); /* FIOS_TYPE_FILE, FIOS_TYPE_OLDFILE etc. different colours */ @@ -125,10 +125,10 @@ /* bridge_gui.cpp */ void ShowBuildBridgeWindow(uint start, uint end, byte type); -void ShowBuildIndustryWindow(void); +void ShowBuildIndustryWindow(); void ShowQueryString(StringID str, StringID caption, uint maxlen, uint maxwidth, Window *parent, CharSetFilter afilter); void ShowQuery(StringID caption, StringID message, Window *w, void (*callback)(Window*, bool)); -void ShowMusicWindow(void); +void ShowMusicWindow(); /* main_gui.cpp */ void HandleOnEditText(const char *str); @@ -136,6 +136,6 @@ VARDEF PlaceProc *_place_proc; /* vehicle_gui.cpp */ -void InitializeGUI(void); +void InitializeGUI(); #endif /* GUI_H */
--- a/src/hal.h +++ b/src/hal.h @@ -7,30 +7,30 @@ typedef struct { const char *(*start)(const char * const *parm); - void (*stop)(void); + void (*stop)(); } HalCommonDriver; typedef struct { const char *(*start)(const char * const *parm); - void (*stop)(void); + void (*stop)(); void (*make_dirty)(int left, int top, int width, int height); - void (*main_loop)(void); + void (*main_loop)(); bool (*change_resolution)(int w, int h); void (*toggle_fullscreen)(bool fullscreen); } HalVideoDriver; typedef struct { const char *(*start)(const char * const *parm); - void (*stop)(void); + void (*stop)(); } HalSoundDriver; typedef struct { const char *(*start)(const char * const *parm); - void (*stop)(void); + void (*stop)(); void (*play_song)(const char *filename); - void (*stop_song)(void); - bool (*is_song_playing)(void); + void (*stop_song)(); + bool (*is_song_playing)(); void (*set_volume)(byte vol); } HalMusicDriver;
--- a/src/heightmap.cpp +++ b/src/heightmap.cpp @@ -353,7 +353,7 @@ * This function takes care of the fact that land in OpenTTD can never differ * more than 1 in height */ -static void FixSlopes(void) +static void FixSlopes() { uint width, height; uint row, col;
--- a/src/industry.h +++ b/src/industry.h @@ -111,7 +111,7 @@ VARDEF int _total_industries; //general counter -static inline IndustryID GetMaxIndustryIndex(void) +static inline IndustryID GetMaxIndustryIndex() { /* TODO - This isn't the real content of the function, but * with the new pool-system this will be replaced with one that @@ -121,7 +121,7 @@ return GetIndustryPoolSize() - 1; } -static inline uint GetNumIndustries(void) +static inline uint GetNumIndustries() { return _total_industries; } @@ -129,7 +129,7 @@ /** * Return a random valid industry. */ -static inline Industry *GetRandomIndustry(void) +static inline Industry *GetRandomIndustry() { int num = RandomRange(GetNumIndustries()); IndustryID index = INVALID_INDUSTRY;
--- a/src/industry_cmd.cpp +++ b/src/industry_cmd.cpp @@ -985,7 +985,7 @@ } } -void OnTick_Industry(void) +void OnTick_Industry() { Industry *i; @@ -1355,7 +1355,7 @@ return true; } -static Industry *AllocateIndustry(void) +static Industry *AllocateIndustry() { Industry *i; @@ -1582,7 +1582,7 @@ } } -void GenerateIndustries(void) +void GenerateIndustries() { const byte *b; uint i = 0; @@ -1824,7 +1824,7 @@ } } -void IndustryMonthlyLoop(void) +void IndustryMonthlyLoop() { Industry *i; PlayerID old_player = _current_player; @@ -1850,7 +1850,7 @@ } -void InitializeIndustries(void) +void InitializeIndustries() { CleanPool(&_Industry_pool); AddBlockToPool(&_Industry_pool); @@ -1908,7 +1908,7 @@ SLE_END() }; -static void Save_INDY(void) +static void Save_INDY() { Industry *ind; @@ -1919,7 +1919,7 @@ } } -static void Load_INDY(void) +static void Load_INDY() { int index;
--- a/src/industry_gui.cpp +++ b/src/industry_gui.cpp @@ -271,7 +271,7 @@ }, }; -void ShowBuildIndustryWindow(void) +void ShowBuildIndustryWindow() { if (!IsValidPlayer(_current_player)) return; AllocateWindowDescFront(_industry_window_desc[_patches.build_rawmaterial_ind][_opt_ptr->landscape],0); @@ -561,7 +561,7 @@ * starts a new game without industries after playing a game with industries * the list is not populated with invalid industries from the previous game. */ -static void MakeSortedIndustryList(void) +static void MakeSortedIndustryList() { const Industry* i; int n = 0; @@ -690,7 +690,7 @@ }; -void ShowIndustryDirectory(void) +void ShowIndustryDirectory() { Window *w = AllocateWindowDescFront(&_industry_directory_desc, 0);
--- a/src/intro_gui.cpp +++ b/src/intro_gui.cpp @@ -99,7 +99,7 @@ SelectGameWndProc }; -void ShowSelectGameWindow(void) +void ShowSelectGameWindow() { AllocateWindowDesc(&_select_game_desc); } @@ -109,7 +109,7 @@ if (confirmed) _exit_game = true; } -void AskExitGame(void) +void AskExitGame() { #if defined(_WIN32) SetDParam(0, STR_0133_WINDOWS); @@ -142,7 +142,7 @@ if (confirmed) _switch_mode = SM_MENU; } -void AskExitToGameMenu(void) +void AskExitToGameMenu() { ShowQuery( STR_0161_QUIT_GAME,
--- a/src/landscape.cpp +++ b/src/landscape.cpp @@ -379,7 +379,7 @@ #define TILELOOP_ASSERTMASK ((TILELOOP_SIZE-1) + ((TILELOOP_SIZE-1) << MapLogX())) #define TILELOOP_CHKMASK (((1 << (MapLogX() - TILELOOP_BITS))-1) << TILELOOP_BITS) -void RunTileLoop(void) +void RunTileLoop() { TileIndex tile; uint count; @@ -405,7 +405,7 @@ _cur_tileloop_tile = tile; } -void InitializeLandscape(void) +void InitializeLandscape() { uint maxx = MapMaxX(); uint maxy = MapMaxY(); @@ -425,7 +425,7 @@ for (x = 0; x < sizex; x++) MakeVoid(sizex * y + x); } -void ConvertGroundTilesIntoWaterTiles(void) +void ConvertGroundTilesIntoWaterTiles() { TileIndex tile; uint z; @@ -587,7 +587,7 @@ #include "table/genland.h" -static void CreateDesertOrRainForest(void) +static void CreateDesertOrRainForest() { TileIndex tile; TileIndex update_freq = MapSize() / 4; @@ -697,15 +697,15 @@ if (_opt.landscape == LT_DESERT) CreateDesertOrRainForest(); } -void OnTick_Town(void); -void OnTick_Trees(void); -void OnTick_Station(void); -void OnTick_Industry(void); +void OnTick_Town(); +void OnTick_Trees(); +void OnTick_Station(); +void OnTick_Industry(); -void OnTick_Players(void); -void OnTick_Train(void); +void OnTick_Players(); +void OnTick_Train(); -void CallLandscapeTick(void) +void CallLandscapeTick() { OnTick_Town(); OnTick_Trees();
--- a/src/lzoconf.h +++ b/src/lzoconf.h @@ -29,8 +29,7 @@ 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. Markus F.X.J. Oberhumer - <markus@oberhumer.com> - http://www.oberhumer.com/opensource/lzo/ + <markus@oberhumer.com> http://www.oberhumer.com/opensource/lzo/ */ @@ -407,11 +406,11 @@ LZO_EXTERN(int) __lzo_init2(unsigned,int,int,int,int,int,int,int,int,int); /* version functions (useful for shared libraries) */ -LZO_EXTERN(unsigned) lzo_version(void); -LZO_EXTERN(const char *) lzo_version_string(void); -LZO_EXTERN(const char *) lzo_version_date(void); -LZO_EXTERN(const lzo_charp) _lzo_version_string(void); -LZO_EXTERN(const lzo_charp) _lzo_version_date(void); +LZO_EXTERN(unsigned) lzo_version(); +LZO_EXTERN(const char *) lzo_version_string(); +LZO_EXTERN(const char *) lzo_version_date(); +LZO_EXTERN(const lzo_charp) _lzo_version_string(); +LZO_EXTERN(const lzo_charp) _lzo_version_date(); /* string functions */ LZO_EXTERN(int) @@ -431,7 +430,7 @@ /* misc. */ LZO_EXTERN(lzo_bool) lzo_assert(int _expr); -LZO_EXTERN(int) _lzo_config_check(void); +LZO_EXTERN(int) _lzo_config_check(); typedef union { lzo_bytep p; lzo_uint u; } __lzo_pu_u; typedef union { lzo_bytep p; lzo_uint32 u32; } __lzo_pu32_u; typedef union { void *vp; lzo_bytep bp; lzo_uint32 u32; long l; } lzo_align_t;
--- a/src/main_gui.cpp +++ b/src/main_gui.cpp @@ -52,8 +52,8 @@ RailType _last_built_railtype; static int _scengen_town_size = 2; // depress medium-sized towns per default -extern void GenerateIndustries(void); -extern bool GenerateTowns(void); +extern void GenerateIndustries(); +extern bool GenerateTowns(); void HandleOnEditText(const char *str) @@ -337,7 +337,7 @@ ShowQueryString(STR_WAYPOINT_RAW, STR_EDIT_WAYPOINT_NAME, 30, 180, NULL, CS_ALPHANUMERAL); } -static void SelectSignTool(void) +static void SelectSignTool() { if (_cursor.sprite == SPR_CURSOR_SIGN) { ResetObjectToPlace(); @@ -370,12 +370,12 @@ } } -static void MenuClickSmallScreenshot(void) +static void MenuClickSmallScreenshot() { SetScreenshotType(SC_VIEWPORT); } -static void MenuClickWorldScreenshot(void) +static void MenuClickWorldScreenshot() { SetScreenshotType(SC_WORLD); } @@ -1379,7 +1379,7 @@ ScenEditLandGenWndProc, }; -static inline void ShowEditorTerraformToolBar(void) +static inline void ShowEditorTerraformToolBar() { AllocateWindowDescFront(&_scen_edit_land_gen_desc, 0); } @@ -1593,7 +1593,7 @@ }; -static bool AnyTownExists(void) +static bool AnyTownExists() { const Town *t; @@ -2235,7 +2235,7 @@ StatusBarWndProc }; -extern void UpdateAllStationVirtCoord(void); +extern void UpdateAllStationVirtCoord(); static void MainWindowWndProc(Window *w, WindowEvent *e) { @@ -2401,9 +2401,9 @@ } -void ShowSelectGameWindow(void); - -void SetupColorsAndInitialWindow(void) +void ShowSelectGameWindow(); + +void SetupColorsAndInitialWindow() { uint i; Window *w; @@ -2436,7 +2436,7 @@ } } -void ShowVitalWindows(void) +void ShowVitalWindows() { Window *w; @@ -2461,7 +2461,7 @@ WP(w,def_d).data_1 = -1280; } -void GameSizeChanged(void) +void GameSizeChanged() { _cur_resolution[0] = _screen.width; _cur_resolution[1] = _screen.height; @@ -2470,7 +2470,7 @@ MarkWholeScreenDirty(); } -void InitializeMainGui(void) +void InitializeMainGui() { /* Clean old GUI values */ _last_built_railtype = RAILTYPE_RAIL;
--- a/src/map.h +++ b/src/map.h @@ -33,15 +33,15 @@ void AllocateMap(uint size_x, uint size_y); /* binary logarithm of the map size, try to avoid using this one */ -static inline uint MapLogX(void) { return _map_log_x; } +static inline uint MapLogX() { return _map_log_x; } /* The size of the map */ -static inline uint MapSizeX(void) { return _map_size_x; } -static inline uint MapSizeY(void) { return _map_size_y; } +static inline uint MapSizeX() { return _map_size_x; } +static inline uint MapSizeY() { return _map_size_y; } /* The maximum coordinates */ -static inline uint MapMaxX(void) { return _map_size_x - 1; } -static inline uint MapMaxY(void) { return _map_size_y - 1; } +static inline uint MapMaxX() { return _map_size_x - 1; } +static inline uint MapMaxY() { return _map_size_y - 1; } /* The number of tiles in the map */ -static inline uint MapSize(void) { return _map_size; } +static inline uint MapSize() { return _map_size; } /* Scale a number relative to the map size */ uint ScaleByMapSize(uint); // Scale relative to the number of tiles
--- a/src/mersenne.cpp +++ b/src/mersenne.cpp @@ -32,7 +32,7 @@ } -static uint32 ReloadMT(void) +static uint32 ReloadMT() { register uint32 *p0=_mt_state, *p2=_mt_state+2, *pM=_mt_state+M, s0, s1; register int j; @@ -56,7 +56,7 @@ } -uint32 RandomMT(void) +uint32 RandomMT() { uint32 y;
--- a/src/minilzo.cpp +++ b/src/minilzo.cpp @@ -270,7 +270,7 @@ __LZO_EXTERN_C int __lzo_init_done; __LZO_EXTERN_C const lzo_byte __lzo_copyright[]; -LZO_EXTERN(const lzo_byte *) lzo_copyright(void); +LZO_EXTERN(const lzo_byte *) lzo_copyright(); __LZO_EXTERN_C const lzo_uint32 _lzo_crc32_table[256]; #define _LZO_STRINGIZE(x) #x @@ -709,7 +709,7 @@ #define IS_POWER_OF_2(x) (((x) & ((x) - 1)) == 0) -// static lzo_bool schedule_insns_bug(void); +// static lzo_bool schedule_insns_bug(); // static lzo_bool strength_reduce_bug(int *); #if 0 || defined(LZO_DEBUG)
--- a/src/misc.cpp +++ b/src/misc.cpp @@ -29,7 +29,7 @@ #include "network/network_data.h" uint32 DoRandom(int line, const char *file) #else // RANDOM_DEBUG -uint32 Random(void) +uint32 Random() #endif // RANDOM_DEBUG { @@ -61,7 +61,7 @@ #endif -uint32 InteractiveRandom(void) +uint32 InteractiveRandom() { uint32 t = _random_seeds[1][1]; uint32 s = _random_seeds[1][0]; @@ -74,27 +74,27 @@ return GB(InteractiveRandom(), 0, 16) * max >> 16; } -void InitializeVehicles(void); -void InitializeWaypoints(void); -void InitializeDepots(void); -void InitializeEngines(void); -void InitializeOrders(void); -void InitializeClearLand(void); -void InitializeRailGui(void); -void InitializeRoadGui(void); -void InitializeAirportGui(void); -void InitializeDockGui(void); -void InitializeIndustries(void); -void InitializeMainGui(void); -void InitializeLandscape(void); -void InitializeTowns(void); -void InitializeTrees(void); -void InitializeSigns(void); -void InitializeStations(void); -static void InitializeNameMgr(void); -void InitializePlayers(void); -static void InitializeCheats(void); -void InitializeNPF(void); +void InitializeVehicles(); +void InitializeWaypoints(); +void InitializeDepots(); +void InitializeEngines(); +void InitializeOrders(); +void InitializeClearLand(); +void InitializeRailGui(); +void InitializeRoadGui(); +void InitializeAirportGui(); +void InitializeDockGui(); +void InitializeIndustries(); +void InitializeMainGui(); +void InitializeLandscape(); +void InitializeTowns(); +void InitializeTrees(); +void InitializeSigns(); +void InitializeStations(); +static void InitializeNameMgr(); +void InitializePlayers(); +static void InitializeCheats(); +void InitializeNPF(); void InitializeGame(int mode, uint size_x, uint size_y) { @@ -170,13 +170,13 @@ } -static void InitializeCheats(void) +static void InitializeCheats() { memset(&_cheats, 0, sizeof(Cheats)); } -static void InitializeNameMgr(void) +static void InitializeNameMgr() { memset(_name_array, 0, sizeof(_name_array)); } @@ -204,7 +204,7 @@ } } -void ConvertNameArray(void) +void ConvertNameArray() { uint i; @@ -267,7 +267,7 @@ } -static void Save_NAME(void) +static void Save_NAME() { int i; @@ -279,7 +279,7 @@ } } -static void Load_NAME(void) +static void Load_NAME() { int index; @@ -314,7 +314,7 @@ /* Save load date related variables as well as persistent tick counters * XXX: currently some unrelated stuff is just put here */ -static void SaveLoad_DATE(void) +static void SaveLoad_DATE() { SlGlobList(_date_desc); } @@ -329,7 +329,7 @@ SLEG_END() }; -static void SaveLoad_VIEW(void) +static void SaveLoad_VIEW() { SlGlobList(_view_desc); } @@ -343,20 +343,20 @@ SLEG_END() }; -static void Save_MAPS(void) +static void Save_MAPS() { _map_dim_x = MapSizeX(); _map_dim_y = MapSizeY(); SlGlobList(_map_dimensions); } -static void Load_MAPS(void) +static void Load_MAPS() { SlGlobList(_map_dimensions); AllocateMap(_map_dim_x, _map_dim_y); } -static void Load_MAPT(void) +static void Load_MAPT() { uint size = MapSize(); uint i; @@ -370,7 +370,7 @@ } } -static void Save_MAPT(void) +static void Save_MAPT() { uint size = MapSize(); uint i; @@ -385,7 +385,7 @@ } } -static void Load_MAP1(void) +static void Load_MAP1() { uint size = MapSize(); uint i; @@ -399,7 +399,7 @@ } } -static void Save_MAP1(void) +static void Save_MAP1() { uint size = MapSize(); uint i; @@ -414,7 +414,7 @@ } } -static void Load_MAP2(void) +static void Load_MAP2() { uint size = MapSize(); uint i; @@ -431,7 +431,7 @@ } } -static void Save_MAP2(void) +static void Save_MAP2() { uint size = MapSize(); uint i; @@ -446,7 +446,7 @@ } } -static void Load_MAP3(void) +static void Load_MAP3() { uint size = MapSize(); uint i; @@ -460,7 +460,7 @@ } } -static void Save_MAP3(void) +static void Save_MAP3() { uint size = MapSize(); uint i; @@ -475,7 +475,7 @@ } } -static void Load_MAP4(void) +static void Load_MAP4() { uint size = MapSize(); uint i; @@ -489,7 +489,7 @@ } } -static void Save_MAP4(void) +static void Save_MAP4() { uint size = MapSize(); uint i; @@ -504,7 +504,7 @@ } } -static void Load_MAP5(void) +static void Load_MAP5() { uint size = MapSize(); uint i; @@ -518,7 +518,7 @@ } } -static void Save_MAP5(void) +static void Save_MAP5() { uint size = MapSize(); uint i; @@ -533,7 +533,7 @@ } } -static void Load_MAP6(void) +static void Load_MAP6() { /* Still available for loading old games */ uint size = MapSize(); @@ -563,7 +563,7 @@ } } -static void Save_MAP6(void) +static void Save_MAP6() { uint size = MapSize(); uint i; @@ -579,7 +579,7 @@ } -static void Save_CHTS(void) +static void Save_CHTS() { byte count = sizeof(_cheats)/sizeof(Cheat); Cheat* cht = (Cheat*) &_cheats; @@ -592,7 +592,7 @@ } } -static void Load_CHTS(void) +static void Load_CHTS() { Cheat* cht = (Cheat*)&_cheats; uint count = SlGetFieldLength() / 2;
--- a/src/misc/autoptr.hpp +++ b/src/misc/autoptr.hpp @@ -1,4 +1,4 @@ -/* $Id:$ */ +/* $Id$ */ #ifndef AUTOPTR_HPP #define AUTOPTR_HPP
--- a/src/misc_gui.cpp +++ b/src/misc_gui.cpp @@ -191,7 +191,7 @@ #undef LANDINFOD_LEVEL } -void PlaceLandBlockInfo(void) +void PlaceLandBlockInfo() { if (_cursor.sprite == SPR_CURSOR_QUERY) { ResetObjectToPlace(); @@ -305,7 +305,7 @@ }; -void ShowAboutWindow(void) +void ShowAboutWindow() { DeleteWindowById(WC_GAME_OPTIONS, 0); AllocateWindowDesc(&_about_desc); @@ -466,13 +466,13 @@ }; -void ShowBuildTreesToolbar(void) +void ShowBuildTreesToolbar() { if (!IsValidPlayer(_current_player)) return; AllocateWindowDescFront(&_build_trees_desc, 0); } -void ShowBuildTreesScenToolbar(void) +void ShowBuildTreesScenToolbar() { AllocateWindowDescFront(&_build_trees_scen_desc, 0); } @@ -1330,7 +1330,7 @@ /* Colors for fios types */ const byte _fios_colors[] = {13, 9, 9, 6, 5, 6, 5, 6, 6, 8}; -void BuildFileList(void) +void BuildFileList() { _fios_path_changed = true; FiosFreeSavegameList(); @@ -1363,7 +1363,7 @@ DoDrawStringTruncated(path, 2, 27, 16, maxw); } -static void MakeSortedSaveGameList(void) +static void MakeSortedSaveGameList() { uint sort_start = 0; uint sort_end = 0; @@ -1387,7 +1387,7 @@ qsort(_fios_list + sort_start, s_amount, sizeof(FiosItem), compare_FiosItems); } -static void GenerateFileName(void) +static void GenerateFileName() { /* Check if we are not a specatator who wants to generate a name.. Let's use the name of player #0 for now. */ @@ -1399,7 +1399,7 @@ GetString(_edit_str_buf, STR_4004, lastof(_edit_str_buf)); } -extern void StartupEngines(void); +extern void StartupEngines(); static void SaveLoadDlgWndProc(Window *w, WindowEvent *e) { @@ -1663,7 +1663,7 @@ ResetObjectToPlace(); } -void RedrawAutosave(void) +void RedrawAutosave() { SetWindowDirty(FindWindowById(WC_STATUS_BAR, 0)); } @@ -1734,7 +1734,7 @@ return _opt.landscape; } -extern void EnginesMonthlyLoop(void); +extern void EnginesMonthlyLoop(); /** * @param p2 1 (increase) or -1 (decrease) @@ -1929,7 +1929,7 @@ }; -void ShowCheatWindow(void) +void ShowCheatWindow() { DeleteWindowById(WC_CHEATS, 0); AllocateWindowDesc(&_cheats_desc);
--- a/src/mixer.cpp +++ b/src/mixer.cpp @@ -93,7 +93,7 @@ } } -MixerChannel *MxAllocateChannel(void) +MixerChannel *MxAllocateChannel() { MixerChannel *mc; for (mc = _channels; mc != endof(_channels); mc++)
--- a/src/mixer.h +++ b/src/mixer.h @@ -17,7 +17,7 @@ bool MxInitialize(uint rate); void MxMixSamples(void* buffer, uint samples); -MixerChannel* MxAllocateChannel(void); +MixerChannel* MxAllocateChannel(); void MxSetChannelRawSrc(MixerChannel *mc, int8 *mem, uint size, uint rate, uint flags); void MxSetChannelVolume(MixerChannel *mc, uint left, uint right); void MxActivateChannel(MixerChannel*);
--- a/src/music/bemidi.cpp +++ b/src/music/bemidi.cpp @@ -14,7 +14,7 @@ return NULL; } -static void bemidi_stop(void) +static void bemidi_stop() { midiSynthFile.UnloadFile(); } @@ -28,12 +28,12 @@ midiSynthFile.Start(); } -static void bemidi_stop_song(void) +static void bemidi_stop_song() { midiSynthFile.UnloadFile(); } -static bool bemidi_is_playing(void) +static bool bemidi_is_playing() { return !midiSynthFile.IsFinished(); }
--- a/src/music/dmusic.cpp +++ b/src/music/dmusic.cpp @@ -107,7 +107,7 @@ } -static void DMusicMidiStop(void) +static void DMusicMidiStop() { seeking = false; @@ -186,7 +186,7 @@ } -static void DMusicMidiStopSong(void) +static void DMusicMidiStopSong() { if (FAILED(performance->Stop(segment, NULL, 0, 0))) { DEBUG(driver, 0, "DirectMusic: StopSegment failed"); @@ -195,7 +195,7 @@ } -static bool DMusicMidiIsSongPlaying(void) +static bool DMusicMidiIsSongPlaying() { /* Not the nicest code, but there is a short delay before playing actually * starts. OpenTTD makes no provision for this. */
--- a/src/music/extmidi.cpp +++ b/src/music/extmidi.cpp @@ -21,8 +21,8 @@ pid_t pid; } _midi; -static void DoPlay(void); -static void DoStop(void); +static void DoPlay(); +static void DoStop(); static const char* ExtMidiStart(const char* const * parm) { @@ -31,7 +31,7 @@ return NULL; } -static void ExtMidiStop(void) +static void ExtMidiStop() { _midi.song[0] = '\0'; DoStop(); @@ -43,13 +43,13 @@ DoStop(); } -static void ExtMidiStopSong(void) +static void ExtMidiStopSong() { _midi.song[0] = '\0'; DoStop(); } -static bool ExtMidiIsPlaying(void) +static bool ExtMidiIsPlaying() { if (_midi.pid != -1 && waitpid(_midi.pid, NULL, WNOHANG) == _midi.pid) _midi.pid = -1; @@ -62,7 +62,7 @@ DEBUG(driver, 1, "extmidi: set volume not implemented"); } -static void DoPlay(void) +static void DoPlay() { _midi.pid = fork(); switch (_midi.pid) { @@ -91,7 +91,7 @@ } } -static void DoStop(void) +static void DoStop() { if (_midi.pid != -1) kill(_midi.pid, SIGTERM); }
--- a/src/music/libtimidity.cpp +++ b/src/music/libtimidity.cpp @@ -77,7 +77,7 @@ return NULL; } -static void LibtimidityMidiStop(void) +static void LibtimidityMidiStop() { if (_midi.status == MIDI_PLAYING) { _midi.status = MIDI_STOPPED; @@ -107,13 +107,13 @@ _midi.status = MIDI_PLAYING; } -static void LibtimidityMidiStopSong(void) +static void LibtimidityMidiStopSong() { _midi.status = MIDI_STOPPED; mid_song_free(_midi.song); } -static bool LibtimidityMidiIsPlaying(void) +static bool LibtimidityMidiIsPlaying() { if (_midi.status == MIDI_PLAYING) { _midi.song_position = mid_song_get_time(_midi.song);
--- a/src/music/null_m.cpp +++ b/src/music/null_m.cpp @@ -4,10 +4,10 @@ #include "null_m.h" static const char* NullMidiStart(const char* const* parm) { return NULL; } -static void NullMidiStop(void) {} +static void NullMidiStop() {} static void NullMidiPlaySong(const char *filename) {} -static void NullMidiStopSong(void) {} -static bool NullMidiIsSongPlaying(void) { return true; } +static void NullMidiStopSong() {} +static bool NullMidiIsSongPlaying() { return true; } static void NullMidiSetVolume(byte vol) {} const HalMusicDriver _null_music_driver = {
--- a/src/music/os2_m.cpp +++ b/src/music/os2_m.cpp @@ -40,7 +40,7 @@ MidiSendCommand("play song from 0"); } -static void OS2MidiStopSong(void) +static void OS2MidiStopSong() { MidiSendCommand("close all"); } @@ -50,7 +50,7 @@ MidiSendCommand("set song audio volume %d", ((vol/127)*100)); } -static bool OS2MidiIsSongPlaying(void) +static bool OS2MidiIsSongPlaying() { char buf[16]; mciSendString("status song mode", buf, sizeof(buf), NULL, 0); @@ -62,7 +62,7 @@ return 0; } -static void OS2MidiStop(void) +static void OS2MidiStop() { MidiSendCommand("close all"); }
--- a/src/music/qtmidi.cpp +++ b/src/music/qtmidi.cpp @@ -173,7 +173,7 @@ * #_quicktime_started flag to @c true if QuickTime is present in the system * and it was initialized properly. */ -static void InitQuickTimeIfNeeded(void) +static void InitQuickTimeIfNeeded() { OSStatus dummy; @@ -207,7 +207,7 @@ #define VOLUME ((short)((0x00FF & _quicktime_volume) << 1)) -static void StopSong(void); +static void StopSong(); /** @@ -230,7 +230,7 @@ * This function is called at regular intervals from OpenTTD's main loop, so * we call @c MoviesTask() from here to let QuickTime do its work. */ -static bool SongIsPlaying(void) +static bool SongIsPlaying() { if (!_quicktime_started) return true; @@ -258,7 +258,7 @@ * Stops playing and frees any used resources before returning. As it * deinitilizes QuickTime, the #_quicktime_started flag is set to @c false. */ -static void StopDriver(void) +static void StopDriver() { if (!_quicktime_started) return; @@ -312,7 +312,7 @@ /** * Stops playing the current song, if the player is active. */ -static void StopSong(void) +static void StopSong() { if (!_quicktime_started) return;
--- a/src/music/win32_m.cpp +++ b/src/music/win32_m.cpp @@ -23,7 +23,7 @@ SetEvent(_midi.wait_obj); } -static void Win32MidiStopSong(void) +static void Win32MidiStopSong() { if (_midi.playing) { _midi.stop_song = true; @@ -32,7 +32,7 @@ } } -static bool Win32MidiIsSongPlaying(void) +static bool Win32MidiIsSongPlaying() { return _midi.playing; } @@ -62,7 +62,7 @@ return MidiSendCommand("play song from 0") == 0; } -static void MidiIntStopSong(void) +static void MidiIntStopSong() { MidiSendCommand("close all"); } @@ -73,7 +73,7 @@ midiOutSetVolume((HMIDIOUT)_midi.devid, v + (v << 16)); } -static bool MidiIntIsSongPlaying(void) +static bool MidiIntIsSongPlaying() { char buf[16]; mciSendStringA("status song mode", buf, sizeof(buf), 0); @@ -146,7 +146,7 @@ return NULL; } -static void Win32MidiStop(void) +static void Win32MidiStop() { _midi.terminate = true; SetEvent(_midi.wait_obj);
--- a/src/music_gui.cpp +++ b/src/music_gui.cpp @@ -46,7 +46,7 @@ msf.custom_2, }; -static void SkipToPrevSong(void) +static void SkipToPrevSong() { byte *b = _cur_playlist; byte *p = b; @@ -66,7 +66,7 @@ _song_is_active = false; } -static void SkipToNextSong(void) +static void SkipToNextSong() { byte* b = _cur_playlist; byte t; @@ -88,7 +88,7 @@ _music_driver->set_volume(new_vol); } -static void DoPlaySong(void) +static void DoPlaySong() { char filename[256]; snprintf(filename, sizeof(filename), "%s%s", @@ -96,12 +96,12 @@ _music_driver->play_song(filename); } -static void DoStopMusic(void) +static void DoStopMusic() { _music_driver->stop_song(); } -static void SelectSongToPlay(void) +static void SelectSongToPlay() { uint i = 0; uint j = 0; @@ -138,7 +138,7 @@ } } -static void StopMusic(void) +static void StopMusic() { _music_wnd_cursong = 0; DoStopMusic(); @@ -146,7 +146,7 @@ InvalidateWindowWidget(WC_MUSIC_WINDOW, 0, 9); } -static void PlayPlaylistSong(void) +static void PlayPlaylistSong() { if (_cur_playlist[0] == 0) { SelectSongToPlay(); @@ -167,13 +167,13 @@ InvalidateWindowWidget(WC_MUSIC_WINDOW, 0, 9); } -void ResetMusic(void) +void ResetMusic() { _music_wnd_cursong = 1; DoPlaySong(); } -void MusicLoop(void) +void MusicLoop() { if (!msf.playing && _song_is_active) { StopMusic(); @@ -333,7 +333,7 @@ MusicTrackSelectionWndProc }; -static void ShowMusicTrackSelection(void) +static void ShowMusicTrackSelection() { AllocateWindowDescFront(&_music_track_selection_desc, 0); } @@ -501,7 +501,7 @@ MusicWindowWndProc }; -void ShowMusicWindow(void) +void ShowMusicWindow() { AllocateWindowDescFront(&_music_window_desc, 0); }
--- a/src/network/core/core.cpp +++ b/src/network/core/core.cpp @@ -21,7 +21,7 @@ * Initializes the network core (as that is needed for some platforms * @return true if the core has been initialized, false otherwise */ -bool NetworkCoreInitialize(void) +bool NetworkCoreInitialize() { #if defined(__MORPHOS__) || defined(__AMIGA__) /* @@ -72,7 +72,7 @@ /** * Shuts down the network core (as that is needed for some platforms */ -void NetworkCoreShutdown(void) +void NetworkCoreShutdown() { #if defined(__MORPHOS__) || defined(__AMIGA__) /* free allocated resources */
--- a/src/network/core/core.h +++ b/src/network/core/core.h @@ -12,8 +12,8 @@ #include "os_abstraction.h" #include "../../newgrf_config.h" -bool NetworkCoreInitialize(void); -void NetworkCoreShutdown(void); +bool NetworkCoreInitialize(); +void NetworkCoreShutdown(); /** Status of a network client; reasons why a client has quit */ typedef enum {
--- a/src/network/core/packet.cpp +++ b/src/network/core/packet.cpp @@ -63,7 +63,7 @@ /** * Writes the packet size from the raw packet from packet->size */ -void Packet::PrepareToSend(void) +void Packet::PrepareToSend() { assert(this->cs == NULL && this->next == NULL); @@ -163,7 +163,7 @@ /** * Reads the packet size from the raw packet and stores it in the packet->size */ -void Packet::ReadRawPacketSize(void) +void Packet::ReadRawPacketSize() { assert(this->cs != NULL && this->next == NULL); this->size = (PacketSize)this->buffer[0]; @@ -173,7 +173,7 @@ /** * Prepares the packet so it can be read */ -void Packet::PrepareToRead(void) +void Packet::PrepareToRead() { this->ReadRawPacketSize(); @@ -181,12 +181,12 @@ this->pos = sizeof(PacketSize); } -bool Packet::Recv_bool(void) +bool Packet::Recv_bool() { return this->Recv_uint8() != 0; } -uint8 Packet::Recv_uint8(void) +uint8 Packet::Recv_uint8() { uint8 n; @@ -196,7 +196,7 @@ return n; } -uint16 Packet::Recv_uint16(void) +uint16 Packet::Recv_uint16() { uint16 n; @@ -207,7 +207,7 @@ return n; } -uint32 Packet::Recv_uint32(void) +uint32 Packet::Recv_uint32() { uint32 n; @@ -220,7 +220,7 @@ return n; } -uint64 Packet::Recv_uint64(void) +uint64 Packet::Recv_uint64() { uint64 n;
--- a/src/network/core/packet.h +++ b/src/network/core/packet.h @@ -43,7 +43,7 @@ Packet(PacketType type); /* Sending/writing of packets */ - void PrepareToSend(void); + void PrepareToSend(); void Send_bool (bool data); void Send_uint8 (uint8 data); @@ -53,15 +53,15 @@ void Send_string(const char* data); /* Reading/receiving of packets */ - void ReadRawPacketSize(void); - void PrepareToRead(void); + void ReadRawPacketSize(); + void PrepareToRead(); bool CanReadFromPacket (uint bytes_to_read); - bool Recv_bool (void); - uint8 Recv_uint8 (void); - uint16 Recv_uint16(void); - uint32 Recv_uint32(void); - uint64 Recv_uint64(void); + bool Recv_bool (); + uint8 Recv_uint8 (); + uint16 Recv_uint16(); + uint32 Recv_uint32(); + uint64 Recv_uint64(); void Recv_string(char* buffer, size_t size); };
--- a/src/network/network.cpp +++ b/src/network/network.cpp @@ -63,7 +63,7 @@ static uint16 _network_client_index = NETWORK_SERVER_INDEX + 1; /* Some externs / forwards */ -extern void StateGameLoop(void); +extern void StateGameLoop(); // Function that looks up the CI for a given client-index NetworkClientInfo *NetworkFindClientInfoFromIndex(uint16 client_index) @@ -117,7 +117,7 @@ } } -byte NetworkSpectatorCount(void) +byte NetworkSpectatorCount() { NetworkTCPSocketHandler *cs; byte count = 0; @@ -301,7 +301,7 @@ } /* Count the number of active clients connected */ -static uint NetworkCountPlayers(void) +static uint NetworkCountPlayers() { NetworkTCPSocketHandler *cs; uint count = 0; @@ -317,7 +317,7 @@ static bool _min_players_paused = false; /* Check if the minimum number of players has been reached and pause or unpause the game as appropriate */ -void CheckMinPlayers(void) +void CheckMinPlayers() { if (!_network_dedicated) return; @@ -337,7 +337,7 @@ } // Find all IP-aliases for this host -static void NetworkFindIPs(void) +static void NetworkFindIPs() { #if !defined(PSP) int i; @@ -717,7 +717,7 @@ } // For the server, to accept new clients -static void NetworkAcceptClients(void) +static void NetworkAcceptClients() { struct sockaddr_in sin; NetworkTCPSocketHandler *cs; @@ -782,7 +782,7 @@ } // Set up the listen socket for the server -static bool NetworkListen(void) +static bool NetworkListen() { SOCKET ls; struct sockaddr_in sin; @@ -826,7 +826,7 @@ } // Close all current connections -static void NetworkClose(void) +static void NetworkClose() { NetworkTCPSocketHandler *cs; @@ -848,7 +848,7 @@ } // Inits the network (cleans sockets and stuff) -static void NetworkInitialize(void) +static void NetworkInitialize() { NetworkTCPSocketHandler *cs; @@ -921,7 +921,7 @@ /* Generates the list of manually added hosts from NetworkGameList and * dumps them into the array _network_host_list. This array is needed * by the function that generates the config file. */ -void NetworkRebuildHostList(void) +void NetworkRebuildHostList() { uint i = 0; const NetworkGameList *item = _network_game_list; @@ -968,7 +968,7 @@ return _networking; } -static void NetworkInitGameInfo(void) +static void NetworkInitGameInfo() { NetworkClientInfo *ci; @@ -1013,7 +1013,7 @@ ttd_strlcpy(ci->unique_id, _network_unique_id, sizeof(ci->unique_id)); } -bool NetworkServerStart(void) +bool NetworkServerStart() { if (!_network_available) return false; @@ -1060,7 +1060,7 @@ // The server is rebooting... // The only difference with NetworkDisconnect, is the packets that is sent -void NetworkReboot(void) +void NetworkReboot() { if (_network_server) { NetworkTCPSocketHandler *cs; @@ -1084,7 +1084,7 @@ } // We want to disconnect from the host/clients -void NetworkDisconnect(void) +void NetworkDisconnect() { if (_network_server) { NetworkTCPSocketHandler *cs; @@ -1112,7 +1112,7 @@ } // Receives something from the network -static bool NetworkReceive(void) +static bool NetworkReceive() { NetworkTCPSocketHandler *cs; int n; @@ -1167,7 +1167,7 @@ } // This sends all buffered commands (if possible) -static void NetworkSend(void) +static void NetworkSend() { NetworkTCPSocketHandler *cs; FOR_ALL_CLIENTS(cs) { @@ -1183,7 +1183,7 @@ } // Handle the local-command-queue -static void NetworkHandleLocalQueue(void) +static void NetworkHandleLocalQueue() { CommandPacket *cp, **cp_prev; @@ -1218,7 +1218,7 @@ } -static bool NetworkDoClientLoop(void) +static bool NetworkDoClientLoop() { _frame_counter++; @@ -1259,7 +1259,7 @@ } // We have to do some UDP checking -void NetworkUDPGameLoop(void) +void NetworkUDPGameLoop() { if (_network_udp_server) { _udp_server_socket->ReceivePackets(); @@ -1273,7 +1273,7 @@ // The main loop called from ttd.c // Here we also have to do StateGameLoop if needed! -void NetworkGameLoop(void) +void NetworkGameLoop() { if (!_networking) return; @@ -1318,7 +1318,7 @@ NetworkSend(); } -static void NetworkGenerateUniqueId(void) +static void NetworkGenerateUniqueId() { md5_state_t state; md5_byte_t digest[16]; @@ -1372,7 +1372,7 @@ } /** This tries to launch the network for a given OS */ -void NetworkStartUp(void) +void NetworkStartUp() { DEBUG(net, 3, "[core] starting network..."); @@ -1409,7 +1409,7 @@ } /** This shuts the network down */ -void NetworkShutDown(void) +void NetworkShutDown() { NetworkDisconnect(); NetworkUDPShutdown();
--- a/src/network/network.h +++ b/src/network/network.h @@ -153,7 +153,7 @@ void NetworkTCPQueryServer(const char* host, unsigned short port); -byte NetworkSpectatorCount(void); +byte NetworkSpectatorCount(); VARDEF char *_network_host_list[10]; VARDEF char *_network_ban_list[25]; @@ -161,22 +161,22 @@ void ParseConnectionString(const char **player, const char **port, char *connection_string); void NetworkUpdateClientInfo(uint16 client_index); void NetworkAddServer(const char *b); -void NetworkRebuildHostList(void); +void NetworkRebuildHostList(); bool NetworkChangeCompanyPassword(byte argc, char *argv[]); -void NetworkPopulateCompanyInfo(void); +void NetworkPopulateCompanyInfo(); void UpdateNetworkGameWindow(bool unselect); -void CheckMinPlayers(void); +void CheckMinPlayers(); void NetworkStartDebugLog(const char *hostname, uint16 port); -void NetworkStartUp(void); +void NetworkStartUp(); void NetworkUDPCloseAll(); -void NetworkShutDown(void); -void NetworkGameLoop(void); -void NetworkUDPGameLoop(void); -bool NetworkServerStart(void); +void NetworkShutDown(); +void NetworkGameLoop(); +void NetworkUDPGameLoop(); +bool NetworkServerStart(); bool NetworkClientConnectGame(const char *host, uint16 port); -void NetworkReboot(void); -void NetworkDisconnect(void); +void NetworkReboot(); +void NetworkDisconnect(); bool IsNetworkCompatibleVersion(const char *version); @@ -188,8 +188,8 @@ #else /* ENABLE_NETWORK */ /* Network function stubs when networking is disabled */ -static inline void NetworkStartUp(void) {} -static inline void NetworkShutDown(void) {} +static inline void NetworkStartUp() {} +static inline void NetworkShutDown() {} #define _networking 0 #define _network_server 0
--- a/src/network/network_client.cpp +++ b/src/network/network_client.cpp @@ -839,7 +839,7 @@ assert_compile(lengthof(_network_client_packet) == PACKET_END); // Is called after a client is connected to the server -void NetworkClient_Connected(void) +void NetworkClient_Connected() { // Set the frame-counter to 0 so nothing happens till we are ready _frame_counter = 0;
--- a/src/network/network_client.h +++ b/src/network/network_client.h @@ -18,7 +18,7 @@ DEF_CLIENT_SEND_COMMAND_PARAM(PACKET_CLIENT_RCON)(const char *pass, const char *command); NetworkRecvStatus NetworkClient_ReadPackets(NetworkTCPSocketHandler *cs); -void NetworkClient_Connected(void); +void NetworkClient_Connected(); #endif /* ENABLE_NETWORK */
--- a/src/network/network_data.h +++ b/src/network/network_data.h @@ -84,7 +84,7 @@ // Macros to make life a bit more easier #define DEF_CLIENT_RECEIVE_COMMAND(type) NetworkRecvStatus NetworkPacketReceive_ ## type ## _command(Packet *p) -#define DEF_CLIENT_SEND_COMMAND(type) void NetworkPacketSend_ ## type ## _command(void) +#define DEF_CLIENT_SEND_COMMAND(type) void NetworkPacketSend_ ## type ## _command() #define DEF_CLIENT_SEND_COMMAND_PARAM(type) void NetworkPacketSend_ ## type ## _command #define DEF_SERVER_RECEIVE_COMMAND(type) void NetworkPacketReceive_ ## type ## _command(NetworkTCPSocketHandler *cs, Packet *p) #define DEF_SERVER_SEND_COMMAND(type) void NetworkPacketSend_ ## type ## _command(NetworkTCPSocketHandler *cs) @@ -104,7 +104,7 @@ void CDECL NetworkTextMessage(NetworkAction action, uint16 color, bool self_send, const char *name, const char *str, ...); void NetworkGetClientName(char *clientname, size_t size, const NetworkTCPSocketHandler *cs); uint NetworkCalculateLag(const NetworkTCPSocketHandler *cs); -byte NetworkGetCurrentLanguageIndex(void); +byte NetworkGetCurrentLanguageIndex(); NetworkClientInfo *NetworkFindClientInfoFromIndex(uint16 client_index); NetworkClientInfo *NetworkFindClientInfoFromIP(const char *ip); NetworkTCPSocketHandler *NetworkFindClientStateFromIndex(uint16 client_index);
--- a/src/network/network_gamelist.cpp +++ b/src/network/network_gamelist.cpp @@ -89,7 +89,7 @@ }; /** Requeries the (game) servers we have not gotten a reply from */ -void NetworkGameListRequery(void) +void NetworkGameListRequery() { static uint8 requery_cnt = 0;
--- a/src/network/network_gamelist.h +++ b/src/network/network_gamelist.h @@ -19,6 +19,6 @@ NetworkGameList *NetworkGameListAddItem(uint32 ip, uint16 port); void NetworkGameListRemoveItem(NetworkGameList *remove); -void NetworkGameListRequery(void); +void NetworkGameListRequery(); #endif /* NETWORK_GAMELIST_H */
--- a/src/network/network_gui.cpp +++ b/src/network/network_gui.cpp @@ -54,7 +54,7 @@ static char _edit_str_buf[150]; static bool _chat_tab_completion_active; -static void ShowNetworkStartServerWindow(void); +static void ShowNetworkStartServerWindow(); static void ShowNetworkLobbyWindow(NetworkGameList *ngl); extern void SwitchMode(int new_mode); @@ -551,7 +551,7 @@ NetworkGameWindowWndProc, }; -void ShowNetworkGameWindow(void) +void ShowNetworkGameWindow() { static bool first = true; Window *w; @@ -778,7 +778,7 @@ NetworkStartServerWindowWndProc, }; -static void ShowNetworkStartServerWindow(void) +static void ShowNetworkStartServerWindow() { Window *w; DeleteWindowById(WC_NETWORK_WINDOW, 0); @@ -1151,7 +1151,7 @@ } // Finds the amount of actions in the popup and set the height correct -static uint ClientListPopupHeigth(void) { +static uint ClientListPopupHeigth() { int i, num = 0; // Find the amount of actions @@ -1368,7 +1368,7 @@ } } -void ShowClientList(void) +void ShowClientList() { AllocateWindowDescFront(&_client_list_desc, 0); } @@ -1460,7 +1460,7 @@ NetworkJoinStatusWindowWndProc, }; -void ShowJoinStatusWindow(void) +void ShowJoinStatusWindow() { Window *w; DeleteWindowById(WC_NETWORK_STATUS_WINDOW, 0);
--- a/src/network/network_gui.h +++ b/src/network/network_gui.h @@ -10,16 +10,16 @@ void ShowNetworkNeedPassword(NetworkPasswordType npt); void ShowNetworkGiveMoneyWindow(PlayerID player); // PlayerID void ShowNetworkChatQueryWindow(DestType type, byte dest); -void ShowJoinStatusWindow(void); -void ShowNetworkGameWindow(void); -void ShowClientList(void); +void ShowJoinStatusWindow(); +void ShowNetworkGameWindow(); +void ShowClientList(); #else /* ENABLE_NETWORK */ /* Network function stubs when networking is disabled */ static inline void ShowNetworkChatQueryWindow(byte desttype, byte dest) {} -static inline void ShowClientList(void) {} -static inline void ShowNetworkGameWindow(void) {} +static inline void ShowClientList() {} +static inline void ShowNetworkGameWindow() {} #endif /* ENABLE_NETWORK */
--- a/src/network/network_server.cpp +++ b/src/network/network_server.cpp @@ -1228,7 +1228,7 @@ assert_compile(lengthof(_network_server_packet) == PACKET_END); // This update the company_info-stuff -void NetworkPopulateCompanyInfo(void) +void NetworkPopulateCompanyInfo() { char password[NETWORK_PASSWORD_LENGTH]; const Player *p; @@ -1355,7 +1355,7 @@ } /* Check if we want to restart the map */ -static void NetworkCheckRestartMap(void) +static void NetworkCheckRestartMap() { if (_network_restart_game_year != 0 && _cur_year >= _network_restart_game_year) { DEBUG(net, 0, "Auto-restarting map. Year %d reached", _cur_year); @@ -1369,7 +1369,7 @@ 1) If a company is not protected, it is closed after 1 year (for example) 2) If a company is protected, protection is disabled after 3 years (for example) (and item 1. happens a year later) */ -static void NetworkAutoCleanCompanies(void) +static void NetworkAutoCleanCompanies() { NetworkTCPSocketHandler *cs; const NetworkClientInfo *ci; @@ -1564,12 +1564,12 @@ NetworkUDPAdvertise(); } -void NetworkServerYearlyLoop(void) +void NetworkServerYearlyLoop() { NetworkCheckRestartMap(); } -void NetworkServerMonthlyLoop(void) +void NetworkServerMonthlyLoop() { NetworkAutoCleanCompanies(); }
--- a/src/network/network_server.h +++ b/src/network/network_server.h @@ -17,8 +17,8 @@ bool NetworkServer_ReadPackets(NetworkTCPSocketHandler *cs); void NetworkServer_Tick(bool send_frame); -void NetworkServerMonthlyLoop(void); -void NetworkServerYearlyLoop(void); +void NetworkServerMonthlyLoop(); +void NetworkServerYearlyLoop(); static inline const char* GetPlayerIP(const NetworkClientInfo* ci) { @@ -31,8 +31,8 @@ #else /* ENABLE_NETWORK */ /* Network function stubs when networking is disabled */ -static inline void NetworkServerMonthlyLoop(void) {} -static inline void NetworkServerYearlyLoop(void) {} +static inline void NetworkServerMonthlyLoop() {} +static inline void NetworkServerYearlyLoop() {} #endif /* ENABLE_NETWORK */
--- a/src/network/network_udp.cpp +++ b/src/network/network_udp.cpp @@ -402,7 +402,7 @@ } // Close UDP connection -void NetworkUDPCloseAll(void) +void NetworkUDPCloseAll() { DEBUG(net, 1, "[udp] closed listeners"); @@ -435,7 +435,7 @@ // Request the the server-list from the master server -void NetworkUDPQueryMasterServer(void) +void NetworkUDPQueryMasterServer() { struct sockaddr_in out_addr; @@ -458,7 +458,7 @@ } // Find all servers -void NetworkUDPSearchGame(void) +void NetworkUDPSearchGame() { // We are still searching.. if (_network_udp_broadcast > 0) return; @@ -504,7 +504,7 @@ } /* Remove our advertise from the master-server */ -void NetworkUDPRemoveAdvertise(void) +void NetworkUDPRemoveAdvertise() { struct sockaddr_in out_addr; @@ -533,7 +533,7 @@ /* Register us to the master server This function checks if it needs to send an advertise */ -void NetworkUDPAdvertise(void) +void NetworkUDPAdvertise() { struct sockaddr_in out_addr; @@ -580,7 +580,7 @@ _udp_master_socket->SendPacket(&p, &out_addr); } -void NetworkUDPInitialize(void) +void NetworkUDPInitialize() { _udp_client_socket = new ClientNetworkUDPSocketHandler(); _udp_server_socket = new ServerNetworkUDPSocketHandler(); @@ -590,7 +590,7 @@ _network_udp_broadcast = 0; } -void NetworkUDPShutdown(void) +void NetworkUDPShutdown() { NetworkUDPCloseAll();
--- a/src/network/network_udp.h +++ b/src/network/network_udp.h @@ -5,13 +5,13 @@ #ifdef ENABLE_NETWORK -void NetworkUDPInitialize(void); -void NetworkUDPSearchGame(void); -void NetworkUDPQueryMasterServer(void); +void NetworkUDPInitialize(); +void NetworkUDPSearchGame(); +void NetworkUDPQueryMasterServer(); void NetworkUDPQueryServer(const char* host, unsigned short port, bool manually = false); -void NetworkUDPAdvertise(void); -void NetworkUDPRemoveAdvertise(void); -void NetworkUDPShutdown(void); +void NetworkUDPAdvertise(); +void NetworkUDPRemoveAdvertise(); +void NetworkUDPShutdown(); #endif /* ENABLE_NETWORK */
--- a/src/newgrf.cpp +++ b/src/newgrf.cpp @@ -3523,7 +3523,7 @@ } -static void InitializeGRFSpecial(void) +static void InitializeGRFSpecial() { _ttdpatch_flags[0] = ((_patches.always_small_airport ? 1 : 0) << 0x0C) // keepsmallairport | (1 << 0x0D) // newairports @@ -3602,7 +3602,7 @@ | (0 << 0x17); // articulatedrvs } -static void ResetCustomStations(void) +static void ResetCustomStations() { StationSpec *statspec; GRFFile *file; @@ -3646,7 +3646,7 @@ } } -static void ResetNewGRF(void) +static void ResetNewGRF() { GRFFile *f, *next; @@ -3665,7 +3665,7 @@ * Reset all NewGRF loaded data * TODO */ -static void ResetNewGRFData(void) +static void ResetNewGRFData() { uint i; @@ -3743,7 +3743,7 @@ } /** Reset all NewGRFData that was used only while processing data */ -static void ClearTemporaryNewGRFData(void) +static void ClearTemporaryNewGRFData() { /* Clear the GOTO labels used for GRF processing */ GRFLabel *l; @@ -3852,7 +3852,7 @@ /** * Precalculate refit masks from cargo classes for all vehicles. */ -static void CalculateRefitMasks(void) +static void CalculateRefitMasks() { EngineID engine; @@ -4078,7 +4078,7 @@ } } -void InitDepotWindowBlockSizes(void); +void InitDepotWindowBlockSizes(); void LoadNewGRF(uint load_index, uint file_index) {
--- a/src/newgrf.h +++ b/src/newgrf.h @@ -75,7 +75,7 @@ void LoadNewGRFFile(GRFConfig *config, uint file_index, GrfLoadingStage stage); void LoadNewGRF(uint load_index, uint file_index); -void ReloadNewGRFData(void); // in openttd.c +void ReloadNewGRFData(); // in openttd.c void CDECL grfmsg(int severity, const char *str, ...);
--- a/src/newgrf_config.cpp +++ b/src/newgrf_config.cpp @@ -215,7 +215,7 @@ * compatible GRF with the same grfid was found and used instead * <li> GLC_NOT_FOUND: For one or more GRF's no match was found at all * </ul> */ -GRFListCompatibility IsGoodGRFConfigList(void) +GRFListCompatibility IsGoodGRFConfigList() { GRFListCompatibility res = GLC_ALL_GOOD; @@ -335,7 +335,7 @@ /* Scan for all NewGRFs */ -void ScanNewGRFFiles(void) +void ScanNewGRFFiles() { uint num; @@ -452,7 +452,7 @@ }; -static void Save_NGRF(void) +static void Save_NGRF() { int index = 0; @@ -464,7 +464,7 @@ } -static void Load_NGRF(void) +static void Load_NGRF() { ClearGRFConfigList(&_grfconfig); while (SlIterateArray() != -1) {
--- a/src/newgrf_config.h +++ b/src/newgrf_config.h @@ -67,7 +67,7 @@ /* First item in list of static GRF set up */ extern GRFConfig *_grfconfig_static; -void ScanNewGRFFiles(void); +void ScanNewGRFFiles(); const GRFConfig *FindGRFConfig(uint32 grfid, const uint8 *md5sum = NULL); GRFConfig *GetGRFConfig(uint32 grfid); GRFConfig **CopyGRFConfigList(GRFConfig **dst, const GRFConfig *src); @@ -76,7 +76,7 @@ void ClearGRFConfig(GRFConfig **config); void ClearGRFConfigList(GRFConfig **config); void ResetGRFConfig(bool defaults); -GRFListCompatibility IsGoodGRFConfigList(void); +GRFListCompatibility IsGoodGRFConfigList(); bool FillGRFDetails(GRFConfig *config, bool is_static); char *GRFBuildParamList(char *dst, const GRFConfig *c, const char *last);
--- a/src/newgrf_engine.cpp +++ b/src/newgrf_engine.cpp @@ -85,7 +85,7 @@ /** * Unload all wagon override sprite groups. */ -void UnloadWagonOverrides(void) +void UnloadWagonOverrides() { WagonOverrides *wos; WagonOverride *wo; @@ -123,7 +123,7 @@ /** * Unload all engine sprite groups. */ -void UnloadCustomEngineSprites(void) +void UnloadCustomEngineSprites() { memset(_engine_custom_sprites, 0, sizeof(_engine_custom_sprites)); memset(_engine_grf, 0, sizeof(_engine_grf)); @@ -144,7 +144,7 @@ } /** Unload all rotor override sprite groups */ -void UnloadRotorOverrideSprites(void) +void UnloadRotorOverrideSprites() { EngineID engine; @@ -1007,7 +1007,7 @@ _engine_custom_names[engine] = name; } -void UnloadCustomEngineNames(void) +void UnloadCustomEngineNames() { EngineID i; for (i = 0; i < TOTAL_NUM_ENGINES; i++) { @@ -1025,7 +1025,7 @@ static EngineID _engine_list_order[NUM_TRAIN_ENGINES]; static byte _engine_list_position[NUM_TRAIN_ENGINES]; -void ResetEngineListOrder(void) +void ResetEngineListOrder() { EngineID i;
--- a/src/newgrf_engine.h +++ b/src/newgrf_engine.h @@ -50,12 +50,12 @@ void SetCustomEngineName(EngineID engine, StringID name); StringID GetCustomEngineName(EngineID engine); -void UnloadWagonOverrides(void); -void UnloadRotorOverrideSprites(void); -void UnloadCustomEngineSprites(void); -void UnloadCustomEngineNames(void); +void UnloadWagonOverrides(); +void UnloadRotorOverrideSprites(); +void UnloadCustomEngineSprites(); +void UnloadCustomEngineNames(); -void ResetEngineListOrder(void); +void ResetEngineListOrder(); EngineID GetRailVehAtPosition(EngineID pos); uint16 ListPositionOfEngine(EngineID engine); void AlterRailVehListOrder(EngineID engine, EngineID target);
--- a/src/newgrf_sound.cpp +++ b/src/newgrf_sound.cpp @@ -15,7 +15,7 @@ /* Allocate a new FileEntry */ -FileEntry *AllocateFileEntry(void) +FileEntry *AllocateFileEntry() { if (_sound_count == GetSoundInternalPoolSize()) { if (!AddBlockToPool(&_SoundInternal_pool)) return NULL; @@ -25,7 +25,7 @@ } -void InitializeSoundPool(void) +void InitializeSoundPool() { CleanPool(&_SoundInternal_pool); _sound_count = 0; @@ -42,7 +42,7 @@ } -uint GetNumSounds(void) +uint GetNumSounds() { return _sound_count; }
--- a/src/newgrf_sound.h +++ b/src/newgrf_sound.h @@ -16,10 +16,10 @@ } VehicleSoundEvent; -FileEntry *AllocateFileEntry(void); -void InitializeSoundPool(void); +FileEntry *AllocateFileEntry(); +void InitializeSoundPool(); FileEntry *GetSound(uint index); -uint GetNumSounds(void); +uint GetNumSounds(); bool PlayVehicleSound(const Vehicle *v, VehicleSoundEvent event); #endif /* NEWGRF_SOUND_H */
--- a/src/newgrf_spritegroup.cpp +++ b/src/newgrf_spritegroup.cpp @@ -49,7 +49,7 @@ /* Allocate a new SpriteGroup */ -SpriteGroup *AllocateSpriteGroup(void) +SpriteGroup *AllocateSpriteGroup() { /* This is totally different to the other pool allocators, as we never remove an item from the pool. */ if (_spritegroup_count == GetSpriteGroupPoolSize()) { @@ -60,7 +60,7 @@ } -void InitializeSpriteGroupPool(void) +void InitializeSpriteGroupPool() { CleanPool(&_SpriteGroup_pool);
--- a/src/newgrf_spritegroup.h +++ b/src/newgrf_spritegroup.h @@ -152,8 +152,8 @@ }; -SpriteGroup *AllocateSpriteGroup(void); -void InitializeSpriteGroupPool(void); +SpriteGroup *AllocateSpriteGroup(); +void InitializeSpriteGroupPool(); typedef struct ResolverObject {
--- a/src/newgrf_station.cpp +++ b/src/newgrf_station.cpp @@ -31,7 +31,7 @@ * This includes initialising the Default and Waypoint classes with an empty * entry, for standard stations and waypoints. */ -void ResetStationClasses(void) +void ResetStationClasses() { for (StationClassID i = STAT_CLASS_BEGIN; i < STAT_CLASS_MAX; i++) { station_classes[i].id = 0; @@ -95,7 +95,7 @@ /** Build a list of station class name StringIDs to use in a dropdown list * @return Pointer to a (static) array of StringIDs */ -StringID *BuildStationClassDropdown(void) +StringID *BuildStationClassDropdown() { /* Allow room for all station classes, plus a terminator entry */ static StringID names[STAT_CLASS_MAX + 1]; @@ -115,7 +115,7 @@ * Get the number of station classes in use. * @return Number of station classes. */ -uint GetNumStationClasses(void) +uint GetNumStationClasses() { uint i; for (i = 0; i < STAT_CLASS_MAX && station_classes[i].id != 0; i++);
--- a/src/newgrf_station.h +++ b/src/newgrf_station.h @@ -96,13 +96,13 @@ StationSpec **spec; ///< Array of station specifications. } StationClass; -void ResetStationClasses(void); +void ResetStationClasses(); StationClassID AllocateStationClass(uint32 cls); void SetStationClassName(StationClassID sclass, StringID name); StringID GetStationClassName(StationClassID sclass); -StringID *BuildStationClassDropdown(void); +StringID *BuildStationClassDropdown(); -uint GetNumStationClasses(void); +uint GetNumStationClasses(); uint GetNumCustomStations(StationClassID sclass); void SetCustomStationSpec(StationSpec *statspec);
--- a/src/newgrf_text.cpp +++ b/src/newgrf_text.cpp @@ -441,7 +441,7 @@ * House cleaning. * Remove all strings and reset the text counter. */ -void CleanUpStrings(void) +void CleanUpStrings() { uint id;
--- a/src/newgrf_text.h +++ b/src/newgrf_text.h @@ -9,7 +9,7 @@ StringID AddGRFString(uint32 grfid, uint16 stringid, byte langid, bool new_scheme, const char *text_to_add, StringID def_string); StringID GetGRFStringID(uint32 grfid, uint16 stringid); char *GetGRFString(char *buff, uint16 stringid, const char* last); -void CleanUpStrings(void); +void CleanUpStrings(); void SetCurrentGrfLangID(const char *iso_name); char *TranslateTTDPatchCodes(const char *str);
--- a/src/news.h +++ b/src/news.h @@ -24,9 +24,9 @@ #define NEWS_FLAGS(mode,flag,type,cb) ((cb)<<24 | (type)<<16 | (flag)<<8 | (mode)) void AddNewsItem(StringID string, uint32 flags, uint data_a, uint data_b); -void NewsLoop(void); +void NewsLoop(); void DrawNewsBorder(const Window *w); -void InitNewsItemStructs(void); +void InitNewsItemStructs(); VARDEF NewsItem _statusbar_news_item;
--- a/src/news_gui.cpp +++ b/src/news_gui.cpp @@ -55,7 +55,7 @@ void DrawNewsNewVehicleAvail(Window *w); void DrawNewsBankrupcy(Window *w); -static void MoveToNextItem(void); +static void MoveToNextItem(); StringID GetNewsStringNewVehicleAvail(const NewsItem *ni); StringID GetNewsStringBankrupcy(const NewsItem *ni); @@ -71,7 +71,7 @@ GetNewsStringBankrupcy, /* DNC_BANKRUPCY */ }; -void InitNewsItemStructs(void) +void InitNewsItemStructs() { memset(_news_items, 0, sizeof(_news_items)); _current_news = INVALID_NEWS; @@ -452,7 +452,7 @@ // Are we ready to show another news item? // Only if nothing is in the newsticker and no newspaper is displayed -static bool ReadyForNextItem(void) +static bool ReadyForNextItem() { const Window *w; NewsID item = (_forced_news == INVALID_NEWS) ? _current_news : _forced_news; @@ -473,7 +473,7 @@ return (ni->duration == 0 || FindWindowById(WC_NEWS_WINDOW, 0) == NULL); } -static void MoveToNextItem(void) +static void MoveToNextItem() { DeleteWindowById(WC_NEWS_WINDOW, 0); _forced_news = INVALID_NEWS; @@ -513,7 +513,7 @@ } } -void NewsLoop(void) +void NewsLoop() { // no news item yet if (_total_news == 0) return; @@ -541,7 +541,7 @@ } } -void ShowLastNewsMessage(void) +void ShowLastNewsMessage() { if (_forced_news == INVALID_NEWS) { /* Not forced any news yet, show the current one, unless a news window is @@ -681,7 +681,7 @@ MessageHistoryWndProc }; -void ShowMessageHistory(void) +void ShowMessageHistory() { Window *w; @@ -859,7 +859,7 @@ MessageOptionsWndProc }; -void ShowMessageOptions(void) +void ShowMessageOptions() { DeleteWindowById(WC_GAME_OPTIONS, 0); AllocateWindowDesc(&_message_options_desc);
--- a/src/npf.cpp +++ b/src/npf.cpp @@ -869,7 +869,7 @@ return best_result; } -void InitializeNPF(void) +void InitializeNPF() { init_AyStar(&_npf_aystar, NPFHash, NPF_HASH_SIZE); _npf_aystar.loops_per_tick = 0;
--- a/src/oldloader.cpp +++ b/src/oldloader.cpp @@ -290,7 +290,7 @@ extern uint32 GetOldTownName(uint32 townnameparts, byte old_town_name_type); -static void FixOldTowns(void) +static void FixOldTowns() { Town *town; @@ -303,7 +303,7 @@ } } -static void FixOldStations(void) +static void FixOldStations() { Station *st; @@ -315,7 +315,7 @@ } } -static void FixOldVehicles(void) +static void FixOldVehicles() { /* Check for shared orders, and link them correctly */ Vehicle* v; @@ -374,7 +374,7 @@ static uint16 _old_string_id_2; static uint16 _old_extra_chunk_nums; -static void ReadTTDPatchFlags(void) +static void ReadTTDPatchFlags() { int i;
--- a/src/oldpool.h +++ b/src/oldpool.h @@ -68,7 +68,7 @@ ); \ } \ \ - static inline uint Get##name##PoolSize(void) \ + static inline uint Get##name##PoolSize() \ { \ return _##name##_pool.total_items; \ }
--- a/src/openttd.cpp +++ b/src/openttd.cpp @@ -67,11 +67,11 @@ #include <stdarg.h> -void CallLandscapeTick(void); -void IncreaseDate(void); -void DoPaletteAnimations(void); -void MusicLoop(void); -void ResetMusic(void); +void CallLandscapeTick(); +void IncreaseDate(); +void DoPaletteAnimations(); +void MusicLoop(); +void ResetMusic(); extern void SetDifficultyLevel(int mode, GameOptions *gm_opt); extern Player* DoStartupNewPlayer(bool is_ai); @@ -137,7 +137,7 @@ } extern const char _openttd_revision[]; -static void showhelp(void) +static void showhelp() { char buf[4096], *p; @@ -265,7 +265,7 @@ res[1] = clamp(strtoul(t + 1, NULL, 0), 64, MAX_SCREEN_HEIGHT); } -static void InitializeDynamicVariables(void) +static void InitializeDynamicVariables() { /* Dynamic stuff needs to be initialized somewhere... */ _town_sort = NULL; @@ -273,7 +273,7 @@ } -static void UnInitializeGame(void) +static void UnInitializeGame() { UnInitWindowSystem(); @@ -294,7 +294,7 @@ free(_config_file); } -static void LoadIntroGame(void) +static void LoadIntroGame() { char filename[256]; @@ -331,7 +331,7 @@ } #if defined(UNIX) && !defined(__MORPHOS__) -extern void DedicatedFork(void); +extern void DedicatedFork(); #endif int ttd_main(int argc, char *argv[]) @@ -593,7 +593,7 @@ return 0; } -void HandleExitGameRequest(void) +void HandleExitGameRequest() { if (_game_mode == GM_MENU) { // do not ask to quit on the main screen _exit_game = true; @@ -610,8 +610,8 @@ * at any given time */ static ThreadMsg _message = MSG_OTTD_NO_MESSAGE; -static inline void OTTD_ReleaseMutex(void) {_message = MSG_OTTD_NO_MESSAGE;} -static inline ThreadMsg OTTD_PollThreadEvent(void) {return _message;} +static inline void OTTD_ReleaseMutex() {_message = MSG_OTTD_NO_MESSAGE;} +static inline ThreadMsg OTTD_PollThreadEvent() {return _message;} /** Called by running thread to execute some action in the main game. * It will stall as long as the mutex is not freed (handled) by the game */ @@ -649,7 +649,7 @@ } -static void MakeNewGameDone(void) +static void MakeNewGameDone() { /* In a dedicated server, the server does not play */ if (_network_dedicated) { @@ -679,14 +679,14 @@ GenerateWorld(from_heightmap ? GW_HEIGHTMAP : GW_NEWGAME, 1 << _patches.map_x, 1 << _patches.map_y); } -static void MakeNewEditorWorldDone(void) +static void MakeNewEditorWorldDone() { SetLocalPlayer(OWNER_NONE); MarkWholeScreenDirty(); } -static void MakeNewEditorWorld(void) +static void MakeNewEditorWorld() { _game_mode = GM_EDITOR; @@ -696,16 +696,16 @@ GenerateWorld(GW_EMPTY, 1 << _patches.map_x, 1 << _patches.map_y); } -void StartupPlayers(void); -void StartupDisasters(void); -extern void StartupEconomy(void); +void StartupPlayers(); +void StartupDisasters(); +extern void StartupEconomy(); /** * Start Scenario starts a new game based on a scenario. * Eg 'New Game' --> select a preset scenario * This starts a scenario based on your current difficulty settings */ -static void StartScenario(void) +static void StartScenario() { _game_mode = GM_NORMAL; @@ -900,7 +900,7 @@ // The state must not be changed from anywhere // but here. // That check is enforced in DoCommand. -void StateGameLoop(void) +void StateGameLoop() { // dont execute the state loop during pause if (_pause_game) return; @@ -932,7 +932,7 @@ } } -static void DoAutosave(void) +static void DoAutosave() { char buf[200]; @@ -998,7 +998,7 @@ { 0, 0}, // 15 : impossible }; -static void HandleKeyScrolling(void) +static void HandleKeyScrolling() { if (_dirkeys && !_no_scroll) { int factor = _shift_pressed ? 50 : 10; @@ -1006,7 +1006,7 @@ } } -void GameLoop(void) +void GameLoop() { ThreadMsg message; @@ -1073,7 +1073,7 @@ MusicLoop(); } -void BeforeSaveGame(void) +void BeforeSaveGame() { const Window *w = FindWindowById(WC_MAIN_WINDOW, 0); @@ -1084,7 +1084,7 @@ } } -static void ConvertTownOwner(void) +static void ConvertTownOwner() { TileIndex tile; @@ -1106,7 +1106,7 @@ } // before savegame version 4, the name of the company determined if it existed -static void CheckIsPlayerActive(void) +static void CheckIsPlayerActive() { Player *p; @@ -1116,7 +1116,7 @@ } // since savegame version 4.1, exclusive transport rights are stored at towns -static void UpdateExclusiveRights(void) +static void UpdateExclusiveRights() { Town *t; @@ -1142,7 +1142,7 @@ 18, 2, 20, }; // since savegame version 4.2 the currencies are arranged differently -static void UpdateCurrencies(void) +static void UpdateCurrencies() { _opt.currency = convert_currency[_opt.currency]; } @@ -1150,7 +1150,7 @@ /* Up to revision 1413 the invisible tiles at the southern border have not been * MP_VOID, even though they should have. This is fixed by this function */ -static void UpdateVoidTiles(void) +static void UpdateVoidTiles() { uint i; @@ -1159,14 +1159,14 @@ } // since savegame version 6.0 each sign has an "owner", signs without owner (from old games are set to 255) -static void UpdateSignOwner(void) +static void UpdateSignOwner() { Sign *si; FOR_ALL_SIGNS(si) si->owner = OWNER_NONE; } -extern void UpdateOldAircraft( void ); +extern void UpdateOldAircraft(); static inline RailType UpdateRailType(RailType rt, RailType min) @@ -1174,7 +1174,7 @@ return rt >= min ? (RailType)(rt + 1): rt; } -bool AfterLoadGame(void) +bool AfterLoadGame() { TileIndex map_size = MapSize(); Window *w; @@ -1844,7 +1844,7 @@ * hash AfterLoadVehicles() will loop infinitely. We need AfterLoadVehicles() * to recalculate vehicle data as some NewGRF vehicle sets could have been * removed or added and changed statistics */ -void ReloadNewGRFData(void) +void ReloadNewGRFData() { /* reload grf data */ GfxLoadSprites();
--- a/src/order.h +++ b/src/order.h @@ -116,7 +116,7 @@ DECLARE_OLD_POOL(Order, Order, 6, 1000) -static inline VehicleOrderID GetMaxOrderIndex(void) +static inline VehicleOrderID GetMaxOrderIndex() { /* TODO - This isn't the real content of the function, but * with the new pool-system this will be replaced with one that @@ -126,7 +126,7 @@ return GetOrderPoolSize() - 1; } -static inline VehicleOrderID GetNumOrders(void) +static inline VehicleOrderID GetNumOrders() { return GetOrderPoolSize(); }
--- a/src/order_cmd.cpp +++ b/src/order_cmd.cpp @@ -109,7 +109,7 @@ * @return Order* if a free space is found, else NULL. * */ -static Order *AllocateOrder(void) +static Order *AllocateOrder() { Order *order; @@ -1199,7 +1199,7 @@ return false; } -void InitializeOrders(void) +void InitializeOrders() { CleanPool(&_Order_pool); AddBlockToPool(&_Order_pool); @@ -1221,7 +1221,7 @@ SLE_END() }; -static void Save_ORDR(void) +static void Save_ORDR() { Order *order; @@ -1231,7 +1231,7 @@ } } -static void Load_ORDR(void) +static void Load_ORDR() { if (CheckSavegameVersionOldStyle(5, 2)) { /* Version older than 5.2 did not have a ->next pointer. Convert them
--- a/src/os/macosx/macos.mm +++ b/src/os/macosx/macos.mm @@ -24,7 +24,7 @@ void ToggleFullScreen(bool fs); -static char *GetOSString(void) +static char *GetOSString() { static char buffer[175]; const char* CPU;
--- a/src/os/macosx/splash.cpp +++ b/src/os/macosx/splash.cpp @@ -26,7 +26,7 @@ DEBUG(misc, 1, "[libpng] warning: %s - %s", message, (char *)png_get_error_ptr(png_ptr)); } -void DisplaySplashImage(void) +void DisplaySplashImage() { png_byte header[8]; FILE *f; @@ -139,6 +139,6 @@ #else /* WITH_PNG */ -void DisplaySplashImage(void) {} +void DisplaySplashImage() {} #endif /* WITH_PNG */
--- a/src/os/macosx/splash.h +++ b/src/os/macosx/splash.h @@ -9,7 +9,7 @@ extern "C" { #endif //__cplusplus - void DisplaySplashImage(void); + void DisplaySplashImage(); #ifdef __cplusplus }
--- a/src/os2.cpp +++ b/src/os2.cpp @@ -33,7 +33,7 @@ return file[3] == '\0'; } -void FiosGetDrives(void) +void FiosGetDrives() { unsigned disk, disk2, save, total; @@ -178,7 +178,7 @@ return ttd_main(argc, argv); } -void DeterminePaths(void) +void DeterminePaths() { char *s;
--- a/src/os_timer.cpp +++ b/src/os_timer.cpp @@ -9,12 +9,12 @@ #if defined(_MSC_VER) && !defined(RDTSC_AVAILABLE) # if _MSC_VER >= 1400 #include <intrin.h> -uint64 _rdtsc(void) +uint64 _rdtsc() { return __rdtsc(); } # else -uint64 _declspec(naked) _rdtsc(void) +uint64 _declspec(naked) _rdtsc() { _asm { rdtsc @@ -27,14 +27,14 @@ /* rdtsc for OS/2. Hopefully this works, who knows */ #if defined (__WATCOMC__) && !defined(RDTSC_AVAILABLE) -unsigned __int64 _rdtsc( void); +unsigned __int64 _rdtsc(); # pragma aux _rdtsc = 0x0F 0x31 value [edx eax] parm nomemory modify exact [edx eax] nomemory; # define RDTSC_AVAILABLE #endif /* rdtsc for all other *nix-en (hopefully). Use GCC syntax */ #if defined(__i386__) || defined(__x86_64__) && !defined(RDTSC_AVAILABLE) -uint64 _rdtsc(void) +uint64 _rdtsc() { uint32 high, low; __asm__ __volatile__ ("rdtsc" : "=a" (low), "=d" (high)); @@ -45,7 +45,7 @@ /* rdtsc for PPC which has this not */ #if (defined(__POWERPC__) || defined(__powerpc__)) && !defined(RDTSC_AVAILABLE) -uint64 _rdtsc(void) +uint64 _rdtsc() { uint32 high = 0, high2 = 0, low; /* PPC does not have rdtsc, so we cheat by reading the two 32-bit time-counters @@ -70,5 +70,5 @@ * you just won't be able to profile your code with TIC()/TOC() */ #if !defined(RDTSC_AVAILABLE) #warning "(non-fatal) No support for rdtsc(), you won't be able to profile with TIC/TOC" -uint64 _rdtsc(void) {return 0;} +uint64 _rdtsc() {return 0;} #endif
--- a/src/player.h +++ b/src/player.h @@ -217,7 +217,7 @@ // NOSAVE: can be determined from player structs VARDEF byte _player_colors[MAX_PLAYERS]; -static inline byte ActivePlayerCount(void) +static inline byte ActivePlayerCount() { const Player *p; byte count = 0; @@ -235,7 +235,7 @@ return &_players[i]; } -static inline bool IsLocalPlayer(void) +static inline bool IsLocalPlayer() { return _local_player == _current_player; } @@ -289,10 +289,10 @@ } HighScore; VARDEF HighScore _highscore_table[5][5]; // 4 difficulty-settings (+ network); top 5 -void SaveToHighScore(void); -void LoadFromHighScore(void); +void SaveToHighScore(); +void LoadFromHighScore(); int8 SaveHighScoreValue(const Player *p); -int8 SaveHighScoreValueNetwork(void); +int8 SaveHighScoreValueNetwork(); /* Engine Replacement Functions */
--- a/src/player_gui.cpp +++ b/src/player_gui.cpp @@ -1132,7 +1132,7 @@ /* Show the endgame victory screen in 2050. Update the new highscore * if it was high enough */ -void ShowEndGameChart(void) +void ShowEndGameChart() { Window *w;
--- a/src/players.cpp +++ b/src/players.cpp @@ -337,7 +337,7 @@ static const byte _color_similar_1[16] = {8, 6, 255, 12, 255, 0, 1, 1, 0, 13, 11, 10, 3, 9, 15, 14}; static const byte _color_similar_2[16] = {5, 7, 255, 255, 255, 8, 7, 6, 5, 12, 255, 255, 9, 255, 255, 255}; -static byte GeneratePlayerColor(void) +static byte GeneratePlayerColor() { byte colors[16], pcolor, t2; int i,j,n; @@ -425,7 +425,7 @@ } } -static Player *AllocatePlayer(void) +static Player *AllocatePlayer() { Player *p; // Find a free slot @@ -494,13 +494,13 @@ return p; } -void StartupPlayers(void) +void StartupPlayers() { // The AI starts like in the setting with +2 month max _next_competitor_start = _opt.diff.competitor_start_time * 90 * DAY_TICKS + RandomRange(60 * DAY_TICKS) + 1; } -static void MaybeStartNewPlayer(void) +static void MaybeStartNewPlayer() { uint n; Player *p; @@ -527,14 +527,14 @@ _next_competitor_start += _network_server ? InteractiveRandomRange(60 * DAY_TICKS) : RandomRange(60 * DAY_TICKS); } -void InitializePlayers(void) +void InitializePlayers() { memset(_players, 0, sizeof(_players)); for (PlayerID i = PLAYER_FIRST; i != MAX_PLAYERS; i++) _players[i].index = i; _cur_player_tick_index = 0; } -void OnTick_Players(void) +void OnTick_Players() { Player *p; @@ -560,7 +560,7 @@ extern void ShowPlayerFinances(PlayerID player); -void PlayersYearlyLoop(void) +void PlayersYearlyLoop() { Player *p; @@ -946,7 +946,7 @@ } /* Return true if any cheat has been used, false otherwise */ -static bool CheatHasBeenUsed(void) +static bool CheatHasBeenUsed() { const Cheat* cht = (Cheat*)&_cheats; const Cheat* cht_last = &cht[sizeof(_cheats) / sizeof(Cheat)]; @@ -998,7 +998,7 @@ /* Save the highscores in a network game when it has ended */ #define LAST_HS_ITEM lengthof(_highscore_table) - 1 -int8 SaveHighScoreValueNetwork(void) +int8 SaveHighScoreValueNetwork() { const Player* p; const Player* pl[MAX_PLAYERS]; @@ -1036,7 +1036,7 @@ } /* Save HighScore table to file */ -void SaveToHighScore(void) +void SaveToHighScore() { FILE *fp = fopen(_highscore_file, "wb"); @@ -1060,7 +1060,7 @@ } /* Initialize the highscore table to 0 and if any file exists, load in values */ -void LoadFromHighScore(void) +void LoadFromHighScore() { FILE *fp = fopen(_highscore_file, "rb"); @@ -1257,7 +1257,7 @@ } } -static void Save_PLYR(void) +static void Save_PLYR() { Player *p; FOR_ALL_PLAYERS(p) { @@ -1268,7 +1268,7 @@ } } -static void Load_PLYR(void) +static void Load_PLYR() { int index; while ((index = SlIterateArray()) != -1) {
--- a/src/rail_gui.cpp +++ b/src/rail_gui.cpp @@ -45,9 +45,9 @@ static void HandleStationPlacement(TileIndex start, TileIndex end); -static void ShowBuildTrainDepotPicker(void); -static void ShowBuildWaypointPicker(void); -static void ShowStationBuilder(void); +static void ShowBuildTrainDepotPicker(); +static void ShowBuildWaypointPicker(); +static void ShowStationBuilder(); void CcPlaySound1E(bool success, TileIndex tile, uint32 p1, uint32 p2) { @@ -348,7 +348,7 @@ ); } -static void HandleAutodirPlacement(void) +static void HandleAutodirPlacement() { TileHighlightData *thd = &_thd; int trackstat = thd->drawstyle & 0xF; // 0..5 @@ -361,7 +361,7 @@ DoRailroadTrack(trackstat); } -static void HandleAutoSignalPlacement(void) +static void HandleAutoSignalPlacement() { TileHighlightData *thd = &_thd; uint32 p2 = GB(thd->drawstyle, 0, 3); // 0..5 @@ -1012,7 +1012,7 @@ StationBuildWndProc }; -static void ShowStationBuilder(void) +static void ShowStationBuilder() { Window *w; if (GetNumStationClasses() <= 2 && GetNumCustomStations(STAT_CLASS_DFLT) == 1) { @@ -1091,7 +1091,7 @@ BuildTrainDepotWndProc }; -static void ShowBuildTrainDepotPicker(void) +static void ShowBuildTrainDepotPicker() { AllocateWindowDesc(&_build_depot_desc); } @@ -1177,7 +1177,7 @@ BuildWaypointWndProc }; -static void ShowBuildWaypointPicker(void) +static void ShowBuildWaypointPicker() { Window *w = AllocateWindowDesc(&_build_waypoint_desc); w->hscroll.cap = 5; @@ -1185,7 +1185,7 @@ } -void InitializeRailGui(void) +void InitializeRailGui() { _build_depot_direction = DIAGDIR_NW; _railstation.numtracks = 1;
--- a/src/road_gui.cpp +++ b/src/road_gui.cpp @@ -21,9 +21,9 @@ #include "station.h" -static void ShowBusStationPicker(void); -static void ShowTruckStationPicker(void); -static void ShowRoadDepotPicker(void); +static void ShowBusStationPicker(); +static void ShowTruckStationPicker(); +static void ShowRoadDepotPicker(); static bool _remove_button_clicked; @@ -346,7 +346,7 @@ BuildRoadToolbWndProc }; -void ShowBuildRoadToolbar(void) +void ShowBuildRoadToolbar() { if (!IsValidPlayer(_current_player)) return; @@ -380,7 +380,7 @@ BuildRoadToolbWndProc }; -void ShowBuildRoadScenToolbar(void) +void ShowBuildRoadScenToolbar() { AllocateWindowDescFront(&_build_road_scen_desc, 0); } @@ -440,7 +440,7 @@ BuildRoadDepotWndProc }; -static void ShowRoadDepotPicker(void) +static void ShowRoadDepotPicker() { AllocateWindowDesc(&_build_road_depot_desc); } @@ -543,7 +543,7 @@ RoadStationPickerWndProc }; -static void ShowBusStationPicker(void) +static void ShowBusStationPicker() { AllocateWindowDesc(&_bus_station_picker_desc); } @@ -572,12 +572,12 @@ RoadStationPickerWndProc }; -static void ShowTruckStationPicker(void) +static void ShowTruckStationPicker() { AllocateWindowDesc(&_truck_station_picker_desc); } -void InitializeRoadGui(void) +void InitializeRoadGui() { _road_depot_orientation = DIAGDIR_NW; _road_station_picker_orientation = DIAGDIR_NW;
--- a/src/roadveh_cmd.cpp +++ b/src/roadveh_cmd.cpp @@ -1824,7 +1824,7 @@ } -void RoadVehiclesYearlyLoop(void) +void RoadVehiclesYearlyLoop() { Vehicle *v;
--- a/src/saveload.cpp +++ b/src/saveload.cpp @@ -33,7 +33,7 @@ byte _sl_minor_version; ///< the minor savegame version, DO NOT USE! typedef void WriterProc(uint len); -typedef uint ReaderProc(void); +typedef uint ReaderProc(); /** The saveload struct, containing reader-writer functions, bufffer, version, etc. */ static struct { @@ -63,7 +63,7 @@ uint bufsize; ///< the size of the temporary memory *buf FILE *fh; ///< the file from which is read or written to - void (*excpt_uninit)(void); ///< the function to execute on any encountered error + void (*excpt_uninit)(); ///< the function to execute on any encountered error const char *excpt_msg; ///< the error message jmp_buf excpt; ///< @todo used to jump to "exception handler"; really ugly } _sl; @@ -74,7 +74,7 @@ /** * Fill the input buffer by reading from the file with the given reader */ -static void SlReadFill(void) +static void SlReadFill() { uint len = _sl.read_bytes(); assert(len != 0); @@ -84,7 +84,7 @@ _sl.offs_base += len; } -static inline uint32 SlGetOffs(void) {return _sl.offs_base - (_sl.bufe - _sl.bufp);} +static inline uint32 SlGetOffs() {return _sl.offs_base - (_sl.bufe - _sl.bufp);} /** Return the size in bytes of a certain type of normal/atomic variable * as it appears in memory. See VarTypes @@ -111,13 +111,13 @@ } /** Return the size in bytes of a reference (pointer) */ -static inline size_t SlCalcRefLen(void) {return 2;} +static inline size_t SlCalcRefLen() {return 2;} /** Flush the output buffer by writing to disk with the given reader. * If the buffer pointer has not yet been set up, set it up now. Usually * only called when the buffer is full, or there is no more data to be processed */ -static void SlWriteFill(void) +static void SlWriteFill() { /* flush the buffer to disk (the writer) */ if (_sl.bufp != NULL) { @@ -145,14 +145,14 @@ * flush it to its final destination * @return return the read byte from file */ -static inline byte SlReadByteInternal(void) +static inline byte SlReadByteInternal() { if (_sl.bufp == _sl.bufe) SlReadFill(); return *_sl.bufp++; } /** Wrapper for SlReadByteInternal */ -byte SlReadByte(void) {return SlReadByteInternal();} +byte SlReadByte() {return SlReadByteInternal();} /** Write away a single byte from memory. If the temporary buffer is full, * flush it to its destination (file) @@ -167,19 +167,19 @@ /** Wrapper for SlWriteByteInternal */ void SlWriteByte(byte b) {SlWriteByteInternal(b);} -static inline int SlReadUint16(void) +static inline int SlReadUint16() { int x = SlReadByte() << 8; return x | SlReadByte(); } -static inline uint32 SlReadUint32(void) +static inline uint32 SlReadUint32() { uint32 x = SlReadUint16() << 16; return x | SlReadUint16(); } -static inline uint64 SlReadUint64(void) +static inline uint64 SlReadUint64() { uint32 x = SlReadUint32(); uint32 y = SlReadUint32(); @@ -213,7 +213,7 @@ * x = ((x & 0x7F) << 8) + SlReadByte(); * @return Return the value of the index */ -static uint SlReadSimpleGamma(void) +static uint SlReadSimpleGamma() { uint i = SlReadByte(); if (HASBIT(i, 7)) { @@ -269,10 +269,10 @@ return 1 + (i >= (1 << 7)) + (i >= (1 << 14)) + (i >= (1 << 21)); } -static inline uint SlReadSparseIndex(void) {return SlReadSimpleGamma();} +static inline uint SlReadSparseIndex() {return SlReadSimpleGamma();} static inline void SlWriteSparseIndex(uint index) {SlWriteSimpleGamma(index);} -static inline uint SlReadArrayLength(void) {return SlReadSimpleGamma();} +static inline uint SlReadArrayLength() {return SlReadSimpleGamma();} static inline void SlWriteArrayLength(uint length) {SlWriteSimpleGamma(length);} static inline uint SlGetArrayLength(uint length) {return SlGetGammaLength(length);} @@ -286,7 +286,7 @@ * Iterate through the elements of an array and read the whole thing * @return The index of the object, or -1 if we have reached the end of current block */ -int SlIterateArray(void) +int SlIterateArray() { int index; static uint32 next_offs; @@ -382,7 +382,7 @@ } /* Get the length of the current object */ -uint SlGetFieldLength(void) {return _sl.obj_len;} +uint SlGetFieldLength() {return _sl.obj_len;} /** Return a signed-long version of the value of a setting * @param ptr pointer to the variable @@ -850,7 +850,7 @@ /* Stub Chunk handlers to only calculate length and do nothing else */ static ChunkSaveLoadProc *_tmp_proc_1; static inline void SlStubSaveProc2(void *arg) {_tmp_proc_1();} -static void SlStubSaveProc(void) {SlAutolength(SlStubSaveProc2, NULL);} +static void SlStubSaveProc() {SlAutolength(SlStubSaveProc2, NULL);} /** Save a chunk of data (eg. vehicles, stations, etc.). Each chunk is * prefixed by an ID identifying it, followed by data, and terminator where appropiate @@ -891,7 +891,7 @@ } /** Save all chunks */ -static void SlSaveChunks(void) +static void SlSaveChunks() { const ChunkHandler *ch; const ChunkHandler* const *chsc; @@ -933,7 +933,7 @@ } /** Load all chunks */ -static void SlLoadChunks(void) +static void SlLoadChunks() { uint32 id; const ChunkHandler *ch; @@ -954,7 +954,7 @@ #include "minilzo.h" -static uint ReadLZO(void) +static uint ReadLZO() { byte out[LZO_SIZE + LZO_SIZE / 64 + 16 + 3 + 8]; uint32 tmp[2]; @@ -999,14 +999,14 @@ if (fwrite(out, outlen + sizeof(uint32)*2, 1, _sl.fh) != 1) SlError("file write failed"); } -static bool InitLZO(void) +static bool InitLZO() { _sl.bufsize = LZO_SIZE; _sl.buf = _sl.buf_ori = (byte*)malloc(LZO_SIZE); return true; } -static void UninitLZO(void) +static void UninitLZO() { free(_sl.buf_ori); } @@ -1014,7 +1014,7 @@ /********************************************* ******** START OF NOCOMP CODE (uncompressed)* *********************************************/ -static uint ReadNoComp(void) +static uint ReadNoComp() { return fread(_sl.buf, 1, LZO_SIZE, _sl.fh); } @@ -1024,14 +1024,14 @@ fwrite(_sl.buf, 1, size, _sl.fh); } -static bool InitNoComp(void) +static bool InitNoComp() { _sl.bufsize = LZO_SIZE; _sl.buf = _sl.buf_ori =(byte*)malloc(LZO_SIZE); return true; } -static void UninitNoComp(void) +static void UninitNoComp() { free(_sl.buf_ori); } @@ -1056,7 +1056,7 @@ STATIC_OLD_POOL(Savegame, byte, 17, 500, NULL, NULL) static ThreadedSave _ts; -static bool InitMem(void) +static bool InitMem() { _ts.count = 0; @@ -1069,7 +1069,7 @@ return true; } -static void UnInitMem(void) +static void UnInitMem() { CleanPool(&_Savegame_pool); } @@ -1091,7 +1091,7 @@ static z_stream _z; -static bool InitReadZlib(void) +static bool InitReadZlib() { memset(&_z, 0, sizeof(_z)); if (inflateInit(&_z) != Z_OK) return false; @@ -1101,7 +1101,7 @@ return true; } -static uint ReadZlib(void) +static uint ReadZlib() { int r; @@ -1126,13 +1126,13 @@ return 4096 - _z.avail_out; } -static void UninitReadZlib(void) +static void UninitReadZlib() { inflateEnd(&_z); free(_sl.buf_ori); } -static bool InitWriteZlib(void) +static bool InitWriteZlib() { memset(&_z, 0, sizeof(_z)); if (deflateInit(&_z, 6) != Z_OK) return false; @@ -1168,7 +1168,7 @@ WriteZlibLoop(&_z, _sl.buf, len, 0); } -static void UninitWriteZlib(void) +static void UninitWriteZlib() { /* flush any pending output. */ if (_sl.fh) WriteZlibLoop(&_z, NULL, 0, Z_FINISH); @@ -1330,13 +1330,13 @@ const char *name; ///< name of the compressor/decompressor (debug-only) uint32 tag; ///< the 4-letter tag by which it is identified in the savegame - bool (*init_read)(void); ///< function executed upon initalization of the loader + bool (*init_read)(); ///< function executed upon initalization of the loader ReaderProc *reader; ///< function that loads the data from the file - void (*uninit_read)(void); ///< function executed when reading is finished + void (*uninit_read)(); ///< function executed when reading is finished - bool (*init_write)(void); ///< function executed upon intialization of the saver + bool (*init_write)(); ///< function executed upon intialization of the saver WriterProc *writer; ///< function that saves the data to the file - void (*uninit_write)(void); ///< function executed when writing is done + void (*uninit_write)(); ///< function executed when writing is done } SaveLoadFormat; static const SaveLoadFormat _saveload_formats[] = { @@ -1377,12 +1377,12 @@ /* actual loader/saver function */ void InitializeGame(int mode, uint size_x, uint size_y); -extern bool AfterLoadGame(void); -extern void BeforeSaveGame(void); +extern bool AfterLoadGame(); +extern void BeforeSaveGame(); extern bool LoadOldSaveGame(const char *file); /** Small helper function to close the to be loaded savegame an signal error */ -static inline SaveOrLoadResult AbortSaveLoad(void) +static inline SaveOrLoadResult AbortSaveLoad() { if (_sl.fh != NULL) fclose(_sl.fh); @@ -1393,7 +1393,7 @@ /** Update the gui accordingly when starting saving * and set locks on saveload. Also turn off fast-forward cause with that * saving takes Aaaaages */ -void SaveFileStart(void) +void SaveFileStart() { _ts.ff_state = _fast_forward; _fast_forward = 0; @@ -1405,7 +1405,7 @@ /** Update the gui accordingly when saving is done and release locks * on saveload */ -void SaveFileDone(void) +void SaveFileDone() { _fast_forward = _ts.ff_state; if (_cursor.sprite == SPR_CURSOR_ZZZ) SetMouseCursor(SPR_CURSOR_MOUSE, PAL_NONE); @@ -1415,7 +1415,7 @@ } /** Show a gui message when saving has failed */ -void SaveFileError(void) +void SaveFileError() { ShowErrorMessage(STR_4007_GAME_SAVE_FAILED, STR_NULL, 0, 0); SaveFileDone(); @@ -1487,7 +1487,7 @@ return NULL; } -void WaitTillSaved(void) +void WaitTillSaved() { OTTDJoinThread(save_thread); save_thread = NULL; @@ -1658,7 +1658,7 @@ } /** Do a save when exiting the game (patch option) _patches.autosave_on_exit */ -void DoExitSave(void) +void DoExitSave() { char buf[200]; snprintf(buf, sizeof(buf), "%s%sexit.sav", _paths.autosave_dir, PATHSEP);
--- a/src/saveload.h +++ b/src/saveload.h @@ -25,11 +25,11 @@ } SaveOrLoadMode; SaveOrLoadResult SaveOrLoad(const char *filename, int mode); -void WaitTillSaved(void); -void DoExitSave(void); +void WaitTillSaved(); +void DoExitSave(); -typedef void ChunkSaveLoadProc(void); +typedef void ChunkSaveLoadProc(); typedef void AutolengthProc(void *arg); typedef struct { @@ -290,14 +290,14 @@ void WriteValue(void *ptr, VarType conv, int64 val); void SlSetArrayIndex(uint index); -int SlIterateArray(void); +int SlIterateArray(); void SlAutolength(AutolengthProc *proc, void *arg); -uint SlGetFieldLength(void); +uint SlGetFieldLength(); void SlSetLength(size_t length); size_t SlCalcObjMemberLength(const void *object, const SaveLoad *sld); -byte SlReadByte(void); +byte SlReadByte(); void SlWriteByte(byte b); void SlGlobList(const SaveLoadGlobVarList *sldg); @@ -305,7 +305,7 @@ void SlObject(void *object, const SaveLoad *sld); bool SlObjectMember(void *object, const SaveLoad *sld); -void SaveFileStart(void); -void SaveFileDone(void); -void SaveFileError(void); +void SaveFileStart(); +void SaveFileDone(); +void SaveFileError(); #endif /* SAVELOAD_H */
--- a/src/screenshot.cpp +++ b/src/screenshot.cpp @@ -421,7 +421,7 @@ {"PCX", "pcx", &MakePCXImage}, }; -void InitializeScreenshotFormats(void) +void InitializeScreenshotFormats() { int i, j; for (i = 0, j = 0; i != lengthof(_screenshot_formats); i++) @@ -524,18 +524,18 @@ current_screenshot_type = t; } -bool IsScreenshotRequested(void) +bool IsScreenshotRequested() { return (current_screenshot_type != SC_NONE); } -static bool MakeSmallScreenshot(void) +static bool MakeSmallScreenshot() { const ScreenshotFormat *sf = _screenshot_formats + _cur_screenshot_format; return sf->proc(MakeScreenshotName(sf->extension), CurrentScreenCallback, NULL, _screen.width, _screen.height, 8, _cur_palette); } -static bool MakeWorldScreenshot(void) +static bool MakeWorldScreenshot() { ViewPort vp; const ScreenshotFormat *sf; @@ -554,7 +554,7 @@ return sf->proc(MakeScreenshotName(sf->extension), LargeWorldCallback, &vp, vp.width, vp.height, 8, _cur_palette); } -bool MakeScreenshot(void) +bool MakeScreenshot() { switch (current_screenshot_type) { case SC_VIEWPORT:
--- a/src/screenshot.h +++ b/src/screenshot.h @@ -3,7 +3,7 @@ #ifndef SCREENSHOT_H #define SCREENSHOT_H -void InitializeScreenshotFormats(void); +void InitializeScreenshotFormats(); const char *GetScreenshotFormatDesc(int i); void SetScreenshotFormat(int i); @@ -14,9 +14,9 @@ SC_WORLD } ScreenshotType; -bool MakeScreenshot(void); +bool MakeScreenshot(); void SetScreenshotType(ScreenshotType t); -bool IsScreenshotRequested(void); +bool IsScreenshotRequested(); extern char _screenshot_format_name[8]; extern uint _num_screenshot_formats;
--- a/src/sdl.cpp +++ b/src/sdl.cpp @@ -65,7 +65,7 @@ SDLProcs sdl_proc; -static const char *LoadSdlDLL(void) +static const char *LoadSdlDLL() { if (sdl_proc.SDL_Init != NULL) return NULL;
--- a/src/sdl.h +++ b/src/sdl.h @@ -16,7 +16,7 @@ typedef struct SDLProcs { int (SDLCALL *SDL_Init)(Uint32); int (SDLCALL *SDL_InitSubSystem)(Uint32); - char *(SDLCALL *SDL_GetError)(void); + char *(SDLCALL *SDL_GetError)(); void (SDLCALL *SDL_QuitSubSystem)(Uint32); void (SDLCALL *SDL_UpdateRect)(SDL_Surface *, Sint32, Sint32, Uint32, Uint32); void (SDLCALL *SDL_UpdateRects)(SDL_Surface *, int, SDL_Rect *); @@ -26,15 +26,15 @@ void (SDLCALL *SDL_FreeSurface)(SDL_Surface *); int (SDLCALL *SDL_PollEvent)(SDL_Event *); void (SDLCALL *SDL_WarpMouse)(Uint16, Uint16); - uint32 (SDLCALL *SDL_GetTicks)(void); + uint32 (SDLCALL *SDL_GetTicks)(); int (SDLCALL *SDL_OpenAudio)(SDL_AudioSpec *, SDL_AudioSpec*); void (SDLCALL *SDL_PauseAudio)(int); - void (SDLCALL *SDL_CloseAudio)(void); + void (SDLCALL *SDL_CloseAudio)(); int (SDLCALL *SDL_LockSurface)(SDL_Surface*); void (SDLCALL *SDL_UnlockSurface)(SDL_Surface*); - SDLMod (SDLCALL *SDL_GetModState)(void); + SDLMod (SDLCALL *SDL_GetModState)(); void (SDLCALL *SDL_Delay)(Uint32); - void (SDLCALL *SDL_Quit)(void); + void (SDLCALL *SDL_Quit)(); SDL_Surface *(SDLCALL *SDL_SetVideoMode)(int, int, int, Uint32); int (SDLCALL *SDL_EnableKeyRepeat)(int, int); void (SDLCALL *SDL_EnableUNICODE)(int);
--- a/src/settings.cpp +++ b/src/settings.cpp @@ -153,7 +153,7 @@ }; // allocate an inifile object -static IniFile *ini_alloc(void) +static IniFile *ini_alloc() { IniFile *ini; SettingsMemoryPool *pool; @@ -1599,7 +1599,7 @@ } /** Load the values from the configuration files */ -void LoadFromConfig(void) +void LoadFromConfig() { IniFile *ini = ini_load(_config_file); HandleSettingDescs(ini, ini_load_settings, ini_load_setting_list); @@ -1609,7 +1609,7 @@ } /** Save the values to the configuration file */ -void SaveToConfig(void) +void SaveToConfig() { IniFile *ini = ini_load(_config_file); HandleSettingDescs(ini, ini_save_settings, ini_save_setting_list); @@ -1794,7 +1794,7 @@ SaveSettings((const SettingDesc*)sdg, NULL); } -static void Load_OPTS(void) +static void Load_OPTS() { /* Copy over default setting since some might not get loaded in * a networking environment. This ensures for example that the local @@ -1803,12 +1803,12 @@ LoadSettings(_gameopt_settings, &_opt); } -static void Save_OPTS(void) +static void Save_OPTS() { SaveSettings(_gameopt_settings, &_opt); } -static void Load_PATS(void) +static void Load_PATS() { /* Copy over default setting since some might not get loaded in * a networking environment. This ensures for example that the local @@ -1817,12 +1817,12 @@ LoadSettings(_patch_settings, &_patches); } -static void Save_PATS(void) +static void Save_PATS() { SaveSettings(_patch_settings, &_patches); } -void CheckConfig(void) +void CheckConfig() { // fix up news_display_opt from old to new int i; @@ -1842,7 +1842,7 @@ } } -void UpdatePatches(void) +void UpdatePatches() { /* Since old(er) savegames don't have any patches saved, we initialise * them with the default values just as it was in the old days.
--- a/src/settings_gui.cpp +++ b/src/settings_gui.cpp @@ -64,7 +64,7 @@ return buf; } -static int GetCurRes(void) +static int GetCurRes() { int i; @@ -77,7 +77,7 @@ return i; } -static inline bool RoadVehiclesAreBuilt(void) +static inline bool RoadVehiclesAreBuilt() { const Vehicle* v; @@ -88,7 +88,7 @@ } -static void ShowCustCurrency(void); +static void ShowCustCurrency(); static void GameOptionsWndProc(Window *w, WindowEvent *e) { @@ -289,7 +289,7 @@ }; -void ShowGameOptions(void) +void ShowGameOptions() { DeleteWindowById(WC_GAME_OPTIONS, 0); AllocateWindowDesc(&_game_options_desc); @@ -369,7 +369,7 @@ } } -extern void StartupEconomy(void); +extern void StartupEconomy(); enum { GAMEDIFF_WND_TOP_OFFSET = 45, @@ -551,7 +551,7 @@ GameDifficultyWndProc }; -void ShowGameDifficulty(void) +void ShowGameDifficulty() { DeleteWindowById(WC_GAME_OPTIONS, 0); /* Copy current settings (ingame or in intro) to temporary holding place @@ -914,7 +914,7 @@ PatchesSelectionWndProc, }; -void ShowPatchesSelection(void) +void ShowPatchesSelection() { DeleteWindowById(WC_GAME_OPTIONS, 0); AllocateWindowDesc(&_patches_selection_desc); @@ -1134,7 +1134,7 @@ CustCurrencyWndProc, }; -static void ShowCustCurrency(void) +static void ShowCustCurrency() { _str_separator[0] = _custom_currency.separator; _str_separator[1] = '\0';
--- a/src/ship_cmd.cpp +++ b/src/ship_cmd.cpp @@ -821,7 +821,7 @@ } -void ShipsYearlyLoop(void) +void ShipsYearlyLoop() { Vehicle *v;
--- a/src/signs.cpp +++ b/src/signs.cpp @@ -44,7 +44,7 @@ * Update the coordinates of all signs * */ -void UpdateAllSignVirtCoords(void) +void UpdateAllSignVirtCoords() { Sign *si; @@ -73,7 +73,7 @@ * * @return The pointer to the new sign, or NULL if there is no more free space */ -static Sign *AllocateSign(void) +static Sign *AllocateSign() { Sign *si; @@ -219,7 +219,7 @@ * Initialize the signs * */ -void InitializeSigns(void) +void InitializeSigns() { CleanPool(&_Sign_pool); AddBlockToPool(&_Sign_pool); @@ -241,7 +241,7 @@ * Save all signs * */ -static void Save_SIGN(void) +static void Save_SIGN() { Sign *si; @@ -256,7 +256,7 @@ * Load all signs * */ -static void Load_SIGN(void) +static void Load_SIGN() { int index; while ((index = SlIterateArray()) != -1) {
--- a/src/signs.h +++ b/src/signs.h @@ -18,7 +18,7 @@ DECLARE_OLD_POOL(Sign, Sign, 2, 16000) -static inline SignID GetMaxSignIndex(void) +static inline SignID GetMaxSignIndex() { /* TODO - This isn't the real content of the function, but * with the new pool-system this will be replaced with one that @@ -28,7 +28,7 @@ return GetSignPoolSize() - 1; } -static inline uint GetNumSigns(void) +static inline uint GetNumSigns() { return GetSignPoolSize(); } @@ -59,12 +59,12 @@ VARDEF bool _sign_sort_dirty; -void UpdateAllSignVirtCoords(void); +void UpdateAllSignVirtCoords(); void PlaceProc_Sign(TileIndex tile); /* misc.c */ void ShowRenameSignWindow(const Sign *si); -void ShowSignList(void); +void ShowSignList(); #endif /* SIGNS_H */
--- a/src/signs_gui.cpp +++ b/src/signs_gui.cpp @@ -37,7 +37,7 @@ return strcmp(buf1, _bufcache); // sort by name } -static void GlobalSortSignList(void) +static void GlobalSortSignList() { const Sign *si; uint n = 0; @@ -137,7 +137,7 @@ }; -void ShowSignList(void) +void ShowSignList() { Window *w;
--- a/src/smallmap_gui.cpp +++ b/src/smallmap_gui.cpp @@ -976,7 +976,7 @@ SmallMapWindowProc }; -void ShowSmallMap(void) +void ShowSmallMap() { Window *w; @@ -1089,7 +1089,7 @@ ExtraViewPortWndProc }; -void ShowExtraViewPortWindow(void) +void ShowExtraViewPortWindow() { Window *w, *v; int i = 0;
--- a/src/sound.cpp +++ b/src/sound.cpp @@ -93,7 +93,7 @@ } } -uint GetNumOriginalSounds(void) +uint GetNumOriginalSounds() { return _file_count; } @@ -177,7 +177,7 @@ 72, }; -void SndCopyToPool(void) +void SndCopyToPool() { uint i;
--- a/src/sound.h +++ b/src/sound.h @@ -29,7 +29,7 @@ } FileEntry; bool SoundInitialize(const char *filename); -uint GetNumOriginalSounds(void); +uint GetNumOriginalSounds(); typedef enum SoundFx { SND_BEGIN = 0, @@ -116,6 +116,6 @@ void SndPlayTileFx(SoundFx sound, TileIndex tile); void SndPlayVehicleFx(SoundFx sound, const Vehicle *v); void SndPlayFx(SoundFx sound); -void SndCopyToPool(void); +void SndCopyToPool(); #endif /* SOUND_H */
--- a/src/sound/cocoa_s.cpp +++ b/src/sound/cocoa_s.cpp @@ -116,7 +116,7 @@ } -static void CocoaSoundStop(void) +static void CocoaSoundStop() { struct AudioUnitInputCallback callback;
--- a/src/sound/null_s.cpp +++ b/src/sound/null_s.cpp @@ -4,7 +4,7 @@ #include "null_s.h" static const char *NullSoundStart(const char * const *parm) { return NULL; } -static void NullSoundStop(void) {} +static void NullSoundStop() {} const HalSoundDriver _null_sound_driver = { NullSoundStart,
--- a/src/sound/sdl_s.cpp +++ b/src/sound/sdl_s.cpp @@ -32,7 +32,7 @@ return NULL; } -static void SdlSoundStop(void) +static void SdlSoundStop() { SDL_CALL SDL_CloseAudio(); SdlClose(SDL_INIT_AUDIO);
--- a/src/sound/win32_s.cpp +++ b/src/sound/win32_s.cpp @@ -24,7 +24,7 @@ error("waveOutPrepareHeader failed"); } -static void FillHeaders(void) +static void FillHeaders() { WAVEHDR *hdr; @@ -69,7 +69,7 @@ return NULL; } -static void Win32SoundStop(void) +static void Win32SoundStop() { HWAVEOUT waveout = _waveout;
--- a/src/spritecache.cpp +++ b/src/spritecache.cpp @@ -64,9 +64,9 @@ static MemBlock *_spritecache_ptr; static int _compact_cache_counter; -static void CompactSpriteCache(void); +static void CompactSpriteCache(); -static bool ReadSpriteHeaderSkipData(void) +static bool ReadSpriteHeaderSkipData() { uint16 num = FioReadWord(); byte type; @@ -223,7 +223,7 @@ return (MemBlock*)((byte*)block + (block->size & ~S_FREE_MASK)); } -static uint32 GetSpriteCacheUsage(void) +static uint32 GetSpriteCacheUsage() { uint32 tot_size = 0; MemBlock* s; @@ -235,7 +235,7 @@ } -void IncreaseSpriteLRU(void) +void IncreaseSpriteLRU() { // Increase all LRU values if (_sprite_lru_counter > 16384) { @@ -265,7 +265,7 @@ // Called when holes in the sprite cache should be removed. // That is accomplished by moving the cached data. -static void CompactSpriteCache(void) +static void CompactSpriteCache() { MemBlock *s; @@ -306,7 +306,7 @@ } } -static void DeleteEntryFromSpriteCache(void) +static void DeleteEntryFromSpriteCache() { SpriteID i; uint best = UINT_MAX; @@ -403,7 +403,7 @@ } -void GfxInitSpriteMem(void) +void GfxInitSpriteMem() { // initialize sprite cache heap if (_spritecache_ptr == NULL) _spritecache_ptr = (MemBlock*)malloc(SPRITE_CACHE_SIZE);
--- a/src/spritecache.h +++ b/src/spritecache.h @@ -25,8 +25,8 @@ return (byte*)GetRawSprite(sprite); } -void GfxInitSpriteMem(void); -void IncreaseSpriteLRU(void); +void GfxInitSpriteMem(); +void IncreaseSpriteLRU(); bool LoadNextSprite(int load_index, byte file_index); void DupSprite(SpriteID old_spr, SpriteID new_spr);
--- a/src/station.cpp +++ b/src/station.cpp @@ -155,7 +155,7 @@ return IsTileType(tile, MP_STATION) && GetStationIndex(tile) == index && IsRailwayStation(tile); } -/*static*/ Station *Station::AllocateRaw(void) +/*static*/ Station *Station::AllocateRaw() { Station *st = NULL; @@ -467,7 +467,7 @@ /** Low-level function for allocating a RoadStop on the pool */ -RoadStop *RoadStop::AllocateRaw( void ) +RoadStop *RoadStop::AllocateRaw() { RoadStop *rs;
--- a/src/station.h +++ b/src/station.h @@ -76,7 +76,7 @@ bool IsEntranceBusy() const; void SetEntranceBusy(bool busy); protected: - static RoadStop *AllocateRaw(void); + static RoadStop *AllocateRaw(); }; typedef struct StationSpecList { @@ -184,7 +184,7 @@ bool IsValid() const; protected: - static Station *AllocateRaw(void); + static Station *AllocateRaw(); }; enum { @@ -218,15 +218,15 @@ void ModifyStationRatingAround(TileIndex tile, PlayerID owner, int amount, uint radius); void ShowStationViewWindow(StationID station); -void UpdateAllStationVirtCoord(void); +void UpdateAllStationVirtCoord(); /* sorter stuff */ -void RebuildStationLists(void); -void ResortStationLists(void); +void RebuildStationLists(); +void ResortStationLists(); DECLARE_OLD_POOL(Station, Station, 6, 1000) -static inline StationID GetMaxStationIndex(void) +static inline StationID GetMaxStationIndex() { /* TODO - This isn't the real content of the function, but * with the new pool-system this will be replaced with one that @@ -236,7 +236,7 @@ return GetStationPoolSize() - 1; } -static inline uint GetNumStations(void) +static inline uint GetNumStations() { return GetStationPoolSize(); } @@ -260,7 +260,7 @@ /* End of stuff for ROADSTOPS */ -void AfterLoadStations(void); +void AfterLoadStations(); void GetProductionAroundTiles(AcceptedCargo produced, TileIndex tile, int w, int h, int rad); void GetAcceptanceAroundTiles(AcceptedCargo accepts, TileIndex tile, int w, int h, int rad); @@ -270,7 +270,7 @@ RoadStop * GetRoadStopByTile(TileIndex tile, RoadStop::Type type); uint GetNumRoadStops(const Station* st, RoadStop::Type type); -RoadStop * AllocateRoadStop( void ); +RoadStop * AllocateRoadStop(); void ClearSlot(Vehicle *v); void DeleteOilRig(TileIndex t);
--- a/src/station_cmd.cpp +++ b/src/station_cmd.cpp @@ -330,7 +330,7 @@ } // Update the virtual coords needed to draw the station sign for all stations. -void UpdateAllStationVirtCoord(void) +void UpdateAllStationVirtCoord() { Station* st; @@ -2299,7 +2299,7 @@ if (b == 0) UpdateStationRating(st); } -void OnTick_Station(void) +void OnTick_Station() { if (_game_mode == GM_EDITOR) return; @@ -2312,7 +2312,7 @@ FOR_ALL_STATIONS(st) StationHandleSmallTick(st); } -void StationMonthlyLoop(void) +void StationMonthlyLoop() { } @@ -2643,7 +2643,7 @@ return CMD_ERROR; } -void InitializeStations(void) +void InitializeStations() { /* Clean the station pool and create 1 block in it */ CleanPool(&_Station_pool); @@ -2658,7 +2658,7 @@ } -void AfterLoadStations(void) +void AfterLoadStations() { /* Update the speclists of all stations to point to the currently loaded custom stations. */ Station *st; @@ -2814,7 +2814,7 @@ } } -static void Save_STNS(void) +static void Save_STNS() { Station *st; // Write the stations @@ -2824,7 +2824,7 @@ } } -static void Load_STNS(void) +static void Load_STNS() { int index; while ((index = SlIterateArray()) != -1) { @@ -2847,7 +2847,7 @@ if (_station_tick_ctr > GetMaxStationIndex()) _station_tick_ctr = 0; } -static void Save_ROADSTOP(void) +static void Save_ROADSTOP() { RoadStop *rs; @@ -2857,7 +2857,7 @@ } } -static void Load_ROADSTOP(void) +static void Load_ROADSTOP() { int index;
--- a/src/station_gui.cpp +++ b/src/station_gui.cpp @@ -170,7 +170,7 @@ } plstations_d; assert_compile(WINDOW_CUSTOM_SIZE >= sizeof(plstations_d)); -void RebuildStationLists(void) +void RebuildStationLists() { Window* const *wz; @@ -183,7 +183,7 @@ } } -void ResortStationLists(void) +void ResortStationLists() { Window* const *wz;
--- a/src/strgen/strgen.cpp +++ b/src/strgen/strgen.cpp @@ -938,7 +938,7 @@ // make a hash of the file to get a unique "version number" -static void MakeHashOfStrings(void) +static void MakeHashOfStrings() { uint32 hash = 0; uint i; @@ -1069,7 +1069,7 @@ return sum; } -static void PutArgidxCommand(void) +static void PutArgidxCommand() { PutUtf8(SCC_ARG_INDEX); PutByte(TranslateArgumentIdx(_cur_argidx));
--- a/src/strings.cpp +++ b/src/strings.cpp @@ -1180,7 +1180,7 @@ } // make a list of the available language packs. put the data in _dynlang struct. -void InitializeLanguagePacks(void) +void InitializeLanguagePacks() { DynamicLanguages *dl = &_dynlang; int i;
--- a/src/strings.h +++ b/src/strings.h @@ -9,6 +9,6 @@ extern char _userstring[128]; void InjectDParam(int amount); -int32 GetParamInt32(void); +int32 GetParamInt32(); #endif /* STRINGS_H */
--- a/src/subsidy_gui.cpp +++ b/src/subsidy_gui.cpp @@ -170,7 +170,7 @@ }; -void ShowSubsidiesList(void) +void ShowSubsidiesList() { AllocateWindowDescFront(&_subsidies_list_desc, 0); }
--- a/src/texteff.cpp +++ b/src/texteff.cpp @@ -55,7 +55,7 @@ extern void memcpy_pitch(void *dst, void *src, int w, int h, int srcpitch, int dstpitch); -static inline uint GetTextMessageCount(void) +static inline uint GetTextMessageCount() { uint i; @@ -112,7 +112,7 @@ _textmessage_dirty = true; } -void InitTextMessage(void) +void InitTextMessage() { uint i; @@ -122,7 +122,7 @@ } /* Hide the textbox */ -void UndrawTextMessage(void) +void UndrawTextMessage() { if (_textmessage_visible) { /* Sometimes we also need to hide the cursor @@ -160,7 +160,7 @@ } /* Check if a message is expired every day */ -void TextMessageDailyLoop(void) +void TextMessageDailyLoop() { uint i; @@ -184,7 +184,7 @@ } /* Draw the textmessage-box */ -void DrawTextMessage(void) +void DrawTextMessage() { uint y, count; @@ -277,7 +277,7 @@ MarkTextEffectAreaDirty(te); } -void MoveAllTextEffects(void) +void MoveAllTextEffects() { TextEffect *te; @@ -286,7 +286,7 @@ } } -void InitTextEffects(void) +void InitTextEffects() { TextEffect *te; @@ -357,7 +357,7 @@ return false; } -void AnimateAnimatedTiles(void) +void AnimateAnimatedTiles() { const TileIndex* ti; @@ -366,12 +366,12 @@ } } -void InitializeAnimatedTiles(void) +void InitializeAnimatedTiles() { memset(_animated_tile_list, 0, sizeof(_animated_tile_list)); } -static void SaveLoad_ANIT(void) +static void SaveLoad_ANIT() { /* In pre version 6, we has 16bit per tile, now we have 32bit per tile, convert it ;) */ if (CheckSavegameVersion(6)) {
--- a/src/tgp.cpp +++ b/src/tgp.cpp @@ -229,7 +229,7 @@ /** Allocate array of (MapSizeX()+1)*(MapSizeY()+1) heights and init the _height_map structure members */ -static inline bool AllocHeightMap(void) +static inline bool AllocHeightMap() { height_t *h; @@ -249,7 +249,7 @@ } /** Free height map */ -static inline void FreeHeightMap(void) +static inline void FreeHeightMap() { if (_height_map.h == NULL) return; free(_height_map.h); @@ -321,7 +321,7 @@ } /** Base Perlin noise generator - fills height map with raw Perlin noise */ -static void HeightMapGenerate(void) +static void HeightMapGenerate() { uint size_min = min(_height_map.size_x, _height_map.size_y); uint iteration_round = 0; @@ -524,7 +524,7 @@ * Please note that all the small numbers; 53, 101, 167, etc. are small primes * to help give the perlin noise a bit more of a random feel. */ -static void HeightMapCoastLines(void) +static void HeightMapCoastLines() { int smallest_size = min(_patches.map_x, _patches.map_y); const int margin = 4; @@ -610,7 +610,7 @@ } /** Smooth coasts by modulating height of tiles close to map edges with cosine of distance from edge */ -static void HeightMapSmoothCoasts(void) +static void HeightMapSmoothCoasts() { uint x, y; /* First Smooth NW and SE coasts (y close to 0 and y close to size_y) */ @@ -654,7 +654,7 @@ * - coast Smoothing * - slope Smoothing * - height histogram redistribution by sine wave transform */ -static void HeightMapNormalize(void) +static void HeightMapNormalize() { const amplitude_t water_percent = _water_percent[_opt.diff.quantity_sea_lakes]; const height_t h_max_new = I2H(_max_height[_opt.diff.terrain_type]); @@ -793,7 +793,7 @@ * areas wont be high enough, and there will be very little tropic on the map. * Thus Tropic works best on Hilly or Mountainous. */ -void GenerateTerrainPerlin(void) +void GenerateTerrainPerlin() { uint x, y;
--- a/src/tgp.h +++ b/src/tgp.h @@ -3,6 +3,6 @@ #ifndef TGP_H #define TGP_H -void GenerateTerrainPerlin(void); +void GenerateTerrainPerlin(); #endif /* TGP_H */
--- a/src/thread.cpp +++ b/src/thread.cpp @@ -8,7 +8,7 @@ #if defined(__AMIGA__) || defined(__MORPHOS__) || defined(PSP) || defined(NO_THREADS) OTTDThread *OTTDCreateThread(OTTDThreadFunc function, void *arg) { return NULL; } void *OTTDJoinThread(OTTDThread *t) { return NULL; } -void OTTDExitThread(void) { NOT_REACHED(); }; +void OTTDExitThread() { NOT_REACHED(); }; #elif defined(__OS2__) @@ -58,7 +58,7 @@ return ret; } -void OTTDExitThread(void) +void OTTDExitThread() { _endthread(); } @@ -96,7 +96,7 @@ return ret; } -void OTTDExitThread(void) +void OTTDExitThread() { pthread_exit(NULL); } @@ -151,7 +151,7 @@ return ret; } -void OTTDExitThread(void) +void OTTDExitThread() { ExitThread(0); }
--- a/src/thread.h +++ b/src/thread.h @@ -9,6 +9,6 @@ OTTDThread* OTTDCreateThread(OTTDThreadFunc, void*); void* OTTDJoinThread(OTTDThread*); -void OTTDExitThread(void); +void OTTDExitThread(); #endif /* THREAD_H */
--- a/src/town.h +++ b/src/town.h @@ -80,10 +80,10 @@ uint16 radius[5]; }; -uint32 GetWorldPopulation(void); +uint32 GetWorldPopulation(); void UpdateTownVirtCoord(Town *t); -void InitializeTown(void); +void InitializeTown(); void ShowTownViewWindow(TownID town); void ExpandTown(Town *t); Town *CreateRandomTown(uint attempts, uint size_mode); @@ -173,7 +173,7 @@ VARDEF uint _total_towns; -static inline TownID GetMaxTownIndex(void) +static inline TownID GetMaxTownIndex() { /* TODO - This isn't the real content of the function, but * with the new pool-system this will be replaced with one that @@ -183,7 +183,7 @@ return GetTownPoolSize() - 1; } -static inline uint GetNumTowns(void) +static inline uint GetNumTowns() { return _total_towns; } @@ -191,7 +191,7 @@ /** * Return a random valid town. */ -static inline Town *GetRandomTown(void) +static inline Town *GetRandomTown() { int num = RandomRange(GetNumTowns()); TownID index = INVALID_TOWN;
--- a/src/town_cmd.cpp +++ b/src/town_cmd.cpp @@ -251,7 +251,7 @@ if (_town_sort_order & 2) _town_sort_dirty = true; } -uint32 GetWorldPopulation(void) +uint32 GetWorldPopulation() { uint32 pop; const Town* t; @@ -442,7 +442,7 @@ UpdateTownRadius(t); } -void OnTick_Town(void) +void OnTick_Town() { if (_game_mode == GM_EDITOR) return; @@ -760,7 +760,7 @@ // Generate a random road block // The probability of a straight road // is somewhat higher than a curved. -static RoadBits GenRandomRoadBits(void) +static RoadBits GenRandomRoadBits() { uint32 r = Random(); uint a = GB(r, 0, 2); @@ -987,7 +987,7 @@ UpdateTownMaxPass(t); } -static Town *AllocateTown(void) +static Town *AllocateTown() { Town *t; @@ -1090,7 +1090,7 @@ static const byte _num_initial_towns[3] = {11, 23, 46}; -bool GenerateTowns(void) +bool GenerateTowns() { uint num = 0; uint n = ScaleByMapSize(_num_initial_towns[_opt.diff.number_towns] + (Random() & 7)); @@ -1807,7 +1807,7 @@ return true; } -void TownsMonthlyLoop(void) +void TownsMonthlyLoop() { Town *t; @@ -1823,7 +1823,7 @@ } } -void InitializeTowns(void) +void InitializeTowns() { Subsidy *s; @@ -1922,7 +1922,7 @@ SLE_END() }; -static void Save_TOWN(void) +static void Save_TOWN() { Town *t; @@ -1932,7 +1932,7 @@ } } -static void Load_TOWN(void) +static void Load_TOWN() { int index; @@ -1956,7 +1956,7 @@ _cur_town_ctr = 0; } -void AfterLoadTown(void) +void AfterLoadTown() { Town *t; FOR_ALL_TOWNS(t) {
--- a/src/town_gui.cpp +++ b/src/town_gui.cpp @@ -404,7 +404,7 @@ return r; } -static void MakeSortedTownList(void) +static void MakeSortedTownList() { const Town* t; uint n = 0; @@ -513,7 +513,7 @@ }; -void ShowTownDirectory(void) +void ShowTownDirectory() { Window *w = AllocateWindowDescFront(&_town_directory_desc, 0);
--- a/src/train.h +++ b/src/train.h @@ -215,8 +215,8 @@ return v->next; } -void ConvertOldMultiheadToNew(void); -void ConnectMultiheadedTrains(void); +void ConvertOldMultiheadToNew(); +void ConnectMultiheadedTrains(); uint CountArticulatedParts(EngineID engine_type); int CheckTrainInDepot(const Vehicle *v, bool needs_to_be_stopped);
--- a/src/train_cmd.cpp +++ b/src/train_cmd.cpp @@ -1979,7 +1979,7 @@ } -void OnTick_Train(void) +void OnTick_Train() { _age_cargo_skip_counter = (_age_cargo_skip_counter == 0) ? 184 : (_age_cargo_skip_counter - 1); } @@ -3495,7 +3495,7 @@ } } -void TrainsYearlyLoop(void) +void TrainsYearlyLoop() { Vehicle *v; @@ -3520,7 +3520,7 @@ } -void InitializeTrains(void) +void InitializeTrains() { _age_cargo_skip_counter = 1; } @@ -3529,7 +3529,7 @@ * Link front and rear multiheaded engines to each other * This is done when loading a savegame */ -void ConnectMultiheadedTrains(void) +void ConnectMultiheadedTrains() { Vehicle *v; @@ -3577,7 +3577,7 @@ * Converts all trains to the new subtype format introduced in savegame 16.2 * It also links multiheaded engines or make them forget they are multiheaded if no suitable partner is found */ -void ConvertOldMultiheadToNew(void) +void ConvertOldMultiheadToNew() { Vehicle *v; FOR_ALL_VEHICLES(v) {
--- a/src/tree_cmd.cpp +++ b/src/tree_cmd.cpp @@ -84,7 +84,7 @@ } } -static void PlaceMoreTrees(void) +static void PlaceMoreTrees() { uint i = ScaleByMapSize(GB(Random(), 0, 5) + 25); do { @@ -124,7 +124,7 @@ } } -void PlaceTreesRandomly(void) +void PlaceTreesRandomly() { uint i, j, ht; @@ -180,7 +180,7 @@ } } -void GenerateTrees(void) +void GenerateTrees() { uint i, total; @@ -604,7 +604,7 @@ MarkTileDirtyByTile(tile); } -void OnTick_Trees(void) +void OnTick_Trees() { uint32 r; TileIndex tile; @@ -654,7 +654,7 @@ /* not used */ } -void InitializeTrees(void) +void InitializeTrees() { _trees_tick_ctr = 0; }
--- a/src/unix.cpp +++ b/src/unix.cpp @@ -59,7 +59,7 @@ #endif } -void FiosGetDrives(void) +void FiosGetDrives() { return; } @@ -130,9 +130,9 @@ } #ifdef WITH_COCOA -void cocoaSetWorkingDirectory(void); -void cocoaSetupAutoreleasePool(void); -void cocoaReleaseAutoreleasePool(void); +void cocoaSetWorkingDirectory(); +void cocoaSetupAutoreleasePool(); +void cocoaReleaseAutoreleasePool(); #endif int CDECL main(int argc, char* argv[]) @@ -168,7 +168,7 @@ return ret; } -void DeterminePaths(void) +void DeterminePaths() { char *s; @@ -299,7 +299,7 @@ /** Try and try to decipher the current locale from environmental * variables. MacOSX is hardcoded, other OS's are dynamic. If no suitable * locale can be found, don't do any conversion "" */ -static const char *GetLocalCode(void) +static const char *GetLocalCode() { #if defined(__APPLE__) return "UTF-8-MAC";
--- a/src/unmovable_cmd.cpp +++ b/src/unmovable_cmd.cpp @@ -335,7 +335,7 @@ return false; } -void GenerateUnmovables(void) +void GenerateUnmovables() { int i, li, j, loop_count; TileIndex tile;
--- a/src/vehicle.cpp +++ b/src/vehicle.cpp @@ -217,7 +217,7 @@ } // Called after load to update coordinates -void AfterLoadVehicles(void) +void AfterLoadVehicles() { Vehicle *v; @@ -284,12 +284,12 @@ * Get a value for a vehicle's random_bits. * @return A random value from 0 to 255. */ -byte VehicleRandomBits(void) +byte VehicleRandomBits() { return GB(Random(), 0, 8); } -Vehicle *ForceAllocateSpecialVehicle(void) +Vehicle *ForceAllocateSpecialVehicle() { /* This stays a strange story.. there should always be room for special * vehicles (special effects all over the map), but with 65k of vehicles @@ -344,7 +344,7 @@ } -Vehicle *AllocateVehicle(void) +Vehicle *AllocateVehicle() { VehicleID counter = 0; return AllocateSingleVehicle(&counter); @@ -446,12 +446,12 @@ } } -void ResetVehiclePosHash(void) +void ResetVehiclePosHash() { memset(_vehicle_position_hash, 0, sizeof(_vehicle_position_hash)); } -void InitializeVehicles(void) +void InitializeVehicles() { uint i; @@ -647,7 +647,7 @@ DisasterVehicle_Tick, }; -void CallVehicleTicks(void) +void CallVehicleTicks() { Vehicle *v; @@ -3223,7 +3223,7 @@ }; // Will be called when the vehicles need to be saved. -static void Save_VEHS(void) +static void Save_VEHS() { Vehicle *v; // Write the vehicles @@ -3234,7 +3234,7 @@ } // Will be called when vehicles need to be loaded. -static void Load_VEHS(void) +static void Load_VEHS() { int index; Vehicle *v;
--- a/src/vehicle.h +++ b/src/vehicle.h @@ -322,12 +322,12 @@ typedef void *VehicleFromPosProc(Vehicle *v, void *data); void VehicleServiceInDepot(Vehicle *v); -Vehicle *AllocateVehicle(void); +Vehicle *AllocateVehicle(); bool AllocateVehicles(Vehicle **vl, int num); -Vehicle *ForceAllocateVehicle(void); -Vehicle *ForceAllocateSpecialVehicle(void); +Vehicle *ForceAllocateVehicle(); +Vehicle *ForceAllocateSpecialVehicle(); void VehiclePositionChanged(Vehicle *v); -void AfterLoadVehicles(void); +void AfterLoadVehicles(); Vehicle *GetLastVehicleInChain(Vehicle *v); Vehicle *GetPrevVehicleInChain(const Vehicle *v); Vehicle *GetFirstVehicleInChain(const Vehicle *v); @@ -335,12 +335,12 @@ bool IsEngineCountable(const Vehicle *v); void DeleteVehicleChain(Vehicle *v); void *VehicleFromPos(TileIndex tile, void *data, VehicleFromPosProc *proc); -void CallVehicleTicks(void); +void CallVehicleTicks(); Vehicle *FindVehicleOnTileZ(TileIndex tile, byte z); -void InitializeTrains(void); -byte VehicleRandomBits(void); -void ResetVehiclePosHash(void); +void InitializeTrains(); +byte VehicleRandomBits(); +void ResetVehiclePosHash(); bool CanFillVehicle(Vehicle *v); bool CanRefitTo(EngineID engine_type, CargoID cid_to); @@ -437,7 +437,7 @@ DECLARE_OLD_POOL(Vehicle, Vehicle, 9, 125) -static inline VehicleID GetMaxVehicleIndex(void) +static inline VehicleID GetMaxVehicleIndex() { /* TODO - This isn't the real content of the function, but * with the new pool-system this will be replaced with one that @@ -447,7 +447,7 @@ return GetVehiclePoolSize() - 1; } -static inline uint GetNumVehicles(void) +static inline uint GetNumVehicles() { return GetVehiclePoolSize(); }
--- a/src/vehicle_gui.cpp +++ b/src/vehicle_gui.cpp @@ -90,7 +90,7 @@ INVALID_STRING_ID }; -void RebuildVehicleLists(void) +void RebuildVehicleLists() { Window* const *wz; @@ -111,7 +111,7 @@ } } -void ResortVehicleLists(void) +void ResortVehicleLists() { Window* const *wz; @@ -702,7 +702,7 @@ return (_internal_sort_order & 1) ? -r : r; } -void InitializeGUI(void) +void InitializeGUI() { memset(&_sorting, 0, sizeof(_sorting)); }
--- a/src/vehicle_gui.h +++ b/src/vehicle_gui.h @@ -8,11 +8,11 @@ void DrawVehicleProfitButton(const Vehicle *v, int x, int y); void ShowVehicleRefitWindow(const Vehicle *v, VehicleOrderID order); -void InitializeVehiclesGuiList(void); +void InitializeVehiclesGuiList(); /* sorter stuff */ -void RebuildVehicleLists(void); -void ResortVehicleLists(void); +void RebuildVehicleLists(); +void ResortVehicleLists(); #define PERIODIC_RESORT_DAYS 10
--- a/src/video/cocoa_v.mm +++ b/src/video/cocoa_v.mm @@ -41,8 +41,8 @@ extern "C" OSErr CPSSetFrontProcess(CPSProcessSerNum* psn); /* From Menus.h (according to Xcode Developer Documentation) */ -extern "C" void ShowMenuBar(void); -extern "C" void HideMenuBar(void); +extern "C" void ShowMenuBar(); +extern "C" void HideMenuBar(); /* Disables a warning. This is needed since the method exists but has been dropped from the header, supposedly as of 10.4. */ #if (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_4) @@ -126,12 +126,12 @@ @end -static void QZ_Draw(void); -static void QZ_UnsetVideoMode(void); +static void QZ_Draw(); +static void QZ_UnsetVideoMode(); static void QZ_UpdatePalette(uint start, uint count); static void QZ_WarpCursor(int x, int y); -static void QZ_ShowMouse(void); -static void QZ_HideMouse(void); +static void QZ_ShowMouse(); +static void QZ_HideMouse(); static void CocoaVideoFullScreen(bool full_screen); @@ -192,7 +192,7 @@ * Game loop and accessories * ******************************************************************************/ -static uint32 GetTick(void) +static uint32 GetTick() { struct timeval tim; @@ -200,7 +200,7 @@ return tim.tv_usec / 1000 + tim.tv_sec * 1000; } -static void QZ_CheckPaletteAnim(void) +static void QZ_CheckPaletteAnim() { if (_pal_last_dirty != -1) { QZ_UpdatePalette(_pal_first_dirty, _pal_last_dirty - _pal_first_dirty + 1); @@ -469,7 +469,7 @@ } -static bool QZ_PollEvent(void) +static bool QZ_PollEvent() { NSEvent *event; NSPoint pt; @@ -663,7 +663,7 @@ } -static void QZ_GameLoop(void) +static void QZ_GameLoop() { uint32 cur_ticks = GetTick(); uint32 next_tick = cur_ticks + 30; @@ -764,7 +764,7 @@ * The genie effect uses the alpha component. Otherwise, * it doesn't seem to matter what value it has. */ -static void QZ_SetPortAlphaOpaque(void) +static void QZ_SetPortAlphaOpaque() { if (_cocoa_video_data.device_bpp == 32) { uint32* pixels = (uint32*)_cocoa_video_data.realpixels; @@ -1032,7 +1032,7 @@ 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0 }; -static void QZ_DrawResizeIcon(void) +static void QZ_DrawResizeIcon() { int xoff = _cocoa_video_data.width - 16; int yoff = _cocoa_video_data.height - 16; @@ -1054,7 +1054,7 @@ } } -static void QZ_DrawWindow(void) +static void QZ_DrawWindow() { int i; RgnHandle dirty, temp; @@ -1421,7 +1421,7 @@ } /* Wait for the VBL to occur (estimated since we don't have a hardware interrupt) */ -static void QZ_WaitForVerticalBlank(void) +static void QZ_WaitForVerticalBlank() { /* The VBL delay is based on Ian Ollmann's RezLib <iano@cco.caltech.edu> */ double refreshRate; @@ -1452,7 +1452,7 @@ } -static void QZ_DrawScreen(void) +static void QZ_DrawScreen() { const uint8* src = _cocoa_video_data.pixels; uint8* dst = (uint8*)_cocoa_video_data.realpixels; @@ -1579,12 +1579,12 @@ } } -static void QZ_InitPalette(void) +static void QZ_InitPalette() { QZ_UpdatePalette(0, 256); } -static void QZ_Draw(void) +static void QZ_Draw() { if (_cocoa_video_data.fullscreen) { QZ_DrawScreen(); @@ -1608,7 +1608,7 @@ {1920, 1200} }; -static void QZ_UpdateVideoModes(void) +static void QZ_UpdateVideoModes() { uint i, j, count; OTTDPoint modes[32]; @@ -1636,7 +1636,7 @@ _num_resolutions = j; } -static void QZ_UnsetVideoMode(void) +static void QZ_UnsetVideoMode() { if (_cocoa_video_data.fullscreen) { /* Release fullscreen resources */ @@ -1719,7 +1719,7 @@ return ret; } -static void QZ_VideoInit(void) +static void QZ_VideoInit() { memset(&_cocoa_video_data, 0, sizeof(_cocoa_video_data)); @@ -1789,7 +1789,7 @@ /* Generate the mouse moved event */ } -static void QZ_ShowMouse(void) +static void QZ_ShowMouse() { if (!_cocoa_video_data.cursor_visible) { [ NSCursor unhide ]; @@ -1802,7 +1802,7 @@ } } -static void QZ_HideMouse(void) +static void QZ_HideMouse() { if (_cocoa_video_data.cursor_visible) { #ifndef _DEBUG @@ -1842,7 +1842,7 @@ } @end -static void setApplicationMenu(void) +static void setApplicationMenu() { /* warning: this code is very odd */ NSMenu *appleMenu; @@ -1887,7 +1887,7 @@ } /* Create a window menu */ -static void setupWindowMenu(void) +static void setupWindowMenu() { NSMenu* windowMenu; NSMenuItem* windowMenuItem; @@ -1913,7 +1913,7 @@ [windowMenuItem release]; } -static void setupApplication(void) +static void setupApplication() { CPSProcessSerNum PSN; @@ -1942,7 +1942,7 @@ * Video driver interface * ******************************************************************************/ -static void CocoaVideoStop(void) +static void CocoaVideoStop() { if (!_cocoa_video_started) return; @@ -1986,7 +1986,7 @@ _cocoa_video_data.num_dirty_rects++; } -static void CocoaVideoMainLoop(void) +static void CocoaVideoMainLoop() { /* Start the main event loop */ [NSApp run]; @@ -2044,7 +2044,7 @@ /* This is needed since OS X applications are started with the working dir set to / when double-clicked */ -void cocoaSetWorkingDirectory(void) +void cocoaSetWorkingDirectory() { char parentdir[MAXPATHLEN]; int chdir_ret; @@ -2061,12 +2061,12 @@ /* These are called from main() to prevent a _NSAutoreleaseNoPool error when * exiting before the cocoa video driver has been loaded */ -void cocoaSetupAutoreleasePool(void) +void cocoaSetupAutoreleasePool() { _ottd_autorelease_pool = [[NSAutoreleasePool alloc] init]; } -void cocoaReleaseAutoreleasePool(void) +void cocoaReleaseAutoreleasePool() { [_ottd_autorelease_pool release]; }
--- a/src/video/dedicated_v.cpp +++ b/src/video/dedicated_v.cpp @@ -33,7 +33,7 @@ /** * Switches OpenTTD to a console app at run-time, instead of a PM app * Necessary to see stdout, etc. */ -static void OS2_SwitchToConsoleMode(void) +static void OS2_SwitchToConsoleMode() { PPIB pib; PTIB tib; @@ -74,7 +74,7 @@ static char _win_console_thread_buffer[200]; /* Windows Console thread. Just loop and signal when input has been received */ -static void WINAPI CheckForConsoleInput(void) +static void WINAPI CheckForConsoleInput() { while (true) { fgets(_win_console_thread_buffer, lengthof(_win_console_thread_buffer), stdin); @@ -85,7 +85,7 @@ } } -static void CreateWindowsConsoleThread(void) +static void CreateWindowsConsoleThread() { DWORD dwThreadId; /* Create event to signal when console input is ready */ @@ -99,7 +99,7 @@ DEBUG(driver, 2, "Windows console thread started"); } -static void CloseWindowsConsoleThread(void) +static void CloseWindowsConsoleThread() { CloseHandle(_hThread); CloseHandle(_hInputReady); @@ -140,7 +140,7 @@ return NULL; } -static void DedicatedVideoStop(void) +static void DedicatedVideoStop() { #ifdef WIN32 CloseWindowsConsoleThread(); @@ -153,7 +153,7 @@ static void DedicatedVideoFullScreen(bool fs) {} #if defined(UNIX) || defined(__OS2__) || defined(PSP) -static bool InputWaiting(void) +static bool InputWaiting() { struct timeval tv; fd_set readfds; @@ -168,7 +168,7 @@ return select(STDIN + 1, &readfds, NULL, NULL, &tv) > 0; } -static uint32 GetTime(void) +static uint32 GetTime() { struct timeval tim; @@ -178,19 +178,19 @@ #else -static bool InputWaiting(void) +static bool InputWaiting() { return WaitForSingleObject(_hInputReady, 1) == WAIT_OBJECT_0; } -static uint32 GetTime(void) +static uint32 GetTime() { return GetTickCount(); } #endif -static void DedicatedHandleKeyInput(void) +static void DedicatedHandleKeyInput() { static char input_line[200] = ""; @@ -225,7 +225,7 @@ IConsoleCmdExec(input_line); // execute command } -static void DedicatedVideoMainLoop(void) +static void DedicatedVideoMainLoop() { uint32 cur_ticks = GetTime(); uint32 next_tick = cur_ticks + 30;
--- a/src/video/null_v.cpp +++ b/src/video/null_v.cpp @@ -17,11 +17,11 @@ return NULL; } -static void NullVideoStop(void) { free(_null_video_mem); } +static void NullVideoStop() { free(_null_video_mem); } static void NullVideoMakeDirty(int left, int top, int width, int height) {} -static void NullVideoMainLoop(void) +static void NullVideoMainLoop() { uint i;
--- a/src/video/sdl_v.cpp +++ b/src/video/sdl_v.cpp @@ -49,12 +49,12 @@ SDL_CALL SDL_SetColors(_sdl_screen, pal, start, count); } -static void InitPalette(void) +static void InitPalette() { UpdatePalette(0, 256); } -static void CheckPaletteAnim(void) +static void CheckPaletteAnim() { if (_pal_last_dirty != -1) { UpdatePalette(_pal_first_dirty, _pal_last_dirty - _pal_first_dirty + 1); @@ -62,7 +62,7 @@ } } -static void DrawSurfaceToScreen(void) +static void DrawSurfaceToScreen() { int n = _num_dirty_rects; if (n != 0) { @@ -88,7 +88,7 @@ {1920, 1200} }; -static void GetVideoModes(void) +static void GetVideoModes() { int i; SDL_Rect **modes; @@ -301,7 +301,7 @@ return (key << 16) + sym->unicode; } -static int PollEvent(void) +static int PollEvent() { SDL_Event ev; @@ -415,12 +415,12 @@ return NULL; } -static void SdlVideoStop(void) +static void SdlVideoStop() { SdlClose(SDL_INIT_VIDEO); } -static void SdlVideoMainLoop(void) +static void SdlVideoMainLoop() { uint32 cur_ticks = SDL_CALL SDL_GetTicks(); uint32 next_tick = cur_ticks + 30;
--- a/src/video/win32_v.cpp +++ b/src/video/win32_v.cpp @@ -37,7 +37,7 @@ uint _fullscreen_bpp; static uint16 _bck_resolution[2]; -static void MakePalette(void) +static void MakePalette() { LOGPALETTE *pal; uint i; @@ -156,7 +156,7 @@ #ifdef _DEBUG // Keep this function here.. // It allows you to redraw the screen from within the MSVC debugger -int RedrawScreenDebug(void) +int RedrawScreenDebug() { HDC dc,dc2; static int _fooctr; @@ -511,7 +511,7 @@ return DefWindowProc(hwnd, msg, wParam, lParam); } -static void RegisterWndClass(void) +static void RegisterWndClass() { static bool registered = false; @@ -681,7 +681,7 @@ { 1920, 1200 } }; -static void FindResolutions(void) +static void FindResolutions() { uint n = 0; #if defined(WINCE) @@ -749,7 +749,7 @@ return NULL; } -static void Win32GdiStop(void) +static void Win32GdiStop() { DeleteObject(_wnd.gdi_palette); DeleteObject(_wnd.dib_sect); @@ -798,14 +798,14 @@ InvalidateRect(_wnd.main_wnd, &r, FALSE); } -static void CheckPaletteAnim(void) +static void CheckPaletteAnim() { if (_pal_last_dirty == -1) return; InvalidateRect(_wnd.main_wnd, NULL, FALSE); } -static void Win32GdiMainLoop(void) +static void Win32GdiMainLoop() { MSG mesg; uint32 cur_ticks = GetTickCount();
--- a/src/viewport.cpp +++ b/src/viewport.cpp @@ -129,7 +129,7 @@ return p; } -void InitViewports(void) { +void InitViewports() { memset(_viewports, 0, sizeof(_viewports)); _active_viewports = 0; } @@ -371,7 +371,7 @@ return pt; } -Point GetTileBelowCursor(void) +Point GetTileBelowCursor() { return GetTileFromScreenXY(_cursor.pos.x, _cursor.pos.y, _cursor.pos.x, _cursor.pos.y); } @@ -534,12 +534,12 @@ if (vd->combine_sprites == 1) vd->combine_sprites = 2; } -void StartSpriteCombine(void) +void StartSpriteCombine() { _cur_vd->combine_sprites = 1; } -void EndSpriteCombine(void) +void EndSpriteCombine() { _cur_vd->combine_sprites = 0; } @@ -725,7 +725,7 @@ } } -static void ViewportAddLandscape(void) +static void ViewportAddLandscape() { ViewportDrawer *vd = _cur_vd; int x, y, width, height; @@ -1445,7 +1445,7 @@ ); } -static void SetSelectionTilesDirty(void) +static void SetSelectionTilesDirty() { int y_size, x_size; int x = _thd.pos.x; @@ -1743,7 +1743,7 @@ } } -Vehicle *CheckMouseOverVehicle(void) +Vehicle *CheckMouseOverVehicle() { const Window *w; const ViewPort *vp; @@ -1760,7 +1760,7 @@ -void PlaceObject(void) +void PlaceObject() { Point pt; Window *w; @@ -1866,7 +1866,7 @@ } // called regular to update tile highlighting in all cases -void UpdateTileSelection(void) +void UpdateTileSelection() { int x1; int y1; @@ -1976,7 +1976,7 @@ if (distance > 1) GuiShowTooltipsWithArgs(STR_MEASURE_LENGTH, 1, &distance); } -static void VpStartPreSizing(void) +static void VpStartPreSizing() { _thd.selend.x = -1; _special_mouse_mode = WSM_PRESIZE; @@ -2385,7 +2385,7 @@ } // while dragging -bool VpHandlePlaceSizingDrag(void) +bool VpHandlePlaceSizingDrag() { Window *w; WindowEvent e; @@ -2477,7 +2477,7 @@ SetMouseCursor(icon, pal); } -void ResetObjectToPlace(void) +void ResetObjectToPlace() { SetObjectToPlace(SPR_CURSOR_MOUSE, PAL_NONE, VHM_NONE, WC_MAIN_WINDOW, 0); }
--- a/src/viewport.h +++ b/src/viewport.h @@ -16,12 +16,12 @@ void SetSelectionRed(bool); /* viewport.c */ -void InitViewports(void); +void InitViewports(); void DeleteWindowViewport(Window *w); void AssignWindowViewport(Window *w, int x, int y, int width, int height, uint32 follow_flags, byte zoom); ViewPort *IsPtInWindowViewport(const Window *w, int x, int y); -Point GetTileBelowCursor(void); +Point GetTileBelowCursor(); void UpdateViewportPosition(Window *w); enum { @@ -49,11 +49,11 @@ void AddChildSpriteScreen(SpriteID image, SpriteID pal, int x, int y); -void StartSpriteCombine(void); -void EndSpriteCombine(void); +void StartSpriteCombine(); +void EndSpriteCombine(); void HandleViewportClicked(const ViewPort *vp, int x, int y); -void PlaceObject(void); +void PlaceObject(); void SetRedErrorSquare(TileIndex tile); void SetTileSelectSize(int w, int h); void SetTileSelectBigSize(int ox, int oy, int sx, int sy); @@ -62,7 +62,7 @@ void VpSetPresizeRange(uint from, uint to); void VpSetPlaceSizingLimit(int limit); -Vehicle *CheckMouseOverVehicle(void); +Vehicle *CheckMouseOverVehicle(); enum { VPM_X_OR_Y = 0,
--- a/src/waypoint.cpp +++ b/src/waypoint.cpp @@ -40,7 +40,7 @@ DEFINE_OLD_POOL(Waypoint, Waypoint, WaypointPoolNewBlock, NULL) /* Create a new waypoint */ -static Waypoint* AllocateWaypoint(void) +static Waypoint* AllocateWaypoint() { Waypoint *wp; @@ -82,7 +82,7 @@ } /* Update all signs */ -void UpdateAllWaypointSigns(void) +void UpdateAllWaypointSigns() { Waypoint *wp; @@ -151,7 +151,7 @@ * Update waypoint graphics id against saved GRFID/localidx. * This is to ensure the chosen graphics are correct if GRF files are changed. */ -void AfterLoadWaypoints(void) +void AfterLoadWaypoints() { Waypoint *wp; @@ -254,7 +254,7 @@ } /* Daily loop for waypoints */ -void WaypointsDailyLoop(void) +void WaypointsDailyLoop() { Waypoint *wp; @@ -379,7 +379,7 @@ } /* Fix savegames which stored waypoints in their old format */ -void FixOldWaypoints(void) +void FixOldWaypoints() { Waypoint *wp; @@ -394,7 +394,7 @@ } } -void InitializeWaypoints(void) +void InitializeWaypoints() { CleanPool(&_Waypoint_pool); AddBlockToPool(&_Waypoint_pool); @@ -416,7 +416,7 @@ SLE_END() }; -static void Save_WAYP(void) +static void Save_WAYP() { Waypoint *wp; @@ -426,7 +426,7 @@ } } -static void Load_WAYP(void) +static void Load_WAYP() { int index;
--- a/src/waypoint.h +++ b/src/waypoint.h @@ -66,8 +66,8 @@ Station *ComposeWaypointStation(TileIndex tile); void ShowRenameWaypointWindow(const Waypoint *cp); void DrawWaypointSprite(int x, int y, int image, RailType railtype); -void FixOldWaypoints(void); -void UpdateAllWaypointSigns(void); -void AfterLoadWaypoints(void); +void FixOldWaypoints(); +void UpdateAllWaypointSigns(); +void AfterLoadWaypoints(); #endif /* WAYPOINT_H */
--- a/src/win32.cpp +++ b/src/win32.cpp @@ -221,7 +221,7 @@ _T("Be aware that critical parts of the internal game state may have become ") _T("corrupted. The saved game is not guaranteed to work."); -static bool EmergencySave(void) +static bool EmergencySave() { SaveOrLoad("crash.sav", SL_SAVE); return true; @@ -431,14 +431,14 @@ return FALSE; } -static void Handler2(void) +static void Handler2() { ShowCursor(TRUE); ShowWindow(GetActiveWindow(), FALSE); DialogBox(GetModuleHandle(NULL), MAKEINTRESOURCE(100), NULL, CrashDialogFunc); } -extern bool CloseConsoleLogIfActive(void); +extern bool CloseConsoleLogIfActive(); static LONG WINAPI ExceptionHandler(EXCEPTION_POINTERS *ep) { @@ -607,10 +607,10 @@ } #ifdef _M_AMD64 -extern "C" void *_get_save_esp(void); +extern "C" void *_get_save_esp(); #endif -static void Win32InitializeExceptions(void) +static void Win32InitializeExceptions() { #ifdef _M_AMD64 _safe_esp = _get_save_esp(); @@ -636,7 +636,7 @@ static DIR _global_dir; static LONG _global_dir_is_in_use = false; -static inline DIR *dir_calloc(void) +static inline DIR *dir_calloc() { DIR *d; @@ -728,7 +728,7 @@ return file[3] == '\0'; // C:\... } -void FiosGetDrives(void) +void FiosGetDrives() { TCHAR drives[256]; const TCHAR *s; @@ -815,7 +815,7 @@ return n; } -void CreateConsole(void) +void CreateConsole() { HANDLE hand; CONSOLE_SCREEN_BUFFER_INFO coninfo; @@ -944,7 +944,7 @@ } #endif -void DeterminePaths(void) +void DeterminePaths() { char *s, *cfg; wchar_t path[MAX_PATH]; @@ -1057,7 +1057,7 @@ // Utility function to get the current timestamp in milliseconds // Useful for profiling -int64 GetTS(void) +int64 GetTS() { static double freq; __int64 value;
--- a/src/window.cpp +++ b/src/window.cpp @@ -499,7 +499,7 @@ * - Any sticked windows since we wanted to keep these * @return w pointer to the window that is going to be deleted */ -static Window *FindDeletableWindow(void) +static Window *FindDeletableWindow() { Window* const *wz; @@ -519,7 +519,7 @@ * @see FindDeletableWindow() * @return w Pointer to the window that is being deleted */ -static Window *ForceFindDeletableWindow(void) +static Window *ForceFindDeletableWindow() { Window* const *wz; @@ -555,7 +555,7 @@ } } -static Window *FindFreeWindow(void) +static Window *FindFreeWindow() { Window *w; @@ -891,7 +891,7 @@ return NULL; } -void InitWindowSystem(void) +void InitWindowSystem() { IConsoleClose(); @@ -901,7 +901,7 @@ _no_scroll = 0; } -void UnInitWindowSystem(void) +void UnInitWindowSystem() { Window **wz; @@ -919,7 +919,7 @@ assert(_last_z_window == _z_windows); } -void ResetWindowSystem(void) +void ResetWindowSystem() { UnInitWindowSystem(); InitWindowSystem(); @@ -929,7 +929,7 @@ _thd.new_pos.y = 0; } -static void DecreaseWindowCounters(void) +static void DecreaseWindowCounters() { Window *w; Window* const *wz; @@ -954,12 +954,12 @@ } } -Window *GetCallbackWnd(void) +Window *GetCallbackWnd() { return FindWindowById(_thd.window_class, _thd.window_number); } -static void HandlePlacePresize(void) +static void HandlePlacePresize() { Window *w; WindowEvent e; @@ -979,7 +979,7 @@ w->wndproc(w, &e); } -static bool HandleDragDrop(void) +static bool HandleDragDrop() { Window *w; WindowEvent e; @@ -1003,7 +1003,7 @@ return false; } -static bool HandlePopupMenu(void) +static bool HandlePopupMenu() { Window *w; WindowEvent e; @@ -1030,7 +1030,7 @@ return false; } -static bool HandleMouseOver(void) +static bool HandleMouseOver() { Window *w; WindowEvent e; @@ -1114,7 +1114,7 @@ static bool _dragging_window; -static bool HandleWindowDragging(void) +static bool HandleWindowDragging() { Window* const *wz; // Get out immediately if no window is being dragged at all. @@ -1338,7 +1338,7 @@ } -static bool HandleScrollbarScrolling(void) +static bool HandleScrollbarScrolling() { Window* const *wz; int i; @@ -1385,7 +1385,7 @@ return false; } -static bool HandleViewportScroll(void) +static bool HandleViewportScroll() { WindowEvent e; Window *w; @@ -1580,12 +1580,12 @@ } } -extern void UpdateTileSelection(void); -extern bool VpHandlePlaceSizingDrag(void); +extern void UpdateTileSelection(); +extern bool VpHandlePlaceSizingDrag(); static int _input_events_this_tick = 0; -static void HandleAutoscroll(void) +static void HandleAutoscroll() { Window *w; ViewPort *vp; @@ -1700,7 +1700,7 @@ } } -void HandleMouseEvents(void) +void HandleMouseEvents() { int click; int mousewheel; @@ -1738,13 +1738,13 @@ MouseLoop(click, mousewheel); } -void InputLoop(void) +void InputLoop() { HandleMouseEvents(); HandleAutoscroll(); } -void UpdateWindows(void) +void UpdateWindows() { Window* const *wz; static int we4_timer = 0; @@ -1857,7 +1857,7 @@ } } -void CallWindowTickEvent(void) +void CallWindowTickEvent() { Window* const *wz; @@ -1866,7 +1866,7 @@ } } -void DeleteNonVitalWindows(void) +void DeleteNonVitalWindows() { Window* const *wz; @@ -1895,7 +1895,7 @@ * with this function. It closes all windows calling the standard function, * then, does a little hacked loop of closing all stickied windows. Note * that standard windows (status bar, etc.) are not stickied, so these aren't affected */ -void DeleteAllNonVitalWindows(void) +void DeleteAllNonVitalWindows() { Window* const *wz; @@ -1915,7 +1915,7 @@ } /* Delete all always on-top windows to get an empty screen */ -void HideVitalWindows(void) +void HideVitalWindows() { DeleteWindowById(WC_TOOLBAR_MENU, 0); DeleteWindowById(WC_MAIN_TOOLBAR, 0);
--- a/src/window.h +++ b/src/window.h @@ -533,7 +533,7 @@ /* window.cpp */ void CallWindowEventNP(Window *w, int event); -void CallWindowTickEvent(void); +void CallWindowTickEvent(); void SetWindowDirty(const Window *w); void SendWindowMessage(WindowClass wnd_class, WindowNumber wnd_num, int msg, int wparam, int lparam); void SendWindowMessageClass(WindowClass wnd_class, int msg, int wparam, int lparam); @@ -709,11 +709,11 @@ return HASBIT(w->widget[widget_index].display_flags, WIDG_LOWERED); } -void InitWindowSystem(void); -void UnInitWindowSystem(void); -void ResetWindowSystem(void); +void InitWindowSystem(); +void UnInitWindowSystem(); +void ResetWindowSystem(); int GetMenuItemIndex(const Window *w, int x, int y); -void InputLoop(void); +void InputLoop(); void InvalidateWidget(const Window *w, byte widget_index); void InvalidateThisWindowData(Window *w); void InvalidateWindowData(WindowClass cls, WindowNumber number); @@ -738,11 +738,11 @@ void HandleButtonClick(Window *w, byte widget); -Window *GetCallbackWnd(void); -void DeleteNonVitalWindows(void); -void DeleteAllNonVitalWindows(void); -void HideVitalWindows(void); -void ShowVitalWindows(void); +Window *GetCallbackWnd(); +void DeleteNonVitalWindows(); +void DeleteAllNonVitalWindows(); +void HideVitalWindows(); +void ShowVitalWindows(); Window **FindWindowZPosition(const Window *w); /* window.cpp */