mirror of
https://github.com/zeldaret/oot.git
synced 2024-12-27 15:16:13 +00:00
Decompile Path_GetByIndex
This commit is contained in:
parent
d2729f9d88
commit
a9d4fec113
2 changed files with 11 additions and 19 deletions
|
@ -1,18 +0,0 @@
|
||||||
glabel Path_GetByIndex
|
|
||||||
/* B05680 8008E4E0 AFA50004 */ sw $a1, 4($sp)
|
|
||||||
/* B05684 8008E4E4 AFA60008 */ sw $a2, 8($sp)
|
|
||||||
/* B05688 8008E4E8 00063400 */ sll $a2, $a2, 0x10
|
|
||||||
/* B0568C 8008E4EC 00052C00 */ sll $a1, $a1, 0x10
|
|
||||||
/* B05690 8008E4F0 00052C03 */ sra $a1, $a1, 0x10
|
|
||||||
/* B05694 8008E4F4 00063403 */ sra $a2, $a2, 0x10
|
|
||||||
/* B05698 8008E4F8 10A60007 */ beq $a1, $a2, .L8008E518
|
|
||||||
/* B0569C 8008E4FC 00001825 */ move $v1, $zero
|
|
||||||
/* B056A0 8008E500 3C0E0001 */ lui $t6, 1
|
|
||||||
/* B056A4 8008E504 01C47021 */ addu $t6, $t6, $a0
|
|
||||||
/* B056A8 8008E508 8DCE1E08 */ lw $t6, 0x1e08($t6)
|
|
||||||
/* B056AC 8008E50C 000578C0 */ sll $t7, $a1, 3
|
|
||||||
/* B056B0 8008E510 03E00008 */ jr $ra
|
|
||||||
/* B056B4 8008E514 01CF1021 */ addu $v0, $t6, $t7
|
|
||||||
.L8008E518:
|
|
||||||
/* B056B8 8008E518 03E00008 */ jr $ra
|
|
||||||
/* B056BC 8008E51C 00601025 */ move $v0, $v1
|
|
|
@ -1,7 +1,17 @@
|
||||||
#include <ultra64.h>
|
#include <ultra64.h>
|
||||||
#include <global.h>
|
#include <global.h>
|
||||||
|
|
||||||
#pragma GLOBAL_ASM("asm/non_matchings/code/z_path/Path_GetByIndex.s")
|
Path* Path_GetByIndex(GlobalContext* globalCtx, s16 index, s16 max) {
|
||||||
|
Path* path;
|
||||||
|
|
||||||
|
if (index != max) {
|
||||||
|
path = &globalCtx->setupPathList[index];
|
||||||
|
} else {
|
||||||
|
path = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
return path;
|
||||||
|
}
|
||||||
|
|
||||||
#pragma GLOBAL_ASM("asm/non_matchings/code/z_path/Path_OrientAndGetDistSq.s")
|
#pragma GLOBAL_ASM("asm/non_matchings/code/z_path/Path_OrientAndGetDistSq.s")
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue