migrate to new c djstdlib
This commit is contained in:
@@ -1,42 +1,46 @@
|
||||
#include "../gfx/gfx.h"
|
||||
#include "../lib/raymath.h"
|
||||
|
||||
DefineList(uint32, Handle);
|
||||
|
||||
enum EntityFlags {
|
||||
EntityFlags_Visible=1<<0,
|
||||
EntityFlags_Dead=1<<1,
|
||||
EntityFlags_Render=1<<2,
|
||||
};
|
||||
};
|
||||
|
||||
struct Entity {
|
||||
typedef struct {
|
||||
Mesh *mesh;
|
||||
Texture *tex;
|
||||
uint32 graphNodeHandle;
|
||||
uint64 flags;
|
||||
};
|
||||
} Entity;
|
||||
DefineList(Entity, Entity);
|
||||
|
||||
struct SceneGraphNode {
|
||||
typedef struct {
|
||||
Matrix local;
|
||||
Matrix world;
|
||||
RLVector3 translation;
|
||||
Quaternion rotation;
|
||||
RLVector3 scale;
|
||||
list<uint32> children;
|
||||
HandleList children;
|
||||
uint32 entityHandle;
|
||||
uint32 parentHandle;
|
||||
};
|
||||
} SceneGraphNode;
|
||||
DefineList(SceneGraphNode, SceneGraphNode);
|
||||
|
||||
struct Scene {
|
||||
typedef struct {
|
||||
uint32 sceneRoot;
|
||||
list<Entity> entities;
|
||||
list<SceneGraphNode> graphNodes;
|
||||
};
|
||||
EntityList entities;
|
||||
SceneGraphNodeList graphNodes;
|
||||
} Scene;
|
||||
|
||||
uint32 createEntity(Arena *arena, Scene *s);
|
||||
Entity *getEntity(Scene *s);
|
||||
SceneGraphNode *getSceneGraphNode(Scene *s, int id);
|
||||
Entity *getEntity(Scene *s, uint32 id);
|
||||
SceneGraphNode *getSceneGraphNode(Scene *s, uint32 id);
|
||||
uint32 createSceneGraphNode(Arena *arena, Scene *s);
|
||||
Scene createScene(Arena *arena);
|
||||
void initGraphNode(SceneGraphNode *n);
|
||||
void initGraphNode(SceneGraphNode *n);
|
||||
void recalcGraphNode(SceneGraphNode *n);
|
||||
void recalcSceneGraphNode(Scene *s, uint32 parentHandle);
|
||||
void recalcScene(Scene *s);
|
||||
|
||||
Reference in New Issue
Block a user