mirror of
https://github.com/ClassiCube/ClassiCube.git
synced 2025-09-14 18:15:28 -04:00
Use console-style launching (App just closes, but it's a start.)
This commit is contained in:
parent
51e3580700
commit
27b22e8765
@ -76,8 +76,8 @@ void Mem_Free(void* mem) {
|
||||
*------------------------------------------------------Logging/Time-------------------------------------------------------*
|
||||
*#########################################################################################################################*/
|
||||
void Platform_Log(const char* msg, int len) {
|
||||
write(STDOUT_FILENO, msg, len);
|
||||
write(STDOUT_FILENO, "\n", 1);
|
||||
//write(STDOUT_FILENO, msg, len);
|
||||
//write(STDOUT_FILENO, "\n", 1);
|
||||
}
|
||||
|
||||
TimeMS DateTime_CurrentUTC(void) {
|
||||
@ -313,6 +313,7 @@ static cc_result Process_RawStart(const char* path, char** argv) {
|
||||
|
||||
static cc_result Process_RawGetExePath(char* path, int* len);
|
||||
|
||||
/*
|
||||
cc_result Process_StartGame2(const cc_string* args, int numArgs) {
|
||||
char raw[GAME_MAX_CMDARGS][NATIVE_STR_LEN];
|
||||
char path[NATIVE_STR_LEN];
|
||||
@ -332,6 +333,24 @@ cc_result Process_StartGame2(const cc_string* args, int numArgs) {
|
||||
argv[j] = NULL;
|
||||
return Process_RawStart(path, argv);
|
||||
}
|
||||
*/
|
||||
|
||||
static char gameArgs[GAME_MAX_CMDARGS][STRING_SIZE];
|
||||
static int gameNumArgs;
|
||||
static cc_bool gameHasArgs;
|
||||
|
||||
cc_result Process_StartGame2(const cc_string* args, int numArgs) {
|
||||
for (int i = 0; i < numArgs; i++)
|
||||
{
|
||||
String_CopyToRawArray(gameArgs[i], &args[i]);
|
||||
}
|
||||
|
||||
Platform_LogConst("START CLASSICUBE");
|
||||
gameHasArgs = true;
|
||||
gameNumArgs = numArgs;
|
||||
return 0;
|
||||
}
|
||||
|
||||
void Process_Exit(cc_result code) { exit(code); }
|
||||
|
||||
cc_result Process_StartOpen(const cc_string* args) {
|
||||
@ -418,10 +437,16 @@ cc_bool Platform_DescribeError(cc_result res, cc_string* dst) {
|
||||
}
|
||||
#endif
|
||||
|
||||
static void Platform_InitSpecific(void) {
|
||||
Platform_SingleProcess = true;
|
||||
}
|
||||
|
||||
void Platform_Init(void) {
|
||||
printf("Macintosh ClassiCube has started to init.\n"); // Test, just to see if it's actually *running* at all.
|
||||
Platform_LoadSysFonts();
|
||||
Stopwatch_Init();
|
||||
|
||||
Platform_ReadonlyFilesystem = true;
|
||||
}
|
||||
|
||||
cc_result Platform_Encrypt(const void* data, int len, cc_string* dst) {
|
||||
|
@ -20,7 +20,7 @@ BitMap bitmapScreen;
|
||||
|
||||
#define SCREEN_WIDTH 320
|
||||
#define SCREEN_HEIGHT 224
|
||||
static cc_bool launcherMode;
|
||||
static cc_bool launcherMode = true;
|
||||
|
||||
/*########################################################################################################################*
|
||||
*--------------------------------------------------Public implementation--------------------------------------------------*
|
||||
|
Loading…
x
Reference in New Issue
Block a user