Paper Mario DX
Paper Mario (N64) modding
 
Loading...
Searching...
No Matches
Padlock.c File Reference

Go to the source code of this file.

Functions

 INCLUDE_IMG ("entity/model/Padlock_face.png", D_0A000700_E5B250)
 
 INCLUDE_PAL ("entity/model/Padlock_face.pal", D_0A000B00_E5B650)
 
 INCLUDE_IMG ("entity/model/Padlock_keyhole.png", D_0A000DA8_E5B8F8)
 
 INCLUDE_PAL ("entity/model/Padlock_keyhole.pal", D_0A0015A8_E5C0F8)
 
 INCLUDE_IMG ("entity/model/Padlock_body.png", D_0A001850_E5C3A0)
 
 INCLUDE_PAL ("entity/model/Padlock_body.pal", D_0A001C50_E5C7A0)
 

Variables

Gfx Entity_Padlock_LoadTextureFace []
 
Gfx Entity_Padlock_LoadTextureKeyhole []
 
Gfx Entity_Padlock_LoadTextureBody []
 
Mtx Entity_Padlock_mtxShackle
 
Gfx Entity_Padlock_RenderShackleMain []
 
Gfx Entity_Padlock_RenderShackle []
 
Gfx Entity_Padlock_RenderKeyhole []
 
Gfx Entity_Padlock_RenderFace []
 
Gfx Entity_Padlock_RenderBody []
 
Gfx Entity_Padlock_Render []
 

Function Documentation

◆ INCLUDE_IMG() [1/3]

INCLUDE_IMG ( "entity/model/Padlock_face.png" ,
D_0A000700_E5B250  )

◆ INCLUDE_PAL() [1/3]

INCLUDE_PAL ( "entity/model/Padlock_face.pal" ,
D_0A000B00_E5B650  )

◆ INCLUDE_IMG() [2/3]

INCLUDE_IMG ( "entity/model/Padlock_keyhole.png" ,
D_0A000DA8_E5B8F8  )

◆ INCLUDE_PAL() [2/3]

INCLUDE_PAL ( "entity/model/Padlock_keyhole.pal" ,
D_0A0015A8_E5C0F8  )

◆ INCLUDE_IMG() [3/3]

INCLUDE_IMG ( "entity/model/Padlock_body.png" ,
D_0A001850_E5C3A0  )

◆ INCLUDE_PAL() [3/3]

INCLUDE_PAL ( "entity/model/Padlock_body.pal" ,
D_0A001C50_E5C7A0  )

Variable Documentation

◆ Entity_Padlock_LoadTextureFace

Gfx Entity_Padlock_LoadTextureFace[]
Initial value:
= {
gsDPSetTextureLUT(G_TT_RGBA16),
gsDPLoadTLUT_pal256(D_0A000B00_E5B650),
gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON),
gsDPSetCombineMode(G_CC_MODULATEIA, G_CC_MODULATEIA),
gsDPSetTextureDetail(G_TD_CLAMP),
gsDPSetTextureLOD(G_TL_TILE),
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),
gsDPSetTexturePersp(G_TP_PERSP),
gsDPSetTextureFilter(G_TF_BILERP),
gsSPEndDisplayList(),
}

Definition at line 11 of file Padlock.c.

11 {
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};

◆ Entity_Padlock_LoadTextureKeyhole

Gfx Entity_Padlock_LoadTextureKeyhole[]
Initial value:
= {
gsDPSetTextureLUT(G_TT_RGBA16),
gsDPLoadTLUT_pal256(D_0A0015A8_E5C0F8),
gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON),
gsDPSetCombineMode(G_CC_MODULATEIA, G_CC_MODULATEIA),
gsDPSetTextureDetail(G_TD_CLAMP),
gsDPSetTextureLOD(G_TL_TILE),
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),
gsDPSetTexturePersp(G_TP_PERSP),
gsDPSetTextureFilter(G_TF_BILERP),
gsSPEndDisplayList(),
}

Definition at line 26 of file Padlock.c.

26 {
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};

◆ Entity_Padlock_LoadTextureBody

Gfx Entity_Padlock_LoadTextureBody[]
Initial value:
= {
gsDPSetTextureLUT(G_TT_RGBA16),
gsDPLoadTLUT_pal256(D_0A001C50_E5C7A0),
gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON),
gsDPSetCombineMode(G_CC_MODULATEIA, G_CC_MODULATEIA),
gsDPSetTextureDetail(G_TD_CLAMP),
gsDPSetTextureLOD(G_TL_TILE),
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),
gsDPSetTexturePersp(G_TP_PERSP),
gsDPSetTextureFilter(G_TF_BILERP),
gsSPEndDisplayList(),
}

Definition at line 41 of file Padlock.c.

41 {
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};

◆ Entity_Padlock_mtxShackle

Mtx Entity_Padlock_mtxShackle
Initial value:
1.000000, 0.000000, 0.000000, 0.000000,
0.000000, 1.000000, 0.000000, 22.500000,
0.000000, 0.000000, 1.000000, 0.000000,
0.000000, 0.000000, 0.000000, 1.000000
)
#define RDP_MATRIX( Ax, Bx, Cx, Dx, Ay, By, Cy, Dy, Az, Bz, Cz, Dz, Aw, Bw, Cw, Dw)
Definition macros.h:233

Definition at line 54 of file Padlock.c.

Referenced by entity_Padlock_init().

◆ Entity_Padlock_RenderShackleMain

Gfx Entity_Padlock_RenderShackleMain[]
Initial value:
= {
gsDPPipeSync(),
gsDPSetCycleType(G_CYC_1CYCLE),
gsDPSetRenderMode(G_RM_AA_ZB_OPA_SURF, G_RM_AA_ZB_OPA_SURF2),
gsDPSetCombineMode(G_CC_SHADE, G_CC_SHADE),
gsSPTexture(0x0080, 0x0080, 0, G_TX_RENDERTILE, G_OFF),
gsSPClearGeometryMode(G_CULL_BACK | G_LIGHTING),
gsSPSetGeometryMode(G_SHADING_SMOOTH),
gsSPVertex(D_0A000660_E5B1B0, 10, 0),
gsSP2Triangles(0, 1, 2, 0, 0, 2, 3, 0),
gsSP2Triangles(1, 4, 5, 0, 1, 5, 2, 0),
gsSP2Triangles(6, 0, 3, 0, 6, 3, 7, 0),
gsSP2Triangles(8, 9, 6, 0, 8, 6, 7, 0),
gsSPEndDisplayList(),
}

Definition at line 61 of file Padlock.c.

61 {
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};

◆ Entity_Padlock_RenderShackle

Gfx Entity_Padlock_RenderShackle[]
Initial value:
= {
gsSPEndDisplayList(),
}
Gfx Entity_Padlock_RenderShackleMain[]
Definition Padlock.c:61

Definition at line 77 of file Padlock.c.

77 {
78 gsSPDisplayList(Entity_Padlock_RenderShackleMain),
79 gsSPEndDisplayList(),
80};

Referenced by entity_Padlock_init().

◆ Entity_Padlock_RenderKeyhole

Gfx Entity_Padlock_RenderKeyhole[]
Initial value:
= {
gsDPPipeSync(),
gsDPSetCycleType(G_CYC_1CYCLE),
gsDPSetRenderMode(G_RM_AA_ZB_XLU_DECAL, G_RM_AA_ZB_XLU_DECAL2),
gsSPClearGeometryMode(G_LIGHTING | G_SHADING_SMOOTH),
gsSPSetGeometryMode(G_CULL_BACK),
gsSPVertex(D_0A000620_E5B170, 4, 0),
gsSP2Triangles(0, 1, 2, 0, 0, 2, 3, 0),
gsSPEndDisplayList(),
}
Gfx Entity_Padlock_LoadTextureKeyhole[]
Definition Padlock.c:26

Definition at line 82 of file Padlock.c.

82 {
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};

◆ Entity_Padlock_RenderFace

Gfx Entity_Padlock_RenderFace[]
Initial value:
= {
gsDPPipeSync(),
gsDPSetCycleType(G_CYC_1CYCLE),
gsDPSetRenderMode(G_RM_AA_ZB_OPA_SURF, G_RM_AA_ZB_OPA_SURF2),
gsSPClearGeometryMode(G_LIGHTING),
gsSPSetGeometryMode(G_CULL_BACK | G_SHADING_SMOOTH),
gsSPVertex(D_0A0005C0_E5B110, 6, 0),
gsSP2Triangles(0, 1, 2, 0, 0, 2, 3, 0),
gsSP2Triangles(0, 3, 4, 0, 0, 4, 5, 0),
gsSPEndDisplayList(),
}
Gfx Entity_Padlock_LoadTextureFace[]
Definition Padlock.c:11

Definition at line 94 of file Padlock.c.

94 {
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};

◆ Entity_Padlock_RenderBody

Gfx Entity_Padlock_RenderBody[]

Definition at line 107 of file Padlock.c.

107 {
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};
Gfx Entity_Padlock_LoadTextureBody[]
Definition Padlock.c:41

◆ Entity_Padlock_Render

Gfx Entity_Padlock_Render[]
Initial value:
= {
gsSPDisplayList(Entity_Padlock_RenderBody),
gsSPDisplayList(Entity_Padlock_RenderFace),
gsSPDisplayList(Entity_Padlock_RenderKeyhole),
gsSPEndDisplayList(),
}
Gfx Entity_Padlock_RenderFace[]
Definition Padlock.c:94
Gfx Entity_Padlock_RenderKeyhole[]
Definition Padlock.c:82
Gfx Entity_Padlock_RenderBody[]
Definition Padlock.c:107

Definition at line 167 of file Padlock.c.

167 {
168 gsSPDisplayList(Entity_Padlock_RenderBody),
169 gsSPDisplayList(Entity_Padlock_RenderFace),
170 gsSPDisplayList(Entity_Padlock_RenderKeyhole),
171 gsSPEndDisplayList(),
172};