From e771d4ccfeec1bc6ebef5509c821354df9f806b6 Mon Sep 17 00:00:00 2001 From: "C. J. Howard" Date: Sat, 12 Sep 2020 09:41:07 -0700 Subject: [PATCH] Remove ant model from UI system --- src/game/systems/camera-system.cpp | 4 ++-- src/game/systems/ui-system.cpp | 9 --------- src/game/systems/ui-system.hpp | 1 - 3 files changed, 2 insertions(+), 12 deletions(-) diff --git a/src/game/systems/camera-system.cpp b/src/game/systems/camera-system.cpp index 3725b25..666a548 100644 --- a/src/game/systems/camera-system.cpp +++ b/src/game/systems/camera-system.cpp @@ -34,8 +34,8 @@ camera_system::camera_system(entt::registry& registry): viewport{0, 0, 0, 0}, mouse_position{0, 0} { - orbit_cam.set_elevation_limits({math::radians(5.0f), math::radians(89.0f)}); - //orbit_cam.set_elevation_limits({math::radians(-89.0f), math::radians(89.0f)}); + //orbit_cam.set_elevation_limits({math::radians(5.0f), math::radians(89.0f)}); + orbit_cam.set_elevation_limits({math::radians(-89.0f), math::radians(89.0f)}); orbit_cam.set_focal_distance_limits({2.0f, 200.0f}); orbit_cam.set_fov_limits({math::radians(80.0f), math::radians(35.0f)}); orbit_cam.set_clip_near_limits({0.1f, 5.0f}); diff --git a/src/game/systems/ui-system.cpp b/src/game/systems/ui-system.cpp index 45d8b75..a216ade 100644 --- a/src/game/systems/ui-system.cpp +++ b/src/game/systems/ui-system.cpp @@ -46,12 +46,6 @@ ui_system::ui_system(::resource_manager* resource_manager): tool_selector_bg.set_translation({0, 0, -4.0f}); tool_selector_bg.set_scale({270, 270, 270}); - // Setup tool selector ant - tool_selector_ant.set_model(resource_manager->load("worker-ant.obj")); - tool_selector_ant.set_scale({350, 350, 350}); - tool_selector_ant.set_rotation(math::angle_axis(math::radians(180.0f), {0, 0, 1}) * math::angle_axis(math::radians(90.0f), {1, 0, 0})); - tool_selector_ant.update_tweens(); - // Setup energy symbol energy_symbol.set_model(resource_manager->load("energy.obj")); energy_symbol.set_scale({30, 30, 30}); @@ -145,7 +139,6 @@ void ui_system::handle_event(const mouse_moved_event& event) tool_selector_bg.set_rotation(math::angle_axis(rotation_angle, {0, 0, 1})); tool_selector_bg.update_tweens(); - tool_selector_ant.set_rotation(math::angle_axis(rotation_angle + math::radians(180.0f), {0, 0, 1}) * math::angle_axis(math::radians(90.0f), {1, 0, 0})); } } @@ -178,7 +171,6 @@ void ui_system::open_tool_menu() { scene->add_object(&modal_bg); scene->add_object(&tool_selector_bg); - scene->add_object(&tool_selector_ant); } tool_selection_vector = {0, 0}; } @@ -189,7 +181,6 @@ void ui_system::close_tool_menu() { scene->remove_object(&modal_bg); scene->remove_object(&tool_selector_bg); - scene->remove_object(&tool_selector_ant); } } diff --git a/src/game/systems/ui-system.hpp b/src/game/systems/ui-system.hpp index 3f9e4bd..a7f151b 100644 --- a/src/game/systems/ui-system.hpp +++ b/src/game/systems/ui-system.hpp @@ -68,7 +68,6 @@ private: camera* camera; ambient_light indirect_light; directional_light direct_light; - model_instance tool_selector_ant; billboard tool_selector_bg; material modal_bg_material; billboard modal_bg;