Gave up on editor
This commit is contained in:
@@ -16,7 +16,7 @@ void cameraInit(camera_t *camera) {
|
||||
camera->projType = CAMERA_PROJECTION_TYPE_PERSPECTIVE;
|
||||
camera->perspective.fov = glm_rad(45.0f);
|
||||
camera->nearClip = 0.1f;
|
||||
camera->farClip = 1000.0f;
|
||||
camera->farClip = 100.0f;
|
||||
|
||||
camera->viewType = CAMERA_VIEW_TYPE_LOOKAT;
|
||||
glm_vec3_copy((vec3){ 5.0f, 5.0f, 5.0f }, camera->lookat.position);
|
||||
|
@@ -79,14 +79,31 @@ errorret_t displayUpdate(void) {
|
||||
SDL_Event event;
|
||||
while(SDL_PollEvent(&event)) {
|
||||
switch(event.type) {
|
||||
case SDL_QUIT:
|
||||
case SDL_QUIT: {
|
||||
consoleExec("quit");
|
||||
break;
|
||||
}
|
||||
|
||||
default:
|
||||
case SDL_WINDOWEVENT: {
|
||||
switch(event.window.event) {
|
||||
case SDL_WINDOWEVENT_CLOSE: {
|
||||
consoleExec("quit");
|
||||
break;
|
||||
}
|
||||
|
||||
default: {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
default: {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
SDL_GL_MakeCurrent(DISPLAY.window, DISPLAY.glContext);
|
||||
#endif
|
||||
|
||||
spriteBatchClear();
|
||||
|
@@ -28,10 +28,7 @@ void quadInit();
|
||||
* @param minY The minimum Y coordinate of the quad.
|
||||
* @param maxX The maximum X coordinate of the quad.
|
||||
* @param maxY The maximum Y coordinate of the quad.
|
||||
* @param r The red color component (0-255).
|
||||
* @param g The green color component (0-255).
|
||||
* @param b The blue color component (0-255).
|
||||
* @param a The alpha color component (0-255).
|
||||
* @param color The color of the quad.
|
||||
* @param u0 The U texture coordinate for the first vertex.
|
||||
* @param v0 The V texture coordinate for the first vertex.
|
||||
* @param u1 The U texture coordinate for the second vertex.
|
||||
|
@@ -24,6 +24,7 @@ errorret_t sceneOverworldInit(void) {
|
||||
cameraInit(&SCENE_OVERWORLD.camera);
|
||||
glm_vec3_copy((vec3){ 0.0f, 1.0f, 0.0f }, SCENE_OVERWORLD.camera.lookat.up);
|
||||
SCENE_OVERWORLD.camera.perspective.fov = 45;
|
||||
SCENE_OVERWORLD.camera.farClip = 10000.0f;
|
||||
|
||||
scene_t *scene = &SCENE_MANAGER_SCENES[SCENE_TYPE_OVERWORLD];
|
||||
scene->flags |= SCENE_FLAG_ACTIVE | SCENE_FLAG_VISIBLE;
|
||||
|
Reference in New Issue
Block a user