From 581d138dea3887c251f11f030e63322c74cb58ac Mon Sep 17 00:00:00 2001
From: Joseph Walton-Rivers <joseph@walton-rivers.uk>
Date: Wed, 21 Jun 2023 06:53:04 +0100
Subject: [PATCH] fix linting errors

---
 demo/demo/grid.cpp                            |  6 +--
 demo/demo/models/viewer.cpp                   |  6 +--
 demo/demo/rollball.cpp                        |  2 +-
 demo/demo/topdown.cpp                         |  2 +-
 fggl/audio/openal/audio.cpp                   |  2 +-
 fggl/data/assimp/module.cpp                   |  3 +-
 fggl/debug/imgui/include/imgui_impl_glfw.h    |  6 +--
 fggl/debug/imgui/include/imgui_impl_opengl3.h |  2 +-
 fggl/entity/loader/loader.cpp                 |  4 +-
 fggl/entity/module.cpp                        |  2 +-
 fggl/gfx/ogl/renderer.cpp                     |  3 +-
 fggl/gfx/ogl4/canvas.cpp                      |  6 +--
 fggl/gfx/ogl4/module.cpp                      | 49 ++++++++++---------
 fggl/grid/hexagon.cpp                         |  2 +-
 fggl/gui/renderer/renderer.cpp                |  4 +-
 fggl/platform/linux/paths.cpp                 | 44 +++++++++--------
 fggl/scenes/game.cpp                          |  4 +-
 fggl/scenes/menu.cpp                          | 12 +++--
 include/fggl/app.hpp                          |  6 +--
 include/fggl/util/states.hpp                  |  2 +-
 20 files changed, 87 insertions(+), 80 deletions(-)

diff --git a/demo/demo/grid.cpp b/demo/demo/grid.cpp
index 2897bb8..3af2469 100644
--- a/demo/demo/grid.cpp
+++ b/demo/demo/grid.cpp
@@ -97,8 +97,8 @@ namespace demo {
 		auto& manager = area->entities();
 		{
 			player = manager.create();
-			auto& cellPos = manager.add<CellPos>(player);
-			auto& robotState = manager.add<RobotState>(player);
+			manager.add<CellPos>(player);
+			manager.add<RobotState>(player);
 		}
 
 		return player;
@@ -126,7 +126,7 @@ namespace demo {
 			fggl::math::vec2i size{32, 32};
 			auto btn = std::make_unique<fggl::gui::Button>(pos, size);
 			btn->label(action.name);
-			btn->addCallback([=](){
+			btn->addCallback([=, this](){
 				this->m_program.m_instructions.push_back({action.name, action.callback});
 			});
 			btnGrid->add(std::move(btn));
diff --git a/demo/demo/models/viewer.cpp b/demo/demo/models/viewer.cpp
index 5c1f15a..6f365f3 100644
--- a/demo/demo/models/viewer.cpp
+++ b/demo/demo/models/viewer.cpp
@@ -46,7 +46,7 @@ namespace demo {
 			mesh.pipeline = "redbook/debug";
 		}
 
-		auto& material = manager.add<fggl::gfx::PhongMaterial>(model);
+		manager.add<fggl::gfx::PhongMaterial>(model);
 
 		return model;
 	}
@@ -93,7 +93,7 @@ namespace demo {
 
 	static void setup_lighting(fggl::entity::EntityManager& ecs) {
 		auto light = ecs.create();
-		auto& transform = ecs.add<fggl::math::Transform>(light);
+		ecs.add<fggl::math::Transform>(light);
 
 		auto& lightComp = ecs.add<fggl::gfx::DirectionalLight>(light);
 		lightComp.position = fggl::math::vec3( 10.0F, 5.0F, 0.0F );
@@ -149,7 +149,7 @@ namespace demo {
 		}
 	}
 
-	void Viewer::cycleAsset(uint64_t idx) {
+	void Viewer::cycleAsset(uint64_t /*idx*/) {
 		auto *loader = owner().service<fggl::assets::Loader>();
 		auto *manager = owner().service<fggl::assets::AssetManager>();
 
diff --git a/demo/demo/rollball.cpp b/demo/demo/rollball.cpp
index 4242194..0b5200a 100644
--- a/demo/demo/rollball.cpp
+++ b/demo/demo/rollball.cpp
@@ -48,7 +48,7 @@ static void setup_camera(fggl::entity::EntityManager& world) {
 	world.add<fggl::gfx::Camera>(prototype);
 }
 
-static fggl::entity::EntityID setup_environment(fggl::entity::EntityManager& world, fggl::entity::EntityFactory* factory, const fggl::math::vec2& size, demo::RollState& state) {
+static fggl::entity::EntityID setup_environment(fggl::entity::EntityManager& world, fggl::entity::EntityFactory* /*factory*/, const fggl::math::vec2& /*size*/, demo::RollState& state) {
 	// ensure the state is clean
 	state.closestPickup = fggl::entity::INVALID;
 	state.mode = demo::DebugMode::NORMAL;
diff --git a/demo/demo/topdown.cpp b/demo/demo/topdown.cpp
index 8069a3c..7d7a197 100644
--- a/demo/demo/topdown.cpp
+++ b/demo/demo/topdown.cpp
@@ -54,7 +54,7 @@ namespace demo {
 
 	static void setup_lighting(fggl::entity::EntityManager& ecs) {
 		auto light = ecs.create();
-		auto& transform = ecs.add<fggl::math::Transform>(light);
+		ecs.add<fggl::math::Transform>(light);
 
 		auto& lightComp = ecs.add<fggl::gfx::DirectionalLight>(light);
 		lightComp.position = fggl::math::vec3( 10.0F, 5.0F, 0.0F );
diff --git a/fggl/audio/openal/audio.cpp b/fggl/audio/openal/audio.cpp
index d118f01..8a14cdf 100644
--- a/fggl/audio/openal/audio.cpp
+++ b/fggl/audio/openal/audio.cpp
@@ -51,7 +51,7 @@ namespace fggl::audio::openal {
 		return nullptr;
 	}
 
-	auto load_vorbis_short(std::filesystem::path path, assets::MemoryBlock& block) -> bool {
+	auto load_vorbis_short(std::filesystem::path path, assets::MemoryBlock& /*block*/) -> bool {
 		// vorbis
 		auto* clip = new AudioClipShort();
 		clip->sampleCount = stb_vorbis_decode_filename( path.c_str(), &clip->channels, &clip->sampleRate, &clip->data);
diff --git a/fggl/data/assimp/module.cpp b/fggl/data/assimp/module.cpp
index 453edfb..64d1050 100644
--- a/fggl/data/assimp/module.cpp
+++ b/fggl/data/assimp/module.cpp
@@ -17,7 +17,6 @@
 //
 
 #include "fggl/data/assimp/module.hpp"
-#include "fggl/data/model.hpp"
 #include "fggl/debug/logging.hpp"
 #include "fggl/assets/manager.hpp"
 #include "fggl/mesh/mesh.hpp"
@@ -212,7 +211,7 @@ namespace fggl::data::models {
 		return nullptr;
 	}
 
-	auto load_assimp_texture(assets::Loader* loader, const assets::AssetID& guid, const assets::LoaderContext& data, void* userPtr) -> assets::AssetRefRaw {
+	auto load_assimp_texture(assets::Loader* /*loader*/, const assets::AssetID& guid, const assets::LoaderContext& data, void* userPtr) -> assets::AssetRefRaw {
 		auto* manager = (assets::AssetManager*)userPtr;
 
 		if ( manager->has(guid) ) {
diff --git a/fggl/debug/imgui/include/imgui_impl_glfw.h b/fggl/debug/imgui/include/imgui_impl_glfw.h
index 470148b..b85db29 100644
--- a/fggl/debug/imgui/include/imgui_impl_glfw.h
+++ b/fggl/debug/imgui/include/imgui_impl_glfw.h
@@ -21,9 +21,9 @@
 
 struct GLFWwindow;
 
-IMGUI_IMPL_API auto ImGui_ImplGlfw_InitForOpenGL(GLFWwindow *window, bool install_callbacks) -> bool;
-IMGUI_IMPL_API auto ImGui_ImplGlfw_InitForVulkan(GLFWwindow *window, bool install_callbacks) -> bool;
-IMGUI_IMPL_API auto ImGui_ImplGlfw_InitForOther(GLFWwindow *window, bool install_callbacks) -> bool;
+IMGUI_IMPL_API auto ImGui_ImplGlfw_InitForOpenGL(GLFWwindow *window, bool installCallbacks) -> bool;
+IMGUI_IMPL_API auto ImGui_ImplGlfw_InitForVulkan(GLFWwindow *window, bool installCallbacks) -> bool;
+IMGUI_IMPL_API auto ImGui_ImplGlfw_InitForOther(GLFWwindow *window, bool installCallbacks) -> bool;
 IMGUI_IMPL_API void ImGui_ImplGlfw_Shutdown();
 IMGUI_IMPL_API void ImGui_ImplGlfw_NewFrame();
 
diff --git a/fggl/debug/imgui/include/imgui_impl_opengl3.h b/fggl/debug/imgui/include/imgui_impl_opengl3.h
index 1ada73d..9879ded 100644
--- a/fggl/debug/imgui/include/imgui_impl_opengl3.h
+++ b/fggl/debug/imgui/include/imgui_impl_opengl3.h
@@ -25,7 +25,7 @@
 #include "imgui.h"      // IMGUI_IMPL_API
 
 // Backend API
-IMGUI_IMPL_API auto ImGui_ImplOpenGL3_Init(const char *glsl_version = NULL) -> bool;
+IMGUI_IMPL_API auto ImGui_ImplOpenGL3_Init(const char *glsl_version = nullptr) -> bool;
 IMGUI_IMPL_API void ImGui_ImplOpenGL3_Shutdown();
 IMGUI_IMPL_API void ImGui_ImplOpenGL3_NewFrame();
 IMGUI_IMPL_API void ImGui_ImplOpenGL3_RenderDrawData(ImDrawData *draw_data);
diff --git a/fggl/entity/loader/loader.cpp b/fggl/entity/loader/loader.cpp
index f75f363..90e22b5 100644
--- a/fggl/entity/loader/loader.cpp
+++ b/fggl/entity/loader/loader.cpp
@@ -22,7 +22,7 @@
 
 namespace fggl::entity {
 
-	auto load_scene(assets::Loader* loader, const assets::AssetID& asset, const assets::LoaderContext& data, void* ptr) -> assets::AssetRefRaw {
+	auto load_scene(assets::Loader* /*loader*/, const assets::AssetID& /*asset*/, const assets::LoaderContext& data, void* ptr) -> assets::AssetRefRaw {
 		auto* gamePtr = (scenes::Game*)ptr;
 		auto filePath = data.assetPath;
 
@@ -77,7 +77,7 @@ namespace fggl::entity {
 		return nullptr;
 	}
 
-	auto load_prototype(assets::Loader* loader, const assets::AssetID &guid, const assets::LoaderContext& data, EntityFactory* factory) -> assets::AssetRefRaw {
+	auto load_prototype(assets::Loader* /*loader*/, const assets::AssetID &/*guid*/, const assets::LoaderContext& data, EntityFactory* factory) -> assets::AssetRefRaw {
 		auto filePath = data.assetPath;
 
 		// We need to process the prototypes, and load them into the asset system.
diff --git a/fggl/entity/module.cpp b/fggl/entity/module.cpp
index 1168872..d967b72 100644
--- a/fggl/entity/module.cpp
+++ b/fggl/entity/module.cpp
@@ -45,7 +45,7 @@ namespace fggl::entity {
 		return assets::INVALID_ASSET_TYPE;
 	}
 
-	auto get_scene_deps(const std::string& packName, std::filesystem::path packRoot, assets::ResourceRecord& rr) -> bool {
+	auto get_scene_deps(const std::string& /*packName*/, std::filesystem::path /*packRoot*/, assets::ResourceRecord& rr) -> bool {
 
 		auto nodes = YAML::LoadAllFromFile( rr.m_path );
 		for ( auto& node : nodes ) {
diff --git a/fggl/gfx/ogl/renderer.cpp b/fggl/gfx/ogl/renderer.cpp
index ea6e7a2..600f146 100644
--- a/fggl/gfx/ogl/renderer.cpp
+++ b/fggl/gfx/ogl/renderer.cpp
@@ -27,7 +27,6 @@
 #include <glm/ext/matrix_clip_space.hpp>
 #include <glm/ext/matrix_transform.hpp>
 #include <glm/glm.hpp>
-#include <glm/gtc/type_ptr.hpp>
 
 #include <memory>
 
@@ -141,7 +140,7 @@ namespace fggl::gfx {
 		cache->load(ShaderConfig::named("debug"));
 	}
 
-	static void splat_checkerboard(GLuint* memory, int width = 128, int height = 128) {
+	static void splat_checkerboard(GLuint* memory, unsigned int width = 128, unsigned int height = 128) {
 		int counter = 0;
 		auto colour = ogl4::TEX_CHECKER;
 
diff --git a/fggl/gfx/ogl4/canvas.cpp b/fggl/gfx/ogl4/canvas.cpp
index 21b733f..a0a5828 100644
--- a/fggl/gfx/ogl4/canvas.cpp
+++ b/fggl/gfx/ogl4/canvas.cpp
@@ -159,7 +159,7 @@ namespace fggl::gfx::ogl4 {
 			return;
 		}
 
-		// setup the shader
+		// set up the shader
 		shader.use();
 		auto projMat = glm::ortho(0.0F, 1920.0F, 1080.0F, 0.F);
 		shader.setUniformMtx(shader.uniform("projection"), projMat);
@@ -167,7 +167,7 @@ namespace fggl::gfx::ogl4 {
 		// bind the vbo we'll use for writing
 		m_vao.bind();
 
-		// setup the openGL state we expect for rendering
+		// set up the openGL state we expect for rendering
 		glDisable(GL_DEPTH_TEST);
 		glDisable(GL_CULL_FACE);
 
@@ -179,7 +179,7 @@ namespace fggl::gfx::ogl4 {
 			const auto label = textCmd.text;
 			math::vec2 penPos(textCmd.pos);
 
-			// setup a non-owning holder for the characters
+			// set up a non-owning holder for the characters
 			data::Texture2D tex;
 			tex.channels = 1;
 
diff --git a/fggl/gfx/ogl4/module.cpp b/fggl/gfx/ogl4/module.cpp
index 14974f1..2a912e9 100644
--- a/fggl/gfx/ogl4/module.cpp
+++ b/fggl/gfx/ogl4/module.cpp
@@ -31,29 +31,32 @@ namespace fggl::gfx {
 	constexpr const char *SHAPE_SPHERE{"sphere"};
 	constexpr const char *SHAPE_BOX{"box"};
 
-	static void process_shape(const YAML::Node &node, mesh::Mesh3D &mesh) {
-		auto transform = data::OFFSET_NONE;
-
-		auto offset = node["offset"].as<math::vec3>(math::VEC3_ZERO);
-		transform = glm::translate(transform, offset);
-
-		auto scale = node["scale"].as<math::vec3>(math::VEC3_ONES);
-		transform = glm::scale(transform, scale);
-		debug::debug("scale: {}, {}, {}", scale.x, scale.y, scale.z);
-
-		// now the shape itself
-		auto type = node["type"].as<std::string>();
-		if (type == SHAPE_BOX) {
-			data::make_cube(mesh, transform);
-		} else if (type == SHAPE_SPHERE) {
-			auto stacks = node["stacks"].as<uint32_t>(DEFAULT_STACKS);
-			auto slices = node["slices"].as<uint32_t>(DEFAULT_SLICES);
-			data::make_sphere(mesh, transform, stacks, slices);
-		} else {
-			debug::log(debug::Level::warning, "unknown shape type requested: {}", type);
+	namespace {
+		void process_shape(const YAML::Node &node, mesh::Mesh3D &mesh) {
+			auto transform = data::OFFSET_NONE;
+
+			auto offset = node["offset"].as<math::vec3>(math::VEC3_ZERO);
+			transform = glm::translate(transform, offset);
+
+			auto scale = node["scale"].as<math::vec3>(math::VEC3_ONES);
+			transform = glm::scale(transform, scale);
+			debug::debug("scale: {}, {}, {}", scale.x, scale.y, scale.z);
+
+			// now the shape itself
+			auto type = node["type"].as<std::string>();
+			if (type == SHAPE_BOX) {
+				data::make_cube(mesh, transform);
+			} else if (type == SHAPE_SPHERE) {
+				auto stacks = node["stacks"].as<uint32_t>(DEFAULT_STACKS);
+				auto slices = node["slices"].as<uint32_t>(DEFAULT_SLICES);
+				data::make_sphere(mesh, transform, stacks, slices);
+			} else {
+				debug::log(debug::Level::warning, "unknown shape type requested: {}", type);
+			}
 		}
 	}
 
+
 	void attach_mesh(const entity::ComponentSpec &spec, entity::EntityManager &manager, const entity::EntityID &id, modules::Services &services) {
 
 		// check for the asset service
@@ -144,7 +147,7 @@ namespace fggl::gfx {
 	void attach_material(const entity::ComponentSpec &spec,
 						 entity::EntityManager &manager,
 						 const entity::EntityID &id,
-						 modules::Services& services ) {
+						 modules::Services& /*services*/ ) {
 		auto &mat = manager.add<gfx::PhongMaterial>(id);
 		mat.ambient = spec.get<math::vec3>("ambient", gfx::DEFAULT_AMBIENT);
 		mat.diffuse = spec.get<math::vec3>("diffuse", gfx::DEFAULT_DIFFUSE);
@@ -152,7 +155,7 @@ namespace fggl::gfx {
 		mat.shininess = spec.get<float>("ambient", gfx::DEFAULT_SHININESS);
 	}
 
-	void attach_light_directional(const entity::ComponentSpec &spec, entity::EntityManager &manager, const entity::EntityID &id, modules::Services& services) {
+	void attach_light_directional(const entity::ComponentSpec &spec, entity::EntityManager &manager, const entity::EntityID &id, modules::Services& /*services*/) {
 		auto &light = manager.add<gfx::DirectionalLight>(id);
 		light.position = spec.get<math::vec3>("direction", -math::UP);
 		light.ambient = spec.get<math::vec3>("ambient", gfx::colours::WHITE);
@@ -160,7 +163,7 @@ namespace fggl::gfx {
 		light.diffuse = spec.get<math::vec3>("diffuse", gfx::colours::WHITE);
 	}
 
-	void attach_light_point(const entity::ComponentSpec &spec, entity::EntityManager &manager, const entity::EntityID &id, modules::Services& services) {
+	void attach_light_point(const entity::ComponentSpec &spec, entity::EntityManager &manager, const entity::EntityID &id, modules::Services& /*services*/) {
 		auto &light = manager.add<gfx::PointLight>(id);
 		light.position = spec.get<math::vec3>("position", math::VEC3_ZERO);
 
diff --git a/fggl/grid/hexagon.cpp b/fggl/grid/hexagon.cpp
index b07b598..6827b4f 100644
--- a/fggl/grid/hexagon.cpp
+++ b/fggl/grid/hexagon.cpp
@@ -21,7 +21,7 @@
 namespace fggl::grid {
 
 	std::vector<IntHex> lineTo(const IntHex& start, const IntHex& end) {
-		int distance = start.distance(end);
+		const int distance = start.distance(end);
 		std::vector<IntHex> line;
 		for (auto i=0; i < distance; ++i) {
 			line.push_back( round2(hexLerp(start, end, 1.0F/distance * i)) );
diff --git a/fggl/gui/renderer/renderer.cpp b/fggl/gui/renderer/renderer.cpp
index 8e33673..2166035 100644
--- a/fggl/gui/renderer/renderer.cpp
+++ b/fggl/gui/renderer/renderer.cpp
@@ -20,6 +20,8 @@
 
 namespace fggl::gui::renderer {
 
+	constexpr int PADDING = 15;
+
 	void draw_box(gfx::Path2D &path, glm::vec2 topLeft, glm::vec2 bottomRight) {
 		path.moveTo({topLeft.x, topLeft.y});
 		path.pathTo({bottomRight.x, topLeft.y});
@@ -130,7 +132,7 @@ namespace fggl::gui::renderer {
 
 		if ( root.hasAttr("text") ) {
 			auto text = root.get<std::string>("text");
-			paint.text(text, {background.left, background.top + 15});
+			paint.text(text, {background.left, background.top + PADDING});
 		}
 
 		for (const auto& child : root) {
diff --git a/fggl/platform/linux/paths.cpp b/fggl/platform/linux/paths.cpp
index 39a2e1e..e2030db 100644
--- a/fggl/platform/linux/paths.cpp
+++ b/fggl/platform/linux/paths.cpp
@@ -25,31 +25,33 @@
 
 namespace fggl::platform {
 
-	inline static auto get_user_path(const char *env, const char *fallback) -> std::filesystem::path {
-		const char *path = std::getenv(env);
-		if (path != nullptr) {
-			return {path};
+	namespace {
+		inline auto get_user_path(const char *env, const char *fallback) -> std::filesystem::path {
+			const char *path = std::getenv(env);
+			if (path != nullptr) {
+				return {path};
+			}
+			return {fallback};
 		}
-		return {fallback};
-	}
 
-	static auto get_path_list(const char *env, const char *folderName) -> std::vector<std::filesystem::path> {
-		const char *pathList = std::getenv(env);
-		std::vector<std::filesystem::path> paths;
-		if (pathList) {
-			std::string pathListStr(pathList);
-			std::string::size_type pos = 0;
-			while (pos < pathListStr.size()) {
-				std::string::size_type nextPos = pathListStr.find(':', pos);
-				if (nextPos == std::string::npos) {
-					nextPos = pathListStr.size();
+		auto get_path_list(const char *env, const char *folderName) -> std::vector<std::filesystem::path> {
+			const char *pathList = std::getenv(env);
+			std::vector<std::filesystem::path> paths;
+			if (pathList) {
+				std::string pathListStr(pathList);
+				std::string::size_type pos = 0;
+				while (pos < pathListStr.size()) {
+					std::string::size_type nextPos = pathListStr.find(':', pos);
+					if (nextPos == std::string::npos) {
+						nextPos = pathListStr.size();
+					}
+					std::string path = pathListStr.substr(pos, nextPos - pos);
+					paths.push_back(std::filesystem::path(path) / folderName);
+					pos = nextPos + 1;
 				}
-				std::string path = pathListStr.substr(pos, nextPos - pos);
-				paths.push_back(std::filesystem::path(path) / folderName);
-				pos = nextPos + 1;
 			}
+			return paths;
 		}
-		return paths;
 	}
 
 	auto calc_engine_paths(const char *base) -> EnginePaths {
@@ -98,7 +100,7 @@ namespace fggl::platform {
 			return debugPath;
 		}
 
-		// if the file existed, it shoudl exist in the user space
+		// if the file existed, it should exist in the user space
 		return userPath;
 	}
 
diff --git a/fggl/scenes/game.cpp b/fggl/scenes/game.cpp
index bf104d2..3fb8525 100644
--- a/fggl/scenes/game.cpp
+++ b/fggl/scenes/game.cpp
@@ -28,7 +28,7 @@ namespace fggl::scenes {
 		m_input = app.service<input::Input>();
 	}
 
-	void GameBase::update(float dt) {
+	void GameBase::update(float /*dt*/) {
 		// detect the user quitting
 		if (m_input != nullptr) {
 			bool escapePressed = m_input->keyboard.pressed(glfwGetKeyScancode(GLFW_KEY_ESCAPE));
@@ -59,7 +59,7 @@ namespace fggl::scenes {
 		m_world.reset();
 	}
 
-	void Game::update(float dt) {
+	void Game::update(float /*dt*/) {
 		assert(m_world && "called game update, but there was no world - was activate called?");
 
 		if (m_input != nullptr) {
diff --git a/fggl/scenes/menu.cpp b/fggl/scenes/menu.cpp
index b7330a7..12b4695 100644
--- a/fggl/scenes/menu.cpp
+++ b/fggl/scenes/menu.cpp
@@ -22,8 +22,10 @@ namespace fggl::scenes {
 	using fggl::input::MouseButton;
 	using fggl::input::MouseAxis;
 
-	BasicMenu::BasicMenu(fggl::App &app) : AppState(app), m_inputs(nullptr), m_active(), m_hover(nullptr) {
-		m_inputs = app.service<input::Input>();
+	constexpr float SCREEN_WIDTH = 1920.0F;
+	constexpr float SCREEN_HEIGHT = 1080.0F;
+
+	BasicMenu::BasicMenu(fggl::App &app) : AppState(app), m_inputs(app.service<input::Input>()), m_active(), m_cursorPos(), m_hover(nullptr) {
 	}
 
 	void BasicMenu::update(float /*dt*/) {
@@ -33,8 +35,8 @@ namespace fggl::scenes {
 
 			// in canvas space
 			math::vec2 projected;
-			projected.x = math::rescale_ndc(m_cursorPos.x, 0, 1920.0F);
-			projected.y = math::rescale_ndc(m_cursorPos.y, 0, 1080.0F);
+			projected.x = math::rescale_ndc(m_cursorPos.x, 0, SCREEN_WIDTH);
+			projected.y = math::rescale_ndc(m_cursorPos.y, 0, SCREEN_HEIGHT);
 			m_canvas.onMouseOver(projected);
 
 			if (m_inputs->mouse.pressed(MouseButton::LEFT)) {
@@ -71,7 +73,7 @@ namespace fggl::scenes {
 
 		// figure out the position based off the old logic
 		// FIXME should be the container's job
-		math::vec2 pos{1920.0F - (padX + btnSize.x), padY};
+		math::vec2 pos{SCREEN_WIDTH - (padX + btnSize.x), padY};
 		pos.y += ( (m_items.size()-1.0F) * (btnSize.y + spacing));
 
 		// build the button
diff --git a/include/fggl/app.hpp b/include/fggl/app.hpp
index 3da371b..b07203a 100644
--- a/include/fggl/app.hpp
+++ b/include/fggl/app.hpp
@@ -15,7 +15,7 @@
 #ifndef FGGL_INCLUDE_FGGL_APP_HPP
 #define FGGL_INCLUDE_FGGL_APP_HPP
 
-#define assertm(exp, msg) assert(((void)(msg), exp))
+#define ASSERT_MSG(exp, msg) assert(((void)(msg), exp))
 
 #include <cassert>
 #include <string>
@@ -86,8 +86,8 @@ namespace fggl {
 
 	class App {
 		public:
-			explicit App(modules::Manager *serivces, const Identifer &name);
-			App(modules::Manager *services, const Identifer &name, const Identifer &folderName);
+			explicit App(modules::Manager *manager, const Identifer &name);
+			App(modules::Manager *manager, const Identifer &name, const Identifer &folderName);
 
 			// class is non copy-able
 			App(const App &app) = delete;
diff --git a/include/fggl/util/states.hpp b/include/fggl/util/states.hpp
index 943ffb8..54fbc1b 100644
--- a/include/fggl/util/states.hpp
+++ b/include/fggl/util/states.hpp
@@ -63,7 +63,7 @@ namespace fggl::util {
 			}
 
 			StateType &active() const {
-				assertm(m_states.find(m_active) != m_states.end(), "active state does not exist!");
+				ASSERT_MSG(m_states.find(m_active) != m_states.end(), "active state does not exist!");
 				return *(m_states.at(m_active).get());
 			}
 
-- 
GitLab