diff --git a/deps/gsc-tool b/deps/gsc-tool index d7365e4..0e6238a 160000 --- a/deps/gsc-tool +++ b/deps/gsc-tool @@ -1 +1 @@ -Subproject commit d7365e471a05a7a6ac5b60b48f6a11a5947f10f1 +Subproject commit 0e6238a6ab8643df6404f7c0280242df2812f6c8 diff --git a/src/component/signatures.cpp b/src/component/signatures.cpp index 74c6c28..416e3e7 100644 --- a/src/component/signatures.cpp +++ b/src/component/signatures.cpp @@ -63,13 +63,15 @@ namespace signatures bool process_gsc_ctx() { - const auto string_ref = find_string_ref("in call to builtin {} \"{}\""); + const auto string_ref = find_string_ref("in call to builtin %s \"%s\""); if (!string_ref) { return false; } - const auto gsc_ctx_ptr = *reinterpret_cast(string_ref - 0xED); + const auto gsc_ctx_ptr = *reinterpret_cast(string_ref - 0xAD); + OutputDebugString(utils::string::va("string_ref: %p\n", string_ref)); + OutputDebugString(utils::string::va("gsc_ctx_ptr: %p\n", gsc_ctx_ptr)); game::plutonium::gsc_ctx.set(gsc_ctx_ptr); return true; } @@ -83,7 +85,9 @@ namespace signatures } const auto offset = *reinterpret_cast(string_ref + 5); - game::plutonium::printf.set(string_ref + 4 + 5 + offset); + const auto printf_ptr = string_ref + 4 + 5 + offset; + OutputDebugString(utils::string::va("printf_ptr: %p\n", printf_ptr)); + game::plutonium::printf.set(printf_ptr); return true; }