Technically rendering everything.

This commit is contained in:
2025-08-17 14:34:51 -05:00
parent 91b93b5b1e
commit 6d6a0e4886
8 changed files with 164 additions and 12 deletions

View File

@@ -8,6 +8,8 @@
#include "camera.h"
#include "display/render.h"
#include "world/overworld.h"
void cameraUIPush(void) {
glPushMatrix();
glLoadIdentity();
@@ -48,4 +50,25 @@ void cameraScreenPush(void) {
void cameraScreenPop(void) {
glPopMatrix();
}
void cameraOverworldPush(void) {
glPushMatrix();
glLoadIdentity();
glViewport(0, 0, RENDER_WIDTH, RENDER_HEIGHT);
glOrtho(
0.0f, (float_t)RENDER_WIDTH,
(float_t)RENDER_HEIGHT, 0.0f,
-1.0f, 1.0f
);
glTranslatef(
-((float_t)OVERWORLD_CAMERA_X) + ((float_t)RENDER_WIDTH / 2.0f),
-((float_t)OVERWORLD_CAMERA_Y) + ((float_t)RENDER_HEIGHT / 2.0f),
0.0f
);
}
void cameraOverworldPop(void) {
glPopMatrix();
}