About to refator tools... again
This commit is contained in:
@@ -16,15 +16,7 @@ camera_t SCENE_OVERWORLD_CAMERA;
|
||||
|
||||
void sceneOverworldInit(void) {
|
||||
cameraInit(&SCENE_OVERWORLD_CAMERA);
|
||||
SCENE_OVERWORLD_CAMERA.type = CAMERA_TYPE_ORTHOGRAPHIC;
|
||||
SCENE_OVERWORLD_CAMERA.orthographic.left = 0.0f;
|
||||
SCENE_OVERWORLD_CAMERA.orthographic.right = frameBufferGetWidth(FRAMEBUFFER_BOUND);
|
||||
SCENE_OVERWORLD_CAMERA.orthographic.top = 0.0f;
|
||||
SCENE_OVERWORLD_CAMERA.orthographic.bottom = frameBufferGetHeight(FRAMEBUFFER_BOUND);
|
||||
SCENE_OVERWORLD_CAMERA.nearClip = -1.0f;
|
||||
SCENE_OVERWORLD_CAMERA.farClip = 100.0f;
|
||||
|
||||
glm_mat4_identity(SCENE_OVERWORLD_CAMERA.transform);
|
||||
glm_vec3_copy((vec3){32.0f, 32.0f, 32.0f}, SCENE_OVERWORLD_CAMERA.lookat.position);
|
||||
|
||||
scene_t *scene = &SCENE_MANAGER_SCENES[SCENE_TYPE_OVERWORLD];
|
||||
scene->flags |= SCENE_FLAG_ACTIVE | SCENE_FLAG_VISIBLE;
|
||||
@@ -34,17 +26,17 @@ void sceneOverworldUpdate(void) {
|
||||
}
|
||||
|
||||
void sceneOverworldRender(void) {
|
||||
frameBufferClear(
|
||||
FRAMEBUFFER_CLEAR_COLOR | FRAMEBUFFER_CLEAR_DEPTH,
|
||||
COLOR_CORNFLOWER_BLUE
|
||||
);
|
||||
|
||||
cameraPushMatrix(&SCENE_OVERWORLD_CAMERA);
|
||||
meshDraw(&QUAD_MESH_SIMPLE, -1, -1);
|
||||
|
||||
// Draw base layer
|
||||
|
||||
// Draw entities
|
||||
|
||||
// Draw overlay layer.
|
||||
|
||||
spriteBatchPush(
|
||||
NULL,
|
||||
0.0f, 0.0f, 32.0f, 32.0f,
|
||||
0.0f, 0.0f, 12.0f, 12.0f,
|
||||
0xFF, 0x00, 0x00, 0xFF,
|
||||
0.0f, 0.0f, 1.0f, 1.0f
|
||||
);
|
||||
|
Reference in New Issue
Block a user