diff --git a/src/game/bondbike.c b/src/game/bondbike.c index dceaf1d9c..21c144350 100644 --- a/src/game/bondbike.c +++ b/src/game/bondbike.c @@ -67,7 +67,7 @@ void currentPlayerBikeInit(void) g_Vars.currentplayer->bondmovemode = MOVEMODE_BIKE; g_Vars.currentplayer->unk1a7c = 0; - g_Vars.currentplayer->unk1968 = 0; + g_Vars.currentplayer->guncloseroffset = 0; g_Vars.currentplayer->gunextraaimx = 0; g_Vars.currentplayer->gunextraaimy = 0; diff --git a/src/game/bondgrab.c b/src/game/bondgrab.c index 689035767..bffe0b075 100644 --- a/src/game/bondgrab.c +++ b/src/game/bondgrab.c @@ -56,7 +56,7 @@ void currentPlayerGrabInit(void) g_Vars.currentplayer->grabbedposextrasum.x = 0; g_Vars.currentplayer->grabbedposextrasum.y = 0; g_Vars.currentplayer->grabbedposextrasum.z = 0; - g_Vars.currentplayer->unk1968 = 0; + g_Vars.currentplayer->guncloseroffset = 0; g_Vars.currentplayer->gunextraaimx = 0; g_Vars.currentplayer->gunextraaimy = 0; @@ -122,7 +122,7 @@ void currentPlayerGrabInit(void) g_Vars.currentplayer->speedsideways = 0; g_Vars.currentplayer->speedstrafe = 0; - g_Vars.currentplayer->unk19a4 = 0; + g_Vars.currentplayer->speedgo = 0; g_Vars.currentplayer->speedboost = 1; g_Vars.currentplayer->speedmaxtime60 = 0; g_Vars.currentplayer->speedforwards = 0; @@ -2005,23 +2005,23 @@ glabel func0f0ce4a0 /* f0ce558: e4400168 */ swc1 $f0,0x168($v0) ); -void func0f0ce55c(f32 target, f32 speed) +void currentPlayerUpdateSpeedForwardsGrab(f32 target, f32 speed) { - if (target > g_Vars.currentplayer->unk19a4) { - g_Vars.currentplayer->unk19a4 += speed * g_Vars.lvupdate240freal; + if (g_Vars.currentplayer->speedgo < target) { + g_Vars.currentplayer->speedgo += speed * g_Vars.lvupdate240freal; - if (g_Vars.currentplayer->unk19a4 > target) { - g_Vars.currentplayer->unk19a4 = target; + if (g_Vars.currentplayer->speedgo > target) { + g_Vars.currentplayer->speedgo = target; } - } else if (target < g_Vars.currentplayer->unk19a4) { - g_Vars.currentplayer->unk19a4 -= speed * g_Vars.lvupdate240freal; + } else if (g_Vars.currentplayer->speedgo > target) { + g_Vars.currentplayer->speedgo -= speed * g_Vars.lvupdate240freal; - if (g_Vars.currentplayer->unk19a4 < target) { - g_Vars.currentplayer->unk19a4 = target; + if (g_Vars.currentplayer->speedgo < target) { + g_Vars.currentplayer->speedgo = target; } } - g_Vars.currentplayer->speedforwards = g_Vars.currentplayer->unk19a4; + g_Vars.currentplayer->speedforwards = g_Vars.currentplayer->speedgo; } GLOBAL_ASM( @@ -2108,7 +2108,7 @@ glabel var7f1ada0c /* f0ce6d4: 8e090024 */ lw $t1,0x24($s0) /* f0ce6d8: 44816000 */ mtc1 $at,$f12 /* f0ce6dc: 3c017f1b */ lui $at,%hi(var7f1ad9f8) -/* f0ce6e0: 0fc33957 */ jal func0f0ce55c +/* f0ce6e0: 0fc33957 */ jal currentPlayerUpdateSpeedForwardsGrab /* f0ce6e4: c42ed9f8 */ lwc1 $f14,%lo(var7f1ad9f8)($at) /* f0ce6e8: 3c04800a */ lui $a0,%hi(g_Vars) /* f0ce6ec: 24849fc0 */ addiu $a0,$a0,%lo(g_Vars) @@ -2125,7 +2125,7 @@ glabel var7f1ada0c /* f0ce714: 3c01bf80 */ lui $at,0xbf80 /* f0ce718: 44816000 */ mtc1 $at,$f12 /* f0ce71c: 3c017f1b */ lui $at,%hi(var7f1ad9fc) -/* f0ce720: 0fc33957 */ jal func0f0ce55c +/* f0ce720: 0fc33957 */ jal currentPlayerUpdateSpeedForwardsGrab /* f0ce724: c42ed9fc */ lwc1 $f14,%lo(var7f1ad9fc)($at) /* f0ce728: 10000009 */ beqz $zero,.L0f0ce750 /* f0ce72c: 8e030010 */ lw $v1,0x10($s0) @@ -2135,7 +2135,7 @@ glabel var7f1ada0c /* f0ce738: 14600005 */ bnez $v1,.L0f0ce750 /* f0ce73c: 00000000 */ sll $zero,$zero,0x0 /* f0ce740: 44806000 */ mtc1 $zero,$f12 -/* f0ce744: 0fc33957 */ jal func0f0ce55c +/* f0ce744: 0fc33957 */ jal currentPlayerUpdateSpeedForwardsGrab /* f0ce748: c42eda00 */ lwc1 $f14,%lo(var7f1ada00)($at) /* f0ce74c: 8e030010 */ lw $v1,0x10($s0) .L0f0ce750: @@ -2150,7 +2150,7 @@ glabel var7f1ada0c /* f0ce770: c42eda08 */ lwc1 $f14,%lo(var7f1ada08)($at) /* f0ce774: 46805420 */ cvt.s.w $f16,$f10 /* f0ce778: 46128302 */ mul.s $f12,$f16,$f18 -/* f0ce77c: 0fc33957 */ jal func0f0ce55c +/* f0ce77c: 0fc33957 */ jal currentPlayerUpdateSpeedForwardsGrab /* f0ce780: 00000000 */ sll $zero,$zero,0x0 /* f0ce784: 8e0b00a8 */ lw $t3,0xa8($s0) /* f0ce788: 3c02800a */ lui $v0,0x800a diff --git a/src/game/bondwalk.c b/src/game/bondwalk.c index bb19194d3..a747eef2f 100644 --- a/src/game/bondwalk.c +++ b/src/game/bondwalk.c @@ -71,7 +71,7 @@ void currentPlayerWalkInit(void) g_Vars.currentplayer->autocrouchpos = CROUCH_STAND; g_Vars.currentplayer->crouchspeed = 0; g_Vars.currentplayer->crouchoffset = 0; - g_Vars.currentplayer->unk1968 = 0; + g_Vars.currentplayer->guncloseroffset = 0; } func0f0c6080(); @@ -83,7 +83,7 @@ void currentPlayerWalkInit(void) g_Vars.currentplayer->speedsideways = 0; g_Vars.currentplayer->speedstrafe = 0; - g_Vars.currentplayer->unk19a4 = 0; + g_Vars.currentplayer->speedgo = 0; g_Vars.currentplayer->speedboost = 1; g_Vars.currentplayer->speedmaxtime60 = 0; g_Vars.currentplayer->speedforwards = 0; @@ -1290,7 +1290,7 @@ void func0f0c4d98(void) // empty } -void currentPlayerUpdateSpeedStrafe(f32 targetspeed, f32 accelspeed, s32 mult) +void currentPlayerUpdateSpeedSidewaysWalk(f32 targetspeed, f32 accelspeed, s32 mult) { if (g_Vars.normmplayerisrunning) { targetspeed = (g_MpPlayers[g_Vars.unk000288->mpchrnum].base.unk1c + 25.0f) / 100 * targetspeed; @@ -1313,82 +1313,28 @@ void currentPlayerUpdateSpeedStrafe(f32 targetspeed, f32 accelspeed, s32 mult) g_Vars.currentplayer->speedsideways = g_Vars.currentplayer->speedstrafe; } -GLOBAL_ASM( -glabel func0f0c4ec4 -/* f0c4ec4: 3c03800a */ lui $v1,%hi(g_Vars) -/* f0c4ec8: 24639fc0 */ addiu $v1,$v1,%lo(g_Vars) -/* f0c4ecc: 8c6e0318 */ lw $t6,0x318($v1) -/* f0c4ed0: 51c00019 */ beqzl $t6,.L0f0c4f38 -/* f0c4ed4: 8c620284 */ lw $v0,0x284($v1) -/* f0c4ed8: 8c6f0288 */ lw $t7,0x288($v1) -/* f0c4edc: 3c08800b */ lui $t0,0x800b -/* f0c4ee0: 3c014f80 */ lui $at,0x4f80 -/* f0c4ee4: 8df80070 */ lw $t8,0x70($t7) -/* f0c4ee8: 0018c880 */ sll $t9,$t8,0x2 -/* f0c4eec: 0338c821 */ addu $t9,$t9,$t8 -/* f0c4ef0: 0019c940 */ sll $t9,$t9,0x5 -/* f0c4ef4: 01194021 */ addu $t0,$t0,$t9 -/* f0c4ef8: 9508c7d4 */ lhu $t0,-0x382c($t0) -/* f0c4efc: 44882000 */ mtc1 $t0,$f4 -/* f0c4f00: 05010004 */ bgez $t0,.L0f0c4f14 -/* f0c4f04: 468021a0 */ cvt.s.w $f6,$f4 -/* f0c4f08: 44814000 */ mtc1 $at,$f8 -/* f0c4f0c: 00000000 */ sll $zero,$zero,0x0 -/* f0c4f10: 46083180 */ add.s $f6,$f6,$f8 -.L0f0c4f14: -/* f0c4f14: 3c0141c8 */ lui $at,0x41c8 -/* f0c4f18: 44815000 */ mtc1 $at,$f10 -/* f0c4f1c: 3c0142c8 */ lui $at,0x42c8 -/* f0c4f20: 44819000 */ mtc1 $at,$f18 -/* f0c4f24: 460a3400 */ add.s $f16,$f6,$f10 -/* f0c4f28: 46128103 */ div.s $f4,$f16,$f18 -/* f0c4f2c: 460c2302 */ mul.s $f12,$f4,$f12 -/* f0c4f30: 00000000 */ sll $zero,$zero,0x0 -/* f0c4f34: 8c620284 */ lw $v0,0x284($v1) -.L0f0c4f38: -/* f0c4f38: c44019a4 */ lwc1 $f0,0x19a4($v0) -/* f0c4f3c: 460c003c */ c.lt.s $f0,$f12 -/* f0c4f40: 00000000 */ sll $zero,$zero,0x0 -/* f0c4f44: 45020011 */ bc1fl .L0f0c4f8c -/* f0c4f48: 4600603c */ c.lt.s $f12,$f0 -/* f0c4f4c: c468004c */ lwc1 $f8,0x4c($v1) -/* f0c4f50: 46087182 */ mul.s $f6,$f14,$f8 -/* f0c4f54: 46060280 */ add.s $f10,$f0,$f6 -/* f0c4f58: e44a19a4 */ swc1 $f10,0x19a4($v0) -/* f0c4f5c: 8c620284 */ lw $v0,0x284($v1) -/* f0c4f60: c44019a4 */ lwc1 $f0,0x19a4($v0) -/* f0c4f64: 4600603c */ c.lt.s $f12,$f0 -/* f0c4f68: 00000000 */ sll $zero,$zero,0x0 -/* f0c4f6c: 45000018 */ bc1f .L0f0c4fd0 -/* f0c4f70: 00000000 */ sll $zero,$zero,0x0 -/* f0c4f74: e44c19a4 */ swc1 $f12,0x19a4($v0) -/* f0c4f78: 3c02800a */ lui $v0,0x800a -/* f0c4f7c: 8c42a244 */ lw $v0,-0x5dbc($v0) -/* f0c4f80: 10000013 */ beqz $zero,.L0f0c4fd0 -/* f0c4f84: c44019a4 */ lwc1 $f0,0x19a4($v0) -/* f0c4f88: 4600603c */ c.lt.s $f12,$f0 -.L0f0c4f8c: -/* f0c4f8c: 00000000 */ sll $zero,$zero,0x0 -/* f0c4f90: 4500000f */ bc1f .L0f0c4fd0 -/* f0c4f94: 00000000 */ sll $zero,$zero,0x0 -/* f0c4f98: c470004c */ lwc1 $f16,0x4c($v1) -/* f0c4f9c: 46107482 */ mul.s $f18,$f14,$f16 -/* f0c4fa0: 46120101 */ sub.s $f4,$f0,$f18 -/* f0c4fa4: e44419a4 */ swc1 $f4,0x19a4($v0) -/* f0c4fa8: 8c620284 */ lw $v0,0x284($v1) -/* f0c4fac: c44019a4 */ lwc1 $f0,0x19a4($v0) -/* f0c4fb0: 460c003c */ c.lt.s $f0,$f12 -/* f0c4fb4: 00000000 */ sll $zero,$zero,0x0 -/* f0c4fb8: 45000005 */ bc1f .L0f0c4fd0 -/* f0c4fbc: 00000000 */ sll $zero,$zero,0x0 -/* f0c4fc0: e44c19a4 */ swc1 $f12,0x19a4($v0) -/* f0c4fc4: 3c02800a */ lui $v0,0x800a -/* f0c4fc8: 8c42a244 */ lw $v0,-0x5dbc($v0) -/* f0c4fcc: c44019a4 */ lwc1 $f0,0x19a4($v0) -.L0f0c4fd0: -/* f0c4fd0: 03e00008 */ jr $ra -/* f0c4fd4: e4400170 */ swc1 $f0,0x170($v0) -); +void currentPlayerUpdateSpeedForwardsWalk(f32 targetspeed, f32 accelspeed) +{ + if (g_Vars.normmplayerisrunning) { + targetspeed = (g_MpPlayers[g_Vars.unk000288->mpchrnum].base.unk1c + 25.0f) / 100 * targetspeed; + } + + if (g_Vars.currentplayer->speedgo < targetspeed) { + g_Vars.currentplayer->speedgo += accelspeed * g_Vars.lvupdate240freal; + + if (g_Vars.currentplayer->speedgo > targetspeed) { + g_Vars.currentplayer->speedgo = targetspeed; + } + } else if (g_Vars.currentplayer->speedgo > targetspeed) { + g_Vars.currentplayer->speedgo -= accelspeed * g_Vars.lvupdate240freal; + + if (g_Vars.currentplayer->speedgo < targetspeed) { + g_Vars.currentplayer->speedgo = targetspeed; + } + } + + g_Vars.currentplayer->speedforwards = g_Vars.currentplayer->speedgo; +} GLOBAL_ASM( glabel func0f0c4fd8 @@ -2921,7 +2867,7 @@ glabel var7f1ad7f8 /* f0c65f4: 3c01bf80 */ lui $at,0xbf80 /* f0c65f8: 44816000 */ mtc1 $at,$f12 /* f0c65fc: 3c017f1b */ lui $at,%hi(var7f1ad7e0) -/* f0c6600: 0fc31368 */ jal currentPlayerUpdateSpeedStrafe +/* f0c6600: 0fc31368 */ jal currentPlayerUpdateSpeedSidewaysWalk /* f0c6604: c42ed7e0 */ lwc1 $f14,%lo(var7f1ad7e0)($at) /* f0c6608: 10000015 */ beqz $zero,.L0f0c6660 /* f0c660c: 8e020014 */ lw $v0,0x14($s0) @@ -2932,7 +2878,7 @@ glabel var7f1ad7f8 /* f0c661c: 8e020014 */ lw $v0,0x14($s0) /* f0c6620: 44816000 */ mtc1 $at,$f12 /* f0c6624: 3c017f1b */ lui $at,%hi(var7f1ad7e4) -/* f0c6628: 0fc31368 */ jal currentPlayerUpdateSpeedStrafe +/* f0c6628: 0fc31368 */ jal currentPlayerUpdateSpeedSidewaysWalk /* f0c662c: c42ed7e4 */ lwc1 $f14,%lo(var7f1ad7e4)($at) /* f0c6630: 1000000b */ beqz $zero,.L0f0c6660 /* f0c6634: 8e020014 */ lw $v0,0x14($s0) @@ -2944,7 +2890,7 @@ glabel var7f1ad7f8 /* f0c6648: 00000000 */ sll $zero,$zero,0x0 /* f0c664c: 44806000 */ mtc1 $zero,$f12 /* f0c6650: c42ed7e8 */ lwc1 $f14,%lo(var7f1ad7e8)($at) -/* f0c6654: 0fc31368 */ jal currentPlayerUpdateSpeedStrafe +/* f0c6654: 0fc31368 */ jal currentPlayerUpdateSpeedSidewaysWalk /* f0c6658: 8cc69ff8 */ lw $a2,-0x6008($a2) /* f0c665c: 8e020014 */ lw $v0,0x14($s0) .L0f0c6660: @@ -2960,14 +2906,14 @@ glabel var7f1ad7f8 /* f0c6684: 8cc69ff8 */ lw $a2,-0x6008($a2) /* f0c6688: c42ed7f0 */ lwc1 $f14,%lo(var7f1ad7f0)($at) /* f0c668c: 46083302 */ mul.s $f12,$f6,$f8 -/* f0c6690: 0fc31368 */ jal currentPlayerUpdateSpeedStrafe +/* f0c6690: 0fc31368 */ jal currentPlayerUpdateSpeedSidewaysWalk /* f0c6694: 00000000 */ sll $zero,$zero,0x0 /* f0c6698: 8e190020 */ lw $t9,0x20($s0) .L0f0c669c: /* f0c669c: 1320000d */ beqz $t9,.L0f0c66d4 /* f0c66a0: 3c013f80 */ lui $at,0x3f80 /* f0c66a4: 44816000 */ mtc1 $at,$f12 -/* f0c66a8: 0fc313b1 */ jal func0f0c4ec4 +/* f0c66a8: 0fc313b1 */ jal currentPlayerUpdateSpeedForwardsWalk /* f0c66ac: 46006386 */ mov.s $f14,$f12 /* f0c66b0: 3c02800a */ lui $v0,0x800a /* f0c66b4: 8c42a244 */ lw $v0,-0x5dbc($v0) @@ -2986,7 +2932,7 @@ glabel var7f1ad7f8 /* f0c66e4: 44816000 */ mtc1 $at,$f12 /* f0c66e8: 3c013f80 */ lui $at,0x3f80 /* f0c66ec: 44817000 */ mtc1 $at,$f14 -/* f0c66f0: 0fc313b1 */ jal func0f0c4ec4 +/* f0c66f0: 0fc313b1 */ jal currentPlayerUpdateSpeedForwardsWalk /* f0c66f4: 00000000 */ sll $zero,$zero,0x0 /* f0c66f8: 1000000a */ beqz $zero,.L0f0c6724 /* f0c66fc: 8e030010 */ lw $v1,0x10($s0) @@ -2997,7 +2943,7 @@ glabel var7f1ad7f8 /* f0c670c: 00000000 */ sll $zero,$zero,0x0 /* f0c6710: 44806000 */ mtc1 $zero,$f12 /* f0c6714: 44817000 */ mtc1 $at,$f14 -/* f0c6718: 0fc313b1 */ jal func0f0c4ec4 +/* f0c6718: 0fc313b1 */ jal currentPlayerUpdateSpeedForwardsWalk /* f0c671c: 00000000 */ sll $zero,$zero,0x0 /* f0c6720: 8e030010 */ lw $v1,0x10($s0) .L0f0c6724: @@ -3011,7 +2957,7 @@ glabel var7f1ad7f8 /* f0c6740: 44817000 */ mtc1 $at,$f14 /* f0c6744: 46805420 */ cvt.s.w $f16,$f10 /* f0c6748: 46128302 */ mul.s $f12,$f16,$f18 -/* f0c674c: 0fc313b1 */ jal func0f0c4ec4 +/* f0c674c: 0fc313b1 */ jal currentPlayerUpdateSpeedForwardsWalk /* f0c6750: 00000000 */ sll $zero,$zero,0x0 /* f0c6754: 8e0d00a8 */ lw $t5,0xa8($s0) /* f0c6758: 3c02800a */ lui $v0,0x800a diff --git a/src/game/game_1531a0.c b/src/game/game_1531a0.c index c719e42ed..923c6e1b1 100644 --- a/src/game/game_1531a0.c +++ b/src/game/game_1531a0.c @@ -441,32 +441,42 @@ Gfx *func0f153780(Gfx *gdl) return gdl; } -GLOBAL_ASM( -glabel func0f1537dc -/* f1537dc: 24860008 */ addiu $a2,$a0,0x8 -/* f1537e0: 3c0ee700 */ lui $t6,0xe700 -/* f1537e4: ac8e0000 */ sw $t6,0x0($a0) -/* f1537e8: ac800004 */ sw $zero,0x4($a0) -/* f1537ec: 3c0fb900 */ lui $t7,0xb900 -/* f1537f0: 3c180050 */ lui $t8,0x50 -/* f1537f4: 37184240 */ ori $t8,$t8,0x4240 -/* f1537f8: 35ef031d */ ori $t7,$t7,0x31d -/* f1537fc: 24c70008 */ addiu $a3,$a2,0x8 -/* f153800: accf0000 */ sw $t7,0x0($a2) -/* f153804: acd80004 */ sw $t8,0x4($a2) -/* f153808: 3c19fcff */ lui $t9,0xfcff -/* f15380c: 3c09fffd */ lui $t1,0xfffd -/* f153810: 3529f6fb */ ori $t1,$t1,0xf6fb -/* f153814: 3739ffff */ ori $t9,$t9,0xffff -/* f153818: 24e80008 */ addiu $t0,$a3,0x8 -/* f15381c: acf90000 */ sw $t9,0x0($a3) -/* f153820: ace90004 */ sw $t1,0x4($a3) -/* f153824: 3c0afa00 */ lui $t2,0xfa00 -/* f153828: ad0a0000 */ sw $t2,0x0($t0) -/* f15382c: ad050004 */ sw $a1,0x4($t0) -/* f153830: 03e00008 */ jr $ra -/* f153834: 25020008 */ addiu $v0,$t0,0x8 -); +//GLOBAL_ASM( +//glabel func0f1537dc +///* f1537dc: 24860008 */ addiu $a2,$a0,0x8 +///* f1537e0: 3c0ee700 */ lui $t6,0xe700 +///* f1537e4: ac8e0000 */ sw $t6,0x0($a0) +///* f1537e8: ac800004 */ sw $zero,0x4($a0) +///* f1537ec: 3c0fb900 */ lui $t7,0xb900 +///* f1537f0: 3c180050 */ lui $t8,0x50 +///* f1537f4: 37184240 */ ori $t8,$t8,0x4240 +///* f1537f8: 35ef031d */ ori $t7,$t7,0x31d +///* f1537fc: 24c70008 */ addiu $a3,$a2,0x8 +///* f153800: accf0000 */ sw $t7,0x0($a2) +///* f153804: acd80004 */ sw $t8,0x4($a2) +///* f153808: 3c19fcff */ lui $t9,0xfcff +///* f15380c: 3c09fffd */ lui $t1,0xfffd +///* f153810: 3529f6fb */ ori $t1,$t1,0xf6fb +///* f153814: 3739ffff */ ori $t9,$t9,0xffff +///* f153818: 24e80008 */ addiu $t0,$a3,0x8 +///* f15381c: acf90000 */ sw $t9,0x0($a3) +///* f153820: ace90004 */ sw $t1,0x4($a3) +///* f153824: 3c0afa00 */ lui $t2,0xfa00 +///* f153828: ad0a0000 */ sw $t2,0x0($t0) +///* f15382c: ad050004 */ sw $a1,0x4($t0) +///* f153830: 03e00008 */ jr $ra +///* f153834: 25020008 */ addiu $v0,$t0,0x8 +//); + +Gfx *func0f1537dc(Gfx *gdl, u32 colour) +{ + gDPPipeSync(gdl++); + gDPSetRenderMode(gdl++, 0x00500000, 0x4240); + gDPSetCombine(gdl++, 0xffffff, 0xfffdf6fb); + gDPSetPrimColor(gdl++, 0, 0, colour); + + return gdl; +} GLOBAL_ASM( glabel func0f153838 diff --git a/src/include/game/bondgrab.h b/src/include/game/bondgrab.h index b6c126283..ff2ac3782 100644 --- a/src/include/game/bondgrab.h +++ b/src/include/game/bondgrab.h @@ -20,7 +20,7 @@ void func0f0ce178(void); u32 func0f0ce1ac(void); void func0f0ce450(void); u32 func0f0ce4a0(void); -void func0f0ce55c(f32 target, f32 speed); +void currentPlayerUpdateSpeedForwardsGrab(f32 target, f32 speed); u32 func0f0ce608(void); void currentPlayerUpdateSpeedThetaGrab(void); u32 func0f0ce924(void); diff --git a/src/include/game/bondwalk.h b/src/include/game/bondwalk.h index 44cb36ff9..a8cf10bf5 100644 --- a/src/include/game/bondwalk.h +++ b/src/include/game/bondwalk.h @@ -15,8 +15,8 @@ s32 func0f0c47d0(struct coord *a, struct coord *b, struct coord *c, struct coord u32 func0f0c494c(void); u32 func0f0c4a5c(void); void func0f0c4d98(void); -void currentPlayerUpdateSpeedStrafe(f32 targetspeed, f32 accelspeed, s32 arg2); -u32 func0f0c4ec4(void); +void currentPlayerUpdateSpeedSidewaysWalk(f32 targetspeed, f32 accelspeed, s32 arg2); +void currentPlayerUpdateSpeedForwardsWalk(f32 targetspeed, f32 accelspeed); u32 func0f0c4fd8(void); void currentPlayerApplyCrouchSpeed(void); void func0f0c6080(void); diff --git a/src/include/game/game_1531a0.h b/src/include/game/game_1531a0.h index a4f6d19d4..777e725bc 100644 --- a/src/include/game/game_1531a0.h +++ b/src/include/game/game_1531a0.h @@ -10,7 +10,7 @@ u32 func0f153204(void); u32 func0f1532ec(void); u32 func0f153628(void); Gfx *func0f153780(Gfx *gdl); -u32 func0f1537dc(void); +Gfx *func0f1537dc(Gfx *gdl, u32 colour); u32 func0f153838(void); u32 func0f153858(void); u32 func0f1538e4(void); diff --git a/src/include/types.h b/src/include/types.h index b4454bc1d..890992f92 100644 --- a/src/include/types.h +++ b/src/include/types.h @@ -2639,35 +2639,35 @@ struct player { /*0x1924*/ u32 healthdamagetype; /*0x1928*/ f32 bondleandown; /*0x192c*/ u32 mpmenuon; - /*0x1930*/ u32 mpquitconfirm; - /*0x1934*/ u32 mpjoywascentre; - /*0x1938*/ u32 damagetype; - /*0x193c*/ u32 deathcount; - /*0x1940*/ u32 oldcrosspos[2]; - /*0x1948*/ u32 lastkilltime60; - /*0x194c*/ u32 lastkilltime60_2; - /*0x1950*/ u32 lastkilltime60_3; - /*0x1954*/ u32 lastkilltime60_4; - /*0x1958*/ u32 lifestarttime60; - /*0x195c*/ u32 killsthislife; - /*0x1960*/ u32 healthdisplaytime60; - /*0x1964*/ u32 guncloseroffset; - /*0x1968*/ f32 unk1968; - /*0x196c*/ u32 shootroty; - /*0x1970*/ u32 chrmuzzlelast; - /*0x1974*/ u32 healthscale; - /*0x1978*/ u32 armourscale; - /*0x197c*/ u32 speedgo; - /*0x1980*/ u32 sighttimer240; - /*0x1984*/ u32 crouchoffsetreal; - /*0x1988*/ u16 floorroom; + /*0x1930*/ u32 mpmenumode; + /*0x1934*/ u32 mpquitconfirm; + /*0x1938*/ u32 mpjoywascentre; + /*0x193c*/ u32 damagetype; + /*0x1940*/ u32 deathcount; + /*0x1948*/ u32 oldcrosspos[2]; + /*0x194c*/ u32 lastkilltime60; + /*0x1950*/ u32 lastkilltime60_2; + /*0x1954*/ u32 lastkilltime60_3; + /*0x1958*/ u32 lastkilltime60_4; + /*0x195c*/ u32 lifestarttime60; + /*0x1960*/ u32 killsthislife; + /*0x1964*/ u32 healthdisplaytime60; + /*0x1968*/ f32 guncloseroffset; + /*0x196c*/ u32 shootrotx; + /*0x1970*/ u32 shootroty; + /*0x1974*/ u32 unk1974; + /*0x1978*/ u32 unk1978; + /*0x197c*/ u32 unk197c; + /*0x1980*/ u32 unk1980; + /*0x1984*/ u32 unk1984; + /*0x1988*/ u16 unk1988; /*0x198c*/ u32 unk198c; /*0x1990*/ u32 unk1990; /*0x1994*/ u32 unk1994; /*0x1998*/ u32 unk1998; /*0x199c*/ u32 unk199c; /*0x19a0*/ u32 unk19a0; - /*0x19a4*/ f32 unk19a4; + /*0x19a4*/ f32 speedgo; /*0x19a8*/ u32 unk19a8; /*0x19ac*/ s32 unk19ac; /*0x19b0*/ u32 unk19b0; diff --git a/src/include/ultra64/gbi.h b/src/include/ultra64/gbi.h index 1e1773d36..eab5a79a7 100644 --- a/src/include/ultra64/gbi.h +++ b/src/include/ultra64/gbi.h @@ -482,16 +482,13 @@ typedef union #define G_SETPRIMCOLOR 0xFA -#define gDPSetPrimColor(pkt, m, l, r, g, b, a) \ +#define gDPSetPrimColor(pkt, m, l, rgba) \ { \ Gfx *_g = (Gfx *)(pkt); \ _g->words.w0 = _SHIFTL(G_SETPRIMCOLOR, 24, 8) \ | _SHIFTL(m, 8, 8) \ | _SHIFTL(l, 0, 8); \ - _g->words.w1 = _SHIFTL(r, 24, 8) \ - | _SHIFTL(g, 16, 8) \ - | _SHIFTL(b, 8, 8) \ - | _SHIFTL(a, 0, 8); \ + _g->words.w1 = (rgba); \ } #define gDPSetEnvColor(pkt, r, g, b, a) \ @@ -695,7 +692,7 @@ typedef union { #define LIGHT_2 2 #define LIGHT_3 3 #define LIGHT_4 4 -#define LIGHT_5 5 +#define LIGHT_5 5 #define LIGHT_6 6 #define LIGHT_7 7 #define LIGHT_8 8