camera zoom
parent
2ddf1e48fd
commit
1b06c13f5e
|
@ -132,7 +132,7 @@ uint8_t game_is_running() {
|
|||
}
|
||||
|
||||
void game_input() {
|
||||
|
||||
platform_input();
|
||||
}
|
||||
|
||||
void game_update() {
|
||||
|
|
|
@ -28,6 +28,14 @@ uint8_t platform_is_running() {
|
|||
return !WindowShouldClose();
|
||||
}
|
||||
|
||||
void platform_input() {
|
||||
float mouse_z = GetMouseWheelMove();
|
||||
|
||||
if (mouse_z != 0.0f) {
|
||||
render_camera.zoom = zpl_clamp(render_camera.zoom+mouse_z*0.04f, 0.01f, 1.0f);
|
||||
}
|
||||
}
|
||||
|
||||
void display_conn_status();
|
||||
|
||||
void DEBUG_draw_entities(uint64_t key, entity_view data);
|
||||
|
|
|
@ -14,6 +14,10 @@ void platform_shutdown() {
|
|||
is_running = 0;
|
||||
}
|
||||
|
||||
void platform_input() {
|
||||
|
||||
}
|
||||
|
||||
uint8_t platform_is_running() {
|
||||
return is_running;
|
||||
}
|
||||
|
|
|
@ -5,4 +5,5 @@ void platform_init();
|
|||
void platform_shutdown();
|
||||
uint8_t platform_is_running();
|
||||
|
||||
void platform_input();
|
||||
void platform_render();
|
||||
|
|
Loading…
Reference in New Issue