summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTyler McGavran <tyler.taggerung@gmail.com>2023-10-19 01:19:07 -0400
committerGitHub <noreply@github.com>2023-10-18 23:19:07 -0600
commita870180a2cc0fc040396713f4777471202304141 (patch)
tree336e4d758678d9b0f9f17b447e844e59ae278396 /src
parent53f84286d62139d3d84d5e438002a2f2a09bdeee (diff)
Couple matches (#466)
Removed some things from variables.h and functions.h Added headers for some src/data files
Diffstat (limited to 'src')
-rw-r--r--src/camera.c1
-rw-r--r--src/code_800029B0.h3
-rw-r--r--src/code_80005FD0.c1
-rw-r--r--src/code_80005FD0.h4
-rw-r--r--src/code_80057C60.c320
-rw-r--r--src/code_80057C60.h30
-rw-r--r--src/code_80071F00.c1
-rw-r--r--src/code_80091750.c27
-rw-r--r--src/code_80091750.h8
-rw-r--r--src/data/data_800E45C0.c1
-rw-r--r--src/data/data_800E45C0.h20
-rw-r--r--src/data/data_800E8700.c1
-rw-r--r--src/data/data_800E8700.h29
-rw-r--r--src/ending/ceremony_and_credits.c1
-rw-r--r--src/hud_renderer.c59
-rw-r--r--src/hud_renderer.h4
-rw-r--r--src/menus.h2
-rw-r--r--src/racing/skybox_and_splitscreen.h4
-rw-r--r--src/spawn_players.c1
-rw-r--r--src/staff_ghosts.h3
20 files changed, 192 insertions, 328 deletions
diff --git a/src/camera.c b/src/camera.c
index 0549976cb..3e0142df9 100644
--- a/src/camera.c
+++ b/src/camera.c
@@ -29,7 +29,6 @@ Camera *camera4 = &cameras[3];
// s32 D_80164A2C;
// f32 D_8016524C; <- could maybe, maybe be part of spawn_players' bss stuff?
-void func_80014DE4(s32);
extern f32 D_80164498[];
extern s16 D_80164678[];
extern f32 D_801649D8[]; // f32[4]
diff --git a/src/code_800029B0.h b/src/code_800029B0.h
index e5e3946b2..a3849c98c 100644
--- a/src/code_800029B0.h
+++ b/src/code_800029B0.h
@@ -17,6 +17,7 @@ extern struct UnkStruct_800DC5EC *D_800DC5EC;
extern struct UnkStruct_800DC5EC *D_800DC5F0;
extern struct UnkStruct_800DC5EC *D_800DC5F4;
extern struct UnkStruct_800DC5EC *D_800DC5F8;
+extern u16 gIsGamePaused;
extern mk64_surface_map_ram *gSurfaceMap;
extern u16 *D_8015F584;
@@ -78,6 +79,8 @@ extern u8 *gNmiUnknown4;
extern u8 *gNmiUnknown5;
extern u8 *gNmiUnknown6;
+extern s32 gIsMirrorMode; // D_800DC604
+
extern Vec3f D_8015F8D0;
extern s32 D_8015F8DC;
diff --git a/src/code_80005FD0.c b/src/code_80005FD0.c
index c6693f8e1..31aa2b267 100644
--- a/src/code_80005FD0.c
+++ b/src/code_80005FD0.c
@@ -36,7 +36,6 @@ s16 code_80005FD0_pad[2];
uintptr_t *D_80162EB8[20];
-
// Strings, presented by google translate!
// Note that these are EUC-JP encoded, see:
// https://en.wikipedia.org/wiki/Extended_Unix_Code#EUC-JP
diff --git a/src/code_80005FD0.h b/src/code_80005FD0.h
index 7901ac986..3a0b1842d 100644
--- a/src/code_80005FD0.h
+++ b/src/code_80005FD0.h
@@ -120,6 +120,7 @@ void func_8000F0E0(void);
void func_8000F124(void);
void func_8000F2BC(TrackWaypoint*, size_t);
void func_8000F2DC(void);
+void func_8000F628(void);
void func_80010218(s32);
f32 func_80010480(s32, u16);
@@ -167,6 +168,7 @@ void func_80014C78(void);
void func_80014CC0(s32, Player*);
void func_80014D08(s32);
void func_80014D30(s32, s32);
+void func_80014DE4(s32);
f32 func_80014EE4(f32, s32);
void func_800151A4(Camera*, s32);
@@ -234,6 +236,7 @@ extern Collision D_80162E70;
extern s16 D_80162EB0;
extern s16 D_80162FCC;
extern f32 D_80162FA0[];
+extern f32 gCourseCompletionPercentByRank[8]; // D_80162FD8
extern s16 D_80164378[];
extern s32 D_801643E0[];
@@ -242,6 +245,7 @@ extern s32 D_801643E0[];
extern s32 D_80164408[];
extern s32 D_8016448C;
extern f32 D_80164498[];
+extern f32 gCourseCompletionPercentByPlayerId[8]; // D_801644D0
extern f32 D_801645F8[];
extern s32 D_80164608[];
extern f32 D_80164618[];
diff --git a/src/code_80057C60.c b/src/code_80057C60.c
index a930afaec..a37282983 100644
--- a/src/code_80057C60.c
+++ b/src/code_80057C60.c
@@ -18,6 +18,7 @@
#include "code_80071F00.h"
#include "code_80086E70.h"
#include "code_8008C1D0.h"
+#include "src/data/data_800E8700.h"
#include "skybox_and_splitscreen.h"
#include "common_textures.h"
#include "audio/external.h"
@@ -4782,218 +4783,60 @@ void func_80065AB0(Player *player, s8 arg1, s16 arg2, s8 arg3) {
GLOBAL_ASM("asm/non_matchings/code_80057C60/func_80065AB0.s")
#endif
-#ifdef MIPS_TO_C
-//generated by m2c commit 08138748803d75e73e4a94bb0c619a273754ee9c on Oct-09-2023
-extern ? D_05FF8DB8;
-extern ? D_800E47DC;
-extern ? D_800E480C;
-extern ? D_800E8C00;
-
-void func_80065F0C(Player *player, s32 arg1, s16 arg2, s8 arg3) {
- f32 spE4;
- f32 spE0;
- f32 spDC;
- s16 spD8;
- s16 spD6;
- s16 spD4;
- s16 spCC;
- s16 spCA;
- s16 spC8;
- s16 spC6;
- void *sp44;
- Gfx *temp_s0;
- Gfx *temp_s0_10;
- Gfx *temp_s0_11;
- Gfx *temp_s0_12;
- Gfx *temp_s0_13;
- Gfx *temp_s0_14;
- Gfx *temp_s0_15;
- Gfx *temp_s0_16;
- Gfx *temp_s0_17;
- Gfx *temp_s0_18;
- Gfx *temp_s0_19;
- Gfx *temp_s0_20;
- Gfx *temp_s0_21;
- Gfx *temp_s0_22;
- Gfx *temp_s0_23;
- Gfx *temp_s0_24;
- Gfx *temp_s0_25;
- Gfx *temp_s0_26;
- Gfx *temp_s0_27;
- Gfx *temp_s0_28;
- Gfx *temp_s0_29;
- Gfx *temp_s0_2;
- Gfx *temp_s0_30;
- Gfx *temp_s0_31;
- Gfx *temp_s0_3;
- Gfx *temp_s0_4;
- Gfx *temp_s0_5;
- Gfx *temp_s0_6;
- Gfx *temp_s0_7;
- Gfx *temp_s0_8;
- Gfx *temp_s0_9;
- s16 temp_a0;
- s16 temp_ra;
- s16 temp_s2;
- s16 temp_s3;
- s32 temp_a2;
- s32 temp_t6;
- s32 temp_v1;
- void *temp_v0;
-
- temp_v0 = player + (arg2 * 0x48);
- if ((temp_v0->unk544 == 1) && (temp_v0->unk546 != 0)) {
- spDC = temp_v0->unk528;
- spE0 = temp_v0->unk52C;
- spD4 = 0;
- spE4 = temp_v0->unk530;
- spD8 = 0;
- spD6 = player->unk_048[arg3];
- sp44 = temp_v0;
- func_800652D4(&spDC, &spD4, temp_v0->unk534 * player->size);
- if ((s32) sp44->unk53C != 8) {
- temp_a0 = sp44->unk562;
- temp_t6 = sp44->unk560 * 4;
- temp_v1 = *(&D_800E47DC + temp_t6);
- temp_ra = ((temp_v1 >> 0x10) & 0xFF) - temp_a0;
- temp_a2 = *(&D_800E480C + temp_t6);
- temp_s2 = ((temp_v1 >> 8) & 0xFF) - temp_a0;
- temp_s3 = (temp_v1 & 0xFF) - temp_a0;
- spCA = ((temp_a2 >> 0x10) & 0xFF) - temp_a0;
- spC8 = ((temp_a2 >> 8) & 0xFF) - temp_a0;
- spC6 = (temp_a2 & 0xFF) - temp_a0;
- spCC = sp44->unk566;
- if (sp44->unk568 == 0) {
- temp_s0 = gDisplayListHead;
- gDisplayListHead = temp_s0 + 8;
- temp_s0->words.w1 = (u32) D_0D008DB8;
- temp_s0->words.w0 = 0x06000000;
- temp_s0_2 = gDisplayListHead;
- gDisplayListHead = temp_s0_2 + 8;
- temp_s0_2->words.w0 = 0xFD900000;
- temp_s0_2->words.w1 = (u32) D_8018D494;
- temp_s0_3 = gDisplayListHead;
- gDisplayListHead = temp_s0_3 + 8;
- temp_s0_3->words.w1 = 0x07000000;
- temp_s0_3->words.w0 = 0xF5900000;
- temp_s0_4 = gDisplayListHead;
- gDisplayListHead = temp_s0_4 + 8;
- temp_s0_4->words.w1 = 0;
- temp_s0_4->words.w0 = 0xE6000000;
- temp_s0_5 = gDisplayListHead;
- gDisplayListHead = temp_s0_5 + 8;
- temp_s0_5->words.w1 = 0x071FF200;
- temp_s0_5->words.w0 = 0xF3000000;
- temp_s0_6 = gDisplayListHead;
- gDisplayListHead = temp_s0_6 + 8;
- temp_s0_6->words.w1 = 0;
- temp_s0_6->words.w0 = 0xE7000000;
- temp_s0_7 = gDisplayListHead;
- gDisplayListHead = temp_s0_7 + 8;
- temp_s0_7->words.w1 = 0;
- temp_s0_7->words.w0 = 0xF5880800;
- temp_s0_8 = gDisplayListHead;
- gDisplayListHead = temp_s0_8 + 8;
- temp_s0_8->words.w1 = 0x0007C07C;
- temp_s0_8->words.w0 = 0xF2000000;
- func_8004B72C((s32) temp_ra, (s32) temp_s2, (s32) temp_s3, (s32) spCA, (s32) spC8, (s32) spC6, (s32) spCC);
- temp_s0_9 = gDisplayListHead;
- gDisplayListHead = temp_s0_9 + 8;
- temp_s0_9->words.w0 = (u32) &D_05FF8DB8;
- temp_s0_9->words.w1 = (u32) D_0D008E48;
+#ifdef NON_MATCHING
+//https://decomp.me/scratch/KEz08
+// Something is very wrong with the handling of prim/evn colors, but I can't figuer out what.
+void func_80065F0C(Player *player, s8 arg1, s16 arg2, s8 arg3) {
+ Vec3f spDC;
+ Vec3s spD4;
+ s16 primRed;
+ s16 primGreen;
+ s16 primBlue;
+ s16 primAlpha;
+ u8 envRed;
+ s16 envGreen;
+ s16 envBlue;
+
+ if ((player->unk_258[10 + arg2].unk_01C == 1) && (player->unk_258[10 + arg2].unk_01E != 0)) {
+ spDC[0] = player->unk_258[10 + arg2].unk_000[0];
+ spDC[1] = player->unk_258[10 + arg2].unk_000[1];
+ spDC[2] = player->unk_258[10 + arg2].unk_000[2];
+ spD4[0] = 0;
+ spD4[1] = player->unk_048[arg3];
+ spD4[2] = 0;
+ func_800652D4(&spDC, &spD4, player->unk_258[10 + arg2].unk_00C * player->size);
+ if ((s32)player->unk_258[10 + arg2].unk_014 != 8) {
+ primRed = ((D_800E47DC[player->unk_258[10 + arg2].unk_038] >> 0x10) & 0xFF) - player->unk_258[10 + arg2].unk_03A;
+ primGreen = ((D_800E47DC[player->unk_258[10 + arg2].unk_038] >> 0x08) & 0xFF) - player->unk_258[10 + arg2].unk_03A;
+ primBlue = ((D_800E47DC[player->unk_258[10 + arg2].unk_038] >> 0x00) & 0xFF) - player->unk_258[10 + arg2].unk_03A;
+ envRed = ((D_800E480C[player->unk_258[10 + arg2].unk_038] >> 0x10) & 0xFF) - player->unk_258[10 + arg2].unk_03A;
+ envGreen = ((D_800E480C[player->unk_258[10 + arg2].unk_038] >> 0x08) & 0xFF) - player->unk_258[10 + arg2].unk_03A;
+ envBlue = ((D_800E480C[player->unk_258[10 + arg2].unk_038] >> 0x00) & 0xFF) - player->unk_258[10 + arg2].unk_03A;
+ primAlpha = player->unk_258[10 + arg2].unk_03E;
+ if (player->unk_258[10 + arg2].unk_040 == 0) {
+ gSPDisplayList(gDisplayListHead++, D_0D008DB8);
+ gDPLoadTextureBlock(gDisplayListHead++, D_8018D494, G_IM_FMT_I, G_IM_SIZ_8b, 32, 32, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD);
+ func_8004B72C(primRed, primGreen, primBlue, envRed, envGreen, envBlue, primAlpha);
+ gSPDisplayList(gDisplayListHead++, D_0D008E48);
} else {
- temp_s0_10 = gDisplayListHead;
- gDisplayListHead = temp_s0_10 + 8;
- temp_s0_10->words.w1 = 0x0D010000;
- temp_s0_10->words.w0 = 0x06000000;
- temp_s0_11 = gDisplayListHead;
- gDisplayListHead = temp_s0_11 + 8;
- temp_s0_11->words.w0 = 0xFD900000;
- temp_s0_11->words.w1 = (u32) D_8018D494;
- temp_s0_12 = gDisplayListHead;
- gDisplayListHead = temp_s0_12 + 8;
- temp_s0_12->words.w1 = 0x07000000;
- temp_s0_12->words.w0 = 0xF5900000;
- temp_s0_13 = gDisplayListHead;
- gDisplayListHead = temp_s0_13 + 8;
- temp_s0_13->words.w1 = 0;
- temp_s0_13->words.w0 = 0xE6000000;
- temp_s0_14 = gDisplayListHead;
- gDisplayListHead = temp_s0_14 + 8;
- temp_s0_14->words.w1 = 0x071FF200;
- temp_s0_14->words.w0 = 0xF3000000;
- temp_s0_15 = gDisplayListHead;
- gDisplayListHead = temp_s0_15 + 8;
- temp_s0_15->words.w1 = 0;
- temp_s0_15->words.w0 = 0xE7000000;
- temp_s0_16 = gDisplayListHead;
- gDisplayListHead = temp_s0_16 + 8;
- temp_s0_16->words.w1 = 0;
- temp_s0_16->words.w0 = 0xF5880800;
- temp_s0_17 = gDisplayListHead;
- gDisplayListHead = temp_s0_17 + 8;
- temp_s0_17->words.w1 = 0x0007C07C;
- temp_s0_17->words.w0 = 0xF2000000;
- func_8004B72C((s32) temp_ra, (s32) temp_s2, (s32) temp_s3, (s32) spCA, (s32) spC8, (s32) spC6, (s32) spCC);
- temp_s0_18 = gDisplayListHead;
- gDisplayListHead = temp_s0_18 + 8;
- temp_s0_18->words.w1 = 3;
- temp_s0_18->words.w0 = 0xB9000002;
- temp_s0_19 = gDisplayListHead;
- gDisplayListHead = temp_s0_19 + 8;
- temp_s0_19->words.w0 = 0x06000000;
- temp_s0_19->words.w1 = (u32) D_0D008E48;
+ gSPDisplayList(gDisplayListHead++, D_0D008DB8);
+ gDPLoadTextureBlock(gDisplayListHead++, D_8018D494, G_IM_FMT_I, G_IM_SIZ_8b, 32, 32, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD);
+ func_8004B72C(primRed, primGreen, primBlue, envRed, envGreen, envBlue, primAlpha);
+ gDPSetAlphaCompare(gDisplayListHead++, G_AC_DITHER);
+ gSPDisplayList(gDisplayListHead++, D_0D008E48);
}
} else {
- temp_s0_20 = gDisplayListHead;
- gDisplayListHead = temp_s0_20 + 8;
- temp_s0_20->words.w1 = (u32) D_0D008C90;
- temp_s0_20->words.w0 = 0x06000000;
- temp_s0_21 = gDisplayListHead;
- gDisplayListHead = temp_s0_21 + 8;
- temp_s0_21->words.w1 = 0;
- temp_s0_21->words.w0 = 0xBA000E02;
- temp_s0_22 = gDisplayListHead;
- gDisplayListHead = temp_s0_22 + 8;
- temp_s0_22->words.w0 = 0xFD100000;
- temp_s0_22->words.w1 = (u32) D_8018D498;
- temp_s0_23 = gDisplayListHead;
- gDisplayListHead = temp_s0_23 + 8;
- temp_s0_23->words.w1 = 0x07080200;
- temp_s0_23->words.w0 = 0xF5100000;
- temp_s0_24 = gDisplayListHead;
- gDisplayListHead = temp_s0_24 + 8;
- temp_s0_24->words.w1 = 0;
- temp_s0_24->words.w0 = 0xE6000000;
- temp_s0_25 = gDisplayListHead;
- gDisplayListHead = temp_s0_25 + 8;
- temp_s0_25->words.w1 = 0x077FF100;
- temp_s0_25->words.w0 = 0xF3000000;
- temp_s0_26 = gDisplayListHead;
- gDisplayListHead = temp_s0_26 + 8;
- temp_s0_26->words.w1 = 0;
- temp_s0_26->words.w0 = 0xE7000000;
- temp_s0_27 = gDisplayListHead;
- gDisplayListHead = temp_s0_27 + 8;
- temp_s0_27->words.w0 = 0xF5101000;
- temp_s0_27->words.w1 = 0x00080200;
- temp_s0_28 = gDisplayListHead;
- gDisplayListHead = temp_s0_28 + 8;
- temp_s0_28->words.w0 = 0xF2000000;
- temp_s0_28->words.w1 = 0x0007C0FC;
- func_8004B35C((s32) sp44->unk560, (s32) sp44->unk562, (s32) sp44->unk564, 0x000000FF);
- temp_s0_29 = gDisplayListHead;
- gDisplayListHead = temp_s0_29 + 8;
- temp_s0_29->words.w0 = 0xB900031D;
- temp_s0_29->words.w1 = 0x00553078;
- temp_s0_30 = gDisplayListHead;
- gDisplayListHead = temp_s0_30 + 8;
- temp_s0_30->words.w1 = (u32) &D_800E8C00;
- temp_s0_30->words.w0 = 0x0400103F;
- temp_s0_31 = gDisplayListHead;
- gDisplayListHead = temp_s0_31 + 8;
- temp_s0_31->words.w0 = 0x06000000;
- temp_s0_31->words.w1 = (u32) D_0D008DA0;
+ primRed = player->unk_258[10 + arg2].unk_038;
+ primGreen = player->unk_258[10 + arg2].unk_03A;
+ primBlue = player->unk_258[10 + arg2].unk_03C;
+ gSPDisplayList(gDisplayListHead++, D_0D008C90);
+ gDPSetTextureLUT(gDisplayListHead++, G_TT_NONE);
+ gDPLoadTextureBlock(gDisplayListHead++, D_8018D498, G_IM_FMT_RGBA, G_IM_SIZ_16b, 32, 64, 0, G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD);
+ func_8004B35C(primRed, primGreen, primBlue, 0x000000FF);
+ gDPSetRenderMode(gDisplayListHead++, G_RM_AA_ZB_TEX_EDGE, G_RM_AA_ZB_TEX_EDGE2);
+ gSPVertex(gDisplayListHead++, D_800E8C00, 4, 0);
+ gSPDisplayList(gDisplayListHead++, D_0D008DA0);
+
}
gMatrixEffectCount += 1;
}
@@ -5173,8 +5016,6 @@ void func_80067280(Player *player, s8 arg1, s16 arg2, s8 arg3) {
}
}
-#ifdef NON_MATCHING
-
void func_80067604(Player *player, s8 arg1, s16 arg2, s8 arg3) {
Vec3f sp8C;
Vec3s sp84;
@@ -5192,15 +5033,9 @@ void func_80067604(Player *player, s8 arg1, s16 arg2, s8 arg3) {
gSPDisplayList(gDisplayListHead++, D_0D008DB8);
gDPLoadTextureBlock(gDisplayListHead++, D_0D02AC58, G_IM_FMT_I, G_IM_SIZ_8b, 32, 32, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD);
func_8004B72C(0x000000FF, 0x000000FF, 0x000000DF, 0x000000FF, 0x0000005F, 0, 0x00000060);
- // temp_v0_10 = gDisplayListHead;
- // gDisplayListHead = temp_v0_10 + 8;
- // temp_v0_10->words.w0 = (u32) &D_05FF8DB8;
- // temp_v0_10->words.w1 = (u32) D_0D008E70;
- // I have no idea what's going on here.
- // D_05FF8DB8 is clearly a fake variable, but there's not Gfx command
- // that matches w0 = 05FF8DB8, w1 = 0D008E70
+ gSPDisplayList(gDisplayListHead++, D_0D008E70);
} else {
- gSPDisplayList(gDisplayListHead++, 0x0D010000);
+ gSPDisplayList(gDisplayListHead++, D_0D008DB8);
gDPLoadTextureBlock(gDisplayListHead++, D_0D02AC58, G_IM_FMT_I, G_IM_SIZ_8b, 32, 32, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD);
func_8004B72C(0x000000FF, 0x000000FF, 0x000000DF, 0x000000FF, 0x0000005F, 0, 0x00000060);
gSPDisplayList(gDisplayListHead++, D_0D008E48);
@@ -5208,9 +5043,6 @@ void func_80067604(Player *player, s8 arg1, s16 arg2, s8 arg3) {
gMatrixEffectCount += 1;
}
}
-#else
-GLOBAL_ASM("asm/non_matchings/code_80057C60/func_80067604.s")
-#endif
// data/data_code_80071F00_2.s
extern u8 D_800E52D0[];
@@ -5625,7 +5457,7 @@ void func_8006A280(Player *player, s8 arg1, s16 arg2, s8 arg3) {
}
#ifdef MIPS_TO_C
-//generated by m2c commit b7eac665cffd02361f73cec283ef16d0a35a0e5b
+//generated by m2c commit beb457dabfc7a01ec6540a5404a6a05097a13602 on Oct-14-2023
extern ? D_8018D4D0;
extern ? D_8018D530;
extern ? D_8018D590;
@@ -5640,7 +5472,6 @@ extern ? D_8018D800;
extern ? D_8018D830;
extern ? D_8018D860;
extern ? D_8018D890;
-extern ? gPlayerBalloonStatus;
void func_8006A50C(Player *player, f32 arg1, f32 arg2, s8 arg3, s8 arg4, s16 arg5) {
f32 sp44;
@@ -5654,7 +5485,7 @@ void func_8006A50C(Player *player, f32 arg1, f32 arg2, s8 arg3, s8 arg4, s16 arg
u16 *temp_t0;
temp_v0 = arg4 * 2;
- temp_t0 = (arg3 * 6) + temp_v0 + &gPlayerBalloonStatus;
+ temp_t0 = (arg3 * 6) + temp_v0 + gPlayerBalloonStatus;
*temp_t0 = 0;
temp_v1 = arg4 * 4;
*(&D_8018D650 + ((arg3 * 0xC) + temp_v1)) = 0.1f;
@@ -5682,7 +5513,7 @@ GLOBAL_ASM("asm/non_matchings/code_80057C60/func_8006A50C.s")
#endif
#ifdef MIPS_TO_C
-//generated by m2c commit b7eac665cffd02361f73cec283ef16d0a35a0e5b
+//generated by m2c commit beb457dabfc7a01ec6540a5404a6a05097a13602 on Oct-14-2023
extern ? D_8018D4D0;
extern ? D_8018D530;
extern ? D_8018D590;
@@ -5698,7 +5529,6 @@ extern ? D_8018D830;
extern ? D_8018D860;
extern ? D_8018D890;
extern ? D_8018D8D0;
-extern ? gPlayerBalloonStatus;
static ? D_800E4914; /* unable to generate initializer */
void func_8006A7C0(Player *player, f32 arg1, f32 arg2, s8 arg3, s8 arg4) {
@@ -5726,7 +5556,6 @@ void func_8006A7C0(Player *player, f32 arg1, f32 arg2, s8 arg3, s8 arg4) {
f32 var_f12;
f64 var_f0;
f64 var_f0_2;
- s16 *temp_a0;
s16 *temp_a2;
s16 *temp_v0;
s16 *var_a1;
@@ -5747,7 +5576,7 @@ void func_8006A7C0(Player *player, f32 arg1, f32 arg2, s8 arg3, s8 arg4) {
sp80.unk1C = (s32) D_800E4914.unk1C;
var_f12 = player->unk_094;
var_t0 = arg4 * 2;
- temp_t7 = (arg3 * 6) + var_t0 + &gPlayerBalloonStatus;
+ temp_t7 = (arg3 * 6) + var_t0 + gPlayerBalloonStatus;
sp58 = temp_t7;
temp_t1 = arg4 * 4;
sp6C = (-(var_f12 / 18.0f) * 216.0f) / 10.0f;
@@ -5856,10 +5685,8 @@ void func_8006A7C0(Player *player, f32 arg1, f32 arg2, s8 arg3, s8 arg4) {
temp_v1_3 = (arg3 * 6) + sp5C + &D_8018D8D0;
*temp_v0_2 = (f32) ((f64) *temp_v0_2 + 0.2);
*temp_v1_3 = (s16) (*temp_v1_3 + 1);
- temp_a0 = (arg3 * 6) + sp5C + &D_8018D890;
sp60 = temp_v1_3;
- sp5C = sp5C;
- move_s16_towards(temp_a0, 0, 0.1f);
+ move_s16_towards((arg3 * 6) + sp5C + &D_8018D890, 0, 0.1f);
move_s16_towards((arg3 * 6) + sp5C + &D_8018D860, 0, 0.1f);
if (*temp_v1_3 >= 0x78) {
func_8006B974((s32) player, arg3, arg4);
@@ -5870,20 +5697,18 @@ GLOBAL_ASM("asm/non_matchings/code_80057C60/func_8006A7C0.s")
#endif
#ifdef MIPS_TO_C
-//generated by m2c commit b7eac665cffd02361f73cec283ef16d0a35a0e5b
-extern u32 D_8018D4BC;
-extern s32 D_8018D4C0;
+//generated by m2c commit beb457dabfc7a01ec6540a5404a6a05097a13602 on Oct-14-2023
extern ? D_8018D4D0;
extern ? D_8018D530;
extern ? D_8018D590;
extern ? D_8018D7D0;
extern ? D_8018D860;
extern ? D_8018D890;
+static ? gBalloonVertexPlane1; /* unable to generate initializer */
+static ? gBalloonVertexPlane2; /* unable to generate initializer */
+static ? D_800E52D0; /* unable to generate initializer */
static ? D_800E4934; /* unable to generate initializer */
static ? D_800E4954; /* unable to generate initializer */
-static ? gBalloonVertexPlane1; /* unable to generate initializer */
-static ? gBalloonVertexPlane2; /* unable to generate initializer */
-static ? D_800E52D0; /* unable to generate initializer */
void func_8006AFD0(Player *player, s16 arg1, s8 arg2, s8 arg3) {
f32 sp13C;
@@ -5982,7 +5807,7 @@ void func_8006AFD0(Player *player, s16 arg1, s8 arg2, s8 arg3) {
temp_v0_2 = &cameras[arg3];
temp_f20 = player->pos[0] - temp_v0_2->pos[0];
temp_f0 = player->pos[2] - temp_v0_2->pos[2];
- if (gActiveScreenMode != SCREEN_MODE_3P_4P_SPLITSCREEN) {
+ if (gActiveScreenMode != 3) {
sp11C = temp_t1;
var_f20 = sqrtf((temp_f20 * temp_f20) + (temp_f0 * temp_f0)) / 300.0f;
} else {
@@ -6037,8 +5862,6 @@ void func_8006AFD0(Player *player, s16 arg1, s8 arg2, s8 arg3) {
GLOBAL_ASM("asm/non_matchings/code_80057C60/func_8006AFD0.s")
#endif
-extern void func_8006A50C(Player*, f32, f32, s8, s8, s16);
-
void func_8006B7E4(Player* player, s8 arg1) {
func_8006A50C(player, 0.0f, 0.0f, arg1, (s8) 0, (s16) 0);
func_8006A50C(player, 1.5f, 2.0f, arg1, (s8) 1, (s16) 0x1C70);
@@ -6547,21 +6370,6 @@ void func_8006D194(Player *player, s8 arg1, s8 arg2) {
GLOBAL_ASM("asm/non_matchings/code_80057C60/func_8006D194.s")
#endif
-void func_8006538C(Player *, s8, s16, s8); /* extern */
-void func_80065AB0(Player *, s8, s16, s8); /* extern */
-void func_80065F0C(Player *, s8, s16, s8); /* extern */
-void func_800664E0(Player *, s8, s16, s8); /* extern */
-void func_80066BAC(Player *, s8, s16, s8); /* extern */
-void func_80067280(Player *, s8, s16, s8); /* extern */
-void func_80067604(Player *, s8, s16, s8); /* extern */
-void func_800691B8(Player *, s8, s16, s8); /* extern */
-void func_80069444(Player *, s8, s16, s8); /* extern */
-void func_800696CC(Player *, s8, s16, s8, f32); /* extern */
-void func_80069938(Player *, s8, s16, s8); /* extern */
-void func_80069BA8(Player *, s8, s16, s8); /* extern */
-void func_80069DB8(Player *, s8, s16, s8); /* extern */
-void func_8006A01C(Player *, s8, s16, s8); /* extern */
-
void func_8006D474(Player *player, s8 arg1, s8 arg2) {
s16 var_s2;
if ((player->unk_002 & (8 << (arg2 * 4))) == (8 << (arg2 * 4))) {
diff --git a/src/code_80057C60.h b/src/code_80057C60.h
index afc0af65b..223d28b25 100644
--- a/src/code_80057C60.h
+++ b/src/code_80057C60.h
@@ -90,6 +90,7 @@ void func_8005D0FC(s32);
void func_8005D18C(void);
void func_8005D1F4(s32);
+void func_8005D290(void);
void func_8005D6C0(Player*);
void func_8005D794(Player*, UnkPlayerStruct258*, f32, f32, f32, s8, s8);
s32 func_8005D7D8(UnkPlayerStruct258*, s8, f32);
@@ -166,11 +167,15 @@ void func_800651F4(Player*, s16, s8, s8);
void func_800652D4(Vec3f, Vec3s, f32);
void func_8006538C(Player*, s8, s16, s8);
void func_800658A0(Player*, s8, s16, s8);
+void func_80065AB0(Player*, s8, s16, s8);
+void func_80065F0C(Player*, s8, s16, s8);
void func_800664E0(Player*, s8, s16, s8);
void func_80066998(Player*, s8, s16, s8);
+void func_80066BAC(Player*, s8, s16, s8);
void func_80067280(Player*, s8, s16, s8);
+void func_80067604(Player*, s8, s16, s8);
void func_80067964(Player*, s8, f32, s8, s8);
void func_80067D3C(Player*, s8, u8*, s8, f32, s32);
@@ -189,10 +194,11 @@ void func_80069DB8(Player*, s8, s16, s8);
void func_8006A01C(Player*, s8, s16, s8);
void func_8006A280(Player*, s8, s16, s8);
-void func_8006A280(Player*, s8, s16, s8);
+void func_8006A50C(Player*, f32, f32, s8, s8, s16);
void func_8006A7C0(Player*, f32, f32, s8, s8);
void func_8006AFD0(Player*, s16, s8, s8);
+void func_8006B7E4(Player*, s8);
void func_8006B87C(Player*, s8);
void func_8006B8B4(Player*, s8);
void func_8006B974(s32, s8, s8);
@@ -223,7 +229,11 @@ void func_8006E848(Player*, s8, s8);
void func_8006E8C4(Player*, s8, s8);
void func_8006E940(Player*, s8, s8);
-
+extern s16 D_800E4730[];
+extern u8 **D_800E4770[];
+extern u8 **D_800E47A0[];
+extern s32 D_800E47DC[];
+extern s32 D_800E480C[];
extern s8 D_801657B2;
extern s8 D_801657C8;
@@ -346,20 +356,4 @@ extern s32 D_8018D2BC;
extern u8 *D_8018D480;
extern u8 *D_8018D484;
-// data/data_800E8700.c
-extern Vtx D_800E8740[];
-extern Vtx D_800E8780[];
-extern Vtx D_800E87C0[];
-extern Vtx D_800E8800[];
-extern Vtx D_800E8840[];
-extern Vtx D_800E8880[];
-extern Vtx D_800E88C0[];
-extern Vtx D_800E8A00[];
-extern Vtx D_800E8A40[];
-extern Vtx D_800E8B00[];
-extern Vtx D_800E8B40[];
-extern Vtx D_800E8B80[];
-extern Vtx D_800E8BC0[];
-extern Vtx D_800E8900[][4];
-
#endif
diff --git a/src/code_80071F00.c b/src/code_80071F00.c
index 1ab724a7d..f99f4a1f1 100644
--- a/src/code_80071F00.c
+++ b/src/code_80071F00.c
@@ -13,6 +13,7 @@
#include "objects.h"
#include "waypoints.h"
#include "variables.h"
+#include "code_800029B0.h"
#include "code_80005FD0.h"
#include "code_80057C60.h"
#include "code_80086E70.h"
diff --git a/src/code_80091750.c b/src/code_80091750.c
index 5828e2c11..480eb0288 100644
--- a/src/code_80091750.c
+++ b/src/code_80091750.c
@@ -23,6 +23,7 @@
#include "math_util.h"
#include "save_data.h"
#include "podium_ceremony_actors.h"
+#include "skybox_and_splitscreen.h"
// TODO: Move gGfxPool out of main.h
// Unfortunately that's not a small effort due to weird import structure in this project
#include "main.h"
@@ -349,7 +350,7 @@ const s16 gGlyphDisplayWidth[] = {
0x000f, 0x000f, 0x000f, 0x000f,
};
-char *D_800E7500[] = {
+char *gCupNames[] = {
"mushroom cup",
"flower cup",
"star cup",
@@ -532,7 +533,7 @@ char *gDebugSoundModeNames[] = {
"monaural",
};
-char *gSoundModeNames[] = {
+char *gSoundModeNames[NUM_SOUND_MODES] = {
"STEREO",
"HEADPHONE",
"",
@@ -8213,7 +8214,7 @@ block_58:
return;
case 0x96: /* switch 6 */
set_text_color(4);
- func_800936B8(arg0->column, arg0->row, D_800E7500[D_800DC540], arg0->unk1C, arg0->unk24, 1.0f);
+ func_800936B8(arg0->column, arg0->row, gCupNames[D_800DC540], arg0->unk1C, arg0->unk24, 1.0f);
return;
case 0x97: /* switch 6 */
set_text_color(5);
@@ -9241,8 +9242,8 @@ void func_800A2EB8(struct_8018D9E0_entry *arg0) {
func_800A32B4(0xBE - arg0->column, arg0->row + (0x10 * var_s2) + 0x5A, sp70[var_s2], var_s2);
}
set_text_color(TEXT_BLUE_GREEN_RED_CYCLE_2);
- temp_s0 = (s32) (((f32) (get_string_width(D_800E7500[gCupSelection]) + 8) * 0.6f) / 2);
- draw_text((-(s32) (((f32) (get_string_width(D_800E76CC[gCCSelection]) + 8) * 0.6f) / 2) - arg0->column) + 0xF5, arg0->row + 0xE1, D_800E7500[D_800DC540], 0, 0.6f, 0.6f);
+ temp_s0 = (s32) (((f32) (get_string_width(gCupNames[gCupSelection]) + 8) * 0.6f) / 2);
+ draw_text((-(s32) (((f32) (get_string_width(D_800E76CC[gCCSelection]) + 8) * 0.6f) / 2) - arg0->column) + 0xF5, arg0->row + 0xE1, gCupNames[D_800DC540], 0, 0.6f, 0.6f);
draw_text((temp_s0 - arg0->column) + 0xF5, arg0->row + 0xE1, D_800E76CC[D_800E86B0[gPlayerCount - 1][D_800E86AC[gPlayerCount - 1]]], 0, 0.6f, 0.6f);
}
@@ -9354,8 +9355,8 @@ void func_800A34A8(struct_8018D9E0_entry *arg0) {
}
}
set_text_color(5);
- temp_s0_3 = ((get_string_width(D_800E7500[gCupSelection]) + 8) * 0.6f) / 2;
- draw_text((-(s32) (((get_string_width(D_800E76CC[gCCSelection]) + 8) * 0.6f) / 2) - arg0->column) + 0xE6, arg0->row + 0xE1, D_800E7500[D_800DC540], 0, 0.6f, 0.6f);
+ temp_s0_3 = ((get_string_width(gCupNames[gCupSelection]) + 8) * 0.6f) / 2;
+ draw_text((-(s32) (((get_string_width(D_800E76CC[gCCSelection]) + 8) * 0.6f) / 2) - arg0->column) + 0xE6, arg0->row + 0xE1, gCupNames[D_800DC540], 0, 0.6f, 0.6f);
draw_text((temp_s0_3 - arg0->column) + 0xE6, arg0->row + 0xE1, D_800E76CC[D_800E86B0[gPlayerCount - 1][D_800E86AC[gPlayerCount - 1]]], 0, 0.6f, 0.6f);
}
}
@@ -9861,10 +9862,10 @@ void func_800A5084(struct_8018D9E0_entry *arg0) {
temp_t4 = temp_v0->screenHeight / 2;
gDisplayListHead = draw_box(gDisplayListHead, temp_v1 - temp_t3, temp_t0 - temp_t4, temp_v1 + temp_t3, temp_t0 + temp_t4, 0, 0, 0, 140);
temp_s3 = &D_800E85C0[gScreenModeSelection][gIsGamePaused - 1];
- temp_s0 = ((get_string_width(D_800E7500[gCupSelection]) * one) + 10.0f) / 2;
+ temp_s0 = ((get_string_width(gCupNames[gCupSelection]) * one) + 10.0f) / 2;
temp_s1 = ((get_string_width(D_800E76CC[gCCSelection]) * one) + 10.0f) / 2;
set_text_color(TEXT_YELLOW);
- draw_text(160 - temp_s1, temp_s3->row - 50, D_800E7500[gCupSelection], 0, 1.0f, 1.0f);
+ draw_text(160 - temp_s1, temp_s3->row - 50, gCupNames[gCupSelection], 0, 1.0f, 1.0f);
set_text_color(TEXT_YELLOW);
draw_text(160 + temp_s0, temp_s3->row - 50, D_800E76CC[gCCSelection], 0, 1.0f, 1.0f);
set_text_color(TEXT_YELLOW);
@@ -10121,7 +10122,7 @@ void func_800A6034(struct_8018D9E0_entry *arg0) {
if (D_801657E8 != TRUE) {
gDPSetPrimColor(gDisplayListHead++, 0, 0, 0x00, 0x00, 0x00, arg0->unk1C);
- text = D_800E7500[D_800DC540];
+ text = gCupNames[D_800DC540];
set_text_color(TEXT_BLUE_GREEN_RED_CYCLE_2);
func_80093754(arg0->column + 0x41, arg0->row + 0xA0, text, 0, 0.85f, 1.0f);
text = D_800E7524[gCurrentCourseId];
@@ -10472,11 +10473,11 @@ void func_800A7258(struct_8018D9E0_entry *arg0) {
// Podium scene, top line
void func_800A72FC(struct_8018D9E0_entry *arg0) {
UNUSED s32 pad;
- s32 cupNameLength = (((f32) get_string_width(D_800E7500[gCupSelection]) * 1) + 10) / 2;
+ s32 cupNameLength = (((f32) get_string_width(gCupNames[gCupSelection]) * 1) + 10) / 2;
s32 ccNameLength = (((f32) get_string_width(D_800E76CC[gCCSelection]) * 1) + 10) / 2;
set_text_color(TEXT_YELLOW);
- draw_text(arg0->column - ccNameLength, arg0->row, D_800E7500[gCupSelection], 0, 1, 1);
+ draw_text(arg0->column - ccNameLength, arg0->row, gCupNames[gCupSelection], 0, 1, 1);
set_text_color(TEXT_YELLOW);
draw_text(arg0->column + cupNameLength, arg0->row, D_800E76DC[gCCSelection], 0, 1, 1);
}
@@ -12739,7 +12740,7 @@ void func_800ABCF4(struct_8018D9E0_entry *arg0) {
case 0:
arg0->column = 0;
arg0->unk4 = 1;
- arg0->unk20 = (get_string_width(D_800E7500[D_800DC540]) / 2) + 0xA0;
+ arg0->unk20 = (get_string_width(gCupNames[D_800DC540]) / 2) + 0xA0;
/* fallthrough */
case 1:
func_800A9208(arg0, arg0->unk20);
diff --git a/src/code_80091750.h b/src/code_80091750.h
index a66322a01..abcaa3cd9 100644
--- a/src/code_80091750.h
+++ b/src/code_80091750.h
@@ -350,6 +350,7 @@ extern u8 *D_8018D9BC;
extern s32 D_80165754;
extern intptr_t D_8018D9B0;
+extern s8 gGPPointsByCharacterId[8]; // D_8018D9C8
extern s8 D_8018D9D8;
extern s8 D_8018D9D9;
extern struct_8018D9E0_entry D_8018D9E0[D_8018D9E0_SIZE]; // D_8018D9E0
@@ -412,12 +413,13 @@ extern RGBA16 D_800E74A8[];
extern RGBA16 D_800E74D0[];
extern RGBA16 D_800E74E8[];
extern const s16 gGlyphDisplayWidth[];
-extern char *D_800E7500[];
+extern char *gCupNames[];
extern char *D_800E7524[];
extern char *D_800E7574[];
extern char *D_800E75C4[];
extern char *gDebugCourseNames[];
-extern const u8 gPerCupIndexByCourseId[];
+// Maps course IDs (as defined in the COURSES enum) to an index in a given cup's track order
+extern const u8 gPerCupIndexByCourseId[]; // D_800EFD50
extern const s8 D_800EFD64[];
extern u8 gCupSelectionByCourseId[];
extern char *D_800E7678[];
@@ -427,7 +429,7 @@ extern char *D_800E76CC[];
extern char *D_800E76DC[];
extern char *gDebugScreenModeNames[];
extern char *gDebugSoundModeNames[];
-extern char *gSoundModeNames[];
+extern char *gSoundModeNames[]; // D_800E7710
extern char *D_800E7720[];
extern char *D_800E7728[];
extern char *D_800E7730;
diff --git a/src/data/data_800E45C0.c b/src/data/data_800E45C0.c
index 14c2fda1f..91f925ecb 100644
--- a/src/data/data_800E45C0.c
+++ b/src/data/data_800E45C0.c
@@ -1,4 +1,5 @@
#include <ultra64.h>
+#include "data_800E45C0.h"
// Lights
Lights1 D_800E45C0 = gdSPDefLights1(
diff --git a/src/data/data_800E45C0.h b/src/data/data_800E45C0.h
new file mode 100644
index 000000000..d28fc0dbe
--- /dev/null
+++ b/src/data/data_800E45C0.h
@@ -0,0 +1,20 @@
+#ifndef DATA_800E45C0_H
+#define DATA_800E45C0_H
+
+extern Lights1 D_800E45C0;
+extern Lights1 D_800E45D8;
+extern Lights1 D_800E45F0;
+extern Lights1 D_800E4608;
+extern Lights1 D_800E4620;
+extern Lights1 D_800E4638;
+extern Lights1 D_800E4650;
+extern Lights1 D_800E4668;
+extern Lights1 D_800E4680;
+extern Lights1 D_800E4698;
+extern Lights1 D_800E46B0;
+extern Lights1 D_800E46C8;
+extern Lights1 D_800E46E0;
+extern u32 D_800E46F8[];
+extern u8 D_800E471C[];
+
+#endif
diff --git a/src/data/data_800E8700.c b/src/data/data_800E8700.c
index c55584483..5460d6e0c 100644
--- a/src/data/data_800E8700.c
+++ b/src/data/data_800E8700.c
@@ -1,4 +1,5 @@
#include <ultra64.h>
+#include "data_800E8700.h"
Vtx D_800E8700[] = {
{{{ 8, 8, 0}, 0, {960, 0}, {0xFF, 0xFF, 0xFF, 0xFF}}},
diff --git a/src/data/data_800E8700.h b/src/data/data_800E8700.h
new file mode 100644
index 000000000..64423b97f
--- /dev/null
+++ b/src/data/data_800E8700.h
@@ -0,0 +1,29 @@
+#ifndef DATA_800E8700_H
+#define DATA_800E8700_H
+
+#include <ultra64.h>
+
+extern Vtx D_800E8700[];
+extern Vtx D_800E8740[];
+extern Vtx D_800E8780[];
+extern Vtx D_800E87C0[];
+extern Vtx D_800E8800[];
+extern Vtx D_800E8840[];
+extern Vtx D_800E8880[];
+extern Vtx D_800E88C0[];
+extern Vtx D_800E8900[][4];
+extern Vtx D_800E8A00[];
+extern Vtx D_800E8A40[];
+extern Vtx D_800E8A80[];
+extern Vtx D_800E8AC0[];
+extern Vtx D_800E8B00[];
+extern Vtx D_800E8B40[];
+extern Vtx D_800E8B80[];
+extern Vtx D_800E8BC0[];
+extern Vtx D_800E8C00[];
+extern Vtx D_800E8C40[];
+extern Vtx D_800E8CC0[];
+extern Gfx D_800E8D40[];
+extern Gfx D_800E8DD0[];
+
+#endif
diff --git a/src/ending/ceremony_and_credits.c b/src/ending/ceremony_and_credits.c
index 3988a8b07..942cdd8a0 100644
--- a/src/ending/ceremony_and_credits.c
+++ b/src/ending/ceremony_and_credits.c
@@ -11,6 +11,7 @@
#include "variables.h"
#include "math_util.h"
#include "ceremony_and_credits.h"
+#include "code_800029B0.h"
#include "code_80280000.h"
#include "objects.h"
#include "main.h"
diff --git a/src/hud_renderer.c b/src/hud_renderer.c
index 22324a236..cb76b6bfd 100644
--- a/src/hud_renderer.c
+++ b/src/hud_renderer.c
@@ -26,6 +26,7 @@
#include "collision.h"
#include "main.h"
#include "code_80086E70.h"
+#include "src/data/data_800E45C0.h"
#include "courses/all_course_data.h"
#include <vehicles.h>
@@ -4647,7 +4648,7 @@ void func_800541BC(s32 cameraId) {
s32 i;
camera = &camera1[cameraId];
- gSPDisplayList(gDisplayListHead++, D_0D007AE0)
+ gSPDisplayList(gDisplayListHead++, D_0D007AE0);
func_8004477C(D_0D029458, 32, 32);
func_8004B72C(255, 255, 255, 255, 255, 255, 255);
D_80183E80[0] = 0;
@@ -5443,46 +5444,34 @@ void func_80056AC0(s32 cameraId) {
}
}
-#ifdef MIPS_TO_C
-//generated by m2c commit eefca95b040d7ee0c617bc58f9ac6cd1cf7bce87 on Aug-17-2023
-? func_800562E4(s32, s32, ?); /* extern */
-extern u32 D_801655CC;
-extern f32 D_80183E44;
-extern s16 D_80183E84;
-extern s32 D_8018D400;
-static ? D_800E471C; /* unable to generate initializer */
-
void func_80056BF0(s32 bombIndex) {
- BombKart sp40;
- Gfx *temp_v1;
+ s32 stackPadding;
+ u8 thing;
s32 temp_s0;
s32 temp_v0;
- s32 temp_v0_2;
-
- M2C_MEMCPY_ALIGNED(&sp40, &gBombKarts[bombIndex], 0x54);
- D_80183E40->unk0 = (bitwise f32) sp40;
- D_80183E40->unk4 = (f32) ((f64) sp40.bombPos[1] + 1.0);
- D_80183E40->unk8 = sp40.bombPos[2];
- func_800480B4(D_80183E40, D_80183E80, 0.25f, (u8 *) D_0D02A858, (*(&D_800E471C + ((u32) D_801655CC % 6U)) << 0xA) + D_0D029858, D_0D005AE0, 0x00000020, 0x00000020, 0x00000020, 0x00000020);
- temp_v1 = gDisplayListHead;
+ u8 *bombFrame;
+ BombKart sp40 = gBombKarts[bombIndex];
+
+ temp_v0 = D_801655CC % 6U;
+ thing = D_800E471C[temp_v0];
+ bombFrame = D_0D029858[thing];
+ D_80183E40[0] = sp40.bombPos[0];
+ D_80183E40[1] = sp40.bombPos[1] + 1.0;
+ D_80183E40[2] = sp40.bombPos[2];
+ func_800480B4(D_80183E40, D_80183E80, 0.25f, D_0D02A858, bombFrame, D_0D005AE0, 0x20, 0x20, 0x20, 0x20);
temp_s0 = D_8018D400;
- gDisplayListHead = temp_v1 + 8;
- temp_v1->words.w0 = 0x06000000;
- temp_v1->words.w1 = (u32) D_0D007B00;
- func_8004B414(0, 0, 0, 0x000000FF);
- D_80183E44 = (f32) ((f64) sp40.bombPos[1] + 5.0);
- D_80183E84 = 0;
- func_800562E4(temp_s0 % 3, temp_s0 % 4, 0xFF);
+ gSPDisplayList(gDisplayListHead++, D_0D007B00);
+ func_8004B414(0, 0, 0, 0xFF);
+ D_80183E40[1] = sp40.bombPos[1] + 5.0;
+ D_80183E80[2] = 0;
+ func_800562E4((s32) temp_s0 % 3, temp_s0 % 4, 0xFFU);
temp_v0 = temp_s0 + 1;
- D_80183E84 = 0x6000;
- func_800562E4(temp_v0 % 3, temp_v0 % 4, 0xFF);
- temp_v0_2 = temp_s0 + 2;
- D_80183E84 = 0xA000;
- func_800562E4(temp_v0_2 % 3, temp_v0_2 % 4, 0xFF);
+ D_80183E80[2] = 0x6000;
+ func_800562E4(temp_v0 % 3, temp_v0 % 4, 0xFFU);
+ temp_v0 = temp_s0 + 2;
+ D_80183E80[2] = 0xA000;
+ func_800562E4(temp_v0 % 3, temp_v0 % 4, 0xFFU);
}
-#else
-GLOBAL_ASM("asm/non_matchings/hud_renderer/func_80056BF0.s")
-#endif
void func_80056E24(s32 bombIndex, Vec3f arg1) {
s32 stackPadding[2];
diff --git a/src/hud_renderer.h b/src/hud_renderer.h
index 56e661824..f479c23d3 100644
--- a/src/hud_renderer.h
+++ b/src/hud_renderer.h
@@ -375,6 +375,7 @@ void func_80055FA0(s32, s32);
void func_80056160(s32);
void func_80056188(s32);
+void func_800562E4(s32, s32, s32);
void func_800563DC(s32, s32, s32);
void func_800568A0(s32, s32);
void func_8005669C(s32, s32, s32);
@@ -421,6 +422,7 @@ extern s32 D_8016586C;
extern s32 D_80165878;
extern s32 D_8016589C;
extern u16 D_801656C0;
+extern s32 D_801655CC;
extern u16 D_801656D0;
extern u16 D_801656E0;
@@ -439,6 +441,8 @@ extern s32 D_8018D3E4; // some red
extern s32 D_8018D3E8; // some green
extern s32 D_8018D3EC; // some blue
+extern s32 D_8018D400;
+
extern struct UnkStruct_800DC5EC *D_800DC5F0;
// Probably aren't really part of this file, but don't have a better place to put them
diff --git a/src/menus.h b/src/menus.h
index 3c5ca0907..a80ea1fff 100644
--- a/src/menus.h
+++ b/src/menus.h
@@ -75,7 +75,7 @@ extern s8 gCupCourseSelection;
extern s8 D_8018EE0C;
extern struct_8018EE10_entry D_8018EE10[];
-extern s32 gMenuSelection;
+extern s32 gMenuSelection; // D_800E86A0
extern s32 D_800E86A4;
extern s8 gCharacterSelections[];
diff --git a/src/racing/skybox_and_splitscreen.h b/src/racing/skybox_and_splitscreen.h
index 0c4dedf22..065ec96d3 100644
--- a/src/racing/skybox_and_splitscreen.h
+++ b/src/racing/skybox_and_splitscreen.h
@@ -1,6 +1,8 @@
#ifndef SKYBOX_AND_SPLITSCREEN_H
#define SKYBOX_AND_SPLITSCREEN_H
+#include <PR/gbi.h>
+
#define G_CLEAR_ALL_MODES 0xFFFFFFFF
/* Function Prototypes */
@@ -52,6 +54,8 @@ void copy_framebuffer(s32, s32, s32, s32, u16*, u16*);
void func_802A7728(void);
void func_802A7940(void);
+extern Vp D_802B8880[];
+
extern struct UnkStruct_800DC5EC *D_800DC5EC;
extern struct UnkStruct_800DC5EC *D_800DC5F0;
extern struct UnkStruct_800DC5EC *D_800DC5F4;
diff --git a/src/spawn_players.c b/src/spawn_players.c
index 6d16716e2..a7bc9a198 100644
--- a/src/spawn_players.c
+++ b/src/spawn_players.c
@@ -16,6 +16,7 @@
#include "render_courses.h"
#include "staff_ghosts.h"
#include "code_80005FD0.h"
+#include "code_8001F980.h"
#include "podium_ceremony_actors.h"
#include "main.h"
#include "menus.h"
diff --git a/src/staff_ghosts.h b/src/staff_ghosts.h
index a6a3065fc..3ff61cda6 100644
--- a/src/staff_ghosts.h
+++ b/src/staff_ghosts.h
@@ -33,6 +33,9 @@ extern u16 D_80162DD4;
extern u16 D_80162DD6;
extern u16 D_80162DD8;
extern s32 D_80162E00;
+extern s32 D_80162DE0;
+extern s32 D_80162DE4;
+extern s32 D_80162DE8;
extern s32 D_80162DF0;
extern s32 D_80162DF8;