From c7a3dcdc8a26eb5bf98ce2079abd66fd64534459 Mon Sep 17 00:00:00 2001 From: 0scar Date: Tue, 6 Feb 2024 12:52:32 +0100 Subject: Fixup window handling & rendering --- src/core/include/engine/engine.h | 58 +++++++++------------------------------- 1 file changed, 12 insertions(+), 46 deletions(-) (limited to 'src/core/include/engine/engine.h') diff --git a/src/core/include/engine/engine.h b/src/core/include/engine/engine.h index ba4e227..6e208d3 100644 --- a/src/core/include/engine/engine.h +++ b/src/core/include/engine/engine.h @@ -20,14 +20,14 @@ typedef struct { i32 x, y, w, h; } RenderUnit; -typedef struct Window Window; +#include #define NUM_GLOBAL_BINDINGS 1 typedef struct { void* data; /* Contains textures and such */ u64 data_len; - Window* window; + Window window; bool quit; u64 frame; @@ -78,7 +78,7 @@ void render_adjust_zoom(f32 diff); void render_add_unit(RenderUnit* u); f64 get_time(void); -v2_i32 get_windowsize(void); +//v2_i32 get_windowsize(void); v2_i32* get_mousepos(void); /* Input handling */ @@ -86,48 +86,14 @@ void engine_input_ctx_push(i_ctx* ctx); void engine_input_ctx_pop(void); void engine_input_ctx_reset(void); -#include +//#include -#ifdef ENGINE_INTERNALS - -#include -#define GLFW_INCLUDE_NONE -#include - -/* Window */ -struct Window { - GLFWwindow* window; - GladGLContext* context; - f32 render_scale; - - v2_i32 windowsize; - - i32* game_w; - i32* game_h; -}; - -typedef struct { - const i32 tilesize; - const i32 width; - const i32 height; -} Texture; - -struct Resources { - usize textures_len; - usize textures_size; - usize fonts_len; - - usize texturepaths_len; - usize fontpaths_len; - - /* Paths for our sources, kept in case the user wants to reload them */ - Asset_TextureSpec** texture_paths; - Asset_FontSpec** font_paths; - - /* Our actual sources */ - Texture** textures; - //TTF_Font** fonts; -}; - -#endif +//#ifdef ENGINE_INTERNALS +// +//#include +//#define GLFW_INCLUDE_NONE +//#include +// +// +//#endif #endif -- cgit v1.3