Paper Mario DX
Paper Mario (N64) modding
 
Loading...
Searching...
No Matches
Padlock.c
Go to the documentation of this file.
1#include "common.h"
2#include "include_asset.h"
3
4#include "entity/model/Padlock_1.vtx.inc.c"
5#include "entity/model/Padlock_2.vtx.inc.c"
6#include "entity/model/Padlock_3.vtx.inc.c"
7#include "entity/model/Padlock_4.vtx.inc.c"
8
9INCLUDE_IMG("entity/model/Padlock_face.png", D_0A000700_E5B250);
10INCLUDE_PAL("entity/model/Padlock_face.pal", D_0A000B00_E5B650);
12 gsDPSetTextureLUT(G_TT_RGBA16),
13 gsDPLoadTLUT_pal256(D_0A000B00_E5B650),
14 gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON),
15 gsDPSetCombineMode(G_CC_MODULATEIA, G_CC_MODULATEIA),
16 gsDPSetTextureDetail(G_TD_CLAMP),
17 gsDPSetTextureLOD(G_TL_TILE),
18 gsDPLoadTextureBlock(D_0A000700_E5B250, G_IM_FMT_CI, G_IM_SIZ_8b, 32, 32, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, 5, 5, G_TX_NOLOD, G_TX_NOLOD),
19 gsDPSetTexturePersp(G_TP_PERSP),
20 gsDPSetTextureFilter(G_TF_BILERP),
21 gsSPEndDisplayList(),
22};
23
24INCLUDE_IMG("entity/model/Padlock_keyhole.png", D_0A000DA8_E5B8F8);
25INCLUDE_PAL("entity/model/Padlock_keyhole.pal", D_0A0015A8_E5C0F8);
27 gsDPSetTextureLUT(G_TT_RGBA16),
28 gsDPLoadTLUT_pal256(D_0A0015A8_E5C0F8),
29 gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON),
30 gsDPSetCombineMode(G_CC_MODULATEIA, G_CC_MODULATEIA),
31 gsDPSetTextureDetail(G_TD_CLAMP),
32 gsDPSetTextureLOD(G_TL_TILE),
33 gsDPLoadTextureBlock(D_0A000DA8_E5B8F8, G_IM_FMT_CI, G_IM_SIZ_8b, 32, 64, 0, G_TX_MIRROR | G_TX_WRAP, G_TX_MIRROR | G_TX_WRAP, 5, 6, G_TX_NOLOD, G_TX_NOLOD),
34 gsDPSetTexturePersp(G_TP_PERSP),
35 gsDPSetTextureFilter(G_TF_BILERP),
36 gsSPEndDisplayList(),
37};
38
39INCLUDE_IMG("entity/model/Padlock_body.png", D_0A001850_E5C3A0);
40INCLUDE_PAL("entity/model/Padlock_body.pal", D_0A001C50_E5C7A0);
42 gsDPSetTextureLUT(G_TT_RGBA16),
43 gsDPLoadTLUT_pal256(D_0A001C50_E5C7A0),
44 gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON),
45 gsDPSetCombineMode(G_CC_MODULATEIA, G_CC_MODULATEIA),
46 gsDPSetTextureDetail(G_TD_CLAMP),
47 gsDPSetTextureLOD(G_TL_TILE),
48 gsDPLoadTextureBlock(D_0A001850_E5C3A0, G_IM_FMT_CI, G_IM_SIZ_8b, 32, 32, 0, G_TX_MIRROR | G_TX_WRAP, G_TX_MIRROR | G_TX_WRAP, 5, 5, G_TX_NOLOD, G_TX_NOLOD),
49 gsDPSetTexturePersp(G_TP_PERSP),
50 gsDPSetTextureFilter(G_TF_BILERP),
51 gsSPEndDisplayList(),
52};
53
55 1.000000, 0.000000, 0.000000, 0.000000,
56 0.000000, 1.000000, 0.000000, 22.500000,
57 0.000000, 0.000000, 1.000000, 0.000000,
58 0.000000, 0.000000, 0.000000, 1.000000
59);
60
62 gsDPPipeSync(),
63 gsDPSetCycleType(G_CYC_1CYCLE),
64 gsDPSetRenderMode(G_RM_AA_ZB_OPA_SURF, G_RM_AA_ZB_OPA_SURF2),
65 gsDPSetCombineMode(G_CC_SHADE, G_CC_SHADE),
66 gsSPTexture(0x0080, 0x0080, 0, G_TX_RENDERTILE, G_OFF),
67 gsSPClearGeometryMode(G_CULL_BACK | G_LIGHTING),
68 gsSPSetGeometryMode(G_SHADING_SMOOTH),
69 gsSPVertex(D_0A000660_E5B1B0, 10, 0),
70 gsSP2Triangles(0, 1, 2, 0, 0, 2, 3, 0),
71 gsSP2Triangles(1, 4, 5, 0, 1, 5, 2, 0),
72 gsSP2Triangles(6, 0, 3, 0, 6, 3, 7, 0),
73 gsSP2Triangles(8, 9, 6, 0, 8, 6, 7, 0),
74 gsSPEndDisplayList(),
75};
76
78 gsSPDisplayList(Entity_Padlock_RenderShackleMain),
79 gsSPEndDisplayList(),
80};
81
83 gsDPPipeSync(),
84 gsDPSetCycleType(G_CYC_1CYCLE),
85 gsDPSetRenderMode(G_RM_AA_ZB_XLU_DECAL, G_RM_AA_ZB_XLU_DECAL2),
86 gsSPDisplayList(Entity_Padlock_LoadTextureKeyhole),
87 gsSPClearGeometryMode(G_LIGHTING | G_SHADING_SMOOTH),
88 gsSPSetGeometryMode(G_CULL_BACK),
89 gsSPVertex(D_0A000620_E5B170, 4, 0),
90 gsSP2Triangles(0, 1, 2, 0, 0, 2, 3, 0),
91 gsSPEndDisplayList(),
92};
93
95 gsDPPipeSync(),
96 gsDPSetCycleType(G_CYC_1CYCLE),
97 gsDPSetRenderMode(G_RM_AA_ZB_OPA_SURF, G_RM_AA_ZB_OPA_SURF2),
98 gsSPDisplayList(Entity_Padlock_LoadTextureFace),
99 gsSPClearGeometryMode(G_LIGHTING),
100 gsSPSetGeometryMode(G_CULL_BACK | G_SHADING_SMOOTH),
101 gsSPVertex(D_0A0005C0_E5B110, 6, 0),
102 gsSP2Triangles(0, 1, 2, 0, 0, 2, 3, 0),
103 gsSP2Triangles(0, 3, 4, 0, 0, 4, 5, 0),
104 gsSPEndDisplayList(),
105};
106
108 gsDPPipeSync(),
109 gsDPSetCycleType(G_CYC_1CYCLE),
110 gsDPSetRenderMode(G_RM_AA_ZB_OPA_SURF, G_RM_AA_ZB_OPA_SURF2),
111 gsSPDisplayList(Entity_Padlock_LoadTextureBody),
112 gsSPClearGeometryMode(G_LIGHTING),
113 gsSPSetGeometryMode(G_CULL_BACK | G_SHADING_SMOOTH),
114 gsSPVertex(D_0A000000_E5AB50, 32, 0),
115 gsSP2Triangles(0, 1, 2, 0, 0, 2, 3, 0),
116 gsSP2Triangles(3, 2, 4, 0, 3, 4, 5, 0),
117 gsSP2Triangles(6, 7, 8, 0, 6, 8, 9, 0),
118 gsSP2Triangles(7, 10, 11, 0, 7, 11, 8, 0),
119 gsSP2Triangles(12, 13, 14, 0, 12, 14, 15, 0),
120 gsSP2Triangles(16, 17, 12, 0, 16, 12, 18, 0),
121 gsSP2Triangles(14, 19, 20, 0, 14, 20, 21, 0),
122 gsSP2Triangles(14, 21, 22, 0, 14, 22, 23, 0),
123 gsSP2Triangles(24, 25, 26, 0, 24, 26, 27, 0),
124 gsSP2Triangles(24, 27, 28, 0, 24, 28, 29, 0),
125 gsSPVertex(&D_0A000000_E5AB50[1], 1, 1),
126 gsSPVertex(&D_0A000000_E5AB50[17], 1, 2),
127 gsSPVertex(&D_0A000000_E5AB50[23], 1, 3),
128 gsSPVertex(&D_0A000000_E5AB50[27], 2, 4),
129 gsSPVertex(&D_0A000000_E5AB50[30], 11, 6),
130 gsSPVertex(&D_0A000000_E5AB50[54], 13, 17),
131 gsSP2Triangles(4, 6, 7, 0, 4, 7, 8, 0),
132 gsSP2Triangles(7, 9, 10, 0, 7, 10, 17, 0),
133 gsSP2Triangles(10, 14, 18, 0, 10, 18, 19, 0),
134 gsSP2Triangles(10, 19, 8, 0, 10, 8, 17, 0),
135 gsSP2Triangles(11, 20, 1, 0, 11, 1, 0, 0),
136 gsSP2Triangles(12, 21, 22, 0, 12, 22, 2, 0),
137 gsSP2Triangles(13, 12, 23, 0, 13, 23, 24, 0),
138 gsSP2Triangles(9, 25, 26, 0, 9, 26, 27, 0),
139 gsSP2Triangles(14, 27, 15, 0, 14, 15, 18, 0),
140 gsSP2Triangles(15, 28, 5, 0, 15, 5, 19, 0),
141 gsSP2Triangles(16, 13, 29, 0, 16, 29, 3, 0),
142 gsSPVertex(&D_0A000000_E5AB50[6], 1, 0),
143 gsSPVertex(&D_0A000000_E5AB50[9], 1, 1),
144 gsSPVertex(&D_0A000000_E5AB50[19], 4, 2),
145 gsSPVertex(&D_0A000000_E5AB50[24], 3, 6),
146 gsSPVertex(&D_0A000000_E5AB50[29], 1, 9),
147 gsSPVertex(&D_0A000000_E5AB50[41], 9, 10),
148 gsSPVertex(&D_0A000000_E5AB50[67], 13, 19),
149 gsSP2Triangles(10, 19, 11, 0, 10, 11, 20, 0),
150 gsSP2Triangles(11, 17, 21, 0, 11, 21, 20, 0),
151 gsSP2Triangles(12, 22, 0, 0, 12, 0, 1, 0),
152 gsSP2Triangles(2, 13, 23, 0, 2, 23, 3, 0),
153 gsSP2Triangles(4, 14, 24, 0, 4, 24, 5, 0),
154 gsSP2Triangles(6, 9, 15, 0, 6, 15, 25, 0),
155 gsSP2Triangles(7, 16, 26, 0, 7, 26, 8, 0),
156 gsSP2Triangles(17, 27, 28, 0, 17, 28, 21, 0),
157 gsSP2Triangles(18, 29, 30, 0, 18, 30, 31, 0),
158 gsSPVertex(&D_0A000000_E5AB50[50], 4, 0),
159 gsSPVertex(&D_0A000000_E5AB50[80], 12, 4),
160 gsSP2Triangles(0, 4, 5, 0, 0, 5, 6, 0),
161 gsSP2Triangles(1, 7, 8, 0, 1, 8, 9, 0),
162 gsSP2Triangles(2, 10, 11, 0, 2, 11, 12, 0),
163 gsSP2Triangles(3, 13, 14, 0, 3, 14, 15, 0),
164 gsSPEndDisplayList(),
165};
166
168 gsSPDisplayList(Entity_Padlock_RenderBody),
169 gsSPDisplayList(Entity_Padlock_RenderFace),
170 gsSPDisplayList(Entity_Padlock_RenderKeyhole),
171 gsSPEndDisplayList(),
172};
Gfx Entity_Padlock_RenderShackle[]
Definition Padlock.c:77
Gfx Entity_Padlock_Render[]
Definition Padlock.c:167
Mtx Entity_Padlock_mtxShackle
Definition Padlock.c:54
#define INCLUDE_PAL(FILENAME, SYMBOLNAME)
#define INCLUDE_IMG(FILENAME, SYMBOLNAME)
Gfx Entity_Padlock_LoadTextureBody[]
Definition Padlock.c:41
Gfx Entity_Padlock_RenderShackleMain[]
Definition Padlock.c:61
Gfx Entity_Padlock_RenderFace[]
Definition Padlock.c:94
Gfx Entity_Padlock_RenderKeyhole[]
Definition Padlock.c:82
Gfx Entity_Padlock_RenderBody[]
Definition Padlock.c:107
Gfx Entity_Padlock_LoadTextureFace[]
Definition Padlock.c:11
Gfx Entity_Padlock_LoadTextureKeyhole[]
Definition Padlock.c:26
#define RDP_MATRIX( Ax, Bx, Cx, Dx, Ay, By, Cy, Dy, Az, Bz, Cz, Dz, Aw, Bw, Cw, Dw)
Definition macros.h:233