MCPcopy Create free account
hub / github.com/OpenMC2/OpenMC2 / StartOpenMC2

Function StartOpenMC2

src/OpenMC2.cpp:68–92  ·  view source on GitHub ↗

mc2: 0x00401010

Source from the content-addressed store, hash-verified

66
67// mc2: 0x00401010
68int StartOpenMC2() {
69 // Init MC2_MALLOC
70 if ((glo_682E18 & 1) == 0) {
71 glo_682E18 |= 1;
72 glo_67A760 = loc_67A770;
73 }
74
75 load_config();
76
77 unk_5769E0 a;
78 a.sub_575BA0(glo_67A760, 0x18680, 1, 0);
79 global_primary_unk5769E0 = &a;
80 parse_commandline(__argc, __argv);
81 sub_612910(__argc, __argv);
82
83 // Workaround for scrolling bug
84 constexpr std::uint8_t axis_fix[] = { 0x90, 0xE9 };
85 detail::Hook_Raw(0x00603EBA, axis_fix);
86
87 int b = sub_6181F0();
88
89 sub_612F00();
90
91 return b;
92}
93
94int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow) {
95 load_mc2_dll();

Callers 1

WinMainFunction · 0.85

Calls 7

load_configFunction · 0.85
parse_commandlineFunction · 0.85
sub_612910Function · 0.85
Hook_RawFunction · 0.85
sub_6181F0Function · 0.85
sub_612F00Function · 0.85
sub_575BA0Method · 0.80

Tested by

no test coverage detected