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