some rename in code_8006e9c0 (#512)

* some basic function renames

* Renaming player hud related variables.
This commit is contained in:
coco875 2023-12-25 14:43:47 +01:00 committed by GitHub
parent 371516f918
commit 3638f19145
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
32 changed files with 793 additions and 861 deletions

View File

@ -595,7 +595,7 @@ glabel gObjectList
glabel D_80183D58
.skip 4
glabel D_80183D5C
glabel objectListSize
.skip 4
glabel D_80183D60
@ -667,76 +667,25 @@ glabel gItemWindowObjectByPlayerId
glabel D_80183E98
.skip 8
glabel D_80183EA0
.skip 4
glabel indexObjectList1
.skip 128
glabel D_80183EA4
.skip 4
glabel D_80183EA8
.skip 4
glabel D_80183EAC
.skip 4
glabel D_80183EB0
.skip 16
glabel D_80183EC0
glabel D_80183F20
.skip 8
glabel D_80183EC8
.skip 20
glabel D_80183EDC
.skip 16
glabel D_80183EEC
.skip 60
glabel D_80183F28
.skip 4
glabel D_80183F2C
.skip 8
glabel D_80183F34
.skip 8
glabel D_80183F3C
.skip 20
glabel D_80183F50
.skip 4
glabel D_80183F54
.skip 16
glabel D_80183F64
.skip 16
glabel D_80183F74
.skip 52
glabel indexObjectList2
.skip 128
glabel D_80183FA8
.skip 32768
glabel D_8018BFA8
.skip 16
glabel D_8018BFB8
.skip 24
glabel D_8018BFD0
.skip 8
glabel D_8018BFD8
.skip 80
glabel indexObjectList3
.skip 128
glabel D_8018C028
.skip 8
glabel D_8018C030
glabel indexObjectList4
.skip 128
# Array of (4) Collisions?
@ -795,9 +744,9 @@ glabel D_8018C970
.skip 256
# some hud related list begin
# D_8018CA70 should be of size 528 (0x84 * 0x4)
# playerHUD should be of size 528 (0x84 * 0x4)
# D_8018CA74 through D_8018CC7D are all fake
glabel D_8018CA70
glabel playerHUD
.skip 4
glabel D_8018CA74
@ -1022,7 +971,7 @@ glabel D_8018D010
glabel D_8018D018
.skip 4
glabel D_8018D01C
glabel xOrientation
.skip 4
glabel D_8018D020

View File

@ -1,10 +1,10 @@
glabel func_8005CB60
/* 05D760 8005CB60 0004C140 */ sll $t8, $a0, 5
/* 05D764 8005CB64 27BDFFC0 */ addiu $sp, $sp, -0x40
/* 05D768 8005CB68 3C068019 */ lui $a2, %hi(D_8018CA70) # $a2, 0x8019
/* 05D768 8005CB68 3C068019 */ lui $a2, %hi(playerHUD) # $a2, 0x8019
/* 05D76C 8005CB6C 000470C0 */ sll $t6, $a0, 3
/* 05D770 8005CB70 0304C021 */ addu $t8, $t8, $a0
/* 05D774 8005CB74 24C6CA70 */ addiu $a2, %lo(D_8018CA70) # addiu $a2, $a2, -0x3590
/* 05D774 8005CB74 24C6CA70 */ addiu $a2, %lo(playerHUD) # addiu $a2, $a2, -0x3590
/* 05D778 8005CB78 AFB00018 */ sw $s0, 0x18($sp)
/* 05D77C 8005CB7C 01C47023 */ subu $t6, $t6, $a0
/* 05D780 8005CB80 0018C080 */ sll $t8, $t8, 2

View File

@ -74,8 +74,8 @@ glabel func_8006F008
/* 06FC0C 8006F00C AC2055C8 */ sw $zero, %lo(D_801655C8)($at)
/* 06FC10 8006F010 3C013F80 */ li $at, 0x3F800000 # 1.000000
/* 06FC14 8006F014 44812000 */ mtc1 $at, $f4
/* 06FC18 8006F018 3C028019 */ lui $v0, %hi(D_8018D01C) # $v0, 0x8019
/* 06FC1C 8006F01C 2442D01C */ addiu $v0, %lo(D_8018D01C) # addiu $v0, $v0, -0x2fe4
/* 06FC18 8006F018 3C028019 */ lui $v0, %hi(xOrientation) # $v0, 0x8019
/* 06FC1C 8006F01C 2442D01C */ addiu $v0, %lo(xOrientation) # addiu $v0, $v0, -0x2fe4
/* 06FC20 8006F020 3C0E800E */ lui $t6, %hi(gIsMirrorMode) # $t6, 0x800e
/* 06FC24 8006F024 E4440000 */ swc1 $f4, ($v0)
/* 06FC28 8006F028 8DCEC604 */ lw $t6, %lo(gIsMirrorMode)($t6)

View File

@ -24,16 +24,16 @@ glabel init_hud_one_player
/* 072080 80071480 3C048018 */ lui $a0, %hi(gItemWindowObjectByPlayerId + 4) # $a0, 0x8018
/* 072084 80071484 0C01C7C0 */ jal find_unused_obj_index
/* 072088 80071488 24843E8C */ addiu $a0, %lo(gItemWindowObjectByPlayerId + 4) # addiu $a0, $a0, 0x3e8c
/* 07208C 8007148C 0C01C064 */ jal func_80070190
/* 07208C 8007148C 0C01C064 */ jal init_object_list_index
/* 072090 80071490 00000000 */ nop
/* 072094 80071494 0C01C157 */ jal func_8007055C
/* 072098 80071498 00000000 */ nop
/* 07209C 8007149C 0C01C157 */ jal func_8007055C
/* 0720A0 800714A0 00000000 */ nop
/* 0720A4 800714A4 0C01C1E0 */ jal func_80070780
/* 0720A4 800714A4 0C01C1E0 */ jal init_course_object
/* 0720A8 800714A8 00000000 */ nop
/* 0720AC 800714AC 3C088019 */ lui $t0, %hi(D_8018CA70) # $t0, 0x8019
/* 0720B0 800714B0 2508CA70 */ addiu $t0, %lo(D_8018CA70) # addiu $t0, $t0, -0x3590
/* 0720AC 800714AC 3C088019 */ lui $t0, %hi(playerHUD) # $t0, 0x8019
/* 0720B0 800714B0 2508CA70 */ addiu $t0, %lo(playerHUD) # addiu $t0, $t0, -0x3590
/* 0720B4 800714B4 240E0156 */ li $t6, 342
/* 0720B8 800714B8 A50E003E */ sh $t6, 0x3e($t0)
/* 0720BC 800714BC 8518003E */ lh $t8, 0x3e($t0)
@ -90,7 +90,7 @@ glabel init_hud_one_player
/* 072188 80071588 3C014220 */ li $at, 0x42200000 # 40.000000
/* 07218C 8007158C 44817000 */ mtc1 $at, $f14
/* 072190 80071590 3C014040 */ li $at, 0x40400000 # 3.000000
/* 072194 80071594 3C088019 */ lui $t0, %hi(D_8018CA70) # $t0, 0x8019
/* 072194 80071594 3C088019 */ lui $t0, %hi(playerHUD) # $t0, 0x8019
/* 072198 80071598 3C038019 */ lui $v1, %hi(D_8018D0C8) # $v1, 0x8019
/* 07219C 8007159C 3C048019 */ lui $a0, %hi(D_8018D028) # $a0, 0x8019
/* 0721A0 800715A0 3C058019 */ lui $a1, %hi(D_8018D050) # $a1, 0x8019
@ -101,7 +101,7 @@ glabel init_hud_one_player
/* 0721B4 800715B4 44816800 */ mtc1 $at, $f13
/* 0721B8 800715B8 44806000 */ mtc1 $zero, $f12
/* 0721BC 800715BC 44801000 */ mtc1 $zero, $f2
/* 0721C0 800715C0 2508CA70 */ addiu $t0, %lo(D_8018CA70) # addiu $t0, $t0, -0x3590
/* 0721C0 800715C0 2508CA70 */ addiu $t0, %lo(playerHUD) # addiu $t0, $t0, -0x3590
/* 0721C4 800715C4 240A00A0 */ li $t2, 160
/* 0721C8 800715C8 2529D098 */ addiu $t1, %lo(D_8018D098) # addiu $t1, $t1, -0x2f68
/* 0721CC 800715CC 2442D078 */ addiu $v0, %lo(D_8018D078) # addiu $v0, $v0, -0x2f88

View File

@ -18,14 +18,14 @@ glabel func_8007DB44
/* 07E780 8007DB80 3C088019 */ lui $t0, %hi(D_8018D000) # $t0, 0x8019
/* 07E784 8007DB84 2508D000 */ addiu $t0, %lo(D_8018D000) # addiu $t0, $t0, -0x3000
/* 07E788 8007DB88 85020000 */ lh $v0, ($t0)
/* 07E78C 8007DB8C 3C108018 */ lui $s0, %hi(D_80183EA0) # $s0, 0x8018
/* 07E78C 8007DB8C 3C108018 */ lui $s0, %hi(indexObjectList1) # $s0, 0x8018
/* 07E790 8007DB90 00002825 */ move $a1, $zero
/* 07E794 8007DB94 10400003 */ beqz $v0, .L8007DBA4
/* 07E798 8007DB98 24060003 */ li $a2, 3
/* 07E79C 8007DB9C 244FFFFF */ addiu $t7, $v0, -1
/* 07E7A0 8007DBA0 A50F0000 */ sh $t7, ($t0)
.L8007DBA4:
/* 07E7A4 8007DBA4 8E103EA0 */ lw $s0, %lo(D_80183EA0)($s0)
/* 07E7A4 8007DBA4 8E103EA0 */ lw $s0, %lo(indexObjectList1)($s0)
/* 07E7A8 8007DBA8 2418FFFF */ li $t8, -1
/* 07E7AC 8007DBAC AFB80014 */ sw $t8, 0x14($sp)
/* 07E7B0 8007DBB0 24070001 */ li $a3, 1

View File

@ -16,7 +16,7 @@ glabel func_80080E8C
/* 081A9C 80080E9C AFB00014 */ sw $s0, 0x14($sp)
/* 081AA0 80080EA0 AFA40040 */ sw $a0, 0x40($sp)
/* 081AA4 80080EA4 AFA60048 */ sw $a2, 0x48($sp)
/* 081AA8 80080EA8 0C01C8E9 */ jal func_800723A4
/* 081AA8 80080EA8 0C01C8E9 */ jal init_object
/* 081AAC 80080EAC 00C02825 */ move $a1, $a2
/* 081AB0 80080EB0 8FAE0040 */ lw $t6, 0x40($sp)
/* 081AB4 80080EB4 240700E0 */ li $a3, 224

View File

@ -3,7 +3,7 @@ glabel func_80081FF4
/* 082BF8 80081FF8 AFBF0014 */ sw $ra, 0x14($sp)
/* 082BFC 80081FFC AFA5003C */ sw $a1, 0x3c($sp)
/* 082C00 80082000 AFA40038 */ sw $a0, 0x38($sp)
/* 082C04 80082004 0C01C8E9 */ jal func_800723A4
/* 082C04 80082004 0C01C8E9 */ jal init_object
/* 082C08 80082008 00002825 */ move $a1, $zero
/* 082C0C 8008200C 0C0ADF8D */ jal random_int
/* 082C10 80082010 2404001E */ li $a0, 30
@ -96,8 +96,8 @@ glabel func_80081FF4
/* 082D48 80082148 254A6360 */ addiu $t2, %lo(gMoleSpawns) # addiu $t2, $t2, 0x6360
/* 082D4C 8008214C 012A1021 */ addu $v0, $t1, $t2
/* 082D50 80082150 844B0000 */ lh $t3, ($v0)
/* 082D54 80082154 3C018019 */ lui $at, %hi(D_8018D01C) # $at, 0x8019
/* 082D58 80082158 C428D01C */ lwc1 $f8, %lo(D_8018D01C)($at)
/* 082D54 80082154 3C018019 */ lui $at, %hi(xOrientation) # $at, 0x8019
/* 082D58 80082158 C428D01C */ lwc1 $f8, %lo(xOrientation)($at)
/* 082D5C 8008215C 448B2000 */ mtc1 $t3, $f4
/* 082D60 80082160 844C0002 */ lh $t4, 2($v0)
/* 082D64 80082164 844D0004 */ lh $t5, 4($v0)

View File

@ -9,7 +9,7 @@ glabel func_80082870
/* 08348C 8008288C AFB60038 */ sw $s6, 0x38($sp)
/* 083490 80082890 AFB3002C */ sw $s3, 0x2c($sp)
/* 083494 80082894 3C128018 */ lui $s2, %hi(D_80183E40) # $s2, 0x8018
/* 083498 80082898 3C148018 */ lui $s4, %hi(D_80183F28) # $s4, 0x8018
/* 083498 80082898 3C148018 */ lui $s4, %hi(indexObjectList2) # $s4, 0x8018
/* 08349C 8008289C 3C158016 */ lui $s5, %hi(gObjectList) # $s5, 0x8016
/* 0834A0 800828A0 3C171901 */ lui $s7, (0x19017043 >> 16) # lui $s7, 0x1901
/* 0834A4 800828A4 3C1E8016 */ lui $fp, %hi(D_80165A90) # $fp, 0x8016
@ -20,7 +20,7 @@ glabel func_80082870
/* 0834B8 800828B8 27DE5A90 */ addiu $fp, %lo(D_80165A90) # addiu $fp, $fp, 0x5a90
/* 0834BC 800828BC 36F77043 */ ori $s7, (0x19017043 & 0xFFFF) # ori $s7, $s7, 0x7043
/* 0834C0 800828C0 26B55C18 */ addiu $s5, %lo(gObjectList) # addiu $s5, $s5, 0x5c18
/* 0834C4 800828C4 26943F28 */ addiu $s4, %lo(D_80183F28) # addiu $s4, $s4, 0x3f28
/* 0834C4 800828C4 26943F28 */ addiu $s4, %lo(indexObjectList2) # addiu $s4, $s4, 0x3f28
/* 0834C8 800828C8 26523E40 */ addiu $s2, %lo(D_80183E40) # addiu $s2, $s2, 0x3e40
/* 0834CC 800828CC 00009825 */ move $s3, $zero
/* 0834D0 800828D0 241600E0 */ li $s6, 224
@ -64,8 +64,8 @@ glabel func_80082870
/* 083564 80082964 26730001 */ addiu $s3, $s3, 1
.L80082968:
/* 083568 80082968 850876D2 */ lh $t0, %lo(gCutsceneShotTimer)($t0)
/* 08356C 8008296C 3C108018 */ lui $s0, %hi(D_80183F2C) # $s0, 0x8018
/* 083570 80082970 8E103F2C */ lw $s0, %lo(D_80183F2C)($s0)
/* 08356C 8008296C 3C108018 */ lui $s0, %hi(indexObjectList2+4) # $s0, 0x8018
/* 083570 80082970 8E103F2C */ lw $s0, %lo(indexObjectList2+4)($s0)
/* 083574 80082974 29010097 */ slti $at, $t0, 0x97
/* 083578 80082978 50200009 */ beql $at, $zero, .L800829A0
/* 08357C 8008297C 26730001 */ addiu $s3, $s3, 1

View File

@ -36,8 +36,8 @@ glabel func_80082F1C
/* 083B88 80082F88 844D0002 */ lh $t5, 2($v0)
/* 083B8C 80082F8C 844E0004 */ lh $t6, 4($v0)
/* 083B90 80082F90 448C3000 */ mtc1 $t4, $f6
/* 083B94 80082F94 3C018019 */ lui $at, %hi(D_8018D01C) # $at, 0x8019
/* 083B98 80082F98 C42AD01C */ lwc1 $f10, %lo(D_8018D01C)($at)
/* 083B94 80082F94 3C018019 */ lui $at, %hi(xOrientation) # $at, 0x8019
/* 083B98 80082F98 C42AD01C */ lwc1 $f10, %lo(xOrientation)($at)
/* 083B9C 80082F9C 46803220 */ cvt.s.w $f8, $f6
/* 083BA0 80082FA0 448D9000 */ mtc1 $t5, $f18
/* 083BA4 80082FA4 448E2000 */ mtc1 $t6, $f4

View File

@ -5,8 +5,8 @@ glabel func_80086074
/* 086C80 80086080 27396734 */ addiu $t9, %lo(D_800E6734) # addiu $t9, $t9, 0x6734
/* 086C84 80086084 000FC080 */ sll $t8, $t7, 2
/* 086C88 80086088 03191021 */ addu $v0, $t8, $t9
/* 086C8C 8008608C 3C018019 */ lui $at, %hi(D_8018D01C) # $at, 0x8019
/* 086C90 80086090 C426D01C */ lwc1 $f6, %lo(D_8018D01C)($at)
/* 086C8C 8008608C 3C018019 */ lui $at, %hi(xOrientation) # $at, 0x8019
/* 086C90 80086090 C426D01C */ lwc1 $f6, %lo(xOrientation)($at)
/* 086C94 80086094 C4440000 */ lwc1 $f4, ($v0)
/* 086C98 80086098 27BDFFE0 */ addiu $sp, $sp, -0x20
/* 086C9C 8008609C AFA50024 */ sw $a1, 0x24($sp)

View File

@ -15,8 +15,8 @@ glabel func_8004FA78
/* 0506AC 8004FAAC 10410069 */ beq $v0, $at, .L8004FC54
/* 0506B0 8004FAB0 00047140 */ sll $t6, $a0, 5
/* 0506B4 8004FAB4 01C47021 */ addu $t6, $t6, $a0
/* 0506B8 8004FAB8 3C0F8019 */ lui $t7, %hi(D_8018CA70) # $t7, 0x8019
/* 0506BC 8004FABC 25EFCA70 */ addiu $t7, %lo(D_8018CA70) # addiu $t7, $t7, -0x3590
/* 0506B8 8004FAB8 3C0F8019 */ lui $t7, %hi(playerHUD) # $t7, 0x8019
/* 0506BC 8004FABC 25EFCA70 */ addiu $t7, %lo(playerHUD) # addiu $t7, $t7, -0x3590
/* 0506C0 8004FAC0 000E7080 */ sll $t6, $t6, 2
/* 0506C4 8004FAC4 01CFA021 */ addu $s4, $t6, $t7
/* 0506C8 8004FAC8 3C188019 */ lui $t8, %hi(D_8018D320) # $t8, 0x8019

View File

@ -1,7 +1,7 @@
glabel func_80052590
/* 053190 80052590 27BDFFB8 */ addiu $sp, $sp, -0x48
/* 053194 80052594 3C028018 */ lui $v0, %hi(D_80183EA0) # $v0, 0x8018
/* 053198 80052598 8C423EA0 */ lw $v0, %lo(D_80183EA0)($v0)
/* 053194 80052594 3C028018 */ lui $v0, %hi(indexObjectList1) # $v0, 0x8018
/* 053198 80052598 8C423EA0 */ lw $v0, %lo(indexObjectList1)($v0)
/* 05319C 8005259C 00047080 */ sll $t6, $a0, 2
/* 0531A0 800525A0 AFBE0040 */ sw $fp, 0x40($sp)
/* 0531A4 800525A4 01C47023 */ subu $t6, $t6, $a0

View File

@ -8,12 +8,12 @@ glabel func_800B5218
/* 0B5E30 800B5230 27BDFFB8 */ addiu $sp, $sp, -0x48
/* 0B5E34 800B5234 000E7880 */ sll $t7, $t6, 2
/* 0B5E38 800B5238 3C058019 */ lui $a1, %hi(D_8018CA74) # $a1, 0x8019
/* 0B5E3C 800B523C 3C068019 */ lui $a2, %hi(D_8018CA70) # $a2, 0x8019
/* 0B5E3C 800B523C 3C068019 */ lui $a2, %hi(playerHUD) # $a2, 0x8019
/* 0B5E40 800B5240 01F8C821 */ addu $t9, $t7, $t8
/* 0B5E44 800B5244 AFBF0014 */ sw $ra, 0x14($sp)
/* 0B5E48 800B5248 AFB90038 */ sw $t9, 0x38($sp)
/* 0B5E4C 800B524C 24070001 */ li $a3, 1
/* 0B5E50 800B5250 24C6CA70 */ addiu $a2, %lo(D_8018CA70) # addiu $a2, $a2, -0x3590
/* 0B5E50 800B5250 24C6CA70 */ addiu $a2, %lo(playerHUD) # addiu $a2, $a2, -0x3590
/* 0B5E54 800B5254 24A5CA74 */ addiu $a1, %lo(D_8018CA74) # addiu $a1, $a1, -0x358c
/* 0B5E58 800B5258 24020001 */ li $v0, 1
/* 0B5E5C 800B525C 24080003 */ li $t0, 3
@ -25,8 +25,8 @@ glabel func_800B5218
/* 0B5E70 800B5270 00025880 */ sll $t3, $v0, 2
/* 0B5E74 800B5274 0064082A */ slt $at, $v1, $a0
/* 0B5E78 800B5278 10200005 */ beqz $at, .L800B5290
/* 0B5E7C 800B527C 3C0C8019 */ lui $t4, %hi(D_8018CA70) # $t4, 0x8019
/* 0B5E80 800B5280 258CCA70 */ addiu $t4, %lo(D_8018CA70) # addiu $t4, $t4, -0x3590
/* 0B5E7C 800B527C 3C0C8019 */ lui $t4, %hi(playerHUD) # $t4, 0x8019
/* 0B5E80 800B5280 258CCA70 */ addiu $t4, %lo(playerHUD) # addiu $t4, $t4, -0x3590
/* 0B5E84 800B5284 004A3804 */ sllv $a3, $t2, $v0
/* 0B5E88 800B5288 10000005 */ b .L800B52A0
/* 0B5E8C 800B528C 016C3021 */ addu $a2, $t3, $t4

View File

@ -508,8 +508,8 @@ typedef struct {
/* 0x81 */ u8 unk_81;
/* 0x82 */ s8 unk_82;
/* 0x83 */ s8 unk_83;
} struct_8018CA70_entry; // size = 0x84
} hud_player; // size = 0x84
#define D_8018CA70_SIZE 4
#define HUD_PLAYERS_SIZE 4
#endif

View File

@ -175,10 +175,10 @@ extern s32 D_80183DB8[];
// Appears to be a list of object list indices for the Item Window part of the HUD
extern s32 gItemWindowObjectByPlayerId[];
// Used for loop bounds when accessing D_80183EA0
// Used for loop bounds when accessing indexObjectList1
extern s16 D_80165750;
// These seem to be limits on different object types in Moo Moo Farm
// See func_80070780 in code_8006E9C0.c
// See init_course_object in code_8006E9C0.c
// Maybe max number of active moles in a given group of moles?
extern s32 D_8018D1C8;
extern s32 D_8018D1D0;
@ -189,9 +189,9 @@ extern s32 D_8018D3C0;
extern Collision D_8018C0B0[];
/**
* D_80183EA0, D_80183F28, D_8018BFA8, and D_8018C030 are all lists of indices in gObjectList.
* func_80070190 initializes them in such a way that the indicies in each list are not adjacent.
* First D_80183EA0 gets an unused index, then D_80183F28, then D_8018BFA8, then D_8018C030, and then it loops.
* indexObjectList1, indexObjectList2, indexObjectList3, and indexObjectList4 are all lists of indices in gObjectList.
* init_object_list_index initializes them in such a way that the indicies in each list are not adjacent.
* First indexObjectList1 gets an unused index, then indexObjectList2, then indexObjectList3, then indexObjectList4, and then it loops.
*
* The objects found at the indices in each list appears to be course dependent
**/
@ -250,7 +250,7 @@ extern s16 gNumActiveThwomps;
* Penguins in Sherbet Land?
* Flag Poles in Yoshi Valley?
**/
extern s32 D_80183EA0[];
extern s32 indexObjectList1[];
#define NUM_SEAGULLS 10
@ -280,7 +280,7 @@ extern Vec3s gHedgehogPatrolPoints[];
* Hedgehogs in Yoshi Valley?
* Spawn for big fire breath in Bowser's Castle
**/
extern s32 D_80183F28[];
extern s32 indexObjectList2[];
#define NUM_BOOS 0xA
#define NUM_FIRE_BREATHS 4
@ -291,10 +291,12 @@ extern Vec3s gFireBreathsSpawns[];
* Boos in Banshee Boardwalk
* Spawners for the 4 small fire breaths inside Bowser's Castle
**/
extern s32 D_8018BFA8[];
extern s32 indexObjectList3[];
// Appears to go entirely unused?
extern s32 D_8018C030[];
/**
* Unused list of object indices
*/
extern s32 indexObjectList4[];
#define D_8018C1B0_SIZE 128
#define NUM_MAX_MOLES 0x1F

View File

@ -15,7 +15,7 @@ extern s32 gLapCountByPlayerId[8]; // D_80164390
extern s32 gPlayerIsThrottleActive[]; // D_801653E0
extern s32 gGPCurrentRaceRankByPlayerId[]; // D_801643B8
extern struct_8018CA70_entry D_8018CA70[];
extern hud_player playerHUD[];
extern Mtx D_80183D60[];

View File

@ -1121,7 +1121,7 @@ void func_8001F87C(s32 cameraId) {
if(gPlayerOne){}
if (gActiveScreenMode == SCREEN_MODE_1P) {
if (gModeSelection == 0) {
if (gModeSelection == GRAND_PRIX) {
for (playerIndex = 0; playerIndex < NUM_PLAYERS; playerIndex++) {
if ((gPlayerOne[playerIndex].type & 0x200) || (gPlayerOne[playerIndex].type & 0x80)) break;
if (playerIndex == 7) {

View File

@ -831,7 +831,7 @@ void func_80007D04(s32 playerId, Player *player) {
// Something wrong here. Maybe needs
// var_v0 = 0;
switch (gCCSelection) {
case 0:
case CC_50:
var_v0 = 0;
if (playerId == D_80163344[0]) {
var_v0 = 0x14;
@ -3579,7 +3579,7 @@ void func_8000F124(void) {
}
if (gDemoMode == 1) { return; }
if (gModeSelection != 0) { return; }
if (gModeSelection != GRAND_PRIX) { return; }
for (i = 0; i < 2; i++) {
@ -3716,7 +3716,7 @@ void func_8000F628(void) {
gLapCountByPlayerId[i] = -1;
gCourseCompletionPercentByPlayerId[i] = 0.0f;
gTimePlayerLastTouchedFinishLine[i] = 0.0f;
if (gModeSelection == 0) {
if (gModeSelection == GRAND_PRIX) {
if(1); if(1); // Maybe some debug code?
gGPCurrentRaceRankByPlayerId[i] = (s32) D_80165270[i];
D_801643E0[i] = (s32) D_80165270[i];
@ -3808,7 +3808,7 @@ void func_8000F628(void) {
}
D_8016347A = 0;
if (gCCSelection == 3) {
if (gCCSelection == CC_EXTRA) {
D_8016347A = 1;
}
@ -5176,7 +5176,7 @@ void func_800139E4(f32 arg0, f32 arg1, s32 arg2, s32 arg3, VehicleStuff *vehicle
veh->someType = random_int(3);
}
veh->someMultiplierTheSequel = (f32) ((f64) (f32) (veh->someType - 1) * 0.6);
if (((gCCSelection > 0) || (gModeSelection == 1)) && (veh->someType == 2)) {
if (((gCCSelection > CC_50) || (gModeSelection == TIME_TRIALS)) && (veh->someType == 2)) {
veh->someMultiplier = arg0;
} else {
veh->someMultiplier = arg1;

View File

@ -742,9 +742,9 @@ void func_80059358(void) {
void func_80059360(void) {
if (D_801657B0 == 0) {
func_8004FA78(0);
if (D_8018CA70[0].lapCount != 3) {
func_8004CB60(D_8018CA70[0].lapX, D_8018CA70[0].lapY, D_0D00A958);
func_8004FC78(D_8018CA70[0].lapX + 0xC, D_8018CA70[0].lapY - 4, D_8018CA70[0].alsoLapCount);
if (playerHUD[PLAYER_ONE].lapCount != 3) {
func_8004CB60(playerHUD[PLAYER_ONE].lapX, playerHUD[PLAYER_ONE].lapY, D_0D00A958);
func_8004FC78(playerHUD[PLAYER_ONE].lapX + 0xC, playerHUD[PLAYER_ONE].lapY - 4, playerHUD[PLAYER_ONE].alsoLapCount);
func_8004E638(0);
}
}
@ -757,9 +757,9 @@ void func_800593F0(void) {
void func_800593F8(void) {
if (D_801657B0 == 0) {
func_8004FA78(1);
if (D_8018CA70[1].lapCount != 3) {
func_8004CB60(D_8018CA70[1].lapX, D_8018CA70[1].lapY, D_0D00A958);
func_8004FC78(D_8018CA70[1].lapX + 0xC, D_8018CA70[1].lapY - 4, D_8018CA70[1].alsoLapCount);
if (playerHUD[PLAYER_TWO].lapCount != 3) {
func_8004CB60(playerHUD[PLAYER_TWO].lapX, playerHUD[PLAYER_TWO].lapY, D_0D00A958);
func_8004FC78(playerHUD[PLAYER_TWO].lapX + 0xC, playerHUD[PLAYER_TWO].lapY - 4, playerHUD[PLAYER_TWO].alsoLapCount);
func_8004E638(1);
}
}
@ -799,12 +799,12 @@ extern s8 D_801657F8;
void func_80059560(s32 arg0) {
if (gModeSelection != BATTLE) {
if (D_801657F8 && gIsHUDVisible) {
func_8004CB60(D_8018CA70[arg0].lapX, D_8018CA70[arg0].lapY, D_0D00A958);
func_8004FC78(D_8018CA70[arg0].lapX - 12, D_8018CA70[arg0].lapY + 4, D_8018CA70[arg0].alsoLapCount);
func_8004CB60(playerHUD[arg0].lapX, playerHUD[arg0].lapY, D_0D00A958);
func_8004FC78(playerHUD[arg0].lapX - 12, playerHUD[arg0].lapY + 4, playerHUD[arg0].alsoLapCount);
}
if (D_801657E4 == 2) {
if (D_8018CA70[arg0].unk_74 && D_80165608) {
func_80047910(D_8018CA70[arg0].unk_6C, D_8018CA70[arg0].unk_6E, 0, 1.0f, gTLUTPortraitBombKartAndQuestionMark, gTexturePortraitBombKart, D_0D005AE0, 0x20, 0x20, 0x20, 0x20);
if (playerHUD[arg0].unk_74 && D_80165608) {
func_80047910(playerHUD[arg0].unk_6C, playerHUD[arg0].unk_6E, 0, 1.0f, gTLUTPortraitBombKartAndQuestionMark, gTexturePortraitBombKart, D_0D005AE0, 0x20, 0x20, 0x20, 0x20);
}
}
}
@ -862,11 +862,11 @@ void func_800597E8(void) {
}
void func_80059820(s32 playerId) {
struct_8018CA70_entry *temp_v0;
hud_player *temp_v0;
D_8018CF1C = &gPlayerOne[playerId];
D_8018CF14 = &camera1[playerId];
temp_v0 = &D_8018CA70[playerId];
temp_v0 = &playerHUD[playerId];
temp_v0->posXInt = (s32) D_8018CF1C->pos[0];
temp_v0->posYInt = (s32) D_8018CF1C->pos[1];
temp_v0->posZInt = (s32) D_8018CF1C->pos[2];
@ -899,12 +899,12 @@ void func_8005995C(void) {
if ((D_80165890 != 0) && (player->type & PLAYER_INVISIBLE_OR_BOMB)) {
player->currentItemCopy = ITEM_MUSHROOM;
D_8018CA70[i].unk_75 = 2;
playerHUD[i].unk_75 = 2;
}
if ((player->type & PLAYER_INVISIBLE_OR_BOMB) && (player->currentItemCopy == ITEM_NONE)) {
if (D_8018CA70[i].unk_75) {
if (playerHUD[i].unk_75) {
player->currentItemCopy = ITEM_MUSHROOM;
--D_8018CA70[i].unk_75;
--playerHUD[i].unk_75;
}
}
++player;
@ -1410,362 +1410,362 @@ extern u16 D_800E55B0[16];
extern f32 D_8018CFEC;
extern f32 D_8018CFF4;
extern struct_8018CA70_entry D_8018CA70[];
extern hud_player playerHUD[];
void func_8005AB60(void) {
switch (D_8018CA70[0].unk_78) {
switch (playerHUD[PLAYER_ONE].unk_78) {
case 0:
break;
case 1:
s16_step_towards(&D_8018CAAE, 0x106, 0x10);
if (s16_step_towards(&D_8018CAB0, 0xB6, 0x10) != 0) {
D_8018CA70[0].unk_78++;
D_8018CA70[0].unk_79 = 1;
playerHUD[PLAYER_ONE].unk_78++;
playerHUD[PLAYER_ONE].unk_79 = 1;
}
break;
case 2:
s16_step_towards(&D_8018CAAE, 0x116, 4);
if (s16_step_towards(&D_8018CAB0, 0xC6, 4) != 0) {
D_8018CA70[0].unk_78++;
playerHUD[PLAYER_ONE].unk_78++;
}
break;
case 3:
s16_step_towards(&D_8018CAAE, 0x106, 4);
if (s16_step_towards(&D_8018CAB0, 0xB6, 4) != 0) {
D_8018CA70[0].unk_78++;
playerHUD[PLAYER_ONE].unk_78++;
}
break;
case 4:
s16_step_towards(&D_8018CAAE, 0x10E, 4);
if (s16_step_towards(&D_8018CAB0, 0xBE, 4) != 0) {
D_8018CA70[0].unk_78++;
playerHUD[PLAYER_ONE].unk_78++;
}
break;
case 5:
s16_step_towards(&D_8018CAAE, 0x106, 4);
if (s16_step_towards(&D_8018CAB0, 0xB6, 4) != 0) {
D_8018CA70[0].unk_78++;
playerHUD[PLAYER_ONE].unk_78++;
}
break;
case 6:
s16_step_towards(&D_8018CAAE, 0x10A, 2);
if (s16_step_towards(&D_8018CAB0, 0xBA, 2) != 0) {
D_8018CA70[0].unk_78++;
playerHUD[PLAYER_ONE].unk_78++;
}
break;
case 7:
s16_step_towards(&D_8018CAAE, 0x106, 2);
if (s16_step_towards(&D_8018CAB0, 0xB6, 2) != 0) {
D_8018CA70[0].unk_78++;
playerHUD[PLAYER_ONE].unk_78++;
}
break;
case 8:
D_8018CA70[0].unk_78 = 0;
playerHUD[PLAYER_ONE].unk_78 = 0;
break;
}
if ((D_8018CA70[0].unk_79 != 0) && (D_8018CA70[0].unk_79 == 1)) {
if ((playerHUD[PLAYER_ONE].unk_79 != 0) && (playerHUD[PLAYER_ONE].unk_79 == 1)) {
if (++D_801657E7 >= 0x10) {
D_801657E7 = 0;
D_8016579E = 0xDD00;
D_8018CA70[0].unk_79 = 0U;
playerHUD[PLAYER_ONE].unk_79 = 0U;
} else {
D_8016579E = D_800E55B0[D_801657E7] + 0xDD00;
}
}
switch (D_8018CA70[0].unk_80) {
switch (playerHUD[PLAYER_ONE].unk_80) {
case 0:
break;
case 1:
if (s16_step_towards(&D_8018CAB8, 0x40, 8) != 0) {
D_8018CA70[0].unk_80++;
playerHUD[PLAYER_ONE].unk_80++;
}
break;
case 2:
if (s16_step_towards(&D_8018CAB8, 0x38, 8) != 0) {
D_8018CA70[0].unk_80++;
playerHUD[PLAYER_ONE].unk_80++;
}
break;
case 3:
if (s16_step_towards(&D_8018CAB8, 0x40, 8) != 0) {
D_8018CA70[0].unk_80++;
playerHUD[PLAYER_ONE].unk_80++;
}
break;
case 4:
if (s16_step_towards(&D_8018CAB8, 0x38, 8) != 0) {
D_8018CA70[0].unk_80++;
playerHUD[PLAYER_ONE].unk_80++;
}
break;
case 5:
if (s16_step_towards(&D_8018CAB8, 0x40, 8) != 0) {
D_8018CA70[0].unk_80++;
playerHUD[PLAYER_ONE].unk_80++;
}
break;
case 6:
if (s16_step_towards(&D_8018CAB8, 0x38, 4) != 0) {
D_8018CA70[0].unk_80++;
playerHUD[PLAYER_ONE].unk_80++;
}
break;
case 7:
if (s16_step_towards(&D_8018CAB8, 0x40, 4) != 0) {
D_8018CA70[0].unk_80++;
playerHUD[PLAYER_ONE].unk_80++;
}
break;
case 8:
D_8018CA70[0].unk_80 = 0;
playerHUD[PLAYER_ONE].unk_80 = 0;
break;
}
switch (D_8018CA70[0].unk_7A) {
switch (playerHUD[PLAYER_ONE].unk_7A) {
case 0:
break;
case 1:
if (s16_step_towards(&D_8018CABE, 0xE4, 0x10) != 0) {
D_8018CA70[0].unk_7A++;
playerHUD[PLAYER_ONE].unk_7A++;
}
break;
case 2:
if (s16_step_towards(&D_8018CABE, 0xF4, 4) != 0) {
D_8018CA70[0].unk_7A++;
playerHUD[PLAYER_ONE].unk_7A++;
}
break;
case 3:
if (s16_step_towards(&D_8018CABE, 0xE4, 4) != 0) {
D_8018CA70[0].unk_7A++;
playerHUD[PLAYER_ONE].unk_7A++;
}
break;
case 4:
if (s16_step_towards(&D_8018CABE, 0xEC, 4) != 0) {
D_8018CA70[0].unk_7A++;
playerHUD[PLAYER_ONE].unk_7A++;
}
break;
case 5:
if (s16_step_towards(&D_8018CABE, 0xE4, 4) != 0) {
D_8018CA70[0].unk_7A++;
playerHUD[PLAYER_ONE].unk_7A++;
}
break;
case 6:
if (s16_step_towards(&D_8018CABE, 0xE8, 2) != 0) {
D_8018CA70[0].unk_7A++;
playerHUD[PLAYER_ONE].unk_7A++;
}
break;
case 7:
if (s16_step_towards(&D_8018CABE, 0xE4, 2) != 0) {
D_8018CA70[0].unk_7A++;
playerHUD[PLAYER_ONE].unk_7A++;
}
break;
case 8:
D_8018CA70[0].unk_7A = 0;
playerHUD[PLAYER_ONE].unk_7A = 0;
break;
}
switch (D_8018CA70[0].unk_7D) {
switch (playerHUD[PLAYER_ONE].unk_7D) {
case 0:
break;
case 1:
if (s16_step_towards(&D_8018CACA, 0x53, 0x10) != 0) {
D_8018CA70[0].unk_7D++;
playerHUD[PLAYER_ONE].unk_7D++;
}
break;
case 2:
if (s16_step_towards(&D_8018CACA, 0x43, 4) != 0) {
D_8018CA70[0].unk_7D++;
playerHUD[PLAYER_ONE].unk_7D++;
}
break;
case 3:
if (s16_step_towards(&D_8018CACA, 0x53, 4) != 0) {
D_8018CA70[0].unk_7D++;
playerHUD[PLAYER_ONE].unk_7D++;
}
break;
case 4:
if (s16_step_towards(&D_8018CACA, 0x4B, 4) != 0) {
D_8018CA70[0].unk_7D++;
playerHUD[PLAYER_ONE].unk_7D++;
}
break;
case 5:
if (s16_step_towards(&D_8018CACA, 0x53, 4) != 0) {
D_8018CA70[0].unk_7D++;
playerHUD[PLAYER_ONE].unk_7D++;
}
break;
case 6:
if (s16_step_towards(&D_8018CACA, 0x4F, 2) != 0) {
D_8018CA70[0].unk_7D++;
playerHUD[PLAYER_ONE].unk_7D++;
}
break;
case 7:
if (s16_step_towards(&D_8018CACA, 0x53, 2) != 0) {
D_8018CA70[0].unk_7D++;
playerHUD[PLAYER_ONE].unk_7D++;
}
break;
case 8:
D_8018CA70[0].unk_7D = 0;
playerHUD[PLAYER_ONE].unk_7D = 0;
break;
}
D_8018CFEC = (f32) (D_8018CA70[0].speedometerX + 0x18);
D_8018CFF4 = (f32) (D_8018CA70[0].speedometerY + 6);
switch (D_8018CA70[0].unk_7B) {
D_8018CFEC = (f32) (playerHUD[PLAYER_ONE].speedometerX + 0x18);
D_8018CFF4 = (f32) (playerHUD[PLAYER_ONE].speedometerY + 6);
switch (playerHUD[PLAYER_ONE].unk_7B) {
case 0:
break;
case 1:
if (s16_step_towards(&D_8018CAC0, 0xE4, 0x10) != 0) {
D_8018CA70[0].unk_7B++;
playerHUD[PLAYER_ONE].unk_7B++;
}
break;
case 2:
if (s16_step_towards(&D_8018CAC0, 0xF4, 4) != 0) {
D_8018CA70[0].unk_7B++;
playerHUD[PLAYER_ONE].unk_7B++;
}
break;
case 3:
if (s16_step_towards(&D_8018CAC0, 0xE4, 4) != 0) {
D_8018CA70[0].unk_7B++;
playerHUD[PLAYER_ONE].unk_7B++;
}
break;
case 4:
if (s16_step_towards(&D_8018CAC0, 0xEC, 4) != 0) {
D_8018CA70[0].unk_7B++;
playerHUD[PLAYER_ONE].unk_7B++;
}
break;
case 5:
if (s16_step_towards(&D_8018CAC0, 0xE4, 4) != 0) {
D_8018CA70[0].unk_7B++;
playerHUD[PLAYER_ONE].unk_7B++;
}
break;
case 6:
if (s16_step_towards(&D_8018CAC0, 0xE8, 2) != 0) {
D_8018CA70[0].unk_7B++;
playerHUD[PLAYER_ONE].unk_7B++;
}
break;
case 7:
if (s16_step_towards(&D_8018CAC0, 0xE4, 2) != 0) {
D_8018CA70[0].unk_7B++;
playerHUD[PLAYER_ONE].unk_7B++;
}
break;
case 8:
D_8018CA70[0].unk_7B = 0;
playerHUD[PLAYER_ONE].unk_7B = 0;
break;
}
switch (D_8018CA70[0].unk_7E) {
switch (playerHUD[PLAYER_ONE].unk_7E) {
case 0:
break;
case 1:
if (s16_step_towards(&D_8018CACC, 0x53, 0x10) != 0) {
D_8018CA70[0].unk_7E++;
playerHUD[PLAYER_ONE].unk_7E++;
}
break;
case 2:
if (s16_step_towards(&D_8018CACC, 0x43, 4) != 0) {
D_8018CA70[0].unk_7E++;
playerHUD[PLAYER_ONE].unk_7E++;
}
break;
case 3:
if (s16_step_towards(&D_8018CACC, 0x53, 4) != 0) {
D_8018CA70[0].unk_7E++;
playerHUD[PLAYER_ONE].unk_7E++;
}
break;
case 4:
if (s16_step_towards(&D_8018CACC, 0x4B, 4) != 0) {
D_8018CA70[0].unk_7E++;
playerHUD[PLAYER_ONE].unk_7E++;
}
break;
case 5:
if (s16_step_towards(&D_8018CACC, 0x53, 4) != 0) {
D_8018CA70[0].unk_7E++;
playerHUD[PLAYER_ONE].unk_7E++;
}
break;
case 6:
if (s16_step_towards(&D_8018CACC, 0x4F, 2) != 0) {
D_8018CA70[0].unk_7E++;
playerHUD[PLAYER_ONE].unk_7E++;
}
break;
case 7:
if (s16_step_towards(&D_8018CACC, 0x53, 2) != 0) {
D_8018CA70[0].unk_7E++;
playerHUD[PLAYER_ONE].unk_7E++;
}
break;
case 8:
D_8018CA70[0].unk_7E = 0;
playerHUD[PLAYER_ONE].unk_7E = 0;
break;
}
switch (D_8018CA70[0].unk_7C) {
switch (playerHUD[PLAYER_ONE].unk_7C) {
case 0:
break;
case 1:
if (s16_step_towards(&D_8018CAC2, 0xE4, 0x10) != 0) {
D_8018CA70[0].unk_7C++;
playerHUD[PLAYER_ONE].unk_7C++;
}
break;
case 2:
if (s16_step_towards(&D_8018CAC2, 0xF4, 4) != 0) {
D_8018CA70[0].unk_7C++;
playerHUD[PLAYER_ONE].unk_7C++;
}
break;
case 3:
if (s16_step_towards(&D_8018CAC2, 0xE4, 4) != 0) {
D_8018CA70[0].unk_7C++;
playerHUD[PLAYER_ONE].unk_7C++;
}
break;
case 4:
if (s16_step_towards(&D_8018CAC2, 0xEC, 4) != 0) {
D_8018CA70[0].unk_7C++;
playerHUD[PLAYER_ONE].unk_7C++;
}
break;
case 5:
if (s16_step_towards(&D_8018CAC2, 0xE4, 4) != 0) {
D_8018CA70[0].unk_7C++;
playerHUD[PLAYER_ONE].unk_7C++;
}
break;
case 6:
if (s16_step_towards(&D_8018CAC2, 0xE8, 2) != 0) {
D_8018CA70[0].unk_7C++;
playerHUD[PLAYER_ONE].unk_7C++;
}
break;
case 7:
if (s16_step_towards(&D_8018CAC2, 0xE4, 2) != 0) {
D_8018CA70[0].unk_7C++;
playerHUD[PLAYER_ONE].unk_7C++;
}
break;
case 8:
D_8018CA70[0].unk_7C = 0;
playerHUD[PLAYER_ONE].unk_7C = 0;
break;
}
switch (D_8018CA70[0].unk_7F) {
switch (playerHUD[PLAYER_ONE].unk_7F) {
case 0:
break;
case 1:
if (s16_step_towards(&D_8018CACE, 0x53, 0x10) != 0) {
D_8018CA70[0].unk_7F++;
playerHUD[PLAYER_ONE].unk_7F++;
}
break;
case 2:
if (s16_step_towards(&D_8018CACE, 0x43, 4) != 0) {
D_8018CA70[0].unk_7F++;
playerHUD[PLAYER_ONE].unk_7F++;
}
break;
case 3:
if (s16_step_towards(&D_8018CACE, 0x53, 4) != 0) {
D_8018CA70[0].unk_7F++;
playerHUD[PLAYER_ONE].unk_7F++;
}
break;
case 4:
if (s16_step_towards(&D_8018CACE, 0x4B, 4) != 0) {
D_8018CA70[0].unk_7F++;
playerHUD[PLAYER_ONE].unk_7F++;
}
break;
case 5:
if (s16_step_towards(&D_8018CACE, 0x53, 4) != 0) {
D_8018CA70[0].unk_7F++;
playerHUD[PLAYER_ONE].unk_7F++;
}
break;
case 6:
if (s16_step_towards(&D_8018CACE, 0x4F, 2) != 0) {
D_8018CA70[0].unk_7F++;
playerHUD[PLAYER_ONE].unk_7F++;
}
break;
case 7:
if (s16_step_towards(&D_8018CACE, 0x53, 2) != 0) {
D_8018CA70[0].unk_7F++;
playerHUD[PLAYER_ONE].unk_7F++;
}
break;
case 8:
D_8018CA70[0].unk_7F = 0;
playerHUD[PLAYER_ONE].unk_7F = 0;
break;
}
}
@ -1784,7 +1784,7 @@ void func_8005AAF0(void);
void func_8005AB60(void);
void func_8005B7A0(void);
extern s8 D_801657E2;
extern struct_8018CA70_entry D_8018CA70[];
extern hud_player playerHUD[];
extern f32 D_8018D028[8];
extern f32 D_8018D050[8];
extern f32 D_8018D078[8];
@ -1832,28 +1832,28 @@ void func_8005B914(void) {
func_8005AAF0();
break;
case 0x2:
if (gModeSelection == 1) {
D_8018CA70[0].unk_80 = 1;
if (gModeSelection == TIME_TRIALS) {
playerHUD[PLAYER_ONE].unk_80 = 1;
}
D_8018CA70[0].unk_78 = 1;
D_8018CA70[0].unk_7A = 1;
D_8018CA70[0].unk_7D = 1;
playerHUD[PLAYER_ONE].unk_78 = 1;
playerHUD[PLAYER_ONE].unk_7A = 1;
playerHUD[PLAYER_ONE].unk_7D = 1;
func_8005AA4C();
break;
case 0x3:
func_8005AA94(0);
break;
case 0x4:
D_8018CA70[0].unk_7B = 1;
D_8018CA70[0].unk_7E = 1;
playerHUD[PLAYER_ONE].unk_7B = 1;
playerHUD[PLAYER_ONE].unk_7E = 1;
func_8005AA4C();
break;
case 0x5:
func_8005AA94(0);
break;
case 0x6:
D_8018CA70[0].unk_7C = 1;
D_8018CA70[0].unk_7F = 1;
playerHUD[PLAYER_ONE].unk_7C = 1;
playerHUD[PLAYER_ONE].unk_7F = 1;
func_8005AA4C();
func_8005AA80();
break;
@ -2310,7 +2310,7 @@ extern bool8 D_801657F0;
extern s8 D_80165800[2];
extern s32 D_8016587C;
extern s8 D_80165898;
extern struct_8018CA70_entry D_8018CA70[];
extern hud_player playerHUD[];
extern s32 D_8018D114;
extern s32 D_8018D1CC;
extern s32 D_8018D1FC;
@ -2331,45 +2331,45 @@ void func_8005CB60(s32 playerId, s32 arg1)
s32 new_var2;
s8* temp_v1;
u32 new_var3;
temp_v1 = &D_8018CA70[playerId].alsoLapCount;
temp_v1 = &playerHUD[playerId].alsoLapCount;
new_var = &gPlayerOne[playerId];
if (D_8018CA70[playerId].lapCount < D_8018D320) {
D_8018CA70[playerId].someTimer = (s32)(gCourseTimer * 100.0f);
if (playerHUD[playerId].lapCount < D_8018D320) {
playerHUD[playerId].someTimer = (s32)(gCourseTimer * 100.0f);
if ((*temp_v1) < arg1) {
if (((!temp_v1) && (!temp_v1)) && (!temp_v1)) {
}
temp_f18 = gTimePlayerLastTouchedFinishLine[playerId] * 100.0f;
D_8018CA70[playerId].timeLastTouchedFinishLine = temp_f18;
D_8018CA70[playerId & 0xFFFFFFFFFFFFFFFFu].lapCompletionTimes[*temp_v1] = temp_f18;
playerHUD[playerId].timeLastTouchedFinishLine = temp_f18;
playerHUD[playerId & 0xFFFFFFFFFFFFFFFFu].lapCompletionTimes[*temp_v1] = temp_f18;
if (!(*temp_v1)) {
D_8018CA70[playerId].lapDurations[(*temp_v1) & 0xFFFFFFFFFFFFFFFF] = D_8018CA70[playerId].timeLastTouchedFinishLine;
playerHUD[playerId].lapDurations[(*temp_v1) & 0xFFFFFFFFFFFFFFFF] = playerHUD[playerId].timeLastTouchedFinishLine;
}
else {
D_8018CA70[playerId].lapDurations[*temp_v1] = D_8018CA70[playerId].timeLastTouchedFinishLine + (-D_8018CA70[playerId].lapCompletionTimes[*temp_v1]);
playerHUD[playerId].lapDurations[*temp_v1] = playerHUD[playerId].timeLastTouchedFinishLine + (-playerHUD[playerId].lapCompletionTimes[*temp_v1]);
}
new_var3 = (D_8018CA70[playerId].someTimer1 = D_8018CA70[playerId].lapDurations[*temp_v1]);
D_8018CA70[playerId].blinkTimer = 0x3C;
new_var3 = (playerHUD[playerId].someTimer1 = playerHUD[playerId].lapDurations[*temp_v1]);
playerHUD[playerId].blinkTimer = 0x3C;
if (arg1 == 3) {
D_8018CA70[playerId].someTimer = D_8018CA70[playerId].lapCompletionTimes[(*temp_v1) & 0xFFFFFFFFFFFFFFFFu];
playerHUD[playerId].someTimer = playerHUD[playerId].lapCompletionTimes[(*temp_v1) & 0xFFFFFFFFFFFFFFFFu];
}
if (gModeSelection == 1) {
if (D_80165638 >= D_8018CA70[playerId].someTimer1) {
if (D_80165638 != D_8018CA70[playerId].someTimer1) {
if (D_80165638 >= playerHUD[playerId].someTimer1) {
if (D_80165638 != playerHUD[playerId].someTimer1) {
D_80165658[0] = (D_80165658[1] = 0);
}
func_800C90F4(0, (new_var->characterId * 0x10) + 0x2900800D);
D_80165638 = D_8018CA70[playerId].someTimer1;
D_80165638 = playerHUD[playerId].someTimer1;
D_80165654[arg1] = 1;
D_801657E3 = 1;
}
if ((arg1 == 3) && (D_8018CA70[playerId].someTimer < D_80165648)) {
if ((arg1 == 3) && (playerHUD[playerId].someTimer < D_80165648)) {
D_801657E5 = 1;
}
}
if ((++(*temp_v1)) == D_8018D320) {
*temp_v1 = D_8018D320 - 1;
}
temp_v1 = (s8*)(&D_8018CA70[playerId]);
temp_v1 = (s8*)(&playerHUD[playerId]);
temp_v1 += 0x71;
*temp_v1 += 1;
switch (*temp_v1) {
@ -2398,17 +2398,17 @@ void func_8005CB60(s32 playerId, s32 arg1)
D_80165800[1] = 1;
D_8018D204 = 1;
}
D_8018CA70[playerId].raceCompleteBool = 1;
playerHUD[playerId].raceCompleteBool = 1;
if (D_8018D114 == 2) {
D_80165800[playerId] = 0;
}
if (gCurrentCourseId == 4) {
D_8018CA70[playerId].unk_81 = 1;
playerHUD[playerId].unk_81 = 1;
}
D_8018CA70[playerId].lap1CompletionTimeX = 0x140;
D_8018CA70[playerId].lap2CompletionTimeX = 0x1E0;
D_8018CA70[playerId].lap3CompletionTimeX = 0x280;
D_8018CA70[playerId].totalTimeX = 0x320;
playerHUD[playerId].lap1CompletionTimeX = 0x140;
playerHUD[playerId].lap2CompletionTimeX = 0x1E0;
playerHUD[playerId].lap3CompletionTimeX = 0x280;
playerHUD[playerId].totalTimeX = 0x320;
D_8016587C = 1;
if (D_8018D20C == 0) {
func_80079054(playerId);
@ -2422,54 +2422,54 @@ void func_8005CB60(s32 playerId, s32 arg1)
}
}
else {
f32_step_towards(&D_8018CA70[playerId].rankScaling, 1.0f, 0.125f);
f32_step_towards(&playerHUD[playerId].rankScaling, 1.0f, 0.125f);
switch (gScreenModeSelection) {
case 0:
s16_step_towards(&D_8018CA70[playerId].slideRankX, 0x1C, 7);
s16_step_towards(&playerHUD[playerId].slideRankX, 0x1C, 7);
if (D_8018D1FC != 0) {
s16_step_towards(&D_8018CA70[playerId].slideRankY, -0x28, 1);
s16_step_towards(&playerHUD[playerId].slideRankY, -0x28, 1);
}
else {
s16_step_towards(&D_8018CA70[playerId].slideRankY, -0x10, 4);
s16_step_towards(&playerHUD[playerId].slideRankY, -0x10, 4);
}
break;
case 2:
s16_step_towards(&D_8018CA70[playerId].slideRankX, 0x1C, 7);
s16_step_towards(&D_8018CA70[playerId].slideRankY, -0x10, 4);
s16_step_towards(&playerHUD[playerId].slideRankX, 0x1C, 7);
s16_step_towards(&playerHUD[playerId].slideRankY, -0x10, 4);
break;
case 1:
s16_step_towards(&D_8018CA70[playerId].slideRankX, 0x1C, 7);
s16_step_towards(&D_8018CA70[playerId].slideRankY, -0x10, 4);
s16_step_towards(&D_8018CA70[playerId].lap1CompletionTimeX, 0xE4, 0x10);
s16_step_towards(&D_8018CA70[playerId].lap2CompletionTimeX, 0xE4, 0x10);
s16_step_towards(&D_8018CA70[playerId].lap3CompletionTimeX, 0xE4, 0x10);
s16_step_towards(&D_8018CA70[playerId].totalTimeX, 0xE4, 0x10);
s16_step_towards(&playerHUD[playerId].slideRankX, 0x1C, 7);
s16_step_towards(&playerHUD[playerId].slideRankY, -0x10, 4);
s16_step_towards(&playerHUD[playerId].lap1CompletionTimeX, 0xE4, 0x10);
s16_step_towards(&playerHUD[playerId].lap2CompletionTimeX, 0xE4, 0x10);
s16_step_towards(&playerHUD[playerId].lap3CompletionTimeX, 0xE4, 0x10);
s16_step_towards(&playerHUD[playerId].totalTimeX, 0xE4, 0x10);
break;
case 3:
if ((playerId & 1) == 1) {
s16_step_towards(&D_8018CA70[playerId].slideRankX, -8, 2);
s16_step_towards(&playerHUD[playerId].slideRankX, -8, 2);
}
else {
s16_step_towards(&D_8018CA70[playerId].slideRankX, 8, 2);
s16_step_towards(&playerHUD[playerId].slideRankX, 8, 2);
}
s16_step_towards(&D_8018CA70[playerId].slideRankY, -0x10, 4);
s16_step_towards(&playerHUD[playerId].slideRankY, -0x10, 4);
break;
}
}
if (D_8018CA70[playerId].blinkTimer == 0) {
D_8018CA70[playerId].someTimer1 = D_8018CA70[playerId].someTimer;
if (playerHUD[playerId].blinkTimer == 0) {
playerHUD[playerId].someTimer1 = playerHUD[playerId].someTimer;
D_801657E3 = 0;
}
else {
if (D_80165594 == 0) {
D_8018CA70[playerId].blinkState += 1;
D_8018CA70[playerId].blinkState &= 1;
playerHUD[playerId].blinkState += 1;
playerHUD[playerId].blinkState &= 1;
}
if ((--D_8018CA70[playerId].blinkTimer) == 0) {
D_8018CA70[playerId].blinkState = 0;
if ((--playerHUD[playerId].blinkTimer) == 0) {
playerHUD[playerId].blinkState = 0;
}
}
}
@ -2518,13 +2518,13 @@ void func_8005D1F4(s32 arg0)
if (gModeSelection == 2) {
playerWaypoint = gNearestWaypointByPlayerId[arg0];
D_8018CA70[arg0].unk_74 = 0;
playerHUD[arg0].unk_74 = 0;
for (var_a2 = 0; var_a2 < NUM_BOMB_KARTS_VERSUS; var_a2++) {
if ((gBombKarts[var_a2].state == BOMB_STATE_EXPLODED) || (gBombKarts[var_a2].state == BOMB_STATE_INACTIVE)) continue;
bombWaypoint = gBombKarts[var_a2].waypointIndex;
waypointDiff = bombWaypoint - playerWaypoint;
if ((waypointDiff < -5) || (waypointDiff > 0x1E)) continue;
D_8018CA70[arg0].unk_74 = 1;
playerHUD[arg0].unk_74 = 1;
break;
}
}

View File

@ -22,7 +22,7 @@
void init_object_list(void) {
func_8006EA5C();
reset_object_variable();
func_8006FA94();
switch (gScreenModeSelection) {
@ -42,10 +42,10 @@ void init_object_list(void) {
func_80070148();
}
void func_8006EA5C(void) {
void reset_object_variable(void) {
func_8006EB10();
func_8006ED60();
bzero(D_8018CA70, D_8018CA70_SIZE * sizeof(struct_8018CA70_entry));
clear_object_list();
bzero(playerHUD, HUD_PLAYERS_SIZE * sizeof(hud_player));
D_8018CAE1 = 0;
D_8018CAE2 = 0;
D_8018CAF1 = 0;
@ -64,30 +64,30 @@ void func_8006EA5C(void) {
D_8018CC6C = 0;
/**
D_8018CA70[0].lapCount = 0;
D_8018CA70[0].alsoLapCount = 0;
D_8018CA70[0].unk_81 = 0;
D_8018CA70[1].lapCount = 0;
D_8018CA70[1].alsoLapCount = 0;
D_8018CA70[1].unk_81 = 0;
D_8018CA70[2].lapCount = 0;
D_8018CA70[2].alsoLapCount = 0;
D_8018CA70[2].unk_81 = 0;
D_8018CA70[3].lapCount = 0;
D_8018CA70[3].alsoLapCount = 0;
D_8018CA70[3].unk_81 = 0;
D_8018CA70[0].raceCompleteBool = 0;
D_8018CA70[1].raceCompleteBool = 0;
D_8018CA70[2].raceCompleteBool = 0;
D_8018CA70[3].raceCompleteBool = 0;
playerHUD[PLAYER_ONE].lapCount = 0;
playerHUD[PLAYER_ONE].alsoLapCount = 0;
playerHUD[PLAYER_ONE].unk_81 = 0;
playerHUD[PLAYER_TWO].lapCount = 0;
playerHUD[PLAYER_TWO].alsoLapCount = 0;
playerHUD[PLAYER_TWO].unk_81 = 0;
playerHUD[PLAYER_THREE].lapCount = 0;
playerHUD[PLAYER_THREE].alsoLapCount = 0;
playerHUD[PLAYER_THREE].unk_81 = 0;
playerHUD[PLAYER_FOUR].lapCount = 0;
playerHUD[PLAYER_FOUR].alsoLapCount = 0;
playerHUD[PLAYER_FOUR].unk_81 = 0;
playerHUD[PLAYER_ONE].raceCompleteBool = 0;
playerHUD[PLAYER_TWO].raceCompleteBool = 0;
playerHUD[PLAYER_THREE].raceCompleteBool = 0;
playerHUD[PLAYER_FOUR].raceCompleteBool = 0;
// This is close but it puts the raceCompletedBool stuff in the wrong place
// Which makes sense, but its still annoying
for (thing = 0; thing < D_8018CA70_SIZE; thing++) {
D_8018CA70[thing].lapCount = 0;
D_8018CA70[thing].alsoLapCount = 0;
D_8018CA70[thing].unk_81 = 0;
D_8018CA70[thing].raceCompleteBool = 0;
for (thing = 0; thing < HUD_PLAYERS_SIZE; thing++) {
playerHUD[thing].lapCount = 0;
playerHUD[thing].alsoLapCount = 0;
playerHUD[thing].unk_81 = 0;
playerHUD[thing].raceCompleteBool = 0;
}
**/
}
@ -182,9 +182,9 @@ void func_8006EB10(void) {
D_80183E38 = D_80183E4C;
}
void func_8006ED60() {
void clear_object_list() {
bzero(gObjectList, OBJECT_LIST_SIZE * sizeof(Objects));
D_80183D5C = -1;
objectListSize = -1;
}
u8 *func_8006ED94(u8 *devAddr, u8 *baseAddress, u32 size, u32 offset)
@ -278,9 +278,9 @@ void func_8006F008(void) {
s16 var_t9;
D_801655C8 = 0;
D_8018D01C = 1.0f;
xOrientation = 1.0f;
if (gIsMirrorMode != 0) {
D_8018D01C = -1.0f;
xOrientation = -1.0f;
}
D_8018D2C0.unk0 = 0x0101;
D_8018D2D8.unk0 = 0x00AA;
@ -838,14 +838,14 @@ void func_80070148(void) {
}
}
void func_80070190(void) {
void init_object_list_index(void) {
s32 loopIndex;
for(loopIndex = 0; loopIndex < SOME_OBJECT_INDEX_LIST_SIZE; loopIndex++) {
find_unused_obj_index(&D_80183EA0[loopIndex]);
find_unused_obj_index(&D_80183F28[loopIndex]);
find_unused_obj_index(&D_8018BFA8[loopIndex]);
find_unused_obj_index(&D_8018C030[loopIndex]);
find_unused_obj_index(&indexObjectList1[loopIndex]);
find_unused_obj_index(&indexObjectList2[loopIndex]);
find_unused_obj_index(&indexObjectList3[loopIndex]);
find_unused_obj_index(&indexObjectList4[loopIndex]);
}
for(loopIndex = 0; loopIndex < NUM_BOMB_KARTS_VERSUS; loopIndex++) {
@ -856,7 +856,7 @@ void func_80070190(void) {
void func_80070250(s32 objectIndex, s32 arg1, StarSpawn *arg2) {
ItemWindowObjects *temp_v0;
func_800723A4(objectIndex, arg1);
init_object(objectIndex, arg1);
temp_v0 = &gObjectList[objectIndex];
temp_v0->unk_0D5 = arg2->id;
temp_v0->currentItem = ITEM_NONE;
@ -899,7 +899,7 @@ void func_80070328(StarSpawn *arg0) {
void func_800703E0(s32 objectIndex, s32 arg1, StarSpawn *arg2) {
ItemWindowObjects *temp_v0;
func_800723A4(objectIndex, arg1);
init_object(objectIndex, arg1);
temp_v0 = &gObjectList[objectIndex];
temp_v0->unk_0D5 = arg2->id; // No idea, all 0's for stars
temp_v0->currentItem = ITEM_BANANA;
@ -991,182 +991,182 @@ void func_80070714(void) {
D_80165748 = 0xA;
}
void func_80070780(void) {
s32 temp_s0;
s32 var_s3;
void init_course_object(void) {
s32 objectId;
s32 i;
switch (gCurrentCourseId) {
case 0:
case COURSE_MARIO_RACEWAY:
if (gGamestate != 9) {
if (gModeSelection == 0) {
if (gModeSelection == GRAND_PRIX) {
func_80070714();
}
for (var_s3 = 0; var_s3 < D_80165738; var_s3++) {
find_unused_obj_index(&D_8018C630[var_s3]);
func_800723A4(D_8018C630[var_s3], 0);
for (i = 0; i < D_80165738; i++) {
find_unused_obj_index(&D_8018C630[i]);
init_object(D_8018C630[i], 0);
}
}
break;
case 2:
case COURSE_BOWSER_CASTLE:
gNumActiveThwomps = NUM_THWOMPS_100CC_EXTRA;
gThowmpSpawnList = gThwompSpawns100CCExtra;
switch (gCCSelection) { /* switch 1; irregular */
case 1: /* switch 1 */
case 3: /* switch 1 */
case CC_100: /* switch 1 */
case CC_EXTRA: /* switch 1 */
break;
case 0: /* switch 1 */
case CC_50: /* switch 1 */
gNumActiveThwomps = NUM_THWOMPS_50CC;
gThowmpSpawnList = gThomwpSpawns50CC;
break;
case 2: /* switch 1 */
case CC_150: /* switch 1 */
gNumActiveThwomps = NUM_THWOMPS_150CC;
gThowmpSpawnList = gThomwpSpawns150CC;
break;
}
for (var_s3 = 0; var_s3 < gNumActiveThwomps; var_s3++) {
temp_s0 = D_80183EA0[var_s3];
func_800723A4(temp_s0, 0);
gObjectList[temp_s0].unk_010[0] = gThowmpSpawnList[var_s3].startX * D_8018D01C;
gObjectList[temp_s0].unk_010[2] = gThowmpSpawnList[var_s3].startZ;
gObjectList[temp_s0].unk_0D5 = gThowmpSpawnList[var_s3].unk_4;
gObjectList[temp_s0].unk_0A0 = gThowmpSpawnList[var_s3].unk_6;
for (i = 0; i < gNumActiveThwomps; i++) {
objectId = indexObjectList1[i];
init_object(objectId, 0);
gObjectList[objectId].unk_010[0] = gThowmpSpawnList[i].startX * xOrientation;
gObjectList[objectId].unk_010[2] = gThowmpSpawnList[i].startZ;
gObjectList[objectId].unk_0D5 = gThowmpSpawnList[i].unk_4;
gObjectList[objectId].unk_0A0 = gThowmpSpawnList[i].unk_6;
}
// Handle the big statue's fire breath
temp_s0 = D_80183F28[0];
func_800723A4(temp_s0, 0);
gObjectList[temp_s0].pos[0] = -68.0 * D_8018D01C;
gObjectList[temp_s0].pos[1] = 80.0f;
gObjectList[temp_s0].pos[2] = -1840.0f;
objectId = indexObjectList2[0];
init_object(objectId, 0);
gObjectList[objectId].pos[0] = -68.0 * xOrientation;
gObjectList[objectId].pos[1] = 80.0f;
gObjectList[objectId].pos[2] = -1840.0f;
// Handle the smaller statues' fire breath
for (var_s3 = 0; var_s3 < NUM_FIRE_BREATHS; var_s3++) {
temp_s0 = D_8018BFA8[var_s3];
func_800723A4(temp_s0, 0);
gObjectList[temp_s0].pos[0] = gFireBreathsSpawns[var_s3][0] * D_8018D01C;
gObjectList[temp_s0].pos[1] = gFireBreathsSpawns[var_s3][1];
gObjectList[temp_s0].pos[2] = gFireBreathsSpawns[var_s3][2];
gObjectList[temp_s0].unk_0BE[1] = 0;
if (var_s3 % 2U) {
gObjectList[temp_s0].unk_0BE[1] += 0x8000;
for (i = 0; i < NUM_FIRE_BREATHS; i++) {
objectId = indexObjectList3[i];
init_object(objectId, 0);
gObjectList[objectId].pos[0] = gFireBreathsSpawns[i][0] * xOrientation;
gObjectList[objectId].pos[1] = gFireBreathsSpawns[i][1];
gObjectList[objectId].pos[2] = gFireBreathsSpawns[i][2];
gObjectList[objectId].unk_0BE[1] = 0;
if (i % 2U) {
gObjectList[objectId].unk_0BE[1] += 0x8000;
}
}
for (var_s3 = 0; var_s3 < 32; var_s3++) {
delete_object(&D_8018C030[var_s3]);
for (i = 0; i < 32; i++) {
delete_object(&indexObjectList4[i]);
}
break;
case 3:
case COURSE_BANSHEE_BOARDWALK:
if (gGamestate != 9) {
temp_s0 = D_80183EA0[0];
init_texture_object(temp_s0, d_course_banshee_boardwalk_bat_tlut, *d_course_banshee_boardwalk_bat, 0x20U, (u16) 0x00000040);
gObjectList[temp_s0].unk_0B2[0] = 0;
gObjectList[temp_s0].unk_0B2[1] = 0;
gObjectList[temp_s0].unk_0B2[2] = 0x8000;
func_800723A4(D_80183EA0[1], 0);
func_800723A4(D_80183EA0[2], 0);
objectId = indexObjectList1[0];
init_texture_object(objectId, d_course_banshee_boardwalk_bat_tlut, *d_course_banshee_boardwalk_bat, 0x20U, (u16) 0x00000040);
gObjectList[objectId].unk_0B2[0] = 0;
gObjectList[objectId].unk_0B2[1] = 0;
gObjectList[objectId].unk_0B2[2] = 0x8000;
init_object(indexObjectList1[1], 0);
init_object(indexObjectList1[2], 0);
}
break;
case 4:
for (var_s3 = 0; var_s3 < 4; var_s3++) {
func_800723A4(D_80183EA0[var_s3], 0);
case COURSE_YOSHI_VALLEY:
for (i = 0; i < 4; i++) {
init_object(indexObjectList1[i], 0);
}
if (gGamestate != 9) {
for (var_s3 = 0; var_s3 < NUM_HEDGEHOGS; var_s3++) {
temp_s0 = D_80183F28[var_s3];
func_800723A4(temp_s0, 0);
gObjectList[temp_s0].pos[0] = gObjectList[temp_s0].unk_010[0] = gHedgehogSpawns[var_s3].pos[0] * D_8018D01C;
gObjectList[temp_s0].pos[1] = gObjectList[temp_s0].unk_044 = gHedgehogSpawns[var_s3].pos[1] + 6.0;
gObjectList[temp_s0].pos[2] = gObjectList[temp_s0].unk_010[2] = gHedgehogSpawns[var_s3].pos[2];
gObjectList[temp_s0].unk_0D5 = gHedgehogSpawns[var_s3].unk_06;
gObjectList[temp_s0].unk_09C = gHedgehogPatrolPoints[var_s3][0] * D_8018D01C;
gObjectList[temp_s0].unk_09E = gHedgehogPatrolPoints[var_s3][2];
for (i = 0; i < NUM_HEDGEHOGS; i++) {
objectId = indexObjectList2[i];
init_object(objectId, 0);
gObjectList[objectId].pos[0] = gObjectList[objectId].unk_010[0] = gHedgehogSpawns[i].pos[0] * xOrientation;
gObjectList[objectId].pos[1] = gObjectList[objectId].unk_044 = gHedgehogSpawns[i].pos[1] + 6.0;
gObjectList[objectId].pos[2] = gObjectList[objectId].unk_010[2] = gHedgehogSpawns[i].pos[2];
gObjectList[objectId].unk_0D5 = gHedgehogSpawns[i].unk_06;
gObjectList[objectId].unk_09C = gHedgehogPatrolPoints[i][0] * xOrientation;
gObjectList[objectId].unk_09E = gHedgehogPatrolPoints[i][2];
}
}
break;
case 5:
for (var_s3 = 0; var_s3 < NUM_SNOWFLAKES; var_s3++) {
find_unused_obj_index(&D_8018C1B0[var_s3]);
case COURSE_FRAPPE_SNOWLAND:
for (i = 0; i < NUM_SNOWFLAKES; i++) {
find_unused_obj_index(&D_8018C1B0[i]);
}
if (gGamestate != 9) {
for (var_s3 = 0; var_s3 < NUM_SNOWMEN; var_s3++) {
temp_s0 = D_80183F28[var_s3];
func_800723A4(temp_s0, 0);
gObjectList[temp_s0].unk_010[0] = gSnowmanSpawns[var_s3].pos[0] * D_8018D01C;
gObjectList[temp_s0].unk_010[1] = gSnowmanSpawns[var_s3].pos[1] + 5.0 + 3.0;
gObjectList[temp_s0].unk_010[2] = gSnowmanSpawns[var_s3].pos[2];
temp_s0 = D_80183EA0[var_s3];
func_800723A4(temp_s0, 0);
gObjectList[temp_s0].unk_010[0] = gSnowmanSpawns[var_s3].pos[0] * D_8018D01C;
gObjectList[temp_s0].unk_010[1] = gSnowmanSpawns[var_s3].pos[1] + 3.0;
gObjectList[temp_s0].unk_010[2] = gSnowmanSpawns[var_s3].pos[2];
gObjectList[temp_s0].unk_0D5 = gSnowmanSpawns[var_s3].unk_6;
for (i = 0; i < NUM_SNOWMEN; i++) {
objectId = indexObjectList2[i];
init_object(objectId, 0);
gObjectList[objectId].unk_010[0] = gSnowmanSpawns[i].pos[0] * xOrientation;
gObjectList[objectId].unk_010[1] = gSnowmanSpawns[i].pos[1] + 5.0 + 3.0;
gObjectList[objectId].unk_010[2] = gSnowmanSpawns[i].pos[2];
objectId = indexObjectList1[i];
init_object(objectId, 0);
gObjectList[objectId].unk_010[0] = gSnowmanSpawns[i].pos[0] * xOrientation;
gObjectList[objectId].unk_010[1] = gSnowmanSpawns[i].pos[1] + 3.0;
gObjectList[objectId].unk_010[2] = gSnowmanSpawns[i].pos[2];
gObjectList[objectId].unk_0D5 = gSnowmanSpawns[i].unk_6;
}
}
break;
case 6:
case COURSE_KOOPA_BEACH:
if (gGamestate != 9) {
for (var_s3 = 0; var_s3 < NUM_CRABS; var_s3++) {
temp_s0 = D_80183EA0[var_s3];
func_800723A4(temp_s0, 0);
gObjectList[temp_s0].pos[0] = gObjectList[temp_s0].unk_010[0] = gCrabSpawns[var_s3].startX * D_8018D01C;
gObjectList[temp_s0].unk_01C[0] = gCrabSpawns[var_s3].patrolX * D_8018D01C;
for (i = 0; i < NUM_CRABS; i++) {
objectId = indexObjectList1[i];
init_object(objectId, 0);
gObjectList[objectId].pos[0] = gObjectList[objectId].unk_010[0] = gCrabSpawns[i].startX * xOrientation;
gObjectList[objectId].unk_01C[0] = gCrabSpawns[i].patrolX * xOrientation;
gObjectList[temp_s0].pos[2] = gObjectList[temp_s0].unk_010[2] = gCrabSpawns[var_s3].startZ;
gObjectList[temp_s0].unk_01C[2] = gCrabSpawns[var_s3].patrolZ;
gObjectList[objectId].pos[2] = gObjectList[objectId].unk_010[2] = gCrabSpawns[i].startZ;
gObjectList[objectId].unk_01C[2] = gCrabSpawns[i].patrolZ;
}
}
for (var_s3 = 0; var_s3 < NUM_SEAGULLS; var_s3++) {
temp_s0 = D_80183F28[var_s3];
func_800723A4(temp_s0, 0);
if (var_s3 < (NUM_SEAGULLS / 2)) {
gObjectList[temp_s0].unk_0D5 = 0;
for (i = 0; i < NUM_SEAGULLS; i++) {
objectId = indexObjectList2[i];
init_object(objectId, 0);
if (i < (NUM_SEAGULLS / 2)) {
gObjectList[objectId].unk_0D5 = 0;
} else {
gObjectList[temp_s0].unk_0D5 = 1;
gObjectList[objectId].unk_0D5 = 1;
}
}
break;
case 7:
case COURSE_ROYAL_RACEWAY:
if (gGamestate != 9) {
if (gModeSelection == 0) {
if (gModeSelection == GRAND_PRIX) {
func_80070714();
}
for (var_s3 = 0; var_s3 < D_80165738; var_s3++) {
find_unused_obj_index(&D_8018C630[var_s3]);
func_800723A4(D_8018C630[var_s3], 0);
for (i = 0; i < D_80165738; i++) {
find_unused_obj_index(&D_8018C630[i]);
init_object(D_8018C630[i], 0);
}
}
break;
case 8:
case COURSE_LUIGI_RACEWAY:
if (gGamestate != 9) {
if (gModeSelection == 0) {
if (gModeSelection == GRAND_PRIX) {
func_80070714();
}
D_80165898 = 0;
func_800723A4(D_80183EA0[0], 0);
for (var_s3 = 0; var_s3 < D_80165738; var_s3++) {
find_unused_obj_index(&D_8018C630[var_s3]);
func_800723A4(D_8018C630[var_s3], 0);
init_object(indexObjectList1[0], 0);
for (i = 0; i < D_80165738; i++) {
find_unused_obj_index(&D_8018C630[i]);
init_object(D_8018C630[i], 0);
}
}
break;
case 9:
case COURSE_MOO_MOO_FARM:
if (gGamestate != 9) {
if ((gPlayerCount == 1) || ((gPlayerCount == 2) && (gModeSelection == (s32) 2))) {
if ((gPlayerCount == 1) || ((gPlayerCount == 2) && (gModeSelection == VERSUS))) {
switch (gCCSelection) { /* switch 2; irregular */
case 0: /* switch 2 */
case CC_50: /* switch 2 */
D_8018D1C8 = 4;
D_8018D1D0 = 6;
D_8018D1D8 = 6;
break;
case 1: /* switch 2 */
case CC_100: /* switch 2 */
D_8018D1C8 = 5;
D_8018D1D0 = 8;
D_8018D1D8 = 8;
break;
case 2: /* switch 2 */
case CC_150: /* switch 2 */
D_8018D1C8 = 5;
D_8018D1D0 = 8;
D_8018D1D8 = 10;
break;
case 3: /* switch 2 */
case CC_EXTRA: /* switch 2 */
D_8018D1C8 = 5;
D_8018D1D0 = 8;
D_8018D1D8 = 8;
@ -1177,65 +1177,65 @@ void func_80070780(void) {
D_8018D1D0 = 6;
D_8018D1D8 = 6;
}
for (var_s3 = 0; var_s3 < NUM_GROUP1_MOLES; var_s3++) {
D_8018D198[var_s3] = 0;
find_unused_obj_index(&D_80183EA0[var_s3]);
for (i = 0; i < NUM_GROUP1_MOLES; i++) {
D_8018D198[i] = 0;
find_unused_obj_index(&indexObjectList1[i]);
}
for (var_s3 = 0; var_s3 < NUM_GROUP2_MOLES; var_s3++) {
D_8018D1A8[var_s3] = 0;
find_unused_obj_index(&D_80183EA0[var_s3]);
for (i = 0; i < NUM_GROUP2_MOLES; i++) {
D_8018D1A8[i] = 0;
find_unused_obj_index(&indexObjectList1[i]);
}
for (var_s3 = 0; var_s3 < NUM_GROUP3_MOLES; var_s3++) {
D_8018D1B8[var_s3] = 0;
find_unused_obj_index(&D_80183EA0[var_s3]);
for (i = 0; i < NUM_GROUP3_MOLES; i++) {
D_8018D1B8[i] = 0;
find_unused_obj_index(&indexObjectList1[i]);
}
for (var_s3 = 0; var_s3 < NUM_MAX_MOLES; var_s3++) {
find_unused_obj_index(&D_8018C1B0[var_s3]);
temp_s0 = D_8018C1B0[var_s3];
func_800723A4(temp_s0, 0);
gObjectList[temp_s0].pos[0] = gMoleSpawns[var_s3][0] * D_8018D01C;
gObjectList[temp_s0].pos[2] = gMoleSpawns[var_s3][2];
func_800887C0(temp_s0);
gObjectList[temp_s0].sizeScaling = 0.7f;
for (i = 0; i < NUM_MAX_MOLES; i++) {
find_unused_obj_index(&D_8018C1B0[i]);
objectId = D_8018C1B0[i];
init_object(objectId, 0);
gObjectList[objectId].pos[0] = gMoleSpawns[i][0] * xOrientation;
gObjectList[objectId].pos[2] = gMoleSpawns[i][2];
func_800887C0(objectId);
gObjectList[objectId].sizeScaling = 0.7f;
}
for (var_s3 = 0; var_s3 < D_8018C3F0_SIZE; var_s3++) {
find_unused_obj_index(&D_8018C3F0[var_s3]);
for (i = 0; i < D_8018C3F0_SIZE; i++) {
find_unused_obj_index(&D_8018C3F0[i]);
}
}
break;
case 11:
case COURSE_KALAMARI_DESERT:
if (gGamestate != 9) {
find_unused_obj_index(&D_8018CF10);
func_800723A4(D_8018CF10, 0);
for (var_s3 = 0; var_s3 < 50; var_s3++) {
find_unused_obj_index(&D_8018C1B0[var_s3]);
init_object(D_8018CF10, 0);
for (i = 0; i < 50; i++) {
find_unused_obj_index(&D_8018C1B0[i]);
}
for (var_s3 = 0; var_s3 < 5; var_s3++) {
find_unused_obj_index(&D_8018C3F0[var_s3]);
for (i = 0; i < 5; i++) {
find_unused_obj_index(&D_8018C3F0[i]);
}
for (var_s3 = 0; var_s3 < 32; var_s3++) {
find_unused_obj_index(&D_8018C630[var_s3]);
for (i = 0; i < 32; i++) {
find_unused_obj_index(&D_8018C630[i]);
}
}
break;
case 12:
for (var_s3 = 0; var_s3 < NUM_PENGUINS; var_s3++) {
func_800723A4(D_80183EA0[var_s3], 0);
case COURSE_SHERBET_LAND:
for (i = 0; i < NUM_PENGUINS; i++) {
init_object(indexObjectList1[i], 0);
}
break;
case 13:
case COURSE_RAINBOW_ROAD:
if (gGamestate != 9) {
for (var_s3 = 0; var_s3 < NUM_NEON_SIGNS; var_s3++) {
func_800723A4(D_80183EA0[var_s3], 0);
for (i = 0; i < NUM_NEON_SIGNS; i++) {
init_object(indexObjectList1[i], 0);
}
for (var_s3 = 0; var_s3 < NUM_CHAIN_CHOMPS; var_s3++) {
func_800723A4(D_80183F28[var_s3], 0);
for (i = 0; i < NUM_CHAIN_CHOMPS; i++) {
init_object(indexObjectList2[i], 0);
}
}
break;
case 18:
for (var_s3 = 0; var_s3 < NUM_TORCHES; var_s3++) {
func_800770F0(var_s3);
case COURSE_DK_JUNGLE:
for (i = 0; i < NUM_TORCHES; i++) {
func_800770F0(i);
// wtf?
if (D_8018CF10){}
}
@ -1247,7 +1247,7 @@ void func_80070780(void) {
#ifdef MIPS_TO_C
//generated by m2c commit b52d92c2340f6f4ba1aafb464188bb698752fbb0 on Jul-28-2023
? func_80070780(); /* extern */
? init_course_object(); /* extern */
extern s32 D_80165638;
extern s32 D_80165648;
extern s16 D_801656B0;
@ -1303,32 +1303,32 @@ void init_hud_one_player(void) {
find_unused_obj_index(&D_80183DBC);
find_unused_obj_index(gItemWindowObjectByPlayerId);
find_unused_obj_index(gItemWindowObjectByPlayerId + 4);
func_80070190();
init_object_list_index();
func_8007055C();
func_8007055C();
func_80070780();
D_8018CA70->speedometerX = 0x0156;
D_8018CA70->speedometerY = 0x0106;
D_8018CFEC = (f32) (D_8018CA70->speedometerX + 0x18);
D_8018CFF4 = (f32) (D_8018CA70->speedometerY + 6);
init_course_object();
playerHUD->speedometerX = 0x0156;
playerHUD->speedometerY = 0x0106;
D_8018CFEC = (f32) (playerHUD->speedometerX + 0x18);
D_8018CFF4 = (f32) (playerHUD->speedometerY + 6);
D_8016579E = 0xDD00;
D_8018CA70->rankX = 0x0034;
D_8018CA70->rankY = 0x00C8;
D_8018CA70->slideRankX = 0;
D_8018CA70->slideRankY = 0;
D_8018CA70->timerX = 0x012C;
D_8018CA70->lap1CompletionTimeX = 0x012C;
D_8018CA70->lap2CompletionTimeX = 0x012C;
D_8018CA70->timerY = 0x0011;
D_8018CA70->lapX = -0x0028;
D_8018CA70->lapAfterImage1X = -0x0028;
D_8018CA70->lapAfterImage2X = -0x0028;
D_8018CA70->lapY = 0x0019;
D_8018CA70->itemBoxX = 0x00A0;
D_8018CA70->itemBoxY = -0x0020;
D_8018CA70->slideItemBoxX = 0;
D_8018CA70->slideItemBoxY = 0;
D_8018CA70->stagingPosition = (s16) *gGPCurrentRaceRankByPlayerId;
playerHUD->rankX = 0x0034;
playerHUD->rankY = 0x00C8;
playerHUD->slideRankX = 0;
playerHUD->slideRankY = 0;
playerHUD->timerX = 0x012C;
playerHUD->lap1CompletionTimeX = 0x012C;
playerHUD->lap2CompletionTimeX = 0x012C;
playerHUD->timerY = 0x0011;
playerHUD->lapX = -0x0028;
playerHUD->lapAfterImage1X = -0x0028;
playerHUD->lapAfterImage2X = -0x0028;
playerHUD->lapY = 0x0019;
playerHUD->itemBoxX = 0x00A0;
playerHUD->itemBoxY = -0x0020;
playerHUD->slideItemBoxX = 0;
playerHUD->slideItemBoxY = 0;
playerHUD->stagingPosition = (s16) *gGPCurrentRaceRankByPlayerId;
init_item_window(gItemWindowObjectByPlayerId[0]);
var_f0 = 35.0f;
var_v0 = &D_8018D078;
@ -1383,9 +1383,9 @@ void init_hud_one_player(void) {
D_8018D3EC = 0x000000FF;
D_8018D3F0 = 0x000000FF;
D_8018D3F4 = 1;
D_8018CA70->unk_4C = 0x0078;
D_8018CA70->unk_4A = 0x00A0;
D_8018CA70->rankScaling = 0.5f;
playerHUD->unk_4C = 0x0078;
playerHUD->unk_4A = 0x00A0;
playerHUD->rankScaling = 0.5f;
D_801656B0 = 0;
D_80165708 = 0x0028;
D_8018D00C = 5.0f;
@ -1422,60 +1422,60 @@ void init_hud_two_player_vertical(void) {
find_unused_obj_index(&gItemWindowObjectByPlayerId[0]);
find_unused_obj_index(&gItemWindowObjectByPlayerId[1]);
func_80070190();
init_object_list_index();
func_8007055C();
func_8007055C();
func_80070780();
init_course_object();
D_8018CA70[0].itemBoxX = -0x52;
D_8018CA70[0].itemBoxY = 0x32;
D_8018CA70[0].slideItemBoxX = 0;
D_8018CA70[0].slideItemBoxY = 0;
D_8018CA70[0].unk_4A = 0x50;
D_8018CA70[0].unk_4C = 0x78;
D_8018CA70[0].rankX = 0x32;
D_8018CA70[0].rankY = 0xD2;
D_8018CA70[0].slideRankX = 0;
D_8018CA70[0].slideRankY = 0;
D_8018CA70[0].timerX = 0x4B;
D_8018CA70[0].timerY = 0x10;
D_8018CA70[0].lapX = 0x67;
D_8018CA70[0].lapY = 0x28;
init_item_window(gItemWindowObjectByPlayerId[0]);
playerHUD[PLAYER_ONE].itemBoxX = -0x52;
playerHUD[PLAYER_ONE].itemBoxY = 0x32;
playerHUD[PLAYER_ONE].slideItemBoxX = 0;
playerHUD[PLAYER_ONE].slideItemBoxY = 0;
playerHUD[PLAYER_ONE].unk_4A = 0x50;
playerHUD[PLAYER_ONE].unk_4C = 0x78;
playerHUD[PLAYER_ONE].rankX = 0x32;
playerHUD[PLAYER_ONE].rankY = 0xD2;
playerHUD[PLAYER_ONE].slideRankX = 0;
playerHUD[PLAYER_ONE].slideRankY = 0;
playerHUD[PLAYER_ONE].timerX = 0x4B;
playerHUD[PLAYER_ONE].timerY = 0x10;
playerHUD[PLAYER_ONE].lapX = 0x67;
playerHUD[PLAYER_ONE].lapY = 0x28;
init_item_window(gItemWindowObjectByPlayerId[PLAYER_ONE]);
D_8018CA70[1].itemBoxX = 0x43;
D_8018CA70[1].itemBoxY = 0x32;
D_8018CA70[1].slideItemBoxX = 0;
D_8018CA70[1].slideItemBoxY = 0;
D_8018CA70[1].unk_4A = 0xF0;
D_8018CA70[1].unk_4C = 0x78;
D_8018CA70[1].rankX = 0xC8;
D_8018CA70[1].rankY = 0xD2;
D_8018CA70[1].slideRankX = 0;
D_8018CA70[1].slideRankY = 0;
D_8018CA70[1].timerX = 0xDC;
D_8018CA70[1].timerY = 0x10;
D_8018CA70[1].lapX = 0xF7;
D_8018CA70[1].lapY = 0x28;
init_item_window(gItemWindowObjectByPlayerId[1]);
playerHUD[PLAYER_TWO].itemBoxX = 0x43;
playerHUD[PLAYER_TWO].itemBoxY = 0x32;
playerHUD[PLAYER_TWO].slideItemBoxX = 0;
playerHUD[PLAYER_TWO].slideItemBoxY = 0;
playerHUD[PLAYER_TWO].unk_4A = 0xF0;
playerHUD[PLAYER_TWO].unk_4C = 0x78;
playerHUD[PLAYER_TWO].rankX = 0xC8;
playerHUD[PLAYER_TWO].rankY = 0xD2;
playerHUD[PLAYER_TWO].slideRankX = 0;
playerHUD[PLAYER_TWO].slideRankY = 0;
playerHUD[PLAYER_TWO].timerX = 0xDC;
playerHUD[PLAYER_TWO].timerY = 0x10;
playerHUD[PLAYER_TWO].lapX = 0xF7;
playerHUD[PLAYER_TWO].lapY = 0x28;
init_item_window(gItemWindowObjectByPlayerId[PLAYER_TWO]);
D_8018CA70[0].stagingPosition = (s16) gGPCurrentRaceRankByPlayerId[0];
D_8018CA70[1].stagingPosition = (s16) gGPCurrentRaceRankByPlayerId[1];
playerHUD[PLAYER_ONE].stagingPosition = (s16) gGPCurrentRaceRankByPlayerId[0];
playerHUD[PLAYER_TWO].stagingPosition = (s16) gGPCurrentRaceRankByPlayerId[1];
D_8018CA70[0].rankScaling = D_8018CA70[1].rankScaling = 0.5f;
playerHUD[PLAYER_ONE].rankScaling = playerHUD[PLAYER_TWO].rankScaling = 0.5f;
D_8018D3C4 = 0x1E;
D_8018D3BC = 0x18;
D_8018D3C0 = 0x28;
D_801657A2 = 0x666;
switch (gModeSelection) { /* irregular */
case 0:
case GRAND_PRIX:
D_8018D158 = 8;
break;
case 2:
case VERSUS:
D_8018D158 = 2;
break;
case 3:
case BATTLE:
D_8018D158 = 2;
break;
}
@ -1492,51 +1492,51 @@ void init_hud_two_player_horizontal() {
find_unused_obj_index(&gItemWindowObjectByPlayerId[0]);
find_unused_obj_index(&gItemWindowObjectByPlayerId[1]);
func_80070190();
init_object_list_index();
func_8007055C();
func_8007055C();
func_80070780();
init_course_object();
D_8018CA70[0].itemBoxY = 0x22;
D_8018CA70[0].itemBoxX = -0x53;
D_8018CA70[0].slideItemBoxX = 0;
D_8018CA70[0].slideItemBoxY = 0;
D_8018CA70[0].unk_4A = 0xA0;
D_8018CA70[0].unk_4C = 0x3C;
D_8018CA70[0].rankX = 0x34;
D_8018CA70[0].rankY = 0x62;
D_8018CA70[0].slideRankX = 0;
D_8018CA70[0].slideRankY = 0;
D_8018CA70[0].timerX = 0xEA;
D_8018CA70[0].timerY = 0x10;
D_8018CA70[0].lapX = 0x101;
D_8018CA70[0].lapY = 0x6A;
playerHUD[PLAYER_ONE].itemBoxY = 0x22;
playerHUD[PLAYER_ONE].itemBoxX = -0x53;
playerHUD[PLAYER_ONE].slideItemBoxX = 0;
playerHUD[PLAYER_ONE].slideItemBoxY = 0;
playerHUD[PLAYER_ONE].unk_4A = 0xA0;
playerHUD[PLAYER_ONE].unk_4C = 0x3C;
playerHUD[PLAYER_ONE].rankX = 0x34;
playerHUD[PLAYER_ONE].rankY = 0x62;
playerHUD[PLAYER_ONE].slideRankX = 0;
playerHUD[PLAYER_ONE].slideRankY = 0;
playerHUD[PLAYER_ONE].timerX = 0xEA;
playerHUD[PLAYER_ONE].timerY = 0x10;
playerHUD[PLAYER_ONE].lapX = 0x101;
playerHUD[PLAYER_ONE].lapY = 0x6A;
D_8018CA70[1].itemBoxX = -0x53;
D_8018CA70[1].itemBoxY = 0x8F;
D_8018CA70[1].slideItemBoxX = 0;
D_8018CA70[1].slideItemBoxY = 0;
D_8018CA70[1].unk_4A = 0xA0;
D_8018CA70[1].unk_4C = 0xB4;
D_8018CA70[1].rankX = 0x34;
D_8018CA70[1].rankY = 0xD2;
D_8018CA70[1].slideRankX = 0;
D_8018CA70[1].slideRankY = 0;
D_8018CA70[1].timerX = 0xEA;
D_8018CA70[1].timerY = 0x7F;
D_8018CA70[1].lapX = 0x101;
D_8018CA70[1].lapY = 0xDA;
playerHUD[PLAYER_TWO].itemBoxX = -0x53;
playerHUD[PLAYER_TWO].itemBoxY = 0x8F;
playerHUD[PLAYER_TWO].slideItemBoxX = 0;
playerHUD[PLAYER_TWO].slideItemBoxY = 0;
playerHUD[PLAYER_TWO].unk_4A = 0xA0;
playerHUD[PLAYER_TWO].unk_4C = 0xB4;
playerHUD[PLAYER_TWO].rankX = 0x34;
playerHUD[PLAYER_TWO].rankY = 0xD2;
playerHUD[PLAYER_TWO].slideRankX = 0;
playerHUD[PLAYER_TWO].slideRankY = 0;
playerHUD[PLAYER_TWO].timerX = 0xEA;
playerHUD[PLAYER_TWO].timerY = 0x7F;
playerHUD[PLAYER_TWO].lapX = 0x101;
playerHUD[PLAYER_TWO].lapY = 0xDA;
if (gModeSelection == 3) {
D_8018CA70[0].itemBoxY = 0x5E;
D_8018CA70[1].itemBoxY = 0xD0;
if (gModeSelection == BATTLE) {
playerHUD[PLAYER_ONE].itemBoxY = 0x5E;
playerHUD[PLAYER_TWO].itemBoxY = 0xD0;
}
D_8018CA70[0].rankScaling = D_8018CA70[1].rankScaling = 0.5f;
playerHUD[PLAYER_ONE].rankScaling = playerHUD[PLAYER_TWO].rankScaling = 0.5f;
D_8018CA70[0].stagingPosition = (s16) gGPCurrentRaceRankByPlayerId[0];
D_8018CA70[1].stagingPosition = (s16) gGPCurrentRaceRankByPlayerId[1];
playerHUD[PLAYER_ONE].stagingPosition = (s16) gGPCurrentRaceRankByPlayerId[0];
playerHUD[PLAYER_TWO].stagingPosition = (s16) gGPCurrentRaceRankByPlayerId[1];
init_item_window(gItemWindowObjectByPlayerId[0]);
init_item_window((gItemWindowObjectByPlayerId[1]));
@ -1546,13 +1546,13 @@ void init_hud_two_player_horizontal() {
D_8018D3C0 = 0x28;
D_801657A2 = 0x666;
switch (gModeSelection) { /* irregular */
case 0:
case GRAND_PRIX:
D_8018D158 = 8;
return;
case 2:
case VERSUS:
D_8018D158 = 2;
return;
case 3:
case BATTLE:
D_8018D158 = 2;
return;
}
@ -1572,89 +1572,89 @@ void init_hud_three_four_player(void) {
find_unused_obj_index(&gItemWindowObjectByPlayerId[2]);
find_unused_obj_index(&gItemWindowObjectByPlayerId[3]);
func_80070190();
func_80070780();
init_object_list_index();
init_course_object();
D_8018CA70[0].itemBoxX = -0x36;
D_8018CA70[0].itemBoxY = 0x36;
D_8018CA70[0].slideItemBoxX = 0;
D_8018CA70[0].slideItemBoxY = 0;
D_8018CA70[0].unk_4A = 0x50;
D_8018CA70[0].unk_4C = 0x3C;
D_8018CA70[0].rankX = 0x25;
D_8018CA70[0].rankY = 0x64;
D_8018CA70[0].slideRankX = 0;
D_8018CA70[0].slideRankY = 0;
D_8018CA70[0].lapX = 0x8C;
D_8018CA70[0].lapY = 0x60;
D_8018CA70[0].unk_6C = 0xDE;
D_8018CA70[0].unk_6E = 0xC8;
playerHUD[PLAYER_ONE].itemBoxX = -0x36;
playerHUD[PLAYER_ONE].itemBoxY = 0x36;
playerHUD[PLAYER_ONE].slideItemBoxX = 0;
playerHUD[PLAYER_ONE].slideItemBoxY = 0;
playerHUD[PLAYER_ONE].unk_4A = 0x50;
playerHUD[PLAYER_ONE].unk_4C = 0x3C;
playerHUD[PLAYER_ONE].rankX = 0x25;
playerHUD[PLAYER_ONE].rankY = 0x64;
playerHUD[PLAYER_ONE].slideRankX = 0;
playerHUD[PLAYER_ONE].slideRankY = 0;
playerHUD[PLAYER_ONE].lapX = 0x8C;
playerHUD[PLAYER_ONE].lapY = 0x60;
playerHUD[PLAYER_ONE].unk_6C = 0xDE;
playerHUD[PLAYER_ONE].unk_6E = 0xC8;
D_8018CA70[1].itemBoxX = 0x175;
D_8018CA70[1].itemBoxY = 0x36;
D_8018CA70[1].slideItemBoxX = 0;
D_8018CA70[1].slideItemBoxY = 0;
D_8018CA70[1].unk_4A = 0xF0;
D_8018CA70[1].unk_4C = 0x3C;
D_8018CA70[1].rankX = 0x11A;
D_8018CA70[1].rankY = 0x64;
D_8018CA70[1].slideRankX = 0;
D_8018CA70[1].slideRankY = 0;
D_8018CA70[1].lapX = 0xB4;
D_8018CA70[1].lapY = 0x60;
D_8018CA70[1].unk_6C = 0xC8;
D_8018CA70[1].unk_6E = 0xC8;
playerHUD[PLAYER_TWO].itemBoxX = 0x175;
playerHUD[PLAYER_TWO].itemBoxY = 0x36;
playerHUD[PLAYER_TWO].slideItemBoxX = 0;
playerHUD[PLAYER_TWO].slideItemBoxY = 0;
playerHUD[PLAYER_TWO].unk_4A = 0xF0;
playerHUD[PLAYER_TWO].unk_4C = 0x3C;
playerHUD[PLAYER_TWO].rankX = 0x11A;
playerHUD[PLAYER_TWO].rankY = 0x64;
playerHUD[PLAYER_TWO].slideRankX = 0;
playerHUD[PLAYER_TWO].slideRankY = 0;
playerHUD[PLAYER_TWO].lapX = 0xB4;
playerHUD[PLAYER_TWO].lapY = 0x60;
playerHUD[PLAYER_TWO].unk_6C = 0xC8;
playerHUD[PLAYER_TWO].unk_6E = 0xC8;
D_8018CA70[2].itemBoxX = -0x36;
D_8018CA70[2].itemBoxY = 0x2D;
D_8018CA70[2].slideItemBoxX = 0;
D_8018CA70[2].slideItemBoxY = 0;
D_8018CA70[2].unk_4A = 0x50;
D_8018CA70[2].unk_4C = 0xB4;
D_8018CA70[2].rankX = 0x25;
D_8018CA70[2].rankY = 0xD2;
D_8018CA70[2].slideRankX = 0;
D_8018CA70[2].slideRankY = 0;
D_8018CA70[2].lapX = 0x8C;
D_8018CA70[2].lapY = 0xD4;
D_8018CA70[2].unk_6C = 0xDE;
D_8018CA70[2].unk_6E = 0xC0;
playerHUD[PLAYER_THREE].itemBoxX = -0x36;
playerHUD[PLAYER_THREE].itemBoxY = 0x2D;
playerHUD[PLAYER_THREE].slideItemBoxX = 0;
playerHUD[PLAYER_THREE].slideItemBoxY = 0;
playerHUD[PLAYER_THREE].unk_4A = 0x50;
playerHUD[PLAYER_THREE].unk_4C = 0xB4;
playerHUD[PLAYER_THREE].rankX = 0x25;
playerHUD[PLAYER_THREE].rankY = 0xD2;
playerHUD[PLAYER_THREE].slideRankX = 0;
playerHUD[PLAYER_THREE].slideRankY = 0;
playerHUD[PLAYER_THREE].lapX = 0x8C;
playerHUD[PLAYER_THREE].lapY = 0xD4;
playerHUD[PLAYER_THREE].unk_6C = 0xDE;
playerHUD[PLAYER_THREE].unk_6E = 0xC0;
D_8018CA70[3].itemBoxX = 0x175;
D_8018CA70[3].itemBoxY = 0x2D;
D_8018CA70[3].slideItemBoxX = 0;
D_8018CA70[3].slideItemBoxY = 0;
D_8018CA70[3].unk_4A = 0xF0;
D_8018CA70[3].unk_4C = 0xB4;
D_8018CA70[3].rankX = 0x11A;
D_8018CA70[3].rankY = 0xD2;
D_8018CA70[3].slideRankX = 0;
D_8018CA70[3].slideRankY = 0;
D_8018CA70[3].lapX = 0xB4;
D_8018CA70[3].lapY = 0xD4;
D_8018CA70[3].unk_6C = 0xC8;
D_8018CA70[3].unk_6E = 0xC0;
playerHUD[PLAYER_FOUR].itemBoxX = 0x175;
playerHUD[PLAYER_FOUR].itemBoxY = 0x2D;
playerHUD[PLAYER_FOUR].slideItemBoxX = 0;
playerHUD[PLAYER_FOUR].slideItemBoxY = 0;
playerHUD[PLAYER_FOUR].unk_4A = 0xF0;
playerHUD[PLAYER_FOUR].unk_4C = 0xB4;
playerHUD[PLAYER_FOUR].rankX = 0x11A;
playerHUD[PLAYER_FOUR].rankY = 0xD2;
playerHUD[PLAYER_FOUR].slideRankX = 0;
playerHUD[PLAYER_FOUR].slideRankY = 0;
playerHUD[PLAYER_FOUR].lapX = 0xB4;
playerHUD[PLAYER_FOUR].lapY = 0xD4;
playerHUD[PLAYER_FOUR].unk_6C = 0xC8;
playerHUD[PLAYER_FOUR].unk_6E = 0xC0;
if (gModeSelection == 3) {
D_8018CA70[0].itemBoxY = 0xC8;
D_8018CA70[1].itemBoxY = 0xC8;
D_8018CA70[2].itemBoxY = 0xB8;
D_8018CA70[3].itemBoxY = 0xB8;
if (gModeSelection == BATTLE) {
playerHUD[PLAYER_ONE].itemBoxY = 0xC8;
playerHUD[PLAYER_TWO].itemBoxY = 0xC8;
playerHUD[PLAYER_THREE].itemBoxY = 0xB8;
playerHUD[PLAYER_FOUR].itemBoxY = 0xB8;
}
D_8018CA70[0].rankScaling = D_8018CA70[1].rankScaling = D_8018CA70[2].rankScaling = D_8018CA70[3].rankScaling = 0.5f;
playerHUD[PLAYER_ONE].rankScaling = playerHUD[PLAYER_TWO].rankScaling = playerHUD[PLAYER_THREE].rankScaling = playerHUD[PLAYER_FOUR].rankScaling = 0.5f;
D_8018CA70[0].stagingPosition = (s16) gGPCurrentRaceRankByPlayerId[0];
D_8018CA70[1].stagingPosition = (s16) gGPCurrentRaceRankByPlayerId[1];
D_8018CA70[2].stagingPosition = (s16) gGPCurrentRaceRankByPlayerId[2];
D_8018CA70[3].stagingPosition = (s16) gGPCurrentRaceRankByPlayerId[3];
playerHUD[PLAYER_ONE].stagingPosition = (s16) gGPCurrentRaceRankByPlayerId[0];
playerHUD[PLAYER_TWO].stagingPosition = (s16) gGPCurrentRaceRankByPlayerId[1];
playerHUD[PLAYER_THREE].stagingPosition = (s16) gGPCurrentRaceRankByPlayerId[2];
playerHUD[PLAYER_FOUR].stagingPosition = (s16) gGPCurrentRaceRankByPlayerId[3];
init_item_window(gItemWindowObjectByPlayerId[0]);
init_item_window(gItemWindowObjectByPlayerId[1]);
init_item_window(gItemWindowObjectByPlayerId[2]);
init_item_window(gItemWindowObjectByPlayerId[3]);
D_8018CA70[0].unknownScaling = D_8018CA70[1].unknownScaling = D_8018CA70[2].unknownScaling = D_8018CA70[3].unknownScaling = 1.5f;
playerHUD[PLAYER_ONE].unknownScaling = playerHUD[PLAYER_TWO].unknownScaling = playerHUD[PLAYER_THREE].unknownScaling = playerHUD[PLAYER_FOUR].unknownScaling = 1.5f;
D_8018D158 = (s32) gPlayerCount;
D_8018D3C4 = 0x00000014;

View File

@ -5,9 +5,9 @@
#include "code_80071F00.h"
void init_object_list(void);
void func_8006EA5C(void);
void reset_object_variable(void);
void func_8006EB10(void);
void func_8006ED60(void);
void clear_object_list(void);
u8 *func_8006ED94(u8*, u8*, u32, u32);
void func_8006EE44(void);
void init_item_window(s32);
@ -16,14 +16,14 @@ void func_8006EF60(void);
void func_8006F824(s32);
void func_8006FA94(void);
void func_80070148(void);
void func_80070190(void);
void init_object_list_index(void);
void func_80070250(s32, s32, StarSpawn*);
void func_80070328(StarSpawn*);
void func_800703E0(s32, s32, StarSpawn*);
void func_800704A0(StarSpawn*);
void func_8007055C(void);
void func_80070714(void);
void func_80070780(void);
void init_course_object(void);
void init_hud_one_player(void);
void init_hud_two_player_vertical(void);
void init_hud_three_four_player(void);
@ -36,7 +36,7 @@ extern u8 *gCourseOutlineTextures[0x14];
extern s16 D_80165730;
extern s16 D_80165740;
extern s16 D_80165748;
extern s32 D_80183D5C;
extern s32 objectListSize;
extern u8 *D_8018D1E0;
extern intptr_t D_8018D9B0;
@ -51,9 +51,9 @@ extern s16 D_8018D2B8;
extern s32 D_80183DA0;
extern s32 D_80183DBC;
extern struct_8018CA70_entry D_8018CA70[];
// These are all *technically* hardcoded references to spots in D_8018CA70, but there's something weird
// going on match wise in func_8006EA5C that means we have to (for now) leave them as separate variables
extern hud_player playerHUD[];
// These are all *technically* hardcoded references to spots in playerHUD, but there's something weird
// going on match wise in reset_object_variable that means we have to (for now) leave them as separate variables
extern s8 D_8018CAE0;
extern s8 D_8018CAE1;
extern s8 D_8018CAE2;

View File

@ -98,7 +98,7 @@ s32 find_unused_obj_index(s32* arg0) {
s32 temp_v0;
s32 temp_v1;
temp_v1 = D_80183D5C;
temp_v1 = objectListSize;
temp_v0 = 0; do
{
++temp_v1;
@ -113,7 +113,7 @@ s32 find_unused_obj_index(s32* arg0) {
gObjectList[temp_v1].unk_0CA = 1;
*arg0 = temp_v1;
D_80183D5C = temp_v1;
objectListSize = temp_v1;
return temp_v1;
}
@ -255,7 +255,7 @@ void set_object_unk_0CB(s32 objectIndex, s32 arg1) {
gObjectList[objectIndex].unk_0CB = arg1;
}
void func_800723A4(s32 objectIndex, s32 arg1) {
void init_object(s32 objectIndex, s32 arg1) {
gObjectList[objectIndex].unk_054 = 0;
gObjectList[objectIndex].unk_058 = 0;
gObjectList[objectIndex].unk_05C = 0;
@ -437,7 +437,7 @@ void func_800729EC(s32 objectIndex) {
if (gCurrentCourseId != COURSE_YOSHI_VALLEY) {
for (i = 0; i < gPlayerCount; i++) {
D_8018CA70[i].unk_81 = temp_v1;
playerHUD[i].unk_81 = temp_v1;
}
}
func_8005AB20();
@ -1315,7 +1315,7 @@ extern s16 D_80165728;
extern struct _struct_D_800E6F30_0x3 D_800E6F30[8];
extern struct _struct_D_800E6F30_0x3 D_800E6F48[8];
//extern f32 D_8018D01C;
//extern f32 xOrientation;
// static struct _struct_D_800E6F30_0x3 D_800E6F30[8] = {
// { 0xC8, 1, 0 },
// { 0, 0x70, 1 },
@ -1357,7 +1357,7 @@ void func_80074924(s32 objectIndex) {
sp28 = random_int(D_80165748);
sp24 = random_int(0x0096U);
sp20 = random_int(0x2000U);
temp_s0->unk_010[0] = (f32) ((((f64) D_80165718 + 100.0) - (f64) sp2C) * (f64) D_8018D01C);
temp_s0->unk_010[0] = (f32) ((((f64) D_80165718 + 100.0) - (f64) sp2C) * (f64) xOrientation);
temp_s0->unk_010[1] = (f32) (D_80165720 + sp28);
temp_s0->unk_010[2] = (f32) (((f64) D_80165728 + 200.0) - (f64) sp24);
break;
@ -1366,7 +1366,7 @@ void func_80074924(s32 objectIndex) {
sp28 = random_int(D_80165748);
sp24 = random_int(0x00B4U);
sp20 = random_int(0x2000U);
temp_s0->unk_010[0] = (f32) ((((f64) D_80165718 + 180.0) - (f64) sp2C) * (f64) D_8018D01C);
temp_s0->unk_010[0] = (f32) ((((f64) D_80165718 + 180.0) - (f64) sp2C) * (f64) xOrientation);
temp_s0->unk_010[1] = (f32) (D_80165720 + sp28);
temp_s0->unk_010[2] = (f32) (((f64) D_80165728 + 200.0) - (f64) sp24);
break;
@ -1375,7 +1375,7 @@ void func_80074924(s32 objectIndex) {
sp28 = random_int(D_80165748);
sp24 = random_int(0x0096U);
sp20 = random_int(0x2000U);
temp_s0->unk_010[0] = (f32) ((((f64) D_80165718 + 150.0) - (f64) sp2C) * (f64) D_8018D01C);
temp_s0->unk_010[0] = (f32) ((((f64) D_80165718 + 150.0) - (f64) sp2C) * (f64) xOrientation);
temp_s0->unk_010[1] = (f32) (D_80165720 + sp28);
temp_s0->unk_010[2] = (f32) (((f64) D_80165728 + 200.0) - (f64) sp24);
break;
@ -1487,7 +1487,7 @@ void func_800750D8(s32 objectIndex, s32 arg1, Vec3f arg2, s32 arg3, s32 arg4) {
s32 temp_v0;
Objects *temp_v1;
func_800723A4(objectIndex, 0);
init_object(objectIndex, 0);
sp24 = random_int(0x01F4U);
temp_v0 = random_int(0x0032U);
temp_v1 = &gObjectList[objectIndex];
@ -1565,7 +1565,7 @@ void func_80075574(s32 objectIndex, Vec3f arg1, f32 arg2) {
Objects *temp_v1;
UNUSED s32 pad[2];
func_800723A4(objectIndex, 0);
init_object(objectIndex, 0);
temp_v1 = &gObjectList[objectIndex];
temp_v1->unk_010[0] = arg1[0];
temp_v1->unk_010[1] = arg1[1];
@ -1687,7 +1687,7 @@ void func_80075838(void) {
void func_800759EC(s32 objectIndex, Vec3f arg1, f32 arg2) {
Objects *temp_v0;
func_800723A4(objectIndex, 0);
init_object(objectIndex, 0);
temp_v0 = &gObjectList[objectIndex];
temp_v0->unk_010[0] = arg1[0];
temp_v0->unk_010[1] = arg1[1];
@ -1813,7 +1813,7 @@ void func_80075CA8(void) {
void func_80075E5C(s32 objectIndex, Vec3f arg1, u16 arg2, f32 arg3, s32 arg4) {
Objects *temp_v0;
func_800723A4(objectIndex, 0);
init_object(objectIndex, 0);
temp_v0 = &gObjectList[objectIndex];
temp_v0->sizeScaling = 0.5f;
temp_v0->unk_0D5 = 5;
@ -1888,14 +1888,14 @@ void func_8007614C(void) {
s32 someIndex;
for (someIndex = 0; someIndex < 4; someIndex++) {
func_8007601C(D_8018BFA8[someIndex]);
func_8007601C(indexObjectList3[someIndex]);
}
}
void func_80076194(s32 objectIndex, Vec3f arg1, f32 arg2, s32 arg3) {
Objects *temp_v0;
func_800723A4(objectIndex, 0);
init_object(objectIndex, 0);
temp_v0 = &gObjectList[objectIndex];
temp_v0->unk_0D5 = 4;
temp_v0->sizeScaling = 1.0f;
@ -2008,7 +2008,7 @@ void func_80076538(s32 objectIndex) {
void func_8007661C(void) {
s32 objectIndex;
objectIndex = D_80183F28[0];
objectIndex = indexObjectList2[0];
if (gObjectList[objectIndex].unk_04C > 0) {
gObjectList[objectIndex].unk_04C--;
if (gObjectList[objectIndex].unk_04C == 0) {
@ -2044,7 +2044,7 @@ void func_8007661C(void) {
void func_8007675C(s32 objectIndex, Vec3s arg1, s32 arg2) {
Objects *temp_v0;
func_800723A4(objectIndex, 0);
init_object(objectIndex, 0);
temp_v0 = &gObjectList[objectIndex];
temp_v0->unk_0D5 = 9;
temp_v0->sizeScaling = 1.0f;
@ -2200,7 +2200,7 @@ void func_80076B84(void) {
void func_80076C9C(s32 objectIndex, Vec3f arg1, s16 arg2) {
Objects *temp_v0;
func_800723A4(objectIndex, (s32) arg2);
init_object(objectIndex, (s32) arg2);
temp_v0 = &gObjectList[objectIndex];
temp_v0->unk_0D5 = 0x0A;
temp_v0->activeTexture = D_0D02BC58;
@ -2276,7 +2276,7 @@ void func_80076F2C(void) {
}
void func_80076FEC(s32 objectIndex, s32 flameIndex) {
func_800723A4(objectIndex, 3);
init_object(objectIndex, 3);
gObjectList[objectIndex].unk_0D5 = 0xB;
gObjectList[objectIndex].activeTexture = D_0D02BC58;
@ -2285,7 +2285,7 @@ void func_80076FEC(s32 objectIndex, s32 flameIndex) {
// Mixing arr + offset and array access... Why?
// todo: ifdef this to proper array access.
gObjectList[objectIndex].unk_010[0] = (f32)(intptr_t)(*(&gTorchSpawns + flameIndex * 3)[0]) * D_8018D01C;
gObjectList[objectIndex].unk_010[0] = (f32)(intptr_t)(*(&gTorchSpawns + flameIndex * 3)[0]) * xOrientation;
gObjectList[objectIndex].unk_010[1] = (f32)(intptr_t)(*(&gTorchSpawns + flameIndex * 3)[1]);
gObjectList[objectIndex].unk_010[2] = (f32)(intptr_t)(*(&gTorchSpawns + flameIndex * 3)[2]);
gObjectList[objectIndex].unk_034 = 0;
@ -2309,7 +2309,7 @@ void func_80077138(s32 objectIndex, Vec3f arg1, s32 arg2) {
s8 temp_v0_3;
Vec3s sp30;
func_800723A4(objectIndex, arg2);
init_object(objectIndex, arg2);
gObjectList[objectIndex].unk_0D5 = 0x0C;
gObjectList[objectIndex].sizeScaling = 0.05f;
func_8008B7D4(objectIndex, arg1[0], arg1[1], arg1[2]);
@ -2439,7 +2439,7 @@ void func_80077700(s32 objectIndex, Vec3f arg1, s32 arg2) {
u16 sp3E;
u16 sp3C;
func_800723A4(objectIndex, 0);
init_object(objectIndex, 0);
gObjectList[objectIndex].unk_0D5 = 7;
gObjectList[objectIndex].activeTLUT = (u32 *) D_0D028DD8;
gObjectList[objectIndex].tlutList = (u32 *) D_0D028DD8;
@ -2566,7 +2566,7 @@ void func_80077D5C(s32 arg0) {
}
objectIndex = D_8018CC80[arg0 + D_8018D17C];
if (gObjectList[objectIndex].state == 0) {
func_800723A4(objectIndex, 1);
init_object(objectIndex, 1);
break;
}
}
@ -2768,7 +2768,7 @@ void func_80078790(void) {
D_8018D174 = 0;
}
if (gObjectList[D_8018C1B0[D_8018D174]].state == 0) {
func_800723A4(D_8018C1B0[D_8018D174], 1);
init_object(D_8018C1B0[D_8018D174], 1);
break;
}
}
@ -2976,39 +2976,39 @@ void func_80078C70(s32 arg0) {
void func_80078F64(void) {
switch (gScreenModeSelection) { /* irregular */
case SCREEN_MODE_1P:
func_800723A4(D_80183DB8[0], 1);
init_object(D_80183DB8[0], 1);
break;
case SCREEN_MODE_2P_SPLITSCREEN_VERTICAL:
func_800723A4(D_80183DB8[0], 1);
func_800723A4(D_80183DB8[1], 1);
init_object(D_80183DB8[0], 1);
init_object(D_80183DB8[1], 1);
break;
case SCREEN_MODE_2P_SPLITSCREEN_HORIZONTAL:
func_800723A4(D_80183DB8[0], 1);
func_800723A4(D_80183DB8[1], 1);
init_object(D_80183DB8[0], 1);
init_object(D_80183DB8[1], 1);
break;
case SCREEN_MODE_3P_4P_SPLITSCREEN:
func_800723A4(D_80183DB8[0], 1);
func_800723A4(D_80183DB8[1], 1);
func_800723A4(D_80183DB8[2], 1);
func_800723A4(D_80183DB8[3], 1);
init_object(D_80183DB8[0], 1);
init_object(D_80183DB8[1], 1);
init_object(D_80183DB8[2], 1);
init_object(D_80183DB8[3], 1);
break;
}
}
void func_80079054(s32 playerId) {
func_800723A4(D_80183DB8[playerId], 2);
init_object(D_80183DB8[playerId], 2);
}
void func_80079084(s32 playerId) {
func_800723A4(D_80183DB8[playerId], 4);
init_object(D_80183DB8[playerId], 4);
}
void func_800790B4(s32 playerId) {
func_800723A4(D_80183DB8[playerId], 5);
init_object(D_80183DB8[playerId], 5);
}
void func_800790E4(s32 playerId) {
func_800723A4(D_80183DB8[playerId], 6);
init_object(D_80183DB8[playerId], 6);
}
void func_80079114(s32 objectIndex, s32 arg1, s32 arg2) {
@ -3205,10 +3205,10 @@ void func_800797AC(s32 playerId) {
objectIndex = D_80183DB8[playerId];
player = &gPlayerOne[playerId];
if ((gCurrentCourseId == COURSE_SHERBET_LAND) && (player->unk_0CA & 1)) {
func_800723A4(objectIndex, 7);
init_object(objectIndex, 7);
player->unk_0CA |= 0x10;
} else {
func_800723A4(objectIndex, 3);
init_object(objectIndex, 3);
}
func_800722A4(objectIndex, 1);
}
@ -3691,12 +3691,12 @@ void func_8007AA44(s32 playerId) {
void func_8007ABFC(s32 playerId, bool arg1) {
s32 itemWindow;
if (D_8018CA70[playerId].raceCompleteBool == FALSE) {
if (playerHUD[playerId].raceCompleteBool == FALSE) {
itemWindow = gItemWindowObjectByPlayerId[playerId];
if (func_80072354(itemWindow, 4) != 0) {
func_800723A4(itemWindow, 0);
init_object(itemWindow, 0);
if (arg1 != 0) {
D_8018CA70[playerId].itemOverride = arg1;
playerHUD[playerId].itemOverride = arg1;
}
}
func_800C9060(playerId, 0x19008406U);
@ -3789,9 +3789,9 @@ s16 func_8007AFB0(s32 objectIndex, s32 arg1) {
randomItem = gen_random_item_human(gLapCountByPlayerId[arg1], gGPCurrentRaceRankByPlayerId[arg1]);
if (D_8018CA70[arg1].itemOverride != 0) {
randomItem = (s16) D_8018CA70[arg1].itemOverride;
D_8018CA70[arg1].itemOverride = 0;
if (playerHUD[arg1].itemOverride != 0) {
randomItem = (s16) playerHUD[arg1].itemOverride;
playerHUD[arg1].itemOverride = 0;
}
func_800729B4(objectIndex, (s32) randomItem);
@ -3907,7 +3907,7 @@ void func_8007B34C(s32 playerId) {
sp40 = 1;
}
if (D_80165888 != 0) {
func_800723A4(temp_s0, 0);
init_object(temp_s0, 0);
}
temp_t0 = &gObjectList[temp_s0];
switch (temp_t0->state) {
@ -3916,25 +3916,25 @@ void func_8007B34C(s32 playerId) {
break;
case 2:
if (gActiveScreenMode == 0) {
s16_step_up_towards(&D_8018CA70[playerId].slideItemBoxY, 0x0040, 4);
if (D_8018CA70[playerId].slideItemBoxY == 0x0040) {
s16_step_up_towards(&playerHUD[playerId].slideItemBoxY, 0x0040, 4);
if (playerHUD[playerId].slideItemBoxY == 0x0040) {
func_80072488(temp_s0);
}
} else if (gActiveScreenMode == 3) {
if ((playerId == 0) || (playerId == 2)) {
s16_step_up_towards(&D_8018CA70[playerId].slideItemBoxX, 0x0080, 8);
if (D_8018CA70[playerId].slideItemBoxX == 0x0080) {
s16_step_up_towards(&playerHUD[playerId].slideItemBoxX, 0x0080, 8);
if (playerHUD[playerId].slideItemBoxX == 0x0080) {
func_80072488(temp_s0);
}
} else {
s16_step_down_towards(&D_8018CA70[playerId].slideItemBoxX, -0x0080, 8);
if (D_8018CA70[playerId].slideItemBoxX == -0x0080) {
s16_step_down_towards(&playerHUD[playerId].slideItemBoxX, -0x0080, 8);
if (playerHUD[playerId].slideItemBoxX == -0x0080) {
func_80072488(temp_s0);
}
}
} else {
s16_step_up_towards(&D_8018CA70[playerId].slideItemBoxX, 0x0080, 8);
if (D_8018CA70[playerId].slideItemBoxX == 0x0080) {
s16_step_up_towards(&playerHUD[playerId].slideItemBoxX, 0x0080, 8);
if (playerHUD[playerId].slideItemBoxX == 0x0080) {
func_80072488(temp_s0);
}
}
@ -3970,22 +3970,22 @@ void func_8007B34C(s32 playerId) {
break;
case 11:
if (gActiveScreenMode == 0) {
if (s16_step_down_towards(&D_8018CA70[playerId].slideItemBoxY, 0, 4) != 0) {
if (s16_step_down_towards(&playerHUD[playerId].slideItemBoxY, 0, 4) != 0) {
func_80072488(temp_s0);
}
} else if (gActiveScreenMode == 3) {
if ((playerId == 0) || (playerId == 2)) {
s16_step_down_towards(&D_8018CA70[playerId].slideItemBoxX, 0, 8);
if (D_8018CA70[playerId].slideItemBoxX == 0) {
s16_step_down_towards(&playerHUD[playerId].slideItemBoxX, 0, 8);
if (playerHUD[playerId].slideItemBoxX == 0) {
func_80072488(temp_s0);
}
} else {
s16_step_up_towards(&D_8018CA70[playerId].slideItemBoxX, 0, 8);
if (D_8018CA70[playerId].slideItemBoxX == 0) {
s16_step_up_towards(&playerHUD[playerId].slideItemBoxX, 0, 8);
if (playerHUD[playerId].slideItemBoxX == 0) {
func_80072488(temp_s0);
}
}
} else if (s16_step_down_towards(&D_8018CA70[playerId].slideItemBoxX, 0, 8) != 0) {
} else if (s16_step_down_towards(&playerHUD[playerId].slideItemBoxX, 0, 8) != 0) {
func_80072488(temp_s0);
}
break;
@ -4125,11 +4125,11 @@ void func_8007BBBC(s32 objectIndex) {
void func_8007BD04(s32 playerId) {
s32 objectIndex;
objectIndex = D_80183F28[0];
objectIndex = indexObjectList2[0];
if (gObjectList[objectIndex].state == 0) {
if (((s32) gNearestWaypointByPlayerId[playerId] >= 0xA0) && ((s32) gNearestWaypointByPlayerId[playerId] < 0xAB)) {
func_8008B7D4(objectIndex, D_8018D01C * -1650.0, -200.0f, -1650.0f);
func_800723A4(objectIndex, 1);
func_8008B7D4(objectIndex, xOrientation * -1650.0, -200.0f, -1650.0f);
init_object(objectIndex, 1);
}
}
}
@ -4139,7 +4139,7 @@ void func_8007BDA8(void) {
s32 temp_a0;
func_8007BD04(0);
temp_a0 = D_80183F28[0];
temp_a0 = indexObjectList2[0];
func_8007BBBC(temp_a0);
func_8008BF18(temp_a0);
}
@ -4267,10 +4267,10 @@ void func_8007BFB0(s32 objectIndex) {
void func_8007C280(void) {
s32 objectIndex;
objectIndex = D_80183F28[0];
objectIndex = indexObjectList2[0];
if (D_801658BC == 1) {
D_801658BC = 0;
func_800723A4(objectIndex, 0);
init_object(objectIndex, 0);
}
if (gObjectList[objectIndex].state != 0) {
func_8007BEC8(objectIndex);
@ -4442,8 +4442,8 @@ void func_8007C7B4(s32 someIndex, s32 arg1) {
s16 *something;
for (temp_a0 = 0; temp_a0 < 5; temp_a0++) {
objectIndex = D_8018BFA8[someIndex + temp_a0];
func_800723A4(objectIndex, 1);
objectIndex = indexObjectList3[someIndex + temp_a0];
init_object(objectIndex, 1);
gObjectList[objectIndex].unk_0D1 = arg1;
temp_s1_2 = random_int(0x003CU) - 0x1E;
temp_s4 = random_int(0x0014U) - 0xA;
@ -4469,7 +4469,7 @@ void func_8007C91C(s32 someIndex) {
s32 objectIndex;
for (temp_a0 = 0; temp_a0 < 5; temp_a0++) {
objectIndex = D_8018BFA8[someIndex + temp_a0];
objectIndex = indexObjectList3[someIndex + temp_a0];
gObjectList[objectIndex].unk_0DC += 1;
}
@ -4558,7 +4558,7 @@ void func_8007CC00(void) {
func_8007CA70();
for (someIndex = 0; someIndex < NUM_BOOS; someIndex++) {
objectIndex = D_8018BFA8[someIndex];
objectIndex = indexObjectList3[someIndex];
object = &gObjectList[objectIndex];
if (object->state != 0) {
func_8007C684(objectIndex);
@ -4664,7 +4664,7 @@ void func_8007D070(void) {
objectIndex = D_8018C1B0[var_v0 + 10];
if (var_v0 != 30) {
if (gObjectList[objectIndex].state == 0) {
func_800723A4(objectIndex, 1);
init_object(objectIndex, 1);
temp_s2 = random_int(0x012CU);
temp_s3 = random_int(0x1000U) - 0x800;
temp_t5 = random_int(0x000FU) - 5;
@ -4697,20 +4697,20 @@ void func_8007D070(void) {
void func_8007D360(s32 objectIndex, s32 arg1) {
if (arg1 == 1) {
gObjectList[objectIndex].unk_010[0] = (f32) ((-1775.0 - random_int(0x001EU)) * (f64) D_8018D01C);
gObjectList[objectIndex].unk_010[0] = (f32) ((-1775.0 - random_int(0x001EU)) * (f64) xOrientation);
gObjectList[objectIndex].unk_010[1] = (f32) (random_int(0x0019U) + 25.0);
gObjectList[objectIndex].unk_010[2] = (f32) (random_int(0x001EU) + 130.0);
gObjectList[objectIndex].unk_01C[0] = (f32) ((f64) D_8018D01C * -2500.0);
gObjectList[objectIndex].unk_01C[0] = (f32) ((f64) xOrientation * -2500.0);
gObjectList[objectIndex].unk_01C[1] = 0.0f;
gObjectList[objectIndex].unk_01C[2] = (f32) (220.0 - random_int(0x0096U));
gObjectList[objectIndex].unk_0BE[0] = 0xDC00;
gObjectList[objectIndex].unk_0C6 = 0x0800;
}
if (arg1 == 2) {
gObjectList[objectIndex].unk_010[0] = (f32) (-0x55B - random_int(0x001EU)) * D_8018D01C;
gObjectList[objectIndex].unk_010[0] = (f32) (-0x55B - random_int(0x001EU)) * xOrientation;
gObjectList[objectIndex].unk_010[1] = (f32) (random_int(0x0019U) + 0xF);
gObjectList[objectIndex].unk_010[2] = (f32) (random_int(0x001EU) - 0xE8);
gObjectList[objectIndex].unk_01C[0] = (f32) ((f64) D_8018D01C * -2100.0);
gObjectList[objectIndex].unk_01C[0] = (f32) ((f64) xOrientation * -2100.0);
gObjectList[objectIndex].unk_01C[1] = 0.0f;
gObjectList[objectIndex].unk_01C[2] = (f32) (random_int(0x00C8U) + -290.0);
gObjectList[objectIndex].unk_0BE[0] = 0;
@ -4720,7 +4720,7 @@ void func_8007D360(s32 objectIndex, s32 arg1) {
gObjectList[objectIndex].unk_0BE[2] = 0;
func_8008B80C(objectIndex, 0.0f, 0.0f, 0.0f);
gObjectList[objectIndex].unk_0B0 = 0;
if (gCCSelection < 2) {
if (gCCSelection < CC_150) {
gObjectList[objectIndex].unk_034 = (random_int(4U) + 4.0);
} else {
gObjectList[objectIndex].unk_034 = (random_int(4U) + 5.0);
@ -4748,7 +4748,7 @@ void func_8007D714(s32 arg0) {
var_v0 = func_80072044(D_8018C630, &D_80183E5C, 0x0000001E);
}
if (var_v0 != -1) {
func_800723A4(var_v0, 0);
init_object(var_v0, 0);
func_8007D6A8(var_v0, arg0);
}
}
@ -4866,7 +4866,7 @@ void func_8007DB44(void) {
if (D_8018D000 != 0) {
D_8018D000 -= 1;
}
temp_s0 = *D_80183EA0;
temp_s0 = *indexObjectList1;
func_80072E54(temp_s0, 0, 3, 1, 0, -1);
func_80073514(temp_s0);
temp_s1 = &gObjectList[temp_s0];
@ -5000,7 +5000,7 @@ void func_8007E00C(s32 objectIndex) {
case 4:
func_8007278C(objectIndex, 0x000000D2);
if (D_80165594 == 0) {
if (gCCSelection < 2) {
if (gCCSelection < CC_150) {
func_8007D714(1);
func_8007D714(1);
} else {
@ -5039,7 +5039,7 @@ void func_8007E00C(s32 objectIndex) {
}
void func_8007E1AC(void) {
s32 objectIndex = D_80183EA0[1];
s32 objectIndex = indexObjectList1[1];
func_8007E00C(objectIndex);
if (gModeSelection != TIME_TRIALS) {
func_8007DDC0(objectIndex);
@ -5087,7 +5087,7 @@ void func_8007E1F4(s32 objectIndex) {
}
void func_8007E358(s32 objectIndex) {
gObjectList[objectIndex].pos[0] = -1371.0f * D_8018D01C;
gObjectList[objectIndex].pos[0] = -1371.0f * xOrientation;
gObjectList[objectIndex].pos[1] = 31.0f;
gObjectList[objectIndex].pos[2] = -217.0f;
func_8008B8F0(objectIndex, 0.0f, 0.0f, 0.0f);
@ -5130,7 +5130,7 @@ void func_8007E3EC(s32 objectIndex) {
}
void func_8007E4C4(void) {
s32 objectIndex = D_80183EA0[2];
s32 objectIndex = indexObjectList1[2];
func_8007E3EC(objectIndex);
if (gModeSelection != TIME_TRIALS) {
func_8007E1F4(objectIndex);
@ -5390,7 +5390,7 @@ void func_8007EFBC(s32 objectIndex) {
switch (gObjectList[objectIndex].unk_0AE) {
case 1:
if (func_80073E18(objectIndex, (u16 *) &gObjectList[objectIndex].unk_0B2[1], 0x0800U, 0x00008000) != 0) {
gObjectList[objectIndex].unk_01C[0] = (f32) ((f64) D_8018D01C * 200.0);
gObjectList[objectIndex].unk_01C[0] = (f32) ((f64) xOrientation * 200.0);
func_80086FD4(objectIndex);
}
break;
@ -5466,7 +5466,7 @@ void func_8007F280(s32 objectIndex) {
switch (gObjectList[objectIndex].unk_0AE) {
case 1:
if (func_80073E18(objectIndex, (u16 *) &gObjectList[objectIndex].unk_0B2[1], 0x0400U, 0x00010000) != 0) {
gObjectList[objectIndex].unk_01C[0] = (f32) ((f64) D_8018D01C * -200.0);
gObjectList[objectIndex].unk_01C[0] = (f32) ((f64) xOrientation * -200.0);
func_80086FD4(objectIndex);
}
break;
@ -5605,7 +5605,7 @@ s32 func_8007F75C(s32 playerId) {
if ((waypoint >= 0xAA) && (waypoint < 0xB5)) {
temp_s7 = random_int(0x0032U) + 0x32;
for (someIndex = 0; someIndex < gNumActiveThwomps; someIndex++) {
objectIndex = D_80183EA0[someIndex];
objectIndex = indexObjectList1[someIndex];
if (gObjectList[objectIndex].unk_0D5 == 3) {
var_s6 = 1;
func_8007F660(objectIndex, playerId, temp_s7);
@ -5613,7 +5613,7 @@ s32 func_8007F75C(s32 playerId) {
}
} else if ((waypoint >= 0xD7) && (waypoint < 0xE2)) {
for (someIndex = 0; someIndex < gNumActiveThwomps; someIndex++) {
objectIndex = D_80183EA0[someIndex];
objectIndex = indexObjectList1[someIndex];
if (gObjectList[objectIndex].unk_0D5 == 3) {
var_s6 = 1;
func_8007F6C4(objectIndex, playerId);
@ -5634,7 +5634,7 @@ void func_8007F8D8(void) {
player = gPlayerOne;
var_s4 = 1;
for (someIndex = 0; someIndex < gNumActiveThwomps; someIndex++){
objectIndex = D_80183EA0[someIndex];
objectIndex = indexObjectList1[someIndex];
object = &gObjectList[objectIndex];
if (object->unk_0D5 == 3) {
var_s0 = 0;
@ -5696,7 +5696,7 @@ void func_8007FB48(s32 objectIndex) {
func_80086FD4(objectIndex);
break;
case 2:
gObjectList[objectIndex].unk_038[0] = player->unk_094 * D_8018D01C * 1.25;
gObjectList[objectIndex].unk_038[0] = player->unk_094 * xOrientation * 1.25;
if (gObjectList[objectIndex].unk_048 >= gObjectList[objectIndex].unk_0B0) {
if (gObjectList[objectIndex].unk_0B0 == gObjectList[objectIndex].unk_048) {
if (D_8018D400 & 1) {
@ -6134,7 +6134,7 @@ void func_80080E8C(s32 objectIndex1, s32 objectIndex2, s32 arg2) {
f32 thing1;
f32 *temp_v1;
func_800723A4(objectIndex1, arg2);
init_object(objectIndex1, arg2);
temp_v1 = D_800E594C[arg2];
gObjectList[objectIndex1].unk_0D5 = 2;
anAngle = gObjectList[objectIndex2].unk_0BE[1];
@ -6214,13 +6214,13 @@ void func_80081210(void) {
D_80165834[0] += 0x100;
D_80165834[1] += 0x200;
for (var_s4 = 0; var_s4 < gNumActiveThwomps; var_s4++) {
objectIndex = D_80183EA0[var_s4];
objectIndex = indexObjectList1[var_s4];
func_800722CC(objectIndex, 0x00000010);
func_8008A4CC(objectIndex);
}
func_8007F8D8();
for (var_s4 = 0; var_s4 < gNumActiveThwomps; var_s4++) {
objectIndex = D_80183EA0[var_s4];
objectIndex = indexObjectList1[var_s4];
if (gObjectList[objectIndex].state != 0) {
switch (gObjectList[objectIndex].unk_0D5) {
case 1:
@ -6249,7 +6249,7 @@ void func_80081210(void) {
player->boundingBoxCorners[0].unk_14 &= ~3;
player->unk_046 &= ~0x0006;
for (var_s2_3 = 0; var_s2_3 < gNumActiveThwomps; var_s2_3++) {
objectIndex = D_80183EA0[var_s2_3];
objectIndex = indexObjectList1[var_s2_3];
if (!(player->effects & 0x80000000)) {
func_80080B28(objectIndex, var_s4);
}
@ -6263,7 +6263,7 @@ void func_80081210(void) {
}
func_8007542C(3);
for (var_s4 = 0; var_s4 < gNumActiveThwomps; var_s4++) {
objectIndex = D_80183EA0[var_s4];
objectIndex = indexObjectList1[var_s4];
if (func_80072320(objectIndex, 0x00000020) == 0) continue;
func_800722CC(objectIndex, 0x00000020);
@ -6298,7 +6298,7 @@ void func_8008153C(s32 objectIndex) {
if (gObjectList[loopObjectIndex].state != 0) continue;
func_800723A4(loopObjectIndex, 0);
init_object(loopObjectIndex, 0);
gObjectList[loopObjectIndex].activeTLUT = d_course_moo_moo_farm_mole_dirt;
gObjectList[loopObjectIndex].tlutList = d_course_moo_moo_farm_mole_dirt;
gObjectList[loopObjectIndex].sizeScaling = 0.15f;
@ -6525,7 +6525,7 @@ void func_80081FF4(s32 objectIndex, s32 arg1) {
s32 var_a0;
s8 *var_a2;
func_800723A4(objectIndex, 0);
init_object(objectIndex, 0);
gObjectList[objectIndex].unk_04C = random_int(0x001EU) + 5;
switch (arg1) { /* irregular */
case 1:
@ -6559,7 +6559,7 @@ void func_80081FF4(s32 objectIndex, s32 arg1) {
break;
}
}
gObjectList[objectIndex].unk_010[0] = gMoleSpawns[var_v1][offset + 0] * D_8018D01C;
gObjectList[objectIndex].unk_010[0] = gMoleSpawns[var_v1][offset + 0] * xOrientation;
gObjectList[objectIndex].unk_010[1] = gMoleSpawns[var_v1][offset + 1] - 9.0;
gObjectList[objectIndex].unk_010[2] = gMoleSpawns[var_v1][offset + 2];
}
@ -6581,7 +6581,7 @@ void func_800821FC(void) {
s32 stackPadding;
for (var_s1 = 0; var_s1 < D_8018D1C8; var_s1++) {
objectIndex = D_80183EA0[var_s1];
objectIndex = indexObjectList1[var_s1];
if (gObjectList[objectIndex].state == 0) {
if (func_8008A8B0(8, 9) != 0) {
func_80081FF4(objectIndex, 1);
@ -6592,7 +6592,7 @@ void func_800821FC(void) {
}
for (var_s1 = 0; var_s1 < D_8018D1D0; var_s1++) {
objectIndex = D_80183F28[var_s1];
objectIndex = indexObjectList2[var_s1];
if (gObjectList[objectIndex].state == 0) {
if (func_8008A8B0(0x0010, 0x0013) != 0) {
func_80081FF4(objectIndex, 2);
@ -6603,7 +6603,7 @@ void func_800821FC(void) {
}
for (var_s1 = 0; var_s1 < D_8018D1D8; var_s1++) {
objectIndex = D_8018BFA8[var_s1];
objectIndex = indexObjectList3[var_s1];
if (gObjectList[objectIndex].state == 0) {
if (func_8008A8B0(0x0011, 0x0014) != 0) {
func_80081FF4(objectIndex, 3);
@ -6638,9 +6638,9 @@ void func_8008241C(s32 objectIndex, s32 arg1) {
if (gGamestate == 9) {
func_8008B7D4(objectIndex, sp22 + -360.0, sp20 + 60.0, temp_f4 + -1300.0);
} else if (gObjectList[objectIndex].unk_0D5 != 0) {
func_8008B7D4(objectIndex, (sp22 + 328.0) * D_8018D01C, sp20 + 20.0, temp_f4 + 2541.0);
func_8008B7D4(objectIndex, (sp22 + 328.0) * xOrientation, sp20 + 20.0, temp_f4 + 2541.0);
} else {
func_8008B7D4(objectIndex, (sp22 + -985.0) * D_8018D01C, sp20 + 15.0, temp_f4 + 1200.0);
func_8008B7D4(objectIndex, (sp22 + -985.0) * xOrientation, sp20 + 15.0, temp_f4 + 1200.0);
}
func_8008B888(objectIndex, 0U, 0U, 0U);
gObjectList[objectIndex].unk_034 = 1.0f;
@ -6687,7 +6687,6 @@ void func_8008275C(s32 objectIndex) {
extern s16 D_80165900;
extern s8 D_80165908;
extern s8 D_80165A90;
extern s32 D_80183F2C;
void func_80082870(void) {
Objects *temp_s1;
@ -6695,7 +6694,7 @@ void func_80082870(void) {
s32 temp_s0;
s32 var_s3;
var_s4 = D_80183F28;
var_s4 = indexObjectList2;
var_s3 = 0;
do {
temp_s0 = *var_s4;
@ -6713,7 +6712,7 @@ void func_80082870(void) {
if (gGamestate != 9) {
func_800C98B8(temp_s1->pos, D_80183E40, 0x19017043U);
} else if (gCutsceneShotTimer < 0x97) {
func_800C98B8(gObjectList[D_80183F2C].pos, D_80183E40, 0x19017043U);
func_800C98B8(gObjectList[indexObjectList2[1]].pos, D_80183E40, 0x19017043U);
}
}
}
@ -6827,7 +6826,7 @@ void func_80082E5C(void) {
s32 var_s1;
for (var_s1 = 0; var_s1 < NUM_CRABS; var_s1++) {
objectIndex = D_80183EA0[var_s1];
objectIndex = indexObjectList1[var_s1];
if (gObjectList[objectIndex].state != 0) {
func_80082B34(objectIndex, var_s1);
func_8008A6DC(objectIndex, 500.0f);
@ -6845,7 +6844,7 @@ void func_80082F1C(s32 objectIndex, s32 arg1) {
gObjectList[objectIndex].vertex = d_course_yoshi_valley_unk4;
gObjectList[objectIndex].sizeScaling = 0.027f;
func_80072488(objectIndex);
func_8008B7D4(objectIndex, D_800E5DF4[arg1].pos[0] * D_8018D01C, D_800E5DF4[arg1].pos[1], D_800E5DF4[arg1].pos[2]);
func_8008B7D4(objectIndex, D_800E5DF4[arg1].pos[0] * xOrientation, D_800E5DF4[arg1].pos[1], D_800E5DF4[arg1].pos[2]);
func_8008B80C(objectIndex, 0.0f, 0.0f, 0.0f);
func_8008B888(objectIndex, 0U, D_800E5DF4[arg1].rot, 0U);
}
@ -6873,7 +6872,7 @@ void func_80083080(void) {
s32 var_s1;
for (var_s1 = 0; var_s1 < NUM_YV_FLAG_POLES; var_s1++) {
objectIndex = D_80183EA0[var_s1];
objectIndex = indexObjectList1[var_s1];
if (gObjectList[objectIndex].state != 0) {
func_80083018(objectIndex, var_s1);
func_80083060(objectIndex);
@ -6961,18 +6960,18 @@ void func_800834B8(void) {
s32 var_s0;
for (var_s0 = 0; var_s0 < 0xF; var_s0++) {
temp_s1 = D_80183F28[var_s0];
temp_s1 = indexObjectList2[var_s0];
func_800833D0(temp_s1, var_s0);
func_80083248(temp_s1);
func_80083474(temp_s1);
}
func_80072120(D_80183F28, 0x0000000F);
func_80072120(indexObjectList2, 0x0000000F);
}
void func_80083538(s32 objectIndex, Vec3f arg1, s32 arg2, s32 arg3) {
Objects *temp_s0;
func_800723A4(objectIndex, 0);
init_object(objectIndex, 0);
temp_s0 = &gObjectList[objectIndex];
temp_s0->activeTexture = d_course_frappe_snowland_snow;
temp_s0->textureList = d_course_frappe_snowland_snow;
@ -7164,8 +7163,8 @@ void func_80083D60(void) {
}
for (var_s0 = 0; var_s0 < 19; var_s0++) {
var_s4 = D_80183EA0[var_s0];
var_s3 = D_80183F28[var_s0];
var_s4 = indexObjectList1[var_s0];
var_s3 = indexObjectList2[var_s0];
func_80083A94(var_s3);
func_80083C04(var_s4);
if (is_obj_index_flag_unk_054_inactive(var_s4, 0x00001000) != 0) {
@ -7208,7 +7207,7 @@ void func_80083FD0(s32 objectIndex, s32 arg1, s32 playerId) {
temp_s0 = &gObjectList[objectIndex];
sp20 = &gPlayerOne[playerId];
temp_s0->unk_084[7] = playerId;
func_800723A4(objectIndex, 0);
init_object(objectIndex, 0);
temp_s0->activeTLUT = d_course_sherbet_land_ice;
temp_s0->tlutList = d_course_sherbet_land_ice;
temp_s0->sizeScaling = ((f32) random_int(0x01F4U) * 0.0002) + 0.04;
@ -7271,7 +7270,7 @@ void func_80084430(s32 objectIndex, s32 arg1) {
temp_s0->sizeScaling = 0.2f;
temp_s0->boundingBoxSize = 0x000C;
temp_s0->unk_09C = 1;
func_8008B7D4(objectIndex, D_8018D01C * -383.0, 2.0f, -690.0f);
func_8008B7D4(objectIndex, xOrientation * -383.0, 2.0f, -690.0f);
func_8008B888(objectIndex, 0U, 0U, 0U);
temp_s0->unk_0DD = 1;
func_80086EF0(objectIndex);
@ -7309,19 +7308,19 @@ void func_800845C8(s32 objectIndex, s32 arg1) {
set_object_flag_unk_054_true(objectIndex, 0x04000220);
if ((arg1 > 0) && (arg1 < 9)) {
if ((arg1 == 1) || (arg1 == 2)) {
func_8008B7D4(objectIndex, D_8018D01C * -2960.0, -80.0f, 1521.0f);
func_8008B7D4(objectIndex, xOrientation * -2960.0, -80.0f, 1521.0f);
temp_s0->unk_0C6 = 0x0150;
temp_s0->unk_01C[1] = 100.0f;
} else if ((arg1 == 3) || (arg1 == 4)) {
func_8008B7D4(objectIndex, D_8018D01C * -2490.0, -80.0f, 1612.0f);
func_8008B7D4(objectIndex, xOrientation * -2490.0, -80.0f, 1612.0f);
temp_s0->unk_0C6 = 0x0100;
temp_s0->unk_01C[1] = 80.0f;
} else if ((arg1 == 5) || (arg1 == 6)) {
func_8008B7D4(objectIndex, D_8018D01C * -2098.0, -80.0f, 1624.0f);
func_8008B7D4(objectIndex, xOrientation * -2098.0, -80.0f, 1624.0f);
temp_s0->unk_0C6 = 0xFF00;
temp_s0->unk_01C[1] = 80.0f;
} else if ((arg1 == 7) || (arg1 == 8)) {
func_8008B7D4(objectIndex, D_8018D01C * -2080.0, -80.0f, 1171.0f);
func_8008B7D4(objectIndex, xOrientation * -2080.0, -80.0f, 1171.0f);
temp_s0->unk_0C6 = 0x0150;
temp_s0->unk_01C[1] = 80.0f;
}
@ -7334,9 +7333,9 @@ void func_800845C8(s32 objectIndex, s32 arg1) {
switch (arg1) { /* irregular */
case 9:
if (gGamestate != 9) {
func_8008B7D4(objectIndex, D_8018D01C * 146.0, 0.0f, -380.0f);
func_8008B7D4(objectIndex, xOrientation * 146.0, 0.0f, -380.0f);
} else {
func_8008B7D4(objectIndex, D_8018D01C * 380.0, 0.0f, -535.0f);
func_8008B7D4(objectIndex, xOrientation * 380.0, 0.0f, -535.0f);
temp_s0->sizeScaling = 0.15f;
}
temp_s0->unk_0C6 = 0x9000;
@ -7346,7 +7345,7 @@ void func_800845C8(s32 objectIndex, s32 arg1) {
temp_s0->unk_0DD = 3;
break;
case 10:
func_8008B7D4(objectIndex, D_8018D01C * 380.0, 0.0f, -766.0f);
func_8008B7D4(objectIndex, xOrientation * 380.0, 0.0f, -766.0f);
temp_s0->unk_0C6 = 0x5000;
if (gIsMirrorMode != 0) {
temp_s0->unk_0C6 += 0x8000;
@ -7354,7 +7353,7 @@ void func_800845C8(s32 objectIndex, s32 arg1) {
temp_s0->unk_0DD = 4;
break;
case 11:
func_8008B7D4(objectIndex, D_8018D01C * -2300.0, 0.0f, -210.0f);
func_8008B7D4(objectIndex, xOrientation * -2300.0, 0.0f, -210.0f);
temp_s0->unk_0C6 = 0xC000;
temp_s0->unk_0DD = 6;
if (gIsMirrorMode != 0) {
@ -7362,7 +7361,7 @@ void func_800845C8(s32 objectIndex, s32 arg1) {
}
break;
case 12:
func_8008B7D4(objectIndex, D_8018D01C * -2500.0, 0.0f, -250.0f);
func_8008B7D4(objectIndex, xOrientation * -2500.0, 0.0f, -250.0f);
temp_s0->unk_0C6 = 0x4000;
temp_s0->unk_0DD = 6;
if (gIsMirrorMode != 0) {
@ -7370,7 +7369,7 @@ void func_800845C8(s32 objectIndex, s32 arg1) {
}
break;
case 13:
func_8008B7D4(objectIndex, D_8018D01C * -535.0, 0.0f, 875.0f);
func_8008B7D4(objectIndex, xOrientation * -535.0, 0.0f, 875.0f);
temp_s0->unk_0C6 = 0x8000;
temp_s0->unk_0DD = 6;
if (gIsMirrorMode != 0) {
@ -7378,7 +7377,7 @@ void func_800845C8(s32 objectIndex, s32 arg1) {
}
break;
case 14:
func_8008B7D4(objectIndex, D_8018D01C * -250.0, 0.0f, 953.0f);
func_8008B7D4(objectIndex, xOrientation * -250.0, 0.0f, 953.0f);
temp_s0->unk_0C6 = 0x9000;
temp_s0->unk_0DD = 6;
if (gIsMirrorMode != 0) {
@ -7595,7 +7594,7 @@ void func_80085214(void) {
s32 var_s1;
for (var_s1 = 0; var_s1 < 0xF; var_s1++) {
objectIndex = D_80183EA0[var_s1];
objectIndex = indexObjectList1[var_s1];
if (gObjectList[objectIndex].state != 0) {
if (var_s1 == 0) {
func_8008453C(objectIndex, var_s1);
@ -7622,10 +7621,10 @@ void func_800853DC(s32 objectIndex) {
gObjectList[objectIndex].sizeScaling = 1.0f;
gObjectList[objectIndex].unk_070 = d_course_luigi_raceway_dl_F960;
if (gGamestate != 9) {
func_8008B7D4(objectIndex, D_8018D01C * -176.0, 0.0f, -2323.0f);
func_8008B7D4(objectIndex, xOrientation * -176.0, 0.0f, -2323.0f);
func_8008B80C(objectIndex, 0.0f, 300.0f, 0.0f);
} else {
func_8008B7D4(objectIndex, D_8018D01C * -1250.0, 0.0f, 1110.0f);
func_8008B7D4(objectIndex, xOrientation * -1250.0, 0.0f, 1110.0f);
func_8008B80C(objectIndex, 0.0f, 300.0f, 0.0f);
}
func_8008B844(objectIndex);
@ -7701,7 +7700,7 @@ void func_80085768(s32 objectIndex) {
void func_800857C0(void) {
s32 objectIndex;
objectIndex = D_80183EA0[0];
objectIndex = indexObjectList1[0];
if (gObjectList[objectIndex].state != 0) {
func_80085768(objectIndex);
func_80085534(objectIndex);
@ -7761,7 +7760,7 @@ void func_80085AA8(void) {
Objects *temp_s0;
for (var_s4 = 0; var_s4 < 3; var_s4++) {
objectIndex = D_80183F28[var_s4];
objectIndex = indexObjectList2[var_s4];
temp_s0 = &gObjectList[objectIndex];
if (temp_s0->state != 0) {
func_800859C8(objectIndex, var_s4);
@ -7782,7 +7781,7 @@ void func_80085BB4(s32 objectIndex) {
}
void func_80085C20(s32 objectIndex) {
func_8008B7D4(objectIndex, D_8018D01C * -1431.0, 827.0f, -2957.0f);
func_8008B7D4(objectIndex, xOrientation * -1431.0, 827.0f, -2957.0f);
init_texture_object(objectIndex, d_course_rainbow_road_neon_mushroom_tlut_list, d_course_rainbow_road_neon_mushroom, 0x40U, (u16) 0x00000040);
func_80085BB4(objectIndex);
}
@ -7820,7 +7819,7 @@ void func_80085CA0(s32 objectIndex) {
}
void func_80085DB8(s32 objectIndex) {
func_8008B7D4(objectIndex, D_8018D01C * 799.0, 1193.0f, -5891.0f);
func_8008B7D4(objectIndex, xOrientation * 799.0, 1193.0f, -5891.0f);
init_texture_object(objectIndex, d_course_rainbow_road_neon_mario_tlut_list, d_course_rainbow_road_neon_mario, 0x40U, (u16) 0x00000040);
func_80085BB4(objectIndex);
}
@ -7849,7 +7848,7 @@ void func_80085E38(s32 objectIndex) {
}
void func_80085EF8(s32 objectIndex) {
func_8008B7D4(objectIndex, D_8018D01C * -2013.0, 555.0f, 0.0f);
func_8008B7D4(objectIndex, xOrientation * -2013.0, 555.0f, 0.0f);
init_texture_object(objectIndex, d_course_rainbow_road_neon_boo_tlut_list, d_course_rainbow_road_neon_boo, 0x40U, (u16) 0x00000040);
func_80085BB4(objectIndex);
}
@ -7894,7 +7893,7 @@ void func_80085F74(s32 objectIndex) {
**/
void func_80086074(s32 objectIndex, s32 arg1) {
func_8008B7D4(objectIndex, D_800E6734[arg1][0] * D_8018D01C, D_800E6734[arg1][1], D_800E6734[arg1][2]);
func_8008B7D4(objectIndex, D_800E6734[arg1][0] * xOrientation, D_800E6734[arg1][1], D_800E6734[arg1][2]);
init_texture_object(objectIndex, d_course_rainbow_road_static_tluts[arg1], d_course_rainbow_road_static_textures[arg1], 64, 64);
func_80085BB4(objectIndex);
}
@ -7934,7 +7933,7 @@ void func_800861E0(void) {
s32 var_s2;
for (var_s2 = 0; var_s2 < NUM_NEON_SIGNS; var_s2++) {
objectIndex = D_80183EA0[var_s2];
objectIndex = indexObjectList1[var_s2];
if (gObjectList[objectIndex].state != 0) {
func_80086158(objectIndex, var_s2);
if (gObjectList[objectIndex].state >= 2) {
@ -8023,14 +8022,14 @@ void func_80086604(void) {
if ((D_8016347C != 0) && (D_802874D8.unk1D < 3)) {
if (D_801658C6 == 0) {
for(var_s1 = 0; var_s1 < 3; var_s1++) {
objectIndex = D_80183EA0[var_s1];
func_800723A4(objectIndex, 0);
objectIndex = indexObjectList1[var_s1];
init_object(objectIndex, 0);
}
D_801658C6 = 1;
}
}
for(var_s1 = 0; var_s1 != 3; var_s1++) {
objectIndex = D_80183EA0[var_s1];
objectIndex = indexObjectList1[var_s1];
if (gObjectList[objectIndex].state != 0) {
func_80086528(objectIndex, var_s1);
func_80086424(objectIndex);
@ -8069,7 +8068,7 @@ void func_80086700(s32 objectIndex) {
}
}
gObjectList[objectIndex].sizeScaling = 0.005f;
func_8008B7D4(objectIndex, gObjectList[D_80183F28[0]].pos[0], gObjectList[D_80183F28[0]].pos[1] + 16.0, gObjectList[D_80183F28[0]].pos[2]);
func_8008B7D4(objectIndex, gObjectList[indexObjectList2[0]].pos[0], gObjectList[indexObjectList2[0]].pos[1] + 16.0, gObjectList[indexObjectList2[0]].pos[2]);
func_8008B80C(objectIndex, 0.0f, 0.0f, 0.0f);
func_8008B888(objectIndex, 0U, 0U, 0U);
gObjectList[objectIndex].unk_084[1] = 0x0200;
@ -8184,11 +8183,11 @@ void func_80086D80(void) {
s32 var_s0;
if ((D_801658CE != 0) && (D_801658DC == 0)) {
temp_s2 = D_80183EA0[3];
func_800723A4(temp_s2, 0);
temp_s2 = indexObjectList1[3];
init_object(temp_s2, 0);
D_801658DC = 1;
}
temp_s2 = D_80183EA0[3];
temp_s2 = indexObjectList1[3];
if (gObjectList[temp_s2].state != 0) {
func_80086C14(temp_s2);
func_80086940(temp_s2);

View File

@ -31,7 +31,7 @@ void func_800722F8(s32, s32);
s32 func_80072320(s32, s32);
s32 func_80072354(s32, s32);
void set_object_unk_0CB(s32, s32);
void func_800723A4(s32, s32);
void init_object(s32, s32);
void func_80072408(s32);
void func_80072428(s32);
void func_80072488(s32);
@ -405,14 +405,13 @@ extern s8 D_80165888;
extern s8 D_801658C6;
extern s8 D_801658DC;
extern s8 D_801658F4;
extern s32 D_80183D5C;
extern s32 D_80183EA4;
extern s32 objectListSize;
extern s16 D_8018CAB8;
extern s16 D_8018CFB0;
extern s16 D_8018CFE8;
extern s16 D_8018CFF0;
extern s16 D_8018D018;
extern f32 D_8018D01C;
extern f32 xOrientation;
extern s16 D_8018D048;
extern s16 D_8018D110;
extern s32 D_8018D140;

View File

@ -9041,10 +9041,10 @@ void func_800A4550(s32 lapNumber, s32 column, s32 row) {
struct_8018D9E0_entry *temp_v0_2;
if (lapNumber < 3) {
sp40 = D_8018CA70[0].lapDurations[lapNumber];
sp40 = playerHUD[0].lapDurations[lapNumber];
set_text_color(2);
} else {
sp40 = D_8018CA70[0].someTimer;
sp40 = playerHUD[0].someTimer;
set_text_color(1);
}
func_800936B8(column + 0x21, row, D_800E7734[lapNumber], 0, 0.7f, 0.7f);

View File

@ -954,7 +954,7 @@ void func_80284154(struct CinematicCamera *camera) {
void func_80284184(struct CinematicCamera *camera)
{
f32 trophy;
trophy = ((gObjectList[D_80183EA0[3]].pos[1] - camera->lookAt[1]) * 0.9f) + camera->lookAt[1];
trophy = ((gObjectList[indexObjectList1[3]].pos[1] - camera->lookAt[1]) * 0.9f) + camera->lookAt[1];
f32_lerp(&camera->pos[1], trophy, 0.5);
}
@ -1578,7 +1578,7 @@ void func_802847CC(struct CinematicCamera *camera) {
}
#ifndef VERSION_EU
if (gCCSelection == 3) {
if (gCCSelection == CC_EXTRA) {
sp2C = D_80286B34[D_800DC5E4];
}
#endif

View File

@ -2206,12 +2206,12 @@ UNUSED void func_8004E604(s32 arg0, s32 arg1, u8 *tlut, u8 *texture) {
void func_8004E638(s32 playerId) {
s32 objectIndex;
Objects *temp_v1;
struct_8018CA70_entry *temp_v0;
hud_player *temp_v0;
objectIndex = gItemWindowObjectByPlayerId[playerId];
temp_v1 = &gObjectList[objectIndex];
if (temp_v1->state >= 2) {
temp_v0 = &D_8018CA70[playerId];
temp_v0 = &playerHUD[playerId];
func_8004E4CC(temp_v0->slideItemBoxX + temp_v0->itemBoxX, temp_v0->slideItemBoxY + temp_v0->itemBoxY, (u8 *) temp_v1->activeTLUT, temp_v1->activeTexture);
}
}
@ -2219,44 +2219,44 @@ void func_8004E638(s32 playerId) {
void func_8004E6C4(s32 playerId) {
s32 objectIndex;
Objects *temp_v1;
struct_8018CA70_entry *temp_v0;
hud_player *temp_v0;
objectIndex = gItemWindowObjectByPlayerId[playerId];
temp_v1 = &gObjectList[objectIndex];
if (temp_v1->state >= 2) {
temp_v0 = &D_8018CA70[playerId];
temp_v0 = &playerHUD[playerId];
func_80047910(temp_v0->slideItemBoxX + temp_v0->itemBoxX, temp_v0->slideItemBoxY + temp_v0->itemBoxY, 0U, temp_v0->unknownScaling, (u8 *) temp_v1->activeTLUT, (u8 *) temp_v1->activeTexture, D_0D005C30, 0x00000028, 0x00000020, 0x00000028, 0x00000020);
}
}
void func_8004E78C(s32 playerId) {
func_8004CB60((s32) D_8018CA70[playerId].lapX, D_8018CA70[playerId].lapY + 3, (s32) D_0D00A958);
func_8004CB90(D_8018CA70[playerId].lapX + 0x1C, (s32) D_8018CA70[playerId].lapY, D_800E4570[D_8018CA70[playerId].alsoLapCount]);
func_8004CB60((s32) playerHUD[playerId].lapX, playerHUD[playerId].lapY + 3, (s32) D_0D00A958);
func_8004CB90(playerHUD[playerId].lapX + 0x1C, (s32) playerHUD[playerId].lapY, D_800E4570[playerHUD[playerId].alsoLapCount]);
}
void func_8004E800(s32 playerId) {
if (D_8018CA70[playerId].unk_81 != 0) {
if (D_8018CA70[playerId].lapCount != 3) {
func_8004A384(D_8018CA70[playerId].rankX + D_8018CA70[playerId].slideRankX, D_8018CA70[playerId].rankY + D_8018CA70[playerId].slideRankY, 0U,
D_8018CA70[playerId].rankScaling, 0x000000FF, D_800E55F8[D_8018CF98[playerId]], 0, 0x000000FF, D_0D00D258[D_8018CF98[playerId]],
if (playerHUD[playerId].unk_81 != 0) {
if (playerHUD[playerId].lapCount != 3) {
func_8004A384(playerHUD[playerId].rankX + playerHUD[playerId].slideRankX, playerHUD[playerId].rankY + playerHUD[playerId].slideRankY, 0U,
playerHUD[playerId].rankScaling, 0x000000FF, D_800E55F8[D_8018CF98[playerId]], 0, 0x000000FF, D_0D00D258[D_8018CF98[playerId]],
D_0D0068F0, 0x00000080, 0x00000040, 0x00000080, 0x00000040);
} else {
func_8004A384(D_8018CA70[playerId].rankX + D_8018CA70[playerId].slideRankX, D_8018CA70[playerId].rankY + D_8018CA70[playerId].slideRankY, 0U,
D_8018CA70[playerId].rankScaling, 0x000000FF, D_800E55F8[D_80165594], 0, 0x000000FF, D_0D00D258[gGPCurrentRaceRankByPlayerId[playerId]],
func_8004A384(playerHUD[playerId].rankX + playerHUD[playerId].slideRankX, playerHUD[playerId].rankY + playerHUD[playerId].slideRankY, 0U,
playerHUD[playerId].rankScaling, 0x000000FF, D_800E55F8[D_80165594], 0, 0x000000FF, D_0D00D258[gGPCurrentRaceRankByPlayerId[playerId]],
D_0D0068F0, 0x00000080, 0x00000040, 0x00000080, 0x00000040);
}
}
}
void func_8004E998(s32 playerId) {
if (D_8018CA70[playerId].unk_81 != 0) {
if (D_8018CA70[playerId].lapCount != 3) {
func_8004A384(D_8018CA70[playerId].rankX + D_8018CA70[playerId].slideRankX, D_8018CA70[playerId].rankY + D_8018CA70[playerId].slideRankY, 0U,
D_8018CA70[playerId].rankScaling, 0x000000FF, D_800E5618[gGPCurrentRaceRankByPlayerId[playerId]], 0, 0x000000FF, D_0D015258[gGPCurrentRaceRankByPlayerId[playerId]],
if (playerHUD[playerId].unk_81 != 0) {
if (playerHUD[playerId].lapCount != 3) {
func_8004A384(playerHUD[playerId].rankX + playerHUD[playerId].slideRankX, playerHUD[playerId].rankY + playerHUD[playerId].slideRankY, 0U,
playerHUD[playerId].rankScaling, 0x000000FF, D_800E5618[gGPCurrentRaceRankByPlayerId[playerId]], 0, 0x000000FF, D_0D015258[gGPCurrentRaceRankByPlayerId[playerId]],
D_0D006030, 0x00000040, 0x00000040, 0x00000040, 0x00000040);
} else {
func_8004A384(D_8018CA70[playerId].rankX + D_8018CA70[playerId].slideRankX, D_8018CA70[playerId].rankY + D_8018CA70[playerId].slideRankY, 0U,
D_8018CA70[playerId].rankScaling, 0x000000FF, D_800E5618[D_80165598], 0, 0x000000FF, D_0D015258[gGPCurrentRaceRankByPlayerId[playerId]],
func_8004A384(playerHUD[playerId].rankX + playerHUD[playerId].slideRankX, playerHUD[playerId].rankY + playerHUD[playerId].slideRankY, 0U,
playerHUD[playerId].rankScaling, 0x000000FF, D_800E5618[D_80165598], 0, 0x000000FF, D_0D015258[gGPCurrentRaceRankByPlayerId[playerId]],
D_0D006030, 0x00000040, 0x00000040, 0x00000040, 0x00000040);
}
}
@ -2267,9 +2267,9 @@ void func_8004EB30(UNUSED s32 arg0) {
}
void func_8004EB38(s32 playerId) {
struct_8018CA70_entry *temp_s0;
hud_player *temp_s0;
temp_s0 = &D_8018CA70[playerId];
temp_s0 = &playerHUD[playerId];
if ((u8) temp_s0->unk_7B != 0) {
func_8004C9D8(temp_s0->lap1CompletionTimeX - 0x13, temp_s0->timerY + 8, 0x00000080, (s32) D_0D00C158, 0x00000020, 0x00000010, 0x00000020, 0x00000010);
func_8004F950((s32) temp_s0->lap1CompletionTimeX, (s32) temp_s0->timerY, 0x00000080, (s32) temp_s0->someTimer);
@ -2289,7 +2289,7 @@ void func_8004EB38(s32 playerId) {
}
void func_8004ED40(s32 arg0) {
func_8004A2F4(D_8018CA70[arg0].speedometerX, D_8018CA70[arg0].speedometerY, 0U, 1.0f, D_8018D300, D_8018D308, D_8018D310, 0xFF, (u8* ) D_0D009958, D_0D0064B0, 0x40, 0x60, 0x40, 0x30);
func_8004A2F4(playerHUD[arg0].speedometerX, playerHUD[arg0].speedometerY, 0U, 1.0f, D_8018D300, D_8018D308, D_8018D310, 0xFF, (u8* ) D_0D009958, D_0D0064B0, 0x40, 0x60, 0x40, 0x30);
func_8004A258(D_8018CFEC, D_8018CFF4, D_8016579E, 1.0f, (u8* ) D_0D00A558, &D_0D005FF0, 0x40, 0x20, 0x40, 0x20);
}
@ -2494,12 +2494,12 @@ extern s32 D_8018D320;
void func_8004FA78(s32 playerId) {
s32 *var_s3;
s32 var_s0;
struct_8018CA70_entry *temp_s4;
struct_8018CA70_entry *var_s1;
struct_8018CA70_entry *var_s2;
hud_player *temp_s4;
hud_player *var_s1;
hud_player *var_s2;
if ((gModeSelection != 2) && (gModeSelection != 3)) {
temp_s4 = &D_8018CA70[playerId];
temp_s4 = &playerHUD[playerId];
if (D_8018D320 == temp_s4->lapCount) {
var_s3 = &D_80165658;
var_s1 = temp_s4;
@ -3168,7 +3168,7 @@ void func_8005217C(s32 arg0) {
Objects *object;
s32 temp_a3;
temp_a3 = D_80183F28[0];
temp_a3 = indexObjectList2[0];
object = &gObjectList[temp_a3];
if (object->state >= 2) {
if (is_obj_index_flag_unk_054_active(temp_a3, 0x00000010) != 0) {
@ -3211,7 +3211,7 @@ void func_800524B4(s32 arg0) {
s32 objectIndex;
for (someIndex = 0; someIndex < 10; someIndex++) {
objectIndex = D_8018BFA8[someIndex];
objectIndex = indexObjectList3[someIndex];
if (gObjectList[objectIndex].state >= 2) {
temp_s2 = func_8008A364(objectIndex, arg0, 0x4000U, 0x00000320);
if (is_obj_index_flag_unk_054_active(objectIndex, 0x00040000) != 0) {
@ -3239,7 +3239,7 @@ void func_80052590(s32 cameraId) {
s32 temp_v0;
s32 temp_v0_2;
temp_s0 = &gObjectList[*D_80183EA0];
temp_s0 = &gObjectList[*indexObjectList1];
temp_s7 = &camera1[cameraId];
func_80046F60(temp_s0->activeTLUT, temp_s0->activeTexture, 0x00000020, 0x00000040, 5);
D_80183E80->unk0 = temp_s0->unk_0B2[0];
@ -3285,7 +3285,7 @@ void func_800527D8(s32 cameraId) {
s32 objectIndex;
Objects *object;
objectIndex = D_80183EA0[1];
objectIndex = indexObjectList1[1];
func_8008A364(objectIndex, cameraId, 0x5555U, 0x00000320);
if (is_obj_index_flag_unk_054_active(objectIndex, 0x00040000) != 0) {
object = &gObjectList[objectIndex];
@ -3439,7 +3439,7 @@ void func_8005309C(s32 cameraId) {
camera = &camera1[cameraId];
for (var_s4 = 0; var_s4 < 0x13; var_s4++) {
objectIndex = D_80183EA0[var_s4];
objectIndex = indexObjectList1[var_s4];
if (gObjectList[objectIndex].state >= 2) {
func_8008A364(objectIndex, cameraId, 0x2AABU, 0x00000258);
if (is_obj_index_flag_unk_054_active(objectIndex, 0x00040000) != 0) {
@ -3449,7 +3449,7 @@ void func_8005309C(s32 cameraId) {
if (is_obj_index_flag_unk_054_active(objectIndex, 0x00000010) != 0) {
func_800480B4(gObjectList[objectIndex].pos, (u16 *) D_80183E80, gObjectList[objectIndex].sizeScaling, (u8 *) gObjectList[objectIndex].activeTLUT, gObjectList[objectIndex].activeTexture, gObjectList[objectIndex].vertex, 0x00000040, 0x00000040, 0x00000040, 0x00000020);
}
objectIndex = D_80183F28[var_s4];
objectIndex = indexObjectList2[var_s4];
D_80183E80[0] = (s16) gObjectList[objectIndex].unk_0B2[0];
D_80183E80[2] = (u16) gObjectList[objectIndex].unk_0B2[2];
func_800480B4(gObjectList[objectIndex].pos, (u16 *) D_80183E80, gObjectList[objectIndex].sizeScaling, (u8 *) gObjectList[objectIndex].activeTLUT, gObjectList[objectIndex].activeTexture, gObjectList[objectIndex].vertex, 0x00000040, 0x00000040, 0x00000040, 0x00000020);
@ -3558,14 +3558,14 @@ void func_80053870(s32 cameraId) {
camera = &camera1[cameraId];
if (cameraId == 0) {
for (var_s2 = 0; var_s2 < gNumActiveThwomps; var_s2++) {
temp_s1 = D_80183EA0[var_s2];
temp_s1 = indexObjectList1[var_s2];
set_object_flag_unk_054_false(temp_s1, 0x00070000);
func_800722CC(temp_s1, 0x00000110);
}
}
func_800534A4(temp_s1);
for (var_s2 = 0; var_s2 < gNumActiveThwomps; var_s2++) {
temp_s1 = D_80183EA0[var_s2];
temp_s1 = indexObjectList1[var_s2];
minusone = gObjectList[temp_s1].unk_0DF - 1;
plusone = gObjectList[temp_s1].unk_0DF + 1;
if (gGamestate != 9) {
@ -3930,13 +3930,13 @@ void func_800550A4(s32 arg0) {
s32 var_s0;
for (var_s0 = 0; var_s0 < 8; var_s0++) {
func_80054D00(D_80183EA0[var_s0], arg0);
func_80054D00(indexObjectList1[var_s0], arg0);
}
for (var_s0 = 0; var_s0 < 11; var_s0++) {
func_80054D00(D_80183F28[var_s0], arg0);
func_80054D00(indexObjectList2[var_s0], arg0);
}
for (var_s0 = 0; var_s0 < 12; var_s0++) {
func_80054D00(D_8018BFA8[var_s0], arg0);
func_80054D00(indexObjectList3[var_s0], arg0);
}
func_80054EB8(arg0);
func_80054F04(arg0);
@ -3959,7 +3959,7 @@ void func_80055228(s32 cameraId) {
s32 temp_s0;
for (var_s1 = 0; var_s1 < 4; var_s1++) {
temp_s0 = D_80183EA0[var_s1];
temp_s0 = indexObjectList1[var_s1];
func_8008A364(temp_s0, cameraId, 0x4000U, 0x000005DC);
if (is_obj_index_flag_unk_054_active(temp_s0, 0x00040000) != 0) {
func_80055164(temp_s0);
@ -3984,7 +3984,7 @@ void func_80055380(s32 arg0) {
s32 var_s1;
for (i = 0; i < 10; i++) {
var_s1 = D_80183F28[i];
var_s1 = indexObjectList2[i];
if (func_8008A364(var_s1, arg0, 0x5555U, 0x000005DC) < 0x9C401) {
D_80165908 = 1;
func_800722A4(var_s1, 2);
@ -4011,7 +4011,7 @@ void func_80055528(s32 arg0) {
s32 test;
for (someIndex = 0; someIndex < 10; someIndex++) {
test = D_80183EA0[someIndex];
test = indexObjectList1[someIndex];
func_8008A364(test, arg0, 0x2AABU, 0x00000320);
if (is_obj_index_flag_unk_054_active(test, 0x00040000) != 0) {
func_80055458(test, arg0);
@ -4036,7 +4036,7 @@ void func_8005568C(s32 arg0) {
s32 someIndex;
for (someIndex = 0; someIndex < 15; someIndex++) {
test = D_80183F28[someIndex];
test = indexObjectList2[someIndex];
something = func_8008A364(test, arg0, 0x4000U, 0x000003E8);
if (is_obj_index_flag_unk_054_active(test, 0x00040000) != 0) {
set_object_flag_unk_054_true(test, 0x00200000);
@ -4101,7 +4101,7 @@ void func_8005592C(s32 cameraId) {
var_s3 = 0x00015F90;
}
for (var_s2 = 0; var_s2 < 15; var_s2++) {
objectIndex = D_80183EA0[var_s2];
objectIndex = indexObjectList1[var_s2];
if (gObjectList[objectIndex].state >= 2) {
if (gPlayerCountSelection1 == 1) {
var_s1 = 0x4000;
@ -4155,7 +4155,7 @@ void func_80055C38(s32 cameraId) {
s32 objectIndex;
for (var_s1 = 0; var_s1 < 3; var_s1++) {
objectIndex = D_80183F28[var_s1];
objectIndex = indexObjectList2[var_s1];
func_8008A1D0(objectIndex, cameraId, 0x000005DC, 0x000009C4);
if (is_obj_index_flag_unk_054_active(objectIndex, 0x00040000) != 0) {
func_80055AB8(objectIndex, cameraId);
@ -4191,7 +4191,7 @@ void func_80055CCC(s32 objectIndex, s32 cameraId) {
void func_80055E68(s32 arg0) {
s32 objectIndex;
objectIndex = D_80183EA0[0];
objectIndex = indexObjectList1[0];
if (gGamestate != 9) {
func_8008A1D0(objectIndex, arg0, 0x000005DC, 0x00000BB8);
if (is_obj_index_flag_unk_054_active(objectIndex, 0x00040000) != 0) {
@ -4216,7 +4216,7 @@ void func_80055F48(s32 arg0) {
s32 someIndex;
for (someIndex = 0; someIndex < 3; someIndex++) {
func_80055EF4(D_80183EA0[someIndex], arg0);
func_80055EF4(indexObjectList1[someIndex], arg0);
}
}
@ -4241,7 +4241,7 @@ void func_80055FA0(s32 objectIndex, UNUSED s32 arg1) {
}
void func_80056160(s32 arg0) {
func_80055FA0(D_80183EA0[3], arg0);
func_80055FA0(indexObjectList1[3], arg0);
}
void func_80056188(s32 cameraId) {
@ -4252,7 +4252,7 @@ void func_80056188(s32 cameraId) {
camera = &camera1[cameraId];
for (var_s2 =0; var_s2 < 10; var_s2++) {
objectIndex = D_80183EA0[var_s2];
objectIndex = indexObjectList1[var_s2];
if (D_8018E838[cameraId] == 0) {
object = &gObjectList[objectIndex];
if ((object->state >= 2) && (is_obj_index_flag_unk_054_inactive(objectIndex, 0x00080000) != 0) && (func_8008A140(objectIndex, camera, 0x2AABU) != 0)) {
@ -4347,7 +4347,7 @@ void func_800569F4(s32 arg0) {
s32 objectIndex;
objectIndex = D_80183DD8[arg0];
func_800723A4(objectIndex, 0);
init_object(objectIndex, 0);
gObjectList[objectIndex].unk_0A0 = 0;
}
@ -4355,7 +4355,7 @@ void func_80056A40(s32 arg0, s32 arg1) {
s32 objectIndex;
objectIndex = D_80183DD8[arg0];
func_800723A4(objectIndex, 0);
init_object(objectIndex, 0);
gObjectList[objectIndex].unk_0A0 = (s16) arg1;
}

View File

@ -842,7 +842,7 @@ void logo_intro_menu_act(struct Controller *arg0, UNUSED u16 arg1) {
//#define SKIP_TO_RACE
#ifdef SKIP_TO_RACE
gGamestateNext = 4; // Enter race state
gCCSelection = 1;
gCCSelection = CC_100;
gCupSelection = 1;
gCupCourseSelection = 0;
gCurrentCourseId = 0;

View File

@ -3931,7 +3931,7 @@ void func_80033AE0(Player *player, struct Controller *controller, s8 arg2) {
player->unk_0FA = (s16) sp2D0;
if (((sp2D0 >= 0x5A) || (sp2D0 < (-0x59))) && (!(player->unk_044 & 0x4000)))
{
if ((((((!(player->effects & 0x10)) && (gCCSelection == 2)) && (gModeSelection != 3)) && (!(player->effects & 8))) && (((player->unk_094 / 18.0f) * 216.0f) >= 40.0f)) && (player->unk_204 == 0))
if ((((((!(player->effects & 0x10)) && (gCCSelection == CC_150)) && (gModeSelection != 3)) && (!(player->effects & 8))) && (((player->unk_094 / 18.0f) * 216.0f) >= 40.0f)) && (player->unk_204 == 0))
{
player->statusEffects |= 0x80;
}

View File

@ -1291,7 +1291,7 @@ void render_player_shadow_credits(Player *player, s8 playerId, s8 arg2) {
spCC[0] = player->pos[0] + ((spB0 * sins(spC0)) + (spAC * coss(spC0)));
spCC[2] = player->pos[2] + ((spB0 * coss(spC0)) - (spAC * sins(spC0)));
spCC[1] = gObjectList[D_80183EA0[playerId]].pos[1] + sp94[playerId];
spCC[1] = gObjectList[indexObjectList1[playerId]].pos[1] + sp94[playerId];
mtxf_translate_rotate(sp118, spCC, spC4);
mtxf_scale2(sp118, gCharacterSize[player->characterId] * player->size);

View File

@ -350,8 +350,8 @@ s32 func_800B5218(void) {
fastestLapIndex = 0;
character = *gCharacterSelections;
for (checkLapIndex = 1; checkLapIndex != 3; checkLapIndex++) {
prevLapTime = D_8018CA70->lapDurations[checkLapIndex];
thisLapTime = D_8018CA70->lapDurations[fastestLapIndex];
prevLapTime = playerHUD->lapDurations[checkLapIndex];
thisLapTime = playerHUD->lapDurations[fastestLapIndex];
if (prevLapTime < thisLapTime) {
lapBitmask = 1 << checkLapIndex;
fastestLapIndex = checkLapIndex;
@ -360,8 +360,8 @@ s32 func_800B5218(void) {
}
}
if (D_8018CA70->lapDurations[fastestLapIndex] < (func_800B4F2C() & 0xFFFFF)) {
populate_time_trial_record(recordPointer + 0xF, D_8018CA70->lapDurations[fastestLapIndex], character);
if (playerHUD->lapDurations[fastestLapIndex] < (func_800B4F2C() & 0xFFFFF)) {
populate_time_trial_record(recordPointer + 0xF, playerHUD->lapDurations[fastestLapIndex], character);
recordPointer[0x12] = 1;
func_800B45E0(recordIndex);
return lapBitmask;

View File

@ -46,17 +46,17 @@ void spawn_player(Player *player, s8 playerIndex, f32 startingRow, f32 startingC
// Uses 100CC values
case TIME_TRIALS:
player->unk_084 = D_800E2400[1][player->characterId];
player->unk_088 = D_800E24B4[1][player->characterId];
player->unk_210 = D_800E2568[1][player->characterId];
player->topSpeed = gTopSpeedTable[1][player->characterId];
player->unk_084 = D_800E2400[CC_100][player->characterId];
player->unk_088 = D_800E24B4[CC_100][player->characterId];
player->unk_210 = D_800E2568[CC_100][player->characterId];
player->topSpeed = gTopSpeedTable[CC_100][player->characterId];
break;
case BATTLE:
player->unk_084 = D_800E2400[4][player->characterId];
player->unk_088 = D_800E24B4[4][player->characterId];
player->unk_210 = D_800E2568[4][player->characterId];
player->topSpeed = gTopSpeedTable[4][player->characterId];
player->unk_084 = D_800E2400[CC_BATTLE][player->characterId];
player->unk_088 = D_800E24B4[CC_BATTLE][player->characterId];
player->unk_210 = D_800E2568[CC_BATTLE][player->characterId];
player->topSpeed = gTopSpeedTable[CC_BATTLE][player->characterId];
break;
}

View File

@ -1252,9 +1252,9 @@ Variable Name | Memory Address
[func_8006E8C4](@ref func_8006E8C4) | 0x8006E8C4
[func_8006E940](@ref func_8006E940) | 0x8006E940
[init_object_list](@ref init_object_list) | 0x8006E9C0
[func_8006EA5C](@ref func_8006EA5C) | 0x8006EA5C
[reset_object_variable](@ref reset_object_variable) | 0x8006EA5C
[func_8006EB10](@ref func_8006EB10) | 0x8006EB10
[func_8006ED60](@ref func_8006ED60) | 0x8006ED60
[clear_object_list](@ref clear_object_list) | 0x8006ED60
[func_8006ED94](@ref func_8006ED94) | 0x8006ED94
[func_8006EE44](@ref func_8006EE44) | 0x8006EE44
[init_item_window](@ref init_item_window) | 0x8006EE7C
@ -1265,14 +1265,14 @@ Variable Name | Memory Address
[func_8006F8CC](@ref func_8006F8CC) | 0x8006F8CC
[func_8006FA94](@ref func_8006FA94) | 0x8006FA94
[func_80070148](@ref func_80070148) | 0x80070148
[func_80070190](@ref func_80070190) | 0x80070190
[init_object_list_index](@ref init_object_list_index) | 0x80070190
[func_80070250](@ref func_80070250) | 0x80070250
[func_80070328](@ref func_80070328) | 0x80070328
[func_800703E0](@ref func_800703E0) | 0x800703E0
[func_800704A0](@ref func_800704A0) | 0x800704A0
[func_8007055C](@ref func_8007055C) | 0x8007055C
[func_80070714](@ref func_80070714) | 0x80070714
[func_80070780](@ref func_80070780) | 0x80070780
[init_course_object](@ref init_course_object) | 0x80070780
[init_hud_one_player](@ref init_hud_one_player) | 0x80071428
[init_hud_two_player_vertical](@ref init_hud_two_player_vertical) | 0x80071818
[init_hud_two_player_horizontal](@ref init_hud_two_player_horizontal) | 0x80071A20
@ -1295,7 +1295,7 @@ Variable Name | Memory Address
[func_80072320](@ref func_80072320) | 0x80072320
[func_80072354](@ref func_80072354) | 0x80072354
[set_object_unk_0CB](@ref set_object_unk_0CB) | 0x80072388
[func_800723A4](@ref func_800723A4) | 0x800723A4
[init_object](@ref init_object) | 0x800723A4
[func_80072408](@ref func_80072408) | 0x80072408
[func_80072428](@ref func_80072428) | 0x80072428
[func_80072488](@ref func_80072488) | 0x80072488
@ -4631,7 +4631,7 @@ Variable Name | Memory Address
[D_80165A90](@ref D_80165A90) | 0x80165A90
[gObjectList](@ref gObjectList) | 0x80165C18
[D_80183D58](@ref D_80183D58) | 0x80183D58
[D_80183D5C](@ref D_80183D5C) | 0x80183D5C
[objectListSize](@ref objectListSize) | 0x80183D5C
[D_80183D60](@ref D_80183D60) | 0x80183D60
[D_80183DA0](@ref D_80183DA0) | 0x80183DA0
[D_80183DA8](@ref D_80183DA8) | 0x80183DA8
@ -4655,30 +4655,13 @@ Variable Name | Memory Address
[D_80183E84](@ref D_80183E84) | 0x80183E84
[gItemWindowObjectByPlayerId](@ref gItemWindowObjectByPlayerId) | 0x80183E88
[D_80183E98](@ref D_80183E98) | 0x80183E98
[D_80183EA0](@ref D_80183EA0) | 0x80183EA0
[D_80183EA4](@ref D_80183EA4) | 0x80183EA4
[D_80183EA8](@ref D_80183EA8) | 0x80183EA8
[D_80183EAC](@ref D_80183EAC) | 0x80183EAC
[D_80183EB0](@ref D_80183EB0) | 0x80183EB0
[D_80183EC0](@ref D_80183EC0) | 0x80183EC0
[D_80183EC8](@ref D_80183EC8) | 0x80183EC8
[D_80183EDC](@ref D_80183EDC) | 0x80183EDC
[D_80183EEC](@ref D_80183EEC) | 0x80183EEC
[D_80183F28](@ref D_80183F28) | 0x80183F28
[D_80183F2C](@ref D_80183F2C) | 0x80183F2C
[D_80183F34](@ref D_80183F34) | 0x80183F34
[D_80183F3C](@ref D_80183F3C) | 0x80183F3C
[D_80183F50](@ref D_80183F50) | 0x80183F50
[D_80183F54](@ref D_80183F54) | 0x80183F54
[D_80183F64](@ref D_80183F64) | 0x80183F64
[D_80183F74](@ref D_80183F74) | 0x80183F74
[indexObjectList1](@ref indexObjectList1) | 0x80183EA0
[D_80183F20](@ref D_80183F20) | 0x80183F20
[indexObjectList2](@ref indexObjectList2) | 0x80183F28
[D_80183FA8](@ref D_80183FA8) | 0x80183FA8
[D_8018BFA8](@ref D_8018BFA8) | 0x8018BFA8
[D_8018BFB8](@ref D_8018BFB8) | 0x8018BFB8
[D_8018BFD0](@ref D_8018BFD0) | 0x8018BFD0
[D_8018BFD8](@ref D_8018BFD8) | 0x8018BFD8
[indexObjectList3](@ref indexObjectList3) | 0x8018BFA8
[D_8018C028](@ref D_8018C028) | 0x8018C028
[D_8018C030](@ref D_8018C030) | 0x8018C030
[indexObjectList4](@ref indexObjectList4) | 0x8018C030
[D_8018C0B0](@ref D_8018C0B0) | 0x8018C0B0
[D_8018C1B0](@ref D_8018C1B0) | 0x8018C1B0
[D_8018C278](@ref D_8018C278) | 0x8018C278
@ -4693,7 +4676,7 @@ Variable Name | Memory Address
[D_8018C830](@ref D_8018C830) | 0x8018C830
[D_8018C870](@ref D_8018C870) | 0x8018C870
[D_8018C970](@ref D_8018C970) | 0x8018C970
[D_8018CA70](@ref D_8018CA70) | 0x8018CA70
[playerHUD](@ref playerHUD) | 0xplayerHUD
[D_8018CA74](@ref D_8018CA74) | 0x8018CA74
[D_8018CA78](@ref D_8018CA78) | 0x8018CA78
[D_8018CA90](@ref D_8018CA90) | 0x8018CA90
@ -4767,7 +4750,7 @@ Variable Name | Memory Address
[D_8018D00C](@ref D_8018D00C) | 0x8018D00C
[D_8018D010](@ref D_8018D010) | 0x8018D010
[D_8018D018](@ref D_8018D018) | 0x8018D018
[D_8018D01C](@ref D_8018D01C) | 0x8018D01C
[xOrientation](@ref xOrientation) | 0x8018D01C
[D_8018D020](@ref D_8018D020) | 0x8018D020
[D_8018D028](@ref D_8018D028) | 0x8018D028
[D_8018D02C](@ref D_8018D02C) | 0x8018D02C