SpaghettiKart
Loading...
Searching...
No Matches
update.inc.c
Go to the documentation of this file.
1#include <racing/actors.h>
2#include <waypoints.h>
3#include <defines.h>
4#include <main.h>
6#include <code_800029B0.h>
7#include "port/Game.h"
8
9void func_802B3B44(struct ShellActor* shell) {
10 u16 currentWaypoint;
11 u16 nextWaypoint;
12 f32 temp_f0;
13 f32 temp_f0_2;
14 f32 temp_f0_3;
15 f32 temp_f12_3;
16 f32 temp_f14_2;
17 f32 temp_f16_2;
18 f32 temp_f2;
19 f32 temp_f12;
20 f32 temp_f28;
21 f32 temp_f20;
22 f32 temp_f22;
23 f32 temp_f24;
24 f32 temp_f12_0;
25 f32 temp_f12_1;
26 f32 temp_f12_2;
27 f32 temp_f18_3;
28 f32 temp_f16_3;
29 f32 temp_f26;
30 Vec3f origPos;
31
32 currentWaypoint = shell->pathIndex;
33 temp_f2 = gCurrentTrackPath[currentWaypoint].x;
34 temp_f12 = gCurrentTrackPath[currentWaypoint].y;
35 temp_f28 = gCurrentTrackPath[currentWaypoint].z;
36 nextWaypoint = currentWaypoint + 1;
37
38 if (nextWaypoint >= gSelectedPathCount) {
39 nextWaypoint -= gSelectedPathCount;
40 }
41
42 temp_f20 = temp_f2 - shell->pos[0];
43 temp_f22 = temp_f12 - shell->pos[1];
44 temp_f24 = temp_f28 - shell->pos[2];
45 temp_f0 = (temp_f20 * temp_f20) + (temp_f22 * temp_f22) + (temp_f24 * temp_f24);
46 if (temp_f0 > 400.0f) {
47 temp_f18_3 = gCurrentTrackPath[nextWaypoint].x;
48 temp_f16_3 = gCurrentTrackPath[nextWaypoint].y;
49 temp_f26 = gCurrentTrackPath[nextWaypoint].z;
50
51 temp_f12_0 = temp_f18_3 - shell->pos[0];
52 temp_f12_1 = temp_f16_3 - shell->pos[1];
53 temp_f12_2 = temp_f26 - shell->pos[2];
54
55 temp_f0_3 = (temp_f12_0 * temp_f12_0) + (temp_f12_1 * temp_f12_1) + (temp_f12_2 * temp_f12_2);
56 if (temp_f0_3 < temp_f0) {
57 shell->pathIndex = nextWaypoint;
58 } else {
59 temp_f0_2 = sqrtf(temp_f0) * 4.0f;
60 temp_f20 /= temp_f0_2;
61 temp_f22 /= temp_f0_2;
62 temp_f24 /= temp_f0_2;
63
64 temp_f12_3 = shell->velocity[0];
65 temp_f14_2 = shell->velocity[1];
66 temp_f16_2 = shell->velocity[2];
67
68 temp_f12_3 += temp_f20;
69 temp_f14_2 += temp_f22;
70 temp_f16_2 += temp_f24;
71 temp_f0 = sqrtf((temp_f12_3 * temp_f12_3) + (temp_f14_2 * temp_f14_2) + (temp_f16_2 * temp_f16_2));
72 if (temp_f0 > 6.0f) {
73 temp_f0 /= 6.0f;
74 temp_f12_3 /= temp_f0;
75 temp_f14_2 /= temp_f0;
76 temp_f16_2 /= temp_f0;
77 }
78 shell->velocity[0] = temp_f12_3;
79 shell->velocity[1] = temp_f14_2;
80 shell->velocity[2] = temp_f16_2;
81
82 origPos[0] = shell->pos[0];
83 origPos[1] = shell->pos[1];
84 origPos[2] = shell->pos[2];
85
86 shell->pos[0] += temp_f12_3;
87 shell->pos[1] += temp_f14_2;
88 shell->pos[2] += temp_f16_2;
89 actor_terrain_collision(&shell->unk30, 4.0f, shell->pos[0], shell->pos[1], shell->pos[2], origPos[0],
90 origPos[1], origPos[2]);
91 func_802B4E30((struct Actor*) shell);
92 }
93 } else {
94 if (temp_f0 > 5.0f) {
95 shell->pos[0] = temp_f2;
96 shell->pos[1] = shell->boundingBoxSize + temp_f12;
97 shell->pos[2] = temp_f28;
98 shell->pathIndex = nextWaypoint;
99 } else {
100 temp_f18_3 = gCurrentTrackPath[nextWaypoint].x;
101 temp_f16_3 = gCurrentTrackPath[nextWaypoint].y;
102 temp_f26 = gCurrentTrackPath[nextWaypoint].z;
103
104 shell->pos[0] = (temp_f2 + temp_f18_3) * 0.5f;
105 shell->pos[1] = ((temp_f12 + temp_f16_3) * 0.5f) + shell->boundingBoxSize;
106 shell->pos[2] = (temp_f28 + temp_f26) * 0.5f;
107
108 shell->velocity[0] = (temp_f18_3 - temp_f2) * 0.5f;
109 shell->velocity[1] = (temp_f16_3 - temp_f12) * 0.5f;
110 shell->velocity[2] = (temp_f26 - temp_f28) * 0.5f;
111 }
112 }
113}
114
115void func_802B3E7C(struct ShellActor* shell, Player* player) {
116 f32 x_velocity;
117 f32 z_velocity;
118 f32 xz_dist;
119 Vec3f newPosition;
120
121 x_velocity = player->pos[0];
122 x_velocity -= shell->pos[0];
123 z_velocity = player->pos[2];
124 z_velocity -= shell->pos[2];
125 xz_dist = sqrtf((x_velocity * x_velocity) + (z_velocity * z_velocity)) / 8;
126 if (xz_dist == 0.0f) {
127 x_velocity = 0.0f;
128 z_velocity = 0.0f;
129 } else {
130 x_velocity /= xz_dist;
131 z_velocity /= xz_dist;
132 }
133
134 newPosition[0] = shell->pos[0];
135 newPosition[1] = shell->pos[1];
136 newPosition[2] = shell->pos[2];
137 shell->pos[0] += x_velocity;
138 shell->pos[1] -= 2.0f;
139 shell->pos[2] += z_velocity;
140 shell->velocity[0] = x_velocity;
141 shell->velocity[1] = -2.0f;
142 shell->velocity[2] = z_velocity;
143
144 if (player->effects & BOO_EFFECT) {
145 destroy_destructable_actor((struct Actor*) shell);
146 } else {
147 actor_terrain_collision(&shell->unk30, 4.0f, shell->pos[0], shell->pos[1], shell->pos[2], newPosition[0],
148 newPosition[1], newPosition[2]);
149 func_802B4E30((struct Actor*) shell);
150 func_802B4104(shell);
151 }
152}
153
158s16 func_802B3FD0(Player* owner, struct ShellActor* shell) {
159 Player* player;
160 s32 playerIndex;
161 f32 playerToShellDistance;
162 s16 playerId = -1;
163 f32 smallestDistance = 25000000.0f;
164
165 for (playerIndex = 0; playerIndex < 4; playerIndex++) {
166 player = &gPlayers[playerIndex];
167 if ((player->type & PLAYER_EXISTS) == 0) {
168 continue;
169 }
170 if (player == owner) {
171 continue;
172 }
173 if (gPlayerBalloonCount[playerIndex] < 0) {
174 continue;
175 }
176 // func_802B51E8 is not quite a 3D distance function, it doubles (rather than squares) the Z difference of the
177 // positions
178 playerToShellDistance = func_802B51E8(player->pos, shell->pos);
179 if (playerToShellDistance < smallestDistance) {
180 smallestDistance = playerToShellDistance;
181 playerId = player - gPlayerOne;
182 }
183 }
184
185 return playerId;
186}
187
188void func_802B4104(struct ShellActor* shell) {
189 if (shell->unk30.surfaceDistance[0] < 0.0f) {
190 destroy_destructable_actor((struct Actor*) shell);
191 func_800C98B8(shell->pos, shell->velocity, SOUND_ARG_LOAD(0x19, 0x00, 0x80, 0x54));
192 shell->flags |= 0x80;
193 } else if ((shell->unk30.surfaceDistance[1] < 0.0f) &&
194 ((shell->unk30.unk54[1] < 0.25f) || (shell->unk30.unk54[1] < -0.25f))) {
195 destroy_destructable_actor((struct Actor*) shell);
196 func_800C98B8(shell->pos, shell->velocity, SOUND_ARG_LOAD(0x19, 0x00, 0x80, 0x54));
197 shell->flags |= 0x80;
198 }
199}
200
207 UNUSED f32 pad9;
208 Player* player;
209 f32 height;
210 UNUSED f32 temp_f14;
211 f32 temp_f2;
212 s16 temp_v0;
213 UNUSED s16 pad3;
214 Vec3f somePosVel;
215 struct Controller* controller;
216 TripleShellParent* parent;
217 UNUSED f32 pad0;
218 UNUSED f32 pad1;
219 UNUSED f32 pad2;
220 UNUSED f32 pad4;
221 UNUSED f32 pad5;
222 UNUSED f32 pad6;
223 UNUSED f32 pad7;
224 UNUSED f32 pad8;
225 UNUSED f32 pad10;
226 UNUSED f32 pad11;
227 UNUSED f32 pad12;
228 UNUSED s16 pad13;
229 UNUSED s16 pad13_2;
230 UNUSED f32 pad14;
231 UNUSED f32 pad15;
232 UNUSED f32 pad16;
233 UNUSED f32 pad17;
234 Vec3f origPos;
235
236 pad1 = shell->pos[0];
237 pad0 = shell->pos[2];
238 pad2 = shell->pos[1];
239 pad13 = shell->type;
240 if ((pad0 < (f32) gTrackMinZ) || ((f32) gTrackMaxZ < pad0) || (pad1 < (f32) gTrackMinX) ||
241 ((f32) gTrackMaxX < pad1) || (pad2 < (f32) gTrackMinY)) {
242 destroy_destructable_actor((struct Actor*) shell);
243 }
244
245 shell->rotVelocity += 0x71C;
246 switch (shell->state) {
247 case HELD_SHELL:
248 player = &gPlayers[shell->playerId];
249 copy_collision(&player->collision, &shell->unk30);
250 somePosVel[0] = 0.0f;
251 somePosVel[1] = player->boundingBoxSize;
252 somePosVel[2] = -(player->boundingBoxSize + shell->boundingBoxSize + 2.0f);
253 mtxf_translate_vec3f_mat3(somePosVel, player->orientationMatrix);
254 shell->pos[0] = player->pos[0] + somePosVel[0];
255 pad7 = player->pos[1] - somePosVel[1];
256 shell->pos[2] = player->pos[2] + somePosVel[2];
257 height = calculate_surface_height(shell->pos[0], pad7, shell->pos[2], player->collision.meshIndexZX);
258 temp_f2 = pad7 - height;
259
260 if ((temp_f2 < 5.0f) && (temp_f2 > -5.0f)) {
261 shell->pos[1] = shell->boundingBoxSize + height;
262 } else {
263 shell->pos[1] = pad7;
264 }
265
267 // According to other code, this whole chunk should not be ran by CPUs
268 if ((player->type & PLAYER_HUMAN) != 0) {
269 if (gDemoMode) {
270 controller = gControllerOne;
271 } else {
272 controller = &gControllers[shell->playerId];
273 }
274 // } else {
275 // controller = gControllerOne;
276 // }
277
278 if ((controller->buttonDepressed & Z_TRIG) != 0) {
279 controller->buttonDepressed &= ~Z_TRIG;
280 shell->state = RELEASED_SHELL;
281 if (player->unk_0C0 > 0) {
282 shell->rotAngle = 0x78E3;
283 } else {
284 shell->rotAngle = -0x78E4;
285 }
286 }
287 }
288 break;
289 case RELEASED_SHELL:
290 player = &gPlayers[shell->playerId];
291 if (shell->rotAngle > 0) {
292 shell->rotAngle -= 0x71C;
293 if (shell->rotAngle < 0) {
294 shell->state = MOVING_SHELL;
295 // Added condition so that CPUs do not make sound on item-use
296 if ((gPlayers[shell->playerId].type & PLAYER_HUMAN) != 0) {
297 func_800C9060(shell->playerId, SOUND_ARG_LOAD(0x19, 0x00, 0x80, 0x04));
298 func_800C90F4(shell->playerId,
299 (player->characterId * 0x10) + SOUND_ARG_LOAD(0x29, 0x00, 0x80, 0x00));
300 }
301 if (pad13 == ACTOR_RED_SHELL) {
303 } else {
305 func_800C9D80(shell->pos, shell->velocity, SOUND_ARG_LOAD(0x51, 0x01, 0x80, 0x08));
306 }
307 }
308 } else {
309 shell->rotAngle += 0x71C;
310 if (shell->rotAngle > 0) {
311 shell->state = MOVING_SHELL;
312 // Added condition so that CPUs do not make sound on item-use
313 if ((gPlayers[shell->playerId].type & PLAYER_HUMAN) != 0) {
314 func_800C9060(shell->playerId, SOUND_ARG_LOAD(0x19, 0x00, 0x80, 0x04));
315 func_800C90F4(shell->playerId,
316 (player->characterId * 0x10) + SOUND_ARG_LOAD(0x29, 0x00, 0x80, 0x00));
317 }
318 if (pad13 == ACTOR_RED_SHELL) {
320 } else {
322 func_800C9D80(shell->pos, shell->velocity, SOUND_ARG_LOAD(0x51, 0x01, 0x80, 0x08));
323 }
324 }
325 }
326 if (shell->state == MOVING_SHELL) {
327 shell->someTimer = 0x001E;
328 height = 8.0f;
329 if (player->speed > 8.0f) {
330 height = player->speed * 1.2f;
331 }
332 somePosVel[0] = 0.0f;
333 somePosVel[1] = 0.0f;
334 somePosVel[2] = height;
335 func_802B64C4(somePosVel, (s16) (player->rotation[1] + player->unk_0C0));
336 shell->velocity[0] = somePosVel[0];
337 shell->velocity[1] = somePosVel[1];
338 shell->velocity[2] = somePosVel[2];
339 } else {
340 somePosVel[0] = sins(shell->rotAngle) * 8.0f;
341 somePosVel[1] = shell->boundingBoxSize - player->boundingBoxSize;
342 somePosVel[2] = coss(shell->rotAngle) * 8.0f;
343 mtxf_translate_vec3f_mat3(somePosVel, player->orientationMatrix);
344 shell->pos[0] = player->pos[0] + somePosVel[0];
345 shell->pos[1] = player->pos[1] + somePosVel[1];
346 shell->pos[2] = player->pos[2] + somePosVel[2];
347 }
348 break;
349 case MOVING_SHELL:
350 player = &gPlayers[shell->playerId];
351 shell->someTimer -= 1;
352 if (shell->someTimer == 0) {
353 shell->flags &= 0xEFFF;
354 if (shell->type == ACTOR_BLUE_SPINY_SHELL) {
356 shell->state = BLUE_SHELL_LOCK_ON;
357 shell->shellId = 1000.0f;
358 temp_v0 = gNearestPathPointByPlayerId[player - gPlayerOne] + 8;
359 if ((s32) gSelectedPathCount < temp_v0) {
360 temp_v0 -= gSelectedPathCount;
361 }
362 shell->pathIndex = temp_v0;
363 } else if (gModeSelection == BATTLE) {
364 shell->shellId = 1000.0f;
365 shell->targetPlayer = func_802B3FD0(player, shell);
366 if (shell->targetPlayer < 0) {
367 shell->flags = 0x8000;
368 shell->velocity[1] = 3.0f;
369 shell->pathIndex = 0;
370 shell->someTimer = 0x003C;
371 shell->state = DESTROYED_SHELL;
372 } else {
373 shell->state = RED_SHELL_LOCK_ON;
374 }
375 } else {
376 if (player->currentRank == 0) {
377 shell->state = TRIPLE_GREEN_SHELL;
378 shell->someTimer = 0x0258;
379 temp_v0 = gNearestPathPointByPlayerId[player - gPlayerOne] + 8;
380 if ((s32) gSelectedPathCount < temp_v0) {
381 temp_v0 -= gSelectedPathCount;
382 }
383 shell->pathIndex = temp_v0;
384 } else if (player->currentRank >= 5) {
386 shell->shellId = 1000.0f;
387 temp_v0 = gNearestPathPointByPlayerId[player - gPlayerOne] + 8;
388 if ((s32) gSelectedPathCount < temp_v0) {
389 temp_v0 -= gSelectedPathCount;
390 }
391 shell->pathIndex = temp_v0;
392 shell->targetPlayer = gPlayerPositionLUT[player->currentRank - 1];
393 } else {
394 shell->state = RED_SHELL_LOCK_ON;
395 shell->shellId = 1000.0f;
396 shell->targetPlayer = gPlayerPositionLUT[player->currentRank - 1];
397 }
398 }
399 }
400 shell->velocity[1] -= 0.5;
401 if (shell->velocity[1] < -2.0f) {
402 shell->velocity[1] = -2.0f;
403 }
404 origPos[0] = shell->pos[0];
405 origPos[1] = shell->pos[1];
406 origPos[2] = shell->pos[2];
407 shell->pos[0] += shell->velocity[0];
408 shell->pos[1] += shell->velocity[1];
409 shell->pos[2] += shell->velocity[2];
410 actor_terrain_collision(&shell->unk30, 4.0f, shell->pos[0], shell->pos[1], shell->pos[2], origPos[0],
411 origPos[1], origPos[2]);
412 func_802B4E30((struct Actor*) shell);
413 func_802B4104(shell);
414 break;
416 func_802B3E7C(shell, &gPlayers[shell->targetPlayer]);
417 break;
419 func_802B3B44(shell);
420 if (shell->someTimer == 0) {
421 if ((shell->flags & 0xF) == 0) {
422 destroy_destructable_actor((struct Actor*) shell);
423 } else {
424 shell->someTimer -= 1;
425 }
426 }
427 break;
429 func_802B3B44(shell);
430 player = &gPlayers[shell->targetPlayer];
431 height = player->pos[0];
432 height -= shell->pos[0];
433 temp_f2 = player->pos[2];
434 temp_f2 -= shell->pos[2];
435 if (((height * height) + (temp_f2 * temp_f2)) < 40000.0f) {
436 shell->state = RED_SHELL_LOCK_ON;
437 }
438 break;
439 case TRIPLE_RED_SHELL:
440 player = &gPlayers[shell->playerId];
441 parent = (TripleShellParent*) GET_ACTOR(shell->parentIndex);
442 if (parent->type != ACTOR_TRIPLE_RED_SHELL) {
443 destroy_destructable_actor((struct Actor*) shell);
444 } else {
445 shell->rotAngle += parent->rotVelocity;
446 somePosVel[0] = sins(shell->rotAngle) * 8.0f;
447 somePosVel[1] = shell->boundingBoxSize - player->boundingBoxSize;
448 somePosVel[2] = coss(shell->rotAngle) * 8.0f;
449 mtxf_translate_vec3f_mat3(somePosVel, player->orientationMatrix);
450 origPos[0] = shell->pos[0];
451 origPos[1] = shell->pos[1];
452 origPos[2] = shell->pos[2];
453 shell->pos[0] = player->pos[0] + somePosVel[0];
454 shell->pos[1] = player->pos[1] + somePosVel[1];
455 shell->pos[2] = player->pos[2] + somePosVel[2];
456 actor_terrain_collision(&shell->unk30, 4.0f, shell->pos[0], shell->pos[1], shell->pos[2], origPos[0],
457 origPos[1], origPos[2]);
458 func_802B4E30((struct Actor*) shell);
459 }
460 break;
461 case DESTROYED_SHELL:
462 shell->velocity[1] -= 0.3f;
463 if (shell->velocity[1] < -5.0f) {
464 shell->velocity[1] = -5.0f;
465 }
466 shell->rotAngle += 0x5B0;
467 shell->someTimer -= 1;
468 shell->pos[1] += shell->velocity[1];
469 if (shell->someTimer == 0) {
470 destroy_actor((struct Actor*) shell);
471 }
472 break;
474 func_802B3B44(shell);
475 shell->targetPlayer = gPlayerPositionLUT[0];
476 player = &gPlayers[gPlayerPositionLUT[0]];
477 height = player->pos[0];
478 height -= shell->pos[0];
479 temp_f2 = player->pos[2];
480 temp_f2 -= shell->pos[2];
481 if (((height * height) + (temp_f2 * temp_f2)) < 40000.0f) {
483 }
484 break;
485 case 9:
486 func_802B3E7C(shell, &gPlayers[shell->targetPlayer]);
487 break;
488 default:
489 break;
490 }
491}
size_t CM_FindActorIndex(Actor *actor)
Definition Game.cpp:749
@ ACTOR_BLUE_SPINY_SHELL
Definition actor_types.h:81
@ ACTOR_RED_SHELL
Definition actor_types.h:47
@ ACTOR_TRIPLE_RED_SHELL
Definition actor_types.h:61
@ DESTROYED_SHELL
Definition actor_types.h:102
@ MOVING_SHELL
Definition actor_types.h:97
@ HELD_SHELL
Definition actor_types.h:95
@ TRIPLE_RED_SHELL
Definition actor_types.h:101
@ BLUE_SHELL_TARGET_ELIMINATED
Definition actor_types.h:104
@ RELEASED_SHELL
Definition actor_types.h:96
@ GREEN_SHELL_HIT_A_RACER
Definition actor_types.h:100
@ TRIPLE_GREEN_SHELL
Definition actor_types.h:99
@ BLUE_SHELL_LOCK_ON
Definition actor_types.h:103
@ RED_SHELL_LOCK_ON
Definition actor_types.h:98
#define GET_ACTOR(index)
Definition actor_types.h:88
void destroy_destructable_actor(struct Actor *actor)
Definition actors.c:1748
void destroy_actor(struct Actor *actor)
Definition actors.c:1216
void func_802B4E30(struct Actor *arg0)
Definition actors_extended.c:1013
void copy_collision(struct Collision *src, struct Collision *dest)
Definition actors_extended.c:20
void func_802B3E7C(struct ShellActor *shell, Player *player)
Definition update.inc.c:115
void func_802B3B44(struct ShellActor *shell)
Definition update.inc.c:9
void func_802B4104(struct ShellActor *shell)
Definition update.inc.c:188
void update_actor_red_blue_shell(struct ShellActor *shell)
Update the red and blue shell actors.
Definition update.inc.c:206
s16 func_802B3FD0(Player *owner, struct ShellActor *shell)
Definition update.inc.c:158
s16 gTrackMinY
Definition code_800029B0.c:101
s16 gTrackMaxX
Definition code_800029B0.c:97
s16 gTrackMinZ
Definition code_800029B0.c:104
s16 gTrackMaxZ
Definition code_800029B0.c:103
s16 gTrackMinX
Definition code_800029B0.c:98
s16 gPlayerPositionLUT[8]
Definition code_800029B0.c:155
s32 add_red_shell_in_unexpired_actor_list(s32 actorIndex)
Definition code_80005FD0.c:3268
s32 add_blue_shell_in_unexpired_actor_list(s32 arg0)
Definition code_80005FD0.c:3284
u16 gSelectedPathCount
Definition code_80005FD0.c:176
TrackPathPoint * gCurrentTrackPath
Definition code_80005FD0.c:181
u16 gNearestPathPointByPlayerId[12]
Definition code_80005FD0.c:177
s16 gPlayerBalloonCount[8]
Definition code_80057C60_var.c:213
f32 calculate_surface_height(f32 x, f32 y, f32 z, u16 index)
Definition collision.c:466
u16 actor_terrain_collision(struct Collision *collision, f32 boundingBoxSize, f32 newX, f32 newY, f32 newZ, f32 oldX, f32 oldY, f32 oldZ)
Definition collision.c:1181
f32 Vec3f[3]
Definition common_structs.h:10
#define BOO_EFFECT
Definition defines.h:474
#define BATTLE
Definition defines.h:159
#define PLAYER_EXISTS
Definition defines.h:115
#define PLAYER_HUMAN
Definition defines.h:114
void func_800C9060(u8 playerId, u32 soundBits)
Definition external.c:2970
void func_800C90F4(u8 playerId, u32 soundBits)
Definition external.c:2983
void func_800C9D80(Vec3f position, Vec3f velocity, u32 soundBits)
Definition external.c:3223
void func_800C98B8(Vec3f position, Vec3f velocity, u32 soundBits)
Definition external.c:3135
#define UNUSED
Definition macros.h:40
Player * gPlayerOne
Definition main.c:75
Player gPlayers[NUM_PLAYERS]
Definition main.c:74
struct Controller gControllers[NUM_PLAYERS]
Definition main.c:64
u16 gDemoMode
Definition main.c:169
struct Controller * gControllerOne
Definition main.c:65
s32 gModeSelection
Definition main.c:179
float sqrtf(float)
f32 sins(u16 arg0)
Definition math_util.c:1062
void func_802B64C4(Vec3f arg0, s16 arg1)
Definition math_util.c:588
f32 func_802B51E8(Vec3f arg0, Vec3f arg1)
Definition math_util.c:83
void mtxf_translate_vec3f_mat3(Vec3f pos, Mat3 mat)
Definition math_util.c:556
f32 coss(u16 arg0)
Definition math_util.c:1066
#define SOUND_ARG_LOAD(sound_bank, byte2, byte3, sound_id)
Definition sounds.h:14
Definition actor_types.h:124
struct Collision unk30
Definition actor_types.h:135
s16 state
Definition actor_types.h:128
Vec3f velocity
Definition actor_types.h:134
s16 flags
Definition actor_types.h:126
Vec3f pos
Definition actor_types.h:133
f32 boundingBoxSize
Definition actor_types.h:130
Vec3f surfaceDistance
Definition common_structs.h:155
Vec3f unk54
Definition common_structs.h:157
u16 meshIndexZX
Definition common_structs.h:154
Definition common_structs.h:66
u16 buttonDepressed
Definition common_structs.h:73
Definition common_structs.h:264
struct Collision collision
Definition common_structs.h:339
s16 unk_0C0
Definition common_structs.h:314
f32 speed
Definition common_structs.h:299
Mat3 orientationMatrix
Definition common_structs.h:341
u16 characterId
Definition common_structs.h:369
u32 effects
Definition common_structs.h:313
Vec3s rotation
Definition common_structs.h:276
f32 boundingBoxSize
Definition common_structs.h:289
u16 type
Definition common_structs.h:265
s16 currentRank
Definition common_structs.h:267
Vec3f pos
Definition common_structs.h:274
Definition actor_types.h:328
s16 rotAngle
Definition actor_types.h:344
s16 rotVelocity
Definition actor_types.h:342
s16 flags
Definition actor_types.h:330
f32 boundingBoxSize
Definition actor_types.h:341
s16 state
Definition actor_types.h:339
f32 shellId
Definition actor_types.h:340
s16 type
Definition actor_types.h:329
s16 playerId
Definition actor_types.h:348
struct Collision unk30
Definition actor_types.h:352
Vec3f velocity
Definition actor_types.h:351
Vec3f pos
Definition actor_types.h:350
s16 targetPlayer
Definition actor_types.h:337
s16 someTimer
Definition actor_types.h:335
u16 pathIndex
Definition actor_types.h:345
Definition actor_types.h:311
s16 rotVelocity
Definition actor_types.h:318
s16 type
Definition actor_types.h:312