summary refs log tree commit diff
path: root/src/GFX/Window.cpp
diff options
context:
space:
mode:
authorMel <einebeere@gmail.com>2023-07-08 03:25:44 +0200
committerMel <einebeere@gmail.com>2023-07-08 03:25:44 +0200
commitfe2baedc760c2f29e2c720f6b1132a2de33c5430 (patch)
treedfbe1c72a17805a3cab6e0d47433e9021890c9ca /src/GFX/Window.cpp
parent41fbca10f6c6cdd9c1623f1347e7ecb40f5e7f59 (diff)
downloadmeowcraft-fe2baedc760c2f29e2c720f6b1132a2de33c5430.tar.zst
meowcraft-fe2baedc760c2f29e2c720f6b1132a2de33c5430.zip
Use own size types
Diffstat (limited to 'src/GFX/Window.cpp')
-rw-r--r--src/GFX/Window.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/GFX/Window.cpp b/src/GFX/Window.cpp
index ea1fde4..bbe2ba7 100644
--- a/src/GFX/Window.cpp
+++ b/src/GFX/Window.cpp
@@ -1,9 +1,10 @@
 #include <stdexcept>
+#include "../Common/Sizes.hpp"
 #include "Window.hpp"
 
 namespace MC::GFX {
 
-Window::Window(const char *title, uint32_t width, uint32_t height) {
+Window::Window(const Char* title, U32 width, U32 height) {
     glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3);
     glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 3);
     glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE);
@@ -23,7 +24,7 @@ Window::~Window() {
     glfwDestroyWindow(m_window);
 }
 
-bool Window::should_close() const {
+Bool Window::should_close() const {
     return glfwWindowShouldClose(m_window);
 }
 
@@ -39,11 +40,11 @@ Vector<2> Window::mouse_delta() {
     return m_mouse.update(m_window);
 }
 
-bool Window::key(int key, int type) const {
+Bool Window::key(I32 key, I32 type) const {
     return glfwGetKey(m_window, key) == type;
 }
 
-bool Window::mouse(int key, int type) const {
+Bool Window::mouse(I32 key, I32 type) const {
     return glfwGetMouseButton(m_window, key) == type;
 }
 
@@ -52,7 +53,7 @@ void Window::start_frame() {
     glfwPollEvents();
 }
 
-void Window::on_size_change(void (callback)(GLFWwindow*, int, int)) {
+void Window::on_size_change(void (callback)(GLFWwindow*, I32, I32)) {
     glfwSetFramebufferSizeCallback(m_window, callback);
 }