persona-3-dual
A DS demake of Persona 3
Loading...
Searching...
No Matches
ModelTypes.hpp
Go to the documentation of this file.
1#pragma once
2
3#include <etl/vector.h>
4#include <nds.h>
5
10{
11 int textureID = -1;
12 uint16_t width = 0;
13 uint16_t height = 0;
14 bool isRGBA = false;
15 char name[65] = {0};
16
17 MDL3Texture() = default;
18 ~MDL3Texture() = default;
19};
20
21// TODO: figure out a way to make the vector sizes dynamic or compiletimed
22
27{
28 int16_t frame;
29 int32_t x, y, z;
30};
31
36{
37 int16_t frame;
38 int16_t x, y, z, w;
39};
40
45{
46 int32_t nodeIndex = -1;
47 etl::vector<PositionKey, 64> translations;
48 etl::vector<QuaternionKey, 64> rotations;
49};
50
55{
56 char name[32] = {0};
57 uint32_t numFrames = 0;
58 int16_t fps;
59 etl::vector<NodeTrack, 64> tracks;
60};
61
66{
67 int32_t texSlot = -1;
68 int32_t dlSize = 0;
69 const uint32_t* displayList = nullptr;
70};
71
75struct Node
76{
77 int32_t pid = -1;
78 etl::vector<SubList_N, 64> subLists;
79};
80
85{
86 uint32_t nodeCount = 0;
87 uint32_t texCount = 0;
88 etl::vector<MDL3Texture, 8> textures;
89 etl::vector<Node, 64> nodes;
90
91 MDL3Model() = default;
92 ~MDL3Model() = default;
93};
94
95#pragma pack(push, 1)
101{
102 char name[64];
103 uint16_t width;
104 uint16_t height;
105 uint8_t isRGBA;
106 uint8_t pad[3];
107};
108
114{
115 char magic[4];
116 uint32_t nodeCount = 0;
117 uint32_t animCount = 0;
118 uint32_t texCount = 0;
119};
120
126{
127 int32_t pid = -1;
128 uint32_t subListCount = 0;
129};
130#pragma pack(pop)
Represents an animation in the 3D model.
uint32_t numFrames
char name[32]
etl::vector< NodeTrack, 64 > tracks
int16_t fps
etl::vector< MDL3Texture, 8 > textures
MDL3Model()=default
~MDL3Model()=default
uint32_t nodeCount
etl::vector< Node, 64 > nodes
uint32_t texCount
uint16_t height
MDL3Texture()=default
uint16_t width
~MDL3Texture()=default
char name[65]
Represents a track for a node in an animation.
etl::vector< QuaternionKey, 64 > rotations
int32_t nodeIndex
etl::vector< PositionKey, 64 > translations
Represents a node in the 3D model.
int32_t pid
etl::vector< SubList_N, 64 > subLists
Represents a position keyframe in an animation.
int16_t frame
Represents a quaternion keyframe in an animation.
Represents the header of a raw model file.
uint32_t animCount
uint32_t nodeCount
uint32_t texCount
Represents the header of a raw node file.
uint32_t subListCount
Represents the header of a raw texture file.
Represents a sublist of a node in the 3D model.
const uint32_t * displayList
int32_t texSlot
int32_t dlSize