/* Actual derived424600 and its ordinary pre/post helpers. The controller437940 is a recording adapter: this isolates caller-owned writes/gates, not physics. World queries return no hit; UI visibility/menu transitions are adapters. */ #define main unused_scalar_main #include "grappler_scalar_probe.c" #undef main static uintptr_t game_table[0x450/4], complete_table[0x220/4]; static uintptr_t menu_table[0x500/4], helper_table[0x60/4]; static unsigned char menu_object[0x600], helper[0x100], current_game[0x600]; static int controllers, upward_queries, downward_queries, closed, hidden; #define GF(o) (*(float*)(object+0xc0+(o))) #define MODE (*(short*)(object+0x7c4)) static void fix(uint32_t a, uint32_t b) { const uint32_t targets[]={/* RELOCATIONS */}; for(;a+4<=b;a++) { uint32_t v;memcpy(&v,AT(a),4); for(unsigned i=0;iContextRecord->Eip-(uintptr_t)mapped+0x400000,e->ExceptionRecord->ExceptionCode,e->ExceptionRecord->ExceptionInformation[1]); ExitProcess(2);return EXCEPTION_CONTINUE_SEARCH; } static void TC controller(void*self,float dt) { require(self==object+0xc0&&dt==1.f/60,"controller owner/delta");controllers++; } static void TC close_menu(void*self) {require(self==menu_object,"menu owner");closed++;} static void TC visibility(void*self,int value) {require(self==helper&&value==1,"helper visibility owner");hidden++;} static int no_up_hit(void) {upward_queries++;return 0;} static int no_down_hit(void) {downward_queries++;return 0;} static void draw(void) {require(0,"unexpected HUD draw in ordinary fixture");} static void one(int owner,int lock,int state,int supported,int rising,int ticks) { memset(object,0,sizeof(object));memset(menu_object,0,sizeof(menu_object)); *(void**)object=complete_table;*(void**)(object+0xc0)=game_table; *(void**)menu_object=menu_table;*(short*)(menu_object+0x4d4)=(short)state; /* Menu layout0 makes actual406590 a no-op; resources are not synthesized. */ *(void**)(object+0xa18)=menu_object; *(void**)(object+0xc0+0x1d94)=helper+0xc0; *(void**)helper=helper_table; *(void**)AT(0x509948)=current_game;*(uint32_t*)(current_game+0x490)=0x4c563142; *(void**)AT(0x5099e4)=owner==0?NULL:owner==1?object+0xc0:helper+0xc0; *AT(0x4f8181)=(unsigned char)lock;*AT(0x509a12)=0;*AT(0x4f8210)=0; *(short*)AT(0x4f0588)=-1;F(0x4eefc8)=F(0x4eefd0)=-1; F(0x4f83d4)=100;F(0x4f83c8)=0;F(0x4f8408)=0; *(void**)AT(0x4f7cb0)=*(void**)AT(0x4f8028)=NULL; *(int*)(object+0xc0+0x974)=*(int*)(object+0xc0+0x97c)=-1; *(int*)(object+0x1e08)=-1; object[0xc0+0x13f]=(unsigned char)supported;object[0xc0+0x1d41]=1; GF(0x214)=10;GF(0x218)=20;GF(0x21c)=30;GF(0x220)=1; GF(0x224)=13;GF(0x228)=155;GF(0x22c)=17;GF(0x230)=1; GF(0x274)=-40;GF(0x278)=154;GF(0x27c)=-12;GF(0x280)=1; GF(0x1a8)=rising?100:0;MODE=1;GF(0x614)=11.666668f;object[0xca]=1; unsigned char euler[32];memcpy(euler,object+0x2e4,16);memcpy(euler+16,object+0x334,16); controllers=upward_queries=downward_queries=closed=hidden=0; for(int i=0;i