___:0076A650 push ebp ___:0076A651 mov ebp, esp ___:0076A653 mov off_90C394, offset off_78933C ___:0076A65D movss xmm0, dword_7749E8 ___:0076A665 movss dword_90C398, xmm0 ___:0076A66D mov off_90C39C, offset aModeldebug_dra ; "ModelDebug_DrawBoxes" ___:0076A677 mov dword_90C3A0, 0 ___:0076A681 mov eax, off_90DDC8 ___:0076A686 mov off_90C3A4, eax ___:0076A68B mov off_90DDC8, offset off_90C394 ___:0076A695 mov off_90C394, offset off_789320 ___:0076A69F mov dword_90C3A8, 0 ___:0076A6A9 pop ebp ___:0076A6AA retn
void InitDrawBoxes()
{
*(DWORD*) 0x90C394 = *(DWORD*) 0x78933C;
*(DWORD*) 0x90C398 = *(DWORD*) 0x7749E8;
*(char**) 0x90C39C = "ModelDebug_DrawBoxes";
*(DWORD*) 0x90C3A0 = 0;
*(DWORD*) 0x90C3A4 = *(DWORD*) 0x90DDC8;
*(DWORD*) 0x90DDC8 = *(DWORD*) 0x90C394;
*(DWORD*) 0x90C394 = *(DWORD*) 0x789320;
}
struct CEngineVar
{
void* pOnChangeFunc;
void* pSomething1;
char* CommandName;
DWORD Value;
void* pSomething2;
}
void InitDrawBoxes()
{
CEngineVar& DrawBoxes = (CEngineVar&) 0x90C394;
DrawBoxes.pOnChangeFunc = *(DWORD*) 0x78933C;
DrawBoxes.pSomething1 = *(DWORD*) 0x7749E8;
DrawBoxes.CommandName = "ModelDebug_DrawBoxes";
DrawBoxes.Value = 0;
DrawBoxes.pSomething2 = *(DWORD*) 0x90DDC8;
*(DWORD*) 0x90DDC8 = *(DWORD*) 0x90C394; // Some weird pointer switching or something
*(DWORD*) 0x90C394 = *(DWORD*) 0x789320;
}