Paper Mario DX
Paper Mario (N64) modding
 
Loading...
Searching...
No Matches
Tweester.c
Go to the documentation of this file.
1#include "common.h"
2#include "include_asset.h"
3
4#include "entity/model/Tweester_1.vtx.inc.c"
5#include "entity/model/Tweester_2.vtx.inc.c"
6#include "entity/model/Tweester_3.vtx.inc.c"
7#include "entity/model/Tweester_4.vtx.inc.c"
8
9INCLUDE_IMG("entity/model/Tweester_img1.png", D_0A000BF0_E57A50);
10INCLUDE_IMG("entity/model/Tweester_img2.png", D_0A000FF0_E57E50);
12 gsDPSetTextureLUT(G_TT_NONE),
13 gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON),
14 gsDPSetCombineMode(PM_CC_ALT_INTERFERENCE, G_CC_MODULATEIA2),
15 gsDPSetTextureDetail(G_TD_CLAMP),
16 gsDPSetTextureLOD(G_TL_TILE),
17 gsDPSetTextureImage(G_IM_FMT_I, G_IM_SIZ_8b, 32, D_0A000BF0_E57A50),
18 gsDPSetTile(G_IM_FMT_I, G_IM_SIZ_8b, 4, 0x0000, G_TX_LOADTILE, 0, G_TX_NOMIRROR | G_TX_WRAP, 5, G_TX_NOLOD, G_TX_NOMIRROR | G_TX_WRAP, 5, G_TX_NOLOD),
19 gsDPLoadSync(),
20 gsDPLoadTile(G_TX_LOADTILE, 0, 0, 0x007C, 0x007C),
21 gsDPPipeSync(),
22 gsDPSetTile(G_IM_FMT_I, G_IM_SIZ_8b, 4, 0x0000, G_TX_RENDERTILE, 0, G_TX_NOMIRROR | G_TX_WRAP, 5, G_TX_NOLOD, G_TX_NOMIRROR | G_TX_WRAP, 5, G_TX_NOLOD),
23 gsDPSetTileSize(G_TX_RENDERTILE, 0, 0, 0x007C, 0x007C),
24 gsDPSetTextureImage(G_IM_FMT_I, G_IM_SIZ_8b, 32, D_0A000FF0_E57E50),
25 gsDPSetTile(G_IM_FMT_I, G_IM_SIZ_8b, 4, 0x0080, G_TX_LOADTILE, 0, G_TX_NOMIRROR | G_TX_WRAP, 5, G_TX_NOLOD, G_TX_NOMIRROR | G_TX_WRAP, 5, G_TX_NOLOD),
26 gsDPLoadSync(),
27 gsDPLoadTile(G_TX_LOADTILE, 0, 0, 0x007C, 0x007C),
28 gsDPPipeSync(),
29 gsDPSetTile(G_IM_FMT_I, G_IM_SIZ_8b, 4, 0x0080, 1, 0, G_TX_NOMIRROR | G_TX_WRAP, 5, G_TX_NOLOD, G_TX_NOMIRROR | G_TX_WRAP, 5, G_TX_NOLOD),
30 gsDPSetTileSize(1, 0, 0, 0x007C, 0x007C),
31 gsDPSetTexturePersp(G_TP_PERSP),
32 gsDPSetTextureFilter(G_TF_BILERP),
33 gsSPEndDisplayList(),
34};
35
36INCLUDE_IMG("entity/model/Tweester_img3.png", D_0A0014A0_E58300);
37INCLUDE_PAL("entity/model/Tweester_img3.pal", D_0A0018A0_E58700);
39 gsDPSetTextureLUT(G_TT_RGBA16),
40 gsDPLoadTLUT_pal16(0, D_0A0018A0_E58700),
41 gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON),
42 gsDPSetCombineMode(G_CC_MODULATEIA, G_CC_MODULATEIA),
43 gsDPSetTextureDetail(G_TD_CLAMP),
44 gsDPSetTextureLOD(G_TL_TILE),
45 gsDPLoadTextureBlock_4b(D_0A0014A0_E58300, G_IM_FMT_CI, 64, 32, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_CLAMP, 6, 5, G_TX_NOLOD, G_TX_NOLOD),
46 gsDPSetTexturePersp(G_TP_PERSP),
47 gsDPSetTextureFilter(G_TF_BILERP),
48 gsSPEndDisplayList(),
49};
50
52 0.999848, 0.017457, 0.000000, 0.000000,
53 -0.01746, 0.999848, 0.000000, 0.000000,
54 0.000000, 0.000000, 1.000000, 0.000000,
55 0.000000, 0.000000, 0.000000, 1.000000
56);
57
59 1.199997, 0.000000, 0.000000, 0.000000,
60 0.000000, 0.899994, 0.000000, 0.000000,
61 0.000000, 0.000000, 1.199997, 0.000000,
62 0.000000, 0.000000, 0.000000, 1.000000
63);
64
66 gsDPPipeSync(),
67 gsDPSetCycleType(G_CYC_2CYCLE),
68 gsDPSetRenderMode(G_RM_PASS, G_RM_AA_ZB_XLU_SURF2),
69 gsSPDisplayList(Entity_Tweester_LoadTextures),
70 gsSPClearGeometryMode(G_LIGHTING),
71 gsSPSetGeometryMode(G_CULL_BACK | G_SHADING_SMOOTH),
72 gsSPVertex(D_0A000860_E576C0, 30, 0),
73 gsSP2Triangles(0, 1, 2, 0, 3, 1, 4, 0),
74 gsSP2Triangles(5, 1, 6, 0, 7, 1, 8, 0),
75 gsSP2Triangles(9, 1, 10, 0, 11, 1, 12, 0),
76 gsSP2Triangles(13, 1, 14, 0, 15, 1, 16, 0),
77 gsSP2Triangles(17, 18, 2, 0, 17, 2, 19, 0),
78 gsSP2Triangles(20, 21, 17, 0, 20, 17, 19, 0),
79 gsSP2Triangles(22, 23, 24, 0, 22, 24, 25, 0),
80 gsSP2Triangles(24, 26, 14, 0, 24, 14, 25, 0),
81 gsSP2Triangles(27, 28, 12, 0, 27, 12, 29, 0),
82 gsSPVertex(&D_0A000860_E576C0[4], 1, 0),
83 gsSPVertex(&D_0A000860_E576C0[6], 1, 1),
84 gsSPVertex(&D_0A000860_E576C0[8], 1, 2),
85 gsSPVertex(&D_0A000860_E576C0[16], 1, 3),
86 gsSPVertex(&D_0A000860_E576C0[27], 1, 4),
87 gsSPVertex(&D_0A000860_E576C0[29], 27, 5),
88 gsSP2Triangles(6, 17, 3, 0, 6, 3, 18, 0),
89 gsSP2Triangles(7, 19, 6, 0, 7, 6, 18, 0),
90 gsSP2Triangles(8, 20, 4, 0, 8, 4, 5, 0),
91 gsSP2Triangles(9, 21, 10, 0, 9, 10, 22, 0),
92 gsSP2Triangles(10, 23, 0, 0, 10, 0, 22, 0),
93 gsSP2Triangles(11, 24, 12, 0, 11, 12, 25, 0),
94 gsSP2Triangles(12, 26, 1, 0, 12, 1, 25, 0),
95 gsSP2Triangles(13, 27, 2, 0, 13, 2, 28, 0),
96 gsSP2Triangles(14, 29, 13, 0, 14, 13, 28, 0),
97 gsSP2Triangles(15, 30, 16, 0, 15, 16, 31, 0),
98 gsSPVertex(&D_0A000860_E576C0[10], 1, 0),
99 gsSPVertex(&D_0A000860_E576C0[40], 1, 1),
100 gsSPVertex(&D_0A000860_E576C0[55], 2, 2),
101 gsSP2Triangles(1, 3, 0, 0, 1, 0, 2, 0),
102 gsSPEndDisplayList(),
103};
104
106 gsDPPipeSync(),
107 gsDPSetCycleType(G_CYC_1CYCLE),
108 gsDPSetRenderMode(G_RM_AA_ZB_TEX_EDGE, G_RM_AA_ZB_TEX_EDGE2),
109 gsSPClearGeometryMode(G_LIGHTING),
110 gsSPSetGeometryMode(G_CULL_BACK | G_SHADING_SMOOTH),
111 gsSPVertex(D_0A000820_E57680, 4, 0),
112 gsSP2Triangles(0, 1, 2, 0, 0, 2, 3, 0),
113 gsSPEndDisplayList(),
114};
115
117 gsSPDisplayList(D_0A001B10_E58970),
118 gsSPDisplayList(D_0A0019E8_E58848),
119 gsSPEndDisplayList(),
120};
121
123 gsDPPipeSync(),
124 gsDPSetCycleType(G_CYC_2CYCLE),
125 gsDPSetRenderMode(G_RM_PASS, G_RM_AA_ZB_XLU_SURF2),
126 gsSPClearGeometryMode(G_CULL_BACK | G_LIGHTING),
127 gsSPSetGeometryMode(G_SHADING_SMOOTH),
128 gsSPVertex(D_0A000410_E57270, 31, 0),
129 gsSP2Triangles(0, 1, 2, 0, 0, 2, 3, 0),
130 gsSP2Triangles(1, 4, 2, 0, 5, 0, 3, 0),
131 gsSP2Triangles(5, 3, 6, 0, 7, 8, 5, 0),
132 gsSP2Triangles(7, 5, 6, 0, 9, 7, 10, 0),
133 gsSP2Triangles(9, 10, 11, 0, 12, 13, 14, 0),
134 gsSP2Triangles(12, 14, 15, 0, 13, 16, 14, 0),
135 gsSP2Triangles(10, 12, 15, 0, 10, 15, 11, 0),
136 gsSP2Triangles(17, 18, 19, 0, 17, 19, 20, 0),
137 gsSP2Triangles(18, 21, 22, 0, 18, 22, 23, 0),
138 gsSP2Triangles(19, 24, 25, 0, 19, 25, 20, 0),
139 gsSP2Triangles(26, 27, 28, 0, 29, 26, 28, 0),
140 gsSP2Triangles(29, 28, 30, 0, 22, 29, 30, 0),
141 gsSP1Triangle(22, 30, 23, 0),
142 gsSPVertex(&D_0A000410_E57270[9], 1, 0),
143 gsSPVertex(&D_0A000410_E57270[21], 1, 1),
144 gsSPVertex(&D_0A000410_E57270[24], 2, 2),
145 gsSPVertex(&D_0A000410_E57270[31], 14, 4),
146 gsSPVertex(&D_0A000410_E57270[47], 14, 18),
147 gsSP2Triangles(1, 4, 13, 0, 1, 13, 18, 0),
148 gsSP2Triangles(2, 5, 19, 0, 2, 19, 3, 0),
149 gsSP2Triangles(5, 20, 19, 0, 6, 0, 16, 0),
150 gsSP2Triangles(6, 16, 21, 0, 7, 8, 22, 0),
151 gsSP2Triangles(7, 22, 23, 0, 8, 9, 24, 0),
152 gsSP2Triangles(8, 24, 22, 0, 9, 25, 24, 0),
153 gsSP2Triangles(4, 10, 7, 0, 4, 7, 23, 0),
154 gsSP2Triangles(10, 6, 17, 0, 10, 17, 26, 0),
155 gsSP2Triangles(11, 12, 27, 0, 11, 27, 28, 0),
156 gsSP2Triangles(12, 29, 27, 0, 13, 11, 28, 0),
157 gsSP2Triangles(13, 28, 18, 0, 14, 30, 31, 0),
158 gsSPVertex(&D_0A000410_E57270[41], 6, 0),
159 gsSPVertex(&D_0A000410_E57270[50], 1, 6),
160 gsSPVertex(&D_0A000410_E57270[55], 1, 7),
161 gsSPVertex(&D_0A000410_E57270[60], 5, 8),
162 gsSP2Triangles(1, 0, 8, 0, 1, 8, 9, 0),
163 gsSP2Triangles(2, 1, 9, 0, 2, 9, 6, 0),
164 gsSP2Triangles(3, 4, 10, 0, 3, 10, 7, 0),
165 gsSP2Triangles(4, 5, 11, 0, 4, 11, 10, 0),
166 gsSP1Triangle(5, 12, 11, 0),
167 gsSPEndDisplayList(),
168};
169
171 gsSPMatrix(&Entity_Tweester_mtxOuterWhirl, G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW),
172 gsSPDisplayList(Entity_Tweester_RenderOuterWhirl),
173 gsSPPopMatrix(G_MTX_MODELVIEW),
174 gsSPEndDisplayList(),
175};
176
178 gsDPPipeSync(),
179 gsDPSetCycleType(G_CYC_2CYCLE),
180 gsDPSetRenderMode(G_RM_PASS, G_RM_AA_ZB_XLU_SURF2),
181 gsSPClearGeometryMode(G_CULL_BACK | G_LIGHTING),
182 gsSPSetGeometryMode(G_SHADING_SMOOTH),
183 gsSPVertex(D_0A000000_E56E60, 31, 0),
184 gsSP2Triangles(0, 1, 2, 0, 0, 2, 3, 0),
185 gsSP2Triangles(1, 4, 2, 0, 5, 0, 3, 0),
186 gsSP2Triangles(5, 3, 6, 0, 7, 8, 5, 0),
187 gsSP2Triangles(7, 5, 6, 0, 9, 7, 10, 0),
188 gsSP2Triangles(9, 10, 11, 0, 12, 13, 14, 0),
189 gsSP2Triangles(12, 14, 15, 0, 13, 16, 14, 0),
190 gsSP2Triangles(10, 12, 15, 0, 10, 15, 11, 0),
191 gsSP2Triangles(17, 18, 19, 0, 17, 19, 20, 0),
192 gsSP2Triangles(18, 21, 22, 0, 18, 22, 23, 0),
193 gsSP2Triangles(19, 24, 25, 0, 19, 25, 20, 0),
194 gsSP2Triangles(26, 27, 28, 0, 29, 26, 28, 0),
195 gsSP2Triangles(29, 28, 30, 0, 22, 29, 30, 0),
196 gsSP1Triangle(22, 30, 23, 0),
197 gsSPVertex(&D_0A000000_E56E60[9], 1, 0),
198 gsSPVertex(&D_0A000000_E56E60[21], 1, 1),
199 gsSPVertex(&D_0A000000_E56E60[24], 2, 2),
200 gsSPVertex(&D_0A000000_E56E60[31], 14, 4),
201 gsSPVertex(&D_0A000000_E56E60[47], 14, 18),
202 gsSP2Triangles(1, 4, 13, 0, 1, 13, 18, 0),
203 gsSP2Triangles(2, 5, 19, 0, 2, 19, 3, 0),
204 gsSP2Triangles(5, 20, 19, 0, 6, 0, 16, 0),
205 gsSP2Triangles(6, 16, 21, 0, 7, 8, 22, 0),
206 gsSP2Triangles(7, 22, 23, 0, 8, 9, 24, 0),
207 gsSP2Triangles(8, 24, 22, 0, 9, 25, 24, 0),
208 gsSP2Triangles(4, 10, 7, 0, 4, 7, 23, 0),
209 gsSP2Triangles(10, 6, 17, 0, 10, 17, 26, 0),
210 gsSP2Triangles(11, 12, 27, 0, 11, 27, 28, 0),
211 gsSP2Triangles(12, 29, 27, 0, 13, 11, 28, 0),
212 gsSP2Triangles(13, 28, 18, 0, 14, 30, 31, 0),
213 gsSPVertex(&D_0A000000_E56E60[41], 6, 0),
214 gsSPVertex(&D_0A000000_E56E60[50], 1, 6),
215 gsSPVertex(&D_0A000000_E56E60[55], 1, 7),
216 gsSPVertex(&D_0A000000_E56E60[60], 5, 8),
217 gsSP2Triangles(1, 0, 8, 0, 1, 8, 9, 0),
218 gsSP2Triangles(2, 1, 9, 0, 2, 9, 6, 0),
219 gsSP2Triangles(3, 4, 10, 0, 3, 10, 7, 0),
220 gsSP2Triangles(4, 5, 11, 0, 4, 11, 10, 0),
221 gsSP1Triangle(5, 12, 11, 0),
222 gsSPEndDisplayList(),
223};
224
226 gsSPDisplayList(D_0A001B50_E589B0),
227 gsSPEndDisplayList(),
228};
#define INCLUDE_PAL(FILENAME, SYMBOLNAME)
#define INCLUDE_IMG(FILENAME, SYMBOLNAME)
Gfx Entity_Tweester_LoadTextureFace[]
Definition Tweester.c:38
Mtx Entity_Tweester_mtxInnerWhirl
Definition Tweester.c:51
Gfx D_0A0019E8_E58848[]
Definition Tweester.c:65
Gfx D_0A001CD0_E58B30[]
Definition Tweester.c:170
Gfx D_0A001B10_E58970[]
Definition Tweester.c:105
Mtx Entity_Tweester_mtxOuterWhirl
Definition Tweester.c:58
Gfx Entity_Tweester_LoadTextures[]
Definition Tweester.c:11
Gfx D_0A001B50_E589B0[]
Definition Tweester.c:116
Gfx Entity_Tweester_Render[]
Definition Tweester.c:225
unsigned char D_0A000FF0_E57E50[]
unsigned char D_0A0014A0_E58300[]
unsigned char D_0A0018A0_E58700[]
Gfx Entity_Tweester_RenderOuterWhirl[]
Definition Tweester.c:122
unsigned char D_0A000BF0_E57A50[]
Gfx Entity_Tweester_RenderInnerWhirl[]
Definition Tweester.c:177
#define RDP_MATRIX( Ax, Bx, Cx, Dx, Ay, By, Cy, Dy, Az, Bz, Cz, Dz, Aw, Bw, Cw, Dw)
Definition macros.h:233
#define PM_CC_ALT_INTERFERENCE
Definition macros.h:376