/* Copied43915D keyboard scalar suffix and complete437C40 ground apply. Synthetic actor/support/animation, original vector/trig, no game entrypoint. */ #define main unused_grappler_main #include "grappler_scalar_probe.c" #undef main typedef struct{float x,y,z,w;}Vec; static uintptr_t game_table[0x440/4],outer_table[0x180/4]; static Vec velocity,root_position;static unsigned char polygon[64];static int supported,has_polygon; #define OF(o) (*(float*)(object+(o))) static Vec*TC get_velocity(void*self,Vec*out){(void)self;*out=velocity;return out;} static void TC set_velocity(void*self,float x,float y,float z){(void)self;velocity=(Vec){x,y,z,0};} static Vec*TC get_root(void*self,Vec*out){(void)self;*out=root_position;return out;} static Vec*TC point(void*self,Vec*out,float x,float y,float z){ Vec*r=((Vec*(TC*)(void*,Vec*,float,float,float))AT(0x472b10))(self,out,x,y,z);r->x+=root_position.x;r->y+=root_position.y;r->z+=root_position.z;return r; } static float TC friction(void*self){(void)self;return .8f;} static int TC support(void*self){(void)self;return supported;} static void*TC support_polygon(void*self){(void)self;return has_polygon?polygon:NULL;} static void TC destination(void*self,float x,float y,float z){unsigned char*g=self;*(float*)(g+0x274)=x;*(float*)(g+0x278)=y;*(float*)(g+0x27c)=z;} static void TC animate(void*self,void*name){(void)self;(void)name;} static void*input_entry(void){ unsigned char*c=VirtualAlloc(NULL,256,MEM_COMMIT|MEM_RESERVE,PAGE_EXECUTE_READWRITE),*p=c; emit_byte(&p,0x53);emit_byte(&p,0x55);emit_byte(&p,0x56);emit_byte(&p,0x57); emit_byte(&p,0x81);emit_byte(&p,0xec);word(&p,0x90); emit_byte(&p,0xbd);word(&p,(uintptr_t)object); /*ebp complete*/ emit_byte(&p,0x31);emit_byte(&p,0xff); /*edi=0*/ emit_byte(&p,0xba);word(&p,1);emit_byte(&p,0x31);emit_byte(&p,0xf6); /*edx=1,esi=0*/ emit_byte(&p,0xbb);word(&p,(uintptr_t)(object+0x9bc)); const int slots[]={0x14,0x18,0x1c}; for(int i=0;i<3;i++){emit_byte(&p,0xc7);emit_byte(&p,0x44);emit_byte(&p,0x24);emit_byte(&p,slots[i]);word(&p,0);} jump(p,AT(0x43915d));p+=5;unsigned char*end=p; emit_byte(&p,0x81);emit_byte(&p,0xc4);word(&p,0x90);emit_byte(&p,0x5f);emit_byte(&p,0x5e);emit_byte(&p,0x5d);emit_byte(&p,0x5b);emit_byte(&p,0xc3); jump(AT(0x4395cf),end);return c; } static void setup(void){ map_source();const struct{uint32_t at,target;}reloc[]={/* RELOCATIONS */}; for(unsigned i=0;i