2022-05-09 21:21:05 +02:00
|
|
|
#pragma once
|
2023-05-06 16:23:56 +02:00
|
|
|
#include "squirrel.h"
|
2023-03-26 16:09:05 +02:00
|
|
|
#include "sqvm.h"
|
2022-08-08 17:49:46 +02:00
|
|
|
|
2022-05-09 21:21:05 +02:00
|
|
|
extern bool g_bSQAuxError;
|
2022-05-20 01:16:30 +02:00
|
|
|
extern bool g_bSQAuxBadLogic;
|
2022-08-08 17:49:46 +02:00
|
|
|
extern HSQUIRRELVM g_pErrorVM;
|
2022-05-09 21:21:05 +02:00
|
|
|
|
2023-07-02 23:01:29 +02:00
|
|
|
inline SQInteger(*v_sqstd_aux_printerror)(HSQUIRRELVM v);
|
|
|
|
inline SQInteger(*v_sqstd_aux_badlogic)(HSQUIRRELVM v, __m128i* a2, __m128i* a3);
|
2022-05-09 21:21:05 +02:00
|
|
|
|
|
|
|
///////////////////////////////////////////////////////////////////////////////
|
2023-05-06 16:23:56 +02:00
|
|
|
class VSquirrelAUX : public IDetour
|
2022-05-09 21:21:05 +02:00
|
|
|
{
|
|
|
|
virtual void GetAdr(void) const
|
|
|
|
{
|
2024-01-02 15:21:36 +01:00
|
|
|
LogFunAdr("sqstd_aux_printerror", v_sqstd_aux_printerror);
|
|
|
|
LogFunAdr("sqstd_aux_badlogic", v_sqstd_aux_badlogic);
|
2022-05-09 21:21:05 +02:00
|
|
|
}
|
|
|
|
virtual void GetFun(void) const
|
|
|
|
{
|
2024-01-02 15:21:36 +01:00
|
|
|
g_GameDll.FindPatternSIMD("40 53 56 57 41 54 41 55 41 56 41 57 48 81 EC ?? ?? ?? ?? FF 05 ?? ?? ?? ??").GetPtr(v_sqstd_aux_printerror);
|
|
|
|
g_GameDll.FindPatternSIMD("48 8B C4 55 48 8B EC 48 83 EC 70 41 0F 10 ??").GetPtr(v_sqstd_aux_badlogic);
|
2022-05-09 21:21:05 +02:00
|
|
|
}
|
|
|
|
virtual void GetVar(void) const { }
|
|
|
|
virtual void GetCon(void) const { }
|
2023-11-26 13:21:20 +01:00
|
|
|
virtual void Detour(const bool bAttach) const;
|
2022-05-09 21:21:05 +02:00
|
|
|
};
|
|
|
|
///////////////////////////////////////////////////////////////////////////////
|