Skip to content
Snippets Groups Projects
Commit 2f734440 authored by Joseph Walton-Rivers's avatar Joseph Walton-Rivers
Browse files

minor code tidying

parent 3f5359f4
No related branches found
No related tags found
No related merge requests found
Pipeline #3095 failed
...@@ -49,11 +49,9 @@ enum camera_type { cam_free, cam_arcball }; ...@@ -49,11 +49,9 @@ enum camera_type { cam_free, cam_arcball };
camera_type cam_mode = cam_free; camera_type cam_mode = cam_free;
//TODO proper input system //TODO proper input system
using namespace fggl::input;
using InputManager = std::shared_ptr<fggl::input::Input>; using InputManager = std::shared_ptr<fggl::input::Input>;
void process_camera(fggl::ecs3::World& ecs, const InputManager& input) {
void process_camera(fggl::ecs3::World& ecs, InputManager input) {
auto cameras = ecs.findMatching<fggl::gfx::Camera>(); auto cameras = ecs.findMatching<fggl::gfx::Camera>();
fggl::ecs3::entity_t cam = cameras[0]; fggl::ecs3::entity_t cam = cameras[0];
...@@ -148,7 +146,7 @@ public: ...@@ -148,7 +146,7 @@ public:
fggl::data::Mesh mesh; fggl::data::Mesh mesh;
for (int j=-(nSections/2); j<=nSections/2; j++) { for (int j=-(nSections/2); j<=nSections/2; j++) {
const auto shapeOffset = glm::vec3( 0.0f, 0.0f, j * 1.0f ); const auto shapeOffset = glm::vec3( 0.0f, 0.0f, (float)j * 1.0f );
const auto cubeMat = glm::translate( fggl::math::mat4( 1.0f ) , shapeOffset ); const auto cubeMat = glm::translate( fggl::math::mat4( 1.0f ) , shapeOffset );
const auto leftSlope = fggl::math::modelMatrix( const auto leftSlope = fggl::math::modelMatrix(
...@@ -172,7 +170,7 @@ public: ...@@ -172,7 +170,7 @@ public:
for ( int i=0; i<nCubes; i++ ) { for ( int i=0; i<nCubes; i++ ) {
auto bunkerClone = m_world.copy(bunker); auto bunkerClone = m_world.copy(bunker);
auto result = m_world.get<fggl::math::Transform>(bunkerClone); auto result = m_world.get<fggl::math::Transform>(bunkerClone);
result->origin( glm::vec3( i * 5.0f, 0.0f, 0.0f) ); result->origin( glm::vec3( (float)i * 5.0f, 0.0f, 0.0f) );
} }
} }
...@@ -191,11 +189,11 @@ public: ...@@ -191,11 +189,11 @@ public:
} }
void render() override { void render() override {
debugInspector();
} }
// entity inspector // entity inspector
void debugInspector(bool* visible) { void debugInspector() {
auto types = m_world.types(); auto types = m_world.types();
ImGui::Begin("Entities"); ImGui::Begin("Entities");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment