forked from RSDKModding/RSDKv2-Decompilation
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix two visual errors and add things
- Loading branch information
1 parent
0b1a2a7
commit 75d80a0
Showing
5 changed files
with
76 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,68 @@ | ||
#include "RetroEngine.hpp" | ||
|
||
int main(int argc, char *argv[]) | ||
{ | ||
for (int i = 0; i < argc; ++i) { | ||
if (StrComp(argv[i], "UsingCWD")) | ||
#if !RETRO_USE_ORIGINAL_CODE | ||
|
||
#if RETRO_PLATFORM == RETRO_WIN && _MSC_VER | ||
#include "Windows.h" | ||
#endif | ||
|
||
void parseArguments(int argc, char *argv[]) { | ||
for (int a = 0; a < argc; ++a) { | ||
const char *find = ""; | ||
|
||
find = strstr(argv[a], "stage="); | ||
if (find) { | ||
int b = 0; | ||
int c = 6; | ||
while (find[c] && find[c] != ';') Engine.startSceneFolder[b++] = find[c++]; | ||
Engine.startSceneFolder[b] = 0; | ||
} | ||
|
||
find = strstr(argv[a], "scene="); | ||
if (find) { | ||
int b = 0; | ||
int c = 6; | ||
while (find[c] && find[c] != ';') Engine.startSceneID[b++] = find[c++]; | ||
Engine.startSceneID[b] = 0; | ||
} | ||
|
||
find = strstr(argv[a], "console=true"); | ||
if (find) { | ||
engineDebugMode = true; | ||
Engine.devMenu = true; | ||
Engine.consoleEnabled = true; | ||
#if RETRO_PLATFORM == RETRO_WIN && _MSC_VER | ||
AllocConsole(); | ||
freopen_s((FILE **)stdin, "CONIN$", "w", stdin); | ||
freopen_s((FILE **)stdout, "CONOUT$", "w", stdout); | ||
freopen_s((FILE **)stderr, "CONOUT$", "w", stderr); | ||
#endif | ||
} | ||
|
||
find = strstr(argv[a], "usingCWD=true"); | ||
if (find) { | ||
usingCWD = true; | ||
} | ||
} | ||
} | ||
#endif | ||
|
||
int main(int argc, char *argv[]) | ||
{ | ||
#if !RETRO_USE_ORIGINAL_CODE | ||
parseArguments(argc, argv); | ||
#endif | ||
|
||
Engine.Init(); | ||
Engine.Run(); | ||
|
||
#if !RETRO_USE_ORIGINAL_CODE | ||
if (Engine.consoleEnabled) { | ||
#if RETRO_PLATFORM == RETRO_WIN && _MSC_VER | ||
FreeConsole(); | ||
#endif | ||
} | ||
#endif | ||
|
||
return 0; | ||
} |