From c4fa849f3ce86f70f5b69c858128bca21b40e137 Mon Sep 17 00:00:00 2001 From: Miran Date: Thu, 2 Nov 2023 04:54:50 +0100 Subject: [PATCH] custom opcodes handler fix --- source/CCustomOpcodeSystem.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/CCustomOpcodeSystem.cpp b/source/CCustomOpcodeSystem.cpp index e5348138..a41a7bea 100644 --- a/source/CCustomOpcodeSystem.cpp +++ b/source/CCustomOpcodeSystem.cpp @@ -6,7 +6,6 @@ #include "CTextManager.h" #include "CModelInfo.h" -#include #include #define OPCODE_VALIDATE_STR_ARG_READ(x) if((void*)x == nullptr) { SHOW_ERROR("%s in script %s \nScript suspended.", lastErrorMsg.c_str(), ((CCustomScript*)thread)->GetInfoStr().c_str()); return CCustomOpcodeSystem::ErrorSuspendScript(thread); } @@ -397,6 +396,7 @@ namespace CLEO customOpcodeHandlers[i] = (_OpcodeHandler)customOpcodeHandler; } MemWrite(gvm.TranslateMemoryAddress(MA_OPCODE_HANDLER_REF), &customOpcodeHandlers); + MemWrite(0x00469EF0, &customOpcodeHandlers); // TODO: game version translation FUNC_fopen = gvm.TranslateMemoryAddress(MA_FOPEN_FUNCTION); FUNC_fclose = gvm.TranslateMemoryAddress(MA_FCLOSE_FUNCTION);