diff options
Diffstat (limited to '')
-rw-r--r-- | src/wm_map.h | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/src/wm_map.h b/src/wm_map.h new file mode 100644 index 0000000..2ca55a0 --- /dev/null +++ b/src/wm_map.h @@ -0,0 +1,47 @@ +#include <common.h> +#include <rvl/mtx.h> +#include <g3dhax.h> +#include <game.h> + +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; +}; + |