This commit is contained in:
Ethan Roseman 2020-09-27 20:17:51 -04:00
parent c541824930
commit 19f82d642d
6 changed files with 20 additions and 86 deletions

View File

@ -1,18 +0,0 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel GetPlayerTargetYaw
/* F66D8 802D1D28 27BDFFE8 */ addiu $sp, $sp, -0x18
/* F66DC 802D1D2C AFBF0010 */ sw $ra, 0x10($sp)
/* F66E0 802D1D30 8C82000C */ lw $v0, 0xc($a0)
/* F66E4 802D1D34 3C018011 */ lui $at, 0x8011
/* F66E8 802D1D38 C420F048 */ lwc1 $f0, -0xfb8($at)
/* F66EC 802D1D3C 8C450000 */ lw $a1, ($v0)
/* F66F0 802D1D40 4600008D */ trunc.w.s $f2, $f0
/* F66F4 802D1D44 44061000 */ mfc1 $a2, $f2
/* F66F8 802D1D48 0C0B2026 */ jal set_variable
/* F66FC 802D1D4C 00000000 */ nop
/* F6700 802D1D50 8FBF0010 */ lw $ra, 0x10($sp)
/* F6704 802D1D54 24020002 */ addiu $v0, $zero, 2
/* F6708 802D1D58 03E00008 */ jr $ra
/* F670C 802D1D5C 27BD0018 */ addiu $sp, $sp, 0x18

View File

@ -1,15 +0,0 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel SetPlayerActionState
/* F5A88 802D10D8 27BDFFE8 */ addiu $sp, $sp, -0x18
/* F5A8C 802D10DC AFBF0010 */ sw $ra, 0x10($sp)
/* F5A90 802D10E0 8C82000C */ lw $v0, 0xc($a0)
/* F5A94 802D10E4 0C0B1EAF */ jal get_variable
/* F5A98 802D10E8 8C450000 */ lw $a1, ($v0)
/* F5A9C 802D10EC 0C039769 */ jal set_action_state
/* F5AA0 802D10F0 0040202D */ daddu $a0, $v0, $zero
/* F5AA4 802D10F4 8FBF0010 */ lw $ra, 0x10($sp)
/* F5AA8 802D10F8 24020002 */ addiu $v0, $zero, 2
/* F5AAC 802D10FC 03E00008 */ jr $ra
/* F5AB0 802D1100 27BD0018 */ addiu $sp, $sp, 0x18

View File

@ -1,16 +0,0 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel SetPlayerAnimationSpeed
/* F5AB4 802D1104 27BDFFE8 */ addiu $sp, $sp, -0x18
/* F5AB8 802D1108 AFBF0010 */ sw $ra, 0x10($sp)
/* F5ABC 802D110C 8C82000C */ lw $v0, 0xc($a0)
/* F5AC0 802D1110 0C0B210B */ jal get_float_variable
/* F5AC4 802D1114 8C450000 */ lw $a1, ($v0)
/* F5AC8 802D1118 3C02802E */ lui $v0, 0x802e
/* F5ACC 802D111C 8C429D20 */ lw $v0, -0x62e0($v0)
/* F5AD0 802D1120 E4400030 */ swc1 $f0, 0x30($v0)
/* F5AD4 802D1124 8FBF0010 */ lw $ra, 0x10($sp)
/* F5AD8 802D1128 24020002 */ addiu $v0, $zero, 2
/* F5ADC 802D112C 03E00008 */ jr $ra
/* F5AE0 802D1130 27BD0018 */ addiu $sp, $sp, 0x18

View File

@ -1,16 +0,0 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel SetPlayerJumpscale
/* F5A04 802D1054 27BDFFE8 */ addiu $sp, $sp, -0x18
/* F5A08 802D1058 AFBF0010 */ sw $ra, 0x10($sp)
/* F5A0C 802D105C 8C82000C */ lw $v0, 0xc($a0)
/* F5A10 802D1060 0C0B210B */ jal get_float_variable
/* F5A14 802D1064 8C450000 */ lw $a1, ($v0)
/* F5A18 802D1068 3C02802E */ lui $v0, 0x802e
/* F5A1C 802D106C 8C429D20 */ lw $v0, -0x62e0($v0)
/* F5A20 802D1070 E4400014 */ swc1 $f0, 0x14($v0)
/* F5A24 802D1074 8FBF0010 */ lw $ra, 0x10($sp)
/* F5A28 802D1078 24020002 */ addiu $v0, $zero, 2
/* F5A2C 802D107C 03E00008 */ jr $ra
/* F5A30 802D1080 27BD0018 */ addiu $sp, $sp, 0x18

View File

@ -1,16 +0,0 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel SetPlayerSpeed
/* F59D4 802D1024 27BDFFE8 */ addiu $sp, $sp, -0x18
/* F59D8 802D1028 AFBF0010 */ sw $ra, 0x10($sp)
/* F59DC 802D102C 8C82000C */ lw $v0, 0xc($a0)
/* F59E0 802D1030 0C0B210B */ jal get_float_variable
/* F59E4 802D1034 8C450000 */ lw $a1, ($v0)
/* F59E8 802D1038 3C02802E */ lui $v0, 0x802e
/* F59EC 802D103C 8C429D20 */ lw $v0, -0x62e0($v0)
/* F59F0 802D1040 E4400018 */ swc1 $f0, 0x18($v0)
/* F59F4 802D1044 8FBF0010 */ lw $ra, 0x10($sp)
/* F59F8 802D1048 24020002 */ addiu $v0, $zero, 2
/* F59FC 802D104C 03E00008 */ jr $ra
/* F5A00 802D1050 27BD0018 */ addiu $sp, $sp, 0x18

View File

@ -71,15 +71,27 @@ ApiStatus SetPlayerPos(ScriptInstance* script, s32 isInitialCall) {
INCLUDE_ASM(s32, "code_F5750", SetPlayerCollisionSize, ScriptInstance* script, s32 isInitialCall); INCLUDE_ASM(s32, "code_F5750", SetPlayerCollisionSize, ScriptInstance* script, s32 isInitialCall);
INCLUDE_ASM(s32, "code_F5750", SetPlayerSpeed, ScriptInstance* script, s32 isInitialCall); ApiStatus SetPlayerSpeed(ScriptInstance* script, s32 isInitialCall) {
gPlayerNpcPtr->moveSpeed = get_float_variable(script, *script->ptrReadPos);
return ApiStatus_DONE2;
}
INCLUDE_ASM(s32, "code_F5750", SetPlayerJumpscale, ScriptInstance* script, s32 isInitialCall); ApiStatus SetPlayerJumpscale(ScriptInstance* script, s32 isInitialCall) {
gPlayerNpcPtr->jumpScale = get_float_variable(script, *script->ptrReadPos);
return ApiStatus_DONE2;
}
INCLUDE_ASM(s32, "code_F5750", SetPlayerAnimation, ScriptInstance* script, s32 isInitialCall); INCLUDE_ASM(s32, "code_F5750", SetPlayerAnimation, ScriptInstance* script, s32 isInitialCall);
INCLUDE_ASM(s32, "code_F5750", SetPlayerActionState, ScriptInstance* script, s32 isInitialCall); ApiStatus SetPlayerActionState(ScriptInstance* script, s32 isInitialCall) {
set_action_state(get_variable(script, *script->ptrReadPos));
return ApiStatus_DONE2;
}
INCLUDE_ASM(s32, "code_F5750", SetPlayerAnimationSpeed, ScriptInstance* script, s32 isInitialCall); ApiStatus SetPlayerAnimationSpeed(ScriptInstance* script, s32 isInitialCall) {
gPlayerNpcPtr->animationSpeed = get_float_variable(script, *script->ptrReadPos);
return ApiStatus_DONE2;
}
INCLUDE_ASM(s32, "code_F5750", PlayerMoveTo, ScriptInstance* script, s32 isInitialCall); INCLUDE_ASM(s32, "code_F5750", PlayerMoveTo, ScriptInstance* script, s32 isInitialCall);
@ -105,7 +117,10 @@ INCLUDE_ASM(s32, "code_F5750", InterpPlayerYaw, ScriptInstance* script, s32 isIn
INCLUDE_ASM(s32, "code_F5750", PlayerFaceNpc, ScriptInstance* script, s32 isInitialCall); INCLUDE_ASM(s32, "code_F5750", PlayerFaceNpc, ScriptInstance* script, s32 isInitialCall);
INCLUDE_ASM(s32, "code_F5750", GetPlayerTargetYaw, ScriptInstance* script, s32 isInitialCall); ApiStatus GetPlayerTargetYaw(ScriptInstance* script, s32 isInitialCall) {
set_variable(script, *script->ptrReadPos, gPlayerStatus.targetYaw);
return ApiStatus_DONE2;
}
INCLUDE_ASM(s32, "code_F5750", SetPlayerFlagBits, ScriptInstance* script, s32 isInitialCall); INCLUDE_ASM(s32, "code_F5750", SetPlayerFlagBits, ScriptInstance* script, s32 isInitialCall);