SSBM Decomp
Loading...
Searching...
No Matches
forward.h
Go to the documentation of this file.
1#ifndef MELEE_GR_FORWARD_H
2#define MELEE_GR_FORWARD_H
3
4#include <melee/lb/forward.h>
6
7#include <dolphin/mtx.h>
8
9#define HSD_GOBJ_CLASS_STAGE 3
10#define HSD_GOBJ_CLASS_GROUND 13
11#define HSD_GOBJ_PLINK_GROUND 5
12
15typedef struct GrJoint GrJoint;
16typedef struct Ground Ground;
17typedef struct GroundParam GroundParam;
18typedef struct StageData StageData;
19typedef struct StageInfo StageInfo;
20typedef struct StageParam StageParam;
22typedef struct unkCastle unkCastle;
23typedef struct UnkStageDat UnkStageDat;
25
26#ifdef M2C
27typedef struct Ground_GObj Ground_GObj;
28struct Ground_GObj {
29 /* +0 */ u16 classifier;
30 /* +2 */ u8 p_link;
31 /* +3 */ u8 gx_link;
32 /* +4 */ u8 p_priority;
33 /* +5 */ u8 render_priority;
34 /* +6 */ u8 obj_kind;
35 /* +7 */ u8 user_data_kind;
36 /* +8 */ Ground_GObj* next;
37 /* +C */ Ground_GObj* prev;
38 /* +10 */ Ground_GObj* next_gx;
39 /* +14 */ Ground_GObj* prev_gx;
40 /* +18 */ HSD_GObjProc* proc;
41 /* +1C */ void (*rendered)(Ground_GObj* gobj, s32 code);
42 /* +20 */ u64 gxlink_prios;
43 /* +28 */ HSD_JObj* hsd_obj;
44 /* +2C */ Ground* user_data;
45 /* +30 */ void (*user_data_remove_func)(Ground* data);
46 /* +34 */ void* x34_unk;
47};
48#else
50#endif
51
58typedef enum GrKind {
59 /* 0x00 */ Gr_Kind_Unk00,
60 /* 0x01 */ Gr_Kind_Test,
61 /* 0x02 */ Gr_Kind_Castle, // Princess Peach's Castle
62 /* 0x03 */ Gr_Kind_RCruise, // Rainbow Cruise
63 /* 0x04 */ Gr_Kind_Kongo, // Kongo Jungle
64 /* 0x05 */ Gr_Kind_Garden, // Jungle Japes
65 /* 0x06 */ Gr_Kind_GreatBay, // Great Bay
66 /* 0x07 */ Gr_Kind_Shrine, // Hyrule Temple
67 /* 0x08 */ Gr_Kind_Zebes, // Brinstar
68 /* 0x09 */ Gr_Kind_Kraid, // Brinstar Depths
69 /* 0x0A */ Gr_Kind_Story, // Yoshi's Story
70 /* 0x0B */ Gr_Kind_Yorster, // Yoshi's Island
71 /* 0x0C */ Gr_Kind_Izumi, // Fountain of Dreams
72 /* 0x0D */ Gr_Kind_Greens, // Green Greens
73 /* 0x0E */ Gr_Kind_Corneria, // Corneria
74 /* 0x0F */ Gr_Kind_Venom, // Venom
75 /* 0x10 */ Gr_Kind_PStadium, // Pokemon Stadium
76 /* 0x11 */ Gr_Kind_Pura, // Poke Floats
77 /* 0x12 */ Gr_Kind_MuteCity, // Mute City
78 /* 0x13 */ Gr_Kind_BigBlue, // Big Blue
79 /* 0x14 */ Gr_Kind_Onett, // Onett
80 /* 0x15 */ Gr_Kind_Fourside, // Fourside
81 /* 0x16 */ Gr_Kind_Icemt, // Icicle Mountain
82 /* 0x17 */ Gr_Kind_Unk23,
83 /* 0x18 */ Gr_Kind_Inishie1, // Mushroom Kingdom
84 /* 0x19 */ Gr_Kind_Inishie2, // Mushroom Kingdom II
85 /* 0x1A */ Gr_Kind_Unk26,
86 /* 0x1B */ Gr_Kind_Flatzone, // Flat Zone
87 /* 0x1C */ Gr_Kind_OldPupupu, // Dream Land
88 /* 0x1D */ Gr_Kind_OldYoshi, // Yoshi's Island (64)
89 /* 0x1E */ Gr_Kind_OldKongo, // Kongo Jungle (64)
94 /* 0x23 */ Gr_Kind_Unk35,
95 /* 0x24 */ Gr_Kind_Battle, // Battlefield
96 /* 0x25 */ Gr_Kind_Last, // Final Destination
98 /* 0x27 */ Gr_Kind_Pushon,
99 /* 0x28 */ Gr_Kind_TMario,
101 /* 0x2A */ Gr_Kind_TClink,
102 /* 0x2B */ Gr_Kind_TDonkey,
104 /* 0x2D */ Gr_Kind_TFalco,
105 /* 0x2E */ Gr_Kind_TFox,
107 /* 0x30 */ Gr_Kind_TKirby,
108 /* 0x31 */ Gr_Kind_TKoopa,
109 /* 0x32 */ Gr_Kind_TLink,
110 /* 0x33 */ Gr_Kind_TLuigi,
111 /* 0x34 */ Gr_Kind_TMars,
112 /* 0x35 */ Gr_Kind_TMewtwo,
113 /* 0x36 */ Gr_Kind_TNess,
114 /* 0x37 */ Gr_Kind_TPeach,
115 /* 0x38 */ Gr_Kind_TPichu,
117 /* 0x3A */ Gr_Kind_TPurin,
118 /* 0x3B */ Gr_Kind_TSamus,
119 /* 0x3C */ Gr_Kind_TSeak,
120 /* 0x3D */ Gr_Kind_TYoshi,
121 /* 0x3E */ Gr_Kind_TZelda,
123 /* 0x40 */ Gr_Kind_TEmblem,
124 /* 0x41 */ Gr_Kind_TGanon,
125 /* 0x42 */ Gr_Kind_Heal,
126 /* 0x43 */ Gr_Kind_Homerun, // Home run contest
127 /* 0x44 */ Gr_Kind_Figure1,
128 /* 0x45 */ Gr_Kind_Figure2,
129 /* 0x46 */ Gr_Kind_Figure3,
130 /* 0x46 */ Gr_Kind_Count = 221,
131} GrKind;
132
144typedef enum StKind {
145 /* 0x00 */ St_Kind_Dummy,
146 /* 0x01 */ St_Kind_Test,
147 /* 0x02 */ St_Kind_Izumi,
149 /* 0x04 */ St_Kind_Castle,
150 /* 0x05 */ St_Kind_Kongo,
151 /* 0x06 */ St_Kind_Zebes,
153 /* 0x08 */ St_Kind_Story,
154 /* 0x09 */ St_Kind_Onett,
156 /* 0x0B */ St_Kind_RCruise,
157 /* 0x0C */ St_Kind_Garden,
159 /* 0x0E */ St_Kind_Shrine,
160 /* 0x0F */ St_Kind_Kraid,
161 /* 0x10 */ St_Kind_Yoster, // the gr module spells it yorster
162 /* 0x11 */ St_Kind_Greens,
166 /* 0x15 */ St_Kind_Akaneia,
167 /* 0x16 */ St_Kind_Venom,
168 /* 0x17 */ St_Kind_Pura,
169 /* 0x18 */ St_Kind_BigBlue,
170 /* 0x19 */ St_Kind_Icemt,
171 /* 0x1A */ St_Kind_Icetop,
176 /* 0x1F */ St_Kind_Battle,
177 /* 0x20 */ St_Kind_Last,
178 /* 0x49 */ St_Kind_BigBlueRoute = 73,
179 /* 0x55 */ St_Kind_Unk84 = 84,
180 /* 0x55 */ St_Kind_Heal,
181 /* 0x148 */ St_Kind_Unk328 = 328,
182} StKind;
183
187
190typedef enum Gr_Homerun_Parts {
191 /* 0x10 */ Gr_Homerun_Parts_Back = 16,
192 /* 0x40 */ Gr_Homerun_Parts_Max = 64,
194
195typedef void (*unkCastleCallback)(void*, struct unkCastle*);
196typedef void (*unkCastleCallback2)(void*, struct unkCastle*, Ground_GObj*);
198typedef DynamicsDesc* (*GrTouchLineCallback)(int index);
199typedef bool (*GrCheckShadowRenderCallback)(Vec3* fighter_pos, int,
200 HSD_JObj* jobj);
201
202#endif
HSD_Pad prev
Definition dbinit.c:22
struct Vec Vec3
unsigned short int u16
Definition types.h:7
unsigned long long int u64
Definition types.h:11
signed long s32
Definition types.h:8
unsigned char u8
Definition types.h:5
HSD_GObj * gobj
Definition gm_19EF.c:73
bool(* GrCheckShadowRenderCallback)(Vec3 *fighter_pos, int, HSD_JObj *jobj)
Definition forward.h:199
StadiumGrType
Definition forward.h:184
@ PsType_Display
Definition forward.h:185
void(* unkCastleCallback)(void *, struct unkCastle *)
Definition forward.h:195
HSD_GObj Ground_GObj
Definition forward.h:49
int(* GrIceMtSegmentLookup)(Ground_GObj *)
Definition forward.h:197
StKind
Definition forward.h:144
@ St_Kind_BigBlueRoute
Definition forward.h:178
@ St_Kind_Story
Definition forward.h:153
@ St_Kind_Kraid
Definition forward.h:160
@ St_Kind_Unk84
Definition forward.h:179
@ St_Kind_Garden
Definition forward.h:157
@ St_Kind_Inishie2
Definition forward.h:165
@ St_Kind_OldYoshi
Definition forward.h:174
@ St_Kind_Corneria
Definition forward.h:152
@ St_Kind_Greens
Definition forward.h:162
@ St_Kind_Fourside
Definition forward.h:163
@ St_Kind_RCruise
Definition forward.h:156
@ St_Kind_Akaneia
Definition forward.h:166
@ St_Kind_Pura
Definition forward.h:168
@ St_Kind_Izumi
Definition forward.h:147
@ St_Kind_Heal
Definition forward.h:180
@ St_Kind_Zebes
Definition forward.h:151
@ St_Kind_Dummy
Definition forward.h:145
@ St_Kind_Test
Definition forward.h:146
@ St_Kind_Icetop
Definition forward.h:171
@ St_Kind_Inishie1
Definition forward.h:164
@ St_Kind_Shrine
Definition forward.h:159
@ St_Kind_Icemt
Definition forward.h:170
@ St_Kind_Flatzone
Definition forward.h:172
@ St_Kind_Battle
Definition forward.h:176
@ St_Kind_OldPupupu
Definition forward.h:173
@ St_Kind_Venom
Definition forward.h:167
@ St_Kind_Castle
Definition forward.h:149
@ St_Kind_Last
Definition forward.h:177
@ St_Kind_Onett
Definition forward.h:154
@ St_Kind_PStadium
Definition forward.h:148
@ St_Kind_GreatBay
Definition forward.h:158
@ St_Kind_Yoster
Definition forward.h:161
@ St_Kind_Kongo
Definition forward.h:150
@ St_Kind_Unk328
Definition forward.h:181
@ St_Kind_BigBlue
Definition forward.h:169
@ St_Kind_MuteCity
Definition forward.h:155
@ St_Kind_OldKongo
Definition forward.h:175
GrKind
Definition forward.h:58
@ Gr_Kind_GreatBay
Definition forward.h:65
@ Gr_Kind_TMario
Definition forward.h:99
@ Gr_Kind_Kraid
Definition forward.h:68
@ Gr_Kind_OldYoshi
Definition forward.h:88
@ Gr_Kind_BigBlue
Definition forward.h:78
@ Gr_Kind_TFalco
Definition forward.h:104
@ Gr_Kind_Battle
Definition forward.h:95
@ Gr_Kind_Inishie1
Definition forward.h:83
@ Gr_Kind_TKoopa
Definition forward.h:108
@ Gr_Kind_Corneria
Definition forward.h:73
@ Gr_Kind_KinokoRoute
Definition forward.h:90
@ Gr_Kind_Flatzone
Definition forward.h:86
@ Gr_Kind_Unk26
Definition forward.h:85
@ Gr_Kind_Venom
Definition forward.h:74
@ Gr_Kind_TMars
Definition forward.h:111
@ Gr_Kind_TGanon
Definition forward.h:124
@ Gr_Kind_Pura
Definition forward.h:76
@ Gr_Kind_Last
Definition forward.h:96
@ Gr_Kind_Garden
Definition forward.h:64
@ Gr_Kind_Unk35
Definition forward.h:94
@ Gr_Kind_TZelda
Definition forward.h:121
@ Gr_Kind_TSeak
Definition forward.h:119
@ Gr_Kind_Test
Definition forward.h:60
@ Gr_Kind_TIceclimber
Definition forward.h:106
@ Gr_Kind_TPeach
Definition forward.h:114
@ Gr_Kind_Count
Definition forward.h:130
@ Gr_Kind_TFox
Definition forward.h:105
@ Gr_Kind_TPurin
Definition forward.h:117
@ Gr_Kind_TClink
Definition forward.h:101
@ Gr_Kind_TLuigi
Definition forward.h:110
@ Gr_Kind_TGamewatch
Definition forward.h:122
@ Gr_Kind_FigureGet
Definition forward.h:97
@ Gr_Kind_Zebes
Definition forward.h:67
@ Gr_Kind_MuteCity
Definition forward.h:77
@ Gr_Kind_Icemt
Definition forward.h:81
@ Gr_Kind_TCaptain
Definition forward.h:100
@ Gr_Kind_Pushon
Definition forward.h:98
@ Gr_Kind_Heal
Definition forward.h:125
@ Gr_Kind_TDrmario
Definition forward.h:103
@ Gr_Kind_Shrine
Definition forward.h:66
@ Gr_Kind_TPichu
Definition forward.h:115
@ Gr_Kind_BigBlueRoute
Definition forward.h:93
@ Gr_Kind_TEmblem
Definition forward.h:123
@ Gr_Kind_Unk00
Definition forward.h:59
@ Gr_Kind_TDonkey
Definition forward.h:102
@ Gr_Kind_TNess
Definition forward.h:113
@ Gr_Kind_OldKongo
Definition forward.h:89
@ Gr_Kind_ShrineRoute
Definition forward.h:91
@ Gr_Kind_Inishie2
Definition forward.h:84
@ Gr_Kind_TSamus
Definition forward.h:118
@ Gr_Kind_OldPupupu
Definition forward.h:87
@ Gr_Kind_TPikachu
Definition forward.h:116
@ Gr_Kind_TYoshi
Definition forward.h:120
@ Gr_Kind_ZebesRoute
Definition forward.h:92
@ Gr_Kind_Figure2
Definition forward.h:128
@ Gr_Kind_Castle
Definition forward.h:61
@ Gr_Kind_Figure3
Definition forward.h:129
@ Gr_Kind_Unk23
Definition forward.h:82
@ Gr_Kind_Story
Definition forward.h:69
@ Gr_Kind_TKirby
Definition forward.h:107
@ Gr_Kind_Izumi
Definition forward.h:71
@ Gr_Kind_TMewtwo
Definition forward.h:112
@ Gr_Kind_Homerun
Definition forward.h:126
@ Gr_Kind_PStadium
Definition forward.h:75
@ Gr_Kind_Onett
Definition forward.h:79
@ Gr_Kind_TLink
Definition forward.h:109
@ Gr_Kind_Kongo
Definition forward.h:63
@ Gr_Kind_RCruise
Definition forward.h:62
@ Gr_Kind_Figure1
Definition forward.h:127
@ Gr_Kind_Greens
Definition forward.h:72
@ Gr_Kind_Yorster
Definition forward.h:70
@ Gr_Kind_Fourside
Definition forward.h:80
Gr_Homerun_Parts
Size of the Home-Run Contest parts array, named by an assert in grHomeRun_8021CB20.
Definition forward.h:190
@ Gr_Homerun_Parts_Max
Definition forward.h:192
@ Gr_Homerun_Parts_Back
Definition forward.h:191
void(* unkCastleCallback2)(void *, struct unkCastle *, Ground_GObj *)
Definition forward.h:196
static unsigned long int next
Definition rand.c:3
int bool
A signed integer used to contain boolean values.
Definition stdbool.h:6
Definition types.h:490
Definition types.h:150
The stage archive's grGroundParam public symbol, reached through StageInfo::param; see grDatFiles_801...
Definition types.h:1996
Definition types.h:1799
Definition gobjproc.h:8
Definition gobj.h:13
Definition jobj.h:104
Definition types.h:156
Definition types.h:58
One row of GroundParam::stage_params, describing a single StKind.
Definition types.h:1975
Definition types.h:2084
Definition types.h:2036
Definition types.h:2062
Definition types.h:367
Definition types.h:243
Definition grcastle.c:35