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