X-Git-Url: https://harrygodden.com/git/?a=blobdiff_plain;f=camera.h;h=314eafe08b65e532239c66c30ae1a6313ef93818;hb=9eb3de757a997becb8406417a4bf613f4cb04900;hp=405f055e216328450bef5a804b342a2be4959c87;hpb=34a8df54eb962f3ad2e036355041f5bc5cabe5a0;p=carveJwlIkooP6JGAAIwe30JlM.git diff --git a/camera.h b/camera.h index 405f055..314eafe 100644 --- a/camera.h +++ b/camera.h @@ -1,7 +1,7 @@ #ifndef CAMERA_H #define CAMERA_H -#include "common.h" +#include "skaterift.h" typedef struct camera camera; @@ -16,8 +16,7 @@ struct camera m4x3f transform, transform_inverse; - struct camera_mtx - { + struct camera_mtx{ m4x4f p, v, pv; @@ -25,7 +24,7 @@ struct camera mtx, mtx_prev; } -VG_STATIC main_camera, gate_camera; +static main_camera, gate_camera; VG_STATIC void camera_lerp_angles( v3f a, v3f b, float t, v3f d ) { @@ -49,7 +48,7 @@ VG_STATIC void camera_lerp( camera *a, camera *b, float t, camera *d ) VG_STATIC void camera_update_transform( camera *cam ) { v4f qyaw, qpitch, qcam; - q_axis_angle( qyaw, (v3f){ 0.0f, 1.0f, 0.0f }, -cam->angles[0] ); + q_axis_angle( qyaw, (v3f){ 0.0f, 1.0f, 0.0f }, -cam->angles[0] ); q_axis_angle( qpitch, (v3f){ 1.0f, 0.0f, 0.0f }, -cam->angles[1] ); q_mul( qyaw, qpitch, qcam );