From 87fb74060291eee419f175e1cdd45bf35b324c0c Mon Sep 17 00:00:00 2001 From: suchmememanyskill Date: Wed, 28 Jul 2021 00:46:39 +0200 Subject: [PATCH] regain vs compatibility --- source/script/genericClass.c | 4 +-- source/script/scriptError.c | 4 ++- source/script/standardLibrary.c | 48 +++++++++++++-------------------- 3 files changed, 23 insertions(+), 33 deletions(-) diff --git a/source/script/genericClass.c b/source/script/genericClass.c index 2cf0799..6113f8a 100644 --- a/source/script/genericClass.c +++ b/source/script/genericClass.c @@ -43,8 +43,8 @@ Variable_t* genericGet(Variable_t* var, CallArgs_t* ref) { for (u32 i = 0; i < ARRAY_SIZE(memberGetters); i++) { if (var->variableType == memberGetters[i].classType) { Variable_t member = memberGetters[i].func(var, ref->extra); - if (member.variableType == None) - return NULL; + if (member.variableType == None) + break; if (member.variableType == ReferenceType) { return member.referenceType; diff --git a/source/script/scriptError.c b/source/script/scriptError.c index 8e218c9..7feef5b 100644 --- a/source/script/scriptError.c +++ b/source/script/scriptError.c @@ -14,5 +14,7 @@ void printScriptError(u8 errLevel, char* message, ...) { if (errLevel < SCRIPT_WARN) gfx_printf("\nError occured on or near line %d\n", (u32)scriptCurrentLine); va_end(args); - hidWait(); + #ifndef WIN32 + hidWait(); + #endif } \ No newline at end of file diff --git a/source/script/standardLibrary.c b/source/script/standardLibrary.c index 6ce7421..0f1816a 100644 --- a/source/script/standardLibrary.c +++ b/source/script/standardLibrary.c @@ -464,36 +464,14 @@ ClassFunction(stdPower){ #else #define STUBBED(name) ClassFunction(name) { return newIntVariablePtr(0); } -ClassFunction(stdMountSysmmc){ - return newIntVariablePtr(0); -} -ClassFunction(stdMountSave){ - return newIntVariablePtr(0); -} -ClassFunction(stdSetPixel) { - return newIntVariablePtr(0); -} - -ClassFunction(stdReadDir){ - return newIntVariablePtr(0); -} - -ClassFunction(stdFileCopy){ - return newIntVariablePtr(0); -} - -ClassFunction(stdMkdir){ - return newIntVariablePtr(0); -} - -ClassFunction(stdGetMemUsage) { - return newIntVariablePtr(0); -} - -ClassFunction(stdGetNcaType) { - return newIntVariablePtr(0); -} - +STUBBED(stdMountSysmmc) +STUBBED(stdMountSave) +STUBBED(stdSetPixel) +STUBBED(stdReadDir) +STUBBED(stdFileCopy) +STUBBED(stdMkdir) +STUBBED(stdGetMemUsage) +STUBBED(stdGetNcaType) STUBBED(stdPause) STUBBED(stdPauseMask) STUBBED(stdColor) @@ -510,6 +488,16 @@ STUBBED(stdFileMove) STUBBED(stdLaunchPayload) STUBBED(stdFileWrite) STUBBED(stdFileRead) +STUBBED(stdCombinePaths) +STUBBED(stdEmmcFileWrite) +STUBBED(stdEmmcFileRead) +STUBBED(stdEmummcFileRead) +STUBBED(stdEmummcFileWrite) +STUBBED(stdEscPaths) +STUBBED(stdGetCwd) +STUBBED(stdPower) +STUBBED(stdSetPrintPos) +STUBBED(stdSetPixels) #endif u8 oneIntoneFunction[] = { IntClass, FunctionClass };