From 97059725cd5e14ff503517b773dfab27b112c87e Mon Sep 17 00:00:00 2001 From: Ryan Dwyer Date: Sat, 14 Mar 2020 22:40:10 +1000 Subject: [PATCH] Attempt to decompile func0f16b96c --- src/game/data/data_020df0.c | 12 +- src/game/game_0b63b0.c | 2 +- src/game/game_0fd660.c | 2 +- src/game/game_157db0.c | 2 +- src/game/game_167ae0.c | 436 +++++++++++++++++++++++++--- src/game/game_177e00.c | 2 +- src/include/constants.h | 8 +- src/include/game/chr/chr.h | 2 +- src/include/game/data/data_000000.h | 2 + src/include/game/data/data_0083d0.h | 1 + src/include/game/data/data_020df0.h | 10 +- src/include/game/dlights.h | 2 +- src/include/game/game_006bd0.h | 2 +- src/include/game/game_016100.h | 4 +- src/include/game/game_01b0a0.h | 2 +- src/include/game/game_01bea0.h | 2 +- src/include/game/game_01d770.h | 2 +- src/include/game/game_01d860.h | 4 +- src/include/game/game_01d990.h | 2 +- src/include/game/game_01d9f0.h | 2 +- src/include/game/game_01de30.h | 2 +- src/include/game/game_01e250.h | 2 +- src/include/game/game_0601b0.h | 2 +- src/include/game/game_097ba0.h | 2 +- src/include/game/game_0abe70.h | 2 +- src/include/game/game_0b28d0.h | 2 +- src/include/game/game_0dcdb0.h | 2 +- src/include/game/game_129210.h | 2 +- src/include/game/game_157db0.h | 2 +- src/include/game/game_167ae0.h | 12 +- src/include/game/game_19c990.h | 6 +- src/include/game/mplayer.h | 4 +- src/include/game/pak/pak.h | 6 +- src/include/game/wallhit.h | 2 +- src/include/gvars/gvars.h | 6 +- src/include/lib/lib_09660.h | 2 +- src/include/lib/lib_0e9d0.h | 4 +- src/include/lib/lib_11420.h | 2 +- src/include/lib/lib_13900.h | 10 +- src/include/types.h | 16 +- 40 files changed, 483 insertions(+), 106 deletions(-) diff --git a/src/game/data/data_020df0.c b/src/game/data/data_020df0.c index ed1be2d19..f2ee72e20 100644 --- a/src/game/data/data_020df0.c +++ b/src/game/data/data_020df0.c @@ -9581,12 +9581,12 @@ u32 var8008401c = 0x00000001; s32 g_Difficulty = 0; -u32 g_MpMatchTime = 0x00000000; -u32 var80084028 = 36000; -u32 var8008402c = 10; -u32 var80084030 = 20; +s32 g_MpTimeElapsed = 0; +s32 g_MpTimeLimit = 36000; +s32 g_MpScoreLimit = 10; +s32 g_MpTeamScoreLimit = 20; s32 var80084034 = 0; -u32 var80084038 = 0; +s32 var80084038 = 0; f32 g_Uptime = 0; bool var80084040 = true; u32 var80084044 = 0x000005c8; @@ -10017,7 +10017,7 @@ struct stagemusic stagemusictable[] = { { STAGE_RETAKING, MUSIC_CI_OPERATIVE, -1, MUSIC_CI_OPERATIVE }, { STAGE_WAR, MUSIC_ALIEN_CONFLICT, MUSIC_SKEDAR_WIND, MUSIC_ALIEN_CONFLICT }, { STAGE_DUEL, MUSIC_CREDITS, -1, MUSIC_CREDITS }, - { STAGE_5C, MUSIC_ALIEN_CONFLICT, -1, MUSIC_ALIEN_CONFLICT }, + { STAGE_CREDITS, MUSIC_ALIEN_CONFLICT, -1, MUSIC_ALIEN_CONFLICT }, }; u32 var800845c0 = 0x00000000; diff --git a/src/game/game_0b63b0.c b/src/game/game_0b63b0.c index 3ef101166..35f588a75 100644 --- a/src/game/game_0b63b0.c +++ b/src/game/game_0b63b0.c @@ -669,7 +669,7 @@ glabel func0f0b69d0 /* f0b6b80: 00000000 */ sll $zero,$zero,0x0 /* f0b6b84: 46007506 */ mov.s $f20,$f14 .L0f0b6b88: -/* f0b6b88: 0fc575e8 */ jal func0f15d7a0 +/* f0b6b88: 0fc575e8 */ jal roomIsVisibleByPlayer /* f0b6b8c: 00000000 */ sll $zero,$zero,0x0 /* f0b6b90: 10400002 */ beqz $v0,.L0f0b6b9c /* f0b6b94: 02202825 */ or $a1,$s1,$zero diff --git a/src/game/game_0fd660.c b/src/game/game_0fd660.c index d01cd8801..cdfea15c4 100644 --- a/src/game/game_0fd660.c +++ b/src/game/game_0fd660.c @@ -1196,7 +1196,7 @@ void activemenuClose(void) } g_Vars.currentplayer->activemenumode = 0; - g_Vars.currentplayer->unk1c40 = -1; + g_Vars.currentplayer->joybutinhibit = 0xffffffff; g_PlayersWithControl[g_Vars.currentplayernum] = 1; } diff --git a/src/game/game_157db0.c b/src/game/game_157db0.c index 7c69bc0da..82153a254 100644 --- a/src/game/game_157db0.c +++ b/src/game/game_157db0.c @@ -6393,7 +6393,7 @@ glabel func0f15d744 ); GLOBAL_ASM( -glabel func0f15d7a0 +glabel roomIsVisibleByPlayer /* f15d7a0: 3c0e800a */ lui $t6,%hi(g_Vars+0x314) /* f15d7a4: 8dcea2d4 */ lw $t6,%lo(g_Vars+0x314)($t6) /* f15d7a8: 000460c0 */ sll $t4,$a0,0x3 diff --git a/src/game/game_167ae0.c b/src/game/game_167ae0.c index 490a50e81..a1b057563 100644 --- a/src/game/game_167ae0.c +++ b/src/game/game_167ae0.c @@ -417,7 +417,7 @@ void func0f167e7c(s32 stagenum) g_Vars.lvupdate240frealprev = 1.0f; g_Vars.lvupdate240freal = g_Vars.lvupdate240frealprev; - g_MpMatchTime = 0; + g_MpTimeElapsed = 0; g_Uptime = 0; g_Vars.speedpilltime = 0; @@ -449,13 +449,13 @@ void func0f167e7c(s32 stagenum) func0f00b480(); } - if (stagenum == STAGE_5A) { + if (stagenum == STAGE_TITLE) { func0f00b480(); - } else if (stagenum == STAGE_5B) { + } else if (stagenum == STAGE_BOOTPAKMENU) { // empty - } else if (stagenum == STAGE_5C) { + } else if (stagenum == STAGE_CREDITS) { // empty - } else if (stagenum == STAGE_5D) { + } else if (stagenum == STAGE_4MBMENU) { // empty } else { s32 i; @@ -542,15 +542,15 @@ void func0f167e7c(s32 stagenum) func0f0139f0(); func0f19d4ec(); - if (g_Vars.stagenum == STAGE_5A) { + if (g_Vars.stagenum == STAGE_TITLE) { // empty - } else if (stagenum == STAGE_5B) { + } else if (stagenum == STAGE_BOOTPAKMENU) { setCurrentPlayerNum(0); func0f0f8c98(); - } else if (stagenum == STAGE_5D) { + } else if (stagenum == STAGE_4MBMENU) { setCurrentPlayerNum(0); func0f0f8c98(); - } else if (stagenum == STAGE_5C) { + } else if (stagenum == STAGE_CREDITS) { func0f13b4c4(); } else { s32 i; @@ -590,11 +590,11 @@ void func0f167e7c(s32 stagenum) func0f11a2e4(); func0000eadc(); - if (stagenum == STAGE_5B) { + if (stagenum == STAGE_BOOTPAKMENU) { func0f10c970(); } - if (stagenum == STAGE_5D) { + if (stagenum == STAGE_4MBMENU) { func0f10cb2c(); } @@ -4705,7 +4705,7 @@ glabel func0f16b96c /* f16be0c: 8d8d00d8 */ lw $t5,0xd8($t4) /* f16be10: 55a00007 */ bnezl $t5,.L0f16be30 /* f16be14: 8e89006c */ lw $t1,0x6c($s4) -/* f16be18: 0fc575e8 */ jal func0f15d7a0 +/* f16be18: 0fc575e8 */ jal roomIsVisibleByPlayer /* f16be1c: 86240000 */ lh $a0,0x0($s1) /* f16be20: 50400003 */ beqzl $v0,.L0f16be30 /* f16be24: 8e89006c */ lw $t1,0x6c($s4) @@ -5109,11 +5109,11 @@ glabel func0f16b96c /* f16c3e4: 11a00116 */ beqz $t5,.L0f16c840 /* f16c3e8: ae200000 */ sw $zero,0x0($s1) /* f16c3ec: 8e8e04b4 */ lw $t6,0x4b4($s4) -/* f16c3f0: 3c068008 */ lui $a2,%hi(var80084028) +/* f16c3f0: 3c068008 */ lui $a2,%hi(g_MpTimeLimit) /* f16c3f4: 29c1005a */ slti $at,$t6,0x5a /* f16c3f8: 10200111 */ beqz $at,.L0f16c840 /* f16c3fc: 00000000 */ sll $zero,$zero,0x0 -/* f16c400: 8cc64028 */ lw $a2,%lo(var80084028)($a2) +/* f16c400: 8cc64028 */ lw $a2,%lo(g_MpTimeLimit)($a2) /* f16c404: 3c028008 */ lui $v0,0x8008 /* f16c408: 58c00077 */ blezl $a2,.L0f16c5e8 /* f16c40c: 8e8d0034 */ lw $t5,0x34($s4) @@ -5201,8 +5201,8 @@ glabel func0f16b96c /* f16c530: 0219082a */ slt $at,$s0,$t9 /* f16c534: 1420ffdc */ bnez $at,.L0f16c4a8 /* f16c538: 00000000 */ sll $zero,$zero,0x0 -/* f16c53c: 3c068008 */ lui $a2,%hi(var80084028) -/* f16c540: 8cc64028 */ lw $a2,%lo(var80084028)($a2) +/* f16c53c: 3c068008 */ lui $a2,%hi(g_MpTimeLimit) +/* f16c540: 8cc64028 */ lw $a2,%lo(g_MpTimeLimit)($a2) .L0f16c544: /* f16c544: 0266082a */ slt $at,$s3,$a2 .L0f16c548: @@ -5212,8 +5212,8 @@ glabel func0f16b96c /* f16c554: 24ccfda8 */ addiu $t4,$a2,-600 /* f16c558: 0c0039a1 */ jal func0000e684 /* f16c55c: 00000000 */ sll $zero,$zero,0x0 -/* f16c560: 3c068008 */ lui $a2,%hi(var80084028) -/* f16c564: 8cc64028 */ lw $a2,%lo(var80084028)($a2) +/* f16c560: 3c068008 */ lui $a2,%hi(g_MpTimeLimit) +/* f16c564: 8cc64028 */ lw $a2,%lo(g_MpTimeLimit)($a2) .L0f16c568: /* f16c568: 24ccfda8 */ addiu $t4,$a2,-600 .L0f16c56c: @@ -5227,8 +5227,8 @@ glabel func0f16b96c /* f16c588: 0fc5b364 */ jal getVar80084014 /* f16c58c: 00000000 */ sll $zero,$zero,0x0 /* f16c590: 14400014 */ bnez $v0,.L0f16c5e4 -/* f16c594: 3c0e8008 */ lui $t6,%hi(var80084028) -/* f16c598: 8dce4028 */ lw $t6,%lo(var80084028)($t6) +/* f16c594: 3c0e8008 */ lui $t6,%hi(g_MpTimeLimit) +/* f16c598: 8dce4028 */ lw $t6,%lo(g_MpTimeLimit)($t6) /* f16c59c: 02002025 */ or $a0,$s0,$zero /* f16c5a0: 00002825 */ or $a1,$zero,$zero /* f16c5a4: 024e082a */ slt $at,$s2,$t6 @@ -5340,7 +5340,7 @@ glabel func0f16b96c /* f16c714: 3c0c800b */ lui $t4,%hi(g_MpPlayerChrs) /* f16c718: 2582c4d0 */ addiu $v0,$t4,%lo(g_MpPlayerChrs) /* f16c71c: 1880000c */ blez $a0,.L0f16c750 -/* f16c720: 3c188008 */ lui $t8,%hi(var8008402c) +/* f16c720: 3c188008 */ lui $t8,%hi(g_MpScoreLimit) /* f16c724: 00046880 */ sll $t5,$a0,0x2 /* f16c728: 01a21821 */ addu $v1,$t5,$v0 /* f16c72c: 8c4e0000 */ lw $t6,0x0($v0) @@ -5355,7 +5355,7 @@ glabel func0f16b96c /* f16c748: 5420fff9 */ bnezl $at,.L0f16c730 /* f16c74c: 8c4e0000 */ lw $t6,0x0($v0) .L0f16c750: -/* f16c750: 8f18402c */ lw $t8,%lo(var8008402c)($t8) +/* f16c750: 8f18402c */ lw $t8,%lo(g_MpScoreLimit)($t8) /* f16c754: 27a4016c */ addiu $a0,$sp,0x16c /* f16c758: 1b000017 */ blez $t8,.L0f16c7b8 /* f16c75c: 00000000 */ sll $zero,$zero,0x0 @@ -5366,10 +5366,10 @@ glabel func0f16b96c /* f16c770: 00036880 */ sll $t5,$v1,0x2 /* f16c774: 01a36821 */ addu $t5,$t5,$v1 /* f16c778: 000d6880 */ sll $t5,$t5,0x2 -/* f16c77c: 3c048008 */ lui $a0,%hi(var8008402c) +/* f16c77c: 3c048008 */ lui $a0,%hi(g_MpScoreLimit) /* f16c780: 27a2016c */ addiu $v0,$sp,0x16c /* f16c784: 01a22821 */ addu $a1,$t5,$v0 -/* f16c788: 8c84402c */ lw $a0,%lo(var8008402c)($a0) +/* f16c788: 8c84402c */ lw $a0,%lo(g_MpScoreLimit)($a0) /* f16c78c: 8c4c0010 */ lw $t4,0x10($v0) .L0f16c790: /* f16c790: 24420014 */ addiu $v0,$v0,0x14 @@ -5384,8 +5384,8 @@ glabel func0f16b96c /* f16c7b0: 5420fff7 */ bnezl $at,.L0f16c790 /* f16c7b4: 8c4c0010 */ lw $t4,0x10($v0) .L0f16c7b8: -/* f16c7b8: 3c188008 */ lui $t8,%hi(var80084030) -/* f16c7bc: 8f184030 */ lw $t8,%lo(var80084030)($t8) +/* f16c7b8: 3c188008 */ lui $t8,%hi(g_MpTeamScoreLimit) +/* f16c7bc: 8f184030 */ lw $t8,%lo(g_MpTeamScoreLimit)($t8) /* f16c7c0: 27a40078 */ addiu $a0,$sp,0x78 /* f16c7c4: 5b000018 */ blezl $t8,.L0f16c828 /* f16c7c8: 8e380000 */ lw $t8,0x0($s1) @@ -5396,10 +5396,10 @@ glabel func0f16b96c /* f16c7dc: 0003c880 */ sll $t9,$v1,0x2 /* f16c7e0: 0323c821 */ addu $t9,$t9,$v1 /* f16c7e4: 0019c880 */ sll $t9,$t9,0x2 -/* f16c7e8: 3c048008 */ lui $a0,%hi(var80084030) +/* f16c7e8: 3c048008 */ lui $a0,%hi(g_MpTeamScoreLimit) /* f16c7ec: 27a20078 */ addiu $v0,$sp,0x78 /* f16c7f0: 03222821 */ addu $a1,$t9,$v0 -/* f16c7f4: 8c844030 */ lw $a0,%lo(var80084030)($a0) +/* f16c7f4: 8c844030 */ lw $a0,%lo(g_MpTeamScoreLimit)($a0) /* f16c7f8: 8c4c0010 */ lw $t4,0x10($v0) .L0f16c7fc: /* f16c7fc: 24420014 */ addiu $v0,$v0,0x14 @@ -5423,8 +5423,8 @@ glabel func0f16b96c /* f16c838: 0c0039a1 */ jal func0000e684 /* f16c83c: 00000000 */ sll $zero,$zero,0x0 .L0f16c840: -/* f16c840: 3c198008 */ lui $t9,%hi(g_MpMatchTime) -/* f16c844: 8f394024 */ lw $t9,%lo(g_MpMatchTime)($t9) +/* f16c840: 3c198008 */ lui $t9,%hi(g_MpTimeElapsed) +/* f16c844: 8f394024 */ lw $t9,%lo(g_MpTimeElapsed)($t9) /* f16c848: 8e8d0038 */ lw $t5,0x38($s4) /* f16c84c: 3c018008 */ lui $at,0x8008 /* f16c850: 24040001 */ addiu $a0,$zero,0x1 @@ -5614,6 +5614,372 @@ glabel func0f16b96c /* f16cb00: 27bd0290 */ addiu $sp,$sp,0x290 ); +// Mismatch because the code below uses s5 for g_MpTimeElapsed +//void func0f16b96c(void) +//{ +// s32 i; +// +// func0f16cce4(); +// +// if (g_Vars.unk0004e4) { +// func0f11c54c(); +// } +// +// // 9b0 +// if (g_Vars.unk0004d8 > 0) { +// g_Vars.unk0004d8--; +// } else if (g_Vars.unk0004d8 == 0) { +// func00013938(); +// +// if (g_Vars.stagenum == STAGE_TITLE +// || g_Vars.stagenum == STAGE_BOOTPAKMENU +// || g_Vars.stagenum == STAGE_CREDITS +// || g_Vars.stagenum == STAGE_4MBMENU) { +// g_Vars.unk0004d1 = 0; +// } else { +// g_Vars.unk0004d1 = 31; +// func0f11df38(); +// } +// +// g_Vars.unk0004d8 = -1; +// } +// +// // a20 +// if (g_Is4Mb == true) { +// func0f19ab40(); +// } +// +// // a34 +// for (i = 0; i < PLAYERCOUNT(); i++) { +// g_Vars.players[i]->unk1490 = 0; +// g_Vars.players[i]->unk0cec = 0; +// } +// +// // b3c +// if (getVar80084014()) { +// g_Vars.lvupdate240 = 0; +// } else if (mpIsPaused()) { +// g_Vars.lvupdate240 = 0; +// +// for (i = 0; i < PLAYERCOUNT(); i++) { +// g_Vars.players[i]->joybutinhibit = 0xefffefff; +// } +// } else { +// // c70 +// s32 slowmo = getEffectiveSlowMotion(); +// g_Vars.lvupdate240 = g_Vars.diffframe240; +// +// if (slowmo == SLOWMOTION_ON) { +// // c88 +// if (g_Vars.speedpillon == false || g_Vars.in_cutscene) { +// if (g_Vars.lvupdate240 > 4) { +// g_Vars.lvupdate240 = 4; +// } +// } +// } else if (slowmo == SLOWMOTION_SMART) { +// // cc8 +// if (g_Vars.speedpillon == false || g_Vars.in_cutscene) { +// // ce4 +// if (g_Vars.mplayerisrunning) { +// // cec +// bool foundnearbychr = false; +// s32 playernum; +// +// // Check if another player is in a nearby room +// for (playernum = 0; playernum < PLAYERCOUNT() && !foundnearbychr; playernum++) { +// // d78 +// if (g_Vars.players[playernum]->isdead == false) { +// s16 *rooms = g_Vars.players[playernum]->prop->rooms; +// s32 r; +// +// for (r = 0; rooms[r] != -1 && !foundnearbychr; r++) { +// s32 otherplayernum; +// // da0 +// for (otherplayernum = 0; otherplayernum < PLAYERCOUNT(); otherplayernum++) { +// // df8 +// if (playernum != otherplayernum +// && g_Vars.players[otherplayernum]->isdead == false +// && roomIsVisibleByPlayer(rooms[r], otherplayernum)) { +// // e28 +// foundnearbychr = true; +// } +// } +// } +// } +// } +// +// // f20 +// if (foundnearbychr) { +// if (g_Vars.lvupdate240 > 4) { +// g_Vars.lvupdate240 = 4; +// } +// } else { +// if (g_Vars.lvupdate240 > 8) { +// g_Vars.lvupdate240 = 8; +// } +// } +// } else { +// // f6c +// if (g_Vars.lvupdate240 > 4) { +// g_Vars.lvupdate240 = 4; +// } +// } +// } +// } else { +// // Slow motion settings are off +// // f88 +// if (g_Vars.speedpillon && g_Vars.in_cutscene == false) { +// if (g_Vars.lvupdate240 > 4) { +// g_Vars.lvupdate240 = 4; +// } +// } +// } +// } +// +// // fbc +// g_Vars.lvupdate240_60 = g_Vars.lvupdate240 + g_Vars.lvupdate240_60error; +// g_Vars.lvupdate240_60error = g_Vars.lvupdate240_60 & 3; +// g_Vars.lvupdate240_60 >>= 2; +// +// if (g_Vars.lvupdate240 > 0) { +// g_Vars.lvframenum++; +// } +// +// g_Vars.lvupdate240f = g_Vars.lvupdate240 * 0.25f; +// g_Vars.lvframe60 += g_Vars.lvupdate240_60; +// g_Vars.lvframe240 += g_Vars.lvupdate240; +// g_Vars.lvupdate240frealprev = g_Vars.lvupdate240freal; +// g_Vars.lvupdate240freal = g_Vars.lvupdate240f; +// +// func0f0abc28(); +// func0f0df364(); +// +// // 040 +// if ((func00015020(0, 0xffff) != 0 +// || func00014e10(0) > 10 +// || func00014e10(0) < -10 +// || func00014eb8(0) > 10 +// || func00014eb8(0) < -10 +// || func00015020(1, 0xffff) != 0 +// || func00014e10(1) > 10 +// || func00014e10(1) < -10 +// || func00014eb8(1) > 10 +// || func00014eb8(1) < -10 +// || func00015020(2, 0xffff) != 0 +// || func00014e10(2) > 10 +// || func00014e10(2) < -10 +// || func00014eb8(2) > 10 +// || func00014eb8(2) < -10 +// || func00015020(3, 0xffff) != 0 +// || func00014e10(3) > 10 +// || func00014e10(3) < -10 +// || func00014eb8(3) > 10 +// || func00014eb8(3) < -10) && var800624a4) { +// if (g_Vars.stagenum != STAGE_TITLE) { +// func0f01a7e4(5); +// func0000e95c(STAGE_TITLE); +// } +// +// var800624a4 = 0; +// } +// +// if (g_Vars.stagenum < STAGE_TITLE && !var800624a4 && !g_Vars.in_cutscene) { +// if (func00014f60(0, 0xffff) == 0 +// && func00014e10(0) < 10 +// && func00014e10(0) > -10 +// && func00014eb8(0) < 10 +// && func00014eb8(0) > -10 +// && func00014f60(1, 0xffff) == 0 +// && func00014e10(1) < 10 +// && func00014e10(1) > -10 +// && func00014eb8(1) < 10 +// && func00014eb8(1) > -10 +// && func00014f60(2, 0xffff) == 0 +// && func00014e10(2) < 10 +// && func00014e10(2) > -10 +// && func00014eb8(2) < 10 +// && func00014eb8(2) > -10 +// && func00014f60(3, 0xffff) == 0 +// && func00014e10(3) < 10 +// && func00014e10(3) > -10 +// && func00014eb8(3) < 10 +// && func00014eb8(3) > -10) { +// var800624b0 += g_Vars.diffframe60; +// } else { +// var800624b0 = 0; +// } +// } else { +// var800624b0 = 0; +// } +// +// var80084038 = 0; +// +// // 3e4 +// if (g_Vars.normmplayerisrunning && g_Vars.stagenum < STAGE_TITLE) { +// // 400 +// if (g_MpTimeLimit > 0) { +// s32 nexttime = g_Vars.lvupdate240_60 + g_MpTimeElapsed; +// s32 warntime = g_MpTimeLimit - 3600; +// +// // Show HUD message at one minute remaining +// if (g_MpTimeElapsed < warntime && nexttime >= warntime) { +// s32 i; +// for (i = 0; i < PLAYERCOUNT(); i++) { +// setCurrentPlayerNum(i); +// currentPlayerQueueMessage(langGet(L_MISC(68)), 0); // "One minute left." +// } +// } +// +// if (g_MpTimeElapsed < g_MpTimeLimit && nexttime >= g_MpTimeLimit) { +// // Match is ending due to time limit reached +// func0000e684(); +// } +// +// // Sound alarm at 10 seconds remaining +// if (nexttime >= g_MpTimeLimit - 600 +// && var80084034 == 0 +// && !getVar80084014() +// && nexttime < g_MpTimeLimit) { +// // 5dc +// func00010718(&var80084034, 0, 0x7fff, 0x40, 163, 1, 1, -1, 1); +// } +// } +// +// if (g_Vars.lvupdate240 != 0) { +// s32 numdying = 0; +// +// for (i = 0; i < PLAYERCOUNT(); i++) { +// if (g_Vars.players[i]->isdead) { +// if (g_Vars.players[i]->redbloodfinished == false +// || g_Vars.players[i]->deathanimfinished == false +// || g_Vars.players[i]->colourfadetimemax60 >= 0) { +// numdying++; +// } +// } +// } +// +// for (i = 0; i < g_MpNumPlayers; i++) { +// if (g_MpPlayerChrs[i]->actiontype == ACT_DIE) { +// numdying++; +// } +// } +// +// if (g_MpScoreLimit > 0) { +// struct mpteaminfo info[12]; +// s32 count = func0f1885e4(info); +// +// for (i = 0; i < count; i++) { +// if (info[i].score >= g_MpScoreLimit) { +// var80084038++; +// } +// } +// } +// +// if (g_MpTeamScoreLimit > 0) { +// struct mpteaminfo info[12]; +// s32 count = func0f188a84(info); +// +// for (i = 0; i < count; i++) { +// if (info[i].score >= g_MpTeamScoreLimit) { +// var80084038++; +// } +// } +// } +// +// // 820 +// if (var80084038 > 0 && numdying == 0) { +// func0000e684(); +// } +// } +// } +// +// g_MpTimeElapsed += g_Vars.lvupdate240_60; +// g_Uptime = g_MpTimeElapsed / 60.0f; +// +// // 874 +// func0000bd20(true); +// +// if (g_Vars.stagenum == STAGE_TEST_OLD) { +// func0f01ae30(); +// func00011d84(); +// } +// +// if (g_Vars.stagenum == STAGE_TITLE) { +// func0f01a810(); +// func0f01d860(); +// func00011d84(); +// } else if (g_Vars.stagenum == STAGE_BOOTPAKMENU) { +// setCurrentPlayerNum(0); +// func0f01bf28(); +// func00011d84(); +// func0f01d860(); +// func0f11c7a0(); +// } else if (g_Vars.stagenum == STAGE_4MBMENU) { +// func0f01bf28(); +// func00011d84(); +// func0f01d860(); +// func0f11c7a0(); +// } else if (g_Vars.stagenum == STAGE_CREDITS) { +// func00011d84(); +// func0f01d860(); +// } else { +// func0f16b810(); +// func0f12939c(); +// func0f16b0c8(); +// func0f01d8c0(); +// func0f01d990(); +// func0f01dd6c(); +// func0f01de30(); +// func0f01e050(); +// func0f13eb44(); +// func0f149864(); +// +// if (var800623f0) { +// func0f01d770(); +// } +// +// if (var80061640) { +// func0f009eac(); +// } +// +// func0f167c88(); +// func0000fe88(); +// func0f11c7a0(); +// func0f0033b0(); +// func0f0b2904(); +// func0f0aefb8(); +// func0f01b160(); +// func0f01bf28(); +// scenarioCallback10(); +// +// if (var8005d9d0 == 0) { +// func0f01e250(); +// } +// +// func00011d84(); +// func0f01d860(); +// func0f063dcc(); +// +// if (getCurrentStageId() == STAGE_CITRAINING) { +// struct trainingdata *trainingdata = ciGetTrainingData(); +// s16 room = g_Vars.currentplayer->prop->rooms[0]; +// +// if ((room < 0x16 || room > 0x19) +// && room != 0x0a +// && (trainingdata == NULL || trainingdata->unk00_00 == 0)) { +// chrUnsetStageFlag(NULL, 0x00000001); +// } +// +// func0f19f994(); +// +// if (g_Vars.lvupdate240 != 0) { +// func0f1a1998(); +// func0f1a2070(); +// } +// } +// } +//} + GLOBAL_ASM( glabel func0f16cb04 /* f16cb04: 3c0e8007 */ lui $t6,%hi(var80075d64) @@ -5766,17 +6132,17 @@ void setDifficulty(s32 difficulty) void setVar80084028(u32 arg0) { - var80084028 = arg0; + g_MpTimeLimit = arg0; } void setVar8008402c(u32 arg0) { - var8008402c = arg0; + g_MpScoreLimit = arg0; } void setVar80084030(u32 arg0) { - var80084030 = arg0; + g_MpTeamScoreLimit = arg0; } f32 getUptime(void) @@ -5784,9 +6150,9 @@ f32 getUptime(void) return g_Uptime; } -u32 mpGetMatchTime(void) +u32 mpGetTimeElapsed(void) { - return g_MpMatchTime; + return g_MpTimeElapsed; } GLOBAL_ASM( diff --git a/src/game/game_177e00.c b/src/game/game_177e00.c index 7e0b167f4..83e2580b6 100644 --- a/src/game/game_177e00.c +++ b/src/game/game_177e00.c @@ -297,7 +297,7 @@ char *menutextPauseOrUnpause(s32 arg0) char *menutextMatchTime(s32 arg0) { - formatTime(g_StringPointer, mpGetMatchTime(), 3); + formatTime(g_StringPointer, mpGetTimeElapsed(), 3); return g_StringPointer; } diff --git a/src/include/constants.h b/src/include/constants.h index 6620fdf0a..328fe4348 100644 --- a/src/include/constants.h +++ b/src/include/constants.h @@ -1903,10 +1903,10 @@ #define STAGE_TEST_OLD 0x4e #define STAGE_DUEL 0x4f #define STAGE_TEST_LAM 0x50 -#define STAGE_5A 0x5a -#define STAGE_5B 0x5b -#define STAGE_5C 0x5c -#define STAGE_5D 0x5d +#define STAGE_TITLE 0x5a +#define STAGE_BOOTPAKMENU 0x5b +#define STAGE_CREDITS 0x5c +#define STAGE_4MBMENU 0x5d #define STAGEINDEX_MAIANSOS 0x00 #define STAGEINDEX_TEST_SILO 0x01 diff --git a/src/include/game/chr/chr.h b/src/include/game/chr/chr.h index e297ecef5..1c13963da 100644 --- a/src/include/game/chr/chr.h +++ b/src/include/game/chr/chr.h @@ -3,7 +3,7 @@ #include #include "types.h" -u32 func0f01e050(void); +void func0f01e050(void); u32 func0f04e418(void); diff --git a/src/include/game/data/data_000000.h b/src/include/game/data/data_000000.h index 9d71d5001..073ba4dff 100644 --- a/src/include/game/data/data_000000.h +++ b/src/include/game/data/data_000000.h @@ -85,6 +85,7 @@ extern u32 var8005d880; extern u32 var8005d994; extern u8 var8005d9a0; extern u32 var8005d9cc; +extern u32 var8005d9d0; extern u32 var8005d9d4; extern u32 var8005dcc8; extern u32 var8005dcf0; @@ -192,6 +193,7 @@ extern u32 var80061468; extern u32 var800615a0; extern u32 var80061630; extern u32 var80061634; +extern u32 var80061640; extern u32 var80061644; extern u32 var80061648; extern u32 var8006164c; diff --git a/src/include/game/data/data_0083d0.h b/src/include/game/data/data_0083d0.h index 0147a49f1..3fcd86aa9 100644 --- a/src/include/game/data/data_0083d0.h +++ b/src/include/game/data/data_0083d0.h @@ -4,6 +4,7 @@ #include "types.h" extern u32 var800623b0; +extern u32 var800623f0; extern u32 var80062400; extern u32 var80062410; extern u32 var80062414; diff --git a/src/include/game/data/data_020df0.h b/src/include/game/data/data_020df0.h index 3591b5f92..6a5b0d071 100644 --- a/src/include/game/data/data_020df0.h +++ b/src/include/game/data/data_020df0.h @@ -214,12 +214,12 @@ extern u32 var80084008; extern u32 var80084010; extern u32 var80084014; extern f32 var80084018; -extern u32 g_MpMatchTime; -extern u32 var80084028; -extern u32 var8008402c; -extern u32 var80084030; +extern s32 g_MpTimeElapsed; +extern s32 g_MpTimeLimit; +extern s32 g_MpScoreLimit; +extern s32 g_MpTeamScoreLimit; extern s32 var80084034; -extern u32 var80084038; +extern s32 var80084038; extern f32 g_Uptime; extern bool var80084040; extern u32 var80084050; diff --git a/src/include/game/dlights.h b/src/include/game/dlights.h index 2fbc542e1..6f153a090 100644 --- a/src/include/game/dlights.h +++ b/src/include/game/dlights.h @@ -34,7 +34,7 @@ u32 func0f002a98(void); void func0f002b58(s32 roomthing, bool enable); void func0f002c28(s32 room_id, s32 operation, s32 arg2, s32 arg3, s32 arg4); u32 func0f002ef8(void); -u32 func0f0033b0(void); +void func0f0033b0(void); u32 func0f003444(void); u32 func0f0035c0(void); u32 func0f00372c(void); diff --git a/src/include/game/game_006bd0.h b/src/include/game/game_006bd0.h index f19b8837e..ad07a7084 100644 --- a/src/include/game/game_006bd0.h +++ b/src/include/game/game_006bd0.h @@ -13,7 +13,7 @@ u32 func0f009818(void); void func0f0099a4(void); u32 func0f0099e4(void); u32 func0f009d10(void); -u32 func0f009eac(void); +void func0f009eac(void); u32 func0f00a168(void); u32 func0f00a1f8(void); u32 func0f00a444(void); diff --git a/src/include/game/game_016100.h b/src/include/game/game_016100.h index 2e4ee8a84..6592429a5 100644 --- a/src/include/game/game_016100.h +++ b/src/include/game/game_016100.h @@ -37,14 +37,14 @@ u32 func0f01a494(void); u32 func0f01a4a8(void); u32 func0f01a510(void); void func0f01a7e4(s32 arg0); -u32 func0f01a810(void); +void func0f01a810(void); u32 func0f01ab94(void); u32 func0f01aba8(void); u32 func0f01abf0(void); u32 func0f01aca8(u32 arg0); u32 func0f01ad5c(void); u32 func0f01adb8(void); -u32 func0f01ae30(void); +void func0f01ae30(void); u32 func0f01aef0(void); void func0f016444(void); s32 getNumPlayers(void); diff --git a/src/include/game/game_01b0a0.h b/src/include/game/game_01b0a0.h index 2804f2a99..1c4c9d9dd 100644 --- a/src/include/game/game_01b0a0.h +++ b/src/include/game/game_01b0a0.h @@ -9,6 +9,6 @@ u32 func0f01b0e0(void); u32 func0f01b114(void); u32 func0f01b148(void); void func0f01b154(s32 arg0); -u32 func0f01b160(void); +void func0f01b160(void); #endif diff --git a/src/include/game/game_01bea0.h b/src/include/game/game_01bea0.h index 6b462d10c..a5c45aff8 100644 --- a/src/include/game/game_01bea0.h +++ b/src/include/game/game_01bea0.h @@ -5,6 +5,6 @@ void func0f01bea0(void); void menuCountDialogs(void); -u32 func0f01bf28(void); +void func0f01bf28(void); #endif diff --git a/src/include/game/game_01d770.h b/src/include/game/game_01d770.h index be99fff21..81ebbbfe3 100644 --- a/src/include/game/game_01d770.h +++ b/src/include/game/game_01d770.h @@ -3,6 +3,6 @@ #include #include "types.h" -u32 func0f01d770(void); +void func0f01d770(void); #endif diff --git a/src/include/game/game_01d860.h b/src/include/game/game_01d860.h index 91caa1e54..8ea8ba001 100644 --- a/src/include/game/game_01d860.h +++ b/src/include/game/game_01d860.h @@ -3,7 +3,7 @@ #include #include "types.h" -u32 func0f01d860(void); -u32 func0f01d8c0(void); +void func0f01d860(void); +void func0f01d8c0(void); #endif diff --git a/src/include/game/game_01d990.h b/src/include/game/game_01d990.h index c076ab82a..c641820b7 100644 --- a/src/include/game/game_01d990.h +++ b/src/include/game/game_01d990.h @@ -3,6 +3,6 @@ #include #include "types.h" -u32 func0f01d990(void); +void func0f01d990(void); #endif diff --git a/src/include/game/game_01d9f0.h b/src/include/game/game_01d9f0.h index d650c3110..3c566aaac 100644 --- a/src/include/game/game_01d9f0.h +++ b/src/include/game/game_01d9f0.h @@ -4,6 +4,6 @@ #include "types.h" u32 func0f01d9f0(void); -u32 func0f01dd6c(void); +void func0f01dd6c(void); #endif diff --git a/src/include/game/game_01de30.h b/src/include/game/game_01de30.h index 13a190ac3..2ddf5337d 100644 --- a/src/include/game/game_01de30.h +++ b/src/include/game/game_01de30.h @@ -3,6 +3,6 @@ #include #include "types.h" -u32 func0f01de30(void); +void func0f01de30(void); #endif diff --git a/src/include/game/game_01e250.h b/src/include/game/game_01e250.h index fecd13fc4..c58f9a344 100644 --- a/src/include/game/game_01e250.h +++ b/src/include/game/game_01e250.h @@ -3,7 +3,7 @@ #include #include "types.h" -u32 func0f01e250(void); +void func0f01e250(void); u32 chrSetChrnum(struct chrdata *chr, s16 arg1); u32 func0f01e6a4(void); u32 func0f01e7f4(void); diff --git a/src/include/game/game_0601b0.h b/src/include/game/game_0601b0.h index 8bded565d..ce1b2a55a 100644 --- a/src/include/game/game_0601b0.h +++ b/src/include/game/game_0601b0.h @@ -31,7 +31,7 @@ u32 func0f062e74(void); u32 func0f062ef8(void); u32 func0f062fac(void); u32 func0f06302c(void); -u32 func0f063dcc(void); +void func0f063dcc(void); void func0f064178(struct prop *prop, bool enable); u32 func0f0641f4(void); u32 func0f06438c(void); diff --git a/src/include/game/game_097ba0.h b/src/include/game/game_097ba0.h index 44f401d21..d0a0f7a4c 100644 --- a/src/include/game/game_097ba0.h +++ b/src/include/game/game_097ba0.h @@ -171,7 +171,7 @@ u32 func0f0abad0(void); u32 func0f0abb80(void); u32 func0f0abba8(void); u32 func0f0abbe8(void); -u32 func0f0abc28(void); +void func0f0abc28(void); void func0f0abc74(u32 arg0, u32 arg1); u32 func0f0abcb0(void); u32 func0f0abd30(void); diff --git a/src/include/game/game_0abe70.h b/src/include/game/game_0abe70.h index e761f0b81..ef4ca231e 100644 --- a/src/include/game/game_0abe70.h +++ b/src/include/game/game_0abe70.h @@ -19,7 +19,7 @@ u32 func0f0aed70(void); u32 func0f0aeda4(void); u32 func0f0aeea8(void); u32 func0f0aeed8(void); -u32 func0f0aefb8(void); +void func0f0aefb8(void); u32 func0f0af0d4(void); u32 func0f0af158(void); u32 func0f0afa4c(void); diff --git a/src/include/game/game_0b28d0.h b/src/include/game/game_0b28d0.h index 525f6e40b..aabe9a919 100644 --- a/src/include/game/game_0b28d0.h +++ b/src/include/game/game_0b28d0.h @@ -4,7 +4,7 @@ #include "types.h" u32 func0f0b28d0(void); -u32 func0f0b2904(void); +void func0f0b2904(void); u32 func0f0b2b64(void); u32 func0f0b30ac(void); u32 func0f0b30cc(void); diff --git a/src/include/game/game_0dcdb0.h b/src/include/game/game_0dcdb0.h index a34932f12..5e74fe401 100644 --- a/src/include/game/game_0dcdb0.h +++ b/src/include/game/game_0dcdb0.h @@ -20,7 +20,7 @@ u32 func0f0de0d4(void); u32 func0f0de160(void); u32 func0f0de7fc(void); u32 func0f0deebc(void); -u32 func0f0df364(void); +void func0f0df364(void); void currentPlayerUnsetFlag(u32 flag); void currentPlayerSetFlag(u32 flag); void func0f0dfa50(u32 playernum); diff --git a/src/include/game/game_129210.h b/src/include/game/game_129210.h index 9bc1e664a..ded818373 100644 --- a/src/include/game/game_129210.h +++ b/src/include/game/game_129210.h @@ -4,7 +4,7 @@ #include "types.h" u32 func0f129210(void); -u32 func0f12939c(void); +void func0f12939c(void); u32 func0f12955c(void); u32 func0f129818(void); diff --git a/src/include/game/game_157db0.h b/src/include/game/game_157db0.h index 3bc86fdab..646bc9c02 100644 --- a/src/include/game/game_157db0.h +++ b/src/include/game/game_157db0.h @@ -46,7 +46,7 @@ u32 func0f15d63c(void); u32 func0f15d6c4(void); bool roomIsActive(s32 room_id); u32 func0f15d744(void); -u32 func0f15d7a0(void); +bool roomIsVisibleByPlayer(s16 room, u32 playernum); u32 func0f15d808(void); u32 func0f15d870(void); u32 func0f15d9a8(void); diff --git a/src/include/game/game_167ae0.h b/src/include/game/game_167ae0.h index fb44445af..627c05bc5 100644 --- a/src/include/game/game_167ae0.h +++ b/src/include/game/game_167ae0.h @@ -8,7 +8,7 @@ u32 func0f167af8(void); void func0f167b10(void); u32 func0f167b48(void); u32 func0f167b84(void); -u32 func0f167c88(void); +void func0f167c88(void); void func0f167e7c(s32 stagenum); u32 func0f1685d8(void); void fadeCancel(void); @@ -17,11 +17,11 @@ u32 func0f168b4c(void); u32 func0f168f24(void); u32 func0f1691c0(void); u32 func0f169374(void); -u32 func0f16b0c8(void); +void func0f16b0c8(void); u32 addFfff2bcf(u32 value); -u32 func0f16b810(void); -u32 getEffectiveSlowMotion(void); -u32 func0f16b96c(void); +void func0f16b810(void); +s32 getEffectiveSlowMotion(void); +void func0f16b96c(void); u32 func0f16cb04(void); void func0f16cce4(void); void func0f16cd40(u32 arg0); @@ -35,6 +35,6 @@ void setVar80084028(u32 arg0); void setVar8008402c(u32 arg0); void setVar80084030(u32 arg0); f32 getUptime(void); -u32 mpGetMatchTime(void); +u32 mpGetTimeElapsed(void); #endif diff --git a/src/include/game/game_19c990.h b/src/include/game/game_19c990.h index 2ceca2c99..ddeb14ee0 100644 --- a/src/include/game/game_19c990.h +++ b/src/include/game/game_19c990.h @@ -51,7 +51,7 @@ u32 func0f19f294(void); u32 func0f19f2ec(void); u32 func0f19f39c(void); u32 func0f19f524(void); -u32 func0f19f994(void); +void func0f19f994(void); u32 func0f1a0924(void); u32 func0f1a0a70(void); u32 func0f1a0c30(void); @@ -77,7 +77,7 @@ u32 func0f1a17e4(void); struct trainingdata *ciGetTrainingData(void); u32 func0f1a1824(void); u32 func0f1a190c(void); -u32 func0f1a1998(void); +void func0f1a1998(void); u32 func0f1a1ac0(void); u32 func0f1a1b54(void); u32 func0f1a1bec(void); @@ -91,7 +91,7 @@ u32 func0f1a1f00(void); u32 func0f1a1f70(void); struct trainingdata *func0f1a1fe0(void); // might be a different but similar struct u32 func0f1a1fec(void); -u32 func0f1a2070(void); +void func0f1a2070(void); u32 func0f1a2198(void); u32 func0f1a2220(void); u32 func0f1a22d4(void); diff --git a/src/include/game/mplayer.h b/src/include/game/mplayer.h index 390106234..13781b337 100644 --- a/src/include/game/mplayer.h +++ b/src/include/game/mplayer.h @@ -16,9 +16,9 @@ u32 func0f188210(void); void func0f18836c(void); u32 func0f18844c(void); void func0f188530(void); -u32 func0f1885e4(void); +s32 func0f1885e4(struct mpteaminfo *info); u32 func0f188930(void); -u32 func0f188a84(void); +s32 func0f188a84(struct mpteaminfo *info); u32 func0f188bcc(void); u32 mpGetNumWeaponOptions(void); char *mpGetWeaponLabel(s32 weapon_id); diff --git a/src/include/game/pak/pak.h b/src/include/game/pak/pak.h index 0fdf2afb0..2ee46a131 100644 --- a/src/include/game/pak/pak.h +++ b/src/include/game/pak/pak.h @@ -91,9 +91,9 @@ u32 func0f11bbd8(void); u32 func0f11bc54(void); bool pakRepair(s32 arg0); u32 func0f11c39c(void); -u32 func0f11c54c(void); +void func0f11c54c(void); u32 func0f11c6d0(void); -u32 func0f11c7a0(void); +void func0f11c7a0(void); u32 func0f11ca30(void); void func0f11cb9c(u32 arg0); u32 func0f11cbd8(void); @@ -116,7 +116,7 @@ void func0f11dcb0(s32 arg0); u32 func0f11dd58(void); u32 func0f11de20(void); u32 func0f11deb8(void); -u32 func0f11df38(void); +void func0f11df38(void); void func0f11df8c(void); u32 func0f11df94(void); u32 func0f11e3bc(void); diff --git a/src/include/game/wallhit.h b/src/include/game/wallhit.h index 228ee5160..c155e260c 100644 --- a/src/include/game/wallhit.h +++ b/src/include/game/wallhit.h @@ -11,7 +11,7 @@ u32 func0f13e5c8(void); u32 func0f13e640(void); u32 func0f13e744(void); u32 func0f13e994(void); -u32 func0f13eb44(void); +void func0f13eb44(void); u32 func0f13f3f4(void); u32 func0f13f504(void); u32 func0f140750(void); diff --git a/src/include/gvars/gvars.h b/src/include/gvars/gvars.h index dec03e5d3..b9572c750 100644 --- a/src/include/gvars/gvars.h +++ b/src/include/gvars/gvars.h @@ -17,7 +17,7 @@ struct g_vars { /*000000*/ s32 diffframe60; /*000004*/ f32 diffframe60f; /*000008*/ s32 lvframe60; - /*00000c*/ s32 lvframenum; + /*00000c*/ s32 lvframenum; // increments by 1 each frame when not paused /*000010*/ f32 diffframe60freal; /*000014*/ s32 lastframetime; /*000018*/ s32 thisframetime; @@ -27,7 +27,7 @@ struct g_vars { /*000028*/ u32 mininc60; /*00002c*/ s32 roomportalrecursionlimit; /*000030*/ s32 lvframe240; - /*000034*/ s32 lvupdate240; + /*000034*/ s32 lvupdate240; // 0 = paused, 4 = slowmo, 8 = normal /*000038*/ s32 lvupdate240_60; /*00003c*/ s32 lvupdate240_60error; /*000040*/ s32 diffframe240; @@ -190,7 +190,7 @@ struct g_vars { /*0004d5*/ u8 unk0004d5; /*0004d6*/ s8 unk0004d6; /*0004d7*/ u8 unk0004d7; - /*0004d8*/ u32 unk0004d8; + /*0004d8*/ s32 unk0004d8; /*0004dc*/ u32 unk0004dc; /*0004e0*/ u8 unk0004e0; /*0004e1*/ u8 unk0004e1; diff --git a/src/include/lib/lib_09660.h b/src/include/lib/lib_09660.h index 40527b9ed..4e924bd47 100644 --- a/src/include/lib/lib_09660.h +++ b/src/include/lib/lib_09660.h @@ -47,7 +47,7 @@ u32 func0000bc98(void); u32 func0000bca8(void); u32 func0000bd00(void); u32 func0000bd10(void); -u32 func0000bd20(void); +void func0000bd20(bool arg0); u32 func0000bd30(void); u32 func0000bd7c(void); u32 func0000bdc8(void); diff --git a/src/include/lib/lib_0e9d0.h b/src/include/lib/lib_0e9d0.h index de0ab8d32..5c00eb860 100644 --- a/src/include/lib/lib_0e9d0.h +++ b/src/include/lib/lib_0e9d0.h @@ -28,11 +28,11 @@ u32 func0000fd9c(void); void func0000fe18(void); u32 func0000fe20(void); u32 func0000fe50(void); -u32 func0000fe88(void); +void func0000fe88(void); u32 func00010360(void); u32 func0001036c(void); u32 func000104a0(void); -void func00010718(s32 arg0, s32 arg1, s32 arg2, s32 arg3, s32 arg4, f32 arg5, s32 arg6, s32 arg7, s32 arg8); +void func00010718(s32 *arg0, s32 arg1, s32 arg2, s32 arg3, s32 arg4, f32 arg5, s32 arg6, s32 arg7, s32 arg8); s32 func00010904(s32 arg0, s32 arg1, s32 arg2, s32 arg3, s32 arg4, f32 arg5, s32 arg6, s32 arg7); u32 func00010ae4(void); void func00010db0(s32 room_id); diff --git a/src/include/lib/lib_11420.h b/src/include/lib/lib_11420.h index d4fc7e4bf..9d0edb95e 100644 --- a/src/include/lib/lib_11420.h +++ b/src/include/lib/lib_11420.h @@ -9,6 +9,6 @@ u32 func00011780(void); u32 func00011884(void); u32 func000118f4(void); void func0001190c(s32 arg0); -u32 func00011d84(void); +void func00011d84(void); #endif diff --git a/src/include/lib/lib_13900.h b/src/include/lib/lib_13900.h index 952e99959..c1f6e9dc6 100644 --- a/src/include/lib/lib_13900.h +++ b/src/include/lib/lib_13900.h @@ -4,7 +4,7 @@ #include "types.h" void func00013900(void); -u32 func00013938(void); +void func00013938(void); u32 func00013974(void); u32 func00013980(void); u32 func0001398c(void); @@ -32,10 +32,10 @@ u32 func000149c0(void); u32 func00014a78(void); u32 func00014b50(void); u32 func00014c98(void); -u32 func00014e10(void); -u32 func00014eb8(void); -u32 func00014f60(void); -u32 func00015020(void); +s32 func00014e10(u32 arg0); +s32 func00014eb8(u32 arg0); +s32 func00014f60(u32 arg0, u16 arg1); +s32 func00015020(u32 arg0, u16 arg1); u32 func000150c4(void); u32 func000150e8(void); u32 func00015144(void); diff --git a/src/include/types.h b/src/include/types.h index 6ddbc45d2..a65d07f97 100644 --- a/src/include/types.h +++ b/src/include/types.h @@ -1341,9 +1341,9 @@ struct player { /*0x031c*/ f32 thetadie; /*0x0320*/ f32 vertadie; /*0x0324*/ u32 bondtype; - /*0x0328*/ u32 unk0328; - /*0x032c*/ u32 unk032c; - /*0x0330*/ u32 unk0330; + /*0x0328*/ bool startnewbonddie; + /*0x032c*/ bool redbloodfinished; + /*0x0330*/ bool deathanimfinished; /*0x0334*/ u32 unk0334; /*0x0338*/ struct playerbond bonddie; /*0x036c*/ struct playerbond bond2; @@ -2805,7 +2805,7 @@ struct player { /*0x1c34*/ u32 unk1c34; /*0x1c38*/ u32 unk1c38; /*0x1c3c*/ u32 unk1c3c; - /*0x1c40*/ s32 unk1c40; + /*0x1c40*/ u32 joybutinhibit; /*0x1c44*/ u32 unk1c44; /*0x1c48*/ u32 unk1c48; /*0x1c4c*/ u32 unk1c4c; @@ -5255,4 +5255,12 @@ struct chrbio { u32 profile; }; +struct mpteaminfo { + u32 unk00; + u32 unk04; + u32 unk08; + u32 unk0c; + s32 score; +}; + #endif