X-Git-Url: https://harrygodden.com/git/?a=blobdiff_plain;f=vehicle.h;h=d61d1e3adf25117eed0938c69cb99aae94307ab1;hb=refs%2Fheads%2Frigidbody;hp=b1f5a2855565332c03e167b93bafe1c03a8b6e11;hpb=342fcbf6fda017bdd38d56ce0fa7c9e59e589f3b;p=carveJwlIkooP6JGAAIwe30JlM.git diff --git a/vehicle.h b/vehicle.h index b1f5a28..d61d1e3 100644 --- a/vehicle.h +++ b/vehicle.h @@ -2,12 +2,12 @@ #define VEHICLE_H #include "skaterift.h" -#include "rigidbody.h" +#include "vg/vg_rigidbody.h" #include "player.h" #include "world.h" #include "world_physics.h" -VG_STATIC float k_car_spring = 1.0f, +static float k_car_spring = 1.0f, k_car_spring_damp = 0.001f, k_car_spring_length = 0.5f, k_car_wheel_radius = 0.2f, @@ -21,7 +21,7 @@ typedef struct drivable_vehicle drivable_vehicle; struct drivable_vehicle { int alive, inside; - rb_object obj; + rigidbody rb; v3f wheels[4]; @@ -37,14 +37,14 @@ struct drivable_vehicle } static gzoomer = { - .obj = { .type = k_rb_shape_sphere, .inf.sphere.radius = 1.0f } + .rb.co = {-2000,-2000,-2000} }; -VG_STATIC int spawn_car( int argc, const char *argv[] ); -VG_STATIC void vehicle_init(void); -VG_STATIC void vehicle_wheel_force( int index ); -VG_STATIC void vehicle_solve_friction(void); -VG_STATIC void vehicle_update_fixed(void); -VG_STATIC void vehicle_update_post(void); +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 */