Started on the engine proper

This commit is contained in:
2022-09-18 21:48:15 +01:00
parent 902b917d2b
commit 50aef00ec0
11 changed files with 241 additions and 79 deletions

30
core/engine.h Normal file
View File

@@ -0,0 +1,30 @@
#pragma once
#include "common.h"
#include "engine_node.h"
#include <SDL2/SDL.h>
#include <sys/time.h>
//the base engine object, which represents the state of the game
typedef struct _engine {
//engine stuff
EngineNode* root;
struct timeval simTime;
struct timeval realTime;
bool running;
//SDL stuff
SDL_Window* window;
SDL_Renderer* renderer;
int screenWidth;
int screenHeight;
} Engine;
//APIs for initializing the engine
CORE_API void initEngine(Engine* engine);
CORE_API void freeEngine(Engine* engine);
CORE_API void execEngine(Engine* engine);