summaryrefslogtreecommitdiff
path: root/src/core/include
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/include')
-rw-r--r--src/core/include/engine/core/platform.h6
-rw-r--r--src/core/include/engine/engine.h8
2 files changed, 7 insertions, 7 deletions
diff --git a/src/core/include/engine/core/platform.h b/src/core/include/engine/core/platform.h
index e0d2419..2e74fbe 100644
--- a/src/core/include/engine/core/platform.h
+++ b/src/core/include/engine/core/platform.h
@@ -5,6 +5,7 @@
#include <engine/core/memory.h>
#include <engine/ctrl/input.h>
#include <engine/rendering/window.h>
+#include <engine/resources.h>
#include <engine/utils/vector.h>
#define NUM_GLOBAL_BINDINGS 1
@@ -15,8 +16,6 @@
* not quite thread safe.
*/
typedef struct Platform {
- void* data; /* Contains textures and such */
- u64 data_len;
Window window;
bool quit;
@@ -36,6 +35,9 @@ typedef struct Platform {
i32 camera_x;
i32 camera_y;
+ /* Global resources that live from engine_init to engine_free */
+ Resources* resources;
+
/* Text input/editing is currently not used/implemented */
char* edit_text;
usize edit_pos;
diff --git a/src/core/include/engine/engine.h b/src/core/include/engine/engine.h
index 11ee096..d5b0922 100644
--- a/src/core/include/engine/engine.h
+++ b/src/core/include/engine/engine.h
@@ -1,5 +1,5 @@
-#ifndef ENGINE_H
-#define ENGINE_H
+#ifndef ENGINE_ENGINE_H
+#define ENGINE_ENGINE_H
#include <stdbool.h>
@@ -12,7 +12,6 @@
#include <engine/core/memory.h>
#include <engine/core/state.h>
#include <engine/ctrl/input.h>
-#include <engine/resources.h>
#include <engine/utils/stack.h>
#include <engine/utils/vector.h>
@@ -27,8 +26,7 @@ typedef struct {
/* Essential functions */
Platform* engine_init(const char* windowtitle, i32 windowWidth, i32 windowHeight,
const f32 render_scale, const u32 flags,
- const usize initial_memory, const Asset_FontSpec* fonts[],
- const Asset_TextureSpec* textures[]);
+ const usize initial_memory);
i32 engine_run(Platform* p, StateType initial_state, void* state_arg);