mirror of https://github.com/ClassiCube/ClassiCube
try fix again
This commit is contained in:
parent
115b032ca1
commit
a1c52098ad
|
|
@ -1,6 +1,7 @@
|
|||
#define CC_XTEA_ENCRYPTION
|
||||
#define CC_NO_UPDATER
|
||||
#define CC_NO_DYNLIB
|
||||
#define DEFAULT_COMMANDLINE_FUNC
|
||||
|
||||
#include "../Stream.h"
|
||||
#include "../ExtMath.h"
|
||||
|
|
@ -28,7 +29,6 @@
|
|||
#include <netdb.h>
|
||||
#include <3ds.h>
|
||||
#include <citro3d.h>
|
||||
#include "../_PlatformConsole.h"
|
||||
|
||||
#define US_PER_SEC 1000000LL
|
||||
#define NS_PER_MS 1000000LL
|
||||
|
|
@ -42,6 +42,7 @@ const cc_result ReturnCode_SocketDropped = EPIPE;
|
|||
|
||||
const char* Platform_AppNameSuffix = " 3DS";
|
||||
cc_bool Platform_ReadonlyFilesystem;
|
||||
cc_uint8 Platform_Flags = PLAT_FLAG_SINGLE_PROCESS | PLAT_FLAG_APP_EXIT;
|
||||
#include "../_PlatformBase.h"
|
||||
|
||||
// https://gbatemp.net/threads/homebrew-development.360646/page-245
|
||||
|
|
@ -49,6 +50,22 @@ cc_bool Platform_ReadonlyFilesystem;
|
|||
unsigned int __stacksize__ = 256 * 1024;
|
||||
|
||||
|
||||
/*########################################################################################################################*
|
||||
*-----------------------------------------------------Main entrypoint-----------------------------------------------------*
|
||||
*#########################################################################################################################*/
|
||||
#include "../main_impl.h"
|
||||
|
||||
int main(int argc, char** argv) {
|
||||
SetupProgram(argc, argv);
|
||||
while (Window_Main.Exists) {
|
||||
RunProgram(argc, argv);
|
||||
}
|
||||
|
||||
Window_Free();
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/*########################################################################################################################*
|
||||
*------------------------------------------------------Logging/Time-------------------------------------------------------*
|
||||
*#########################################################################################################################*/
|
||||
|
|
@ -466,6 +483,15 @@ cc_result Process_StartOpen(const cc_string* args) {
|
|||
|
||||
void Process_Exit(cc_result code) { exit(code); }
|
||||
|
||||
cc_result Process_StartGame2(const cc_string* args, int numArgs) {
|
||||
Platform_LogConst("START CLASSICUBE");
|
||||
return SetGameArgs(args, numArgs);
|
||||
}
|
||||
|
||||
cc_result Platform_SetDefaultCurrentDirectory(int argc, char **argv) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/*########################################################################################################################*
|
||||
*-------------------------------------------------------Encryption--------------------------------------------------------*
|
||||
|
|
|
|||
|
|
@ -448,7 +448,6 @@
|
|||
<ClInclude Include="_GraphicsBase.h" />
|
||||
<ClInclude Include="_HttpBase.h" />
|
||||
<ClInclude Include="_PlatformBase.h" />
|
||||
<ClInclude Include="_PlatformConsole.h" />
|
||||
<ClInclude Include="_WindowBase.h" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
|
|
|
|||
|
|
@ -342,9 +342,6 @@
|
|||
<ClInclude Include="SSL.h">
|
||||
<Filter>Header Files\Network</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="_PlatformConsole.h">
|
||||
<Filter>Header Files\Platform</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="EntityRenderers.h">
|
||||
<Filter>Header Files\Entities</Filter>
|
||||
</ClInclude>
|
||||
|
|
@ -1001,4 +998,4 @@
|
|||
<Filter>Resource Files</Filter>
|
||||
</ResourceCompile>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
</Project>
|
||||
|
|
|
|||
|
|
@ -38,8 +38,8 @@ cc_uint8 Platform_Flags = PLAT_FLAG_SINGLE_PROCESS;
|
|||
// Current directory management for Windows CE
|
||||
static WCHAR current_directory[MAX_PATH] = L"\\";
|
||||
static cc_string Platform_NextArg(STRING_REF cc_string* args);
|
||||
|
||||
static CRITICAL_SECTION dir_lock;
|
||||
|
||||
/*########################################################################################################################*
|
||||
*-----------------------------------------------------Main entrypoint-----------------------------------------------------*
|
||||
*#########################################################################################################################*/
|
||||
|
|
@ -51,13 +51,14 @@ int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPWSTR lpCmdL
|
|||
|
||||
do {
|
||||
res = RunProgram(0, NULL);
|
||||
} while (Platform_IsSingleProcess() && Window_Main.Exists);
|
||||
} while (Window_Main.Exists);
|
||||
|
||||
Window_Free();
|
||||
ExitProcess(res);
|
||||
return res;
|
||||
}
|
||||
|
||||
|
||||
/*########################################################################################################################*
|
||||
*---------------------------------------------------------Memory----------------------------------------------------------*
|
||||
*#########################################################################################################################*/
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
#include "Core.h"
|
||||
#if defined CC_BUILD_WIN
|
||||
|
||||
#include "String.h"
|
||||
#include "Stream.h"
|
||||
#include "SystemFonts.h"
|
||||
#include "Funcs.h"
|
||||
|
|
@ -36,6 +37,7 @@ cc_bool Platform_ReadonlyFilesystem;
|
|||
cc_uint8 Platform_Flags;
|
||||
#include "_PlatformBase.h"
|
||||
|
||||
|
||||
/*########################################################################################################################*
|
||||
*-----------------------------------------------------Main entrypoint-----------------------------------------------------*
|
||||
*#########################################################################################################################*/
|
||||
|
|
|
|||
|
|
@ -159,7 +159,7 @@ void Platform_LogConst(const char* message) {
|
|||
}
|
||||
|
||||
/*########################################################################################################################*
|
||||
*-----------------------------------------------------Process/Module------------------------------------------------------*
|
||||
*---------------------------------------------------Command line args-----------------------------------------------------*
|
||||
*#########################################################################################################################*/
|
||||
static char gameArgs[GAME_MAX_CMDARGS][STRING_SIZE];
|
||||
static int gameNumArgs;
|
||||
|
|
@ -189,6 +189,27 @@ static CC_INLINE int GetGameArgs(cc_string* args) {
|
|||
return count;
|
||||
}
|
||||
|
||||
#ifdef DEFAULT_COMMANDLINE_FUNC
|
||||
int Platform_GetCommandLineArgs(int argc, STRING_REF char** argv, cc_string* args) {
|
||||
if (gameHasArgs) return GetGameArgs(args);
|
||||
/* Consoles *sometimes* doesn't use argv[0] for program name and so argc will be 0 */
|
||||
//* (e.g. when running via some emulators) */
|
||||
if (!argc) return 0;
|
||||
|
||||
argc--; argv++; /* skip executable path argument */
|
||||
|
||||
int count = min(argc, GAME_MAX_CMDARGS);
|
||||
Platform_Log1("ARGS: %i", &count);
|
||||
|
||||
for (int i = 0; i < count; i++)
|
||||
{
|
||||
args[i] = String_FromReadonly(argv[i]);
|
||||
Platform_Log2(" ARG %i = %c", &i, argv[i]);
|
||||
}
|
||||
return count;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
/*########################################################################################################################*
|
||||
*----------------------------------------------------------Misc-----------------------------------------------------------*
|
||||
|
|
|
|||
|
|
@ -1,49 +0,0 @@
|
|||
cc_uint8 Platform_Flags = PLAT_FLAG_SINGLE_PROCESS | PLAT_FLAG_APP_EXIT;
|
||||
|
||||
/*########################################################################################################################*
|
||||
*-----------------------------------------------------Main entrypoint-----------------------------------------------------*
|
||||
*#########################################################################################################################*/
|
||||
#include "main_impl.h"
|
||||
|
||||
int main(int argc, char** argv) {
|
||||
SetupProgram(argc, argv);
|
||||
while (Window_Main.Exists) {
|
||||
RunProgram(argc, argv);
|
||||
}
|
||||
|
||||
Window_Free();
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/*########################################################################################################################*
|
||||
*-----------------------------------------------------Process/Module------------------------------------------------------*
|
||||
*#########################################################################################################################*/
|
||||
cc_result Process_StartGame2(const cc_string* args, int numArgs) {
|
||||
Platform_LogConst("START CLASSICUBE");
|
||||
return SetGameArgs(args, numArgs);
|
||||
}
|
||||
|
||||
int Platform_GetCommandLineArgs(int argc, STRING_REF char** argv, cc_string* args) {
|
||||
if (gameHasArgs) return GetGameArgs(args);
|
||||
// Consoles *sometimes* doesn't use argv[0] for program name and so argc will be 0
|
||||
// (e.g. when running via some emulators)
|
||||
if (!argc) return 0;
|
||||
|
||||
argc--; argv++; // skip executable path argument
|
||||
|
||||
int count = min(argc, GAME_MAX_CMDARGS);
|
||||
Platform_Log1("ARGS: %i", &count);
|
||||
|
||||
for (int i = 0; i < count; i++)
|
||||
{
|
||||
args[i] = String_FromReadonly(argv[i]);
|
||||
Platform_Log2(" ARG %i = %c", &i, argv[i]);
|
||||
}
|
||||
return count;
|
||||
}
|
||||
|
||||
cc_result Platform_SetDefaultCurrentDirectory(int argc, char **argv) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -41,7 +41,7 @@ size_t __stack = 65536; // vbcc
|
|||
/*########################################################################################################################*
|
||||
*-----------------------------------------------------Main entrypoint-----------------------------------------------------*
|
||||
*#########################################################################################################################*/
|
||||
#include "main_impl.h"
|
||||
#include "../main_impl.h"
|
||||
|
||||
int main(int argc, char** argv) {
|
||||
cc_result res;
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
#define CC_XTEA_ENCRYPTION
|
||||
#define CC_NO_UPDATER
|
||||
#define CC_NO_DYNLIB
|
||||
#define DEFAULT_COMMANDLINE_FUNC
|
||||
|
||||
#include "../Stream.h"
|
||||
#include "../ExtMath.h"
|
||||
|
|
@ -24,7 +25,6 @@
|
|||
#include <dc/sd.h>
|
||||
#include <fat/fs_fat.h>
|
||||
#include <kos/dbgio.h>
|
||||
#include "../_PlatformConsole.h"
|
||||
|
||||
KOS_INIT_FLAGS(INIT_CONTROLLER | INIT_KEYBOARD | INIT_MOUSE |
|
||||
INIT_VMU | INIT_CDROM | INIT_NET);
|
||||
|
|
@ -35,11 +35,28 @@ const cc_result ReturnCode_DirectoryExists = EEXIST;
|
|||
const cc_result ReturnCode_SocketInProgess = EINPROGRESS;
|
||||
const cc_result ReturnCode_SocketWouldBlock = EWOULDBLOCK;
|
||||
const cc_result ReturnCode_SocketDropped = EPIPE;
|
||||
static cc_bool usingSD;
|
||||
|
||||
const char* Platform_AppNameSuffix = " Dreamcast";
|
||||
cc_bool Platform_ReadonlyFilesystem;
|
||||
cc_uint8 Platform_Flags = PLAT_FLAG_SINGLE_PROCESS | PLAT_FLAG_APP_EXIT;
|
||||
#include "../_PlatformBase.h"
|
||||
static cc_bool usingSD;
|
||||
|
||||
|
||||
/*########################################################################################################################*
|
||||
*-----------------------------------------------------Main entrypoint-----------------------------------------------------*
|
||||
*#########################################################################################################################*/
|
||||
#include "main_impl.h"
|
||||
|
||||
int main(int argc, char** argv) {
|
||||
SetupProgram(argc, argv);
|
||||
while (Window_Main.Exists) {
|
||||
RunProgram(argc, argv);
|
||||
}
|
||||
|
||||
Window_Free();
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/*########################################################################################################################*
|
||||
|
|
@ -768,6 +785,15 @@ cc_result Process_StartOpen(const cc_string* args) {
|
|||
|
||||
void Process_Exit(cc_result code) { exit(code); }
|
||||
|
||||
cc_result Process_StartGame2(const cc_string* args, int numArgs) {
|
||||
Platform_LogConst("START CLASSICUBE");
|
||||
return SetGameArgs(args, numArgs);
|
||||
}
|
||||
|
||||
cc_result Platform_SetDefaultCurrentDirectory(int argc, char **argv) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/*########################################################################################################################*
|
||||
*-------------------------------------------------------Encryption--------------------------------------------------------*
|
||||
|
|
|
|||
|
|
@ -52,6 +52,7 @@ int main(int argc, char** argv) {
|
|||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/*########################################################################################################################*
|
||||
*---------------------------------------------------------Memory----------------------------------------------------------*
|
||||
*#########################################################################################################################*/
|
||||
|
|
|
|||
|
|
@ -481,3 +481,12 @@ cc_result Process_StartOpen(const cc_string* args) {
|
|||
|
||||
void Process_Exit(cc_result code) { exit(code); }
|
||||
|
||||
cc_result Process_StartGame2(const cc_string* args, int numArgs) {
|
||||
Platform_LogConst("START CLASSICUBE");
|
||||
return SetGameArgs(args, numArgs);
|
||||
}
|
||||
|
||||
cc_result Platform_SetDefaultCurrentDirectory(int argc, char **argv) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -27,7 +27,6 @@
|
|||
#include <ogc/lwp_watchdog.h>
|
||||
#include <fat.h>
|
||||
#include <ogc/exi.h>
|
||||
#include "../_PlatformConsole.h"
|
||||
|
||||
const cc_result ReturnCode_FileShareViolation = 1000000000; /* TODO: not used apparently */
|
||||
const cc_result ReturnCode_FileNotFound = ENOENT;
|
||||
|
|
@ -38,10 +37,27 @@ const cc_result ReturnCode_SocketDropped = -EPIPE;
|
|||
|
||||
const char* Platform_AppNameSuffix = " GameCube";
|
||||
cc_bool Platform_ReadonlyFilesystem;
|
||||
cc_uint8 Platform_Flags = PLAT_FLAG_SINGLE_PROCESS | PLAT_FLAG_APP_EXIT;
|
||||
#include "../_PlatformBase.h"
|
||||
#include "Platform_GCWii.h"
|
||||
|
||||
|
||||
/*########################################################################################################################*
|
||||
*-----------------------------------------------------Main entrypoint-----------------------------------------------------*
|
||||
*#########################################################################################################################*/
|
||||
#include "../main_impl.h"
|
||||
|
||||
int main(int argc, char** argv) {
|
||||
SetupProgram(argc, argv);
|
||||
while (Window_Main.Exists) {
|
||||
RunProgram(argc, argv);
|
||||
}
|
||||
|
||||
Window_Free();
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/*########################################################################################################################*
|
||||
*---------------------------------------------------------Socket----------------------------------------------------------*
|
||||
*#########################################################################################################################*/
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@
|
|||
#define CC_XTEA_ENCRYPTION
|
||||
#define CC_NO_UPDATER
|
||||
#define CC_NO_DYNLIB
|
||||
#define DEFAULT_COMMANDLINE_FUNC
|
||||
|
||||
#include "../Stream.h"
|
||||
#include "../ExtMath.h"
|
||||
|
|
@ -28,7 +29,6 @@
|
|||
#include <fat.h>
|
||||
#include <ogc/exi.h>
|
||||
#include <ogc/wiilaunch.h>
|
||||
#include "../_PlatformConsole.h"
|
||||
|
||||
const cc_result ReturnCode_FileShareViolation = 1000000000; /* TODO: not used apparently */
|
||||
const cc_result ReturnCode_FileNotFound = ENOENT;
|
||||
|
|
@ -39,10 +39,27 @@ const cc_result ReturnCode_SocketDropped = -EPIPE;
|
|||
|
||||
const char* Platform_AppNameSuffix = " Wii";
|
||||
cc_bool Platform_ReadonlyFilesystem;
|
||||
cc_uint8 Platform_Flags = PLAT_FLAG_SINGLE_PROCESS | PLAT_FLAG_APP_EXIT;
|
||||
#include "../_PlatformBase.h"
|
||||
#include "Platform_GCWii.h"
|
||||
|
||||
|
||||
/*########################################################################################################################*
|
||||
*-----------------------------------------------------Main entrypoint-----------------------------------------------------*
|
||||
*#########################################################################################################################*/
|
||||
#include "../main_impl.h"
|
||||
|
||||
int main(int argc, char** argv) {
|
||||
SetupProgram(argc, argv);
|
||||
while (Window_Main.Exists) {
|
||||
RunProgram(argc, argv);
|
||||
}
|
||||
|
||||
Window_Free();
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/*########################################################################################################################*
|
||||
*---------------------------------------------------------Socket----------------------------------------------------------*
|
||||
*#########################################################################################################################*/
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@
|
|||
#ifdef NDS_NONET
|
||||
#define CC_NO_SOCKETS
|
||||
#endif
|
||||
#define DEFAULT_COMMANDLINE_FUNC
|
||||
|
||||
#define CC_XTEA_ENCRYPTION
|
||||
#include "../Stream.h"
|
||||
|
|
@ -41,7 +42,6 @@
|
|||
#include <netinet/in.h>
|
||||
#include <sys/socket.h>
|
||||
#endif
|
||||
#include "../_PlatformConsole.h"
|
||||
|
||||
const cc_result ReturnCode_FileShareViolation = 1000000000; // not used
|
||||
const cc_result ReturnCode_FileNotFound = ENOENT;
|
||||
|
|
@ -52,9 +52,26 @@ const cc_result ReturnCode_SocketDropped = EPIPE;
|
|||
|
||||
const char* Platform_AppNameSuffix = " NDS";
|
||||
cc_bool Platform_ReadonlyFilesystem;
|
||||
cc_uint8 Platform_Flags = PLAT_FLAG_SINGLE_PROCESS | PLAT_FLAG_APP_EXIT;
|
||||
#include "../_PlatformBase.h"
|
||||
|
||||
|
||||
/*########################################################################################################################*
|
||||
*-----------------------------------------------------Main entrypoint-----------------------------------------------------*
|
||||
*#########################################################################################################################*/
|
||||
#include "../main_impl.h"
|
||||
|
||||
int main(int argc, char** argv) {
|
||||
SetupProgram(argc, argv);
|
||||
while (Window_Main.Exists) {
|
||||
RunProgram(argc, argv);
|
||||
}
|
||||
|
||||
Window_Free();
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/*########################################################################################################################*
|
||||
*------------------------------------------------------Logging/Time-------------------------------------------------------*
|
||||
*#########################################################################################################################*/
|
||||
|
|
@ -643,6 +660,15 @@ cc_result Process_StartOpen(const cc_string* args) {
|
|||
|
||||
void Process_Exit(cc_result code) { exit(code); }
|
||||
|
||||
cc_result Process_StartGame2(const cc_string* args, int numArgs) {
|
||||
Platform_LogConst("START CLASSICUBE");
|
||||
return SetGameArgs(args, numArgs);
|
||||
}
|
||||
|
||||
cc_result Platform_SetDefaultCurrentDirectory(int argc, char **argv) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/*########################################################################################################################*
|
||||
*-------------------------------------------------------Encryption--------------------------------------------------------*
|
||||
|
|
|
|||
|
|
@ -42,6 +42,22 @@ cc_uint8 Platform_Flags = PLAT_FLAG_SINGLE_PROCESS | PLAT_FLAG_APP_EXIT;
|
|||
#include "../_PlatformBase.h"
|
||||
|
||||
|
||||
/*########################################################################################################################*
|
||||
*-----------------------------------------------------Main entrypoint-----------------------------------------------------*
|
||||
*#########################################################################################################################*/
|
||||
#include "../main_impl.h"
|
||||
|
||||
int main(int argc, char** argv) {
|
||||
SetupProgram(argc, argv);
|
||||
while (Window_Main.Exists) {
|
||||
RunProgram(argc, argv);
|
||||
}
|
||||
|
||||
Window_Free();
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/*########################################################################################################################*
|
||||
*------------------------------------------------------Logging/Time-------------------------------------------------------*
|
||||
*#########################################################################################################################*/
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
#define CC_XTEA_ENCRYPTION
|
||||
#define CC_NO_UPDATER
|
||||
#define CC_NO_DYNLIB
|
||||
#define DEFAULT_COMMANDLINE_FUNC
|
||||
|
||||
#include "../Stream.h"
|
||||
#include "../ExtMath.h"
|
||||
|
|
@ -39,7 +40,6 @@
|
|||
#include <io_common.h>
|
||||
#include <iox_stat.h>
|
||||
#include <libcdvd.h>
|
||||
#include "../_PlatformConsole.h"
|
||||
|
||||
const cc_result ReturnCode_FileShareViolation = 1000000000; // not used
|
||||
const cc_result ReturnCode_FileNotFound = -4;
|
||||
|
|
@ -50,6 +50,7 @@ const cc_result ReturnCode_SocketWouldBlock = EWOULDBLOCK;
|
|||
const cc_result ReturnCode_SocketDropped = EPIPE;
|
||||
|
||||
const char* Platform_AppNameSuffix = " PS2";
|
||||
cc_uint8 Platform_Flags = PLAT_FLAG_SINGLE_PROCESS | PLAT_FLAG_APP_EXIT;
|
||||
cc_bool Platform_ReadonlyFilesystem;
|
||||
#include "../_PlatformBase.h"
|
||||
|
||||
|
|
@ -63,6 +64,22 @@ cc_bool Platform_ReadonlyFilesystem;
|
|||
if (ret < 0) Platform_Log1("SifExecModuleBuffer " STRINGIFY(name) " failed: %i", &ret);
|
||||
|
||||
|
||||
/*########################################################################################################################*
|
||||
*-----------------------------------------------------Main entrypoint-----------------------------------------------------*
|
||||
*#########################################################################################################################*/
|
||||
#include "../main_impl.h"
|
||||
|
||||
int main(int argc, char** argv) {
|
||||
SetupProgram(argc, argv);
|
||||
while (Window_Main.Exists) {
|
||||
RunProgram(argc, argv);
|
||||
}
|
||||
|
||||
Window_Free();
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/*########################################################################################################################*
|
||||
*------------------------------------------------------Logging/Time-------------------------------------------------------*
|
||||
*#########################################################################################################################*/
|
||||
|
|
@ -757,6 +774,15 @@ cc_result Process_StartOpen(const cc_string* args) {
|
|||
|
||||
void Process_Exit(cc_result code) { exit(code); }
|
||||
|
||||
cc_result Process_StartGame2(const cc_string* args, int numArgs) {
|
||||
Platform_LogConst("START CLASSICUBE");
|
||||
return SetGameArgs(args, numArgs);
|
||||
}
|
||||
|
||||
cc_result Platform_SetDefaultCurrentDirectory(int argc, char **argv) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/*########################################################################################################################*
|
||||
*-------------------------------------------------------Encryption--------------------------------------------------------*
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
#define CC_XTEA_ENCRYPTION
|
||||
#define CC_NO_UPDATER
|
||||
#define CC_NO_DYNLIB
|
||||
#define DEFAULT_COMMANDLINE_FUNC
|
||||
|
||||
#include "../Stream.h"
|
||||
#include "../ExtMath.h"
|
||||
|
|
@ -32,7 +33,6 @@
|
|||
#include <sys/systime.h>
|
||||
#include <sys/tty.h>
|
||||
#include <sys/process.h>
|
||||
#include "../_PlatformConsole.h"
|
||||
|
||||
const cc_result ReturnCode_FileShareViolation = 1000000000; // not used
|
||||
const cc_result ReturnCode_FileNotFound = 0x80010006; // ENOENT;
|
||||
|
|
@ -42,11 +42,29 @@ const cc_result ReturnCode_SocketWouldBlock = NET_EWOULDBLOCK;
|
|||
const cc_result ReturnCode_SocketDropped = NET_EPIPE;
|
||||
|
||||
const char* Platform_AppNameSuffix = " PS3";
|
||||
cc_uint8 Platform_Flags = PLAT_FLAG_SINGLE_PROCESS | PLAT_FLAG_APP_EXIT;
|
||||
cc_bool Platform_ReadonlyFilesystem;
|
||||
#include "../_PlatformBase.h"
|
||||
|
||||
SYS_PROCESS_PARAM(1001, 256 * 1024); // 256kb stack size
|
||||
|
||||
|
||||
/*########################################################################################################################*
|
||||
*-----------------------------------------------------Main entrypoint-----------------------------------------------------*
|
||||
*#########################################################################################################################*/
|
||||
#include "../main_impl.h"
|
||||
|
||||
int main(int argc, char** argv) {
|
||||
SetupProgram(argc, argv);
|
||||
while (Window_Main.Exists) {
|
||||
RunProgram(argc, argv);
|
||||
}
|
||||
|
||||
Window_Free();
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/*########################################################################################################################*
|
||||
*------------------------------------------------------Logging/Time-------------------------------------------------------*
|
||||
*#########################################################################################################################*/
|
||||
|
|
@ -501,6 +519,15 @@ cc_result Process_StartOpen(const cc_string* args) {
|
|||
|
||||
void Process_Exit(cc_result code) { exit(code); }
|
||||
|
||||
cc_result Process_StartGame2(const cc_string* args, int numArgs) {
|
||||
Platform_LogConst("START CLASSICUBE");
|
||||
return SetGameArgs(args, numArgs);
|
||||
}
|
||||
|
||||
cc_result Platform_SetDefaultCurrentDirectory(int argc, char **argv) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/*########################################################################################################################*
|
||||
*-------------------------------------------------------Encryption--------------------------------------------------------*
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
#define CC_XTEA_ENCRYPTION
|
||||
#define CC_NO_UPDATER
|
||||
#define CC_NO_DYNLIB
|
||||
#define DEFAULT_COMMANDLINE_FUNC
|
||||
|
||||
#include "../Stream.h"
|
||||
#include "../ExtMath.h"
|
||||
|
|
@ -31,7 +32,6 @@
|
|||
#include <stdio.h>
|
||||
#include <netdb.h>
|
||||
#include <libkernel.h>
|
||||
#include "../_PlatformConsole.h"
|
||||
|
||||
const cc_result ReturnCode_FileShareViolation = 1000000000; /* TODO: not used apparently */
|
||||
const cc_result ReturnCode_FileNotFound = ENOENT;
|
||||
|
|
@ -42,9 +42,26 @@ const cc_result ReturnCode_SocketDropped = EPIPE;
|
|||
|
||||
const char* Platform_AppNameSuffix = " PS4";
|
||||
cc_bool Platform_ReadonlyFilesystem;
|
||||
cc_uint8 Platform_Flags = PLAT_FLAG_SINGLE_PROCESS | PLAT_FLAG_APP_EXIT;
|
||||
#include "../_PlatformBase.h"
|
||||
|
||||
|
||||
/*########################################################################################################################*
|
||||
*-----------------------------------------------------Main entrypoint-----------------------------------------------------*
|
||||
*#########################################################################################################################*/
|
||||
#include "../main_impl.h"
|
||||
|
||||
int main(int argc, char** argv) {
|
||||
SetupProgram(argc, argv);
|
||||
while (Window_Main.Exists) {
|
||||
RunProgram(argc, argv);
|
||||
}
|
||||
|
||||
Window_Free();
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/*########################################################################################################################*
|
||||
*------------------------------------------------------Logging/Time-------------------------------------------------------*
|
||||
*#########################################################################################################################*/
|
||||
|
|
@ -547,6 +564,15 @@ void Platform_Init(void) {
|
|||
Platform_LogConst("initing 2..");
|
||||
}
|
||||
|
||||
cc_result Process_StartGame2(const cc_string* args, int numArgs) {
|
||||
Platform_LogConst("START CLASSICUBE");
|
||||
return SetGameArgs(args, numArgs);
|
||||
}
|
||||
|
||||
cc_result Platform_SetDefaultCurrentDirectory(int argc, char **argv) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/*########################################################################################################################*
|
||||
*-------------------------------------------------------Encryption--------------------------------------------------------*
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
#define CC_XTEA_ENCRYPTION
|
||||
#define CC_NO_UPDATER
|
||||
#define CC_NO_DYNLIB
|
||||
#define DEFAULT_COMMANDLINE_FUNC
|
||||
|
||||
#include "../Stream.h"
|
||||
#include "../ExtMath.h"
|
||||
|
|
@ -21,7 +22,6 @@
|
|||
#include <pspnet_resolver.h>
|
||||
#include <pspnet_apctl.h>
|
||||
#include <psprtc.h>
|
||||
#include "../_PlatformConsole.h"
|
||||
|
||||
const cc_result ReturnCode_FileShareViolation = 1000000000; // not used
|
||||
const cc_result ReturnCode_FileNotFound = ENOENT;
|
||||
|
|
@ -32,6 +32,7 @@ const cc_result ReturnCode_SocketDropped = EPIPE;
|
|||
|
||||
const char* Platform_AppNameSuffix = " PSP";
|
||||
cc_bool Platform_ReadonlyFilesystem;
|
||||
cc_uint8 Platform_Flags = PLAT_FLAG_SINGLE_PROCESS | PLAT_FLAG_APP_EXIT;
|
||||
#include "../_PlatformBase.h"
|
||||
|
||||
PSP_MODULE_INFO("ClassiCube", PSP_MODULE_USER, 1, 0);
|
||||
|
|
@ -43,6 +44,22 @@ PSP_DISABLE_AUTOSTART_PTHREAD()
|
|||
PSP_DISABLE_NEWLIB_TIMEZONE_SUPPORT()
|
||||
|
||||
|
||||
/*########################################################################################################################*
|
||||
*-----------------------------------------------------Main entrypoint-----------------------------------------------------*
|
||||
*#########################################################################################################################*/
|
||||
#include "../main_impl.h"
|
||||
|
||||
int main(int argc, char** argv) {
|
||||
SetupProgram(argc, argv);
|
||||
while (Window_Main.Exists) {
|
||||
RunProgram(argc, argv);
|
||||
}
|
||||
|
||||
Window_Free();
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/*########################################################################################################################*
|
||||
*------------------------------------------------------Logging/Time-------------------------------------------------------*
|
||||
*#########################################################################################################################*/
|
||||
|
|
@ -501,6 +518,15 @@ cc_result Process_StartOpen(const cc_string* args) {
|
|||
|
||||
void Process_Exit(cc_result code) { exit(code); }
|
||||
|
||||
cc_result Process_StartGame2(const cc_string* args, int numArgs) {
|
||||
Platform_LogConst("START CLASSICUBE");
|
||||
return SetGameArgs(args, numArgs);
|
||||
}
|
||||
|
||||
cc_result Platform_SetDefaultCurrentDirectory(int argc, char **argv) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/*########################################################################################################################*
|
||||
*-------------------------------------------------------Encryption--------------------------------------------------------*
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
#define CC_XTEA_ENCRYPTION
|
||||
#define CC_NO_UPDATER
|
||||
#define CC_NO_DYNLIB
|
||||
#define DEFAULT_COMMANDLINE_FUNC
|
||||
|
||||
#include "../Stream.h"
|
||||
#include "../ExtMath.h"
|
||||
|
|
@ -26,9 +27,26 @@ static int stdout_fd;
|
|||
|
||||
const char* Platform_AppNameSuffix = " PS Vita";
|
||||
cc_bool Platform_ReadonlyFilesystem;
|
||||
cc_uint8 Platform_Flags = PLAT_FLAG_SINGLE_PROCESS | PLAT_FLAG_APP_EXIT;
|
||||
#include "../_PlatformBase.h"
|
||||
|
||||
|
||||
/*########################################################################################################################*
|
||||
*-----------------------------------------------------Main entrypoint-----------------------------------------------------*
|
||||
*#########################################################################################################################*/
|
||||
#include "../main_impl.h"
|
||||
|
||||
int main(int argc, char** argv) {
|
||||
SetupProgram(argc, argv);
|
||||
while (Window_Main.Exists) {
|
||||
RunProgram(argc, argv);
|
||||
}
|
||||
|
||||
Window_Free();
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/*########################################################################################################################*
|
||||
*------------------------------------------------------Logging/Time-------------------------------------------------------*
|
||||
*#########################################################################################################################*/
|
||||
|
|
@ -454,6 +472,15 @@ cc_result Process_StartOpen(const cc_string* args) {
|
|||
|
||||
void Process_Exit(cc_result code) { exit(code); }
|
||||
|
||||
cc_result Process_StartGame2(const cc_string* args, int numArgs) {
|
||||
Platform_LogConst("START CLASSICUBE");
|
||||
return SetGameArgs(args, numArgs);
|
||||
}
|
||||
|
||||
cc_result Platform_SetDefaultCurrentDirectory(int argc, char **argv) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/*########################################################################################################################*
|
||||
*-------------------------------------------------------Encryption--------------------------------------------------------*
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
#define CC_XTEA_ENCRYPTION
|
||||
#define CC_NO_UPDATER
|
||||
#define CC_NO_DYNLIB
|
||||
#define DEFAULT_COMMANDLINE_FUNC
|
||||
|
||||
#include "../Stream.h"
|
||||
#include "../ExtMath.h"
|
||||
|
|
@ -37,6 +38,7 @@ const cc_result ReturnCode_SocketDropped = EPIPE;
|
|||
|
||||
const char* Platform_AppNameSuffix = " Switch";
|
||||
cc_bool Platform_ReadonlyFilesystem;
|
||||
cc_uint8 Platform_Flags = PLAT_FLAG_SINGLE_PROCESS | PLAT_FLAG_APP_EXIT;
|
||||
#include "../_PlatformBase.h"
|
||||
|
||||
alignas(16) u8 __nx_exception_stack[0x1000];
|
||||
|
|
@ -69,6 +71,22 @@ void __libnx_exception_handler(ThreadExceptionDump *ctx)
|
|||
}
|
||||
|
||||
|
||||
/*########################################################################################################################*
|
||||
*-----------------------------------------------------Main entrypoint-----------------------------------------------------*
|
||||
*#########################################################################################################################*/
|
||||
#include "../main_impl.h"
|
||||
|
||||
int main(int argc, char** argv) {
|
||||
SetupProgram(argc, argv);
|
||||
while (Window_Main.Exists) {
|
||||
RunProgram(argc, argv);
|
||||
}
|
||||
|
||||
Window_Free();
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/*########################################################################################################################*
|
||||
*------------------------------------------------------Logging/Time-------------------------------------------------------*
|
||||
*#########################################################################################################################*/
|
||||
|
|
@ -546,6 +564,15 @@ cc_result Process_StartOpen(const cc_string* args) {
|
|||
|
||||
void Process_Exit(cc_result code) { exit(code); }
|
||||
|
||||
cc_result Process_StartGame2(const cc_string* args, int numArgs) {
|
||||
Platform_LogConst("START CLASSICUBE");
|
||||
return SetGameArgs(args, numArgs);
|
||||
}
|
||||
|
||||
cc_result Platform_SetDefaultCurrentDirectory(int argc, char **argv) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/*########################################################################################################################*
|
||||
*-------------------------------------------------------Encryption--------------------------------------------------------*
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
#define CC_XTEA_ENCRYPTION
|
||||
#define CC_NO_UPDATER
|
||||
#define CC_NO_DYNLIB
|
||||
#define DEFAULT_COMMANDLINE_FUNC
|
||||
|
||||
#include "../Stream.h"
|
||||
#include "../ExtMath.h"
|
||||
|
|
@ -41,8 +42,6 @@
|
|||
#include <coreinit/time.h>
|
||||
#include <whb/proc.h>
|
||||
|
||||
#include "../_PlatformConsole.h"
|
||||
|
||||
const cc_result ReturnCode_FileShareViolation = 1000000000; /* TODO: not used apparently */
|
||||
const cc_result ReturnCode_FileNotFound = ENOENT;
|
||||
const cc_result ReturnCode_DirectoryExists = EEXIST;
|
||||
|
|
@ -52,9 +51,26 @@ const cc_result ReturnCode_SocketDropped = EPIPE;
|
|||
|
||||
const char* Platform_AppNameSuffix = " Wii U";
|
||||
cc_bool Platform_ReadonlyFilesystem;
|
||||
cc_uint8 Platform_Flags = PLAT_FLAG_SINGLE_PROCESS | PLAT_FLAG_APP_EXIT;
|
||||
#include "../_PlatformBase.h"
|
||||
|
||||
|
||||
/*########################################################################################################################*
|
||||
*-----------------------------------------------------Main entrypoint-----------------------------------------------------*
|
||||
*#########################################################################################################################*/
|
||||
#include "../main_impl.h"
|
||||
|
||||
int main(int argc, char** argv) {
|
||||
SetupProgram(argc, argv);
|
||||
while (Window_Main.Exists) {
|
||||
RunProgram(argc, argv);
|
||||
}
|
||||
|
||||
Window_Free();
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/*########################################################################################################################*
|
||||
*------------------------------------------------------Logging/Time-------------------------------------------------------*
|
||||
*#########################################################################################################################*/
|
||||
|
|
@ -480,6 +496,15 @@ cc_result Process_StartOpen(const cc_string* args) {
|
|||
|
||||
void Process_Exit(cc_result code) { exit(code); }
|
||||
|
||||
cc_result Process_StartGame2(const cc_string* args, int numArgs) {
|
||||
Platform_LogConst("START CLASSICUBE");
|
||||
return SetGameArgs(args, numArgs);
|
||||
}
|
||||
|
||||
cc_result Platform_SetDefaultCurrentDirectory(int argc, char **argv) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/*########################################################################################################################*
|
||||
*-------------------------------------------------------Encryption--------------------------------------------------------*
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
#define CC_XTEA_ENCRYPTION
|
||||
#define CC_NO_UPDATER
|
||||
#define CC_NO_DYNLIB
|
||||
#define DEFAULT_COMMANDLINE_FUNC
|
||||
|
||||
#include "../Stream.h"
|
||||
#include "../Funcs.h"
|
||||
|
|
@ -16,7 +17,6 @@
|
|||
#include <lwip/sockets.h>
|
||||
#include <nxdk/net.h>
|
||||
#include <nxdk/mount.h>
|
||||
#include "../_PlatformConsole.h"
|
||||
|
||||
const cc_result ReturnCode_FileShareViolation = ERROR_SHARING_VIOLATION;
|
||||
const cc_result ReturnCode_FileNotFound = ERROR_FILE_NOT_FOUND;
|
||||
|
|
@ -27,9 +27,26 @@ const cc_result ReturnCode_SocketDropped = EPIPE;
|
|||
|
||||
const char* Platform_AppNameSuffix = " XBox";
|
||||
cc_bool Platform_ReadonlyFilesystem;
|
||||
cc_uint8 Platform_Flags = PLAT_FLAG_SINGLE_PROCESS | PLAT_FLAG_APP_EXIT;
|
||||
#include "../_PlatformBase.h"
|
||||
|
||||
|
||||
/*########################################################################################################################*
|
||||
*-----------------------------------------------------Main entrypoint-----------------------------------------------------*
|
||||
*#########################################################################################################################*/
|
||||
#include "../main_impl.h"
|
||||
|
||||
int main(int argc, char** argv) {
|
||||
SetupProgram(argc, argv);
|
||||
while (Window_Main.Exists) {
|
||||
RunProgram(argc, argv);
|
||||
}
|
||||
|
||||
Window_Free();
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/*########################################################################################################################*
|
||||
*------------------------------------------------------Logging/Time-------------------------------------------------------*
|
||||
*#########################################################################################################################*/
|
||||
|
|
@ -475,6 +492,15 @@ cc_result Process_StartOpen(const cc_string* args) {
|
|||
|
||||
void Process_Exit(cc_result code) { exit(code); }
|
||||
|
||||
cc_result Process_StartGame2(const cc_string* args, int numArgs) {
|
||||
Platform_LogConst("START CLASSICUBE");
|
||||
return SetGameArgs(args, numArgs);
|
||||
}
|
||||
|
||||
cc_result Platform_SetDefaultCurrentDirectory(int argc, char **argv) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/*########################################################################################################################*
|
||||
*-------------------------------------------------------Encryption--------------------------------------------------------*
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@
|
|||
#define CC_NO_UPDATER
|
||||
#define CC_NO_SOCKETS
|
||||
#define CC_NO_DYNLIB
|
||||
#define DEFAULT_COMMANDLINE_FUNC
|
||||
|
||||
#include "../Stream.h"
|
||||
#include "../Funcs.h"
|
||||
|
|
@ -26,8 +27,6 @@
|
|||
#include <fcntl.h>
|
||||
#include <libfat/fat.h>
|
||||
|
||||
#include "../_PlatformConsole.h"
|
||||
|
||||
const cc_result ReturnCode_FileShareViolation = 1000000000; /* TODO: not used apparently */
|
||||
const cc_result ReturnCode_FileNotFound = ENOENT;
|
||||
const cc_result ReturnCode_DirectoryExists = EEXIST;
|
||||
|
|
@ -37,8 +36,24 @@ const cc_result ReturnCode_SocketDropped = EPIPE;
|
|||
|
||||
const char* Platform_AppNameSuffix = " XBox 360";
|
||||
cc_bool Platform_ReadonlyFilesystem;
|
||||
cc_uint8 Platform_Flags = PLAT_FLAG_SINGLE_PROCESS | PLAT_FLAG_APP_EXIT;
|
||||
#include "../_PlatformBase.h"
|
||||
|
||||
/*########################################################################################################################*
|
||||
*-----------------------------------------------------Main entrypoint-----------------------------------------------------*
|
||||
*#########################################################################################################################*/
|
||||
#include "../main_impl.h"
|
||||
|
||||
int main(int argc, char** argv) {
|
||||
SetupProgram(argc, argv);
|
||||
while (Window_Main.Exists) {
|
||||
RunProgram(argc, argv);
|
||||
}
|
||||
|
||||
Window_Free();
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/*########################################################################################################################*
|
||||
*------------------------------------------------------Logging/Time-------------------------------------------------------*
|
||||
|
|
@ -313,6 +328,15 @@ cc_result Process_StartOpen(const cc_string* args) {
|
|||
|
||||
void Process_Exit(cc_result code) { exit(code); }
|
||||
|
||||
cc_result Process_StartGame2(const cc_string* args, int numArgs) {
|
||||
Platform_LogConst("START CLASSICUBE");
|
||||
return SetGameArgs(args, numArgs);
|
||||
}
|
||||
|
||||
cc_result Platform_SetDefaultCurrentDirectory(int argc, char **argv) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/*########################################################################################################################*
|
||||
*-------------------------------------------------------Encryption--------------------------------------------------------*
|
||||
|
|
|
|||
Loading…
Reference in New Issue