Paper Mario DX
Paper Mario (N64) modding
 
Loading...
Searching...
No Matches
SaveBlock.c
Go to the documentation of this file.
1#include "common.h"
2#include "include_asset.h"
3#include "include_asset.h"
4
5#include "entity/model/SaveBlock_1.vtx.inc.c"
6#include "entity/model/SaveBlock_2.vtx.inc.c"
7#include "entity/model/SaveBlock_3.vtx.inc.c"
8
9INCLUDE_IMG("entity/model/SaveBlock_star.png", D_0A000900_E4BBE0);
11 gsDPSetTextureLUT(G_TT_NONE),
12 gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON),
13 gsDPSetTextureDetail(G_TD_CLAMP),
14 gsDPSetTextureLOD(G_TL_TILE),
15 gsDPLoadTextureBlock(D_0A000900_E4BBE0, G_IM_FMT_RGBA, G_IM_SIZ_16b, 32, 32, 0, G_TX_MIRROR | G_TX_WRAP, G_TX_MIRROR | G_TX_WRAP, 5, 5, G_TX_NOLOD, G_TX_NOLOD),
16 gsDPSetTexturePersp(G_TP_PERSP),
17 gsDPSetTextureFilter(G_TF_BILERP),
18 gsSPEndDisplayList(),
19};
20
21#if !VERSION_PAL
22INCLUDE_IMG("entity/model/SaveBlock_face.png", D_0A001170_E4C450);
24 gsDPSetTextureLUT(G_TT_NONE),
25 gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON),
26 gsDPSetCombineMode(G_CC_MODULATEIA, G_CC_MODULATEIA),
27 gsDPSetTextureDetail(G_TD_CLAMP),
28 gsDPSetTextureLOD(G_TL_TILE),
29 gsDPLoadTextureBlock(D_0A001170_E4C450, G_IM_FMT_RGBA, G_IM_SIZ_32b, 32, 32, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, 5, 5, G_TX_NOLOD, G_TX_NOLOD),
30 gsDPSetTexturePersp(G_TP_PERSP),
31 gsDPSetTextureFilter(G_TF_BILERP),
32 gsSPEndDisplayList(),
33};
34#endif
35
36INCLUDE_IMG("entity/model/SaveBlock_letterS.png", D_0A0021E8_E4D4C8);
37#if VERSION_PAL
38INCLUDE_IMG("entity/model/SaveBlock_letterG.png", D_PAL_0A002170_EBA460);
39#endif
40
42 gsDPSetTextureLUT(G_TT_NONE),
43 gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON),
44 gsDPSetCombineMode(G_CC_MODULATEIA, G_CC_MODULATEIA),
45 gsDPSetTextureDetail(G_TD_CLAMP),
46 gsDPSetTextureLOD(G_TL_TILE),
47 gsDPLoadTextureBlock(D_0A0021E8_E4D4C8, G_IM_FMT_RGBA, G_IM_SIZ_16b, 64, 32, 0, G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMIRROR | G_TX_CLAMP, 6, 5, G_TX_NOLOD, G_TX_NOLOD),
48 gsDPSetTexturePersp(G_TP_PERSP),
49 gsDPSetTextureFilter(G_TF_BILERP),
50 gsSPEndDisplayList(),
51};
52
53#if VERSION_PAL
54Gfx Entity_SaveBlock_LoadTextureLetterG[] = {
55 gsDPSetTextureLUT(G_TT_NONE),
56 gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON),
57 gsDPSetCombineMode(G_CC_MODULATEIA, G_CC_MODULATEIA),
58 gsDPSetTextureDetail(G_TD_CLAMP),
59 gsDPSetTextureLOD(G_TL_TILE),
60 gsDPLoadTextureBlock(D_PAL_0A002170_EBA460, G_IM_FMT_IA, G_IM_SIZ_8b, 64, 32, 0, G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMIRROR | G_TX_CLAMP, 6, 5, G_TX_NOLOD, G_TX_NOLOD),
61 gsDPSetTexturePersp(G_TP_PERSP),
62 gsDPSetTextureFilter(G_TF_BILERP),
63 gsSPEndDisplayList(),
64};
65#endif
66
68 1.000000, 0.000000, 0.000000, 0.000000,
69 0.000000, 1.000000, 0.000000, 0.000000,
70 0.000000, 0.000000, 1.000000, 0.000000,
71 0.000000, 0.000000, 0.000000, 1.000000
72);
73
75 gsDPPipeSync(),
76 gsDPSetCycleType(G_CYC_1CYCLE),
78 gsSPClearGeometryMode(G_LIGHTING),
79 gsSPSetGeometryMode(G_CULL_BACK | G_SHADING_SMOOTH),
80 gsSPVertex(D_0A0006C0_E4B9A0, 31, 0),
81 gsSP2Triangles(0, 1, 2, 0, 0, 2, 3, 0),
82 gsSP2Triangles(4, 5, 0, 0, 4, 0, 3, 0),
83 gsSP2Triangles(2, 6, 7, 0, 2, 7, 3, 0),
84 gsSP2Triangles(8, 4, 3, 0, 8, 3, 7, 0),
85 gsSP2Triangles(9, 10, 11, 0, 9, 11, 12, 0),
86 gsSP2Triangles(13, 14, 9, 0, 13, 9, 12, 0),
87 gsSP2Triangles(12, 11, 15, 0, 12, 15, 16, 0),
88 gsSP2Triangles(17, 13, 12, 0, 17, 12, 16, 0),
89 gsSP2Triangles(18, 19, 20, 0, 18, 20, 21, 0),
90 gsSP2Triangles(20, 22, 23, 0, 20, 23, 21, 0),
91 gsSP2Triangles(24, 25, 21, 0, 24, 21, 23, 0),
92 gsSP2Triangles(25, 26, 18, 0, 25, 18, 21, 0),
93 gsSP2Triangles(27, 28, 29, 0, 27, 29, 30, 0),
94 gsSPVertex(&D_0A0006C0_E4B9A0[28], 8, 0),
95 gsSP2Triangles(0, 3, 4, 0, 0, 4, 1, 0),
96 gsSP2Triangles(4, 6, 5, 0, 4, 5, 1, 0),
97 gsSP2Triangles(5, 7, 2, 0, 5, 2, 1, 0),
98 gsSPEndDisplayList(),
99};
100
101#if VERSION_PAL
102Gfx Entity_SaveBlock_RenderLetterG[] = {
103 gsDPPipeSync(),
104 gsDPSetCycleType(G_CYC_1CYCLE),
105 gsSPDisplayList(Entity_SaveBlock_LoadTextureLetterG),
106 gsSPClearGeometryMode(G_LIGHTING),
107 gsSPSetGeometryMode(G_CULL_BACK | G_SHADING_SMOOTH),
108 gsSPVertex(D_0A0006C0_E4B9A0, 31, 0),
109 gsSP2Triangles(0, 1, 2, 0, 0, 2, 3, 0),
110 gsSP2Triangles(4, 5, 0, 0, 4, 0, 3, 0),
111 gsSP2Triangles(2, 6, 7, 0, 2, 7, 3, 0),
112 gsSP2Triangles(8, 4, 3, 0, 8, 3, 7, 0),
113 gsSP2Triangles(9, 10, 11, 0, 9, 11, 12, 0),
114 gsSP2Triangles(13, 14, 9, 0, 13, 9, 12, 0),
115 gsSP2Triangles(12, 11, 15, 0, 12, 15, 16, 0),
116 gsSP2Triangles(17, 13, 12, 0, 17, 12, 16, 0),
117 gsSP2Triangles(18, 19, 20, 0, 18, 20, 21, 0),
118 gsSP2Triangles(20, 22, 23, 0, 20, 23, 21, 0),
119 gsSP2Triangles(24, 25, 21, 0, 24, 21, 23, 0),
120 gsSP2Triangles(25, 26, 18, 0, 25, 18, 21, 0),
121 gsSP2Triangles(27, 28, 29, 0, 27, 29, 30, 0),
122 gsSPVertex(&D_0A0006C0_E4B9A0[28], 8, 0),
123 gsSP2Triangles(0, 3, 4, 0, 0, 4, 1, 0),
124 gsSP2Triangles(4, 6, 5, 0, 4, 5, 1, 0),
125 gsSP2Triangles(5, 7, 2, 0, 5, 2, 1, 0),
126 gsSPEndDisplayList(),
127};
128#endif
129
131 gsDPPipeSync(),
132 gsDPSetCycleType(G_CYC_1CYCLE),
133 gsDPSetCombineMode(G_CC_SHADE, G_CC_SHADE),
134 gsSPTexture(0x0080, 0x0080, 0, G_TX_RENDERTILE, G_OFF),
135 gsSPClearGeometryMode(G_LIGHTING),
136 gsSPSetGeometryMode(G_CULL_BACK | G_SHADING_SMOOTH),
137 gsSPVertex(D_0A000370_E4B650, 30, 0),
138 gsSP2Triangles(0, 1, 2, 0, 0, 2, 3, 0),
139 gsSP2Triangles(2, 4, 5, 0, 2, 5, 3, 0),
140 gsSP2Triangles(1, 6, 7, 0, 1, 7, 2, 0),
141 gsSP2Triangles(7, 8, 4, 0, 7, 4, 2, 0),
142 gsSP2Triangles(9, 10, 11, 0, 9, 11, 12, 0),
143 gsSP2Triangles(11, 13, 14, 0, 11, 14, 12, 0),
144 gsSP2Triangles(15, 16, 12, 0, 15, 12, 14, 0),
145 gsSP2Triangles(16, 17, 9, 0, 16, 9, 12, 0),
146 gsSP2Triangles(18, 16, 19, 0, 18, 19, 20, 0),
147 gsSP2Triangles(16, 21, 22, 0, 16, 22, 19, 0),
148 gsSP2Triangles(22, 23, 24, 0, 22, 24, 19, 0),
149 gsSP2Triangles(24, 25, 20, 0, 24, 20, 19, 0),
150 gsSP2Triangles(26, 27, 28, 0, 26, 28, 29, 0),
151 gsSPVertex(&D_0A000370_E4B650[27], 26, 0),
152 gsSP2Triangles(0, 3, 4, 0, 0, 4, 1, 0),
153 gsSP2Triangles(4, 14, 5, 0, 4, 5, 1, 0),
154 gsSP2Triangles(5, 15, 2, 0, 5, 2, 1, 0),
155 gsSP2Triangles(6, 16, 7, 0, 6, 7, 8, 0),
156 gsSP2Triangles(7, 17, 18, 0, 7, 18, 8, 0),
157 gsSP2Triangles(8, 18, 19, 0, 8, 19, 20, 0),
158 gsSP2Triangles(9, 6, 8, 0, 9, 8, 20, 0),
159 gsSP2Triangles(10, 21, 22, 0, 10, 22, 23, 0),
160 gsSP2Triangles(11, 24, 10, 0, 11, 10, 23, 0),
161 gsSP2Triangles(12, 13, 23, 0, 12, 23, 22, 0),
162 gsSP2Triangles(13, 25, 11, 0, 13, 11, 23, 0),
163 gsSPEndDisplayList(),
164};
165
167 gsDPPipeSync(),
168 gsDPSetCycleType(G_CYC_1CYCLE),
169 gsSPDisplayList(Entity_SaveBlock_LoadTextureStar),
170 gsSPClearGeometryMode(G_LIGHTING | G_SHADING_SMOOTH),
171 gsSPSetGeometryMode(G_CULL_BACK),
172 gsSPVertex(D_0A000000_E4B2E0, 20, 0),
173 gsSP2Triangles(0, 1, 2, 0, 0, 2, 3, 0),
174 gsSP2Triangles(0, 3, 4, 0, 0, 5, 1, 0),
175 gsSP2Triangles(0, 4, 6, 0, 1, 7, 2, 0),
176 gsSP2Triangles(2, 8, 3, 0, 3, 9, 4, 0),
177 gsSP2Triangles(10, 11, 12, 0, 11, 13, 14, 0),
178 gsSP2Triangles(11, 14, 15, 0, 11, 15, 12, 0),
179 gsSP2Triangles(11, 16, 13, 0, 15, 17, 12, 0),
180 gsSP2Triangles(13, 18, 14, 0, 14, 19, 15, 0),
181 gsSPEndDisplayList(),
182};
183
185 gsSPDisplayList(Entity_SaveBlock_RenderStar),
186 gsSPEndDisplayList(),
187};
188
190 gsSPDisplayList(Entity_SaveBlock_RenderFaces),
191 gsSPDisplayList(Entity_SaveBlock_RenderLetterS),
192 gsSPEndDisplayList(),
193};
194
195#if VERSION_PAL
196Gfx Entity_SaveBlock_RenderBlock_es[] = {
197 gsSPDisplayList(Entity_SaveBlock_RenderFaces),
198 gsSPDisplayList(Entity_SaveBlock_RenderLetterG),
199 gsSPEndDisplayList(),
200};
201#endif
202
204 gsSPEndDisplayList(),
205};
Gfx Entity_SaveBlock_RenderNone[]
Definition SaveBlock.c:203
Gfx Entity_SaveBlock_RenderContent[]
Definition SaveBlock.c:184
Gfx Entity_SaveBlock_RenderBlock[]
Definition SaveBlock.c:189
#define INCLUDE_IMG(FILENAME, SYMBOLNAME)
Mtx Entity_SaveBlock_Mtx
Definition SaveBlock.c:67
Gfx Entity_SaveBlock_LoadTextureLetterS[]
Definition SaveBlock.c:41
Gfx Entity_SaveBlock_LoadTextureStar[]
Definition SaveBlock.c:10
Gfx Entity_SaveBlock_RenderLetterS[]
Definition SaveBlock.c:74
Gfx Entity_SaveBlock_RenderFaces[]
Definition SaveBlock.c:130
Gfx Entity_SaveBlock_LoadTextureFace[]
Definition SaveBlock.c:23
Gfx Entity_SaveBlock_RenderStar[]
Definition SaveBlock.c:166
#define RDP_MATRIX( Ax, Bx, Cx, Dx, Ay, By, Cy, Dy, Az, Bz, Cz, Dz, Aw, Bw, Cw, Dw)
Definition macros.h:233