diff --git a/README.md b/README.md index 034f764..8af385f 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,13 @@ A work in progress game engine written in C++ using OpenGL and [entt](https://github.com/skypjack/entt). ![A screenshot](screenshot.png) + +## Controls +| Button | Action | +| ------------ | -------------------------- | +| W, A, S, D | Horizontal Camera Movement | +| Left Shift | Camera Down | +| Space | Camera Up | +| Left Alt | Accelerate | +| Left Control | Catch Mouse | +| Escape | Quit | diff --git a/src/bin/controller.cpp b/src/bin/controller.cpp index c89ea77..1453e82 100644 --- a/src/bin/controller.cpp +++ b/src/bin/controller.cpp @@ -9,7 +9,8 @@ using namespace entt::literals; Controller::Controller() { - std::filesystem::path document_path("WaterBottle/glTF-Binary/WaterBottle.glb"); + std::filesystem::path document_path("ABeautifulGame.glb"); + // std::filesystem::path document_path("WaterBottle/glTF-Binary/WaterBottle.glb"); entt::hashed_string document_hash(document_path.string().c_str()); entt::resource gltf_document = diff --git a/src/window/window.cpp b/src/window/window.cpp index 7c5ef2a..be1b13a 100644 --- a/src/window/window.cpp +++ b/src/window/window.cpp @@ -107,17 +107,7 @@ auto Window::physical_dimensions() const -> glm::u32vec2 void Window::mouse_catching(entt::registry& registry) const { - if (!registry.ctx().contains()) { - bool catched = true; - -#ifndef NDEBUG - catched = false; -#endif - - registry.ctx().emplace(MouseCatched{.catched = catched}); - } - - auto& mouse_catched = registry.ctx().get(); + auto& mouse_catched = registry.ctx().emplace(MouseCatched{.catched = false}); auto const& key_state = registry.ctx().get>(); if (key_state.just_pressed(Input::KeyCode{GLFW_KEY_LEFT_CONTROL})) {