NSMBW-Decomp
A decompilation of New Super Mario Bros. Wii
Loading...
Searching...
No Matches
lyt_picture.h
1#ifndef NW4R_LYT_PICTURE_H
2#define NW4R_LYT_PICTURE_H
3#include <nw4r/types_nw4r.h>
4
5#include <nw4r/lyt/lyt_common.h>
6#include <nw4r/lyt/lyt_pane.h>
7
8namespace nw4r {
9namespace lyt {
10
11// Forward declarations
12struct ResBlockSet;
13class TexMap;
14
15namespace res {
16
17/******************************************************************************
18 *
19 * PIC1 binary layout
20 *
21 ******************************************************************************/
22struct Picture : Pane {
23 static const ulong SIGNATURE = 'pic1';
24
25 ulong vtxCols[VERTEXCOLOR_MAX]; // at 0x4C
26 u16 materialIdx; // at 0x5C
27 u8 texCoordNum; // at 0x5E
28 u8 PADDING_0x5F; // at 0x5F
29};
30
31} // namespace res
32
33/******************************************************************************
34 *
35 * Picture
36 *
37 ******************************************************************************/
38class Picture : public Pane {
39public:
40 NW4R_UT_RTTI_DECL(Picture);
41
42public:
43 Picture(u8 num);
44 Picture(const res::Picture* pRes, const ResBlockSet& rBlockSet);
45 virtual ~Picture(); // at 0x8
46
47 virtual void DrawSelf(const DrawInfo& rInfo); // at 0x18
48
49 virtual ut::Color GetVtxColor(ulong idx) const; // at 0x24
50 virtual void SetVtxColor(ulong idx, ut::Color color); // at 0x28
51
52 virtual u8 GetVtxColorElement(ulong idx) const; // at 0x34
53 virtual void SetVtxColorElement(ulong idx, u8 value); // at 0x38
54
55 virtual void Append(const TexMap& rTexMap); // at 0x64
56
57protected:
58 ut::Color mVtxColors[VERTEXCOLOR_MAX]; // at 0xD4
59 detail::TexCoordAry mTexCoordAry; // at 0xE4
60
61protected:
62 void ReserveTexCoord(u8 num);
63 void SetTexCoordNum(u8 num);
64
65private:
66 void Init(u8 num);
67};
68
69} // namespace lyt
70} // namespace nw4r
71
72#endif
2D graphics drawing library.