Paper Mario DX
Paper Mario (N64) modding
Loading...
Searching...
No Matches
RedSwitch.c
Go to the documentation of this file.
1
#include "common.h"
2
#include "
include_asset.h
"
3
4
#include "entity/model/RedSwitch_1.vtx.inc.c"
5
#include "entity/model/RedSwitch_2.vtx.inc.c"
6
#include "entity/model/RedSwitch_3.vtx.inc.c"
7
8
INCLUDE_IMG
(
"entity/model/RedSwitch_tex.png"
,
D_0A0005D0_E63090
);
9
INCLUDE_PAL
(
"entity/model/RedSwitch_tex.pal"
,
D_0A0006D0_E63190
);
10
Gfx
Entity_RedSwitch_LoadTexture
[] = {
11
gsDPSetTextureLUT
(
G_TT_RGBA16
),
12
gsDPLoadTLUT_pal256
(
D_0A0006D0_E63190
),
13
gsSPTexture
(0xFFFF, 0xFFFF, 0,
G_TX_RENDERTILE
,
G_ON
),
14
gsDPSetCombineMode
(
G_CC_MODULATEIA
,
G_CC_MODULATEIA
),
15
gsDPSetTextureDetail
(
G_TD_CLAMP
),
16
gsDPSetTextureLOD
(
G_TL_TILE
),
17
gsDPLoadTextureBlock
(
D_0A0005D0_E63090
,
G_IM_FMT_CI
,
G_IM_SIZ_8b
, 16, 16, 0,
G_TX_NOMIRROR
|
G_TX_WRAP
,
G_TX_NOMIRROR
|
G_TX_CLAMP
, 4, 4,
G_TX_NOLOD
,
G_TX_NOLOD
),
18
gsDPSetTexturePersp
(
G_TP_PERSP
),
19
gsDPSetTextureFilter
(
G_TF_BILERP
),
20
gsSPEndDisplayList
(),
21
};
22
23
INCLUDE_IMG
(
"entity/model/RedSwitch_exclamationMark.png"
,
D_0A000978_E63438
);
24
Gfx
Entity_RedSwitch_LoadExclMark
[] = {
25
gsDPSetTextureLUT
(
G_TT_NONE
),
26
gsSPTexture
(0xFFFF, 0xFFFF, 0,
G_TX_RENDERTILE
,
G_ON
),
27
gsDPSetCombineMode
(
G_CC_MODULATEIA
,
G_CC_MODULATEIA
),
28
gsDPSetTextureDetail
(
G_TD_CLAMP
),
29
gsDPSetTextureLOD
(
G_TL_TILE
),
30
gsDPLoadTextureBlock_4b
(
D_0A000978_E63438
,
G_IM_FMT_IA
, 16, 32, 0,
G_TX_NOMIRROR
|
G_TX_CLAMP
,
G_TX_NOMIRROR
|
G_TX_CLAMP
, 4, 5,
G_TX_NOLOD
,
G_TX_NOLOD
),
31
gsDPSetTexturePersp
(
G_TP_PERSP
),
32
gsDPSetTextureFilter
(
G_TF_BILERP
),
33
gsSPEndDisplayList
(),
34
};
35
36
Mtx
Entity_RedSwitch_mtxExclMark
=
RDP_MATRIX
(
37
1.000000, 0.000000, 0.000000, 0.000000,
38
0.000000, 1.000000, 0.000000, 6.000000,
39
0.000000, 0.000000, 1.000000, 0.000000,
40
0.000000, 0.000000, 0.000000, 1.000000
41
);
42
43
Mtx
Entity_RedSwitch_mtxRedBubble
=
RDP_MATRIX
(
44
1.000000, 0.000000, 0.000000, -0.026600,
45
0.000000, 1.000000, 0.000000, 5.000000,
46
0.000000, 0.000000, 1.000000, 0.609116,
47
0.000000, 0.000000, 0.000000, 1.000000
48
);
49
50
Gfx
Entity_RedSwitch_RenderRedBubble
[] = {
51
gsDPPipeSync
(),
52
gsDPSetCycleType
(
G_CYC_1CYCLE
),
53
gsDPSetRenderMode
(
G_RM_AA_ZB_XLU_SURF
,
G_RM_AA_ZB_XLU_SURF2
),
54
gsDPSetCombineMode
(
G_CC_SHADE
,
G_CC_SHADE
),
55
gsSPTexture
(0x0080, 0x0080, 0,
G_TX_RENDERTILE
,
G_OFF
),
56
gsSPClearGeometryMode
(
G_LIGHTING
),
57
gsSPSetGeometryMode
(
G_CULL_BACK
|
G_SHADING_SMOOTH
),
58
gsSPVertex
(
D_0A0003D0_E62E90
, 30, 0),
59
gsSP2Triangles
(0, 1, 2, 0, 0, 2, 3, 0),
60
gsSP2Triangles
(3, 2, 4, 0, 3, 4, 5, 0),
61
gsSP2Triangles
(1, 6, 7, 0, 1, 7, 2, 0),
62
gsSP2Triangles
(2, 7, 8, 0, 2, 8, 4, 0),
63
gsSP2Triangles
(4, 8, 9, 0, 4, 9, 10, 0),
64
gsSP2Triangles
(5, 4, 10, 0, 5, 10, 11, 0),
65
gsSP2Triangles
(12, 13, 6, 0, 12, 6, 1, 0),
66
gsSP2Triangles
(13, 14, 15, 0, 13, 15, 6, 0),
67
gsSP2Triangles
(6, 15, 16, 0, 6, 16, 7, 0),
68
gsSP2Triangles
(17, 18, 19, 0, 17, 19, 20, 0),
69
gsSP2Triangles
(17, 20, 16, 0, 17, 16, 15, 0),
70
gsSP2Triangles
(17, 15, 14, 0, 17, 14, 21, 0),
71
gsSP2Triangles
(7, 16, 20, 0, 7, 20, 8, 0),
72
gsSP2Triangles
(22, 12, 1, 0, 22, 1, 0, 0),
73
gsSP2Triangles
(23, 24, 13, 0, 23, 13, 12, 0),
74
gsSP2Triangles
(24, 21, 14, 0, 24, 14, 13, 0),
75
gsSP2Triangles
(25, 23, 12, 0, 25, 12, 22, 0),
76
gsSP2Triangles
(8, 20, 19, 0, 8, 19, 9, 0),
77
gsSP2Triangles
(26, 27, 24, 0, 26, 24, 23, 0),
78
gsSP2Triangles
(28, 29, 27, 0, 28, 27, 26, 0),
79
gsSP2Triangles
(29, 18, 17, 0, 29, 17, 27, 0),
80
gsSP2Triangles
(27, 17, 21, 0, 27, 21, 24, 0),
81
gsSP2Triangles
(10, 9, 29, 0, 10, 29, 28, 0),
82
gsSP2Triangles
(9, 19, 18, 0, 9, 18, 29, 0),
83
gsSPVertex
(&
D_0A0003D0_E62E90
[10], 2, 0),
84
gsSPVertex
(&
D_0A0003D0_E62E90
[23], 1, 2),
85
gsSPVertex
(&
D_0A0003D0_E62E90
[25], 2, 3),
86
gsSPVertex
(&
D_0A0003D0_E62E90
[28], 1, 5),
87
gsSPVertex
(&
D_0A0003D0_E62E90
[30], 2, 6),
88
gsSP2Triangles
(6, 5, 4, 0, 6, 4, 7, 0),
89
gsSP2Triangles
(7, 4, 2, 0, 7, 2, 3, 0),
90
gsSP2Triangles
(1, 0, 5, 0, 1, 5, 6, 0),
91
gsSPEndDisplayList
(),
92
};
93
94
Gfx
Entity_RedSwitch_RenderRotatedRedBubble
[] = {
95
gsSPMatrix
(&
Entity_RedSwitch_mtxRedBubble
,
G_MTX_PUSH
|
G_MTX_MUL
|
G_MTX_MODELVIEW
),
96
gsSPDisplayList
(
Entity_RedSwitch_RenderRedBubble
),
97
gsSPPopMatrix
(
G_MTX_MODELVIEW
),
98
gsSPEndDisplayList
(),
99
};
100
101
Gfx
Entity_RedSwitch_RenderExclMark
[] = {
102
gsDPPipeSync
(),
103
gsDPSetCycleType
(
G_CYC_1CYCLE
),
104
gsDPSetRenderMode
(
G_RM_AA_ZB_TEX_EDGE
,
G_RM_AA_ZB_TEX_EDGE2
),
105
gsSPDisplayList
(
Entity_RedSwitch_LoadExclMark
),
106
gsSPClearGeometryMode
(
G_LIGHTING
|
G_SHADING_SMOOTH
),
107
gsSPSetGeometryMode
(
G_CULL_BACK
),
108
gsSPVertex
(
D_0A000390_E62E50
, 4, 0),
109
gsSP2Triangles
(0, 1, 2, 0, 0, 2, 3, 0),
110
gsSPEndDisplayList
(),
111
};
112
113
Gfx
Entity_RedSwitch_RenderRotatedExclMark
[] = {
114
gsSPMatrix
(&
Entity_RedSwitch_mtxExclMark
,
G_MTX_PUSH
|
G_MTX_MUL
|
G_MTX_MODELVIEW
),
115
gsSPDisplayList
(
Entity_RedSwitch_RenderExclMark
),
116
gsSPPopMatrix
(
G_MTX_MODELVIEW
),
117
gsSPEndDisplayList
(),
118
};
119
120
Gfx
Entity_RedSwitch_RenderBase
[] = {
121
gsDPPipeSync
(),
122
gsDPSetCycleType
(
G_CYC_1CYCLE
),
123
gsDPSetRenderMode
(
G_RM_AA_ZB_OPA_SURF
,
G_RM_AA_ZB_OPA_SURF2
),
124
gsSPDisplayList
(
Entity_RedSwitch_LoadTexture
),
125
gsSPClearGeometryMode
(
G_LIGHTING
),
126
gsSPSetGeometryMode
(
G_CULL_BACK
|
G_SHADING_SMOOTH
),
127
gsSPVertex
(
D_0A000000_E62AC0
, 30, 0),
128
gsSP2Triangles
(0, 1, 2, 0, 0, 2, 3, 0),
129
gsSP2Triangles
(4, 5, 1, 0, 4, 1, 0, 0),
130
gsSP2Triangles
(3, 2, 6, 0, 3, 6, 7, 0),
131
gsSP2Triangles
(8, 9, 10, 0, 8, 10, 11, 0),
132
gsSP2Triangles
(12, 13, 9, 0, 12, 9, 8, 0),
133
gsSP2Triangles
(11, 10, 14, 0, 11, 14, 15, 0),
134
gsSP2Triangles
(16, 17, 18, 0, 16, 18, 19, 0),
135
gsSP2Triangles
(20, 21, 17, 0, 20, 17, 16, 0),
136
gsSP2Triangles
(19, 18, 22, 0, 19, 22, 23, 0),
137
gsSP2Triangles
(7, 6, 24, 0, 7, 24, 25, 0),
138
gsSP2Triangles
(15, 14, 26, 0, 15, 26, 27, 0),
139
gsSP2Triangles
(23, 22, 28, 0, 23, 28, 29, 0),
140
gsSPVertex
(&
D_0A000000_E62AC0
[4], 2, 0),
141
gsSPVertex
(&
D_0A000000_E62AC0
[12], 2, 2),
142
gsSPVertex
(&
D_0A000000_E62AC0
[20], 2, 4),
143
gsSPVertex
(&
D_0A000000_E62AC0
[24], 4, 6),
144
gsSPVertex
(&
D_0A000000_E62AC0
[30], 13, 10),
145
gsSPVertex
(&
D_0A000000_E62AC0
[44], 9, 23),
146
gsSP2Triangles
(7, 6, 10, 0, 7, 10, 25, 0),
147
gsSP2Triangles
(11, 26, 5, 0, 11, 5, 4, 0),
148
gsSP2Triangles
(12, 19, 27, 0, 12, 27, 13, 0),
149
gsSP2Triangles
(13, 27, 28, 0, 13, 28, 14, 0),
150
gsSP2Triangles
(14, 28, 3, 0, 14, 3, 2, 0),
151
gsSP2Triangles
(15, 24, 29, 0, 15, 29, 16, 0),
152
gsSP2Triangles
(16, 29, 26, 0, 16, 26, 11, 0),
153
gsSP2Triangles
(17, 30, 31, 0, 17, 31, 18, 0),
154
gsSP2Triangles
(18, 31, 1, 0, 18, 1, 0, 0),
155
gsSP2Triangles
(9, 8, 19, 0, 9, 19, 12, 0),
156
gsSP2Triangles
(20, 21, 23, 0, 21, 22, 23, 0),
157
gsSP2Triangles
(25, 10, 30, 0, 25, 30, 17, 0),
158
gsSPVertex
(&
D_0A000000_E62AC0
[28], 2, 0),
159
gsSPVertex
(&
D_0A000000_E62AC0
[35], 1, 2),
160
gsSPVertex
(&
D_0A000000_E62AC0
[40], 1, 3),
161
gsSPVertex
(&
D_0A000000_E62AC0
[42], 4, 4),
162
gsSPVertex
(&
D_0A000000_E62AC0
[53], 4, 8),
163
gsSP2Triangles
(4, 8, 6, 0, 5, 6, 11, 0),
164
gsSP2Triangles
(6, 9, 11, 0, 6, 10, 9, 0),
165
gsSP2Triangles
(6, 8, 10, 0, 5, 3, 6, 0),
166
gsSP2Triangles
(1, 0, 7, 0, 1, 7, 2, 0),
167
gsSPEndDisplayList
(),
168
};
169
170
Gfx
Entity_RedSwitch_RenderBaseMain
[] = {
171
gsSPDisplayList
(
Entity_RedSwitch_RenderBase
),
172
gsSPEndDisplayList
(),
173
};
174
175
Gfx
Entity_RedSwitch_RenderMain
[] = {
176
gsSPDisplayList
(
Entity_RedSwitch_RenderBaseMain
),
177
gsSPDisplayList
(
Entity_RedSwitch_RenderRotatedExclMark
),
178
gsSPDisplayList
(
Entity_RedSwitch_RenderRotatedRedBubble
),
179
gsSPEndDisplayList
(),
180
};
181
182
Gfx
Entity_RedSwitch_Render
[] = {
183
gsSPDisplayList
(
Entity_RedSwitch_RenderMain
),
184
gsSPEndDisplayList
(),
185
};
PopupMenu_SelectedIndex
BSS s32 PopupMenu_SelectedIndex
Definition
8a860_len_3f30.c:84
Entity_RedSwitch_RenderExclMark
Gfx Entity_RedSwitch_RenderExclMark[]
Definition
RedSwitch.c:101
Entity_RedSwitch_LoadExclMark
Gfx Entity_RedSwitch_LoadExclMark[]
Definition
RedSwitch.c:24
Entity_RedSwitch_RenderRotatedRedBubble
Gfx Entity_RedSwitch_RenderRotatedRedBubble[]
Definition
RedSwitch.c:94
Entity_RedSwitch_RenderRedBubble
Gfx Entity_RedSwitch_RenderRedBubble[]
Definition
RedSwitch.c:50
Entity_RedSwitch_Render
Gfx Entity_RedSwitch_Render[]
Definition
RedSwitch.c:182
Entity_RedSwitch_RenderRotatedExclMark
Gfx Entity_RedSwitch_RenderRotatedExclMark[]
Definition
RedSwitch.c:113
Entity_RedSwitch_RenderBase
Gfx Entity_RedSwitch_RenderBase[]
Definition
RedSwitch.c:120
Entity_RedSwitch_mtxExclMark
Mtx Entity_RedSwitch_mtxExclMark
Definition
RedSwitch.c:36
Entity_RedSwitch_LoadTexture
Gfx Entity_RedSwitch_LoadTexture[]
Definition
RedSwitch.c:10
Entity_RedSwitch_RenderBaseMain
Gfx Entity_RedSwitch_RenderBaseMain[]
Definition
RedSwitch.c:170
Entity_RedSwitch_RenderMain
Gfx Entity_RedSwitch_RenderMain[]
Definition
RedSwitch.c:175
Entity_RedSwitch_mtxRedBubble
Mtx Entity_RedSwitch_mtxRedBubble
Definition
RedSwitch.c:43
include_asset.h
INCLUDE_PAL
#define INCLUDE_PAL(FILENAME, SYMBOLNAME)
Definition
include_asset.h:30
INCLUDE_IMG
#define INCLUDE_IMG(FILENAME, SYMBOLNAME)
Definition
include_asset.h:27
RDP_MATRIX
#define RDP_MATRIX( Ax, Bx, Cx, Dx, Ay, By, Cy, Dy, Az, Bz, Cz, Dz, Aw, Bw, Cw, Dw)
Definition
macros.h:237
src
entity
model
RedSwitch.c
Generated by
1.10.0