X-Git-Url: https://harrygodden.com/git/?a=blobdiff_plain;f=vehicle.h;h=3e60bb76d6d2b9e7b3cd9a6212da38b39b4982b6;hb=refs%2Fheads%2Fmenu2;hp=bdd12f02329cfe6169912ccb9fe89e3bb5a53de0;hpb=2c91a71533b4ce86b9e7fd708420ae05c74d8f52;p=carveJwlIkooP6JGAAIwe30JlM.git diff --git a/vehicle.h b/vehicle.h index bdd12f0..3e60bb7 100644 --- a/vehicle.h +++ b/vehicle.h @@ -1,8 +1,5 @@ -#ifndef VEHICLE_H -#define VEHICLE_H - -#include "skaterift.h" -#include "rigidbody.h" +#pragma once +#include "vg/vg_rigidbody.h" #include "player.h" #include "world.h" #include "world_physics.h" @@ -21,7 +18,7 @@ typedef struct drivable_vehicle drivable_vehicle; struct drivable_vehicle { int alive, inside; - rb_object obj; + rigidbody rb; v3f wheels[4]; @@ -35,17 +32,11 @@ struct drivable_vehicle v3f tangent_vectors[4][2]; v3f wheels_local[4]; } -static gzoomer = -{ - .obj = { .type = k_rb_shape_sphere, .inf.sphere.radius = 1.0f, - .rb.co = {-2000,-2000,-2000}} -}; - -static int spawn_car( int argc, const char *argv[] ); -static void vehicle_init(void); -static void vehicle_wheel_force( int index ); -static void vehicle_solve_friction(void); -static void vehicle_update_fixed(void); -static void vehicle_update_post(void); - -#endif /* VEHICLE_H */ +extern gzoomer; + +int spawn_car( int argc, const char *argv[] ); +void vehicle_init(void); +void vehicle_wheel_force( int index ); +void vehicle_solve_friction(void); +void vehicle_update_fixed(void); +void vehicle_update_post(void);