| 37 | |
| 38 | |
| 39 | void Phobos::CmdLineParse(char** ppArgs, int nNumArgs) |
| 40 | { |
| 41 | bool foundInheritance = false; |
| 42 | bool foundInclude = false; |
| 43 | |
| 44 | // > 1 because the exe path itself counts as an argument, too! |
| 45 | for (int i = 1; i < nNumArgs; i++) |
| 46 | { |
| 47 | const char* pArg = ppArgs[i]; |
| 48 | |
| 49 | if (_stricmp(pArg, "-Icon") == 0) |
| 50 | { |
| 51 | Phobos::AppIconPath = ppArgs[++i]; |
| 52 | } |
| 53 | #ifndef IS_RELEASE_VER |
| 54 | if (_stricmp(pArg, "-b=" _STR(BUILD_NUMBER)) == 0) |
| 55 | { |
| 56 | HideWarning = true; |
| 57 | } |
| 58 | #endif |
| 59 | if (_stricmp(pArg, "-Inheritance") == 0) |
| 60 | { |
| 61 | foundInheritance = true; |
| 62 | } |
| 63 | if (_stricmp(pArg, "-Include") == 0) |
| 64 | { |
| 65 | foundInclude = true; |
| 66 | } |
| 67 | } |
| 68 | |
| 69 | if (foundInclude) |
| 70 | { |
| 71 | Patch::Apply_RAW(0x474200, // Apply CCINIClass_ReadCCFile1_DisableAres |
| 72 | { 0x8B, 0xF1, 0x8D, 0x54, 0x24, 0x0C } |
| 73 | ); |
| 74 | |
| 75 | Patch::Apply_RAW(0x474314, // Apply CCINIClass_ReadCCFile2_DisableAres |
| 76 | { 0x81, 0xC4, 0xA8, 0x00, 0x00, 0x00 } |
| 77 | ); |
| 78 | } |
| 79 | else |
| 80 | { |
| 81 | Patch::Apply_RAW(0x474230, // Revert CCINIClass_Load_Inheritance |
| 82 | { 0x8B, 0xE8, 0x88, 0x5E, 0x40 } |
| 83 | ); |
| 84 | } |
| 85 | |
| 86 | if (foundInheritance) |
| 87 | { |
| 88 | Patch::Apply_RAW(0x528A10, // Apply INIClass_GetString_DisableAres |
| 89 | { 0x83, 0xEC, 0x0C, 0x33, 0xC0 } |
| 90 | ); |
| 91 | |
| 92 | Patch::Apply_RAW(0x526CC0, // Apply INIClass_GetKeyName_DisableAres |
| 93 | { 0x8B, 0x54, 0x24, 0x04, 0x83, 0xEC, 0x0C } |
| 94 | ); |
| 95 | } |
| 96 | else |
nothing calls this directly
no outgoing calls
no test coverage detected