mirror of https://github.com/OpenTTD/OpenTTD.git
(svn r9050) -Codechange: Foo(void) -> Foo()
This commit is contained in:
parent
a69e3b1c45
commit
36bb92ae24
|
@ -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;
|
||||
|
||||
|
|
10
src/ai/ai.h
10
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.
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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 */
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -395,7 +395,7 @@ error:
|
|||
return res;
|
||||
}
|
||||
|
||||
int32 GetAvailableMoneyForCommand(void)
|
||||
int32 GetAvailableMoneyForCommand()
|
||||
{
|
||||
PlayerID pid = _current_player;
|
||||
if (!IsValidPlayer(pid)) return 0x7FFFFFFF; // max int
|
||||
|
|
|
@ -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 */
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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];
|
||||
|
|
|
@ -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 */
|
||||
|
|
32
src/date.cpp
32
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;
|
||||
|
||||
|
|
|
@ -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];
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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 */
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
#ifndef ECONOMY_H
|
||||
#define ECONOMY_H
|
||||
|
||||
void ResetPriceBaseMultipliers(void);
|
||||
void ResetPriceBaseMultipliers();
|
||||
void SetPriceBaseMultiplier(uint price, byte factor);
|
||||
|
||||
typedef struct {
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
10
src/fileio.h
10
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);
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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 */
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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 */
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
22
src/gfx.cpp
22
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();
|
||||
|
|
38
src/gfx.h
38
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);
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
#ifndef GFXINIT_H
|
||||
#define GFXINIT_H
|
||||
|
||||
void CheckExternalFiles(void);
|
||||
void GfxLoadSprites(void);
|
||||
void CheckExternalFiles();
|
||||
void GfxLoadSprites();
|
||||
|
||||
#endif /* GFXINIT_H */
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
70
src/gui.h
70
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 */
|
||||
|
|
14
src/hal.h
14
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;
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
12
src/map.h
12
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
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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)
|
||||
|
|
96
src/misc.cpp
96
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;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $Id:$ */
|
||||
/* $Id$ */
|
||||
|
||||
#ifndef AUTOPTR_HPP
|
||||
#define AUTOPTR_HPP
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -93,7 +93,7 @@ void MxMixSamples(void *buffer, uint samples)
|
|||
}
|
||||
}
|
||||
|
||||
MixerChannel *MxAllocateChannel(void)
|
||||
MixerChannel *MxAllocateChannel()
|
||||
{
|
||||
MixerChannel *mc;
|
||||
for (mc = _channels; mc != endof(_channels); mc++)
|
||||
|
|
|
@ -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*);
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
|
|
|
@ -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. */
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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 = {
|
||||
|
|
|
@ -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");
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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 */
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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);
|
||||
};
|
||||
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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 */
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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 */
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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 */
|
||||
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
|
|
|
@ -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 */
|
||||
|
||||
|
|
|
@ -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();
|
||||
|
||||
|
|
|
@ -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 */
|
||||
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -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, ...);
|
||||
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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 */
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -152,8 +152,8 @@ struct SpriteGroup {
|
|||
};
|
||||
|
||||
|
||||
SpriteGroup *AllocateSpriteGroup(void);
|
||||
void InitializeSpriteGroupPool(void);
|
||||
SpriteGroup *AllocateSpriteGroup();
|
||||
void InitializeSpriteGroupPool();
|
||||
|
||||
|
||||
typedef struct ResolverObject {
|
||||
|
|
|
@ -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++);
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue