#include #include #include #include struct WMSceneDataNode { u32 nodeKey; u32 brresKey; u32 lmType; const char *modelName; // Actually an offset before dWMMap_c loads the data Mtx matrix; }; struct WMSceneDataHeader { u32 magic; u32 nodeCount; WMSceneDataNode nodes[1]; // dynamic length array }; // todo: make this subclass mdl_c maybe? dunno... class WMSceneNode { public: WMSceneDataNode *baseData; m3d::mdl_c model; void loadFrom(WMSceneDataNode *data, mHeapAllocator_c *allocator); void draw(); }; class dWMMap_c : public dBase_c { public: int onCreate(); int onDelete(); int onExecute(); int onDraw(); mHeapAllocator_c allocator; WMSceneDataHeader *data; WMSceneNode *nodes; static dWMMap_c *build(); static dWMMap_c *instance; };