MCPcopy Create free account
hub / github.com/ClassiCube/ClassiCube / SetupProgram

Function SetupProgram

src/main_impl.h:123–140  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

121}
122
123static void SetupProgram(int argc, char** argv) {
124 static char ipBuffer[STRING_SIZE];
125 cc_result res;
126 CrashHandler_Install();
127 Logger_Hook();
128 Window_PreInit();
129 Gamepads_PreInit();
130 Platform_Init();
131
132 res = Platform_SetDefaultCurrentDirectory(argc, argv);
133 Options_Load();
134 Window_Init();
135 Gamepads_Init();
136
137 if (res) Logger_SysWarn(res, "setting current directory");
138 Platform_LogConst("Starting " GAME_APP_NAME " ..");
139 String_InitArray(Server.Address, ipBuffer);
140}
141
142#define SP_HasDir(path) (String_IndexOf(path, '/') >= 0 || String_IndexOf(path, '\\') >= 0)
143static cc_bool IsOpenableFile(const cc_string* path) {

Callers 15

mainFunction · 0.85
WinMainFunction · 0.85
mainFunction · 0.85
mainFunction · 0.85
mainFunction · 0.85
mainFunction · 0.85
mainFunction · 0.85
mainFunction · 0.85
web_mainFunction · 0.85
mainFunction · 0.85
mainFunction · 0.85
android_mainFunction · 0.85

Calls 11

Logger_HookFunction · 0.85
Options_LoadFunction · 0.85
Logger_SysWarnFunction · 0.85
Platform_LogConstFunction · 0.85
CrashHandler_InstallFunction · 0.70
Window_PreInitFunction · 0.70
Gamepads_PreInitFunction · 0.70
Platform_InitFunction · 0.70
Window_InitFunction · 0.70
Gamepads_InitFunction · 0.70

Tested by

no test coverage detected