X-Git-Url: https://harrygodden.com/git/?a=blobdiff_plain;f=vehicle.h;h=3e60bb76d6d2b9e7b3cd9a6212da38b39b4982b6;hb=4eccfd7252f8ff165670842df537441afae5458b;hp=74408e438e0f9e43637677b528fe6502f8250a13;hpb=22f62f001f21d1b91fefd9fc495c122d9ddf205a;p=carveJwlIkooP6JGAAIwe30JlM.git diff --git a/vehicle.h b/vehicle.h index 74408e4..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,16 +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 } -}; - -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);