summaryrefslogtreecommitdiff
path: root/include/nw4r/types_nw4r.h
blob: 6ccabea59139b1b6403c70dadffa9348be5b97ab (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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
#ifndef NW4R_TYPES_H
#define NW4R_TYPES_H
#include <common.h>

#define NW4R_BYTEORDER_BIG 0xFEFF
#define NW4R_BYTEORDER_LITTLE 0xFFFE

#define NW4R_VERSION(major, minor) ((major & 0xFF) << 8 | minor & 0xFF)

#ifdef NW4R_LITTLE_ENDIAN
#define NW4R_BYTEORDER_NATIVE NW4R_BYTEORDER_LITTLE
#else
#define NW4R_BYTEORDER_NATIVE NW4R_BYTEORDER_BIG
#endif

#define NW4R_LIB_VERSION(NAME, ORIGINAL_DATE, ORIGINAL_TIME, ORIGINAL_CWCC)                                            \
    const char *NW4R_##NAME##_Version_ =                                                                               \
        "<< NW4R    - " #NAME " \tfinal   build: " ORIGINAL_DATE " " ORIGINAL_TIME " (" ORIGINAL_CWCC ") >>"

#if defined(CHAR_BIT)
# define CHAR_BIT_	CHAR_BIT
#else
# define CHAR_BIT_	8 // most common; default
#endif

// offset in bytes
#define NW4R_BYTE_(byte_, offset_)	\
	(static_cast<unsigned char>(byte_) << CHAR_BIT_ * (offset_))

#define NW4R_FILE_VERSION(MAJOR, MINOR)	\
	(NW4R_BYTE_(MAJOR, 1) | NW4R_BYTE_(MINOR, 0))

#define NW4R_FOUR_BYTE(A, B, C, D)	\
	(NW4R_BYTE_(A, 3) | NW4R_BYTE_(B, 2) | NW4R_BYTE_(C, 1) | NW4R_BYTE_(D, 0))

namespace nw4r {
namespace ut {
namespace detail {

struct RuntimeTypeInfo;
struct ResFontBase;

} // namespace detail

template <typename T>
struct AutoLock;
struct AutoInterruptLock;
struct BinaryBlockHeader;
struct BinaryFileHeader;
struct CharStrmReader;
struct CharWidths;
struct CharWriter;
struct Color;
struct DvdFileStream;
struct DvdLockedFileStream;
struct FileStream;
struct Font;
struct Glyph;
struct IOStream;
template <typename T, int Ofs>
struct LinkList;
struct List;
struct NandFileStream;
template <typename T>
struct PrintContext;
struct Rect;
struct ResFont;
struct RomFont;
template <typename T>
struct TagProcessorBase;
template <typename T>
struct TextWriterBase;

} // namespace ut

namespace ef {
struct DrawOrder;
struct DrawInfo;
struct DrawStrategy;
struct DrawStrategyImpl;
struct DrawStrategyBuilder;
struct Effect;
struct EffectSystem;
struct EffectProject;
struct Emitter;
struct EmitterDrawSetting;
struct EmitFormBuilder;
struct ResEmitter;
struct EmitterResource;
struct EmitterForm;
struct EmitterInheritSetting;
struct Particle;
struct ParticleManager;
struct MemoryManager;
struct MemoryManagerBase;
} // namespace ef

namespace math {

struct VEC2;
struct VEC3;
struct MTX33;
struct MTX34;
struct MTX44;
struct QUAT;
struct PLANE;
struct AABB;
struct FRUSTUM;

} // namespace math

namespace snd {

struct AxVoice;
struct FxBase;
struct SoundPlayer;
struct SoundHandle;
struct SeqSoundHandle;
struct SoundArchive;
struct SoundArchivePlayer;
struct Sound3DActor;
struct Sound3DListener;
struct Sound3DManager;
struct SoundHandle;
struct StrmSoundHandle;
struct WaveSoundHandle;

namespace detail {

struct AxfxImpl;
struct AxManager;
struct AxVoiceManager;
struct ExternalSoundPlayer;

struct BasicSound;
struct BasicPlayer;
struct ChannelManager;
struct SeqSound;
struct SeqPlayer;
struct MmlParser;
struct MmlSeqTrack;
struct SeqTrack;
struct SeqTrackAllocator;
template <typename T>
struct SoundInstanceManager;
struct StrmBufferPool;
struct StrmSound;
struct NoteOnCallback;
struct PlayerHeap;
struct SoundArchiveFileReader;
struct SoundThread;
struct WaveSound;
struct StrmPlayer;
struct WsdPlayer;
} // namespace detail
} // namespace snd

namespace g3d {
struct AnmObjVis;
struct AnmObjVisNode;
struct AnmObjVisOR;
struct AnmObjVisRes;
struct AnmObj;
struct AnmObjChr;
struct FuncObjCalcWorld;
struct AnmScn;
struct AnmScnRes;
struct CameraAnmResult;
struct ChrAnmResult;
struct Draw1Mat1ShpSwap;
struct DrawResMdlReplacement;
struct FogAnmResult;
struct ResFile;
struct ResMdl;
struct ResPltt;
struct ResTex;
struct ResTexSrt;
struct ResMat;
struct ResTexPlttInfo;
struct ResShp;
struct ResFog;
struct ResAnmChr;
struct ResAnmVis;
struct ResAnmClr;
struct ResAnmTexPat;
struct ResAnmTexSrt;
struct ResAnmShp;
struct ResAnmScn;
struct ResAnmFog;
struct ResAnmCamera;
struct ResVtxPos;
struct ResVtxNrm;
struct ResVtxClr;
struct ResVtxTexCoord;
struct ClrAnmResult;
struct TexPatAnmResult;
struct TexSrtAnmResult;
struct ScnMdl1Mat1Shp;
struct TexSrt;
struct TexSrtTypedef;
struct LightObj;
struct LightAnmResult;
struct LightSet;
struct LightSetting;
struct LightSetData;
struct AmbLightObj;
struct AmbLightAnmResult;
struct Fog;
struct ScnRoot;
struct ScnProc;
struct ScnLeaf;
struct ScnObj;
struct ScnRfl;
struct ScnGroup;
struct ScnMdlSimple;
struct ScnMdl;
struct IScnObjGather;
struct IScnObjCallback;

namespace G3DState {
struct IndMtxOp;
}
} // namespace g3d

namespace lyt {
struct Size;

namespace detail {
struct PaneBase;
struct TexCoordAry;
} // namespace detail

namespace res {
struct Group;
struct Pane;
struct Bounding;
struct AnimationBlock;
struct BinaryFileHeader;
} // namespace res

struct Group;
struct GroupContainer;
struct Pane;
struct DrawInfo;
struct AnimResource;
struct AnimTransform;
struct AnimTransformBasic;
struct AnimationLink;
struct ResourceAccessor;
struct ArcResourceAccessor;
struct FontRefLink;
struct Material;
struct Layout;
struct Bounding;
struct ResBlockSet;
struct TexMap;
} // namespace lyt
} // namespace nw4r

#endif