Started on the engine proper
This commit is contained in:
23
core/engine_node.h
Normal file
23
core/engine_node.h
Normal file
@@ -0,0 +1,23 @@
|
||||
#pragma once
|
||||
|
||||
#include "common.h"
|
||||
|
||||
//forward declare
|
||||
typedef struct _engineNode EngineNode;
|
||||
typedef struct _engine Engine;
|
||||
|
||||
//the interface function
|
||||
typedef void (*EngineNodeFn)(EngineNode* self, Engine* engine);
|
||||
|
||||
//the node object, which forms a tree
|
||||
typedef struct _engineNode {
|
||||
//use Toy's memory model
|
||||
void* children;
|
||||
int capacity;
|
||||
int count;
|
||||
|
||||
EngineNodeFn onInit;
|
||||
EngineNodeFn onStep;
|
||||
EngineNodeFn onFree;
|
||||
} EngineNode;
|
||||
|
||||
Reference in New Issue
Block a user