diff --git a/src/game/bondbike.c b/src/game/bondbike.c index caec63ff1..715110b18 100644 --- a/src/game/bondbike.c +++ b/src/game/bondbike.c @@ -492,7 +492,7 @@ glabel func0f0d26ac /* f0d2738: 14400011 */ bnez $v0,.L0f0d2780 /* f0d273c: 8fa70060 */ lw $a3,0x60($sp) .L0f0d2740: -/* f0d2740: 0fc5b364 */ jal getVar80084014 +/* f0d2740: 0fc5b364 */ jal soloIsPaused /* f0d2744: 00000000 */ sll $zero,$zero,0x0 /* f0d2748: 1440000d */ bnez $v0,.L0f0d2780 /* f0d274c: 8fa70060 */ lw $a3,0x60($sp) diff --git a/src/game/bondgrab.c b/src/game/bondgrab.c index 256da57a9..00a4586ae 100644 --- a/src/game/bondgrab.c +++ b/src/game/bondgrab.c @@ -77,7 +77,7 @@ void currentPlayerGrabInit(void) g_Vars.currentplayer->gunextraaimx = 0; g_Vars.currentplayer->gunextraaimy = 0; - func00016374((g_Vars.currentplayer->vv_theta * M_TAU) / 360.0f, matrix); + func00016374((g_Vars.currentplayer->vv_theta * M_BADTAU) / 360.0f, matrix); func00015b10(matrix, &g_Vars.currentplayer->grabbedposoffset); g_Vars.currentplayer->bondprevtheta = g_Vars.currentplayer->vv_theta; @@ -104,12 +104,12 @@ void currentPlayerGrabInit(void) if (hov) { g_Vars.currentplayer->grabbedrotoffset = - hov->unk10 - (M_TAU - (g_Vars.currentplayer->vv_theta * M_TAU) / 360.0f); + hov->unk10 - (M_BADTAU - (g_Vars.currentplayer->vv_theta * M_BADTAU) / 360.0f); - if (g_Vars.currentplayer->grabbedrotoffset >= M_TAU) { - g_Vars.currentplayer->grabbedrotoffset -= M_TAU; + if (g_Vars.currentplayer->grabbedrotoffset >= M_BADTAU) { + g_Vars.currentplayer->grabbedrotoffset -= M_BADTAU; } else if (g_Vars.currentplayer->grabbedrotoffset < 0) { - g_Vars.currentplayer->grabbedrotoffset += M_TAU; + g_Vars.currentplayer->grabbedrotoffset += M_BADTAU; } } @@ -169,12 +169,12 @@ void currentPlayerUpdateGrabbedPropForRelease(void) moveamount.z = (g_Vars.currentplayer->grabbedprop->pos.z - g_Vars.currentplayer->grabbedprevpos.z) / g_Vars.lvupdate240freal; rotateamount = -(g_Vars.currentplayer->vv_theta - g_Vars.currentplayer->bondprevtheta) - * M_TAU / 360; + * M_BADTAU / 360; if (rotateamount < -M_PI) { - rotateamount += M_TAU; + rotateamount += M_BADTAU; } else if (rotateamount >= M_PI) { - rotateamount -= M_TAU; + rotateamount -= M_BADTAU; } rotateamount /= g_Vars.lvupdate240freal; diff --git a/src/game/bondmove.c b/src/game/bondmove.c index 10caf04ec..896860032 100644 --- a/src/game/bondmove.c +++ b/src/game/bondmove.c @@ -1308,7 +1308,7 @@ glabel var7f1ad8e4 /* f0c91f4: 8e4c0284 */ lw $t4,0x284($s2) /* f0c91f8: ad8b0120 */ sw $t3,0x120($t4) .L0f0c91fc: -/* f0c91fc: 0fc5b364 */ jal getVar80084014 +/* f0c91fc: 0fc5b364 */ jal soloIsPaused /* f0c9200: 00000000 */ sll $zero,$zero,0x0 /* f0c9204: 54400243 */ bnezl $v0,.L0f0c9b14 /* f0c9208: 8e450284 */ lw $a1,0x284($s2) @@ -2094,7 +2094,7 @@ glabel var7f1ad8e4 /* f0c9cec: 8e480284 */ lw $t0,0x284($s2) /* f0c9cf0: ad190120 */ sw $t9,0x120($t0) .L0f0c9cf4: -/* f0c9cf4: 0fc5b364 */ jal getVar80084014 +/* f0c9cf4: 0fc5b364 */ jal soloIsPaused /* f0c9cf8: 00000000 */ sll $zero,$zero,0x0 /* f0c9cfc: 544002ba */ bnezl $v0,.L0f0ca7e8 /* f0c9d00: 8e450284 */ lw $a1,0x284($s2) diff --git a/src/game/chr/chraction.c b/src/game/chr/chraction.c index c1c744218..763677bb3 100644 --- a/src/game/chr/chraction.c +++ b/src/game/chr/chraction.c @@ -8472,7 +8472,7 @@ glabel var7f1a8d98 /* f0359fc: 25f80001 */ addiu $t8,$t7,0x1 /* f035a00: a21802ff */ sb $t8,0x2ff($s0) .L0f035a04: -/* f035a04: 0fc5b364 */ jal getVar80084014 +/* f035a04: 0fc5b364 */ jal soloIsPaused /* f035a08: 00000000 */ sll $zero,$zero,0x0 /* f035a0c: 14400005 */ bnez $v0,.L0f035a24 /* f035a10: 8fad00f4 */ lw $t5,0xf4($sp) @@ -28074,7 +28074,7 @@ f32 chrGetAngleToPos(struct chrdata *chr, struct coord *pos) if (chr->prop->type == PROPTYPE_PLAYER) { u32 playernum = propGetPlayerNum(chr->prop); - fVar3 = (360 - g_Vars.players[playernum]->vv_theta) * (M_TAU / 360); + fVar3 = (360 - g_Vars.players[playernum]->vv_theta) * (M_BADTAU / 360); } else { fVar3 = func0f03e45c(chr); } @@ -28084,7 +28084,7 @@ f32 chrGetAngleToPos(struct chrdata *chr, struct coord *pos) fVar4 = fVar2 - fVar3; if (fVar2 < fVar3) { - fVar4 += M_TAU; + fVar4 += M_BADTAU; } return fVar4; @@ -28564,7 +28564,7 @@ bool func0f04911c(struct chrdata *chr, struct coord *pos, u8 arg2) f32 angle = chrGetAngleToPos(chr, pos); if ((angle < arg2 * 0.024539785459638f && angle < M_PI) || - (M_TAU - arg2 * 0.024539785459638f < angle && M_PI < angle)) { + (M_BADTAU - arg2 * 0.024539785459638f < angle && M_PI < angle)) { return true; } diff --git a/src/game/chr/chraicommands.c b/src/game/chr/chraicommands.c index 4122e511e..4b39270a6 100644 --- a/src/game/chr/chraicommands.c +++ b/src/game/chr/chraicommands.c @@ -1659,7 +1659,7 @@ bool ai004d(void) { u8 *cmd = g_Vars.ailist + g_Vars.aioffset; - if (chrGetAngleToTarget(g_Vars.chrdata) < cmd[2] * M_TAU * 0.00390625f) { + if (chrGetAngleToTarget(g_Vars.chrdata) < cmd[2] * M_BADTAU * 0.00390625f) { g_Vars.aioffset = chraiGoToLabel(g_Vars.ailist, g_Vars.aioffset, cmd[3]); } else { g_Vars.aioffset += 4; @@ -1675,7 +1675,7 @@ bool ai004f(void) { u8 *cmd = g_Vars.ailist + g_Vars.aioffset; - if (chrGetAngleToTarget(g_Vars.chrdata) > cmd[2] * M_TAU * 0.00390625f) { + if (chrGetAngleToTarget(g_Vars.chrdata) > cmd[2] * M_BADTAU * 0.00390625f) { g_Vars.aioffset = chraiGoToLabel(g_Vars.ailist, g_Vars.aioffset, cmd[3]); } else { g_Vars.aioffset += 4; @@ -5237,7 +5237,7 @@ bool aiSetRotarySpeed(void) { u8 *cmd = g_Vars.ailist + g_Vars.aioffset; f32 speedtime = cmd[5] | (cmd[4] << 8); - f32 speedaim = (cmd[3] | (cmd[2] << 8)) * M_TAU / 3600; + f32 speedaim = (cmd[3] | (cmd[2] << 8)) * M_BADTAU / 3600; if (g_Vars.heli) { g_Vars.heli->rotaryspeedaim = speedaim; @@ -5981,7 +5981,7 @@ bool ai00f4(void) s16 e = cmd[11] | (cmd[10] << 8); s32 f = cmd[13] | (cmd[12] << 8); - func0f0b9c1c(f * M_TAU / 65536, c * M_TAU / 65536, a, b, e, d); + func0f0b9c1c(f * M_BADTAU / 65536, c * M_BADTAU / 65536, a, b, e, d); g_Vars.aioffset += 14; diff --git a/src/game/data/data_0083d0.c b/src/game/data/data_0083d0.c index 821d0417b..b8b46ef15 100644 --- a/src/game/data/data_0083d0.c +++ b/src/game/data/data_0083d0.c @@ -25,7 +25,7 @@ u32 var800623e0 = 0x00000000; u32 var800623e4 = 0x00000000; u32 var800623e8 = 0x00000000; u32 var800623ec = 0x00000000; -bool g_WeatherEnabled = false; +s32 g_WeatherEnabled = false; u32 var800623f4 = 0x00000000; u32 var800623f8 = 0x00000000; u32 var800623fc = 0x00000000; diff --git a/src/game/data/data_020df0.c b/src/game/data/data_020df0.c index f3fa757b2..edec0a8c3 100644 --- a/src/game/data/data_020df0.c +++ b/src/game/data/data_020df0.c @@ -6359,11 +6359,15 @@ u32 sparktable[] = { u32 var8007f0b8 = 0x00000000; u32 var8007f0bc = 0x00000000; struct weatherdata *g_WeatherData = NULL; -u32 var8007f0c4 = 0x000080b7; -u32 var8007f0c8 = 0x000080b6; -u32 var8007f0cc = 0x000080b8; -u32 var8007f0d0 = 0xffffffff; -u32 var8007f0d4 = 0x00000014; + +s32 var8007f0c4[4] = { + 0x000080b7, + 0x000080b6, + 0x000080b8, + -1, +}; + +u32 g_RainSpeedExtra = 20; u32 var8007f0d8 = 0x0000000f; u32 var8007f0dc = 0x0000000a; u32 var8007f0e0 = 0x00000001; diff --git a/src/game/dlights.c b/src/game/dlights.c index 6f0951f2e..e67d739e0 100644 --- a/src/game/dlights.c +++ b/src/game/dlights.c @@ -6190,7 +6190,7 @@ glabel func0f005bb0 /* f005e5c: 31ae0001 */ andi $t6,$t5,0x1 /* f005e60: 11c0003c */ beqz $t6,.L0f005f54 /* f005e64: 00000000 */ sll $zero,$zero,0x0 -/* f005e68: 0fc5b364 */ jal getVar80084014 +/* f005e68: 0fc5b364 */ jal soloIsPaused /* f005e6c: 00000000 */ sll $zero,$zero,0x0 /* f005e70: 14400038 */ bnez $v0,.L0f005f54 /* f005e74: 3c08800a */ lui $t0,%hi(g_Vars+0x284) diff --git a/src/game/game_011110.c b/src/game/game_011110.c index 6fd466394..49a5e9282 100644 --- a/src/game/game_011110.c +++ b/src/game/game_011110.c @@ -1553,15 +1553,15 @@ glabel var7f1a827c // // if (g_NumSpawnPoints > 0) { // if (g_Vars.coopplayernum >= 0) { -// fStack32 = M_TAU - scenarioCallback2c(30, &pos, &rooms[0], g_Vars.currentplayer->prop); +// fStack32 = M_BADTAU - scenarioCallback2c(30, &pos, &rooms[0], g_Vars.currentplayer->prop); // } else if (g_Vars.antiplayernum >= 0) { -// fStack32 = M_TAU - scenarioCallback2c(30, &pos, &rooms[0], g_Vars.currentplayer->prop); +// fStack32 = M_BADTAU - scenarioCallback2c(30, &pos, &rooms[0], g_Vars.currentplayer->prop); // } else { // if (g_Vars.mplayerisrunning == 0) { // g_NumSpawnPoints = 1; // } // -// fStack32 = M_TAU - scenarioCallback2c(30, &pos, &rooms[0], g_Vars.currentplayer->prop); +// fStack32 = M_BADTAU - scenarioCallback2c(30, &pos, &rooms[0], g_Vars.currentplayer->prop); // } // } // @@ -1575,7 +1575,7 @@ glabel var7f1a827c // pos.y = g_Vars.currentplayer->unk19c4 + fVar9; // g_Vars.currentplayer->vv_manground = fVar9; // g_Vars.currentplayer->vv_ground = fVar9; -// g_Vars.currentplayer->unk0144 = (fStack32 * 360.0f) / M_TAU; +// g_Vars.currentplayer->unk0144 = (fStack32 * 360.0f) / M_BADTAU; // func0f0b85a0(&g_Vars.currentplayer->unk036c, &pos); // g_Vars.currentplayer->unk036c = -sinf(fStack32); // g_Vars.currentplayer->unk0370 = 0; diff --git a/src/game/game_092610.c b/src/game/game_092610.c index f3dcc7b84..27182cd95 100644 --- a/src/game/game_092610.c +++ b/src/game/game_092610.c @@ -823,7 +823,7 @@ glabel func0f092c04 /* f093034: afa50048 */ sw $a1,0x48($sp) .L0f093038: /* f093038: afa80040 */ sw $t0,0x40($sp) -/* f09303c: 0fc5b364 */ jal getVar80084014 +/* f09303c: 0fc5b364 */ jal soloIsPaused /* f093040: e7b2003c */ swc1 $f18,0x3c($sp) /* f093044: 3c09800a */ lui $t1,%hi(g_Vars) /* f093048: 25299fc0 */ addiu $t1,$t1,%lo(g_Vars) diff --git a/src/game/game_0b63b0.c b/src/game/game_0b63b0.c index 27b053d9a..7acd9fd5e 100644 --- a/src/game/game_0b63b0.c +++ b/src/game/game_0b63b0.c @@ -5549,7 +5549,7 @@ glabel var7f1ad630 /* f0bae0c: 0fc68606 */ jal getDeviceTrainingData /* f0bae10: 00000000 */ sll $zero,$zero,0x0 /* f0bae14: 24040001 */ addiu $a0,$zero,0x1 -/* f0bae18: 0fc5b350 */ jal setVar80084014 +/* f0bae18: 0fc5b350 */ jal soloSetPaused /* f0bae1c: afa20018 */ sw $v0,0x18($sp) /* f0bae20: 3c05800a */ lui $a1,%hi(g_Vars) /* f0bae24: 24a59fc0 */ addiu $a1,$a1,%lo(g_Vars) @@ -5603,7 +5603,7 @@ glabel var7f1ad630 /* f0baed4: 2b210014 */ slti $at,$t9,0x14 /* f0baed8: 54200009 */ bnezl $at,.L0f0baf00 /* f0baedc: 8fbf0014 */ lw $ra,0x14($sp) -/* f0baee0: 0fc5b350 */ jal setVar80084014 +/* f0baee0: 0fc5b350 */ jal soloSetPaused /* f0baee4: 00002025 */ or $a0,$zero,$zero /* f0baee8: 3c05800a */ lui $a1,%hi(g_Vars) /* f0baeec: 24a59fc0 */ addiu $a1,$a1,%lo(g_Vars) @@ -5630,7 +5630,7 @@ void currentPlayerPause(u32 mode) void func0f0baf38(void) { if (g_Vars.currentplayer->pausemode == PAUSEMODE_3) { - setVar80084014(0); + soloSetPaused(0); func0f16db3c(); g_Vars.currentplayer->pausemode = PAUSEMODE_0; } @@ -8928,7 +8928,7 @@ glabel var7f1ad6ac /* f0bdf40: 2411ffd8 */ addiu $s1,$zero,-40 /* f0bdf44: a611024c */ sh $s1,0x24c($s0) .L0f0bdf48: -/* f0bdf48: 0fc5b364 */ jal getVar80084014 +/* f0bdf48: 0fc5b364 */ jal soloIsPaused /* f0bdf4c: 2411ffd8 */ addiu $s1,$zero,-40 /* f0bdf50: 50400004 */ beqzl $v0,.L0f0bdf64 /* f0bdf54: 8e700284 */ lw $s0,0x284($s3) @@ -10713,7 +10713,7 @@ glabel var7f1ad6ac /* f0bf960: 8d440070 */ lw $a0,0x70($t2) /* f0bf964: 00028600 */ sll $s0,$v0,0x18 /* f0bf968: 00105e03 */ sra $t3,$s0,0x18 -/* f0bf96c: 0fc5b364 */ jal getVar80084014 +/* f0bf96c: 0fc5b364 */ jal soloIsPaused /* f0bf970: 01608025 */ or $s0,$t3,$zero /* f0bf974: 1440002c */ bnez $v0,.L0f0bfa28 /* f0bf978: 8fad0330 */ lw $t5,0x330($sp) diff --git a/src/game/game_0dcdb0.c b/src/game/game_0dcdb0.c index 5d95bd556..ce3c9e68e 100644 --- a/src/game/game_0dcdb0.c +++ b/src/game/game_0dcdb0.c @@ -2981,7 +2981,7 @@ glabel var7f1aded8 .L0f0df75c: /* f0df75c: 55600038 */ bnezl $t3,.L0f0df840 /* f0df760: 9602001c */ lhu $v0,0x1c($s0) -/* f0df764: 0fc5b364 */ jal getVar80084014 +/* f0df764: 0fc5b364 */ jal soloIsPaused /* f0df768: 00000000 */ sll $zero,$zero,0x0 /* f0df76c: 54400034 */ bnezl $v0,.L0f0df840 /* f0df770: 9602001c */ lhu $v0,0x1c($s0) diff --git a/src/game/game_0f09f0.c b/src/game/game_0f09f0.c index b401b0eb9..43eca9c7d 100644 --- a/src/game/game_0f09f0.c +++ b/src/game/game_0f09f0.c @@ -9125,7 +9125,7 @@ void func0f0f85e0(struct menu_dialog *dialog, s32 root) } menuPushRootDialog(dialog, root); - setVar80084014(true); + soloSetPaused(true); g_Vars.currentplayer->pausemode = PAUSEMODE_3; } @@ -14292,7 +14292,7 @@ glabel func0f0fce8c /* f0fcf58: 00e02025 */ or $a0,$a3,$zero /* f0fcf5c: 0fc3e0cc */ jal menuPushRootDialog /* f0fcf60: 24050002 */ addiu $a1,$zero,0x2 -/* f0fcf64: 0fc5b350 */ jal setVar80084014 +/* f0fcf64: 0fc5b350 */ jal soloSetPaused /* f0fcf68: 24040001 */ addiu $a0,$zero,0x1 /* f0fcf6c: 3c06800a */ lui $a2,%hi(g_Vars) /* f0fcf70: 24c69fc0 */ addiu $a2,$a2,%lo(g_Vars) diff --git a/src/game/game_10ccd0.c b/src/game/game_10ccd0.c index 05f07a78d..6ba09a493 100644 --- a/src/game/game_10ccd0.c +++ b/src/game/game_10ccd0.c @@ -1926,7 +1926,7 @@ glabel func0f10e620 .L0f10ec84: /* f10ec84: 54610008 */ bnel $v1,$at,.L0f10eca8 /* f10ec88: 8fbf0014 */ lw $ra,0x14($sp) -/* f10ec8c: 0fc5b350 */ jal setVar80084014 +/* f10ec8c: 0fc5b350 */ jal soloSetPaused /* f10ec90: 24040001 */ addiu $a0,$zero,0x1 /* f10ec94: 3c18800a */ lui $t8,%hi(g_Vars+0x284) /* f10ec98: 8f18a244 */ lw $t8,%lo(g_Vars+0x284)($t8) @@ -1946,7 +1946,7 @@ glabel func0f10ecb4 /* f10ecbc: 27bdffe0 */ addiu $sp,$sp,-32 /* f10ecc0: afbf0014 */ sw $ra,0x14($sp) /* f10ecc4: 24040001 */ addiu $a0,$zero,0x1 -/* f10ecc8: 0fc5b350 */ jal setVar80084014 +/* f10ecc8: 0fc5b350 */ jal soloSetPaused /* f10eccc: afae001c */ sw $t6,0x1c($sp) /* f10ecd0: 3c04800a */ lui $a0,%hi(g_Vars) /* f10ecd4: 24849fc0 */ addiu $a0,$a0,%lo(g_Vars) @@ -2117,7 +2117,7 @@ glabel func0f10ef10 /* f10ef18: 27bdffe0 */ addiu $sp,$sp,-32 /* f10ef1c: afbf0014 */ sw $ra,0x14($sp) /* f10ef20: 24040001 */ addiu $a0,$zero,0x1 -/* f10ef24: 0fc5b350 */ jal setVar80084014 +/* f10ef24: 0fc5b350 */ jal soloSetPaused /* f10ef28: afae001c */ sw $t6,0x1c($sp) /* f10ef2c: 3c03800a */ lui $v1,%hi(g_Vars) /* f10ef30: 24639fc0 */ addiu $v1,$v1,%lo(g_Vars) diff --git a/src/game/game_167ae0.c b/src/game/game_167ae0.c index d4afb46c3..b184b1cdc 100644 --- a/src/game/game_167ae0.c +++ b/src/game/game_167ae0.c @@ -489,7 +489,7 @@ void func0f167e7c(s32 stagenum) func0f011124(false); var80084018 = 1; func00002560(); - setVar80084014(0); + soloSetPaused(0); #if PIRACYCHECKS { @@ -4367,7 +4367,7 @@ glabel func0f16b96c /* f16bb34: 5420ffde */ bnezl $at,.L0f16bab0 /* f16bb38: 8cce0064 */ lw $t6,0x64($a2) .L0f16bb3c: -/* f16bb3c: 0fc5b364 */ jal getVar80084014 +/* f16bb3c: 0fc5b364 */ jal soloIsPaused /* f16bb40: 00000000 */ sll $zero,$zero,0x0 /* f16bb44: 10400003 */ beqz $v0,.L0f16bb54 /* f16bb48: 00000000 */ sll $zero,$zero,0x0 @@ -5096,7 +5096,7 @@ glabel func0f16b96c /* f16c57c: 8e0d0000 */ lw $t5,0x0($s0) /* f16c580: 55a00019 */ bnezl $t5,.L0f16c5e8 /* f16c584: 8e8d0034 */ lw $t5,0x34($s4) -/* f16c588: 0fc5b364 */ jal getVar80084014 +/* f16c588: 0fc5b364 */ jal soloIsPaused /* f16c58c: 00000000 */ sll $zero,$zero,0x0 /* f16c590: 14400014 */ bnez $v0,.L0f16c5e4 /* f16c594: 3c0e8008 */ lui $t6,%hi(g_MpTimeLimit) @@ -5528,7 +5528,7 @@ glabel func0f16b96c // } // // // b3c -// if (getVar80084014()) { +// if (soloIsPaused()) { // g_Vars.lvupdate240 = 0; // } else if (mpIsPaused()) { // g_Vars.lvupdate240 = 0; @@ -5710,7 +5710,7 @@ glabel func0f16b96c // // Sound alarm at 10 seconds remaining // if (nexttime >= g_MpTimeLimit - 600 // && var80084034 == 0 -// && !getVar80084014() +// && !soloIsPaused() // && nexttime < g_MpTimeLimit) { // // 5dc // func00010718(&var80084034, 0, 0x7fff, 0x40, 163, 1, 1, -1, 1); @@ -5931,9 +5931,9 @@ void func0f16cce4(void) var80084010 = paused; } -void setVar80084014(bool value) +void soloSetPaused(bool paused) { - if (value) { + if (paused) { func0f11deb8(); func0000fe20(); } else { @@ -5941,10 +5941,10 @@ void setVar80084014(bool value) func0f11df38(); } - var80084014 = value; + var80084014 = paused; } -bool getVar80084014(void) +bool soloIsPaused(void) { return var80084014; } diff --git a/src/game/game_16cfa0.c b/src/game/game_16cfa0.c index 4cb943676..954f5b90b 100644 --- a/src/game/game_16cfa0.c +++ b/src/game/game_16cfa0.c @@ -573,7 +573,7 @@ glabel func0f16d6c0 /* f16d6dc: 1000006b */ beqz $zero,.L0f16d88c /* f16d6e0: 00001025 */ or $v0,$zero,$zero .L0f16d6e4: -/* f16d6e4: 0fc5b364 */ jal getVar80084014 +/* f16d6e4: 0fc5b364 */ jal soloIsPaused /* f16d6e8: 00000000 */ sll $zero,$zero,0x0 /* f16d6ec: 3c05800a */ lui $a1,%hi(g_Vars) /* f16d6f0: 10400003 */ beqz $v0,.L0f16d700 diff --git a/src/game/propobj.c b/src/game/propobj.c index f8cceeae3..8c804b705 100644 --- a/src/game/propobj.c +++ b/src/game/propobj.c @@ -9869,7 +9869,7 @@ glabel func0f06e87c /* f06e924: 3406ffff */ dli $a2,0xffff /* f06e928: 0fc249af */ jal func0f0926bc /* f06e92c: 8e040014 */ lw $a0,0x14($s0) -/* f06e930: 0fc5b364 */ jal getVar80084014 +/* f06e930: 0fc5b364 */ jal soloIsPaused /* f06e934: 00000000 */ sll $zero,$zero,0x0 /* f06e938: 1440001f */ bnez $v0,.L0f06e9b8 /* f06e93c: 3c01bf80 */ lui $at,0xbf80 @@ -22812,7 +22812,7 @@ glabel var7f1aa5a8 .text /* f079f1c: 27bdfe68 */ addiu $sp,$sp,-408 /* f079f20: afbf0044 */ sw $ra,0x44($sp) -/* f079f24: 0fc5b364 */ jal getVar80084014 +/* f079f24: 0fc5b364 */ jal soloIsPaused /* f079f28: afa40198 */ sw $a0,0x198($sp) /* f079f2c: 14400363 */ bnez $v0,.L0f07acbc /* f079f30: 8fae0198 */ lw $t6,0x198($sp) @@ -28729,7 +28729,7 @@ glabel var7f1aa6ec /* f07f29c: 24050001 */ addiu $a1,$zero,0x1 /* f07f2a0: 1580002a */ bnez $t4,.L0f07f34c /* f07f2a4: 00000000 */ sll $zero,$zero,0x0 -/* f07f2a8: 0fc5b364 */ jal getVar80084014 +/* f07f2a8: 0fc5b364 */ jal soloIsPaused /* f07f2ac: 00000000 */ sll $zero,$zero,0x0 /* f07f2b0: 54400037 */ bnezl $v0,.L0f07f390 /* f07f2b4: 92020003 */ lbu $v0,0x3($s0) @@ -37736,7 +37736,7 @@ bool currentPlayerTryMountHoverbike(struct prop *prop) thing -= func0f0720d8(obj); if (thing < 0) { - thing += M_TAU; + thing += M_BADTAU; } if ((thing > 0.3926365673542f && thing < 2.3558194637299f) @@ -48335,7 +48335,7 @@ glabel var7f1ab19c /* f090714: 8d089900 */ lw $t0,%lo(var80069900)($t0) /* f090718: 15000016 */ bnez $t0,.L0f090774 /* f09071c: 00000000 */ sll $zero,$zero,0x0 -/* f090720: 0fc5b364 */ jal getVar80084014 +/* f090720: 0fc5b364 */ jal soloIsPaused /* f090724: 00000000 */ sll $zero,$zero,0x0 /* f090728: 14400012 */ bnez $v0,.L0f090774 /* f09072c: 24090037 */ addiu $t1,$zero,0x37 @@ -48877,7 +48877,7 @@ glabel var7f1ab208 .L0f090e24: /* f090e24: 240500a3 */ addiu $a1,$zero,0xa3 .L0f090e28: -/* f090e28: 0fc5b364 */ jal getVar80084014 +/* f090e28: 0fc5b364 */ jal soloIsPaused /* f090e2c: a7a50036 */ sh $a1,0x36($sp) /* f090e30: 14400057 */ bnez $v0,.L0f090f90 /* f090e34: 87a50036 */ lh $a1,0x36($sp) @@ -49233,7 +49233,7 @@ glabel var7f1ab214 /* f0912e4: afa40200 */ sw $a0,0x200($sp) /* f0912e8: afa50204 */ sw $a1,0x204($sp) /* f0912ec: afa60208 */ sw $a2,0x208($sp) -/* f0912f0: 0fc5b364 */ jal getVar80084014 +/* f0912f0: 0fc5b364 */ jal soloIsPaused /* f0912f4: afa7020c */ sw $a3,0x20c($sp) /* f0912f8: 1440029e */ bnez $v0,.L0f091d74 /* f0912fc: 8fa30208 */ lw $v1,0x208($sp) diff --git a/src/game/weather.c b/src/game/weather.c index 208ae34d0..10592b7e2 100644 --- a/src/game/weather.c +++ b/src/game/weather.c @@ -27,22 +27,6 @@ #include "lib/lib_4b480.h" #include "types.h" -const char var7f1b5620[] = "rainspeedxtra"; -const char var7f1b5630[] = "snowspeed"; -const char var7f1b563c[] = "snowspeedxtra"; -const char var7f1b564c[] = "raincol1"; -const char var7f1b5658[] = "raincol2"; -const char var7f1b5664[] = "rainwidth"; -const char var7f1b5670[] = "rainout"; -const char var7f1b5678[] = "cddiv"; -const char var7f1b5680[] = "wetclip"; -const char var7f1b5688[] = "bounder"; -const char var7f1b5690[] = "trypitch"; -const char var7f1b569c[] = "snowwidth"; -const char var7f1b56a8[] = "snowheight"; -const char var7f1b56b4[] = "snowcol1"; -const char var7f1b56c0[] = "snowcol2"; - GLOBAL_ASM( glabel weatherRender /* f131060: 3c058008 */ lui $a1,%hi(g_WeatherData) @@ -214,11 +198,11 @@ glabel weatherRender /* f1312d4: 00000000 */ sll $zero,$zero,0x0 ); -void func0f1312d8(struct weatherparticledata *data, s32 index, f32 min, f32 max) +void weatherSetBoundaries(struct weatherparticledata *data, s32 index, f32 min, f32 max) { - data->unk3e98[index] = min; - data->unk3e8c[index] = max; - data->unk3ea4[index] = ABS(min) + ABS(max); + ((f32 *)(&data->boundarymin))[index] = min; + ((f32 *)(&data->boundarymax))[index] = max; + ((f32 *)(&data->boundaryrange))[index] = ABS(min) + ABS(max); } struct weatherparticledata *weatherAllocateParticles(void) @@ -230,15 +214,15 @@ struct weatherparticledata *weatherAllocateParticles(void) data->unk3e84 = 0; data->unk3e88 = 0; - func0f1312d8(data, 0, -800, 800); + weatherSetBoundaries(data, 0, -800, 800); if (g_StageIndex == STAGEINDEX_CRASHSITE) { - func0f1312d8(data, 1, -500, 500); + weatherSetBoundaries(data, 1, -500, 500); } else { - func0f1312d8(data, 1, -800, 800); + weatherSetBoundaries(data, 1, -800, 800); } - func0f1312d8(data, 2, -800, 800); + weatherSetBoundaries(data, 2, -800, 800); i = 0; @@ -248,13 +232,13 @@ struct weatherparticledata *weatherAllocateParticles(void) for (i = 0; i != ARRAYCOUNT(g_WeatherData->particledata->particles); i++) { struct weatherparticle *particle = &data->particles[i]; - particle->unk00.x = random() * (1.0f / U32_MAX) * 1600 - 800; - particle->unk00.y = random() * (1.0f / U32_MAX) * 1600 - 800; - particle->unk00.z = random() * (1.0f / U32_MAX) * 1600 - 800; + particle->pos.x = random() * (1.0f / U32_MAX) * 1600 - 800; + particle->pos.y = random() * (1.0f / U32_MAX) * 1600 - 800; + particle->pos.z = random() * (1.0f / U32_MAX) * 1600 - 800; - particle->unk10.x = random() * (1.0f / U32_MAX) * 10 - 5; - particle->unk10.y = -10 - random() * (1.0f / U32_MAX) * 40; - particle->unk10.z = random() * (1.0f / U32_MAX) * 10 - 5; + particle->inc.x = random() * (1.0f / U32_MAX) * 10 - 5; + particle->inc.y = -10 - random() * (1.0f / U32_MAX) * 40; + particle->inc.z = random() * (1.0f / U32_MAX) * 10 - 5; particle->unk1c = random() * (1.0f / U32_MAX) + 0.7f; @@ -425,7 +409,7 @@ glabel var7f1b56f4 /* f131a40: afb60058 */ sw $s6,0x58($sp) /* f131a44: afb50054 */ sw $s5,0x54($sp) /* f131a48: 3c047f1b */ lui $a0,%hi(var7f1b5620) -/* f131a4c: 3c058008 */ lui $a1,%hi(var8007f0d4) +/* f131a4c: 3c058008 */ lui $a1,%hi(g_RainSpeedExtra) /* f131a50: 0000b025 */ or $s6,$zero,$zero /* f131a54: afb40050 */ sw $s4,0x50($sp) /* f131a58: afb3004c */ sw $s3,0x4c($sp) @@ -434,7 +418,7 @@ glabel var7f1b56f4 /* f131a64: f7b60038 */ sdc1 $f22,0x38($sp) /* f131a68: f7b40030 */ sdc1 $f20,0x30($sp) /* f131a6c: 0000a825 */ or $s5,$zero,$zero -/* f131a70: 24a5f0d4 */ addiu $a1,$a1,%lo(var8007f0d4) +/* f131a70: 24a5f0d4 */ addiu $a1,$a1,%lo(g_RainSpeedExtra) /* f131a74: 0c0036cc */ jal func0000db30 /* f131a78: 24845620 */ addiu $a0,$a0,%lo(var7f1b5620) /* f131a7c: 8e420090 */ lw $v0,0x90($s2) @@ -517,7 +501,7 @@ glabel var7f1b56f4 /* f131b9c: 46083282 */ mul.s $f10,$f6,$f8 /* f131ba0: 4600540d */ trunc.w.s $f16,$f10 /* f131ba4: 44118000 */ mfc1 $s1,$f16 -/* f131ba8: 0fc5b364 */ jal getVar80084014 +/* f131ba8: 0fc5b364 */ jal soloIsPaused /* f131bac: 00000000 */ sll $zero,$zero,0x0 /* f131bb0: 10400002 */ beqz $v0,.L0f131bbc /* f131bb4: 00000000 */ sll $zero,$zero,0x0 @@ -848,7 +832,7 @@ glabel var7f1b56f4 /* f132068: 0c004b70 */ jal random /* f13206c: e608001c */ swc1 $f8,0x1c($s0) /* f132070: 44828000 */ mtc1 $v0,$f16 -/* f132074: 3c0a8008 */ lui $t2,%hi(var8007f0d4) +/* f132074: 3c0a8008 */ lui $t2,%hi(g_RainSpeedExtra) /* f132078: 04410005 */ bgez $v0,.L0f132090 /* f13207c: 468081a0 */ cvt.s.w $f6,$f16 /* f132080: 3c014f80 */ lui $at,0x4f80 @@ -856,7 +840,7 @@ glabel var7f1b56f4 /* f132088: 00000000 */ sll $zero,$zero,0x0 /* f13208c: 46123180 */ add.s $f6,$f6,$f18 .L0f132090: -/* f132090: 8d4af0d4 */ lw $t2,%lo(var8007f0d4)($t2) +/* f132090: 8d4af0d4 */ lw $t2,%lo(g_RainSpeedExtra)($t2) /* f132094: 46143102 */ mul.s $f4,$f6,$f20 /* f132098: 3c014f80 */ lui $at,0x4f80 /* f13209c: 448a5000 */ mtc1 $t2,$f10 @@ -944,6 +928,179 @@ glabel var7f1b56f4 /* f1321cc: 27bd00b8 */ addiu $sp,$sp,0xb8 ); +const char var7f1b5620[] = "rainspeedxtra"; + +// Mismatch because goal initialises $s6 earlier +//void weatherTickRain(struct weatherdata *weather) +//{ +// s32 lVar6 = 0; // $s6 +// s32 iVar5 = 0; +// struct weatherparticledata *data; +// s32 i; +// s32 iVar10; +// f32 rand; +// s32 lvupdate; +// +// func0000db30("rainspeedxtra", &g_RainSpeedExtra); +// +// if (weather->unk90 > 0) { +// weather->unk88 += (weather->unk8c - weather->unk88) / weather->unk90; +// } +// +// weather->unk90--; +// +// if (weather->unk58[0].unk08 > 0) { +// weather->unk58[0].unk00 += (weather->unk58[0].unk04 - weather->unk58[0].unk00) / weather->unk58[0].unk08; +// weather->unk58[0].unk08--; +// } +// +// if (weather->unk58[1].unk08 > 0) { +// weather->unk58[1].unk00 += (weather->unk58[1].unk04 - weather->unk58[1].unk00) / weather->unk58[1].unk08; +// weather->unk58[1].unk08--; +// } +// +// if (weather->unk58[2].unk08 > 0) { +// weather->unk58[2].unk00 += (weather->unk58[2].unk04 - weather->unk58[2].unk00) / weather->unk58[2].unk08; +// weather->unk58[2].unk08--; +// } +// +// // Rain noise +// for (i = 0; i != 4; i++) { +// s32 sounds[4] = var8007f0c4; +// +// iVar10 = weather->unk58[i].unk00 * 32767.0f * weather->unk88; +// +// if (soloIsPaused()) { +// iVar10 = 0; +// } +// +// if (iVar10 > 0) { +// if (weather->unk34[i] == 0 && sounds[i] >= 0) { +// weather->unkf8 = sounds[i]; +// func00010904(var80095200, weather->unkf8, &weather->unk34[i], -1, +// -1, -1, -1, -1); +// } +// +// if (weather->unk34[i] != 0) { +// if (func000337f0(weather->unk34[i])) { +// func000104a0(&weather->unk34[i], 0, iVar10 * 3 / 4, -1, +// weather->unkf8, 1, 1, -1, 1); +// } +// } +// } else { +// if (weather->unk34[i] != 0) { +// func00033b24(weather->unk34[i]); +// } +// } +// } +// +// if (weather->unkc0 > 0) { +// lvupdate = g_Vars.lvupdate240_60; +// +// if (weather->unkc0 < lvupdate) { +// weather->unkb8 = weather->unkbc; +// } else { +// weather->unkb8 += lvupdate * ((weather->unkbc - weather->unkb8) / weather->unkc0); +// weather->unkc0 -= lvupdate; +// } +// } +// +// if (g_StageIndex == STAGEINDEX_AIRBASE) { +// // Force weather direction - but Air Base doesn't use rain... +// weather->windanglerad = 1.5707963705063f; +// weather->windspeedz = -weather->windspeed; +// weather->windspeedx = 0; +// } else if (weather->unk10 > 0) { +// s32 lvupdate = g_Vars.lvupdate240_60; +// +// if (weather->unk10 < lvupdate) { +// weather->windanglerad = weather->unk0c; +// } else { +// weather->windanglerad += lvupdate * ((weather->unk0c - weather->windanglerad) / weather->unk10); +// weather->unk10 -= lvupdate; +// } +// +// if (weather->windanglerad > M_TAU) { +// weather->windanglerad = 0; +// } +// +// weather->windspeedx = cosf(weather->windanglerad) * weather->windspeed; +// weather->windspeedz = sinf(weather->windanglerad) * weather->windspeed; +// lVar6 = 1; +// } else if (random() * (1.0f / U32_MAX) > 0.99f) { +// rand = random() * (1.0f / U32_MAX); +// +// weather->unk0c = (rand + rand) * M_PI; +// weather->unk10 = (weather->unk0c - weather->windanglerad) / 0.01f; +// +// if (weather->unk10 < 0) { +// weather->unk10 = -weather->unk10; +// } +// } +// +// data = g_WeatherData->particledata; +// +// for (i = 0; i != ARRAYCOUNT(data->particles); i++) { +// struct weatherparticle *particle = &data->particles[i]; +// +// particle->pos.x += particle->inc.x * g_Vars.lvupdate240f; +// particle->pos.y += particle->inc.y * g_Vars.lvupdate240f; +// particle->pos.z += particle->inc.z * g_Vars.lvupdate240f; +// +// if (particle->pos.y < data->boundarymin.y) { +// lVar6 = 2; +// +// // Reset particle +// particle->pos.x = data->boundarymin.x + (random() * (1.0f / U32_MAX)) * (ABS(data->boundarymin.x) + ABS(data->boundarymax.x)); +// particle->pos.z = data->boundarymin.z + (random() * (1.0f / U32_MAX)) * (ABS(data->boundarymin.z) + ABS(data->boundarymax.z)); +// +// particle->unk1c = random() * (1.0f / U32_MAX) + 0.7f; +// +// particle->inc.y = -(random() * (1.0f / U32_MAX) * g_RainSpeedExtra + weather->unkc8); +// +// if (ABS(iVar5) < 2 && weather->unkd0 != weather->unkd4) { +// if (weather->unkd0 < weather->unkd4) { +// if ((particle->active & 3) == 0) { +// particle->active = true; +// iVar5++; +// weather->unkd0++; +// } +// } else { +// if (particle->active & 3) { +// particle->active = false; +// iVar5--; +// weather->unkd0--; +// } +// } +// } +// } +// +// if (lVar6 > 0) { +// particle->inc.x = weather->windspeedx * particle->unk1c; +// particle->inc.z = weather->windspeedz * particle->unk1c; +// } +// } +// +// if (weather->intensity == 0 && weather->unkd0 < 100) { +// func0f131678(3); +// } +//} + +const char var7f1b5630[] = "snowspeed"; +const char var7f1b563c[] = "snowspeedxtra"; +const char var7f1b564c[] = "raincol1"; +const char var7f1b5658[] = "raincol2"; +const char var7f1b5664[] = "rainwidth"; +const char var7f1b5670[] = "rainout"; +const char var7f1b5678[] = "cddiv"; +const char var7f1b5680[] = "wetclip"; +const char var7f1b5688[] = "bounder"; +const char var7f1b5690[] = "trypitch"; +const char var7f1b569c[] = "snowwidth"; +const char var7f1b56a8[] = "snowheight"; +const char var7f1b56b4[] = "snowcol1"; +const char var7f1b56c0[] = "snowcol2"; + GLOBAL_ASM( glabel weatherTickSnow .late_rodata @@ -4851,20 +5008,20 @@ glabel var7f1b5790 void weatherFree(void) { if (g_WeatherData) { - if (g_WeatherData->unk34) { - func00033b24(g_WeatherData->unk34); + if (g_WeatherData->unk34[0]) { + func00033b24(g_WeatherData->unk34[0]); } - if (g_WeatherData->unk38) { - func00033b24(g_WeatherData->unk38); + if (g_WeatherData->unk34[1]) { + func00033b24(g_WeatherData->unk34[1]); } - if (g_WeatherData->unk3c) { - func00033b24(g_WeatherData->unk3c); + if (g_WeatherData->unk34[2]) { + func00033b24(g_WeatherData->unk34[2]); } - if (g_WeatherData->unk40) { - func00033b24(g_WeatherData->unk40); + if (g_WeatherData->unk34[3]) { + func00033b24(g_WeatherData->unk34[3]); } g_WeatherData = NULL; diff --git a/src/game/weatherallocate.c b/src/game/weatherallocate.c index 690239f1c..a6ca49fed 100644 --- a/src/game/weatherallocate.c +++ b/src/game/weatherallocate.c @@ -26,7 +26,7 @@ void weatherAllocate(void) g_WeatherData = malloc(sizeof(struct weatherdata), 4); g_WeatherData->particledata = weatherAllocateParticles(); g_WeatherData->type = -1; - g_WeatherData->unk08 = 0; + g_WeatherData->windanglerad = 0; g_WeatherData->unk0c = 0; g_WeatherData->unk10 = 1; @@ -38,10 +38,10 @@ void weatherAllocate(void) g_WeatherData->windspeed = 5; } - g_WeatherData->unk34 = 0; - g_WeatherData->unk38 = 0; - g_WeatherData->unk3c = 0; - g_WeatherData->unk40 = 0; + g_WeatherData->unk34[0] = 0; + g_WeatherData->unk34[1] = 0; + g_WeatherData->unk34[2] = 0; + g_WeatherData->unk34[3] = 0; g_WeatherData->unk44 = 0; g_WeatherData->unk94 = -1; g_WeatherData->unk48 = 1; diff --git a/src/include/game/data/data_0083d0.h b/src/include/game/data/data_0083d0.h index 75d9bfdca..81bd686a6 100644 --- a/src/include/game/data/data_0083d0.h +++ b/src/include/game/data/data_0083d0.h @@ -4,7 +4,7 @@ #include "types.h" extern u32 var800623b0; -extern bool g_WeatherEnabled; +extern s32 g_WeatherEnabled; 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 bc02626a7..73da7230a 100644 --- a/src/include/game/data/data_020df0.h +++ b/src/include/game/data/data_020df0.h @@ -134,8 +134,8 @@ extern struct smoketype g_SmokeTypes[NUM_SMOKETYPES]; extern u32 sparktable[]; extern u32 var8007f0b8; extern struct weatherdata *g_WeatherData; -extern u32 var8007f0c4; -extern u32 var8007f0d4; +extern s32 var8007f0c4[4]; +extern u32 g_RainSpeedExtra; extern u32 var8007f0d8; extern u32 var8007f0dc; extern u32 var8007f0e0; diff --git a/src/include/game/game_167ae0.h b/src/include/game/game_167ae0.h index 514dd7df3..421c9704b 100644 --- a/src/include/game/game_167ae0.h +++ b/src/include/game/game_167ae0.h @@ -24,11 +24,11 @@ s32 getEffectiveSlowMotion(void); void func0f16b96c(void); void currentPlayerRecordDistanceMoved(void); void func0f16cce4(void); -void setVar80084014(bool arg0); +void soloSetPaused(bool paused); void fadeConfigure(u32 color, s16 num_frames); bool fadeIsActive(void); void stageLoad(void); -bool getVar80084014(void); +bool soloIsPaused(void); s32 getDifficulty(void); void setDifficulty(s32 difficulty); void mpSetTimeLimit(u32 limit); diff --git a/src/include/game/weather.h b/src/include/game/weather.h index 92b956718..4f7b00b1c 100644 --- a/src/include/game/weather.h +++ b/src/include/game/weather.h @@ -4,7 +4,7 @@ #include "types.h" u32 weatherRender(void); -void func0f1312d8(struct weatherparticledata *data, s32 index, f32 min, f32 max); +void weatherSetBoundaries(struct weatherparticledata *data, s32 index, f32 min, f32 max); struct weatherparticledata *weatherAllocateParticles(void); void func0f131610(struct weatherdata *weather); void func0f131678(s32 arg0); diff --git a/src/include/lib/lib_0e9d0.h b/src/include/lib/lib_0e9d0.h index 7857da2da..056d6794f 100644 --- a/src/include/lib/lib_0e9d0.h +++ b/src/include/lib/lib_0e9d0.h @@ -31,9 +31,9 @@ void func0000fe50(void); void func0000fe88(void); u32 func00010360(void); u32 func0001036c(void); -u32 func000104a0(void); +void func000104a0(s32 *arg0, u32 arg1, u32 arg2, s32 arg3, s16 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, s16 arg1, s32 arg2, s32 arg3, s32 arg4, f32 arg5, s32 arg6, s32 arg7); +s32 func00010904(s32 arg0, s16 arg1, s32 *arg2, s32 arg3, s32 arg4, f32 arg5, s32 arg6, s32 arg7); u32 func00010ae4(void); void func00010db0(s32 room_id); void func00010de0(s32 room_id); diff --git a/src/include/lib/lib_317f0.h b/src/include/lib/lib_317f0.h index e045de781..4bc206043 100644 --- a/src/include/lib/lib_317f0.h +++ b/src/include/lib/lib_317f0.h @@ -15,7 +15,7 @@ u32 func00033634(void); u32 func0003364c(void); u32 func000337f0(s32 arg0); u32 func00033820(void); -void func00033b24(u32 arg0); +void func00033b24(s32 arg0); u32 func00033bc0(void); u32 func00033c30(void); u32 func00033cf0(void); diff --git a/src/include/math.h b/src/include/math.h index 866f3b9fe..f8471254f 100644 --- a/src/include/math.h +++ b/src/include/math.h @@ -5,6 +5,7 @@ #define M_BADPI 3.141092641f #define M_PI 3.141592741f -#define M_TAU (M_BADPI * 2) +#define M_BADTAU (M_BADPI * 2) +#define M_TAU (M_PI * 2) #endif diff --git a/src/include/types.h b/src/include/types.h index dd3aee26c..0c78db247 100644 --- a/src/include/types.h +++ b/src/include/types.h @@ -5787,11 +5787,11 @@ struct weather58 { }; struct weatherdata { - /*0x00*/ u32 unk00; - /*0x04*/ u32 unk04; - /*0x08*/ f32 unk08; + /*0x00*/ f32 windspeedx; + /*0x04*/ f32 windspeedz; + /*0x08*/ f32 windanglerad; /*0x0c*/ f32 unk0c; - /*0x10*/ u32 unk10; + /*0x10*/ s32 unk10; /*0x14*/ f32 windspeed; /*0x18*/ u32 unk18; /*0x1c*/ u32 unk1c; @@ -5800,22 +5800,16 @@ struct weatherdata { /*0x28*/ u32 unk28; /*0x2c*/ u32 unk2c; /*0x30*/ u32 unk30; - /*0x34*/ u32 unk34; - /*0x38*/ u32 unk38; - /*0x3c*/ u32 unk3c; - /*0x40*/ u32 unk40; - /*0x44*/ u32 unk44; - /*0x48*/ u32 unk48; - /*0x4c*/ u32 unk4c; - /*0x50*/ u32 unk50; - /*0x54*/ u32 unk54; - /*0x58*/ struct weather58 unk58[3]; - /*0x7c*/ f32 unk7c; - /*0x80*/ u32 unk80; - /*0x84*/ u32 unk84; + /*0x34*/ s32 unk34[4]; + /*0x44*/ s32 unk44; + /*0x48*/ s32 unk48; + /*0x4c*/ s32 unk4c; + /*0x50*/ s32 unk50; + /*0x54*/ s32 unk54; + /*0x58*/ struct weather58 unk58[4]; /*0x88*/ f32 unk88; - /*0x8c*/ u32 unk8c; - /*0x90*/ u32 unk90; + /*0x8c*/ f32 unk8c; + /*0x90*/ s32 unk90; /*0x94*/ s32 unk94; /*0x98*/ u32 unk98; /*0x9c*/ u32 unk9c; @@ -5831,8 +5825,8 @@ struct weatherdata { /*0xc4*/ f32 unkc4; /*0xc8*/ f32 unkc8; /*0xcc*/ s32 intensity; - /*0xd0*/ u32 unkd0; - /*0xd4*/ u32 unkd4; + /*0xd0*/ s32 unkd0; + /*0xd4*/ s32 unkd4; /*0xd8*/ u32 unkd8; /*0xdc*/ u32 unkdc; /*0xe0*/ u32 unke0; @@ -5841,14 +5835,14 @@ struct weatherdata { /*0xec*/ u32 unkec; /*0xf0*/ u32 unkf0; /*0xf4*/ u32 unkf4; - /*0xf8*/ u32 unkf8; + /*0xf8*/ s16 unkf8; /*0xfc*/ u32 unkfc; }; struct weatherparticle { - struct coord unk00; + struct coord pos; s32 active; - struct coord unk10; + struct coord inc; f32 unk1c; }; @@ -5857,9 +5851,9 @@ struct weatherparticledata { /*0x3e80*/ f32 unk3e80; /*0x3e84*/ f32 unk3e84; /*0x3e88*/ f32 unk3e88; - /*0x3e8c*/ f32 unk3e8c[3]; - /*0x3e98*/ f32 unk3e98[3]; - /*0x3ea4*/ f32 unk3ea4[3]; + /*0x3e8c*/ struct coord boundarymax; + /*0x3e98*/ struct coord boundarymin; + /*0x3ea4*/ struct coord boundaryrange; /*0x3eb0*/ u32 unk3eb0; /*0x3eb4*/ u32 unk3eb4; /*0x3eb8*/ u32 unk3eb8; diff --git a/src/lib/lib_0e9d0.c b/src/lib/lib_0e9d0.c index 0319f733d..b7087339e 100644 --- a/src/lib/lib_0e9d0.c +++ b/src/lib/lib_0e9d0.c @@ -2741,7 +2741,7 @@ glabel func00010e10 /* 10e7c: 8c460000 */ lw $a2,0x0($v0) /* 10e80: c4323c84 */ lwc1 $f18,%lo(var70053c84)($at) /* 10e84: 46120000 */ add.s $f0,$f0,$f18 -/* 10e88: 0fc5b364 */ jal getVar80084014 +/* 10e88: 0fc5b364 */ jal soloIsPaused /* 10e8c: e7a00034 */ swc1 $f0,0x34($sp) /* 10e90: 3c08800a */ lui $t0,%hi(g_Vars) /* 10e94: 25089fc0 */ addiu $t0,$t0,%lo(g_Vars) @@ -2980,7 +2980,7 @@ glabel func0001111c /* 111d8: 46128102 */ mul.s $f4,$f16,$f18 /* 111dc: 460c2000 */ add.s $f0,$f4,$f12 .L000111e0: -/* 111e0: 0fc5b364 */ jal getVar80084014 +/* 111e0: 0fc5b364 */ jal soloIsPaused /* 111e4: e7a00034 */ swc1 $f0,0x34($sp) /* 111e8: 3c08800a */ lui $t0,%hi(g_Vars) /* 111ec: 25089fc0 */ addiu $t0,$t0,%lo(g_Vars)