X-Git-Url: https://harrygodden.com/git/?a=blobdiff_plain;f=vehicle.h;h=3e60bb76d6d2b9e7b3cd9a6212da38b39b4982b6;hb=4eccfd7252f8ff165670842df537441afae5458b;hp=b1f5a2855565332c03e167b93bafe1c03a8b6e11;hpb=342fcbf6fda017bdd38d56ce0fa7c9e59e589f3b;p=carveJwlIkooP6JGAAIwe30JlM.git diff --git a/vehicle.h b/vehicle.h index b1f5a28..3e60bb7 100644 --- a/vehicle.h +++ b/vehicle.h @@ -1,13 +1,10 @@ -#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" -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 +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 } -}; - -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); - -#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);