Run using decompiled code

This commit is contained in:
ineed bots 2023-08-31 19:53:24 -06:00
parent 469e8f9630
commit 8e04a4fd43
13 changed files with 21 additions and 11 deletions

View File

@ -896,6 +896,13 @@ namespace codsrc
}
}
// pluto
if (!game::gScrVmPub[inst].terminal_error)
{
return;
}
//
errNewline = dialogMessage;
if (dialogMessage)
{

View File

@ -2346,6 +2346,7 @@ namespace codsrc
assert(game::g_script_error_level[inst] >= 0);
assert(game::g_script_error_level[inst] < 33);
assert(inst == 0 || inst == 1);
//if (game::_setjmp3((int *)game::g_script_error.get() + 0x10 * (0x21 * inst + game::g_script_error_level[inst]), 0))
if (!setjmp(g_script_error[inst][game::g_script_error_level[inst]]))
{
break;

View File

@ -3,7 +3,7 @@
#include "utils/hook.hpp"
#include "codsrc/clientscript/cscr_main.hpp"
#define RE_CSCR_MAIN_USE_WRAPPERS
//#define RE_CSCR_MAIN_USE_WRAPPERS
namespace re_cscr_main
{

View File

@ -3,7 +3,7 @@
#include "utils/hook.hpp"
#include "codsrc/clientscript/cscr_memorytree.hpp"
#define RE_CSCR_MEMORYTREE_USE_WRAPPERS
//#define RE_CSCR_MEMORYTREE_USE_WRAPPERS
namespace re_cscr_memorytree
{

View File

@ -3,7 +3,7 @@
#include "utils/hook.hpp"
#include "codsrc/clientscript/cscr_parser.hpp"
#define RE_CSCR_PARSER_USE_WRAPPERS
//#define RE_CSCR_PARSER_USE_WRAPPERS
namespace re_cscr_parser
{

View File

@ -3,7 +3,7 @@
#include "utils/hook.hpp"
#include "codsrc/clientscript/cscr_parsetree.hpp"
#define RE_CSCR_PARSETREE_USE_WRAPPERS
//#define RE_CSCR_PARSETREE_USE_WRAPPERS
namespace re_cscr_parsetree
{

View File

@ -3,7 +3,7 @@
#include "utils/hook.hpp"
#include "codsrc/clientscript/cscr_readwrite.hpp"
#define RE_CSCR_READWRITE_USE_WRAPPERS
//#define RE_CSCR_READWRITE_USE_WRAPPERS
namespace re_cscr_readwrite
{

View File

@ -3,7 +3,7 @@
#include "utils/hook.hpp"
#include "codsrc/clientscript/cscr_stringlist.hpp"
#define RE_CSCR_STRINGLIST_USE_WRAPPERS
//#define RE_CSCR_STRINGLIST_USE_WRAPPERS
namespace re_cscr_stringlist
{

View File

@ -3,7 +3,7 @@
#include "utils/hook.hpp"
#include "codsrc/clientscript/cscr_variable.hpp"
#define RE_CSCR_VARIABLE_USE_WRAPPERS
//#define RE_CSCR_VARIABLE_USE_WRAPPERS
namespace re_cscr_variable
{

View File

@ -3,7 +3,7 @@
#include "utils/hook.hpp"
#include "codsrc/clientscript/cscr_vm.hpp"
#define RE_CSCR_VM_USE_WRAPPERS
//#define RE_CSCR_VM_USE_WRAPPERS
namespace re_cscr_vm
{
@ -1050,7 +1050,7 @@ namespace re_cscr_vm
}
}
char* Scr_GetTypeName_call(game::scriptInstance_t a1, [[maybe_unused]] void* caller_addr)
const char* Scr_GetTypeName_call(game::scriptInstance_t a1, [[maybe_unused]] void* caller_addr)
{
#ifdef RE_CSCR_VM_USE_WRAPPERS
return game::Scr_GetTypeName(a1, Scr_GetTypeName_original);

View File

@ -2295,6 +2295,8 @@ namespace game
#pragma region "functions"
WEAK symbol<void(scriptInstance_t inst, VariableValue* value)>RemoveRefToValue{ 0x0, 0x67EB70 };
WEAK symbol<int(jmp_buf buf, int count)>_setjmp3{ 0x0, 0x7E1894 };
WEAK symbol<void(jmp_buf Buf, int Value)>longjmp{ 0x0, 0x7AD57C };
inline void* ScriptParse_ADDR() { return CALL_ADDR(0x0, 0x69D710); }
void ScriptParse(scriptInstance_t inst, sval_u* parseData, void* call_addr = ScriptParse_ADDR());

View File

@ -94,7 +94,7 @@ namespace game
inline void* Scr_GetType_ADDR() { return CALL_ADDR(0x0, 0x69A4E0); }
VariableType Scr_GetType(scriptInstance_t inst, unsigned int index, void* call_addr = Scr_GetType_ADDR());
inline void* Scr_GetTypeName_ADDR() { return CALL_ADDR(0x0, 0x69A530); }
char * Scr_GetTypeName(scriptInstance_t inst, void* call_addr = Scr_GetTypeName_ADDR());
const char * Scr_GetTypeName(scriptInstance_t inst, void* call_addr = Scr_GetTypeName_ADDR());
inline void* Scr_GetPointerType_ADDR() { return CALL_ADDR(0x0, 0x69A580); }
VariableType Scr_GetPointerType(scriptInstance_t inst, unsigned int a2, void* call_addr = Scr_GetPointerType_ADDR());
inline void* Scr_AddInt_ADDR() { return CALL_ADDR(0x0, 0x69A610); }

View File

@ -548,7 +548,7 @@ namespace game
return answer;
}
char * Scr_GetTypeName/*@<eax>*/(scriptInstance_t a1/*@<eax>*/, void* call_addr)
const char * Scr_GetTypeName/*@<eax>*/(scriptInstance_t a1/*@<eax>*/, void* call_addr)
{
char * answer;