implement game configuration file

this integrates https://github.com/cktan/tomlc99 into the repo as a dependency
This commit is contained in:
2024-09-30 21:13:58 -03:00
committed by veclavtalica
parent ec15d8ec4b
commit 57fe5e8946
165 changed files with 4797 additions and 92 deletions

View File

@ -1,5 +1,6 @@
#include "twn_camera.h"
#include "twn_config.h"
#include "twn_engine_context_c.h"
#include <math.h>
@ -37,7 +38,7 @@ Matrix4 camera_perspective(const Camera *const camera) {
/* from cglm */
Matrix4 result = {0};
const float aspect = RENDER_BASE_RATIO;
const float aspect = (float)(ctx.base_render_width / ctx.base_render_height);
const float f = 1.0f / tanf(camera->fov * 0.5f);
const float fn = 1.0f / (CAMERA_NEAR_Z - CAMERA_FAR_Z);