Changeset View
Changeset View
Standalone View
Standalone View
source/ps/GameSetup/GameSetup.h
Show First 20 Lines • Show All 51 Lines • ▼ Show 20 Lines | enum InitFlags | ||||
// needed by map editor because it has its own wx error display | // needed by map editor because it has its own wx error display | ||||
INIT_HAVE_DISPLAY_ERROR = 4, | INIT_HAVE_DISPLAY_ERROR = 4, | ||||
// initialize the mod folders from command line parameters | // initialize the mod folders from command line parameters | ||||
INIT_MODS = 8, | INIT_MODS = 8, | ||||
// mount the public mod | // mount the public mod | ||||
// needed by the map editor as "mod" does not provide everything it needs | // needed by the map editor as "mod" does not provide everything it needs | ||||
INIT_MODS_PUBLIC = 16 | INIT_MODS_PUBLIC = 16, | ||||
// inform user about incompatible mods | |||||
Imarok: Maybe not in this diff, but it seems like this flags should use binary (e.g. 0b00100000 instead… | |||||
INIT_MODS_INFORM_INCOMPATIBLE = 32 | |||||
Not Done Inline ActionsLooks like a workaround. I think it's better to store requested but incompatible and disabled mods and report them properly with a list of their names. vladislavbelov: Looks like a workaround. I think it's better to store requested but incompatible and disabled… | |||||
}; | }; | ||||
enum ShutdownFlags | enum ShutdownFlags | ||||
{ | { | ||||
// start shutdown from config down | // start shutdown from config down | ||||
// needed for loading mods as specified in the config | // needed for loading mods as specified in the config | ||||
// without having to go through a full init-shutdown cycle | // without having to go through a full init-shutdown cycle | ||||
SHUTDOWN_FROM_CONFIG = 1 | SHUTDOWN_FROM_CONFIG = 1 | ||||
}; | }; | ||||
/** | /** | ||||
* enable/disable rendering of the GUI (intended mainly for screenshots) | * enable/disable rendering of the GUI (intended mainly for screenshots) | ||||
*/ | */ | ||||
extern void RenderGui(bool RenderingState); | extern void RenderGui(bool RenderingState); | ||||
extern void RenderLogger(bool RenderingState); | extern void RenderLogger(bool RenderingState); | ||||
/** | /** | ||||
* enable/disable rendering of the cursor - this does not hide cursor, but reverts to OS style | * enable/disable rendering of the cursor - this does not hide cursor, but reverts to OS style | ||||
*/ | */ | ||||
extern void RenderCursor(bool RenderingState); | extern void RenderCursor(bool RenderingState); | ||||
class CmdLineArgs; | class CmdLineArgs; | ||||
class Paths; | class Paths; | ||||
extern const std::vector<CStr>& GetMods(const CmdLineArgs& args, int flags); | |||||
/** | /** | ||||
* Mounts all files of the given mods in the global VFS. | * Mounts all files of the given mods in the global VFS. | ||||
* Make sure to call CacheEnabledModVersions after every call to this. | * Make sure to call CacheEnabledModVersions after every call to this. | ||||
*/ | */ | ||||
extern void MountMods(const Paths& paths, const std::vector<CStr>& mods); | extern void MountMods(const Paths& paths, const std::vector<CStr>& mods); | ||||
/** | /** | ||||
* Returns true if successful, false if mods changed and restart_engine was called. | * Returns true if successful, false if mods changed and restart_engine was called. | ||||
* In the latter case the caller should call Shutdown() with SHUTDOWN_FROM_CONFIG. | * In the latter case the caller should call Shutdown() with SHUTDOWN_FROM_CONFIG. | ||||
*/ | */ | ||||
extern bool Init(const CmdLineArgs& args, int flags); | extern bool Init(const CmdLineArgs& args, int& flags); | ||||
Not Done Inline ActionsNot a good notation, since by usage you don't know that a variable can be changed. vladislavbelov: Not a good notation, since by usage you don't know that a variable can be changed. | |||||
Done Inline Actionsbut then i need another global variable in Mod namespace or return enum from init Silier: but then i need another global variable in Mod namespace or return enum from init | |||||
Not Done Inline ActionsI've already mentioned how it can be implemented, it doesn't differ from GetEnabledMods. vladislavbelov: I've already mentioned how it can be implemented, it doesn't differ from `GetEnabledMods`. | |||||
extern void InitInput(); | extern void InitInput(); | ||||
extern void InitGraphics(const CmdLineArgs& args, int flags, const std::vector<CStr>& installedMods = std::vector<CStr>()); | extern void InitGraphics(const CmdLineArgs& args, int flags, const std::vector<CStr>& installedMods = std::vector<CStr>()); | ||||
extern void InitNonVisual(const CmdLineArgs& args); | extern void InitNonVisual(const CmdLineArgs& args); | ||||
extern void Shutdown(int flags); | extern void Shutdown(int flags); | ||||
extern void CancelLoad(const CStrW& message); | extern void CancelLoad(const CStrW& message); | ||||
extern bool InDevelopmentCopy(); | extern bool InDevelopmentCopy(); | ||||
#endif // INCLUDED_GAMESETUP | #endif // INCLUDED_GAMESETUP |
Wildfire Games · Phabricator
Maybe not in this diff, but it seems like this flags should use binary (e.g. 0b00100000 instead of 32) to better convey the intention.