mirror of
https://github.com/n64decomp/mk64
synced 2026-07-28 07:07:12 -04:00
Match func_8006B7E4, func_8006EEE8, func_80071A20 (#395)
* Match func_8006B7E4, func_8006EEE8, func_80071A20 * Fix missing extern void call
This commit is contained in:
+6
-12
@@ -6190,20 +6190,14 @@ void func_8006AFD0(Player *player, s16 arg1, s8 arg2, s8 arg3) {
|
||||
GLOBAL_ASM("asm/non_matchings/code_80057C60/func_8006AFD0.s")
|
||||
#endif
|
||||
|
||||
#ifdef MIPS_TO_C
|
||||
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
|
||||
void func_8006A50C(Player *, Player *, s8, s32, s32, s32); // extern
|
||||
extern s16 gPlayerBalloonCount;
|
||||
extern void func_8006A50C(Player*, f32, f32, s8, s8, s16);
|
||||
|
||||
void func_8006B7E4(Player *player, s32 arg1) {
|
||||
func_8006A50C(NULL, NULL, arg1, 0, 0);
|
||||
func_8006A50C(player, 0x3FC00000, 0x40000000, arg1, 1, 0x1C70);
|
||||
func_8006A50C(player, 0xBFC00000, 0x40000000, arg1, 2, -0x1C70);
|
||||
*(&gPlayerBalloonCount + (arg1 * 2)) = 2;
|
||||
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);
|
||||
func_8006A50C(player, -1.5f, 2.0f, arg1, (s8) 2, (s16) -0x1C70);
|
||||
gPlayerBalloonCount[arg1] = 2;
|
||||
}
|
||||
#else
|
||||
GLOBAL_ASM("asm/non_matchings/code_80057C60/func_8006B7E4.s")
|
||||
#endif
|
||||
|
||||
void func_8006B87C(UNUSED Player *player, s8 playerIndex) {
|
||||
gPlayerBalloonStatus[playerIndex][0] = BALLOON_STATUS_GONE;
|
||||
|
||||
+51
-73
@@ -278,24 +278,13 @@ static s32 gTextureCourseOutlineSkyscraper; /* unable to generate init
|
||||
static s32 gTextureCourseOutlineToadsTurnpike; /* unable to generate initializer */
|
||||
static s32 gTextureCourseOutlineWarioStadium; /* unable to generate initializer */
|
||||
static s32 gTextureCourseOutlineYoshiValley; /* unable to generate initializer */
|
||||
#endif
|
||||
|
||||
void func_8006EEE8(s32 courseId) {
|
||||
s32 sp1C;
|
||||
s16 *temp_v1;
|
||||
s16 temp_a1;
|
||||
s32 temp_t0;
|
||||
|
||||
temp_t0 = courseId * 2;
|
||||
temp_a1 = D_800E5520[courseId];
|
||||
sp1C = temp_t0;
|
||||
D_8018D240 = dma_textures(gCourseOutlineTextures[courseId], (u32) temp_a1, (u32) temp_a1);
|
||||
temp_v1 = &D_800E5548[temp_t0];
|
||||
D_8018D2B0 = temp_v1->unk0;
|
||||
D_8018D2B8 = temp_v1->unk2;
|
||||
D_8018D240 = dma_textures(gCourseOutlineTextures[courseId], D_800E5520[courseId], D_800E5520[courseId]);
|
||||
D_8018D2B0 = D_800E5548[courseId * 2];
|
||||
D_8018D2B8 = D_800E5548[courseId * 2 + 1];
|
||||
}
|
||||
#else
|
||||
GLOBAL_ASM("asm/non_matchings/code_8006E9C0/func_8006EEE8.s")
|
||||
#endif
|
||||
|
||||
#ifdef MIPS_TO_C
|
||||
//generated by m2c commit 8267401fa4ef7a38942dcca43353cc1bcc6efabc
|
||||
@@ -1938,85 +1927,74 @@ block_7:
|
||||
GLOBAL_ASM("asm/non_matchings/code_8006E9C0/func_80071818.s")
|
||||
#endif
|
||||
|
||||
#ifdef MIPS_TO_C
|
||||
//generated by m2c commit 44f261a363c51a295be8efe3d7ca7f4d2c967e9b on Dec-31-2022
|
||||
? func_8007055C(); /* extern */
|
||||
? func_80070780(); /* extern */
|
||||
extern s16 D_801657A2;
|
||||
extern s32 D_80183DA0;
|
||||
extern s32 D_80183DBC;
|
||||
extern s32 D_8018D158;
|
||||
extern s32 D_8018D3BC;
|
||||
extern s32 D_8018D3C0;
|
||||
extern s32 D_8018D3C4;
|
||||
|
||||
void func_80071A20(void) {
|
||||
void func_80071A20() {
|
||||
find_unused_obj_index(&D_80183DA0);
|
||||
find_unused_obj_index(D_80183DB8);
|
||||
find_unused_obj_index(&D_80183DBC);
|
||||
find_unused_obj_index(gItemWindowObjectByPlayerId);
|
||||
find_unused_obj_index(gItemWindowObjectByPlayerId + 4);
|
||||
find_unused_obj_index(&gItemWindowObjectByPlayerId[1]);
|
||||
func_80070190();
|
||||
func_8007055C();
|
||||
func_8007055C();
|
||||
func_80070780();
|
||||
D_8018CA70->itemBoxY = 0x0022;
|
||||
D_8018CA70->itemBoxX = -0x0053;
|
||||
D_8018CA70->slideItemBoxX = 0;
|
||||
D_8018CA70->slideItemBoxY = 0;
|
||||
D_8018CA70->unk_4A = 0x00A0;
|
||||
D_8018CA70->unk_4C = 0x003C;
|
||||
D_8018CA70->rankX = 0x0034;
|
||||
D_8018CA70->rankY = 0x0062;
|
||||
D_8018CA70->slideRankX = 0;
|
||||
D_8018CA70->slideRankY = 0;
|
||||
D_8018CA70->timerX = 0x00EA;
|
||||
D_8018CA70->timerY = 0x0010;
|
||||
D_8018CA70->lapX = 0x0101;
|
||||
D_8018CA70->lapY = 0x006A;
|
||||
D_8018CA70->unkC6 = -0x0053;
|
||||
D_8018CA70->unkC8 = 0x008F;
|
||||
D_8018CA70->unkCA = 0;
|
||||
D_8018CA70->unkCC = 0;
|
||||
D_8018CA70->unkCE = 0x00A0;
|
||||
D_8018CA70->unkD0 = 0x00B4;
|
||||
D_8018CA70->unkE6 = 0x0034;
|
||||
D_8018CA70->unkE8 = 0x00D2;
|
||||
D_8018CA70->unkEA = 0;
|
||||
D_8018CA70->unkEC = 0;
|
||||
D_8018CA70->unkD2 = 0x00EA;
|
||||
D_8018CA70->unkDC = 0x007F;
|
||||
D_8018CA70->unkDE = 0x0101;
|
||||
D_8018CA70->unkE4 = 0x00DA;
|
||||
|
||||
|
||||
D_8018CA70[0].itemBoxY = 0x22;
|
||||
D_8018CA70[0].itemBoxX = -0x53;
|
||||
D_8018CA70[0].slideItemBoxX = 0;
|
||||
D_8018CA70[0].slideItemBoxY = 0;
|
||||
D_8018CA70[0].unk_4A = 0xA0;
|
||||
D_8018CA70[0].unk_4C = 0x3C;
|
||||
D_8018CA70[0].rankX = 0x34;
|
||||
D_8018CA70[0].rankY = 0x62;
|
||||
D_8018CA70[0].slideRankX = 0;
|
||||
D_8018CA70[0].slideRankY = 0;
|
||||
D_8018CA70[0].timerX = 0xEA;
|
||||
D_8018CA70[0].timerY = 0x10;
|
||||
D_8018CA70[0].lapX = 0x101;
|
||||
D_8018CA70[0].lapY = 0x6A;
|
||||
D_8018CA70[1].itemBoxX = -0x53;
|
||||
D_8018CA70[1].itemBoxY = 0x8F;
|
||||
D_8018CA70[1].slideItemBoxX = 0;
|
||||
D_8018CA70[1].slideItemBoxY = 0;
|
||||
D_8018CA70[1].unk_4A = 0xA0;
|
||||
D_8018CA70[1].unk_4C = 0xB4;
|
||||
D_8018CA70[1].rankX = 0x34;
|
||||
D_8018CA70[1].rankY = 0xD2;
|
||||
D_8018CA70[1].slideRankX = 0;
|
||||
D_8018CA70[1].slideRankY = 0;
|
||||
D_8018CA70[1].timerX = 0xEA;
|
||||
D_8018CA70[1].timerY = 0x7F;
|
||||
D_8018CA70[1].lapX = 0x101;
|
||||
D_8018CA70[1].lapY = 0xDA;
|
||||
if (gModeSelection == 3) {
|
||||
D_8018CA70->itemBoxY = 0x005E;
|
||||
D_8018CA70->unkC8 = 0x00D0;
|
||||
D_8018CA70[0].itemBoxY = 0x5E;
|
||||
D_8018CA70[1].itemBoxY = 0xD0;
|
||||
}
|
||||
D_8018CA70->unk88 = 0.5f;
|
||||
D_8018CA70->stagingPosition = (s16) gGPCurrentRaceRankByPlayerId->unk0;
|
||||
D_8018CA70->unkEE = (s16) gGPCurrentRaceRankByPlayerId->unk4;
|
||||
D_8018CA70->rankScaling = D_8018CA70->unk88;
|
||||
func_8006EE7C(*gItemWindowObjectByPlayerId);
|
||||
func_8006EE7C(*(gItemWindowObjectByPlayerId + 4));
|
||||
D_8018D3C4 = 0x0000001E;
|
||||
D_8018D3BC = 0x00000018;
|
||||
D_8018D3C0 = 0x00000028;
|
||||
D_801657A2 = 0x0666;
|
||||
D_8018CA70[1].rankScaling = 0.5f;
|
||||
D_8018CA70[0].stagingPosition = (s16) gGPCurrentRaceRankByPlayerId[0];
|
||||
D_8018CA70[1].stagingPosition = (s16) gGPCurrentRaceRankByPlayerId[1];
|
||||
D_8018CA70[0].rankScaling = D_8018CA70[1].rankScaling;
|
||||
func_8006EE7C(gItemWindowObjectByPlayerId[0]);
|
||||
func_8006EE7C((gItemWindowObjectByPlayerId[1]));
|
||||
D_8018D3C4 = 0x1E;
|
||||
D_8018D3BC = 0x18;
|
||||
D_8018D3C0 = 0x28;
|
||||
D_801657A2 = 0x666;
|
||||
switch (gModeSelection) { /* irregular */
|
||||
case 0:
|
||||
D_8018D158 = 8;
|
||||
return;
|
||||
case 2:
|
||||
block_9:
|
||||
D_8018D158 = 2;
|
||||
return;
|
||||
case 3:
|
||||
goto block_9;
|
||||
D_8018D158 = 2;
|
||||
return;
|
||||
}
|
||||
}
|
||||
#else
|
||||
GLOBAL_ASM("asm/non_matchings/code_8006E9C0/func_80071A20.s")
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef MIPS_TO_C
|
||||
//generated by m2c commit 44f261a363c51a295be8efe3d7ca7f4d2c967e9b on Dec-31-2022
|
||||
|
||||
@@ -25,6 +25,10 @@ void func_80071818(void);
|
||||
void func_80071C28(void);
|
||||
void func_80071A20(void);
|
||||
|
||||
extern s16 D_800E5520[];
|
||||
extern s16 D_800E5548[];
|
||||
extern s32 gCourseOutlineTextures[0x14];
|
||||
|
||||
extern s32 gScreenModeSelection;
|
||||
extern s8 *gTextureLogoMarioKart64;
|
||||
extern s16 D_80165730;
|
||||
@@ -39,6 +43,12 @@ extern intptr_t D_8018D9B0;
|
||||
// I'm not how much I like this "pointer to an array" setup, but if it matches it matches
|
||||
extern u8 (*D_8018D220)[1024];
|
||||
|
||||
extern s32 D_8018D240;
|
||||
extern s16 D_8018D2B0;
|
||||
extern s16 D_8018D2B8;
|
||||
extern s32 D_80183DA0;
|
||||
extern s32 D_80183DBC;
|
||||
|
||||
extern struct_8018CA70_entry D_8018CA70[];
|
||||
// These are all *technically* hardcoded references to spots in D_8018CA70, but there's something weird
|
||||
// going on match wise in func_8006EA5C that means we have to (for now) leave them as separate variables
|
||||
|
||||
Reference in New Issue
Block a user