diff --git a/oogabooga/linmath.c b/oogabooga/linmath.c index 5708827..ffe3401 100644 --- a/oogabooga/linmath.c +++ b/oogabooga/linmath.c @@ -197,14 +197,15 @@ inline Matrix4 m4_scale(Matrix4 m, Vector3 scale) { } -Matrix4 m4_make_orthographic_projection(float left, float right, float bottom, float top, float near, float far) { +// _near & _far because microsoft... +Matrix4 m4_make_orthographic_projection(float left, float right, float bottom, float top, float _near, float _far) { Matrix4 m = m4_scalar(1.0f); m.m[0][0] = 2.0f / (right - left); m.m[1][1] = 2.0f / (top - bottom); - m.m[2][2] = -2.0f / (far - near); + m.m[2][2] = -2.0f / (_far - _near); m.m[0][3] = -(right + left) / (right - left); m.m[1][3] = -(top + bottom) / (top - bottom); - m.m[2][3] = -(far + near) / (far - near); + m.m[2][3] = -(_far + _near) / (_far - _near); m.m[3][3] = 1.0f; return m; } diff --git a/oogabooga/oogabooga.c b/oogabooga/oogabooga.c index c9bc411..65670ac 100644 --- a/oogabooga/oogabooga.c +++ b/oogabooga/oogabooga.c @@ -115,6 +115,7 @@ void lodepng_free(void* ptr) { #include "string_format.c" #include "path_utils.c" +#include "linmath.c" #include "os_interface.c" #include "gfx_interface.c" @@ -128,7 +129,6 @@ void lodepng_free(void* ptr) { #include "random.c" -#include "linmath.c" #include "memory.c" #include "input.c" diff --git a/oogabooga/os_interface.c b/oogabooga/os_interface.c index 2ae80e8..8551506 100644 --- a/oogabooga/os_interface.c +++ b/oogabooga/os_interface.c @@ -270,9 +270,7 @@ typedef struct Os_Window { u32 height; u32 x; u32 y; - struct { - float32 r, g, b, a; - } clear_color; + Vector4 clear_color; bool should_close;