-#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,
struct drivable_vehicle
{
int alive, inside;
- rb_object obj;
+ rigidbody rb;
v3f wheels[4];
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);