NSMBW-Decomp
A decompilation of New Super Mario Bros. Wii
Loading...
Searching...
No Matches
d_cd.hpp
1#pragma once
2#include <types.h>
3#include <game/mLib/m_vec.hpp>
4
5/// @unofficial
6struct AreaBoundU16 {
7 AreaBoundU16(u16 x, u16 y, u16 w, u16 h) {
8 this->x = x;
9 this->y = y;
10 width = w;
11 height = h;
12 }
13
14 u16 x, y, width, height;
15};
16
17/// @unofficial
19public:
20
21 enum FLAG_e {
22 WRAP_AROUND_EDGES = BIT_FLAG(0),
23 };
24
25 char pad[8];
26 u16 mFlags;
27};
28
29class dCdFile_c {
30public:
31 char pad[0xc];
32 dCdCourseSettings_c *mpCourseSettings;
33 char pad2[0x1c];
34 AreaBoundU16 *mpAreas;
35 char pad3[0x380];
36
37 u8 getAreaNo(mVec3_c *);
38 AreaBoundU16 *getAreaP(u8 zoneID, mBoundBox *bound); ///< @unofficial
39};
40
41class dCd_c {
42public:
43 dCdFile_c mFiles[4];
44
45 dCdFile_c *getFileP(int idx) {
46 dCdFile_c *course = &mFiles[idx];
47 if (course->mpAreas != nullptr) {
48 return course;
49 }
50 return nullptr;
51 }
52
53 static dCd_c *m_instance;
54};
AreaBoundU16 * getAreaP(u8 zoneID, mBoundBox *bound)
Definition d_cd.hpp:41
A three-dimensional floating point vector.
Definition m_vec.hpp:100