(svn r9050) -Codechange: Foo(void) -> Foo()

This commit is contained in:
rubidium 2007-03-07 11:47:46 +00:00
parent a69e3b1c45
commit 36bb92ae24
180 changed files with 1072 additions and 1073 deletions

View File

@ -166,7 +166,7 @@ static void AI_RunTick(PlayerID player)
* The gameloop for AIs. * The gameloop for AIs.
* Handles one tick for all the AIs. * Handles one tick for all the AIs.
*/ */
void AI_RunGameLoop(void) void AI_RunGameLoop()
{ {
/* Don't do anything if ai is disabled */ /* Don't do anything if ai is disabled */
if (!_ai.enabled) return; if (!_ai.enabled) return;
@ -224,7 +224,7 @@ void AI_PlayerDied(PlayerID player)
/** /**
* Initialize some AI-related stuff. * Initialize some AI-related stuff.
*/ */
void AI_Initialize(void) void AI_Initialize()
{ {
/* First, make sure all AIs are DEAD! */ /* First, make sure all AIs are DEAD! */
AI_Uninitialize(); AI_Uninitialize();
@ -238,7 +238,7 @@ void AI_Initialize(void)
/** /**
* Deinitializer for AI-related stuff. * Deinitializer for AI-related stuff.
*/ */
void AI_Uninitialize(void) void AI_Uninitialize()
{ {
const Player* p; const Player* p;

View File

@ -40,9 +40,9 @@ VARDEF AIPlayer _ai_player[MAX_PLAYERS];
// ai.c // ai.c
void AI_StartNewAI(PlayerID player); void AI_StartNewAI(PlayerID player);
void AI_PlayerDied(PlayerID player); void AI_PlayerDied(PlayerID player);
void AI_RunGameLoop(void); void AI_RunGameLoop();
void AI_Initialize(void); void AI_Initialize();
void AI_Uninitialize(void); void AI_Uninitialize();
int32 AI_DoCommand(TileIndex tile, uint32 p1, uint32 p2, uint32 flags, uint procc); 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); int32 AI_DoCommandCc(TileIndex tile, uint32 p1, uint32 p2, uint32 flags, uint procc, CommandCallback* callback);
@ -50,7 +50,7 @@ int32 AI_DoCommandCc(TileIndex tile, uint32 p1, uint32 p2, uint32 flags, uint pr
* This function checks some boundries to see if we should launch a new AI. * This function checks some boundries to see if we should launch a new AI.
* @return True if we can start 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 disabled, no AI */
if (!_ai.enabled) if (!_ai.enabled)
@ -97,7 +97,7 @@ static inline uint AI_RandomRange(uint max)
/** /**
* The random-function that should be used by ALL AIs. * 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) /* 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. * but we pick InteractiveRandomRange if we are a network_server or network-client.

View File

@ -453,12 +453,12 @@ typedef struct FoundRoute {
void *to; void *to;
} FoundRoute; } FoundRoute;
static Town *AiFindRandomTown(void) static Town *AiFindRandomTown()
{ {
return GetRandomTown(); return GetRandomTown();
} }
static Industry *AiFindRandomIndustry(void) static Industry *AiFindRandomIndustry()
{ {
return GetRandomIndustry(); return GetRandomIndustry();
} }

View File

@ -724,7 +724,7 @@ void OnNewDay_Aircraft(Vehicle *v)
InvalidateWindowClasses(WC_AIRCRAFT_LIST); InvalidateWindowClasses(WC_AIRCRAFT_LIST);
} }
void AircraftYearlyLoop(void) void AircraftYearlyLoop()
{ {
Vehicle *v; Vehicle *v;
@ -2104,7 +2104,7 @@ void Aircraft_Tick(Vehicle *v)
/** need to be called to load aircraft from old version */ /** 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 */ /* set airport_flags to 0 for all airports just to be sure */
Station *st; Station *st;

View File

@ -32,7 +32,7 @@ static AirportFTAClass *IntercontinentalAirport;
static AirportFTAClass *HeliStation; static AirportFTAClass *HeliStation;
void InitializeAirports(void) void InitializeAirports()
{ {
CountryAirport = new AirportFTAClass( CountryAirport = new AirportFTAClass(
_airport_moving_data_country, _airport_moving_data_country,
@ -175,7 +175,7 @@ void InitializeAirports(void)
); );
} }
void UnInitializeAirports(void) void UnInitializeAirports()
{ {
delete CountryAirport; delete CountryAirport;
delete CityAirport; delete CityAirport;
@ -467,7 +467,7 @@ const AirportFTAClass *GetAirport(const byte airport_type)
} }
uint32 GetValidAirports(void) uint32 GetValidAirports()
{ {
uint32 mask = 0; uint32 mask = 0;

View File

@ -181,8 +181,8 @@ typedef struct AirportFTA {
byte heading; // heading (current orders), guiding an airplane to its target on an airport byte heading; // heading (current orders), guiding an airplane to its target on an airport
} AirportFTA; } AirportFTA;
void InitializeAirports(void); void InitializeAirports();
void UnInitializeAirports(void); void UnInitializeAirports();
const AirportFTAClass *GetAirport(const byte airport_type); const AirportFTAClass *GetAirport(const byte airport_type);
/** Get buildable airport bitmask. /** Get buildable airport bitmask.
@ -190,6 +190,6 @@ const AirportFTAClass *GetAirport(const byte airport_type);
* Bit 0 means the small airport is buildable, etc. * Bit 0 means the small airport is buildable, etc.
* @todo set availability of airports by year, instead of airplane * @todo set availability of airports by year, instead of airplane
*/ */
uint32 GetValidAirports(void); uint32 GetValidAirports();
#endif /* AIRPORT_H */ #endif /* AIRPORT_H */

View File

@ -21,7 +21,7 @@
static byte _selected_airport_type; static byte _selected_airport_type;
static void ShowBuildAirportPicker(void); static void ShowBuildAirportPicker();
void CcBuildAirport(bool success, TileIndex tile, uint32 p1, uint32 p2) void CcBuildAirport(bool success, TileIndex tile, uint32 p1, uint32 p2)
@ -132,7 +132,7 @@ static const WindowDesc _air_toolbar_desc = {
BuildAirToolbWndProc BuildAirToolbWndProc
}; };
void ShowBuildAirToolbar(void) void ShowBuildAirToolbar()
{ {
if (!IsValidPlayer(_current_player)) return; if (!IsValidPlayer(_current_player)) return;
@ -256,12 +256,12 @@ static const WindowDesc _build_airport_desc = {
BuildAirportPickerWndProc BuildAirportPickerWndProc
}; };
static void ShowBuildAirportPicker(void) static void ShowBuildAirportPicker()
{ {
AllocateWindowDesc(&_build_airport_desc); AllocateWindowDesc(&_build_airport_desc);
} }
void InitializeAirportGui(void) void InitializeAirportGui()
{ {
_selected_airport_type = AT_SMALL; _selected_airport_type = AT_SMALL;
} }

View File

@ -30,7 +30,7 @@ static const StringID _rail_types_list[] = {
}; };
/* General Vehicle GUI based procedures that are independent of vehicle types */ /* General Vehicle GUI based procedures that are independent of vehicle types */
void InitializeVehiclesGuiList(void) void InitializeVehiclesGuiList()
{ {
_railtype_selected_in_replace_gui = RAILTYPE_RAIL; _railtype_selected_in_replace_gui = RAILTYPE_RAIL;
} }

View File

@ -718,7 +718,7 @@ static void TileLoop_Clear(TileIndex tile)
MarkTileDirtyByTile(tile); MarkTileDirtyByTile(tile);
} }
void GenerateClearTile(void) void GenerateClearTile()
{ {
uint i, gi; uint i, gi;
TileIndex tile; TileIndex tile;
@ -792,7 +792,7 @@ static void ChangeTileOwner_Clear(TileIndex tile, PlayerID old_player, PlayerID
return; return;
} }
void InitializeClearLand(void) void InitializeClearLand()
{ {
_opt.snow_line = _patches.snow_line_height * TILE_HEIGHT; _opt.snow_line = _patches.snow_line_height * TILE_HEIGHT;
} }

View File

@ -395,7 +395,7 @@ error:
return res; return res;
} }
int32 GetAvailableMoneyForCommand(void) int32 GetAvailableMoneyForCommand()
{ {
PlayerID pid = _current_player; PlayerID pid = _current_player;
if (!IsValidPlayer(pid)) return 0x7FFFFFFF; // max int if (!IsValidPlayer(pid)) return 0x7FFFFFFF; // max int

View File

@ -209,6 +209,6 @@ extern const char* _cmd_text; ///< Text, which gets sent with a command
bool IsValidCommand(uint cmd); bool IsValidCommand(uint cmd);
byte GetCommandFlags(uint cmd); byte GetCommandFlags(uint cmd);
int32 GetAvailableMoneyForCommand(void); int32 GetAvailableMoneyForCommand();
#endif /* COMMAND_H */ #endif /* COMMAND_H */

View File

@ -46,7 +46,7 @@ static byte _iconsole_historypos;
* end of header * * end of header *
* *************** */ * *************** */
static void IConsoleClearCommand(void) static void IConsoleClearCommand()
{ {
memset(_iconsole_cmdline.buf, 0, ICON_CMDLN_SIZE); memset(_iconsole_cmdline.buf, 0, ICON_CMDLN_SIZE);
_iconsole_cmdline.length = 0; _iconsole_cmdline.length = 0;
@ -56,7 +56,7 @@ static void IConsoleClearCommand(void)
SetWindowDirty(FindWindowById(WC_CONSOLE, 0)); 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); static void IConsoleHistoryAdd(const char *cmd);
@ -207,7 +207,7 @@ static const WindowDesc _iconsole_window_desc = {
IConsoleWndProc, IConsoleWndProc,
}; };
void IConsoleInit(void) void IConsoleInit()
{ {
extern const char _openttd_revision[]; extern const char _openttd_revision[];
_iconsole_output_file = NULL; _iconsole_output_file = NULL;
@ -238,7 +238,7 @@ void IConsoleInit(void)
IConsoleHistoryAdd(""); IConsoleHistoryAdd("");
} }
void IConsoleClearBuffer(void) void IConsoleClearBuffer()
{ {
uint i; uint i;
for (i = 0; i <= ICON_BUFFER; i++) { for (i = 0; i <= ICON_BUFFER; i++) {
@ -247,7 +247,7 @@ void IConsoleClearBuffer(void)
} }
} }
static void IConsoleClear(void) static void IConsoleClear()
{ {
free(_iconsole_cmdline.buf); free(_iconsole_cmdline.buf);
IConsoleClearBuffer(); IConsoleClearBuffer();
@ -262,7 +262,7 @@ static void IConsoleWriteToLogFile(const char *string)
} }
} }
bool CloseConsoleLogIfActive(void) bool CloseConsoleLogIfActive()
{ {
if (_iconsole_output_file != NULL) { if (_iconsole_output_file != NULL) {
IConsolePrintF(_icolour_def, "file output complete"); IConsolePrintF(_icolour_def, "file output complete");
@ -274,7 +274,7 @@ bool CloseConsoleLogIfActive(void)
return false; return false;
} }
void IConsoleFree(void) void IConsoleFree()
{ {
IConsoleClear(); IConsoleClear();
CloseConsoleLogIfActive(); CloseConsoleLogIfActive();
@ -297,7 +297,7 @@ void IConsoleResize(Window *w)
MarkWholeScreenDirty(); MarkWholeScreenDirty();
} }
void IConsoleSwitch(void) void IConsoleSwitch()
{ {
switch (_iconsole_mode) { switch (_iconsole_mode) {
case ICONSOLE_CLOSED: { case ICONSOLE_CLOSED: {
@ -317,8 +317,8 @@ void IConsoleSwitch(void)
MarkWholeScreenDirty(); MarkWholeScreenDirty();
} }
void IConsoleClose(void) {if (_iconsole_mode == ICONSOLE_OPENED) IConsoleSwitch();} void IConsoleClose() {if (_iconsole_mode == ICONSOLE_OPENED) IConsoleSwitch();}
void IConsoleOpen(void) {if (_iconsole_mode == ICONSOLE_CLOSED) IConsoleSwitch();} void IConsoleOpen() {if (_iconsole_mode == ICONSOLE_CLOSED) IConsoleSwitch();}
/** /**
* Add the entered line into the history so you can look it back * Add the entered line into the history so you can look it back

View File

@ -37,7 +37,7 @@ typedef enum IConsoleHookTypes {
* access, before execution/change or after execution/change. This allows * access, before execution/change or after execution/change. This allows
* for general flow of permissions or special action needed in some cases * for general flow of permissions or special action needed in some cases
*/ */
typedef bool IConsoleHook(void); typedef bool IConsoleHook();
typedef struct IConsoleHooks{ typedef struct IConsoleHooks{
IConsoleHook *access; ///< trigger when accessing the variable/command IConsoleHook *access; ///< trigger when accessing the variable/command
IConsoleHook *pre; ///< trigger before the variable/command is changed/executed IConsoleHook *pre; ///< trigger before the variable/command is changed/executed
@ -117,13 +117,13 @@ VARDEF byte _icolour_cmd;
VARDEF IConsoleModes _iconsole_mode; VARDEF IConsoleModes _iconsole_mode;
/* console functions */ /* console functions */
void IConsoleInit(void); void IConsoleInit();
void IConsoleFree(void); void IConsoleFree();
void IConsoleClearBuffer(void); void IConsoleClearBuffer();
void IConsoleResize(Window *w); void IConsoleResize(Window *w);
void IConsoleSwitch(void); void IConsoleSwitch();
void IConsoleClose(void); void IConsoleClose();
void IConsoleOpen(void); void IConsoleOpen();
/* console output */ /* console output */
void IConsolePrint(uint16 color_code, const char *string); void IConsolePrint(uint16 color_code, const char *string);
@ -150,7 +150,7 @@ void IConsoleCmdExec(const char *cmdstr);
void IConsoleVarExec(const IConsoleVar *var, byte tokencount, char *token[]); void IConsoleVarExec(const IConsoleVar *var, byte tokencount, char *token[]);
/* console std lib (register ingame commands/aliases/variables) */ /* console std lib (register ingame commands/aliases/variables) */
void IConsoleStdLibRegister(void); void IConsoleStdLibRegister();
/* Hooking code */ /* Hooking code */
void IConsoleCmdHookAdd(const char *name, IConsoleHookTypes type, IConsoleHook *proc); void IConsoleCmdHookAdd(const char *name, IConsoleHookTypes type, IConsoleHook *proc);

View File

@ -32,7 +32,7 @@ static bool _script_running;
// ** console command / variable defines ** // // ** console command / variable defines ** //
#define DEF_CONSOLE_CMD(function) static bool function(byte argc, char *argv[]) #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 @@ static bool _script_running;
#ifdef ENABLE_NETWORK #ifdef ENABLE_NETWORK
static inline bool NetworkAvailable(void) static inline bool NetworkAvailable()
{ {
if (!_network_available) { if (!_network_available) {
IConsoleError("You cannot use this command because there is no network available."); IConsoleError("You cannot use this command because there is no network available.");
@ -175,7 +175,7 @@ DEF_CONSOLE_CMD(ConScrollToTile)
} }
extern bool SafeSaveOrLoad(const char *filename, int mode, int newgm); extern bool SafeSaveOrLoad(const char *filename, int mode, int newgm);
extern void BuildFileList(void); extern void BuildFileList();
extern void SetFiosType(const byte fiostype); extern void SetFiosType(const byte fiostype);
/* Save the map to a file */ /* Save the map to a file */
@ -853,7 +853,7 @@ DEF_CONSOLE_CMD(ConReturn)
/* **************************** */ /* **************************** */
/* default console commands */ /* default console commands */
/* **************************** */ /* **************************** */
extern bool CloseConsoleLogIfActive(void); extern bool CloseConsoleLogIfActive();
DEF_CONSOLE_CMD(ConScript) DEF_CONSOLE_CMD(ConScript)
{ {
@ -1442,7 +1442,7 @@ DEF_CONSOLE_CMD(ConListDumpVariables)
/* debug commands and variables */ /* debug commands and variables */
/* ****************************************** */ /* ****************************************** */
static void IConsoleDebugLibRegister(void) static void IConsoleDebugLibRegister()
{ {
/* debugging variables and functions */ /* debugging variables and functions */
extern bool _stdlib_con_developer; // XXX extern in .cpp extern bool _stdlib_con_developer; // XXX extern in .cpp
@ -1459,7 +1459,7 @@ static void IConsoleDebugLibRegister(void)
/* console command and variable registration */ /* console command and variable registration */
/* ****************************************** */ /* ****************************************** */
void IConsoleStdLibRegister(void) void IConsoleStdLibRegister()
{ {
/* stdlib */ /* stdlib */
extern byte _stdlib_developer; // XXX extern in .cpp extern byte _stdlib_developer; // XXX extern in .cpp

View File

@ -128,7 +128,7 @@ byte GetNewgrfCurrencyIdConverted(byte grfcurr_id)
* get a mask of the allowed currencies depending on the year * get a mask of the allowed currencies depending on the year
* @return mask of currencies * @return mask of currencies
*/ */
uint GetMaskOfAllowedCurrencies(void) uint GetMaskOfAllowedCurrencies()
{ {
uint mask = 0; uint mask = 0;
uint i; uint i;
@ -147,7 +147,7 @@ uint GetMaskOfAllowedCurrencies(void)
/** /**
* Verify if the currency chosen by the user is about to be converted to Euro * 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 && if (_currency_specs[_opt.currency].to_euro != CF_NOEURO &&
_currency_specs[_opt.currency].to_euro != CF_ISEURO && _currency_specs[_opt.currency].to_euro != CF_ISEURO &&
@ -161,7 +161,7 @@ void CheckSwitchToEuro(void)
* Called only from newgrf.c. Will fill _currency_specs array with * Called only from newgrf.c. Will fill _currency_specs array with
* default values from origin_currency_specs * default values from origin_currency_specs
**/ **/
void ResetCurrencies(void) void ResetCurrencies()
{ {
memcpy(&_currency_specs, &origin_currency_specs, sizeof(origin_currency_specs)); memcpy(&_currency_specs, &origin_currency_specs, sizeof(origin_currency_specs));
} }
@ -170,7 +170,7 @@ void ResetCurrencies(void)
* Build a list of currency names StringIDs to use in a dropdown list * Build a list of currency names StringIDs to use in a dropdown list
* @return Pointer to a (static) array of StringIDs * @return Pointer to a (static) array of StringIDs
*/ */
StringID* BuildCurrencyDropdown(void) StringID* BuildCurrencyDropdown()
{ {
/* Allow room for all currencies, plus a terminator entry */ /* Allow room for all currencies, plus a terminator entry */
static StringID names[NUM_CURRENCY + 1]; static StringID names[NUM_CURRENCY + 1];

View File

@ -38,10 +38,10 @@ extern CurrencySpec _currency_specs[NUM_CURRENCY];
#define _custom_currency (_currency_specs[CUSTOM_CURRENCY_ID]) #define _custom_currency (_currency_specs[CUSTOM_CURRENCY_ID])
#define _currency ((const CurrencySpec*)&_currency_specs[_opt_ptr->currency]) #define _currency ((const CurrencySpec*)&_currency_specs[_opt_ptr->currency])
uint GetMaskOfAllowedCurrencies(void); uint GetMaskOfAllowedCurrencies();
void CheckSwitchToEuro(void); void CheckSwitchToEuro();
void ResetCurrencies(void); void ResetCurrencies();
StringID* BuildCurrencyDropdown(void); StringID* BuildCurrencyDropdown();
byte GetNewgrfCurrencyIdConverted(byte grfcurr_id); byte GetNewgrfCurrencyIdConverted(byte grfcurr_id);
#endif /* CURRENCY_H */ #endif /* CURRENCY_H */

View File

@ -178,24 +178,24 @@ static OnNewVehicleDayProc * _on_new_vehicle_day_proc[] = {
OnNewDay_DisasterVehicle, OnNewDay_DisasterVehicle,
}; };
extern void WaypointsDailyLoop(void); extern void WaypointsDailyLoop();
extern void TextMessageDailyLoop(void); extern void TextMessageDailyLoop();
extern void EnginesDailyLoop(void); extern void EnginesDailyLoop();
extern void DisasterDailyLoop(void); extern void DisasterDailyLoop();
extern void PlayersMonthlyLoop(void); extern void PlayersMonthlyLoop();
extern void EnginesMonthlyLoop(void); extern void EnginesMonthlyLoop();
extern void TownsMonthlyLoop(void); extern void TownsMonthlyLoop();
extern void IndustryMonthlyLoop(void); extern void IndustryMonthlyLoop();
extern void StationMonthlyLoop(void); extern void StationMonthlyLoop();
extern void PlayersYearlyLoop(void); extern void PlayersYearlyLoop();
extern void TrainsYearlyLoop(void); extern void TrainsYearlyLoop();
extern void RoadVehiclesYearlyLoop(void); extern void RoadVehiclesYearlyLoop();
extern void AircraftYearlyLoop(void); extern void AircraftYearlyLoop();
extern void ShipsYearlyLoop(void); extern void ShipsYearlyLoop();
extern void ShowEndGameChart(void); extern void ShowEndGameChart();
static const Month _autosave_months[] = { static const Month _autosave_months[] = {
@ -221,7 +221,7 @@ static void RunVehicleDayProc(uint daytick)
} }
} }
void IncreaseDate(void) void IncreaseDate()
{ {
YearMonthDay ymd; YearMonthDay ymd;

View File

@ -153,7 +153,7 @@ void SetDebugString(const char *s)
* Just return a string with the values of all the debug categorites * Just return a string with the values of all the debug categorites
* @return string with debug-levels * @return string with debug-levels
*/ */
const char *GetDebugString(void) const char *GetDebugString()
{ {
const DebugLevel *i; const DebugLevel *i;
static char dbgstr[100]; static char dbgstr[100];

View File

@ -84,7 +84,7 @@
#endif /* NO_DEBUG_MESSAGES */ #endif /* NO_DEBUG_MESSAGES */
void SetDebugString(const char *s); 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* */ /* MSVCRT of course has to have a different syntax for long long *sigh* */
#if defined(_MSC_VER) || defined(__MINGW32__) #if defined(_MSC_VER) || defined(__MINGW32__)
@ -95,7 +95,7 @@ const char *GetDebugString(void);
/* Used for profiling */ /* Used for profiling */
#define TIC() {\ #define TIC() {\
extern uint64 _rdtsc(void);\ extern uint64 _rdtsc();\
uint64 _xxx_ = _rdtsc();\ uint64 _xxx_ = _rdtsc();\
static uint64 __sum__ = 0;\ static uint64 __sum__ = 0;\
static uint32 __i__ = 0; static uint32 __i__ = 0;

View File

@ -22,7 +22,7 @@
# define PRINTF_PID_T "%d" # define PRINTF_PID_T "%d"
#endif #endif
void DedicatedFork(void) void DedicatedFork()
{ {
/* Fork the program */ /* Fork the program */
pid_t pid = fork(); pid_t pid = fork();
@ -63,6 +63,6 @@ void DedicatedFork(void)
#else #else
void DedicatedFork(void) {} void DedicatedFork() {}
#endif /* ENABLE_NETWORK */ #endif /* ENABLE_NETWORK */

View File

@ -47,7 +47,7 @@ Depot *GetDepotByTile(TileIndex tile)
/** /**
* Allocate a new depot * Allocate a new depot
*/ */
Depot *AllocateDepot(void) Depot *AllocateDepot()
{ {
Depot *d; Depot *d;
@ -85,7 +85,7 @@ void DestroyDepot(Depot *depot)
DeleteWindowById(WC_VEHICLE_DEPOT, depot->xy); DeleteWindowById(WC_VEHICLE_DEPOT, depot->xy);
} }
void InitializeDepots(void) void InitializeDepots()
{ {
CleanPool(&_Depot_pool); CleanPool(&_Depot_pool);
AddBlockToPool(&_Depot_pool); AddBlockToPool(&_Depot_pool);
@ -99,7 +99,7 @@ static const SaveLoad _depot_desc[] = {
SLE_END() SLE_END()
}; };
static void Save_DEPT(void) static void Save_DEPT()
{ {
Depot *depot; Depot *depot;
@ -109,7 +109,7 @@ static void Save_DEPT(void)
} }
} }
static void Load_DEPT(void) static void Load_DEPT()
{ {
int index; int index;

View File

@ -107,8 +107,8 @@ static inline bool CanBuildDepotByTileh(DiagDirection direction, Slope tileh)
} }
Depot *GetDepotByTile(TileIndex tile); Depot *GetDepotByTile(TileIndex tile);
void InitializeDepots(void); void InitializeDepots();
Depot *AllocateDepot(void); Depot *AllocateDepot();
void DeleteDepotHighlightOfVehicle(const Vehicle *v); void DeleteDepotHighlightOfVehicle(const Vehicle *v);

View File

@ -758,12 +758,12 @@ void OnNewDay_DisasterVehicle(Vehicle *v)
// not used // not used
} }
typedef void DisasterInitProc(void); typedef void DisasterInitProc();
/** Zeppeliner which crashes on a small airport if one found, /** Zeppeliner which crashes on a small airport if one found,
* otherwise crashes on a random tile */ * otherwise crashes on a random tile */
static void Disaster_Zeppeliner_Init(void) static void Disaster_Zeppeliner_Init()
{ {
Vehicle *v = ForceAllocateSpecialVehicle(), *u; Vehicle *v = ForceAllocateSpecialVehicle(), *u;
Station *st; Station *st;
@ -797,7 +797,7 @@ static void Disaster_Zeppeliner_Init(void)
/** Ufo which flies around aimlessly from the middle of the map a bit /** 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 */ * 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; Vehicle *v = ForceAllocateSpecialVehicle(), *u;
int x; int x;
@ -821,7 +821,7 @@ static void Disaster_Small_Ufo_Init(void)
/* Combat airplane which destroys an oil refinery */ /* Combat airplane which destroys an oil refinery */
static void Disaster_Airplane_Init(void) static void Disaster_Airplane_Init()
{ {
Industry *i, *found; Industry *i, *found;
Vehicle *v, *u; Vehicle *v, *u;
@ -857,7 +857,7 @@ static void Disaster_Airplane_Init(void)
/** Combat helicopter that destroys a factory */ /** Combat helicopter that destroys a factory */
static void Disaster_Helicopter_Init(void) static void Disaster_Helicopter_Init()
{ {
Industry *i, *found; Industry *i, *found;
Vehicle *v, *u, *w; Vehicle *v, *u, *w;
@ -899,7 +899,7 @@ static void Disaster_Helicopter_Init(void)
/* Big Ufo which lands on a piece of rail and will consequently be shot /* Big Ufo which lands on a piece of rail and will consequently be shot
* down by a combat airplane, destroying the surroundings */ * 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; Vehicle *v = ForceAllocateSpecialVehicle(), *u;
int x, y; int x, y;
@ -924,7 +924,7 @@ static void Disaster_Big_Ufo_Init(void)
/* Curious submarine #1, just floats around */ /* Curious submarine #1, just floats around */
static void Disaster_Small_Submarine_Init(void) static void Disaster_Small_Submarine_Init()
{ {
Vehicle *v = ForceAllocateSpecialVehicle(); Vehicle *v = ForceAllocateSpecialVehicle();
int x, y; int x, y;
@ -949,7 +949,7 @@ static void Disaster_Small_Submarine_Init(void)
/* Curious submarine #2, just floats around */ /* Curious submarine #2, just floats around */
static void Disaster_Big_Submarine_Init(void) static void Disaster_Big_Submarine_Init()
{ {
Vehicle *v = ForceAllocateSpecialVehicle(); Vehicle *v = ForceAllocateSpecialVehicle();
int x,y; int x,y;
@ -975,7 +975,7 @@ static void Disaster_Big_Submarine_Init(void)
/** Coal mine catastrophe, destroys a stretch of 30 tiles of /** Coal mine catastrophe, destroys a stretch of 30 tiles of
* land in a certain direction */ * land in a certain direction */
static void Disaster_CoalMine_Init(void) static void Disaster_CoalMine_Init()
{ {
int index = GB(Random(), 0, 4); int index = GB(Random(), 0, 4);
uint m; uint m;
@ -1031,7 +1031,7 @@ static const struct {
}; };
static void DoDisaster(void) static void DoDisaster()
{ {
byte buf[lengthof(_dis_years)]; byte buf[lengthof(_dis_years)];
uint i; uint i;
@ -1048,12 +1048,12 @@ static void DoDisaster(void)
} }
static void ResetDisasterDelay(void) static void ResetDisasterDelay()
{ {
_disaster_delay = GB(Random(), 0, 9) + 730; _disaster_delay = GB(Random(), 0, 9) + 730;
} }
void DisasterDailyLoop(void) void DisasterDailyLoop()
{ {
if (--_disaster_delay != 0) return; if (--_disaster_delay != 0) return;
@ -1062,7 +1062,7 @@ void DisasterDailyLoop(void)
if (_opt.diff.disasters != 0) DoDisaster(); if (_opt.diff.disasters != 0) DoDisaster();
} }
void StartupDisasters(void) void StartupDisasters()
{ {
ResetDisasterDelay(); ResetDisasterDelay();
} }

View File

@ -17,8 +17,8 @@
#include "command.h" #include "command.h"
#include "variables.h" #include "variables.h"
static void ShowBuildDockStationPicker(void); static void ShowBuildDockStationPicker();
static void ShowBuildDocksDepotPicker(void); static void ShowBuildDocksDepotPicker();
static Axis _ship_depot_direction; static Axis _ship_depot_direction;
@ -216,7 +216,7 @@ static const WindowDesc _build_docks_toolbar_desc = {
BuildDocksToolbWndProc BuildDocksToolbWndProc
}; };
void ShowBuildDocksToolbar(void) void ShowBuildDocksToolbar()
{ {
if (!IsValidPlayer(_current_player)) return; if (!IsValidPlayer(_current_player)) return;
@ -290,12 +290,12 @@ static const WindowDesc _build_dock_station_desc = {
BuildDockStationWndProc BuildDockStationWndProc
}; };
static void ShowBuildDockStationPicker(void) static void ShowBuildDockStationPicker()
{ {
AllocateWindowDesc(&_build_dock_station_desc); AllocateWindowDesc(&_build_dock_station_desc);
} }
static void UpdateDocksDirection(void) static void UpdateDocksDirection()
{ {
if (_ship_depot_direction != AXIS_X) { if (_ship_depot_direction != AXIS_X) {
SetTileSelectSize(1, 2); SetTileSelectSize(1, 2);
@ -360,14 +360,14 @@ static const WindowDesc _build_docks_depot_desc = {
}; };
static void ShowBuildDocksDepotPicker(void) static void ShowBuildDocksDepotPicker()
{ {
AllocateWindowDesc(&_build_docks_depot_desc); AllocateWindowDesc(&_build_docks_depot_desc);
UpdateDocksDirection(); UpdateDocksDirection();
} }
void InitializeDockGui(void) void InitializeDockGui()
{ {
_ship_depot_direction = AXIS_X; _ship_depot_direction = AXIS_X;
} }

View File

@ -581,7 +581,7 @@ StringID GetNewsStringBankrupcy(const NewsItem *ni)
return 0; return 0;
} }
static void PlayersGenStatistics(void) static void PlayersGenStatistics()
{ {
Station *st; Station *st;
Player *p; Player *p;
@ -625,7 +625,7 @@ static void AddSingleInflation(int32 *value, uint16 *frac, int32 amt)
*value += tmp >> 16; *value += tmp >> 16;
} }
static void AddInflation(void) static void AddInflation()
{ {
/* Approximation for (100 + infl_amount)% ** (1 / 12) - 100% /* Approximation for (100 + infl_amount)% ** (1 / 12) - 100%
* scaled by 65536 * scaled by 65536
@ -658,7 +658,7 @@ static void AddInflation(void)
InvalidateWindow(WC_PAYMENT_RATES, 0); InvalidateWindow(WC_PAYMENT_RATES, 0);
} }
static void PlayersPayInterest(void) static void PlayersPayInterest()
{ {
const Player* p; const Player* p;
int interest = _economy.interest_rate * 54; int interest = _economy.interest_rate * 54;
@ -676,7 +676,7 @@ static void PlayersPayInterest(void)
} }
} }
static void HandleEconomyFluctuations(void) static void HandleEconomyFluctuations()
{ {
if (_opt.diff.economy == 0) return; if (_opt.diff.economy == 0) return;
@ -756,7 +756,7 @@ static byte price_base_multiplier[NUM_PRICES];
/** /**
* Reset changes to the price base multipliers. * Reset changes to the price base multipliers.
*/ */
void ResetPriceBaseMultipliers(void) void ResetPriceBaseMultipliers()
{ {
uint i; uint i;
@ -778,7 +778,7 @@ void SetPriceBaseMultiplier(uint price, byte factor)
price_base_multiplier[price] = factor; price_base_multiplier[price] = factor;
} }
void StartupEconomy(void) void StartupEconomy()
{ {
int i; int i;
@ -995,7 +995,7 @@ static bool CheckSubsidyDuplicate(Subsidy *s)
} }
static void SubsidyMonthlyHandler(void) static void SubsidyMonthlyHandler()
{ {
Subsidy *s; Subsidy *s;
Pair pair; Pair pair;
@ -1074,7 +1074,7 @@ static const SaveLoad _subsidies_desc[] = {
SLE_END() SLE_END()
}; };
static void Save_SUBS(void) static void Save_SUBS()
{ {
int i; int i;
Subsidy *s; Subsidy *s;
@ -1088,7 +1088,7 @@ static void Save_SUBS(void)
} }
} }
static void Load_SUBS(void) static void Load_SUBS()
{ {
int index; int index;
while ((index = SlIterateArray()) != -1) while ((index = SlIterateArray()) != -1)
@ -1603,7 +1603,7 @@ int LoadUnloadVehicle(Vehicle *v, bool just_arrived)
return result; return result;
} }
void PlayersMonthlyLoop(void) void PlayersMonthlyLoop()
{ {
PlayersGenStatistics(); PlayersGenStatistics();
if (_patches.inflation && _cur_year < MAX_YEAR) if (_patches.inflation && _cur_year < MAX_YEAR)
@ -1757,14 +1757,14 @@ int32 CmdBuyCompany(TileIndex tile, uint32 flags, uint32 p1, uint32 p2)
} }
/** Prices */ /** Prices */
static void SaveLoad_PRIC(void) static void SaveLoad_PRIC()
{ {
SlArray(&_price, NUM_PRICES, SLE_INT32); SlArray(&_price, NUM_PRICES, SLE_INT32);
SlArray(&_price_frac, NUM_PRICES, SLE_UINT16); SlArray(&_price_frac, NUM_PRICES, SLE_UINT16);
} }
/** Cargo payment rates */ /** Cargo payment rates */
static void SaveLoad_CAPR(void) static void SaveLoad_CAPR()
{ {
SlArray(&_cargo_payment_rates, NUM_CARGO, SLE_INT32); SlArray(&_cargo_payment_rates, NUM_CARGO, SLE_INT32);
SlArray(&_cargo_payment_rates_frac, NUM_CARGO, SLE_UINT16); SlArray(&_cargo_payment_rates_frac, NUM_CARGO, SLE_UINT16);
@ -1781,7 +1781,7 @@ static const SaveLoad _economy_desc[] = {
}; };
/** Economy variables */ /** Economy variables */
static void SaveLoad_ECMY(void) static void SaveLoad_ECMY()
{ {
SlObject(&_economy, _economy_desc); SlObject(&_economy, _economy_desc);
} }

View File

@ -5,7 +5,7 @@
#ifndef ECONOMY_H #ifndef ECONOMY_H
#define ECONOMY_H #define ECONOMY_H
void ResetPriceBaseMultipliers(void); void ResetPriceBaseMultipliers();
void SetPriceBaseMultiplier(uint price, byte factor); void SetPriceBaseMultiplier(uint price, byte factor);
typedef struct { typedef struct {

View File

@ -34,7 +34,7 @@ enum {
void ShowEnginePreviewWindow(EngineID engine); void ShowEnginePreviewWindow(EngineID engine);
void DeleteCustomEngineNames(void) void DeleteCustomEngineNames()
{ {
uint i; uint i;
StringID old; StringID old;
@ -48,13 +48,13 @@ void DeleteCustomEngineNames(void)
_vehicle_design_names &= ~1; _vehicle_design_names &= ~1;
} }
void LoadCustomEngineNames(void) void LoadCustomEngineNames()
{ {
/* XXX: not done */ /* XXX: not done */
DEBUG(misc, 1, "LoadCustomEngineNames: not done"); DEBUG(misc, 1, "LoadCustomEngineNames: not done");
} }
static void SetupEngineNames(void) static void SetupEngineNames()
{ {
StringID *name; StringID *name;
@ -92,7 +92,7 @@ static void CalcEngineReliability(Engine *e)
InvalidateWindowClasses(WC_REPLACE_VEHICLE); InvalidateWindowClasses(WC_REPLACE_VEHICLE);
} }
void AddTypeToEngines(void) void AddTypeToEngines()
{ {
Engine* e = _engines; Engine* e = _engines;
@ -102,7 +102,7 @@ void AddTypeToEngines(void)
do e->type = VEH_Aircraft; while (++e < &_engines[TOTAL_NUM_ENGINES]); do e->type = VEH_Aircraft; while (++e < &_engines[TOTAL_NUM_ENGINES]);
} }
void StartupEngines(void) void StartupEngines()
{ {
Engine *e; Engine *e;
const EngineInfo *ei; const EngineInfo *ei;
@ -209,7 +209,7 @@ static PlayerID GetBestPlayer(PlayerID pp)
return best_player; return best_player;
} }
void EnginesDailyLoop(void) void EnginesDailyLoop()
{ {
EngineID i; EngineID i;
@ -321,7 +321,7 @@ static void NewVehicleAvailable(Engine *e)
AddNewsItem(index, NEWS_FLAGS(NM_CALLBACK, 0, NT_NEW_VEHICLES, DNC_VEHICLEAVAIL), 0, 0); AddNewsItem(index, NEWS_FLAGS(NM_CALLBACK, 0, NT_NEW_VEHICLES, DNC_VEHICLEAVAIL), 0, 0);
} }
void EnginesMonthlyLoop(void) void EnginesMonthlyLoop()
{ {
Engine *e; Engine *e;
@ -423,7 +423,7 @@ static void EngineRenewPoolNewBlock(uint start_item)
} }
static EngineRenew *AllocateEngineRenew(void) static EngineRenew *AllocateEngineRenew()
{ {
EngineRenew *er; EngineRenew *er;
@ -538,7 +538,7 @@ static const SaveLoad _engine_renew_desc[] = {
SLE_END() SLE_END()
}; };
static void Save_ERNW(void) static void Save_ERNW()
{ {
EngineRenew *er; EngineRenew *er;
@ -548,7 +548,7 @@ static void Save_ERNW(void)
} }
} }
static void Load_ERNW(void) static void Load_ERNW()
{ {
int index; int index;
@ -590,7 +590,7 @@ static const SaveLoad _engine_desc[] = {
SLE_END() SLE_END()
}; };
static void Save_ENGN(void) static void Save_ENGN()
{ {
uint i; uint i;
@ -600,7 +600,7 @@ static void Save_ENGN(void)
} }
} }
static void Load_ENGN(void) static void Load_ENGN()
{ {
int index; int index;
while ((index = SlIterateArray()) != -1) { while ((index = SlIterateArray()) != -1) {
@ -608,7 +608,7 @@ static void Load_ENGN(void)
} }
} }
static void LoadSave_ENGS(void) static void LoadSave_ENGS()
{ {
SlArray(_engine_name_strings, lengthof(_engine_name_strings), SLE_STRINGID); SlArray(_engine_name_strings, lengthof(_engine_name_strings), SLE_STRINGID);
} }
@ -619,7 +619,7 @@ extern const ChunkHandler _engine_chunk_handlers[] = {
{ 'ERNW', Save_ERNW, Load_ERNW, CH_ARRAY | CH_LAST}, { '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 */ /* Clean the engine renew pool and create 1 block in it */
CleanPool(&_EngineRenew_pool); CleanPool(&_EngineRenew_pool);

View File

@ -140,8 +140,8 @@ enum {
static const EngineID INVALID_ENGINE = 0xFFFF; static const EngineID INVALID_ENGINE = 0xFFFF;
void AddTypeToEngines(void); void AddTypeToEngines();
void StartupEngines(void); void StartupEngines();
void DrawTrainEngine(int x, int y, EngineID engine, SpriteID pal); void DrawTrainEngine(int x, int y, EngineID engine, SpriteID pal);
@ -149,8 +149,8 @@ void DrawRoadVehEngine(int x, int y, EngineID engine, SpriteID pal);
void DrawShipEngine(int x, int y, EngineID engine, SpriteID pal); void DrawShipEngine(int x, int y, EngineID engine, SpriteID pal);
void DrawAircraftEngine(int x, int y, EngineID engine, SpriteID pal); void DrawAircraftEngine(int x, int y, EngineID engine, SpriteID pal);
void LoadCustomEngineNames(void); void LoadCustomEngineNames();
void DeleteCustomEngineNames(void); void DeleteCustomEngineNames();
bool IsEngineBuildable(EngineID engine, byte type, PlayerID player); bool IsEngineBuildable(EngineID engine, byte type, PlayerID player);

View File

@ -34,7 +34,7 @@ typedef struct {
static Fio _fio; static Fio _fio;
/* Get current position in file */ /* Get current position in file */
uint32 FioGetPos(void) uint32 FioGetPos()
{ {
return _fio.pos + (_fio.buffer - _fio.buffer_start) - FIO_BUFFER_SIZE; return _fio.pos + (_fio.buffer - _fio.buffer_start) - FIO_BUFFER_SIZE;
} }
@ -73,7 +73,7 @@ void FioSeekToFile(uint32 pos)
FioSeekTo(GB(pos, 0, 24), SEEK_SET); FioSeekTo(GB(pos, 0, 24), SEEK_SET);
} }
byte FioReadByte(void) byte FioReadByte()
{ {
if (_fio.buffer == _fio.buffer_end) { if (_fio.buffer == _fio.buffer_end) {
_fio.pos += FIO_BUFFER_SIZE; _fio.pos += FIO_BUFFER_SIZE;
@ -94,13 +94,13 @@ void FioSkipBytes(int n)
} }
} }
uint16 FioReadWord(void) uint16 FioReadWord()
{ {
byte b = FioReadByte(); byte b = FioReadByte();
return (FioReadByte() << 8) | b; return (FioReadByte() << 8) | b;
} }
uint32 FioReadDword(void) uint32 FioReadDword()
{ {
uint b = FioReadWord(); uint b = FioReadWord();
return (FioReadWord() << 16) | b; return (FioReadWord() << 16) | b;
@ -124,7 +124,7 @@ static inline void FioCloseFile(int slot)
} }
} }
void FioCloseAll(void) void FioCloseAll()
{ {
int i; int i;

View File

@ -7,11 +7,11 @@
void FioSeekTo(uint32 pos, int mode); void FioSeekTo(uint32 pos, int mode);
void FioSeekToFile(uint32 pos); void FioSeekToFile(uint32 pos);
uint32 FioGetPos(void); uint32 FioGetPos();
byte FioReadByte(void); byte FioReadByte();
uint16 FioReadWord(void); uint16 FioReadWord();
uint32 FioReadDword(void); uint32 FioReadDword();
void FioCloseAll(void); void FioCloseAll();
FILE *FioFOpenFile(const char *filename); FILE *FioFOpenFile(const char *filename);
void FioOpenFile(int slot, const char *filename); void FioOpenFile(int slot, const char *filename);
void FioReadBlock(void *ptr, uint size); void FioReadBlock(void *ptr, uint size);

View File

@ -34,7 +34,7 @@ static int _fios_count, _fios_alloc;
extern bool FiosIsRoot(const char *path); extern bool FiosIsRoot(const char *path);
extern bool FiosIsValidFile(const char *path, const struct dirent *ent, struct stat *sb); extern bool FiosIsValidFile(const char *path, const struct dirent *ent, struct stat *sb);
extern bool FiosIsHiddenFile(const struct dirent *ent); extern bool FiosIsHiddenFile(const struct dirent *ent);
extern void FiosGetDrives(void); extern void FiosGetDrives();
extern bool FiosGetDiskFreeSpace(const char *path, uint32 *tot); extern bool FiosGetDiskFreeSpace(const char *path, uint32 *tot);
/* get the name of an oldstyle savegame */ /* get the name of an oldstyle savegame */
@ -44,7 +44,7 @@ extern void GetOldSaveGameName(char *title, const char *path, const char *file);
* Allocate a new FiosItem. * Allocate a new FiosItem.
* @return A pointer to the newly allocated FiosItem. * @return A pointer to the newly allocated FiosItem.
*/ */
FiosItem *FiosAlloc(void) FiosItem *FiosAlloc()
{ {
if (_fios_count == _fios_alloc) { if (_fios_count == _fios_alloc) {
_fios_alloc += 256; _fios_alloc += 256;
@ -78,7 +78,7 @@ int CDECL compare_FiosItems(const void *a, const void *b)
/** /**
* Free the list of savegames * Free the list of savegames
*/ */
void FiosFreeSavegameList(void) void FiosFreeSavegameList()
{ {
free(_fios_items); free(_fios_items);
_fios_items = NULL; _fios_items = NULL;

View File

@ -39,7 +39,7 @@ FiosItem *FiosGetScenarioList(int mode);
/* Get a list of Heightmaps */ /* Get a list of Heightmaps */
FiosItem *FiosGetHeightmapList(int mode); FiosItem *FiosGetHeightmapList(int mode);
/* Free the list of savegames */ /* Free the list of savegames */
void FiosFreeSavegameList(void); void FiosFreeSavegameList();
/* Browse to. Returns a filename w/path if we reached a file. */ /* Browse to. Returns a filename w/path if we reached a file. */
char *FiosBrowseTo(const FiosItem *item); char *FiosBrowseTo(const FiosItem *item);
/* Return path, free space and stringID */ /* Return path, free space and stringID */
@ -49,7 +49,7 @@ bool FiosDelete(const char *name);
/* Make a filename from a name */ /* Make a filename from a name */
void FiosMakeSavegameName(char *buf, const char *name, size_t size); void FiosMakeSavegameName(char *buf, const char *name, size_t size);
/* Allocate a new FiosItem */ /* Allocate a new FiosItem */
FiosItem *FiosAlloc(void); FiosItem *FiosAlloc();
int CDECL compare_FiosItems(const void *a, const void *b); int CDECL compare_FiosItems(const void *a, const void *b);

View File

@ -278,7 +278,7 @@ static void LoadFreeTypeFont(const char *font_name, FT_Face *face, const char *t
} }
void InitFreeType(void) void InitFreeType()
{ {
if (StrEmpty(_freetype.small_font) && StrEmpty(_freetype.medium_font) && StrEmpty(_freetype.large_font)) { if (StrEmpty(_freetype.small_font) && StrEmpty(_freetype.medium_font) && StrEmpty(_freetype.large_font)) {
DEBUG(freetype, 1, "No font faces specified, using sprite fonts instead"); DEBUG(freetype, 1, "No font faces specified, using sprite fonts instead");
@ -492,7 +492,7 @@ void SetUnicodeGlyph(FontSize size, uint32 key, SpriteID sprite)
} }
void InitializeUnicodeGlyphMap(void) void InitializeUnicodeGlyphMap()
{ {
FontSize size; FontSize size;
SpriteID base; SpriteID base;

View File

@ -10,7 +10,7 @@ SpriteID GetUnicodeGlyph(FontSize size, uint32 key);
void SetUnicodeGlyph(FontSize size, uint32 key, SpriteID sprite); void SetUnicodeGlyph(FontSize size, uint32 key, SpriteID sprite);
/** Initialize the glyph map */ /** Initialize the glyph map */
void InitializeUnicodeGlyphMap(void); void InitializeUnicodeGlyphMap();
#ifdef WITH_FREETYPE #ifdef WITH_FREETYPE
@ -25,14 +25,14 @@ typedef struct FreeTypeSettings {
extern FreeTypeSettings _freetype; extern FreeTypeSettings _freetype;
void InitFreeType(void); void InitFreeType();
const struct Sprite *GetGlyph(FontSize size, uint32 key); const struct Sprite *GetGlyph(FontSize size, uint32 key);
uint GetGlyphWidth(FontSize size, uint32 key); uint GetGlyphWidth(FontSize size, uint32 key);
#else #else
/* Stub for initializiation */ /* Stub for initializiation */
static inline void InitFreeType(void) {} static inline void InitFreeType() {}
/** Get the Sprite for a glyph */ /** Get the Sprite for a glyph */
static inline const Sprite *GetGlyph(FontSize size, uint32 key) static inline const Sprite *GetGlyph(FontSize size, uint32 key)

View File

@ -8,7 +8,7 @@
#include "gfx.h" #include "gfx.h"
void DoClearSquare(TileIndex tile); void DoClearSquare(TileIndex tile);
void RunTileLoop(void); void RunTileLoop();
uint GetPartialZ(int x, int y, Slope corners); uint GetPartialZ(int x, int y, Slope corners);
uint GetSlopeZ(int x, int y); uint GetSlopeZ(int x, int y);
@ -80,11 +80,11 @@ void NORETURN CDECL error(const char *str, ...);
// Mersenne twister functions // Mersenne twister functions
void SeedMT(uint32 seed); void SeedMT(uint32 seed);
uint32 RandomMT(void); uint32 RandomMT();
#ifdef MERSENNE_TWISTER #ifdef MERSENNE_TWISTER
static inline uint32 Random(void) { return RandomMT(); } static inline uint32 Random() { return RandomMT(); }
uint RandomRange(uint max); uint RandomRange(uint max);
#else #else
@ -94,33 +94,33 @@ uint32 RandomMT(void);
#define RandomRange(max) DoRandomRange(max, __LINE__, __FILE__) #define RandomRange(max) DoRandomRange(max, __LINE__, __FILE__)
uint DoRandomRange(uint max, int line, const char *file); uint DoRandomRange(uint max, int line, const char *file);
#else #else
uint32 Random(void); uint32 Random();
uint RandomRange(uint max); uint RandomRange(uint max);
#endif #endif
#endif // MERSENNE_TWISTER #endif // MERSENNE_TWISTER
static inline TileIndex RandomTileSeed(uint32 r) { return TILE_MASK(r); } 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); uint InteractiveRandomRange(uint max);
/* texteff.cpp */ /* texteff.cpp */
void MoveAllTextEffects(void); void MoveAllTextEffects();
void AddTextEffect(StringID msg, int x, int y, uint16 duration); void AddTextEffect(StringID msg, int x, int y, uint16 duration);
void InitTextEffects(void); void InitTextEffects();
void DrawTextEffects(DrawPixelInfo *dpi); void DrawTextEffects(DrawPixelInfo *dpi);
void InitTextMessage(void); void InitTextMessage();
void DrawTextMessage(void); void DrawTextMessage();
void CDECL AddTextMessage(uint16 color, uint8 duration, const char *message, ...); void CDECL AddTextMessage(uint16 color, uint8 duration, const char *message, ...);
void UndrawTextMessage(void); void UndrawTextMessage();
bool AddAnimatedTile(TileIndex tile); bool AddAnimatedTile(TileIndex tile);
void DeleteAnimatedTile(TileIndex tile); void DeleteAnimatedTile(TileIndex tile);
void AnimateAnimatedTiles(void); void AnimateAnimatedTiles();
void InitializeAnimatedTiles(void); void InitializeAnimatedTiles();
/* tunnelbridge_cmd.cpp */ /* tunnelbridge_cmd.cpp */
bool CheckBridge_Stuff(byte bridge_type, uint bridge_len); bool CheckBridge_Stuff(byte bridge_type, uint bridge_len);
@ -128,7 +128,7 @@ uint32 GetBridgeLength(TileIndex begin, TileIndex end);
int CalcBridgeLenCostFactor(int x); int CalcBridgeLenCostFactor(int x);
/* misc_cmd.cpp */ /* misc_cmd.cpp */
void PlaceTreesRandomly(void); void PlaceTreesRandomly();
void InitializeLandscapeVariables(bool only_constants); void InitializeLandscapeVariables(bool only_constants);
@ -142,7 +142,7 @@ char *GetName(char *buff, StringID id, const char* last);
#define AllocateNameUnique(name, skip) RealAllocateName(name, skip, true) #define AllocateNameUnique(name, skip) RealAllocateName(name, skip, true)
#define AllocateName(name, skip) RealAllocateName(name, skip, false) #define AllocateName(name, skip) RealAllocateName(name, skip, false)
StringID RealAllocateName(const char *name, byte skip, bool check_double); StringID RealAllocateName(const char *name, byte skip, bool check_double);
void ConvertNameArray(void); void ConvertNameArray();
/* misc functions */ /* misc functions */
void MarkTileDirty(int x, int y); void MarkTileDirty(int x, int y);
@ -157,7 +157,7 @@ void DeleteWindowByClass(WindowClass cls);
void SetObjectToPlaceWnd(CursorID icon, SpriteID pal, byte mode, Window *w); 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 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); bool ScrollWindowTo(int x, int y, Window * w);
@ -181,12 +181,12 @@ int FindFirstBit(uint32 x);
void ShowHighscoreTable(int difficulty, int8 rank); void ShowHighscoreTable(int difficulty, int8 rank);
TileIndex AdjustTileCoordRandomly(TileIndex a, byte rng); TileIndex AdjustTileCoordRandomly(TileIndex a, byte rng);
void AfterLoadTown(void); void AfterLoadTown();
void UpdatePatches(void); void UpdatePatches();
void AskExitGame(void); void AskExitGame();
void AskExitToGameMenu(void); void AskExitToGameMenu();
void RedrawAutosave(void); void RedrawAutosave();
StringID RemapOldStringID(StringID s); StringID RemapOldStringID(StringID s);
@ -203,19 +203,19 @@ enum {
void ShowSaveLoadDialog(int mode); void ShowSaveLoadDialog(int mode);
/* callback from drivers that is called if the game size changes dynamically */ /* callback from drivers that is called if the game size changes dynamically */
void GameSizeChanged(void); void GameSizeChanged();
bool FileExists(const char *filename); bool FileExists(const char *filename);
bool ReadLanguagePack(int index); bool ReadLanguagePack(int index);
void InitializeLanguagePacks(void); void InitializeLanguagePacks();
const char *GetCurrentLocale(const char *param); const char *GetCurrentLocale(const char *param);
void *ReadFileToMem(const char *filename, size_t *lenp, size_t maxsize); void *ReadFileToMem(const char *filename, size_t *lenp, size_t maxsize);
void LoadFromConfig(void); void LoadFromConfig();
void SaveToConfig(void); void SaveToConfig();
void CheckConfig(void); void CheckConfig();
int ttd_main(int argc, char* argv[]); int ttd_main(int argc, char* argv[]);
void HandleExitGameRequest(void); void HandleExitGameRequest();
void DeterminePaths(void); void DeterminePaths();
#endif /* FUNCTIONS_H */ #endif /* FUNCTIONS_H */

View File

@ -20,19 +20,19 @@
#include "date.h" #include "date.h"
void GenerateLandscape(byte mode); void GenerateLandscape(byte mode);
void GenerateClearTile(void); void GenerateClearTile();
void GenerateIndustries(void); void GenerateIndustries();
void GenerateUnmovables(void); void GenerateUnmovables();
bool GenerateTowns(void); bool GenerateTowns();
void GenerateTrees(void); void GenerateTrees();
void StartupEconomy(void); void StartupEconomy();
void StartupPlayers(void); void StartupPlayers();
void StartupDisasters(void); void StartupDisasters();
void InitializeGame(int mode, uint size_x, uint size_y); 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 /* Please only use this variable in genworld.h and genworld.c and
* nowhere else. For speed improvements we need it to be global, but * nowhere else. For speed improvements we need it to be global, but
@ -58,7 +58,7 @@ void SetGeneratingWorldPaintStatus(bool status)
* writing in a thread, it can cause damaged data (reading and writing the * writing in a thread, it can cause damaged data (reading and writing the
* same tile at the same time). * 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 /* 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. */ * forces the screen to not be drawn, and the GUI not to wait for a draw. */
@ -70,7 +70,7 @@ bool IsGeneratingWorldReadyForPaint(void)
/** /**
* Tells if the world generation is done in a thread or not. * Tells if the world generation is done in a thread or not.
*/ */
bool IsGenerateWorldThreaded(void) bool IsGenerateWorldThreaded()
{ {
return _gw.threaded && !_gw.quit_thread; return _gw.threaded && !_gw.quit_thread;
} }
@ -180,7 +180,7 @@ void GenerateWorldSetAbortCallback(gw_abort_proc *proc)
* This will wait for the thread to finish up his work. It will not continue * This will wait for the thread to finish up his work. It will not continue
* till the work is done. * till the work is done.
*/ */
void WaitTillGeneratedWorld(void) void WaitTillGeneratedWorld()
{ {
if (_gw.thread == NULL) return; if (_gw.thread == NULL) return;
_gw.quit_thread = true; _gw.quit_thread = true;
@ -192,7 +192,7 @@ void WaitTillGeneratedWorld(void)
/** /**
* Initializes the abortion process * Initializes the abortion process
*/ */
void AbortGeneratingWorld(void) void AbortGeneratingWorld()
{ {
_gw.abort = true; _gw.abort = true;
} }
@ -200,7 +200,7 @@ void AbortGeneratingWorld(void)
/** /**
* Is the generation being aborted? * Is the generation being aborted?
*/ */
bool IsGeneratingWorldAborted(void) bool IsGeneratingWorldAborted()
{ {
return _gw.abort; return _gw.abort;
} }
@ -208,7 +208,7 @@ bool IsGeneratingWorldAborted(void)
/** /**
* Really handle the abortion, i.e. clean up some of the mess * 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 */ /* Clean up - in SE create an empty map, otherwise, go to intro menu */
_switch_mode = (_game_mode == GM_EDITOR) ? SM_EDITOR : SM_MENU; _switch_mode = (_game_mode == GM_EDITOR) ? SM_EDITOR : SM_MENU;

View File

@ -26,8 +26,8 @@ enum {
GENERATE_NEW_SEED = (uint)-1, ///< Create a new random seed GENERATE_NEW_SEED = (uint)-1, ///< Create a new random seed
}; };
typedef void gw_done_proc(void); typedef void gw_done_proc();
typedef void gw_abort_proc(void); typedef void gw_abort_proc();
typedef struct gw_info { typedef struct gw_info {
bool active; ///< Is generating world active bool active; ///< Is generating world active
@ -66,7 +66,7 @@ typedef enum gwp_classes {
/** /**
* Check if we are currently in the process of generating a world. * 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; extern gw_info _gw;
@ -75,23 +75,23 @@ static inline bool IsGeneratingWorld(void)
/* genworld.cpp */ /* genworld.cpp */
void SetGeneratingWorldPaintStatus(bool status); void SetGeneratingWorldPaintStatus(bool status);
bool IsGeneratingWorldReadyForPaint(void); bool IsGeneratingWorldReadyForPaint();
bool IsGenerateWorldThreaded(void); bool IsGenerateWorldThreaded();
void GenerateWorldSetCallback(gw_done_proc *proc); void GenerateWorldSetCallback(gw_done_proc *proc);
void GenerateWorldSetAbortCallback(gw_abort_proc *proc); void GenerateWorldSetAbortCallback(gw_abort_proc *proc);
void WaitTillGeneratedWorld(void); void WaitTillGeneratedWorld();
void GenerateWorld(int mode, uint size_x, uint size_y); void GenerateWorld(int mode, uint size_x, uint size_y);
void AbortGeneratingWorld(void); void AbortGeneratingWorld();
bool IsGeneratingWorldAborted(void); bool IsGeneratingWorldAborted();
void HandleGeneratingWorldAbortion(void); void HandleGeneratingWorldAbortion();
/* genworld_gui.cpp */ /* genworld_gui.cpp */
void SetGeneratingWorldProgress(gwp_class cls, uint total); void SetGeneratingWorldProgress(gwp_class cls, uint total);
void IncreaseGeneratingWorldProgress(gwp_class cls); void IncreaseGeneratingWorldProgress(gwp_class cls);
void PrepareGenerateWorldProgress(void); void PrepareGenerateWorldProgress();
void ShowGenerateWorldProgress(void); void ShowGenerateWorldProgress();
void StartNewGameWithoutGUI(uint seed); void StartNewGameWithoutGUI(uint seed);
void ShowCreateScenario(void); void ShowCreateScenario();
void StartScenarioEditor(void); void StartScenarioEditor();
#endif /* GENWORLD_H */ #endif /* GENWORLD_H */

View File

@ -533,17 +533,17 @@ static void _ShowGenerateLandscape(glwp_modes mode)
if (w != NULL) InvalidateWindow(WC_GENERATE_LANDSCAPE, mode); if (w != NULL) InvalidateWindow(WC_GENERATE_LANDSCAPE, mode);
} }
void ShowGenerateLandscape(void) void ShowGenerateLandscape()
{ {
_ShowGenerateLandscape(GLWP_GENERATE); _ShowGenerateLandscape(GLWP_GENERATE);
} }
void ShowHeightmapLoad(void) void ShowHeightmapLoad()
{ {
_ShowGenerateLandscape(GLWP_HEIGHTMAP); _ShowGenerateLandscape(GLWP_HEIGHTMAP);
} }
void StartScenarioEditor(void) void StartScenarioEditor()
{ {
StartGeneratingLandscape(GLWP_SCENARIO); StartGeneratingLandscape(GLWP_SCENARIO);
} }
@ -726,7 +726,7 @@ static const WindowDesc _create_scenario_desc = {
CreateScenarioWndProc, CreateScenarioWndProc,
}; };
void ShowCreateScenario(void) void ShowCreateScenario()
{ {
DeleteWindowByClass(WC_GENERATE_LANDSCAPE); DeleteWindowByClass(WC_GENERATE_LANDSCAPE);
AllocateWindowDescFront(&_create_scenario_desc, GLWP_SCENARIO); AllocateWindowDescFront(&_create_scenario_desc, GLWP_SCENARIO);
@ -809,7 +809,7 @@ static const WindowDesc _show_terrain_progress_desc = {
/** /**
* Initializes the progress counters to the starting point. * Initializes the progress counters to the starting point.
*/ */
void PrepareGenerateWorldProgress(void) void PrepareGenerateWorldProgress()
{ {
_tp.cls = STR_WORLD_GENERATION; _tp.cls = STR_WORLD_GENERATION;
_tp.current = 0; _tp.current = 0;
@ -821,7 +821,7 @@ void PrepareGenerateWorldProgress(void)
/** /**
* Show the window where a user can follow the process of the map generation. * 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); AllocateWindowDescFront(&_show_terrain_progress_desc, 0);
} }

View File

@ -1524,9 +1524,9 @@ static void GfxMainBlitter(const Sprite *sprite, int x, int y, BlitterMode mode)
} }
} }
void DoPaletteAnimations(void); void DoPaletteAnimations();
void GfxInitPalettes(void) void GfxInitPalettes()
{ {
memcpy(_cur_palette, _palettes[_use_dos_palette ? 1 : 0], sizeof(_cur_palette)); memcpy(_cur_palette, _palettes[_use_dos_palette ? 1 : 0], sizeof(_cur_palette));
@ -1538,7 +1538,7 @@ void GfxInitPalettes(void)
#define EXTR(p, q) (((uint16)(_timer_counter * (p)) * (q)) >> 16) #define EXTR(p, q) (((uint16)(_timer_counter * (p)) * (q)) >> 16)
#define EXTR2(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; const Colour *s;
Colour *d; Colour *d;
@ -1649,7 +1649,7 @@ void DoPaletteAnimations(void)
} }
void LoadStringWidthTable(void) void LoadStringWidthTable()
{ {
uint i; uint i;
@ -1678,7 +1678,7 @@ byte GetCharacterWidth(FontSize size, WChar key)
} }
void ScreenSizeChanged(void) void ScreenSizeChanged()
{ {
/* check the dirty rect */ /* check the dirty rect */
if (_invalid_rect.right >= _screen.width) _invalid_rect.right = _screen.width; if (_invalid_rect.right >= _screen.width) _invalid_rect.right = _screen.width;
@ -1688,7 +1688,7 @@ void ScreenSizeChanged(void)
_cursor.visible = false; _cursor.visible = false;
} }
void UndrawMouseCursor(void) void UndrawMouseCursor()
{ {
if (_cursor.visible) { if (_cursor.visible) {
_cursor.visible = false; _cursor.visible = false;
@ -1701,7 +1701,7 @@ void UndrawMouseCursor(void)
} }
} }
void DrawMouseCursor(void) void DrawMouseCursor()
{ {
int x; int x;
int y; int y;
@ -1794,7 +1794,7 @@ void RedrawScreenRect(int left, int top, int right, int bottom)
_video_driver->make_dirty(left, top, right - left, bottom - top); _video_driver->make_dirty(left, top, right - left, bottom - top);
} }
void DrawDirtyBlocks(void) void DrawDirtyBlocks()
{ {
byte *b = _dirty_blocks; byte *b = _dirty_blocks;
const int w = ALIGN(_screen.width, 64); const int w = ALIGN(_screen.width, 64);
@ -1916,7 +1916,7 @@ void SetDirtyBlocks(int left, int top, int right, int bottom)
} while (--height != 0); } while (--height != 0);
} }
void MarkWholeScreenDirty(void) void MarkWholeScreenDirty()
{ {
SetDirtyBlocks(0, 0, _screen.width, _screen.height); SetDirtyBlocks(0, 0, _screen.width, _screen.height);
} }
@ -1995,7 +1995,7 @@ static void SetCursorSprite(SpriteID cursor, SpriteID pal)
cv->dirty = true; cv->dirty = true;
} }
static void SwitchAnimatedCursor(void) static void SwitchAnimatedCursor()
{ {
const AnimCursor *cur = _cursor.animate_cur; const AnimCursor *cur = _cursor.animate_cur;
@ -2007,7 +2007,7 @@ static void SwitchAnimatedCursor(void)
_cursor.animate_cur = cur + 1; _cursor.animate_cur = cur + 1;
} }
void CursorTick(void) void CursorTick()
{ {
if (_cursor.animate_timeout != 0 && --_cursor.animate_timeout == 0) if (_cursor.animate_timeout != 0 && --_cursor.animate_timeout == 0)
SwitchAnimatedCursor(); SwitchAnimatedCursor();

View File

@ -86,9 +86,9 @@ enum GameModes {
GM_EDITOR GM_EDITOR
}; };
void GameLoop(void); void GameLoop();
void CreateConsole(void); void CreateConsole();
typedef int32 CursorID; typedef int32 CursorID;
typedef byte Pixel; typedef byte Pixel;
@ -166,18 +166,18 @@ extern uint16 _cur_resolution[2];
extern Colour _cur_palette[256]; extern Colour _cur_palette[256];
void HandleKeypress(uint32 key); void HandleKeypress(uint32 key);
void HandleMouseEvents(void); void HandleMouseEvents();
void CSleep(int milliseconds); 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); uint InteractiveRandomRange(uint max);
void DrawTextMessage(void); void DrawTextMessage();
void DrawMouseCursor(void); void DrawMouseCursor();
void ScreenSizeChanged(void); void ScreenSizeChanged();
void HandleExitGameRequest(void); void HandleExitGameRequest();
void GameSizeChanged(void); void GameSizeChanged();
void UndrawMouseCursor(void); void UndrawMouseCursor();
#include "helpers.hpp" #include "helpers.hpp"
@ -222,14 +222,14 @@ void GfxDrawLine(int left, int top, int right, int bottom, int color);
BoundingRect GetStringBoundingBox(const char *str); BoundingRect GetStringBoundingBox(const char *str);
uint32 FormatStringLinebreaks(char *str, int maxw); uint32 FormatStringLinebreaks(char *str, int maxw);
void LoadStringWidthTable(void); void LoadStringWidthTable();
void DrawStringMultiCenter(int x, int y, StringID str, int maxw); void DrawStringMultiCenter(int x, int y, StringID str, int maxw);
uint DrawStringMultiLine(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 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); bool FillDrawPixelInfo(DrawPixelInfo* n, int left, int top, int width, int height);
@ -239,10 +239,10 @@ void DrawOverlappedWindowForAll(int left, int top, int right, int bottom);
void SetMouseCursor(CursorID cursor); void SetMouseCursor(CursorID cursor);
void SetMouseCursor(SpriteID sprite, SpriteID pal); void SetMouseCursor(SpriteID sprite, SpriteID pal);
void SetAnimatedMouseCursor(const AnimCursor *table); void SetAnimatedMouseCursor(const AnimCursor *table);
void CursorTick(void); void CursorTick();
void DrawMouseCursor(void); void DrawMouseCursor();
void ScreenSizeChanged(void); void ScreenSizeChanged();
void UndrawMouseCursor(void); void UndrawMouseCursor();
bool ChangeResInGame(int w, int h); bool ChangeResInGame(int w, int h);
void SortResolutions(int count); void SortResolutions(int count);
void ToggleFullScreen(bool fs); void ToggleFullScreen(bool fs);

View File

@ -162,7 +162,7 @@ static bool FileMD5(const MD5File file, bool warn)
* If neither are found, Windows palette is assumed. * If neither are found, Windows palette is assumed.
* *
* (Note: Also checks sample.cat for corruption) */ * (Note: Also checks sample.cat for corruption) */
void CheckExternalFiles(void) void CheckExternalFiles()
{ {
uint i; uint i;
/* count of files from this version */ /* count of files from this version */
@ -340,7 +340,7 @@ static const SpriteID _openttd_grf_indexes[] = {
}; };
static void LoadSpriteTables(void) static void LoadSpriteTables()
{ {
const FileList* files = _use_dos_palette ? &files_dos : &files_win; const FileList* files = _use_dos_palette ? &files_dos : &files_win;
uint load_index; uint load_index;
@ -400,7 +400,7 @@ static void LoadSpriteTables(void)
} }
void GfxLoadSprites(void) void GfxLoadSprites()
{ {
DEBUG(sprite, 2, "Loading sprite set %d", _opt.landscape); DEBUG(sprite, 2, "Loading sprite set %d", _opt.landscape);

View File

@ -5,7 +5,7 @@
#ifndef GFXINIT_H #ifndef GFXINIT_H
#define GFXINIT_H #define GFXINIT_H
void CheckExternalFiles(void); void CheckExternalFiles();
void GfxLoadSprites(void); void GfxLoadSprites();
#endif /* GFXINIT_H */ #endif /* GFXINIT_H */

View File

@ -316,7 +316,7 @@ static const WindowDesc _graph_legend_desc = {
GraphLegendWndProc GraphLegendWndProc
}; };
static void ShowGraphLegend(void) static void ShowGraphLegend()
{ {
AllocateWindowDescFront(&_graph_legend_desc, 0); AllocateWindowDescFront(&_graph_legend_desc, 0);
} }
@ -415,7 +415,7 @@ static const WindowDesc _operating_profit_desc = {
}; };
void ShowOperatingProfitGraph(void) void ShowOperatingProfitGraph()
{ {
if (AllocateWindowDescFront(&_operating_profit_desc, 0)) { if (AllocateWindowDescFront(&_operating_profit_desc, 0)) {
InvalidateWindow(WC_GRAPH_LEGEND, 0); InvalidateWindow(WC_GRAPH_LEGEND, 0);
@ -483,7 +483,7 @@ static const WindowDesc _income_graph_desc = {
IncomeGraphWndProc IncomeGraphWndProc
}; };
void ShowIncomeGraph(void) void ShowIncomeGraph()
{ {
if (AllocateWindowDescFront(&_income_graph_desc, 0)) { if (AllocateWindowDescFront(&_income_graph_desc, 0)) {
InvalidateWindow(WC_GRAPH_LEGEND, 0); InvalidateWindow(WC_GRAPH_LEGEND, 0);
@ -550,7 +550,7 @@ static const WindowDesc _delivered_cargo_graph_desc = {
DeliveredCargoGraphWndProc DeliveredCargoGraphWndProc
}; };
void ShowDeliveredCargoGraph(void) void ShowDeliveredCargoGraph()
{ {
if (AllocateWindowDescFront(&_delivered_cargo_graph_desc, 0)) { if (AllocateWindowDescFront(&_delivered_cargo_graph_desc, 0)) {
InvalidateWindow(WC_GRAPH_LEGEND, 0); InvalidateWindow(WC_GRAPH_LEGEND, 0);
@ -619,7 +619,7 @@ static const WindowDesc _performance_history_desc = {
PerformanceHistoryWndProc PerformanceHistoryWndProc
}; };
void ShowPerformanceHistoryGraph(void) void ShowPerformanceHistoryGraph()
{ {
if (AllocateWindowDescFront(&_performance_history_desc, 0)) { if (AllocateWindowDescFront(&_performance_history_desc, 0)) {
InvalidateWindow(WC_GRAPH_LEGEND, 0); InvalidateWindow(WC_GRAPH_LEGEND, 0);
@ -686,7 +686,7 @@ static const WindowDesc _company_value_graph_desc = {
CompanyValueGraphWndProc CompanyValueGraphWndProc
}; };
void ShowCompanyValueGraph(void) void ShowCompanyValueGraph()
{ {
if (AllocateWindowDescFront(&_company_value_graph_desc, 0)) { if (AllocateWindowDescFront(&_company_value_graph_desc, 0)) {
InvalidateWindow(WC_GRAPH_LEGEND, 0); InvalidateWindow(WC_GRAPH_LEGEND, 0);
@ -784,7 +784,7 @@ static const WindowDesc _cargo_payment_rates_desc = {
}; };
void ShowCargoPaymentRates(void) void ShowCargoPaymentRates()
{ {
Window *w = AllocateWindowDescFront(&_cargo_payment_rates_desc, 0); Window *w = AllocateWindowDescFront(&_cargo_payment_rates_desc, 0);
if (w == NULL) return; if (w == NULL) return;
@ -905,7 +905,7 @@ static const WindowDesc _company_league_desc = {
CompanyLeagueWndProc CompanyLeagueWndProc
}; };
void ShowCompanyLeagueTable(void) void ShowCompanyLeagueTable()
{ {
AllocateWindowDescFront(&_company_league_desc,0); AllocateWindowDescFront(&_company_league_desc,0);
} }
@ -1144,7 +1144,7 @@ static const WindowDesc _performance_rating_detail_desc = {
PerformanceRatingDetailWndProc PerformanceRatingDetailWndProc
}; };
void ShowPerformanceRatingDetail(void) void ShowPerformanceRatingDetail()
{ {
AllocateWindowDescFront(&_performance_rating_detail_desc, 0); AllocateWindowDescFront(&_performance_rating_detail_desc, 0);
} }

View File

@ -10,31 +10,31 @@
#include "string.h" #include "string.h"
/* main_gui.cpp */ /* main_gui.cpp */
void SetupColorsAndInitialWindow(void); void SetupColorsAndInitialWindow();
void CcPlaySound10(bool success, TileIndex tile, uint32 p1, uint32 p2); void CcPlaySound10(bool success, TileIndex tile, uint32 p1, uint32 p2);
void CcBuildCanal(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); void CcTerraform(bool success, TileIndex tile, uint32 p1, uint32 p2);
/* settings_gui.cpp */ /* settings_gui.cpp */
void ShowGameOptions(void); void ShowGameOptions();
void ShowGameDifficulty(void); void ShowGameDifficulty();
void ShowPatchesSelection(void); void ShowPatchesSelection();
void DrawArrowButtons(int x, int y, int ctab, byte state, bool clickable_left, bool clickable_right); void DrawArrowButtons(int x, int y, int ctab, byte state, bool clickable_left, bool clickable_right);
/* graph_gui.cpp */ /* graph_gui.cpp */
void ShowOperatingProfitGraph(void); void ShowOperatingProfitGraph();
void ShowIncomeGraph(void); void ShowIncomeGraph();
void ShowDeliveredCargoGraph(void); void ShowDeliveredCargoGraph();
void ShowPerformanceHistoryGraph(void); void ShowPerformanceHistoryGraph();
void ShowCompanyValueGraph(void); void ShowCompanyValueGraph();
void ShowCargoPaymentRates(void); void ShowCargoPaymentRates();
void ShowCompanyLeagueTable(void); void ShowCompanyLeagueTable();
void ShowPerformanceRatingDetail(void); void ShowPerformanceRatingDetail();
/* news_gui.cpp */ /* news_gui.cpp */
void ShowLastNewsMessage(void); void ShowLastNewsMessage();
void ShowMessageOptions(void); void ShowMessageOptions();
void ShowMessageHistory(void); void ShowMessageHistory();
/* rail_gui.cpp */ /* rail_gui.cpp */
void ShowBuildRailToolbar(RailType railtype, int button); void ShowBuildRailToolbar(RailType railtype, int button);
@ -46,23 +46,23 @@ void ShowTrainViewWindow(const Vehicle *v);
void ShowOrdersWindow(const Vehicle *v); void ShowOrdersWindow(const Vehicle *v);
/* road_gui.cpp */ /* road_gui.cpp */
void ShowBuildRoadToolbar(void); void ShowBuildRoadToolbar();
void ShowBuildRoadScenToolbar(void); void ShowBuildRoadScenToolbar();
void ShowRoadVehViewWindow(const Vehicle *v); void ShowRoadVehViewWindow(const Vehicle *v);
/* dock_gui.cpp */ /* dock_gui.cpp */
void ShowBuildDocksToolbar(void); void ShowBuildDocksToolbar();
void ShowShipViewWindow(const Vehicle *v); void ShowShipViewWindow(const Vehicle *v);
/* aircraft_gui.cpp */ /* aircraft_gui.cpp */
void ShowBuildAirToolbar(void); void ShowBuildAirToolbar();
/* terraform_gui.cpp */ /* terraform_gui.cpp */
void ShowTerraformToolbar(Window *link = NULL); void ShowTerraformToolbar(Window *link = NULL);
/* tgp_gui.cpp */ /* tgp_gui.cpp */
void ShowGenerateLandscape(void); void ShowGenerateLandscape();
void ShowHeightmapLoad(void); void ShowHeightmapLoad();
void PlaceProc_DemolishArea(TileIndex tile); void PlaceProc_DemolishArea(TileIndex tile);
void PlaceProc_LevelLand(TileIndex tile); void PlaceProc_LevelLand(TileIndex tile);
@ -78,13 +78,13 @@ enum { // max 32 - 4 = 28 types
}; };
/* misc_gui.cpp */ /* misc_gui.cpp */
void PlaceLandBlockInfo(void); void PlaceLandBlockInfo();
void ShowAboutWindow(void); void ShowAboutWindow();
void ShowBuildTreesToolbar(void); void ShowBuildTreesToolbar();
void ShowBuildTreesScenToolbar(void); void ShowBuildTreesScenToolbar();
void ShowTownDirectory(void); void ShowTownDirectory();
void ShowIndustryDirectory(void); void ShowIndustryDirectory();
void ShowSubsidiesList(void); void ShowSubsidiesList();
void ShowPlayerStations(PlayerID player); void ShowPlayerStations(PlayerID player);
void ShowPlayerFinances(PlayerID player); void ShowPlayerFinances(PlayerID player);
void ShowPlayerCompany(PlayerID player); void ShowPlayerCompany(PlayerID player);
@ -95,13 +95,13 @@ void ShowErrorMessage(StringID msg_1, StringID msg_2, int x, int y);
void DrawStationCoverageAreaText(int sx, int sy, uint mask,int rad); void DrawStationCoverageAreaText(int sx, int sy, uint mask,int rad);
void CheckRedrawStationCoverage(const Window *w); void CheckRedrawStationCoverage(const Window *w);
void ShowSmallMap(void); void ShowSmallMap();
void ShowExtraViewPortWindow(void); void ShowExtraViewPortWindow();
void SetVScrollCount(Window *w, int num); void SetVScrollCount(Window *w, int num);
void SetVScroll2Count(Window *w, int num); void SetVScroll2Count(Window *w, int num);
void SetHScrollCount(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 DrawEditBox(Window *w, querystr_d *string, int wid);
void HandleEditBox(Window *w, querystr_d *string, int wid); void HandleEditBox(Window *w, querystr_d *string, int wid);
@ -116,7 +116,7 @@ bool MoveTextBufferPos(Textbuf *tb, int navmode);
void InitializeTextBuffer(Textbuf *tb, const char *buf, uint16 maxlength, uint16 maxwidth); void InitializeTextBuffer(Textbuf *tb, const char *buf, uint16 maxlength, uint16 maxwidth);
void UpdateTextBufferSize(Textbuf *tb); void UpdateTextBufferSize(Textbuf *tb);
void BuildFileList(void); void BuildFileList();
void SetFiosType(const byte fiostype); void SetFiosType(const byte fiostype);
/* FIOS_TYPE_FILE, FIOS_TYPE_OLDFILE etc. different colours */ /* FIOS_TYPE_FILE, FIOS_TYPE_OLDFILE etc. different colours */
@ -125,10 +125,10 @@ extern const byte _fios_colors[];
/* bridge_gui.cpp */ /* bridge_gui.cpp */
void ShowBuildBridgeWindow(uint start, uint end, byte type); 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 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 ShowQuery(StringID caption, StringID message, Window *w, void (*callback)(Window*, bool));
void ShowMusicWindow(void); void ShowMusicWindow();
/* main_gui.cpp */ /* main_gui.cpp */
void HandleOnEditText(const char *str); void HandleOnEditText(const char *str);
@ -136,6 +136,6 @@ VARDEF bool _station_show_coverage;
VARDEF PlaceProc *_place_proc; VARDEF PlaceProc *_place_proc;
/* vehicle_gui.cpp */ /* vehicle_gui.cpp */
void InitializeGUI(void); void InitializeGUI();
#endif /* GUI_H */ #endif /* GUI_H */

View File

@ -7,30 +7,30 @@
typedef struct { typedef struct {
const char *(*start)(const char * const *parm); const char *(*start)(const char * const *parm);
void (*stop)(void); void (*stop)();
} HalCommonDriver; } HalCommonDriver;
typedef struct { typedef struct {
const char *(*start)(const char * const *parm); const char *(*start)(const char * const *parm);
void (*stop)(void); void (*stop)();
void (*make_dirty)(int left, int top, int width, int height); 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); bool (*change_resolution)(int w, int h);
void (*toggle_fullscreen)(bool fullscreen); void (*toggle_fullscreen)(bool fullscreen);
} HalVideoDriver; } HalVideoDriver;
typedef struct { typedef struct {
const char *(*start)(const char * const *parm); const char *(*start)(const char * const *parm);
void (*stop)(void); void (*stop)();
} HalSoundDriver; } HalSoundDriver;
typedef struct { typedef struct {
const char *(*start)(const char * const *parm); const char *(*start)(const char * const *parm);
void (*stop)(void); void (*stop)();
void (*play_song)(const char *filename); void (*play_song)(const char *filename);
void (*stop_song)(void); void (*stop_song)();
bool (*is_song_playing)(void); bool (*is_song_playing)();
void (*set_volume)(byte vol); void (*set_volume)(byte vol);
} HalMusicDriver; } HalMusicDriver;

View File

@ -353,7 +353,7 @@ static void GrayscaleToMapHeights(uint img_width, uint img_height, byte *map)
* This function takes care of the fact that land in OpenTTD can never differ * This function takes care of the fact that land in OpenTTD can never differ
* more than 1 in height * more than 1 in height
*/ */
static void FixSlopes(void) static void FixSlopes()
{ {
uint width, height; uint width, height;
uint row, col; uint row, col;

View File

@ -111,7 +111,7 @@ static inline bool IsValidIndustryID(IndustryID index)
VARDEF int _total_industries; //general counter 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 /* TODO - This isn't the real content of the function, but
* with the new pool-system this will be replaced with one that * with the new pool-system this will be replaced with one that
@ -121,7 +121,7 @@ static inline IndustryID GetMaxIndustryIndex(void)
return GetIndustryPoolSize() - 1; return GetIndustryPoolSize() - 1;
} }
static inline uint GetNumIndustries(void) static inline uint GetNumIndustries()
{ {
return _total_industries; return _total_industries;
} }
@ -129,7 +129,7 @@ static inline uint GetNumIndustries(void)
/** /**
* Return a random valid industry. * Return a random valid industry.
*/ */
static inline Industry *GetRandomIndustry(void) static inline Industry *GetRandomIndustry()
{ {
int num = RandomRange(GetNumIndustries()); int num = RandomRange(GetNumIndustries());
IndustryID index = INVALID_INDUSTRY; IndustryID index = INVALID_INDUSTRY;

View File

@ -985,7 +985,7 @@ static void ProduceIndustryGoods(Industry *i)
} }
} }
void OnTick_Industry(void) void OnTick_Industry()
{ {
Industry *i; Industry *i;
@ -1355,7 +1355,7 @@ static bool CheckIfTooCloseToIndustry(TileIndex tile, int type)
return true; return true;
} }
static Industry *AllocateIndustry(void) static Industry *AllocateIndustry()
{ {
Industry *i; Industry *i;
@ -1582,7 +1582,7 @@ static void PlaceInitialIndustry(IndustryType type, int amount)
} }
} }
void GenerateIndustries(void) void GenerateIndustries()
{ {
const byte *b; const byte *b;
uint i = 0; uint i = 0;
@ -1824,7 +1824,7 @@ static void ChangeIndustryProduction(Industry *i)
} }
} }
void IndustryMonthlyLoop(void) void IndustryMonthlyLoop()
{ {
Industry *i; Industry *i;
PlayerID old_player = _current_player; PlayerID old_player = _current_player;
@ -1850,7 +1850,7 @@ void IndustryMonthlyLoop(void)
} }
void InitializeIndustries(void) void InitializeIndustries()
{ {
CleanPool(&_Industry_pool); CleanPool(&_Industry_pool);
AddBlockToPool(&_Industry_pool); AddBlockToPool(&_Industry_pool);
@ -1908,7 +1908,7 @@ static const SaveLoad _industry_desc[] = {
SLE_END() SLE_END()
}; };
static void Save_INDY(void) static void Save_INDY()
{ {
Industry *ind; Industry *ind;
@ -1919,7 +1919,7 @@ static void Save_INDY(void)
} }
} }
static void Load_INDY(void) static void Load_INDY()
{ {
int index; int index;

View File

@ -271,7 +271,7 @@ static const WindowDesc * const _industry_window_desc[2][4] = {
}, },
}; };
void ShowBuildIndustryWindow(void) void ShowBuildIndustryWindow()
{ {
if (!IsValidPlayer(_current_player)) return; if (!IsValidPlayer(_current_player)) return;
AllocateWindowDescFront(_industry_window_desc[_patches.build_rawmaterial_ind][_opt_ptr->landscape],0); AllocateWindowDescFront(_industry_window_desc[_patches.build_rawmaterial_ind][_opt_ptr->landscape],0);
@ -561,7 +561,7 @@ static int CDECL GeneralIndustrySorter(const void *a, const void *b)
* starts a new game without industries after playing a game with industries * starts a new game without industries after playing a game with industries
* the list is not populated with invalid industries from the previous game. * the list is not populated with invalid industries from the previous game.
*/ */
static void MakeSortedIndustryList(void) static void MakeSortedIndustryList()
{ {
const Industry* i; const Industry* i;
int n = 0; int n = 0;
@ -690,7 +690,7 @@ static const WindowDesc _industry_directory_desc = {
}; };
void ShowIndustryDirectory(void) void ShowIndustryDirectory()
{ {
Window *w = AllocateWindowDescFront(&_industry_directory_desc, 0); Window *w = AllocateWindowDescFront(&_industry_directory_desc, 0);

View File

@ -99,7 +99,7 @@ static const WindowDesc _select_game_desc = {
SelectGameWndProc SelectGameWndProc
}; };
void ShowSelectGameWindow(void) void ShowSelectGameWindow()
{ {
AllocateWindowDesc(&_select_game_desc); AllocateWindowDesc(&_select_game_desc);
} }
@ -109,7 +109,7 @@ static void AskExitGameCallback(Window *w, bool confirmed)
if (confirmed) _exit_game = true; if (confirmed) _exit_game = true;
} }
void AskExitGame(void) void AskExitGame()
{ {
#if defined(_WIN32) #if defined(_WIN32)
SetDParam(0, STR_0133_WINDOWS); SetDParam(0, STR_0133_WINDOWS);
@ -142,7 +142,7 @@ static void AskExitToGameMenuCallback(Window *w, bool confirmed)
if (confirmed) _switch_mode = SM_MENU; if (confirmed) _switch_mode = SM_MENU;
} }
void AskExitToGameMenu(void) void AskExitToGameMenu()
{ {
ShowQuery( ShowQuery(
STR_0161_QUIT_GAME, STR_0161_QUIT_GAME,

View File

@ -379,7 +379,7 @@ int32 CmdClearArea(TileIndex tile, uint32 flags, uint32 p1, uint32 p2)
#define TILELOOP_ASSERTMASK ((TILELOOP_SIZE-1) + ((TILELOOP_SIZE-1) << MapLogX())) #define TILELOOP_ASSERTMASK ((TILELOOP_SIZE-1) + ((TILELOOP_SIZE-1) << MapLogX()))
#define TILELOOP_CHKMASK (((1 << (MapLogX() - TILELOOP_BITS))-1) << TILELOOP_BITS) #define TILELOOP_CHKMASK (((1 << (MapLogX() - TILELOOP_BITS))-1) << TILELOOP_BITS)
void RunTileLoop(void) void RunTileLoop()
{ {
TileIndex tile; TileIndex tile;
uint count; uint count;
@ -405,7 +405,7 @@ void RunTileLoop(void)
_cur_tileloop_tile = tile; _cur_tileloop_tile = tile;
} }
void InitializeLandscape(void) void InitializeLandscape()
{ {
uint maxx = MapMaxX(); uint maxx = MapMaxX();
uint maxy = MapMaxY(); uint maxy = MapMaxY();
@ -425,7 +425,7 @@ void InitializeLandscape(void)
for (x = 0; x < sizex; x++) MakeVoid(sizex * y + x); for (x = 0; x < sizex; x++) MakeVoid(sizex * y + x);
} }
void ConvertGroundTilesIntoWaterTiles(void) void ConvertGroundTilesIntoWaterTiles()
{ {
TileIndex tile; TileIndex tile;
uint z; uint z;
@ -587,7 +587,7 @@ static void GenerateTerrain(int type, int flag)
#include "table/genland.h" #include "table/genland.h"
static void CreateDesertOrRainForest(void) static void CreateDesertOrRainForest()
{ {
TileIndex tile; TileIndex tile;
TileIndex update_freq = MapSize() / 4; TileIndex update_freq = MapSize() / 4;
@ -697,15 +697,15 @@ void GenerateLandscape(byte mode)
if (_opt.landscape == LT_DESERT) CreateDesertOrRainForest(); if (_opt.landscape == LT_DESERT) CreateDesertOrRainForest();
} }
void OnTick_Town(void); void OnTick_Town();
void OnTick_Trees(void); void OnTick_Trees();
void OnTick_Station(void); void OnTick_Station();
void OnTick_Industry(void); void OnTick_Industry();
void OnTick_Players(void); void OnTick_Players();
void OnTick_Train(void); void OnTick_Train();
void CallLandscapeTick(void) void CallLandscapeTick()
{ {
OnTick_Town(); OnTick_Town();
OnTick_Trees(); OnTick_Trees();

View File

@ -29,8 +29,7 @@
59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
Markus F.X.J. Oberhumer Markus F.X.J. Oberhumer
<markus@oberhumer.com> <markus@oberhumer.com> http://www.oberhumer.com/opensource/lzo/
http://www.oberhumer.com/opensource/lzo/
*/ */
@ -407,11 +406,11 @@ typedef void (__LZO_ENTRY *lzo_progress_callback_t) (lzo_uint, lzo_uint);
LZO_EXTERN(int) __lzo_init2(unsigned,int,int,int,int,int,int,int,int,int); LZO_EXTERN(int) __lzo_init2(unsigned,int,int,int,int,int,int,int,int,int);
/* version functions (useful for shared libraries) */ /* version functions (useful for shared libraries) */
LZO_EXTERN(unsigned) lzo_version(void); LZO_EXTERN(unsigned) lzo_version();
LZO_EXTERN(const char *) lzo_version_string(void); LZO_EXTERN(const char *) lzo_version_string();
LZO_EXTERN(const char *) lzo_version_date(void); LZO_EXTERN(const char *) lzo_version_date();
LZO_EXTERN(const lzo_charp) _lzo_version_string(void); LZO_EXTERN(const lzo_charp) _lzo_version_string();
LZO_EXTERN(const lzo_charp) _lzo_version_date(void); LZO_EXTERN(const lzo_charp) _lzo_version_date();
/* string functions */ /* string functions */
LZO_EXTERN(int) LZO_EXTERN(int)
@ -431,7 +430,7 @@ lzo_crc32(lzo_uint32 _c, const lzo_byte *_buf, lzo_uint _len);
/* misc. */ /* misc. */
LZO_EXTERN(lzo_bool) lzo_assert(int _expr); 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_uint u; } __lzo_pu_u;
typedef union { lzo_bytep p; lzo_uint32 u32; } __lzo_pu32_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; typedef union { void *vp; lzo_bytep bp; lzo_uint32 u32; long l; } lzo_align_t;

View File

@ -52,8 +52,8 @@ static byte _terraform_size = 1;
RailType _last_built_railtype; RailType _last_built_railtype;
static int _scengen_town_size = 2; // depress medium-sized towns per default static int _scengen_town_size = 2; // depress medium-sized towns per default
extern void GenerateIndustries(void); extern void GenerateIndustries();
extern bool GenerateTowns(void); extern bool GenerateTowns();
void HandleOnEditText(const char *str) void HandleOnEditText(const char *str)
@ -337,7 +337,7 @@ void ShowRenameWaypointWindow(const Waypoint *wp)
ShowQueryString(STR_WAYPOINT_RAW, STR_EDIT_WAYPOINT_NAME, 30, 180, NULL, CS_ALPHANUMERAL); 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) { if (_cursor.sprite == SPR_CURSOR_SIGN) {
ResetObjectToPlace(); ResetObjectToPlace();
@ -370,12 +370,12 @@ static void MenuClickNewspaper(int index)
} }
} }
static void MenuClickSmallScreenshot(void) static void MenuClickSmallScreenshot()
{ {
SetScreenshotType(SC_VIEWPORT); SetScreenshotType(SC_VIEWPORT);
} }
static void MenuClickWorldScreenshot(void) static void MenuClickWorldScreenshot()
{ {
SetScreenshotType(SC_WORLD); SetScreenshotType(SC_WORLD);
} }
@ -1379,7 +1379,7 @@ static const WindowDesc _scen_edit_land_gen_desc = {
ScenEditLandGenWndProc, ScenEditLandGenWndProc,
}; };
static inline void ShowEditorTerraformToolBar(void) static inline void ShowEditorTerraformToolBar()
{ {
AllocateWindowDescFront(&_scen_edit_land_gen_desc, 0); AllocateWindowDescFront(&_scen_edit_land_gen_desc, 0);
} }
@ -1593,7 +1593,7 @@ static const Widget _scenedit_industry_candy_widgets[] = {
}; };
static bool AnyTownExists(void) static bool AnyTownExists()
{ {
const Town *t; const Town *t;
@ -2235,7 +2235,7 @@ static WindowDesc _main_status_desc = {
StatusBarWndProc StatusBarWndProc
}; };
extern void UpdateAllStationVirtCoord(void); extern void UpdateAllStationVirtCoord();
static void MainWindowWndProc(Window *w, WindowEvent *e) static void MainWindowWndProc(Window *w, WindowEvent *e)
{ {
@ -2401,9 +2401,9 @@ static void MainWindowWndProc(Window *w, WindowEvent *e)
} }
void ShowSelectGameWindow(void); void ShowSelectGameWindow();
void SetupColorsAndInitialWindow(void) void SetupColorsAndInitialWindow()
{ {
uint i; uint i;
Window *w; Window *w;
@ -2436,7 +2436,7 @@ void SetupColorsAndInitialWindow(void)
} }
} }
void ShowVitalWindows(void) void ShowVitalWindows()
{ {
Window *w; Window *w;
@ -2461,7 +2461,7 @@ void ShowVitalWindows(void)
WP(w,def_d).data_1 = -1280; WP(w,def_d).data_1 = -1280;
} }
void GameSizeChanged(void) void GameSizeChanged()
{ {
_cur_resolution[0] = _screen.width; _cur_resolution[0] = _screen.width;
_cur_resolution[1] = _screen.height; _cur_resolution[1] = _screen.height;
@ -2470,7 +2470,7 @@ void GameSizeChanged(void)
MarkWholeScreenDirty(); MarkWholeScreenDirty();
} }
void InitializeMainGui(void) void InitializeMainGui()
{ {
/* Clean old GUI values */ /* Clean old GUI values */
_last_built_railtype = RAILTYPE_RAIL; _last_built_railtype = RAILTYPE_RAIL;

View File

@ -33,15 +33,15 @@ extern Tile* _m;
void AllocateMap(uint size_x, uint size_y); void AllocateMap(uint size_x, uint size_y);
/* binary logarithm of the map size, try to avoid using this one */ /* 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 */ /* The size of the map */
static inline uint MapSizeX(void) { return _map_size_x; } static inline uint MapSizeX() { return _map_size_x; }
static inline uint MapSizeY(void) { return _map_size_y; } static inline uint MapSizeY() { return _map_size_y; }
/* The maximum coordinates */ /* The maximum coordinates */
static inline uint MapMaxX(void) { return _map_size_x - 1; } static inline uint MapMaxX() { return _map_size_x - 1; }
static inline uint MapMaxY(void) { return _map_size_y - 1; } static inline uint MapMaxY() { return _map_size_y - 1; }
/* The number of tiles in the map */ /* 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 */ /* Scale a number relative to the map size */
uint ScaleByMapSize(uint); // Scale relative to the number of tiles uint ScaleByMapSize(uint); // Scale relative to the number of tiles

View File

@ -32,7 +32,7 @@ void SeedMT(uint32 seed)
} }
static uint32 ReloadMT(void) static uint32 ReloadMT()
{ {
register uint32 *p0=_mt_state, *p2=_mt_state+2, *pM=_mt_state+M, s0, s1; register uint32 *p0=_mt_state, *p2=_mt_state+2, *pM=_mt_state+M, s0, s1;
register int j; register int j;
@ -56,7 +56,7 @@ static uint32 ReloadMT(void)
} }
uint32 RandomMT(void) uint32 RandomMT()
{ {
uint32 y; uint32 y;

View File

@ -270,7 +270,7 @@
__LZO_EXTERN_C int __lzo_init_done; __LZO_EXTERN_C int __lzo_init_done;
__LZO_EXTERN_C const lzo_byte __lzo_copyright[]; __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]; __LZO_EXTERN_C const lzo_uint32 _lzo_crc32_table[256];
#define _LZO_STRINGIZE(x) #x #define _LZO_STRINGIZE(x) #x
@ -709,7 +709,7 @@ lzo_adler32(lzo_uint32 adler, const lzo_byte *buf, lzo_uint len)
#define IS_POWER_OF_2(x) (((x) & ((x) - 1)) == 0) #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 *); // static lzo_bool strength_reduce_bug(int *);
#if 0 || defined(LZO_DEBUG) #if 0 || defined(LZO_DEBUG)

View File

@ -29,7 +29,7 @@ char _name_array[512][32];
#include "network/network_data.h" #include "network/network_data.h"
uint32 DoRandom(int line, const char *file) uint32 DoRandom(int line, const char *file)
#else // RANDOM_DEBUG #else // RANDOM_DEBUG
uint32 Random(void) uint32 Random()
#endif // RANDOM_DEBUG #endif // RANDOM_DEBUG
{ {
@ -61,7 +61,7 @@ uint RandomRange(uint max)
#endif #endif
uint32 InteractiveRandom(void) uint32 InteractiveRandom()
{ {
uint32 t = _random_seeds[1][1]; uint32 t = _random_seeds[1][1];
uint32 s = _random_seeds[1][0]; uint32 s = _random_seeds[1][0];
@ -74,27 +74,27 @@ uint InteractiveRandomRange(uint max)
return GB(InteractiveRandom(), 0, 16) * max >> 16; return GB(InteractiveRandom(), 0, 16) * max >> 16;
} }
void InitializeVehicles(void); void InitializeVehicles();
void InitializeWaypoints(void); void InitializeWaypoints();
void InitializeDepots(void); void InitializeDepots();
void InitializeEngines(void); void InitializeEngines();
void InitializeOrders(void); void InitializeOrders();
void InitializeClearLand(void); void InitializeClearLand();
void InitializeRailGui(void); void InitializeRailGui();
void InitializeRoadGui(void); void InitializeRoadGui();
void InitializeAirportGui(void); void InitializeAirportGui();
void InitializeDockGui(void); void InitializeDockGui();
void InitializeIndustries(void); void InitializeIndustries();
void InitializeMainGui(void); void InitializeMainGui();
void InitializeLandscape(void); void InitializeLandscape();
void InitializeTowns(void); void InitializeTowns();
void InitializeTrees(void); void InitializeTrees();
void InitializeSigns(void); void InitializeSigns();
void InitializeStations(void); void InitializeStations();
static void InitializeNameMgr(void); static void InitializeNameMgr();
void InitializePlayers(void); void InitializePlayers();
static void InitializeCheats(void); static void InitializeCheats();
void InitializeNPF(void); void InitializeNPF();
void InitializeGame(int mode, uint size_x, uint size_y) void InitializeGame(int mode, uint size_x, uint size_y)
{ {
@ -170,13 +170,13 @@ char *GetName(char *buff, StringID id, const char* last)
} }
static void InitializeCheats(void) static void InitializeCheats()
{ {
memset(&_cheats, 0, sizeof(Cheats)); memset(&_cheats, 0, sizeof(Cheats));
} }
static void InitializeNameMgr(void) static void InitializeNameMgr()
{ {
memset(_name_array, 0, sizeof(_name_array)); memset(_name_array, 0, sizeof(_name_array));
} }
@ -204,7 +204,7 @@ StringID RealAllocateName(const char *name, byte skip, bool check_double)
} }
} }
void ConvertNameArray(void) void ConvertNameArray()
{ {
uint i; uint i;
@ -267,7 +267,7 @@ int FindFirstBit(uint32 value)
} }
static void Save_NAME(void) static void Save_NAME()
{ {
int i; int i;
@ -279,7 +279,7 @@ static void Save_NAME(void)
} }
} }
static void Load_NAME(void) static void Load_NAME()
{ {
int index; int index;
@ -314,7 +314,7 @@ static const SaveLoadGlobVarList _date_desc[] = {
/* Save load date related variables as well as persistent tick counters /* Save load date related variables as well as persistent tick counters
* XXX: currently some unrelated stuff is just put here */ * XXX: currently some unrelated stuff is just put here */
static void SaveLoad_DATE(void) static void SaveLoad_DATE()
{ {
SlGlobList(_date_desc); SlGlobList(_date_desc);
} }
@ -329,7 +329,7 @@ static const SaveLoadGlobVarList _view_desc[] = {
SLEG_END() SLEG_END()
}; };
static void SaveLoad_VIEW(void) static void SaveLoad_VIEW()
{ {
SlGlobList(_view_desc); SlGlobList(_view_desc);
} }
@ -343,20 +343,20 @@ static const SaveLoadGlobVarList _map_dimensions[] = {
SLEG_END() SLEG_END()
}; };
static void Save_MAPS(void) static void Save_MAPS()
{ {
_map_dim_x = MapSizeX(); _map_dim_x = MapSizeX();
_map_dim_y = MapSizeY(); _map_dim_y = MapSizeY();
SlGlobList(_map_dimensions); SlGlobList(_map_dimensions);
} }
static void Load_MAPS(void) static void Load_MAPS()
{ {
SlGlobList(_map_dimensions); SlGlobList(_map_dimensions);
AllocateMap(_map_dim_x, _map_dim_y); AllocateMap(_map_dim_x, _map_dim_y);
} }
static void Load_MAPT(void) static void Load_MAPT()
{ {
uint size = MapSize(); uint size = MapSize();
uint i; uint i;
@ -370,7 +370,7 @@ static void Load_MAPT(void)
} }
} }
static void Save_MAPT(void) static void Save_MAPT()
{ {
uint size = MapSize(); uint size = MapSize();
uint i; uint i;
@ -385,7 +385,7 @@ static void Save_MAPT(void)
} }
} }
static void Load_MAP1(void) static void Load_MAP1()
{ {
uint size = MapSize(); uint size = MapSize();
uint i; uint i;
@ -399,7 +399,7 @@ static void Load_MAP1(void)
} }
} }
static void Save_MAP1(void) static void Save_MAP1()
{ {
uint size = MapSize(); uint size = MapSize();
uint i; uint i;
@ -414,7 +414,7 @@ static void Save_MAP1(void)
} }
} }
static void Load_MAP2(void) static void Load_MAP2()
{ {
uint size = MapSize(); uint size = MapSize();
uint i; uint i;
@ -431,7 +431,7 @@ static void Load_MAP2(void)
} }
} }
static void Save_MAP2(void) static void Save_MAP2()
{ {
uint size = MapSize(); uint size = MapSize();
uint i; uint i;
@ -446,7 +446,7 @@ static void Save_MAP2(void)
} }
} }
static void Load_MAP3(void) static void Load_MAP3()
{ {
uint size = MapSize(); uint size = MapSize();
uint i; uint i;
@ -460,7 +460,7 @@ static void Load_MAP3(void)
} }
} }
static void Save_MAP3(void) static void Save_MAP3()
{ {
uint size = MapSize(); uint size = MapSize();
uint i; uint i;
@ -475,7 +475,7 @@ static void Save_MAP3(void)
} }
} }
static void Load_MAP4(void) static void Load_MAP4()
{ {
uint size = MapSize(); uint size = MapSize();
uint i; uint i;
@ -489,7 +489,7 @@ static void Load_MAP4(void)
} }
} }
static void Save_MAP4(void) static void Save_MAP4()
{ {
uint size = MapSize(); uint size = MapSize();
uint i; uint i;
@ -504,7 +504,7 @@ static void Save_MAP4(void)
} }
} }
static void Load_MAP5(void) static void Load_MAP5()
{ {
uint size = MapSize(); uint size = MapSize();
uint i; uint i;
@ -518,7 +518,7 @@ static void Load_MAP5(void)
} }
} }
static void Save_MAP5(void) static void Save_MAP5()
{ {
uint size = MapSize(); uint size = MapSize();
uint i; uint i;
@ -533,7 +533,7 @@ static void Save_MAP5(void)
} }
} }
static void Load_MAP6(void) static void Load_MAP6()
{ {
/* Still available for loading old games */ /* Still available for loading old games */
uint size = MapSize(); uint size = MapSize();
@ -563,7 +563,7 @@ static void Load_MAP6(void)
} }
} }
static void Save_MAP6(void) static void Save_MAP6()
{ {
uint size = MapSize(); uint size = MapSize();
uint i; uint i;
@ -579,7 +579,7 @@ static void Save_MAP6(void)
} }
static void Save_CHTS(void) static void Save_CHTS()
{ {
byte count = sizeof(_cheats)/sizeof(Cheat); byte count = sizeof(_cheats)/sizeof(Cheat);
Cheat* cht = (Cheat*) &_cheats; Cheat* cht = (Cheat*) &_cheats;
@ -592,7 +592,7 @@ static void Save_CHTS(void)
} }
} }
static void Load_CHTS(void) static void Load_CHTS()
{ {
Cheat* cht = (Cheat*)&_cheats; Cheat* cht = (Cheat*)&_cheats;
uint count = SlGetFieldLength() / 2; uint count = SlGetFieldLength() / 2;

View File

@ -1,4 +1,4 @@
/* $Id:$ */ /* $Id$ */
#ifndef AUTOPTR_HPP #ifndef AUTOPTR_HPP
#define AUTOPTR_HPP #define AUTOPTR_HPP

View File

@ -191,7 +191,7 @@ static void Place_LandInfo(TileIndex tile)
#undef LANDINFOD_LEVEL #undef LANDINFOD_LEVEL
} }
void PlaceLandBlockInfo(void) void PlaceLandBlockInfo()
{ {
if (_cursor.sprite == SPR_CURSOR_QUERY) { if (_cursor.sprite == SPR_CURSOR_QUERY) {
ResetObjectToPlace(); ResetObjectToPlace();
@ -305,7 +305,7 @@ static const WindowDesc _about_desc = {
}; };
void ShowAboutWindow(void) void ShowAboutWindow()
{ {
DeleteWindowById(WC_GAME_OPTIONS, 0); DeleteWindowById(WC_GAME_OPTIONS, 0);
AllocateWindowDesc(&_about_desc); AllocateWindowDesc(&_about_desc);
@ -466,13 +466,13 @@ static const WindowDesc _build_trees_scen_desc = {
}; };
void ShowBuildTreesToolbar(void) void ShowBuildTreesToolbar()
{ {
if (!IsValidPlayer(_current_player)) return; if (!IsValidPlayer(_current_player)) return;
AllocateWindowDescFront(&_build_trees_desc, 0); AllocateWindowDescFront(&_build_trees_desc, 0);
} }
void ShowBuildTreesScenToolbar(void) void ShowBuildTreesScenToolbar()
{ {
AllocateWindowDescFront(&_build_trees_scen_desc, 0); AllocateWindowDescFront(&_build_trees_scen_desc, 0);
} }
@ -1330,7 +1330,7 @@ static const Widget _save_dialog_widgets[] = {
/* Colors for fios types */ /* Colors for fios types */
const byte _fios_colors[] = {13, 9, 9, 6, 5, 6, 5, 6, 6, 8}; const byte _fios_colors[] = {13, 9, 9, 6, 5, 6, 5, 6, 6, 8};
void BuildFileList(void) void BuildFileList()
{ {
_fios_path_changed = true; _fios_path_changed = true;
FiosFreeSavegameList(); FiosFreeSavegameList();
@ -1363,7 +1363,7 @@ static void DrawFiosTexts(uint maxw)
DoDrawStringTruncated(path, 2, 27, 16, maxw); DoDrawStringTruncated(path, 2, 27, 16, maxw);
} }
static void MakeSortedSaveGameList(void) static void MakeSortedSaveGameList()
{ {
uint sort_start = 0; uint sort_start = 0;
uint sort_end = 0; uint sort_end = 0;
@ -1387,7 +1387,7 @@ static void MakeSortedSaveGameList(void)
qsort(_fios_list + sort_start, s_amount, sizeof(FiosItem), compare_FiosItems); 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.. /* Check if we are not a specatator who wants to generate a name..
Let's use the name of player #0 for now. */ Let's use the name of player #0 for now. */
@ -1399,7 +1399,7 @@ static void GenerateFileName(void)
GetString(_edit_str_buf, STR_4004, lastof(_edit_str_buf)); GetString(_edit_str_buf, STR_4004, lastof(_edit_str_buf));
} }
extern void StartupEngines(void); extern void StartupEngines();
static void SaveLoadDlgWndProc(Window *w, WindowEvent *e) static void SaveLoadDlgWndProc(Window *w, WindowEvent *e)
{ {
@ -1663,7 +1663,7 @@ void ShowSaveLoadDialog(int mode)
ResetObjectToPlace(); ResetObjectToPlace();
} }
void RedrawAutosave(void) void RedrawAutosave()
{ {
SetWindowDirty(FindWindowById(WC_STATUS_BAR, 0)); SetWindowDirty(FindWindowById(WC_STATUS_BAR, 0));
} }
@ -1734,7 +1734,7 @@ static int32 ClickChangeClimateCheat(int32 p1, int32 p2)
return _opt.landscape; return _opt.landscape;
} }
extern void EnginesMonthlyLoop(void); extern void EnginesMonthlyLoop();
/** /**
* @param p2 1 (increase) or -1 (decrease) * @param p2 1 (increase) or -1 (decrease)
@ -1929,7 +1929,7 @@ static const WindowDesc _cheats_desc = {
}; };
void ShowCheatWindow(void) void ShowCheatWindow()
{ {
DeleteWindowById(WC_CHEATS, 0); DeleteWindowById(WC_CHEATS, 0);
AllocateWindowDesc(&_cheats_desc); AllocateWindowDesc(&_cheats_desc);

View File

@ -93,7 +93,7 @@ void MxMixSamples(void *buffer, uint samples)
} }
} }
MixerChannel *MxAllocateChannel(void) MixerChannel *MxAllocateChannel()
{ {
MixerChannel *mc; MixerChannel *mc;
for (mc = _channels; mc != endof(_channels); mc++) for (mc = _channels; mc != endof(_channels); mc++)

View File

@ -17,7 +17,7 @@ enum {
bool MxInitialize(uint rate); bool MxInitialize(uint rate);
void MxMixSamples(void* buffer, uint samples); void MxMixSamples(void* buffer, uint samples);
MixerChannel* MxAllocateChannel(void); MixerChannel* MxAllocateChannel();
void MxSetChannelRawSrc(MixerChannel *mc, int8 *mem, uint size, uint rate, uint flags); void MxSetChannelRawSrc(MixerChannel *mc, int8 *mem, uint size, uint rate, uint flags);
void MxSetChannelVolume(MixerChannel *mc, uint left, uint right); void MxSetChannelVolume(MixerChannel *mc, uint left, uint right);
void MxActivateChannel(MixerChannel*); void MxActivateChannel(MixerChannel*);

View File

@ -14,7 +14,7 @@ static const char *bemidi_start(const char * const *parm)
return NULL; return NULL;
} }
static void bemidi_stop(void) static void bemidi_stop()
{ {
midiSynthFile.UnloadFile(); midiSynthFile.UnloadFile();
} }
@ -28,12 +28,12 @@ static void bemidi_play_song(const char *filename)
midiSynthFile.Start(); midiSynthFile.Start();
} }
static void bemidi_stop_song(void) static void bemidi_stop_song()
{ {
midiSynthFile.UnloadFile(); midiSynthFile.UnloadFile();
} }
static bool bemidi_is_playing(void) static bool bemidi_is_playing()
{ {
return !midiSynthFile.IsFinished(); return !midiSynthFile.IsFinished();
} }

View File

@ -107,7 +107,7 @@ static const char* DMusicMidiStart(const char* const* parm)
} }
static void DMusicMidiStop(void) static void DMusicMidiStop()
{ {
seeking = false; seeking = false;
@ -186,7 +186,7 @@ static void DMusicMidiPlaySong(const char* filename)
} }
static void DMusicMidiStopSong(void) static void DMusicMidiStopSong()
{ {
if (FAILED(performance->Stop(segment, NULL, 0, 0))) { if (FAILED(performance->Stop(segment, NULL, 0, 0))) {
DEBUG(driver, 0, "DirectMusic: StopSegment failed"); DEBUG(driver, 0, "DirectMusic: StopSegment failed");
@ -195,7 +195,7 @@ static void DMusicMidiStopSong(void)
} }
static bool DMusicMidiIsSongPlaying(void) static bool DMusicMidiIsSongPlaying()
{ {
/* Not the nicest code, but there is a short delay before playing actually /* Not the nicest code, but there is a short delay before playing actually
* starts. OpenTTD makes no provision for this. */ * starts. OpenTTD makes no provision for this. */

View File

@ -21,8 +21,8 @@ static struct {
pid_t pid; pid_t pid;
} _midi; } _midi;
static void DoPlay(void); static void DoPlay();
static void DoStop(void); static void DoStop();
static const char* ExtMidiStart(const char* const * parm) static const char* ExtMidiStart(const char* const * parm)
{ {
@ -31,7 +31,7 @@ static const char* ExtMidiStart(const char* const * parm)
return NULL; return NULL;
} }
static void ExtMidiStop(void) static void ExtMidiStop()
{ {
_midi.song[0] = '\0'; _midi.song[0] = '\0';
DoStop(); DoStop();
@ -43,13 +43,13 @@ static void ExtMidiPlaySong(const char* filename)
DoStop(); DoStop();
} }
static void ExtMidiStopSong(void) static void ExtMidiStopSong()
{ {
_midi.song[0] = '\0'; _midi.song[0] = '\0';
DoStop(); DoStop();
} }
static bool ExtMidiIsPlaying(void) static bool ExtMidiIsPlaying()
{ {
if (_midi.pid != -1 && waitpid(_midi.pid, NULL, WNOHANG) == _midi.pid) if (_midi.pid != -1 && waitpid(_midi.pid, NULL, WNOHANG) == _midi.pid)
_midi.pid = -1; _midi.pid = -1;
@ -62,7 +62,7 @@ static void ExtMidiSetVolume(byte vol)
DEBUG(driver, 1, "extmidi: set volume not implemented"); DEBUG(driver, 1, "extmidi: set volume not implemented");
} }
static void DoPlay(void) static void DoPlay()
{ {
_midi.pid = fork(); _midi.pid = fork();
switch (_midi.pid) { switch (_midi.pid) {
@ -91,7 +91,7 @@ static void DoPlay(void)
} }
} }
static void DoStop(void) static void DoStop()
{ {
if (_midi.pid != -1) kill(_midi.pid, SIGTERM); if (_midi.pid != -1) kill(_midi.pid, SIGTERM);
} }

View File

@ -77,7 +77,7 @@ static const char *LibtimidityMidiStart(const char *const *param)
return NULL; return NULL;
} }
static void LibtimidityMidiStop(void) static void LibtimidityMidiStop()
{ {
if (_midi.status == MIDI_PLAYING) { if (_midi.status == MIDI_PLAYING) {
_midi.status = MIDI_STOPPED; _midi.status = MIDI_STOPPED;
@ -107,13 +107,13 @@ static void LibtimidityMidiPlaySong(const char *filename)
_midi.status = MIDI_PLAYING; _midi.status = MIDI_PLAYING;
} }
static void LibtimidityMidiStopSong(void) static void LibtimidityMidiStopSong()
{ {
_midi.status = MIDI_STOPPED; _midi.status = MIDI_STOPPED;
mid_song_free(_midi.song); mid_song_free(_midi.song);
} }
static bool LibtimidityMidiIsPlaying(void) static bool LibtimidityMidiIsPlaying()
{ {
if (_midi.status == MIDI_PLAYING) { if (_midi.status == MIDI_PLAYING) {
_midi.song_position = mid_song_get_time(_midi.song); _midi.song_position = mid_song_get_time(_midi.song);

View File

@ -4,10 +4,10 @@
#include "null_m.h" #include "null_m.h"
static const char* NullMidiStart(const char* const* parm) { return NULL; } 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 NullMidiPlaySong(const char *filename) {}
static void NullMidiStopSong(void) {} static void NullMidiStopSong() {}
static bool NullMidiIsSongPlaying(void) { return true; } static bool NullMidiIsSongPlaying() { return true; }
static void NullMidiSetVolume(byte vol) {} static void NullMidiSetVolume(byte vol) {}
const HalMusicDriver _null_music_driver = { const HalMusicDriver _null_music_driver = {

View File

@ -40,7 +40,7 @@ static void OS2MidiPlaySong(const char *filename)
MidiSendCommand("play song from 0"); MidiSendCommand("play song from 0");
} }
static void OS2MidiStopSong(void) static void OS2MidiStopSong()
{ {
MidiSendCommand("close all"); MidiSendCommand("close all");
} }
@ -50,7 +50,7 @@ static void OS2MidiSetVolume(byte vol)
MidiSendCommand("set song audio volume %d", ((vol/127)*100)); MidiSendCommand("set song audio volume %d", ((vol/127)*100));
} }
static bool OS2MidiIsSongPlaying(void) static bool OS2MidiIsSongPlaying()
{ {
char buf[16]; char buf[16];
mciSendString("status song mode", buf, sizeof(buf), NULL, 0); mciSendString("status song mode", buf, sizeof(buf), NULL, 0);
@ -62,7 +62,7 @@ static const char *OS2MidiStart(const char * const *parm)
return 0; return 0;
} }
static void OS2MidiStop(void) static void OS2MidiStop()
{ {
MidiSendCommand("close all"); MidiSendCommand("close all");
} }

View File

@ -173,7 +173,7 @@ static bool _quicktime_started = false;
* #_quicktime_started flag to @c true if QuickTime is present in the system * #_quicktime_started flag to @c true if QuickTime is present in the system
* and it was initialized properly. * and it was initialized properly.
*/ */
static void InitQuickTimeIfNeeded(void) static void InitQuickTimeIfNeeded()
{ {
OSStatus dummy; OSStatus dummy;
@ -207,7 +207,7 @@ static int _quicktime_state = QT_STATE_IDLE; /**< Current player state. */
#define VOLUME ((short)((0x00FF & _quicktime_volume) << 1)) #define VOLUME ((short)((0x00FF & _quicktime_volume) << 1))
static void StopSong(void); static void StopSong();
/** /**
@ -230,7 +230,7 @@ static const char* StartDriver(const char * const *parm)
* This function is called at regular intervals from OpenTTD's main loop, so * 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. * we call @c MoviesTask() from here to let QuickTime do its work.
*/ */
static bool SongIsPlaying(void) static bool SongIsPlaying()
{ {
if (!_quicktime_started) return true; if (!_quicktime_started) return true;
@ -258,7 +258,7 @@ static bool SongIsPlaying(void)
* Stops playing and frees any used resources before returning. As it * Stops playing and frees any used resources before returning. As it
* deinitilizes QuickTime, the #_quicktime_started flag is set to @c false. * deinitilizes QuickTime, the #_quicktime_started flag is set to @c false.
*/ */
static void StopDriver(void) static void StopDriver()
{ {
if (!_quicktime_started) return; if (!_quicktime_started) return;
@ -312,7 +312,7 @@ static void PlaySong(const char *filename)
/** /**
* Stops playing the current song, if the player is active. * Stops playing the current song, if the player is active.
*/ */
static void StopSong(void) static void StopSong()
{ {
if (!_quicktime_started) return; if (!_quicktime_started) return;

View File

@ -23,7 +23,7 @@ static void Win32MidiPlaySong(const char *filename)
SetEvent(_midi.wait_obj); SetEvent(_midi.wait_obj);
} }
static void Win32MidiStopSong(void) static void Win32MidiStopSong()
{ {
if (_midi.playing) { if (_midi.playing) {
_midi.stop_song = true; _midi.stop_song = true;
@ -32,7 +32,7 @@ static void Win32MidiStopSong(void)
} }
} }
static bool Win32MidiIsSongPlaying(void) static bool Win32MidiIsSongPlaying()
{ {
return _midi.playing; return _midi.playing;
} }
@ -62,7 +62,7 @@ static bool MidiIntPlaySong(const char *filename)
return MidiSendCommand("play song from 0") == 0; return MidiSendCommand("play song from 0") == 0;
} }
static void MidiIntStopSong(void) static void MidiIntStopSong()
{ {
MidiSendCommand("close all"); MidiSendCommand("close all");
} }
@ -73,7 +73,7 @@ static void MidiIntSetVolume(int vol)
midiOutSetVolume((HMIDIOUT)_midi.devid, v + (v << 16)); midiOutSetVolume((HMIDIOUT)_midi.devid, v + (v << 16));
} }
static bool MidiIntIsSongPlaying(void) static bool MidiIntIsSongPlaying()
{ {
char buf[16]; char buf[16];
mciSendStringA("status song mode", buf, sizeof(buf), 0); mciSendStringA("status song mode", buf, sizeof(buf), 0);
@ -146,7 +146,7 @@ static const char *Win32MidiStart(const char * const *parm)
return NULL; return NULL;
} }
static void Win32MidiStop(void) static void Win32MidiStop()
{ {
_midi.terminate = true; _midi.terminate = true;
SetEvent(_midi.wait_obj); SetEvent(_midi.wait_obj);

View File

@ -46,7 +46,7 @@ static byte * const _playlists[] = {
msf.custom_2, msf.custom_2,
}; };
static void SkipToPrevSong(void) static void SkipToPrevSong()
{ {
byte *b = _cur_playlist; byte *b = _cur_playlist;
byte *p = b; byte *p = b;
@ -66,7 +66,7 @@ static void SkipToPrevSong(void)
_song_is_active = false; _song_is_active = false;
} }
static void SkipToNextSong(void) static void SkipToNextSong()
{ {
byte* b = _cur_playlist; byte* b = _cur_playlist;
byte t; byte t;
@ -88,7 +88,7 @@ static void MusicVolumeChanged(byte new_vol)
_music_driver->set_volume(new_vol); _music_driver->set_volume(new_vol);
} }
static void DoPlaySong(void) static void DoPlaySong()
{ {
char filename[256]; char filename[256];
snprintf(filename, sizeof(filename), "%s%s", snprintf(filename, sizeof(filename), "%s%s",
@ -96,12 +96,12 @@ static void DoPlaySong(void)
_music_driver->play_song(filename); _music_driver->play_song(filename);
} }
static void DoStopMusic(void) static void DoStopMusic()
{ {
_music_driver->stop_song(); _music_driver->stop_song();
} }
static void SelectSongToPlay(void) static void SelectSongToPlay()
{ {
uint i = 0; uint i = 0;
uint j = 0; uint j = 0;
@ -138,7 +138,7 @@ static void SelectSongToPlay(void)
} }
} }
static void StopMusic(void) static void StopMusic()
{ {
_music_wnd_cursong = 0; _music_wnd_cursong = 0;
DoStopMusic(); DoStopMusic();
@ -146,7 +146,7 @@ static void StopMusic(void)
InvalidateWindowWidget(WC_MUSIC_WINDOW, 0, 9); InvalidateWindowWidget(WC_MUSIC_WINDOW, 0, 9);
} }
static void PlayPlaylistSong(void) static void PlayPlaylistSong()
{ {
if (_cur_playlist[0] == 0) { if (_cur_playlist[0] == 0) {
SelectSongToPlay(); SelectSongToPlay();
@ -167,13 +167,13 @@ static void PlayPlaylistSong(void)
InvalidateWindowWidget(WC_MUSIC_WINDOW, 0, 9); InvalidateWindowWidget(WC_MUSIC_WINDOW, 0, 9);
} }
void ResetMusic(void) void ResetMusic()
{ {
_music_wnd_cursong = 1; _music_wnd_cursong = 1;
DoPlaySong(); DoPlaySong();
} }
void MusicLoop(void) void MusicLoop()
{ {
if (!msf.playing && _song_is_active) { if (!msf.playing && _song_is_active) {
StopMusic(); StopMusic();
@ -333,7 +333,7 @@ static const WindowDesc _music_track_selection_desc = {
MusicTrackSelectionWndProc MusicTrackSelectionWndProc
}; };
static void ShowMusicTrackSelection(void) static void ShowMusicTrackSelection()
{ {
AllocateWindowDescFront(&_music_track_selection_desc, 0); AllocateWindowDescFront(&_music_track_selection_desc, 0);
} }
@ -501,7 +501,7 @@ static const WindowDesc _music_window_desc = {
MusicWindowWndProc MusicWindowWndProc
}; };
void ShowMusicWindow(void) void ShowMusicWindow()
{ {
AllocateWindowDescFront(&_music_window_desc, 0); AllocateWindowDescFront(&_music_window_desc, 0);
} }

View File

@ -21,7 +21,7 @@ struct Library *SocketBase = NULL;
* Initializes the network core (as that is needed for some platforms * Initializes the network core (as that is needed for some platforms
* @return true if the core has been initialized, false otherwise * @return true if the core has been initialized, false otherwise
*/ */
bool NetworkCoreInitialize(void) bool NetworkCoreInitialize()
{ {
#if defined(__MORPHOS__) || defined(__AMIGA__) #if defined(__MORPHOS__) || defined(__AMIGA__)
/* /*
@ -72,7 +72,7 @@ bool NetworkCoreInitialize(void)
/** /**
* Shuts down the network core (as that is needed for some platforms * Shuts down the network core (as that is needed for some platforms
*/ */
void NetworkCoreShutdown(void) void NetworkCoreShutdown()
{ {
#if defined(__MORPHOS__) || defined(__AMIGA__) #if defined(__MORPHOS__) || defined(__AMIGA__)
/* free allocated resources */ /* free allocated resources */

View File

@ -12,8 +12,8 @@
#include "os_abstraction.h" #include "os_abstraction.h"
#include "../../newgrf_config.h" #include "../../newgrf_config.h"
bool NetworkCoreInitialize(void); bool NetworkCoreInitialize();
void NetworkCoreShutdown(void); void NetworkCoreShutdown();
/** Status of a network client; reasons why a client has quit */ /** Status of a network client; reasons why a client has quit */
typedef enum { typedef enum {

View File

@ -63,7 +63,7 @@ Packet *NetworkSend_Init(PacketType type)
/** /**
* Writes the packet size from the raw packet from packet->size * 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); assert(this->cs == NULL && this->next == NULL);
@ -163,7 +163,7 @@ bool Packet::CanReadFromPacket(uint bytes_to_read)
/** /**
* Reads the packet size from the raw packet and stores it in the packet->size * 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); assert(this->cs != NULL && this->next == NULL);
this->size = (PacketSize)this->buffer[0]; this->size = (PacketSize)this->buffer[0];
@ -173,7 +173,7 @@ void Packet::ReadRawPacketSize(void)
/** /**
* Prepares the packet so it can be read * Prepares the packet so it can be read
*/ */
void Packet::PrepareToRead(void) void Packet::PrepareToRead()
{ {
this->ReadRawPacketSize(); this->ReadRawPacketSize();
@ -181,12 +181,12 @@ void Packet::PrepareToRead(void)
this->pos = sizeof(PacketSize); this->pos = sizeof(PacketSize);
} }
bool Packet::Recv_bool(void) bool Packet::Recv_bool()
{ {
return this->Recv_uint8() != 0; return this->Recv_uint8() != 0;
} }
uint8 Packet::Recv_uint8(void) uint8 Packet::Recv_uint8()
{ {
uint8 n; uint8 n;
@ -196,7 +196,7 @@ uint8 Packet::Recv_uint8(void)
return n; return n;
} }
uint16 Packet::Recv_uint16(void) uint16 Packet::Recv_uint16()
{ {
uint16 n; uint16 n;
@ -207,7 +207,7 @@ uint16 Packet::Recv_uint16(void)
return n; return n;
} }
uint32 Packet::Recv_uint32(void) uint32 Packet::Recv_uint32()
{ {
uint32 n; uint32 n;
@ -220,7 +220,7 @@ uint32 Packet::Recv_uint32(void)
return n; return n;
} }
uint64 Packet::Recv_uint64(void) uint64 Packet::Recv_uint64()
{ {
uint64 n; uint64 n;

View File

@ -43,7 +43,7 @@ public:
Packet(PacketType type); Packet(PacketType type);
/* Sending/writing of packets */ /* Sending/writing of packets */
void PrepareToSend(void); void PrepareToSend();
void Send_bool (bool data); void Send_bool (bool data);
void Send_uint8 (uint8 data); void Send_uint8 (uint8 data);
@ -53,15 +53,15 @@ public:
void Send_string(const char* data); void Send_string(const char* data);
/* Reading/receiving of packets */ /* Reading/receiving of packets */
void ReadRawPacketSize(void); void ReadRawPacketSize();
void PrepareToRead(void); void PrepareToRead();
bool CanReadFromPacket (uint bytes_to_read); bool CanReadFromPacket (uint bytes_to_read);
bool Recv_bool (void); bool Recv_bool ();
uint8 Recv_uint8 (void); uint8 Recv_uint8 ();
uint16 Recv_uint16(void); uint16 Recv_uint16();
uint32 Recv_uint32(void); uint32 Recv_uint32();
uint64 Recv_uint64(void); uint64 Recv_uint64();
void Recv_string(char* buffer, size_t size); void Recv_string(char* buffer, size_t size);
}; };

View File

@ -63,7 +63,7 @@ static byte _network_clients_connected = 0;
static uint16 _network_client_index = NETWORK_SERVER_INDEX + 1; static uint16 _network_client_index = NETWORK_SERVER_INDEX + 1;
/* Some externs / forwards */ /* Some externs / forwards */
extern void StateGameLoop(void); extern void StateGameLoop();
// Function that looks up the CI for a given client-index // Function that looks up the CI for a given client-index
NetworkClientInfo *NetworkFindClientInfoFromIndex(uint16 client_index) NetworkClientInfo *NetworkFindClientInfoFromIndex(uint16 client_index)
@ -117,7 +117,7 @@ void NetworkGetClientName(char *client_name, size_t size, const NetworkTCPSocket
} }
} }
byte NetworkSpectatorCount(void) byte NetworkSpectatorCount()
{ {
NetworkTCPSocketHandler *cs; NetworkTCPSocketHandler *cs;
byte count = 0; byte count = 0;
@ -301,7 +301,7 @@ char* GetNetworkErrorMsg(char* buf, NetworkErrorCode err, const char* last)
} }
/* Count the number of active clients connected */ /* Count the number of active clients connected */
static uint NetworkCountPlayers(void) static uint NetworkCountPlayers()
{ {
NetworkTCPSocketHandler *cs; NetworkTCPSocketHandler *cs;
uint count = 0; uint count = 0;
@ -317,7 +317,7 @@ static uint NetworkCountPlayers(void)
static bool _min_players_paused = false; static bool _min_players_paused = false;
/* Check if the minimum number of players has been reached and pause or unpause the game as appropriate */ /* 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; if (!_network_dedicated) return;
@ -337,7 +337,7 @@ void CheckMinPlayers(void)
} }
// Find all IP-aliases for this host // Find all IP-aliases for this host
static void NetworkFindIPs(void) static void NetworkFindIPs()
{ {
#if !defined(PSP) #if !defined(PSP)
int i; int i;
@ -717,7 +717,7 @@ static bool NetworkConnect(const char *hostname, int port)
} }
// For the server, to accept new clients // For the server, to accept new clients
static void NetworkAcceptClients(void) static void NetworkAcceptClients()
{ {
struct sockaddr_in sin; struct sockaddr_in sin;
NetworkTCPSocketHandler *cs; NetworkTCPSocketHandler *cs;
@ -782,7 +782,7 @@ static void NetworkAcceptClients(void)
} }
// Set up the listen socket for the server // Set up the listen socket for the server
static bool NetworkListen(void) static bool NetworkListen()
{ {
SOCKET ls; SOCKET ls;
struct sockaddr_in sin; struct sockaddr_in sin;
@ -826,7 +826,7 @@ static bool NetworkListen(void)
} }
// Close all current connections // Close all current connections
static void NetworkClose(void) static void NetworkClose()
{ {
NetworkTCPSocketHandler *cs; NetworkTCPSocketHandler *cs;
@ -848,7 +848,7 @@ static void NetworkClose(void)
} }
// Inits the network (cleans sockets and stuff) // Inits the network (cleans sockets and stuff)
static void NetworkInitialize(void) static void NetworkInitialize()
{ {
NetworkTCPSocketHandler *cs; NetworkTCPSocketHandler *cs;
@ -921,7 +921,7 @@ void NetworkAddServer(const char *b)
/* Generates the list of manually added hosts from NetworkGameList and /* Generates the list of manually added hosts from NetworkGameList and
* dumps them into the array _network_host_list. This array is needed * dumps them into the array _network_host_list. This array is needed
* by the function that generates the config file. */ * by the function that generates the config file. */
void NetworkRebuildHostList(void) void NetworkRebuildHostList()
{ {
uint i = 0; uint i = 0;
const NetworkGameList *item = _network_game_list; const NetworkGameList *item = _network_game_list;
@ -968,7 +968,7 @@ bool NetworkClientConnectGame(const char *host, uint16 port)
return _networking; return _networking;
} }
static void NetworkInitGameInfo(void) static void NetworkInitGameInfo()
{ {
NetworkClientInfo *ci; NetworkClientInfo *ci;
@ -1013,7 +1013,7 @@ static void NetworkInitGameInfo(void)
ttd_strlcpy(ci->unique_id, _network_unique_id, sizeof(ci->unique_id)); ttd_strlcpy(ci->unique_id, _network_unique_id, sizeof(ci->unique_id));
} }
bool NetworkServerStart(void) bool NetworkServerStart()
{ {
if (!_network_available) return false; if (!_network_available) return false;
@ -1060,7 +1060,7 @@ bool NetworkServerStart(void)
// The server is rebooting... // The server is rebooting...
// The only difference with NetworkDisconnect, is the packets that is sent // The only difference with NetworkDisconnect, is the packets that is sent
void NetworkReboot(void) void NetworkReboot()
{ {
if (_network_server) { if (_network_server) {
NetworkTCPSocketHandler *cs; NetworkTCPSocketHandler *cs;
@ -1084,7 +1084,7 @@ void NetworkReboot(void)
} }
// We want to disconnect from the host/clients // We want to disconnect from the host/clients
void NetworkDisconnect(void) void NetworkDisconnect()
{ {
if (_network_server) { if (_network_server) {
NetworkTCPSocketHandler *cs; NetworkTCPSocketHandler *cs;
@ -1112,7 +1112,7 @@ void NetworkDisconnect(void)
} }
// Receives something from the network // Receives something from the network
static bool NetworkReceive(void) static bool NetworkReceive()
{ {
NetworkTCPSocketHandler *cs; NetworkTCPSocketHandler *cs;
int n; int n;
@ -1167,7 +1167,7 @@ static bool NetworkReceive(void)
} }
// This sends all buffered commands (if possible) // This sends all buffered commands (if possible)
static void NetworkSend(void) static void NetworkSend()
{ {
NetworkTCPSocketHandler *cs; NetworkTCPSocketHandler *cs;
FOR_ALL_CLIENTS(cs) { FOR_ALL_CLIENTS(cs) {
@ -1183,7 +1183,7 @@ static void NetworkSend(void)
} }
// Handle the local-command-queue // Handle the local-command-queue
static void NetworkHandleLocalQueue(void) static void NetworkHandleLocalQueue()
{ {
CommandPacket *cp, **cp_prev; CommandPacket *cp, **cp_prev;
@ -1218,7 +1218,7 @@ static void NetworkHandleLocalQueue(void)
} }
static bool NetworkDoClientLoop(void) static bool NetworkDoClientLoop()
{ {
_frame_counter++; _frame_counter++;
@ -1259,7 +1259,7 @@ static bool NetworkDoClientLoop(void)
} }
// We have to do some UDP checking // We have to do some UDP checking
void NetworkUDPGameLoop(void) void NetworkUDPGameLoop()
{ {
if (_network_udp_server) { if (_network_udp_server) {
_udp_server_socket->ReceivePackets(); _udp_server_socket->ReceivePackets();
@ -1273,7 +1273,7 @@ void NetworkUDPGameLoop(void)
// The main loop called from ttd.c // The main loop called from ttd.c
// Here we also have to do StateGameLoop if needed! // Here we also have to do StateGameLoop if needed!
void NetworkGameLoop(void) void NetworkGameLoop()
{ {
if (!_networking) return; if (!_networking) return;
@ -1318,7 +1318,7 @@ void NetworkGameLoop(void)
NetworkSend(); NetworkSend();
} }
static void NetworkGenerateUniqueId(void) static void NetworkGenerateUniqueId()
{ {
md5_state_t state; md5_state_t state;
md5_byte_t digest[16]; md5_byte_t digest[16];
@ -1372,7 +1372,7 @@ void NetworkStartDebugLog(const char *hostname, uint16 port)
} }
/** This tries to launch the network for a given OS */ /** This tries to launch the network for a given OS */
void NetworkStartUp(void) void NetworkStartUp()
{ {
DEBUG(net, 3, "[core] starting network..."); DEBUG(net, 3, "[core] starting network...");
@ -1409,7 +1409,7 @@ void NetworkStartUp(void)
} }
/** This shuts the network down */ /** This shuts the network down */
void NetworkShutDown(void) void NetworkShutDown()
{ {
NetworkDisconnect(); NetworkDisconnect();
NetworkUDPShutdown(); NetworkUDPShutdown();

View File

@ -153,7 +153,7 @@ VARDEF uint8 _network_min_players; // Minimum number of players for ga
void NetworkTCPQueryServer(const char* host, unsigned short port); void NetworkTCPQueryServer(const char* host, unsigned short port);
byte NetworkSpectatorCount(void); byte NetworkSpectatorCount();
VARDEF char *_network_host_list[10]; VARDEF char *_network_host_list[10];
VARDEF char *_network_ban_list[25]; VARDEF char *_network_ban_list[25];
@ -161,22 +161,22 @@ VARDEF char *_network_ban_list[25];
void ParseConnectionString(const char **player, const char **port, char *connection_string); void ParseConnectionString(const char **player, const char **port, char *connection_string);
void NetworkUpdateClientInfo(uint16 client_index); void NetworkUpdateClientInfo(uint16 client_index);
void NetworkAddServer(const char *b); void NetworkAddServer(const char *b);
void NetworkRebuildHostList(void); void NetworkRebuildHostList();
bool NetworkChangeCompanyPassword(byte argc, char *argv[]); bool NetworkChangeCompanyPassword(byte argc, char *argv[]);
void NetworkPopulateCompanyInfo(void); void NetworkPopulateCompanyInfo();
void UpdateNetworkGameWindow(bool unselect); void UpdateNetworkGameWindow(bool unselect);
void CheckMinPlayers(void); void CheckMinPlayers();
void NetworkStartDebugLog(const char *hostname, uint16 port); void NetworkStartDebugLog(const char *hostname, uint16 port);
void NetworkStartUp(void); void NetworkStartUp();
void NetworkUDPCloseAll(); void NetworkUDPCloseAll();
void NetworkShutDown(void); void NetworkShutDown();
void NetworkGameLoop(void); void NetworkGameLoop();
void NetworkUDPGameLoop(void); void NetworkUDPGameLoop();
bool NetworkServerStart(void); bool NetworkServerStart();
bool NetworkClientConnectGame(const char *host, uint16 port); bool NetworkClientConnectGame(const char *host, uint16 port);
void NetworkReboot(void); void NetworkReboot();
void NetworkDisconnect(void); void NetworkDisconnect();
bool IsNetworkCompatibleVersion(const char *version); bool IsNetworkCompatibleVersion(const char *version);
@ -188,8 +188,8 @@ VARDEF bool _network_advertise; ///< is the server advertising to the master se
#else /* ENABLE_NETWORK */ #else /* ENABLE_NETWORK */
/* Network function stubs when networking is disabled */ /* Network function stubs when networking is disabled */
static inline void NetworkStartUp(void) {} static inline void NetworkStartUp() {}
static inline void NetworkShutDown(void) {} static inline void NetworkShutDown() {}
#define _networking 0 #define _networking 0
#define _network_server 0 #define _network_server 0

View File

@ -839,7 +839,7 @@ static NetworkClientPacket* const _network_client_packet[] = {
assert_compile(lengthof(_network_client_packet) == PACKET_END); assert_compile(lengthof(_network_client_packet) == PACKET_END);
// Is called after a client is connected to the server // 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 // Set the frame-counter to 0 so nothing happens till we are ready
_frame_counter = 0; _frame_counter = 0;

View File

@ -18,7 +18,7 @@ DEF_CLIENT_SEND_COMMAND(PACKET_CLIENT_ACK);
DEF_CLIENT_SEND_COMMAND_PARAM(PACKET_CLIENT_RCON)(const char *pass, const char *command); DEF_CLIENT_SEND_COMMAND_PARAM(PACKET_CLIENT_RCON)(const char *pass, const char *command);
NetworkRecvStatus NetworkClient_ReadPackets(NetworkTCPSocketHandler *cs); NetworkRecvStatus NetworkClient_ReadPackets(NetworkTCPSocketHandler *cs);
void NetworkClient_Connected(void); void NetworkClient_Connected();
#endif /* ENABLE_NETWORK */ #endif /* ENABLE_NETWORK */

View File

@ -84,7 +84,7 @@ extern NetworkTCPSocketHandler _clients[MAX_CLIENTS];
// Macros to make life a bit more easier // Macros to make life a bit more easier
#define DEF_CLIENT_RECEIVE_COMMAND(type) NetworkRecvStatus NetworkPacketReceive_ ## type ## _command(Packet *p) #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_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_RECEIVE_COMMAND(type) void NetworkPacketReceive_ ## type ## _command(NetworkTCPSocketHandler *cs, Packet *p)
#define DEF_SERVER_SEND_COMMAND(type) void NetworkPacketSend_ ## type ## _command(NetworkTCPSocketHandler *cs) #define DEF_SERVER_SEND_COMMAND(type) void NetworkPacketSend_ ## type ## _command(NetworkTCPSocketHandler *cs)
@ -104,7 +104,7 @@ void NetworkCloseClient(NetworkTCPSocketHandler *cs);
void CDECL NetworkTextMessage(NetworkAction action, uint16 color, bool self_send, const char *name, const char *str, ...); 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); void NetworkGetClientName(char *clientname, size_t size, const NetworkTCPSocketHandler *cs);
uint NetworkCalculateLag(const NetworkTCPSocketHandler *cs); uint NetworkCalculateLag(const NetworkTCPSocketHandler *cs);
byte NetworkGetCurrentLanguageIndex(void); byte NetworkGetCurrentLanguageIndex();
NetworkClientInfo *NetworkFindClientInfoFromIndex(uint16 client_index); NetworkClientInfo *NetworkFindClientInfoFromIndex(uint16 client_index);
NetworkClientInfo *NetworkFindClientInfoFromIP(const char *ip); NetworkClientInfo *NetworkFindClientInfoFromIP(const char *ip);
NetworkTCPSocketHandler *NetworkFindClientStateFromIndex(uint16 client_index); NetworkTCPSocketHandler *NetworkFindClientStateFromIndex(uint16 client_index);

View File

@ -89,7 +89,7 @@ enum {
}; };
/** Requeries the (game) servers we have not gotten a reply from */ /** Requeries the (game) servers we have not gotten a reply from */
void NetworkGameListRequery(void) void NetworkGameListRequery()
{ {
static uint8 requery_cnt = 0; static uint8 requery_cnt = 0;

View File

@ -19,6 +19,6 @@ extern NetworkGameList *_network_game_list;
NetworkGameList *NetworkGameListAddItem(uint32 ip, uint16 port); NetworkGameList *NetworkGameListAddItem(uint32 ip, uint16 port);
void NetworkGameListRemoveItem(NetworkGameList *remove); void NetworkGameListRemoveItem(NetworkGameList *remove);
void NetworkGameListRequery(void); void NetworkGameListRequery();
#endif /* NETWORK_GAMELIST_H */ #endif /* NETWORK_GAMELIST_H */

View File

@ -54,7 +54,7 @@ static Listing _ng_sorting;
static char _edit_str_buf[150]; static char _edit_str_buf[150];
static bool _chat_tab_completion_active; static bool _chat_tab_completion_active;
static void ShowNetworkStartServerWindow(void); static void ShowNetworkStartServerWindow();
static void ShowNetworkLobbyWindow(NetworkGameList *ngl); static void ShowNetworkLobbyWindow(NetworkGameList *ngl);
extern void SwitchMode(int new_mode); extern void SwitchMode(int new_mode);
@ -551,7 +551,7 @@ static const WindowDesc _network_game_window_desc = {
NetworkGameWindowWndProc, NetworkGameWindowWndProc,
}; };
void ShowNetworkGameWindow(void) void ShowNetworkGameWindow()
{ {
static bool first = true; static bool first = true;
Window *w; Window *w;
@ -778,7 +778,7 @@ static const WindowDesc _network_start_server_window_desc = {
NetworkStartServerWindowWndProc, NetworkStartServerWindowWndProc,
}; };
static void ShowNetworkStartServerWindow(void) static void ShowNetworkStartServerWindow()
{ {
Window *w; Window *w;
DeleteWindowById(WC_NETWORK_WINDOW, 0); DeleteWindowById(WC_NETWORK_WINDOW, 0);
@ -1151,7 +1151,7 @@ static bool CheckClientListHeight(Window *w)
} }
// Finds the amount of actions in the popup and set the height correct // Finds the amount of actions in the popup and set the height correct
static uint ClientListPopupHeigth(void) { static uint ClientListPopupHeigth() {
int i, num = 0; int i, num = 0;
// Find the amount of actions // Find the amount of actions
@ -1368,7 +1368,7 @@ static void ClientListWndProc(Window *w, WindowEvent *e)
} }
} }
void ShowClientList(void) void ShowClientList()
{ {
AllocateWindowDescFront(&_client_list_desc, 0); AllocateWindowDescFront(&_client_list_desc, 0);
} }
@ -1460,7 +1460,7 @@ static const WindowDesc _network_join_status_window_desc = {
NetworkJoinStatusWindowWndProc, NetworkJoinStatusWindowWndProc,
}; };
void ShowJoinStatusWindow(void) void ShowJoinStatusWindow()
{ {
Window *w; Window *w;
DeleteWindowById(WC_NETWORK_STATUS_WINDOW, 0); DeleteWindowById(WC_NETWORK_STATUS_WINDOW, 0);

View File

@ -10,16 +10,16 @@
void ShowNetworkNeedPassword(NetworkPasswordType npt); void ShowNetworkNeedPassword(NetworkPasswordType npt);
void ShowNetworkGiveMoneyWindow(PlayerID player); // PlayerID void ShowNetworkGiveMoneyWindow(PlayerID player); // PlayerID
void ShowNetworkChatQueryWindow(DestType type, byte dest); void ShowNetworkChatQueryWindow(DestType type, byte dest);
void ShowJoinStatusWindow(void); void ShowJoinStatusWindow();
void ShowNetworkGameWindow(void); void ShowNetworkGameWindow();
void ShowClientList(void); void ShowClientList();
#else /* ENABLE_NETWORK */ #else /* ENABLE_NETWORK */
/* Network function stubs when networking is disabled */ /* Network function stubs when networking is disabled */
static inline void ShowNetworkChatQueryWindow(byte desttype, byte dest) {} static inline void ShowNetworkChatQueryWindow(byte desttype, byte dest) {}
static inline void ShowClientList(void) {} static inline void ShowClientList() {}
static inline void ShowNetworkGameWindow(void) {} static inline void ShowNetworkGameWindow() {}
#endif /* ENABLE_NETWORK */ #endif /* ENABLE_NETWORK */

View File

@ -1228,7 +1228,7 @@ static NetworkServerPacket* const _network_server_packet[] = {
assert_compile(lengthof(_network_server_packet) == PACKET_END); assert_compile(lengthof(_network_server_packet) == PACKET_END);
// This update the company_info-stuff // This update the company_info-stuff
void NetworkPopulateCompanyInfo(void) void NetworkPopulateCompanyInfo()
{ {
char password[NETWORK_PASSWORD_LENGTH]; char password[NETWORK_PASSWORD_LENGTH];
const Player *p; const Player *p;
@ -1355,7 +1355,7 @@ void NetworkUpdateClientInfo(uint16 client_index)
} }
/* Check if we want to restart the map */ /* 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) { if (_network_restart_game_year != 0 && _cur_year >= _network_restart_game_year) {
DEBUG(net, 0, "Auto-restarting map. Year %d reached", _cur_year); DEBUG(net, 0, "Auto-restarting map. Year %d reached", _cur_year);
@ -1369,7 +1369,7 @@ static void NetworkCheckRestartMap(void)
1) If a company is not protected, it is closed after 1 year (for example) 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) 2) If a company is protected, protection is disabled after 3 years (for example)
(and item 1. happens a year later) */ (and item 1. happens a year later) */
static void NetworkAutoCleanCompanies(void) static void NetworkAutoCleanCompanies()
{ {
NetworkTCPSocketHandler *cs; NetworkTCPSocketHandler *cs;
const NetworkClientInfo *ci; const NetworkClientInfo *ci;
@ -1564,12 +1564,12 @@ void NetworkServer_Tick(bool send_frame)
NetworkUDPAdvertise(); NetworkUDPAdvertise();
} }
void NetworkServerYearlyLoop(void) void NetworkServerYearlyLoop()
{ {
NetworkCheckRestartMap(); NetworkCheckRestartMap();
} }
void NetworkServerMonthlyLoop(void) void NetworkServerMonthlyLoop()
{ {
NetworkAutoCleanCompanies(); NetworkAutoCleanCompanies();
} }

View File

@ -17,8 +17,8 @@ void NetworkServer_HandleChat(NetworkAction action, DestType type, int dest, con
bool NetworkServer_ReadPackets(NetworkTCPSocketHandler *cs); bool NetworkServer_ReadPackets(NetworkTCPSocketHandler *cs);
void NetworkServer_Tick(bool send_frame); void NetworkServer_Tick(bool send_frame);
void NetworkServerMonthlyLoop(void); void NetworkServerMonthlyLoop();
void NetworkServerYearlyLoop(void); void NetworkServerYearlyLoop();
static inline const char* GetPlayerIP(const NetworkClientInfo* ci) static inline const char* GetPlayerIP(const NetworkClientInfo* ci)
{ {
@ -31,8 +31,8 @@ static inline const char* GetPlayerIP(const NetworkClientInfo* ci)
#else /* ENABLE_NETWORK */ #else /* ENABLE_NETWORK */
/* Network function stubs when networking is disabled */ /* Network function stubs when networking is disabled */
static inline void NetworkServerMonthlyLoop(void) {} static inline void NetworkServerMonthlyLoop() {}
static inline void NetworkServerYearlyLoop(void) {} static inline void NetworkServerYearlyLoop() {}
#endif /* ENABLE_NETWORK */ #endif /* ENABLE_NETWORK */

View File

@ -402,7 +402,7 @@ void ClientNetworkUDPSocketHandler::HandleIncomingNetworkGameInfoGRFConfig(GRFCo
} }
// Close UDP connection // Close UDP connection
void NetworkUDPCloseAll(void) void NetworkUDPCloseAll()
{ {
DEBUG(net, 1, "[udp] closed listeners"); DEBUG(net, 1, "[udp] closed listeners");
@ -435,7 +435,7 @@ static void NetworkUDPBroadCast(NetworkUDPSocketHandler *socket)
// Request the the server-list from the master server // Request the the server-list from the master server
void NetworkUDPQueryMasterServer(void) void NetworkUDPQueryMasterServer()
{ {
struct sockaddr_in out_addr; struct sockaddr_in out_addr;
@ -458,7 +458,7 @@ void NetworkUDPQueryMasterServer(void)
} }
// Find all servers // Find all servers
void NetworkUDPSearchGame(void) void NetworkUDPSearchGame()
{ {
// We are still searching.. // We are still searching..
if (_network_udp_broadcast > 0) return; if (_network_udp_broadcast > 0) return;
@ -504,7 +504,7 @@ void NetworkUDPQueryServer(const char* host, unsigned short port, bool manually)
} }
/* Remove our advertise from the master-server */ /* Remove our advertise from the master-server */
void NetworkUDPRemoveAdvertise(void) void NetworkUDPRemoveAdvertise()
{ {
struct sockaddr_in out_addr; struct sockaddr_in out_addr;
@ -533,7 +533,7 @@ void NetworkUDPRemoveAdvertise(void)
/* Register us to the master server /* Register us to the master server
This function checks if it needs to send an advertise */ This function checks if it needs to send an advertise */
void NetworkUDPAdvertise(void) void NetworkUDPAdvertise()
{ {
struct sockaddr_in out_addr; struct sockaddr_in out_addr;
@ -580,7 +580,7 @@ void NetworkUDPAdvertise(void)
_udp_master_socket->SendPacket(&p, &out_addr); _udp_master_socket->SendPacket(&p, &out_addr);
} }
void NetworkUDPInitialize(void) void NetworkUDPInitialize()
{ {
_udp_client_socket = new ClientNetworkUDPSocketHandler(); _udp_client_socket = new ClientNetworkUDPSocketHandler();
_udp_server_socket = new ServerNetworkUDPSocketHandler(); _udp_server_socket = new ServerNetworkUDPSocketHandler();
@ -590,7 +590,7 @@ void NetworkUDPInitialize(void)
_network_udp_broadcast = 0; _network_udp_broadcast = 0;
} }
void NetworkUDPShutdown(void) void NetworkUDPShutdown()
{ {
NetworkUDPCloseAll(); NetworkUDPCloseAll();

View File

@ -5,13 +5,13 @@
#ifdef ENABLE_NETWORK #ifdef ENABLE_NETWORK
void NetworkUDPInitialize(void); void NetworkUDPInitialize();
void NetworkUDPSearchGame(void); void NetworkUDPSearchGame();
void NetworkUDPQueryMasterServer(void); void NetworkUDPQueryMasterServer();
void NetworkUDPQueryServer(const char* host, unsigned short port, bool manually = false); void NetworkUDPQueryServer(const char* host, unsigned short port, bool manually = false);
void NetworkUDPAdvertise(void); void NetworkUDPAdvertise();
void NetworkUDPRemoveAdvertise(void); void NetworkUDPRemoveAdvertise();
void NetworkUDPShutdown(void); void NetworkUDPShutdown();
#endif /* ENABLE_NETWORK */ #endif /* ENABLE_NETWORK */

View File

@ -3523,7 +3523,7 @@ static void GRFUnsafe(byte *buf, int len)
} }
static void InitializeGRFSpecial(void) static void InitializeGRFSpecial()
{ {
_ttdpatch_flags[0] = ((_patches.always_small_airport ? 1 : 0) << 0x0C) // keepsmallairport _ttdpatch_flags[0] = ((_patches.always_small_airport ? 1 : 0) << 0x0C) // keepsmallairport
| (1 << 0x0D) // newairports | (1 << 0x0D) // newairports
@ -3602,7 +3602,7 @@ static void InitializeGRFSpecial(void)
| (0 << 0x17); // articulatedrvs | (0 << 0x17); // articulatedrvs
} }
static void ResetCustomStations(void) static void ResetCustomStations()
{ {
StationSpec *statspec; StationSpec *statspec;
GRFFile *file; GRFFile *file;
@ -3646,7 +3646,7 @@ static void ResetCustomStations(void)
} }
} }
static void ResetNewGRF(void) static void ResetNewGRF()
{ {
GRFFile *f, *next; GRFFile *f, *next;
@ -3665,7 +3665,7 @@ static void ResetNewGRF(void)
* Reset all NewGRF loaded data * Reset all NewGRF loaded data
* TODO * TODO
*/ */
static void ResetNewGRFData(void) static void ResetNewGRFData()
{ {
uint i; uint i;
@ -3743,7 +3743,7 @@ static void ResetNewGRFData(void)
} }
/** Reset all NewGRFData that was used only while processing data */ /** 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 */ /* Clear the GOTO labels used for GRF processing */
GRFLabel *l; GRFLabel *l;
@ -3852,7 +3852,7 @@ static const CargoLabel *_default_refitmasks[] = {
/** /**
* Precalculate refit masks from cargo classes for all vehicles. * Precalculate refit masks from cargo classes for all vehicles.
*/ */
static void CalculateRefitMasks(void) static void CalculateRefitMasks()
{ {
EngineID engine; EngineID engine;
@ -4078,7 +4078,7 @@ void LoadNewGRFFile(GRFConfig *config, uint file_index, GrfLoadingStage stage)
} }
} }
void InitDepotWindowBlockSizes(void); void InitDepotWindowBlockSizes();
void LoadNewGRF(uint load_index, uint file_index) void LoadNewGRF(uint load_index, uint file_index)
{ {

View File

@ -75,7 +75,7 @@ extern bool _have_2cc;
void LoadNewGRFFile(GRFConfig *config, uint file_index, GrfLoadingStage stage); void LoadNewGRFFile(GRFConfig *config, uint file_index, GrfLoadingStage stage);
void LoadNewGRF(uint load_index, uint file_index); 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, ...); void CDECL grfmsg(int severity, const char *str, ...);

View File

@ -215,7 +215,7 @@ void ResetGRFConfig(bool defaults)
* compatible GRF with the same grfid was found and used instead * 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 * <li> GLC_NOT_FOUND: For one or more GRF's no match was found at all
* </ul> */ * </ul> */
GRFListCompatibility IsGoodGRFConfigList(void) GRFListCompatibility IsGoodGRFConfigList()
{ {
GRFListCompatibility res = GLC_ALL_GOOD; GRFListCompatibility res = GLC_ALL_GOOD;
@ -335,7 +335,7 @@ static uint ScanPath(const char *path)
/* Scan for all NewGRFs */ /* Scan for all NewGRFs */
void ScanNewGRFFiles(void) void ScanNewGRFFiles()
{ {
uint num; uint num;
@ -452,7 +452,7 @@ static const SaveLoad _grfconfig_desc[] = {
}; };
static void Save_NGRF(void) static void Save_NGRF()
{ {
int index = 0; int index = 0;
@ -464,7 +464,7 @@ static void Save_NGRF(void)
} }
static void Load_NGRF(void) static void Load_NGRF()
{ {
ClearGRFConfigList(&_grfconfig); ClearGRFConfigList(&_grfconfig);
while (SlIterateArray() != -1) { while (SlIterateArray() != -1) {

View File

@ -67,7 +67,7 @@ extern GRFConfig *_grfconfig_newgame;
/* First item in list of static GRF set up */ /* First item in list of static GRF set up */
extern GRFConfig *_grfconfig_static; extern GRFConfig *_grfconfig_static;
void ScanNewGRFFiles(void); void ScanNewGRFFiles();
const GRFConfig *FindGRFConfig(uint32 grfid, const uint8 *md5sum = NULL); const GRFConfig *FindGRFConfig(uint32 grfid, const uint8 *md5sum = NULL);
GRFConfig *GetGRFConfig(uint32 grfid); GRFConfig *GetGRFConfig(uint32 grfid);
GRFConfig **CopyGRFConfigList(GRFConfig **dst, const GRFConfig *src); GRFConfig **CopyGRFConfigList(GRFConfig **dst, const GRFConfig *src);
@ -76,7 +76,7 @@ void AppendToGRFConfigList(GRFConfig **dst, GRFConfig *el);
void ClearGRFConfig(GRFConfig **config); void ClearGRFConfig(GRFConfig **config);
void ClearGRFConfigList(GRFConfig **config); void ClearGRFConfigList(GRFConfig **config);
void ResetGRFConfig(bool defaults); void ResetGRFConfig(bool defaults);
GRFListCompatibility IsGoodGRFConfigList(void); GRFListCompatibility IsGoodGRFConfigList();
bool FillGRFDetails(GRFConfig *config, bool is_static); bool FillGRFDetails(GRFConfig *config, bool is_static);
char *GRFBuildParamList(char *dst, const GRFConfig *c, const char *last); char *GRFBuildParamList(char *dst, const GRFConfig *c, const char *last);

View File

@ -85,7 +85,7 @@ static const SpriteGroup *GetWagonOverrideSpriteSet(EngineID engine, CargoID car
/** /**
* Unload all wagon override sprite groups. * Unload all wagon override sprite groups.
*/ */
void UnloadWagonOverrides(void) void UnloadWagonOverrides()
{ {
WagonOverrides *wos; WagonOverrides *wos;
WagonOverride *wo; WagonOverride *wo;
@ -123,7 +123,7 @@ void SetCustomEngineSprites(EngineID engine, byte cargo, const SpriteGroup *grou
/** /**
* Unload all engine sprite groups. * Unload all engine sprite groups.
*/ */
void UnloadCustomEngineSprites(void) void UnloadCustomEngineSprites()
{ {
memset(_engine_custom_sprites, 0, sizeof(_engine_custom_sprites)); memset(_engine_custom_sprites, 0, sizeof(_engine_custom_sprites));
memset(_engine_grf, 0, sizeof(_engine_grf)); memset(_engine_grf, 0, sizeof(_engine_grf));
@ -144,7 +144,7 @@ void SetRotorOverrideSprites(EngineID engine, const SpriteGroup *group)
} }
/** Unload all rotor override sprite groups */ /** Unload all rotor override sprite groups */
void UnloadRotorOverrideSprites(void) void UnloadRotorOverrideSprites()
{ {
EngineID engine; EngineID engine;
@ -1007,7 +1007,7 @@ void SetCustomEngineName(EngineID engine, StringID name)
_engine_custom_names[engine] = name; _engine_custom_names[engine] = name;
} }
void UnloadCustomEngineNames(void) void UnloadCustomEngineNames()
{ {
EngineID i; EngineID i;
for (i = 0; i < TOTAL_NUM_ENGINES; i++) { for (i = 0; i < TOTAL_NUM_ENGINES; i++) {
@ -1025,7 +1025,7 @@ StringID GetCustomEngineName(EngineID engine)
static EngineID _engine_list_order[NUM_TRAIN_ENGINES]; static EngineID _engine_list_order[NUM_TRAIN_ENGINES];
static byte _engine_list_position[NUM_TRAIN_ENGINES]; static byte _engine_list_position[NUM_TRAIN_ENGINES];
void ResetEngineListOrder(void) void ResetEngineListOrder()
{ {
EngineID i; EngineID i;

View File

@ -50,12 +50,12 @@ void TriggerVehicle(Vehicle *veh, VehicleTrigger trigger);
void SetCustomEngineName(EngineID engine, StringID name); void SetCustomEngineName(EngineID engine, StringID name);
StringID GetCustomEngineName(EngineID engine); StringID GetCustomEngineName(EngineID engine);
void UnloadWagonOverrides(void); void UnloadWagonOverrides();
void UnloadRotorOverrideSprites(void); void UnloadRotorOverrideSprites();
void UnloadCustomEngineSprites(void); void UnloadCustomEngineSprites();
void UnloadCustomEngineNames(void); void UnloadCustomEngineNames();
void ResetEngineListOrder(void); void ResetEngineListOrder();
EngineID GetRailVehAtPosition(EngineID pos); EngineID GetRailVehAtPosition(EngineID pos);
uint16 ListPositionOfEngine(EngineID engine); uint16 ListPositionOfEngine(EngineID engine);
void AlterRailVehListOrder(EngineID engine, EngineID target); void AlterRailVehListOrder(EngineID engine, EngineID target);

View File

@ -15,7 +15,7 @@ STATIC_OLD_POOL(SoundInternal, FileEntry, 3, 1000, NULL, NULL)
/* Allocate a new FileEntry */ /* Allocate a new FileEntry */
FileEntry *AllocateFileEntry(void) FileEntry *AllocateFileEntry()
{ {
if (_sound_count == GetSoundInternalPoolSize()) { if (_sound_count == GetSoundInternalPoolSize()) {
if (!AddBlockToPool(&_SoundInternal_pool)) return NULL; if (!AddBlockToPool(&_SoundInternal_pool)) return NULL;
@ -25,7 +25,7 @@ FileEntry *AllocateFileEntry(void)
} }
void InitializeSoundPool(void) void InitializeSoundPool()
{ {
CleanPool(&_SoundInternal_pool); CleanPool(&_SoundInternal_pool);
_sound_count = 0; _sound_count = 0;
@ -42,7 +42,7 @@ FileEntry *GetSound(uint index)
} }
uint GetNumSounds(void) uint GetNumSounds()
{ {
return _sound_count; return _sound_count;
} }

View File

@ -16,10 +16,10 @@ typedef enum VehicleSoundEvents {
} VehicleSoundEvent; } VehicleSoundEvent;
FileEntry *AllocateFileEntry(void); FileEntry *AllocateFileEntry();
void InitializeSoundPool(void); void InitializeSoundPool();
FileEntry *GetSound(uint index); FileEntry *GetSound(uint index);
uint GetNumSounds(void); uint GetNumSounds();
bool PlayVehicleSound(const Vehicle *v, VehicleSoundEvent event); bool PlayVehicleSound(const Vehicle *v, VehicleSoundEvent event);
#endif /* NEWGRF_SOUND_H */ #endif /* NEWGRF_SOUND_H */

View File

@ -49,7 +49,7 @@ static void SpriteGroupPoolCleanBlock(uint start_item, uint end_item)
/* Allocate a new SpriteGroup */ /* 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. */ /* This is totally different to the other pool allocators, as we never remove an item from the pool. */
if (_spritegroup_count == GetSpriteGroupPoolSize()) { if (_spritegroup_count == GetSpriteGroupPoolSize()) {
@ -60,7 +60,7 @@ SpriteGroup *AllocateSpriteGroup(void)
} }
void InitializeSpriteGroupPool(void) void InitializeSpriteGroupPool()
{ {
CleanPool(&_SpriteGroup_pool); CleanPool(&_SpriteGroup_pool);

View File

@ -152,8 +152,8 @@ struct SpriteGroup {
}; };
SpriteGroup *AllocateSpriteGroup(void); SpriteGroup *AllocateSpriteGroup();
void InitializeSpriteGroupPool(void); void InitializeSpriteGroupPool();
typedef struct ResolverObject { typedef struct ResolverObject {

View File

@ -31,7 +31,7 @@ enum {
* This includes initialising the Default and Waypoint classes with an empty * This includes initialising the Default and Waypoint classes with an empty
* entry, for standard stations and waypoints. * entry, for standard stations and waypoints.
*/ */
void ResetStationClasses(void) void ResetStationClasses()
{ {
for (StationClassID i = STAT_CLASS_BEGIN; i < STAT_CLASS_MAX; i++) { for (StationClassID i = STAT_CLASS_BEGIN; i < STAT_CLASS_MAX; i++) {
station_classes[i].id = 0; station_classes[i].id = 0;
@ -95,7 +95,7 @@ StringID GetStationClassName(StationClassID sclass)
/** Build a list of station class name StringIDs to use in a dropdown list /** Build a list of station class name StringIDs to use in a dropdown list
* @return Pointer to a (static) array of StringIDs * @return Pointer to a (static) array of StringIDs
*/ */
StringID *BuildStationClassDropdown(void) StringID *BuildStationClassDropdown()
{ {
/* Allow room for all station classes, plus a terminator entry */ /* Allow room for all station classes, plus a terminator entry */
static StringID names[STAT_CLASS_MAX + 1]; static StringID names[STAT_CLASS_MAX + 1];
@ -115,7 +115,7 @@ StringID *BuildStationClassDropdown(void)
* Get the number of station classes in use. * Get the number of station classes in use.
* @return Number of station classes. * @return Number of station classes.
*/ */
uint GetNumStationClasses(void) uint GetNumStationClasses()
{ {
uint i; uint i;
for (i = 0; i < STAT_CLASS_MAX && station_classes[i].id != 0; i++); for (i = 0; i < STAT_CLASS_MAX && station_classes[i].id != 0; i++);

View File

@ -96,13 +96,13 @@ typedef struct StationClass {
StationSpec **spec; ///< Array of station specifications. StationSpec **spec; ///< Array of station specifications.
} StationClass; } StationClass;
void ResetStationClasses(void); void ResetStationClasses();
StationClassID AllocateStationClass(uint32 cls); StationClassID AllocateStationClass(uint32 cls);
void SetStationClassName(StationClassID sclass, StringID name); void SetStationClassName(StationClassID sclass, StringID name);
StringID GetStationClassName(StationClassID sclass); StringID GetStationClassName(StationClassID sclass);
StringID *BuildStationClassDropdown(void); StringID *BuildStationClassDropdown();
uint GetNumStationClasses(void); uint GetNumStationClasses();
uint GetNumCustomStations(StationClassID sclass); uint GetNumCustomStations(StationClassID sclass);
void SetCustomStationSpec(StationSpec *statspec); void SetCustomStationSpec(StationSpec *statspec);

View File

@ -441,7 +441,7 @@ void SetCurrentGrfLangID(const char *iso_name)
* House cleaning. * House cleaning.
* Remove all strings and reset the text counter. * Remove all strings and reset the text counter.
*/ */
void CleanUpStrings(void) void CleanUpStrings()
{ {
uint id; uint id;

Some files were not shown because too many files have changed in this diff Show More