NSMBW-Decomp
A decompilation of New Super Mario Bros. Wii
Loading...
Searching...
No Matches
g3d_workmem.h
1#ifndef NW4R_G3D_WORK_MEM_H
2#define NW4R_G3D_WORK_MEM_H
3#include <nw4r/types_nw4r.h>
4
5#include <nw4r/g3d/res/g3d_resanmshp.h>
6
7#include <nw4r/math.h>
8
9namespace nw4r {
10namespace g3d {
11namespace detail {
12namespace workmem {
13
14/******************************************************************************
15 *
16 * MdlZ
17 *
18 ******************************************************************************/
19struct MdlZ {
20 f32 Z; // at 0x0
21 u16 priority; // at 0x4
22 u16 nodeID; // at 0x6
23 u16 matID; // at 0x8
24 u16 shpID; // at 0xA
25};
26
27/******************************************************************************
28 *
29 * ShpAnmResultBuf
30 *
31 ******************************************************************************/
33 ShpAnmResult resultBuf; // at 0x0
34 const ShpAnmResult* pResult; // at 0x218
35 f32 weight; // at 0x21C
36};
37
38/******************************************************************************
39 *
40 * Work memory size constants
41 *
42 ******************************************************************************/
43static const int WORKMEM_SIZE = 0x18000;
44
45static const int WORKMEM_NUMTMPSCALE = 2048;
46static const int WORKMEM_NUMMTXID = 2048;
47static const int WORKMEM_NUMBYTECODE = WORKMEM_SIZE;
48static const int WORKMEM_NUMMDLZ = 2048;
49static const int WORKMEM_NUMSKINNINGMTX = 2048;
50static const int WORKMEM_NUMBBMTX = 2048;
51static const int WORKMEM_NUMSHPANMRESULT =
52 WORKMEM_SIZE / sizeof(ShpAnmResultBuf);
53
54/******************************************************************************
55 *
56 * Work memory accessor functions
57 *
58 ******************************************************************************/
59math::VEC3* GetScaleTemporary();
60ulong* GetMtxIDTemporary();
61MdlZ* GetMdlZTemporary();
62math::MTX34* GetSkinningMtxTemporary();
63math::MTX34* GetBillboardMtxTemporary();
64ShpAnmResultBuf* GetShpAnmResultBufTemporary();
65
66} // namespace workmem
67} // namespace detail
68} // namespace g3d
69} // namespace nw4r
70
71#endif
3D graphics drawing library.
Definition g3d_3dsmax.h:10