/* Copied465220 full arithmetic and465830 keyboard input. Synthetic base actor, body properties, wheel support, camera/audio/input; original OMT vector/trig. */ #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],wheel_table[0x220/4]; static unsigned char wheels[4][0x200]; static Vec velocity,acceleration,angular;static float scalar,friction;static int supported,missing_slot; #define GF(g,o) (*(float*)((g)+(o))) static void TC missing(void*self){fprintf(stderr,"MISSING caller=%x self=%x\n",(unsigned)((unsigned char*)__builtin_return_address(0)-mapped+0x400000),(unsigned)self);require(0,"unexpected virtual call");} static int TC zero(void*self){(void)self;return 0;} static int TC enabled(void*self){(void)self;return 1;} static int TC support(void*self){(void)self;return supported;} static int TC wheel_support(void*self){return ((unsigned char*)self)[4];} static float TC speed(void*self){(void)self;return scalar;} static float TC get_friction(void*self){(void)self;return friction;} static void TC set_speed(void*self,float v){(void)self;scalar=v;} 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 void TC set_accel(void*self,float x,float y,float z){(void)self;acceleration=(Vec){x,y,z,0};} static Vec*TC get_angular(void*self,Vec*out){(void)self;*out=angular;return out;} static void TC set_angular(void*self,float x,float y,float z){(void)self;angular=(Vec){x,y,z,0};} static void TC add_angular(void*self,float x,float y,float z){(void)self;angular.x+=x;angular.y+=y;angular.z+=z;} static void TC add_velocity(void*self,float x,float y,float z){(void)self;velocity.x+=x;velocity.y+=y;velocity.z+=z;} static void TC noop_dt(void*self,float dt){(void)self;(void)dt;} static void TC noop(void*self){(void)self;} static void TC mouse(void*self,short*x,short*y){(void)self;*x=*y=0;} static void setup(void){ map_source(); const struct{uint32_t va,target;} reloc[]={/* RELOCATIONS */}; for(unsigned i=0;i