-
Notifications
You must be signed in to change notification settings - Fork 72
/
grfigure2.c
181 lines (152 loc) · 4.6 KB
/
grfigure2.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
#include <platform.h>
#include "lb/forward.h"
#include <dolphin/mtx/forward.h>
#include "gr/grfigure2.h"
#include "gr/granime.h"
#include "gr/grdisplay.h"
#include "gr/grfigure1.h"
#include "gr/ground.h"
#include "gr/grzakogenerator.h"
#include "gr/types.h"
#include "lb/lb_00F9.h"
#include <dolphin/os/OSError.h>
#include <baselib/gobj.h>
#include <baselib/gobjgxlink.h>
#include <baselib/gobjproc.h>
/* 20E274 */ static void grFigure2_8020E274(void);
/* 20E2E4 */ static void grFigure2_8020E2E4(void);
/* 20E2E8 */ static void grFigure2_8020E2E8(void);
/* 20E30C */ static bool grFigure2_8020E30C(void);
/* 20E314 */ static HSD_GObj* grFigure2_8020E314(int gobj_id);
/* 20E3FC */ static void grFigure2_8020E3FC(HSD_GObj* gobj);
/* 20E428 */ static bool grFigure2_8020E428(HSD_GObj*);
/* 20E430 */ static void grFigure2_8020E430(HSD_GObj* gobj);
/* 20E434 */ static void grFigure2_8020E434(HSD_GObj*);
/* 20E438 */ static void grFigure2_8020E438(HSD_GObj* gobj);
/* 20E464 */ static bool grFigure2_8020E464(HSD_GObj*);
/* 20E46C */ static void grFigure2_8020E46C(HSD_GObj* gobj);
/* 20E490 */ static void grFigure2_8020E490(HSD_GObj*);
/* 20E494 */ static void grFigure2_8020E494(HSD_GObj* gobj);
/* 20E4E4 */ static bool grFigure2_8020E4E4(HSD_GObj*);
/* 20E4EC */ static void grFigure2_8020E4EC(HSD_GObj* gobj);
/* 20E4F0 */ static void grFigure2_8020E4F0(HSD_GObj*);
/* 20E4F4 */ static DynamicsDesc* grFigure2_8020E4F4(enum_t arg0);
/* 20E4FC */ static bool grFigure2_8020E4FC(Vec3* vector, int number,
HSD_JObj* jobj);
static StageCallbacks grEF2_803E6328[3] = {
{ grFigure2_8020E3FC, grFigure2_8020E428, grFigure2_8020E430,
grFigure2_8020E434, 0UL },
{ grFigure2_8020E438, grFigure2_8020E464, grFigure2_8020E46C,
grFigure2_8020E490, 0xC0000000 },
{ grFigure2_8020E494, grFigure2_8020E4E4, grFigure2_8020E4EC,
grFigure2_8020E4F0, 0UL }
};
StageData grEF2_803E6370 = {
0x00000045,
grEF2_803E6328,
"/GrEF2.dat",
grFigure2_8020E274,
grFigure1_8020E270,
grFigure2_8020E2E4,
grFigure2_8020E2E8,
grFigure2_8020E30C,
grFigure2_8020E4F4,
grFigure2_8020E4FC,
0x00000001,
NULL,
0UL,
};
void* grEF2_804D6A78;
extern StageInfo stage_info;
static void grFigure2_8020E274(void)
{
grEF2_804D6A78 = Ground_801C49F8();
stage_info.unk8C.b4 = 0;
stage_info.unk8C.b5 = 1;
grFigure2_8020E314(0);
grFigure2_8020E314(2);
grFigure2_8020E314(1);
Ground_801C39C0();
Ground_801C3BB4();
}
static void grFigure2_8020E2E4(void) {}
static void grFigure2_8020E2E8(void)
{
grZakoGenerator_801CAE04(false);
}
static bool grFigure2_8020E30C(void)
{
return false;
}
static HSD_GObj* grFigure2_8020E314(int gobj_id)
{
HSD_GObj* gobj;
StageCallbacks* callbacks = &grEF2_803E6328[gobj_id];
gobj = Ground_801C14D0(gobj_id);
if (gobj != NULL) {
Ground* gp = gobj->user_data;
gp->x8_callback = NULL;
gp->xC_callback = NULL;
GObj_SetupGXLink(gobj, grDisplay_801C5DB0, 3, 0);
if (callbacks->callback3 != NULL) {
gp->x1C_callback = callbacks->callback3;
}
if (callbacks->callback0 != NULL) {
callbacks->callback0(gobj);
}
if (callbacks->callback2 != NULL) {
HSD_GObjProc_8038FD54(gobj, callbacks->callback2, 4);
}
} else {
OSReport("%s:%d: couldn t get gobj(id=%d)\n", "grfigure2.c", 196,
gobj_id);
}
return gobj;
}
static void grFigure2_8020E3FC(HSD_GObj* gobj)
{
Ground* gp = gobj->user_data;
grAnime_801C8138(gobj, gp->map_id, 0);
}
static bool grFigure2_8020E428(HSD_GObj* arg0)
{
return false;
}
static void grFigure2_8020E430(HSD_GObj* gobj) {}
static void grFigure2_8020E434(HSD_GObj* arg0) {}
static void grFigure2_8020E438(HSD_GObj* gobj)
{
Ground* gp = gobj->user_data;
Ground_801C2ED0(gobj->hsd_obj, gp->map_id);
}
static bool grFigure2_8020E464(HSD_GObj* arg0)
{
return false;
}
static void grFigure2_8020E46C(HSD_GObj* gobj)
{
Ground_801C2FE0(gobj);
lb_800115F4();
}
static void grFigure2_8020E490(HSD_GObj* arg0) {}
static void grFigure2_8020E494(HSD_GObj* gobj)
{
u8 _[8];
Ground* gp = gobj->user_data;
Ground_801C2ED0(gobj->hsd_obj, gp->map_id);
grAnime_801C8138(gobj, gp->map_id, 0);
}
static bool grFigure2_8020E4E4(HSD_GObj* arg0)
{
return false;
}
static void grFigure2_8020E4EC(HSD_GObj* gobj) {}
static void grFigure2_8020E4F0(HSD_GObj* arg0) {}
static DynamicsDesc* grFigure2_8020E4F4(enum_t arg0)
{
return NULL;
}
static bool grFigure2_8020E4FC(Vec3* vector, int number, HSD_JObj* jobj)
{
return true;
}