diff --git a/platform_linux/linux_4ed.cpp b/platform_linux/linux_4ed.cpp index db9e1e1d..ed79f380 100644 --- a/platform_linux/linux_4ed.cpp +++ b/platform_linux/linux_4ed.cpp @@ -1583,6 +1583,16 @@ LinuxHandleX11Events(void) int main(int argc, char **argv){ + // + // System Linkage + // + + link_system_code(); + + // + // Memory init + // + memset(&linuxvars, 0, sizeof(linuxvars)); memset(&target, 0, sizeof(target)); memset(&memory_vars, 0, sizeof(memory_vars)); @@ -1592,13 +1602,19 @@ main(int argc, char **argv){ memset(&app, 0, sizeof(app)); memset(&custom_api, 0, sizeof(custom_api)); + memory_init(); + + // + // HACK(allen): + // Previously zipped stuff is here, it should be zipped in the new pattern now. + // + init_shared_vars(); // - // Linkage + // Dynamic Linkage // - link_system_code(); load_app_code(); link_rendering(); #if defined(FRED_SUPER) @@ -1607,12 +1623,6 @@ main(int argc, char **argv){ custom_api.get_bindings = get_bindings; #endif - // - // Memory init - // - - memory_init(); - // // Read command line // diff --git a/platform_win32/win32_4ed.cpp b/platform_win32/win32_4ed.cpp index 728a92e3..f8a94740 100644 --- a/platform_win32/win32_4ed.cpp +++ b/platform_win32/win32_4ed.cpp @@ -1019,6 +1019,16 @@ WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdS i32 argc = __argc; char **argv = __argv; + // + // System Linkage + // + + link_system_code(); + + // + // Memory init + // + memset(&win32vars, 0, sizeof(win32vars)); memset(&target, 0, sizeof(target)); memset(&memory_vars, 0, sizeof(memory_vars)); @@ -1028,13 +1038,19 @@ WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdS memset(&app, 0, sizeof(app)); memset(&custom_api, 0, sizeof(custom_api)); + memory_init(); + + // + // HACK(allen): + // Previously zipped stuff is here, it should be zipped in the new pattern now. + // + init_shared_vars(); // - // Linkage + // Dynamic Linkage // - link_system_code(); load_app_code(); link_rendering(); #if defined(FRED_SUPER) @@ -1043,12 +1059,6 @@ WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdS custom_api.get_bindings = get_bindings; #endif - // - // Memory init - // - - memory_init(); - // // Read Command Line //