diff --git a/RSDKv4/Script.cpp b/RSDKv4/Script.cpp index e309cef6..851286e6 100644 --- a/RSDKv4/Script.cpp +++ b/RSDKv4/Script.cpp @@ -2878,27 +2878,6 @@ void ParseScriptFile(char *scriptName, int scriptID) } if (scriptFunctionCount < FUNCTION_COUNT && funcID == -1) { -#if !RETRO_USE_ORIGINAL_CODE - if (StrLength(funcName) >= FUNCTION_NAME_LIMIT) { - SetupTextMenu(&gameMenu[0], 0); - AddTextMenuEntry(&gameMenu[0], "SCRIPT PARSING FAILED"); - AddTextMenuEntry(&gameMenu[0], " "); - AddTextMenuEntry(&gameMenu[0], "FUNCTION NAME TOO LONG"); - AddTextMenuEntry(&gameMenu[0], funcName); - AddTextMenuEntry(&gameMenu[0], " "); - AddTextMenuEntry(&gameMenu[0], "LINE NUMBER"); - char buffer[0x10]; - buffer[0] = 0; - AppendIntegerToString(buffer, lineID); - AddTextMenuEntry(&gameMenu[0], buffer); - AddTextMenuEntry(&gameMenu[0], " "); - AddTextMenuEntry(&gameMenu[0], "ERROR IN"); - AddTextMenuEntry(&gameMenu[0], scriptName); - Engine.gameMode = ENGINE_SCRIPTERROR; - return; - } -#endif - StrCopy(scriptFunctionList[scriptFunctionCount++].name, funcName); } else { @@ -2923,27 +2902,6 @@ void ParseScriptFile(char *scriptName, int scriptID) parseMode = PARSEMODE_SCOPELESS; } else { -#if !RETRO_USE_ORIGINAL_CODE - if (StrLength(funcName) >= FUNCTION_NAME_LIMIT) { - SetupTextMenu(&gameMenu[0], 0); - AddTextMenuEntry(&gameMenu[0], "SCRIPT PARSING FAILED"); - AddTextMenuEntry(&gameMenu[0], " "); - AddTextMenuEntry(&gameMenu[0], "FUNCTION NAME TOO LONG"); - AddTextMenuEntry(&gameMenu[0], funcName); - AddTextMenuEntry(&gameMenu[0], " "); - AddTextMenuEntry(&gameMenu[0], "LINE NUMBER"); - char buffer[0x10]; - buffer[0] = 0; - AppendIntegerToString(buffer, lineID); - AddTextMenuEntry(&gameMenu[0], buffer); - AddTextMenuEntry(&gameMenu[0], " "); - AddTextMenuEntry(&gameMenu[0], "ERROR IN"); - AddTextMenuEntry(&gameMenu[0], scriptName); - Engine.gameMode = ENGINE_SCRIPTERROR; - return; - } -#endif - StrCopy(scriptFunctionList[scriptFunctionCount].name, funcName); scriptFunctionList[scriptFunctionCount].access = ACCESS_PUBLIC; scriptFunctionList[scriptFunctionCount].ptr.scriptCodePtr = scriptCodePos; @@ -2982,27 +2940,6 @@ void ParseScriptFile(char *scriptName, int scriptID) parseMode = PARSEMODE_SCOPELESS; } else { -#if !RETRO_USE_ORIGINAL_CODE - if (StrLength(funcName) >= FUNCTION_NAME_LIMIT) { - SetupTextMenu(&gameMenu[0], 0); - AddTextMenuEntry(&gameMenu[0], "SCRIPT PARSING FAILED"); - AddTextMenuEntry(&gameMenu[0], " "); - AddTextMenuEntry(&gameMenu[0], "FUNCTION NAME TOO LONG"); - AddTextMenuEntry(&gameMenu[0], funcName); - AddTextMenuEntry(&gameMenu[0], " "); - AddTextMenuEntry(&gameMenu[0], "LINE NUMBER"); - char buffer[0x10]; - buffer[0] = 0; - AppendIntegerToString(buffer, lineID); - AddTextMenuEntry(&gameMenu[0], buffer); - AddTextMenuEntry(&gameMenu[0], " "); - AddTextMenuEntry(&gameMenu[0], "ERROR IN"); - AddTextMenuEntry(&gameMenu[0], scriptName); - Engine.gameMode = ENGINE_SCRIPTERROR; - return; - } -#endif - StrCopy(scriptFunctionList[scriptFunctionCount].name, funcName); scriptFunctionList[scriptFunctionCount].access = ACCESS_PRIVATE; scriptFunctionList[scriptFunctionCount].ptr.scriptCodePtr = scriptCodePos; diff --git a/RSDKv4/Script.hpp b/RSDKv4/Script.hpp index 41bac5a8..b845880e 100644 --- a/RSDKv4/Script.hpp +++ b/RSDKv4/Script.hpp @@ -9,8 +9,6 @@ #define FUNCSTACK_COUNT (0x400) #define FORSTACK_COUNT (0x400) -#define FUNCTION_NAME_LIMIT (0x20) - #define RETRO_USE_COMPILER (1) struct ScriptPtr { @@ -22,7 +20,7 @@ struct ScriptFunction { byte access; #if RETRO_USE_COMPILER - char name[FUNCTION_NAME_LIMIT]; + char name[0x20]; #endif ScriptPtr ptr; };