Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ineed bots committed Sep 18, 2023
1 parent c1adb9a commit c5195b4
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 16 deletions.
2 changes: 1 addition & 1 deletion src/component/decomp/clientscript/re_cscr_animtree.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#include "utils/hook.hpp"
//#include "codsrc/clientscript/cscr_animtree.hpp"

#ifndef DISABLE_RE_CSCR_YACC
#ifndef DISABLE_RE_CSCR_ANIMTREE
namespace re_cscr_animtree
{
utils::hook::detour AnimTreeCompileError_hook;
Expand Down
10 changes: 5 additions & 5 deletions src/component/decomp/clientscript/re_cscr_yacc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -199,17 +199,17 @@ namespace re_cscr_yacc
public:
void post_unpack() override
{
LowerCase_hook.create(game::LowerCase(), LowerCase_stub);
LowerCase_hook.create(game::LowerCase_ADDR(), LowerCase_stub);
yyparse_hook.create(game::yyparse.get(), yyparse_stub);
StringValue_hook.create(game::StringValue(), StringValue_stub);
StringValue_hook.create(game::StringValue_ADDR(), StringValue_stub);
yylex_hook.create(game::yylex.get(), yylex_stub);
yy_get_next_buffer_hook.create(game::yy_get_next_buffer.get(), yy_get_next_buffer_stub);
yy_get_previous_state_hook.create(game::yy_get_previous_state.get(), yy_get_previous_state_stub);
yy_try_NUL_trans_hook.create(game::yy_try_NUL_trans(), yy_try_NUL_trans_stub);
yy_try_NUL_trans_hook.create(game::yy_try_NUL_trans_ADDR(), yy_try_NUL_trans_stub);
yyrestart_hook.create(game::yyrestart.get(), yyrestart_stub);
yy_create_buffer_hook.create(game::yy_create_buffer.get(), yy_create_buffer_stub);
yy_flush_buffer_hook.create(game::yy_flush_buffer(), yy_flush_buffer_stub);
ScriptParse_hook.create(game::ScriptParse(), ScriptParse_stub);
yy_flush_buffer_hook.create(game::yy_flush_buffer_ADDR(), yy_flush_buffer_stub);
ScriptParse_hook.create(game::ScriptParse_ADDR(), ScriptParse_stub);

//Original hook function addresses
LowerCase_original = LowerCase_hook.get_original();
Expand Down
20 changes: 10 additions & 10 deletions src/game/clientscript/cscr_yacc.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,16 @@ namespace game
WEAK symbol<void()>yyrestart{ 0x0, 0x69D5C0 };
WEAK symbol<yy_buffer_state* ()>yy_create_buffer{ 0x0, 0x69D620 };

inline void* LowerCase() { return CALL_ADDR(0x0, 0x69AEA0); }
unsigned int LowerCase(unsigned int strVal, void* call_addr = LowerCase());
inline void* StringValue() { return CALL_ADDR(0x0, 0x69BFF0); }
int StringValue(int len, const char* str_, void* call_addr = StringValue());
inline void* yy_try_NUL_trans() { return CALL_ADDR(0x0, 0x69D520); }
int yy_try_NUL_trans(int yy_current_state, void* call_addr = yy_try_NUL_trans());
inline void* yy_flush_buffer() { return CALL_ADDR(0x0, 0x69D690); }
void yy_flush_buffer(yy_buffer_state* result, void* call_addr = yy_flush_buffer());
inline void* ScriptParse() { return CALL_ADDR(0x0, 0x69D710); }
void ScriptParse(scriptInstance_t a1, sval_u* parseData, void* call_addr = ScriptParse());
inline void* LowerCase_ADDR() { return CALL_ADDR(0x0, 0x69AEA0); }
unsigned int LowerCase(unsigned int strVal, void* call_addr = LowerCase_ADDR());
inline void* StringValue_ADDR() { return CALL_ADDR(0x0, 0x69BFF0); }
int StringValue(int len, const char* str_, void* call_addr = StringValue_ADDR());
inline void* yy_try_NUL_trans_ADDR() { return CALL_ADDR(0x0, 0x69D520); }
int yy_try_NUL_trans(int yy_current_state, void* call_addr = yy_try_NUL_trans_ADDR());
inline void* yy_flush_buffer_ADDR() { return CALL_ADDR(0x0, 0x69D690); }
void yy_flush_buffer(yy_buffer_state* result, void* call_addr = yy_flush_buffer_ADDR());
inline void* ScriptParse_ADDR() { return CALL_ADDR(0x0, 0x69D710); }
void ScriptParse(scriptInstance_t a1, sval_u* parseData, void* call_addr = ScriptParse_ADDR());

FILE* yy_load_buffer_state();
void yy_fatal_error(const char* err);
Expand Down
1 change: 1 addition & 0 deletions src/game/game.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
//#define DISABLE_RE_CSCR_PARSETREE
//#define DISABLE_RE_CSCR_READWRITE
//#define DISABLE_RE_CSCR_STRINGLIST
//#define DISABLE_RE_CSCR_VARIABLE
//#define DISABLE_RE_CSCR_VM
//#define DISABLE_RE_CSCR_YACC

Expand Down

0 comments on commit c5195b4

Please sign in to comment.