Renamed files

This commit is contained in:
2023-01-26 20:41:23 +00:00
parent 54d417b3fc
commit 3e18baeec0
25 changed files with 28 additions and 1339 deletions

46
box/box_engine.h Normal file
View File

@@ -0,0 +1,46 @@
#pragma once
#include "core_common.h"
#include "engine_node.h"
#include "interpreter.h"
#include "literal_array.h"
#include "literal_dictionary.h"
#include "core_common.h"
#include <sys/time.h>
//the base engine object, which represents the state of the game
typedef struct _engine {
//engine stuff
EngineNode* rootNode;
struct timeval simTime;
struct timeval realTime;
bool running;
//Toy stuff
Interpreter interpreter;
//SDL stuff
SDL_Window* window;
SDL_Renderer* renderer;
int screenWidth;
int screenHeight;
//input syms mapped to events
LiteralArray keyDownEvents; //list of events that occurred this frame
LiteralDictionary symKeyDownEvents; //keysym -> event names
LiteralArray keyUpEvents; //list of events that occurred this frame
LiteralDictionary symKeyUpEvents; //keysym -> event names
} Engine;
//extern singleton - used by various libraries
extern Engine engine;
//APIs for running the engine in main()
CORE_API void initEngine();
CORE_API void execEngine();
CORE_API void freeEngine();