#pragma once #include #include #include #include #include #include "Audio.h" struct Color { float r; float g; float b; float a; static Color color_from_short(uint8_t r, uint8_t g, uint8_t b, uint8_t alpha) { Color c; c.r = r / 256.0f; c.g = g / 256.0f; c.b = b / 256.0f; c.a = alpha / 256.0f; return c; } }; class BaseWindow { public: BaseWindow(int width, int height, const char *title, Color clear_color, Audio *audio_handler); ~BaseWindow(); int run(); private: Color m_clear_color = {0}; int m_window_width; int m_window_height; const char *m_window_title; GLFWwindow *m_window{}; Audio *m_audio_handler; };