update platform layer (raylib)
parent
839fad077d
commit
66a058674d
|
@ -136,9 +136,6 @@ void platform_input_update_input_frame(game_keystate_data data) {
|
||||||
|
|
||||||
void platform_input() {
|
void platform_input() {
|
||||||
float mouse_z = (GetMouseWheelMove()*0.5f);
|
float mouse_z = (GetMouseWheelMove()*0.5f);
|
||||||
#if defined(PLATFORM_WEB)
|
|
||||||
mouse_z *= 30.0f;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
if (mouse_z != 0.0f) {
|
if (mouse_z != 0.0f) {
|
||||||
target_zoom = zpl_clamp(target_zoom+mouse_z, 0.1f, 10.0f);
|
target_zoom = zpl_clamp(target_zoom+mouse_z, 0.1f, 10.0f);
|
||||||
|
|
|
@ -7,7 +7,6 @@ float zpl_lerp(float,float,float);
|
||||||
float zpl_to_degrees(float);
|
float zpl_to_degrees(float);
|
||||||
|
|
||||||
void DEBUG_draw_ground_3d(uint64_t key, entity_view * data) {
|
void DEBUG_draw_ground_3d(uint64_t key, entity_view * data) {
|
||||||
(void)key;
|
|
||||||
switch (data->kind) {
|
switch (data->kind) {
|
||||||
case EKIND_CHUNK: {
|
case EKIND_CHUNK: {
|
||||||
world_view *view = game_world_view_get_active();
|
world_view *view = game_world_view_get_active();
|
||||||
|
@ -145,7 +144,7 @@ void renderer_debug_draw_3d(void) {
|
||||||
}
|
}
|
||||||
|
|
||||||
float renderer_zoom_get_3d(void) {
|
float renderer_zoom_get_3d(void) {
|
||||||
return 1.0f;
|
return cam_zoom;
|
||||||
}
|
}
|
||||||
|
|
||||||
void renderer_draw_single_3d(float x, float y, asset_id id, Color color) {
|
void renderer_draw_single_3d(float x, float y, asset_id id, Color color) {
|
||||||
|
|
|
@ -83,7 +83,7 @@ void world_view_init(world_view *view, uint32_t seed, uint64_t ent_id, uint16_t
|
||||||
|
|
||||||
librg_config_chunksize_set(view->tracker, WORLD_BLOCK_SIZE * chunk_size, WORLD_BLOCK_SIZE * chunk_size, 1);
|
librg_config_chunksize_set(view->tracker, WORLD_BLOCK_SIZE * chunk_size, WORLD_BLOCK_SIZE * chunk_size, 1);
|
||||||
librg_config_chunkamount_set(view->tracker, chunk_amount, chunk_amount, 1);
|
librg_config_chunkamount_set(view->tracker, chunk_amount, chunk_amount, 1);
|
||||||
librg_config_chunkoffset_set(view->tracker, LIBRG_OFFSET_BEG, LIBRG_OFFSET_BEG, 0);
|
librg_config_chunkoffset_set(view->tracker, LIBRG_OFFSET_BEG, LIBRG_OFFSET_BEG, LIBRG_OFFSET_BEG);
|
||||||
|
|
||||||
librg_event_set(view->tracker, LIBRG_READ_CREATE, tracker_read_create);
|
librg_event_set(view->tracker, LIBRG_READ_CREATE, tracker_read_create);
|
||||||
librg_event_set(view->tracker, LIBRG_READ_REMOVE, tracker_read_remove);
|
librg_event_set(view->tracker, LIBRG_READ_REMOVE, tracker_read_remove);
|
||||||
|
|
Loading…
Reference in New Issue