Match SpeakToPlayer, remove uneccessary comment, add WIP SetNpcSpeed

This commit is contained in:
Jdog 2020-08-15 13:11:31 -07:00
parent 7d20b29129
commit 23de219c07
3 changed files with 18 additions and 15 deletions

View File

@ -1,13 +0,0 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel SpeakToPlayer
/* 0F4C60 802D02B0 27BDFFE8 */ addiu $sp, $sp, -0x18
/* 0F4C64 802D02B4 AFBF0010 */ sw $ra, 0x10($sp)
/* 0F4C68 802D02B8 0C0B40C8 */ jal _show_message
/* 0F4C6C 802D02BC 0000302D */ daddu $a2, $zero, $zero
/* 0F4C70 802D02C0 8FBF0010 */ lw $ra, 0x10($sp)
/* 0F4C74 802D02C4 03E00008 */ jr $ra
/* 0F4C78 802D02C8 27BD0018 */ addiu $sp, $sp, 0x18

View File

@ -20,7 +20,7 @@ s32 GetNpcPointer(script_context* script, s32 initialCall) {
bytecode npcID = get_variable(script, *ptrReadPos++);
bytecode varNPC = *ptrReadPos;
set_variable(script, varNPC, get_npc_safe(npcID)); // removed *
set_variable(script, varNPC, get_npc_safe(npcID));
return 2;
}
@ -33,6 +33,20 @@ INCLUDE_ASM(code_f2470_len_27f0, SetNpcScale);
INCLUDE_ASM(code_f2470_len_27f0, SetNpcCollisionSize);
INCLUDE_ASM(code_f2470_len_27f0, SetNpcSpeed);
// TODO: Fix issue with BNEZL vs BNEZ
/*
s32 SetNpcSpeed(script_context* script, s32 initialCall) {
bytecode* ptrReadPos = script->ptrReadPos;
bytecode npcID = get_variable(script, *ptrReadPos++);
f32 speed = get_float_variable(script, *ptrReadPos);
npc* npcPtr = resolve_npc(script, npcID);
npcPtr->moveSpeed = speed;
if(npcPtr != NULL) {
return 2;
}
}
*/
INCLUDE_ASM(code_f2470_len_27f0, SetNpcJumpscale);

View File

@ -1,6 +1,8 @@
#include "common.h"
INCLUDE_ASM(code_f4c60_len_4300, SpeakToPlayer);
void SpeakToPlayer(script_context* script, s32 initialCall) {
_show_message(script, initialCall, 0);
}
INCLUDE_ASM(code_f4c60_len_4300, EndSpeech);