Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Doc code 80005fd0 #697

Open
wants to merge 16 commits into
base: master
Choose a base branch
from
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ include $(MAKEFILE_SPLIT)
# These are files that need to be encoded into EUC-JP in order for the ROM to match
# We filter them out from the regular C_FILES since we don't need nor want the
# UTF-8 versions getting compiled
EUC_JP_FILES := src/ending/credits.c src/code_80005FD0.c src/menu_items.c
EUC_JP_FILES := src/ending/credits.c src/cpu_logic.c src/menu_items.c
C_FILES := $(filter-out %.inc.c,$(filter-out $(EUC_JP_FILES),$(foreach dir,$(SRC_DIRS),$(wildcard $(dir)/*.c))))
S_FILES := $(foreach dir,$(ASM_DIRS),$(wildcard $(dir)/*.s))
# Include source files in courses/course_name/files.c but exclude .inc.c files.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,14 +69,14 @@ glabel func_800088D8
/* 0095D0 800089D0 03193821 */ addu $a3, $t8, $t9
/* 0095D4 800089D4 3C0E800E */ lui $t6, %hi(gDemoMode)
/* 0095D8 800089D8 95CEC51C */ lhu $t6, %lo(gDemoMode)($t6)
/* 0095DC 800089DC 3C048016 */ lui $a0, %hi(D_80164450) # $a0, 0x8016
/* 0095E0 800089E0 24844450 */ addiu $a0, %lo(D_80164450) # addiu $a0, $a0, 0x4450
/* 0095DC 800089DC 3C048016 */ lui $a0, %hi(gLapProgressScore) # $a0, 0x8016
/* 0095E0 800089E0 24844450 */ addiu $a0, %lo(gLapProgressScore) # addiu $a0, $a0, 0x4450
/* 0095E4 800089E4 146E003A */ bne $v1, $t6, .L80008AD0
/* 0095E8 800089E8 0088C021 */ addu $t8, $a0, $t0
/* 0095EC 800089EC 3C188016 */ lui $t8, %hi(D_80164378 + 0xE) # $t8, 0x8016
/* 0095F0 800089F0 87184386 */ lh $t8, %lo(D_80164378 + 0xE)($t8)
/* 0095F4 800089F4 3C048016 */ lui $a0, %hi(D_80164450) # $a0, 0x8016
/* 0095F8 800089F8 24844450 */ addiu $a0, %lo(D_80164450) # addiu $a0, $a0, 0x4450
/* 0095F4 800089F4 3C048016 */ lui $a0, %hi(gLapProgressScore) # $a0, 0x8016
/* 0095F8 800089F8 24844450 */ addiu $a0, %lo(gLapProgressScore) # addiu $a0, $a0, 0x4450
/* 0095FC 800089FC 0018C880 */ sll $t9, $t8, 2
/* 009600 80008A00 00887821 */ addu $t7, $a0, $t0
/* 009604 80008A04 00997021 */ addu $t6, $a0, $t9
Expand Down Expand Up @@ -134,14 +134,14 @@ glabel func_800088D8
/* 0096C8 80008AC8 100000BB */ b .L80008DB8
/* 0096CC 80008ACC 24020001 */ li $v0, 1
.L80008AD0:
/* 0096D0 80008AD0 3C0F8016 */ lui $t7, %hi(gWaypointCountByPathIndex) # $t7, 0x8016
/* 0096D4 80008AD4 95EF45C8 */ lhu $t7, %lo(gWaypointCountByPathIndex)($t7)
/* 0096D0 80008AD0 3C0F8016 */ lui $t7, %hi(gPathCountByPathIndex) # $t7, 0x8016
/* 0096D4 80008AD4 95EF45C8 */ lhu $t7, %lo(gPathCountByPathIndex)($t7)
/* 0096D8 80008AD8 87020002 */ lh $v0, 2($t8)
/* 0096DC 80008ADC 24010003 */ li $at, 3
/* 0096E0 80008AE0 000FC040 */ sll $t8, $t7, 1
/* 0096E4 80008AE4 0301001A */ div $zero, $t8, $at
/* 0096E8 80008AE8 3C0B8016 */ lui $t3, %hi(D_80163478) # $t3, 0x8016
/* 0096EC 80008AEC 856B3478 */ lh $t3, %lo(D_80163478)($t3)
/* 0096E8 80008AE8 3C0B8016 */ lui $t3, %hi(gPlayerInFront) # $t3, 0x8016
/* 0096EC 80008AEC 856B3478 */ lh $t3, %lo(gPlayerInFront)($t3)
/* 0096F0 80008AF0 3C0D8016 */ lui $t5, %hi(gGPCurrentRaceRankByPlayerId + 0x2) # 0x8016
/* 0096F4 80008AF4 000BC880 */ sll $t9, $t3, 2
/* 0096F8 80008AF8 00997021 */ addu $t6, $a0, $t9
Expand Down Expand Up @@ -220,8 +220,8 @@ glabel func_800088D8
.L80008C08:
/* 009808 80008C08 3C098016 */ lui $t1, %hi(D_80163344) # $t1, 0x8016
/* 00980C 80008C0C 85293344 */ lh $t1, %lo(D_80163344)($t1)
/* 009810 80008C10 3C048016 */ lui $a0, %hi(D_80164450) # $a0, 0x8016
/* 009814 80008C14 24844450 */ addiu $a0, %lo(D_80164450) # addiu $a0, $a0, 0x4450
/* 009810 80008C10 3C048016 */ lui $a0, %hi(gLapProgressScore) # $a0, 0x8016
/* 009814 80008C14 24844450 */ addiu $a0, %lo(gLapProgressScore) # addiu $a0, $a0, 0x4450
/* 009818 80008C18 00097080 */ sll $t6, $t1, 2
/* 00981C 80008C1C 0088C821 */ addu $t9, $a0, $t0
/* 009820 80008C20 008E7821 */ addu $t7, $a0, $t6
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ glabel func_8000B140
/* 00BDA8 8000B1A8 10410187 */ beq $v0, $at, .L8000B7C8
/* 00BDAC 8000B1AC 2406FFFF */ li $a2, -1
/* 00BDB0 8000B1B0 10C20185 */ beq $a2, $v0, .L8000B7C8
/* 00BDB4 8000B1B4 3C0B8016 */ lui $t3, %hi(D_80163068) # $t3, 0x8016
/* 00BDB8 8000B1B8 256B3068 */ addiu $t3, %lo(D_80163068) # addiu $t3, $t3, 0x3068
/* 00BDB4 8000B1B4 3C0B8016 */ lui $t3, %hi(gTrackPositionFactor) # $t3, 0x8016
/* 00BDB8 8000B1B8 256B3068 */ addiu $t3, %lo(gTrackPositionFactor) # addiu $t3, $t3, 0x3068
/* 00BDBC 8000B1BC 00047880 */ sll $t7, $a0, 2
/* 00BDC0 8000B1C0 016FC021 */ addu $t8, $t3, $t7
/* 00BDC4 8000B1C4 3C01BF80 */ li $at, 0xBF800000 # -1.000000
Expand Down Expand Up @@ -141,24 +141,24 @@ glabel func_8000B140
/* 00BF2C 8000B32C 3125FFFF */ andi $a1, $t1, 0xffff
/* 00BF30 8000B330 00003025 */ move $a2, $zero
/* 00BF34 8000B334 24070014 */ li $a3, 20
/* 00BF38 8000B338 3C0C8016 */ lui $t4, %hi(D_80164430) # $t4, 0x8016
/* 00BF38 8000B338 3C0C8016 */ lui $t4, %hi(gSelectedPathCount) # $t4, 0x8016
/* 00BF3C 8000B33C 3064FFFF */ andi $a0, $v1, 0xffff
/* 00BF40 8000B340 460A4002 */ mul.s $f0, $f8, $f10
/* 00BF44 8000B344 4602003C */ c.lt.s $f0, $f2
/* 00BF48 8000B348 00000000 */ nop
/* 00BF4C 8000B34C 45020028 */ bc1fl .L8000B3F0
/* 00BF50 8000B350 29410002 */ slti $at, $t2, 2
/* 00BF54 8000B354 958C4430 */ lhu $t4, %lo(D_80164430)($t4)
/* 00BF54 8000B354 958C4430 */ lhu $t4, %lo(gSelectedPathCount)($t4)
/* 00BF58 8000B358 A7A300E4 */ sh $v1, 0xe4($sp)
/* 00BF5C 8000B35C AFA800FC */ sw $t0, 0xfc($sp)
/* 00BF60 8000B360 A7A900E6 */ sh $t1, 0xe6($sp)
/* 00BF64 8000B364 AFAA00F0 */ sw $t2, 0xf0($sp)
/* 00BF68 8000B368 E7A000DC */ swc1 $f0, 0xdc($sp)
/* 00BF6C 8000B36C E7A20060 */ swc1 $f2, 0x60($sp)
/* 00BF70 8000B370 0C001EFE */ jal func_80007BF8
/* 00BF70 8000B370 0C001EFE */ jal is_path_point_in_range
/* 00BF74 8000B374 AFAC0010 */ sw $t4, 0x10($sp)
/* 00BF78 8000B378 3C0B8016 */ lui $t3, %hi(D_80163068) # $t3, 0x8016
/* 00BF7C 8000B37C 256B3068 */ addiu $t3, %lo(D_80163068) # addiu $t3, $t3, 0x3068
/* 00BF78 8000B378 3C0B8016 */ lui $t3, %hi(gTrackPositionFactor) # $t3, 0x8016
/* 00BF7C 8000B37C 256B3068 */ addiu $t3, %lo(gTrackPositionFactor) # addiu $t3, $t3, 0x3068
/* 00BF80 8000B380 87A300E4 */ lh $v1, 0xe4($sp)
/* 00BF84 8000B384 8FA800FC */ lw $t0, 0xfc($sp)
/* 00BF88 8000B388 87A900E6 */ lh $t1, 0xe6($sp)
Expand All @@ -179,8 +179,8 @@ glabel func_8000B140
/* 00BFC4 8000B3C4 10000006 */ b .L8000B3E0
/* 00BFC8 8000B3C8 A4C50000 */ sh $a1, ($a2)
.L8000B3CC:
/* 00BFCC 8000B3CC 3C0E8016 */ lui $t6, %hi(D_80164430) # $t6, 0x8016
/* 00BFD0 8000B3D0 95CE4430 */ lhu $t6, %lo(D_80164430)($t6)
/* 00BFCC 8000B3CC 3C0E8016 */ lui $t6, %hi(gSelectedPathCount) # $t6, 0x8016
/* 00BFD0 8000B3D0 95CE4430 */ lhu $t6, %lo(gSelectedPathCount)($t6)
/* 00BFD4 8000B3D4 006E6021 */ addu $t4, $v1, $t6
/* 00BFD8 8000B3D8 01896823 */ subu $t5, $t4, $t1
/* 00BFDC 8000B3DC A4CD0000 */ sh $t5, ($a2)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,15 +39,15 @@ glabel func_80017054
/* 017CB4 800170B4 01C01825 */ move $v1, $t6
/* 017CB8 800170B8 3C0F8016 */ lui $t7, %hi(gNearestWaypointByCameraId) # $t7, 0x8016
/* 017CBC 800170BC E5240000 */ swc1 $f4, ($t1)
/* 017CC0 800170C0 3C0C8016 */ lui $t4, %hi(gWaypointCountByPathIndex) # 0x8016
/* 017CC0 800170C0 3C0C8016 */ lui $t4, %hi(gPathCountByPathIndex) # 0x8016
/* 017CC4 800170C4 3C018016 */ lui $at, %hi(D_80163238) # $at, 0x8016
/* 017CC8 800170C8 25EF4668 */ addiu $t7, %lo(gNearestWaypointByCameraId) # addiu $t7, $t7, 0x4668
/* 017CCC 800170CC 00077040 */ sll $t6, $a3, 1
/* 017CD0 800170D0 000AC840 */ sll $t9, $t2, 1
/* 017CD4 800170D4 01996021 */ addu $t4, $t4, $t9
/* 017CD8 800170D8 01CF4021 */ addu $t0, $t6, $t7
/* 017CDC 800170DC AC223238 */ sw $v0, %lo(D_80163238)($at)
/* 017CE0 800170E0 958C45C8 */ lhu $t4, %lo(gWaypointCountByPathIndex)($t4) # 0x45c8($t4)
/* 017CE0 800170E0 958C45C8 */ lhu $t4, %lo(gPathCountByPathIndex)($t4) # 0x45c8($t4)
/* 017CE4 800170E4 85070000 */ lh $a3, ($t0)
/* 017CE8 800170E8 00808025 */ move $s0, $a0
/* 017CEC 800170EC AFAC0058 */ sw $t4, 0x58($sp)
Expand Down Expand Up @@ -134,10 +134,10 @@ glabel func_80017054
/* 017E1C 8001721C 8C650000 */ lw $a1, ($v1)
/* 017E20 80017220 AFA30044 */ sw $v1, 0x44($sp)
/* 017E24 80017224 3044FFFF */ andi $a0, $v0, 0xffff
/* 017E28 80017228 0C002EF6 */ jal func_8000BBD8
/* 017E28 80017228 0C002EF6 */ jal set_track_offset_position
/* 017E2C 8001722C AFA6003C */ sw $a2, 0x3c($sp)
/* 017E30 80017230 3C038016 */ lui $v1, %hi(D_80162FA0) # $v1, 0x8016
/* 017E34 80017234 24632FA0 */ addiu $v1, %lo(D_80162FA0) # addiu $v1, $v1, 0x2fa0
/* 017E30 80017230 3C038016 */ lui $v1, %hi(gOffsetPosition) # $v1, 0x8016
/* 017E34 80017234 24632FA0 */ addiu $v1, %lo(gOffsetPosition) # addiu $v1, $v1, 0x2fa0
/* 017E38 80017238 C4660000 */ lwc1 $f6, ($v1)
/* 017E3C 8001723C 3C013FE0 */ li $at, 0x3FE00000 # 1.750000
/* 017E40 80017240 44810800 */ mtc1 $at, $f1
Expand All @@ -154,10 +154,10 @@ glabel func_80017054
/* 017E6C 8001726C E7A4008C */ swc1 $f4, 0x8c($sp)
/* 017E70 80017270 46205120 */ cvt.s.d $f4, $f10
/* 017E74 80017274 E7A40084 */ swc1 $f4, 0x84($sp)
/* 017E78 80017278 0C002EF6 */ jal func_8000BBD8
/* 017E78 80017278 0C002EF6 */ jal set_track_offset_position
/* 017E7C 8001727C 8F050000 */ lw $a1, ($t8)
/* 017E80 80017280 3C038016 */ lui $v1, %hi(D_80162FA0) # $v1, 0x8016
/* 017E84 80017284 24632FA0 */ addiu $v1, %lo(D_80162FA0) # addiu $v1, $v1, 0x2fa0
/* 017E80 80017280 3C038016 */ lui $v1, %hi(gOffsetPosition) # $v1, 0x8016
/* 017E84 80017284 24632FA0 */ addiu $v1, %lo(gOffsetPosition) # addiu $v1, $v1, 0x2fa0
/* 017E88 80017288 C46A0000 */ lwc1 $f10, ($v1)
/* 017E8C 8001728C C7A6008C */ lwc1 $f6, 0x8c($sp)
/* 017E90 80017290 3C013FE0 */ li $at, 0x3FE00000 # 1.750000
Expand Down Expand Up @@ -201,9 +201,9 @@ glabel func_80017054
/* 017F20 80017320 8FAC005C */ lw $t4, 0x5c($sp)
/* 017F24 80017324 000D7403 */ sra $t6, $t5, 0x10
/* 017F28 80017328 01C01025 */ move $v0, $t6
/* 017F2C 8001732C 3C0E8016 */ lui $t6, %hi(D_80164550) # $t6, 0x8016
/* 017F2C 8001732C 3C0E8016 */ lui $t6, %hi(gTrackPath) # $t6, 0x8016
/* 017F30 80017330 00004810 */ mfhi $t1
/* 017F34 80017334 25CE4550 */ addiu $t6, %lo(D_80164550) # addiu $t6, $t6, 0x4550
/* 017F34 80017334 25CE4550 */ addiu $t6, %lo(gTrackPath) # addiu $t6, $t6, 0x4550
/* 017F38 80017338 000C6880 */ sll $t5, $t4, 2
/* 017F3C 8001733C 0009C400 */ sll $t8, $t1, 0x10
/* 017F40 80017340 01AE5021 */ addu $t2, $t5, $t6
Expand Down Expand Up @@ -270,10 +270,10 @@ glabel func_80017054
/* 01801C 8001741C 8F050000 */ lw $a1, ($t8)
/* 018020 80017420 AFAA002C */ sw $t2, 0x2c($sp)
/* 018024 80017424 A7AF006C */ sh $t7, 0x6c($sp)
/* 018028 80017428 0C002EF6 */ jal func_8000BBD8
/* 018028 80017428 0C002EF6 */ jal set_track_offset_position
/* 01802C 8001742C A7A2006E */ sh $v0, 0x6e($sp)
/* 018030 80017430 3C038016 */ lui $v1, %hi(D_80162FA0) # $v1, 0x8016
/* 018034 80017434 24632FA0 */ addiu $v1, %lo(D_80162FA0) # addiu $v1, $v1, 0x2fa0
/* 018030 80017430 3C038016 */ lui $v1, %hi(gOffsetPosition) # $v1, 0x8016
/* 018034 80017434 24632FA0 */ addiu $v1, %lo(gOffsetPosition) # addiu $v1, $v1, 0x2fa0
/* 018038 80017438 C4660000 */ lwc1 $f6, ($v1)
/* 01803C 8001743C 3C013FE0 */ li $at, 0x3FE00000 # 1.750000
/* 018040 80017440 44810800 */ mtc1 $at, $f1
Expand All @@ -290,10 +290,10 @@ glabel func_80017054
/* 01806C 8001746C 462053A0 */ cvt.s.d $f14, $f10
/* 018070 80017470 46204420 */ cvt.s.d $f16, $f8
/* 018074 80017474 E7AE0098 */ swc1 $f14, 0x98($sp)
/* 018078 80017478 0C002EF6 */ jal func_8000BBD8
/* 018078 80017478 0C002EF6 */ jal set_track_offset_position
/* 01807C 8001747C E7B00090 */ swc1 $f16, 0x90($sp)
/* 018080 80017480 3C038016 */ lui $v1, %hi(D_80162FA0) # $v1, 0x8016
/* 018084 80017484 24632FA0 */ addiu $v1, %lo(D_80162FA0) # addiu $v1, $v1, 0x2fa0
/* 018080 80017480 3C038016 */ lui $v1, %hi(gOffsetPosition) # $v1, 0x8016
/* 018084 80017484 24632FA0 */ addiu $v1, %lo(gOffsetPosition) # addiu $v1, $v1, 0x2fa0
/* 018088 80017488 C4640000 */ lwc1 $f4, ($v1)
/* 01808C 8001748C 3C013FE0 */ li $at, 0x3FE00000 # 1.750000
/* 018090 80017490 44810800 */ mtc1 $at, $f1
Expand Down
Loading