2020-08-04 08:49:11 +02:00
|
|
|
#include "common.h"
|
|
|
|
|
2020-08-16 07:13:03 +02:00
|
|
|
s32 SpeakToPlayer(ScriptInstance* script, s32 initialCall) {
|
2020-08-16 00:26:14 +02:00
|
|
|
return _show_message(script, initialCall, 0);
|
2020-08-15 22:11:31 +02:00
|
|
|
}
|
2020-08-04 08:49:11 +02:00
|
|
|
|
2020-08-16 07:13:03 +02:00
|
|
|
s32 EndSpeech(ScriptInstance* script, s32 initialCall) {
|
2020-08-16 00:26:14 +02:00
|
|
|
return _show_message(script, initialCall, 1);
|
2020-08-15 22:54:06 +02:00
|
|
|
}
|
2020-08-04 08:49:11 +02:00
|
|
|
|
2020-08-16 07:13:03 +02:00
|
|
|
s32 ContinueSpeech(ScriptInstance* script, s32 initialCall) {
|
2020-08-16 00:26:14 +02:00
|
|
|
return _show_message(script, initialCall, 2);
|
2020-08-15 22:54:06 +02:00
|
|
|
}
|
2020-08-04 08:49:11 +02:00
|
|
|
|
2020-08-16 07:13:03 +02:00
|
|
|
s32 SpeakToNpc(ScriptInstance* script, s32 initialCall) {
|
2020-08-16 00:26:14 +02:00
|
|
|
return _show_message(script, initialCall, 3);
|
2020-08-15 22:54:06 +02:00
|
|
|
}
|
2020-08-04 08:49:11 +02:00
|
|
|
|
|
|
|
INCLUDE_ASM(code_f4c60_len_4300, _show_message);
|
|
|
|
|
|
|
|
INCLUDE_ASM(code_f4c60_len_4300, ShowMessageAtScreenPos);
|
|
|
|
|
|
|
|
INCLUDE_ASM(code_f4c60_len_4300, ShowMessageAtWorldPos);
|
|
|
|
|
|
|
|
INCLUDE_ASM(code_f4c60_len_4300, CloseMessage);
|
|
|
|
|
|
|
|
INCLUDE_ASM(code_f4c60_len_4300, SwitchMessage);
|
|
|
|
|
|
|
|
INCLUDE_ASM(code_f4c60_len_4300, ShowChoice);
|
|
|
|
|
2020-08-16 07:13:03 +02:00
|
|
|
s32 CloseChoice(ScriptInstance* script, s32 initialCall) {
|
2020-08-15 23:51:44 +02:00
|
|
|
close_message(D_802DB268);
|
|
|
|
return 1;
|
|
|
|
}
|
2020-08-04 08:49:11 +02:00
|
|
|
|
2020-08-16 07:13:03 +02:00
|
|
|
s32 CancelMessage(ScriptInstance* script, s32 initialCall) {
|
2020-08-15 23:51:44 +02:00
|
|
|
cancel_message(gCurrentPrintContext);
|
|
|
|
return 2;
|
|
|
|
}
|
2020-08-04 08:49:11 +02:00
|
|
|
|
2020-08-16 07:13:03 +02:00
|
|
|
s32 CancelMessageAndBlock(ScriptInstance* script, s32 initialCall) {
|
2020-08-15 23:51:44 +02:00
|
|
|
cancel_message(gCurrentPrintContext);
|
|
|
|
return 0;
|
|
|
|
}
|
2020-08-04 08:49:11 +02:00
|
|
|
|
2020-08-16 07:13:03 +02:00
|
|
|
s32 SetMessageImages(ScriptInstance* script, s32 initialCall) {
|
2020-08-15 22:54:06 +02:00
|
|
|
set_message_images(*script->ptrReadPos);
|
|
|
|
return 2;
|
|
|
|
}
|
2020-08-04 08:49:11 +02:00
|
|
|
|
2020-08-16 07:13:03 +02:00
|
|
|
s32 func_802D0C94(ScriptInstance* script, s32 initialCall) {
|
2020-08-15 22:54:06 +02:00
|
|
|
if (get_variable(script, *script->ptrReadPos) == 0) {
|
|
|
|
D_8009A650[0] |= 0x10;
|
|
|
|
} else {
|
|
|
|
D_8009A650[0] &= ~0x10;
|
|
|
|
}
|
|
|
|
return 2;
|
|
|
|
}
|
|
|
|
|
2020-08-16 07:13:03 +02:00
|
|
|
s32 SetMessageString(ScriptInstance* script, s32 initialCall) {
|
2020-08-16 05:23:40 +02:00
|
|
|
Bytecode* ptrReadPos = script->ptrReadPos;
|
|
|
|
Bytecode string = get_variable(script, *ptrReadPos++);
|
|
|
|
Bytecode index = get_variable(script, *ptrReadPos++);
|
2020-08-15 22:54:06 +02:00
|
|
|
|
|
|
|
set_message_string(string, index);
|
|
|
|
return 2;
|
|
|
|
}
|
2020-08-04 08:49:11 +02:00
|
|
|
|
|
|
|
INCLUDE_ASM(code_f4c60_len_4300, SetMessageValue);
|
2020-08-15 22:54:06 +02:00
|
|
|
// TODO: Figure out why there's an extra NOP after this function
|
2020-08-16 03:51:51 +02:00
|
|
|
// It's probably because of a file split issue
|
2020-08-15 22:54:06 +02:00
|
|
|
/*
|
|
|
|
s32 SetMessageValue(script_context* script, s32 initialCall) {
|
|
|
|
bytecode* ptrReadPos = script->ptrReadPos;
|
|
|
|
bytecode value = get_variable(script, *ptrReadPos++);
|
|
|
|
bytecode index = get_variable(script, *ptrReadPos);
|
|
|
|
|
|
|
|
set_message_value(value, index);
|
|
|
|
return 2;
|
|
|
|
}
|
|
|
|
*/
|
2020-08-04 08:49:11 +02:00
|
|
|
|
|
|
|
INCLUDE_ASM(code_f4c60_len_4300, HidePlayerShadow);
|
|
|
|
|
|
|
|
INCLUDE_ASM(code_f4c60_len_4300, DisablePlayerPhysics);
|
|
|
|
|
|
|
|
INCLUDE_ASM(code_f4c60_len_4300, DisablePlayerInput);
|
|
|
|
|
|
|
|
INCLUDE_ASM(code_f4c60_len_4300, SetPlayerPos);
|
|
|
|
|
|
|
|
INCLUDE_ASM(code_f4c60_len_4300, SetPlayerCollisionSize);
|
|
|
|
|
|
|
|
INCLUDE_ASM(code_f4c60_len_4300, SetPlayerSpeed);
|
|
|
|
|
|
|
|
INCLUDE_ASM(code_f4c60_len_4300, SetPlayerJumpscale);
|
|
|
|
|
|
|
|
INCLUDE_ASM(code_f4c60_len_4300, SetPlayerAnimation);
|
|
|
|
|
|
|
|
INCLUDE_ASM(code_f4c60_len_4300, SetPlayerActionState);
|
|
|
|
|
|
|
|
INCLUDE_ASM(code_f4c60_len_4300, MovePlayerTo);
|
|
|
|
|
|
|
|
INCLUDE_ASM(code_f4c60_len_4300, player_jump);
|
|
|
|
|
|
|
|
INCLUDE_ASM(code_f4c60_len_4300, PlayerJump);
|
|
|
|
|
|
|
|
INCLUDE_ASM(code_f4c60_len_4300, PlayerJump1);
|
|
|
|
|
|
|
|
INCLUDE_ASM(code_f4c60_len_4300, PlayerJump2);
|
|
|
|
|
|
|
|
INCLUDE_ASM(code_f4c60_len_4300, InterpPlayerYaw);
|
|
|
|
|
|
|
|
INCLUDE_ASM(code_f4c60_len_4300, PlayerFaceNpc);
|
|
|
|
|
|
|
|
INCLUDE_ASM(code_f4c60_len_4300, GetPlayerTargetYaw);
|
|
|
|
|
|
|
|
INCLUDE_ASM(code_f4c60_len_4300, SetPlayerFlagBits);
|
|
|
|
|
|
|
|
INCLUDE_ASM(code_f4c60_len_4300, GetPlayerActionState);
|
|
|
|
|
|
|
|
INCLUDE_ASM(code_f4c60_len_4300, GetPlayerPos);
|
|
|
|
|
|
|
|
INCLUDE_ASM(code_f4c60_len_4300, GetPlayerAnimation);
|
|
|
|
|
|
|
|
INCLUDE_ASM(code_f4c60_len_4300, FullyRestoreHPandFP);
|
|
|
|
|
|
|
|
INCLUDE_ASM(code_f4c60_len_4300, FullyRestoreSP);
|
|
|
|
|
|
|
|
INCLUDE_ASM(code_f4c60_len_4300, EnablePartner);
|
|
|
|
|
|
|
|
INCLUDE_ASM(code_f4c60_len_4300, DisablePartner);
|
|
|
|
|
|
|
|
INCLUDE_ASM(code_f4c60_len_4300, ForceExitHeading);
|
|
|
|
|
|
|
|
INCLUDE_ASM(code_f4c60_len_4300, UseExitHeading);
|
|
|
|
|
|
|
|
INCLUDE_ASM(code_f4c60_len_4300, func_802D23F8);
|
|
|
|
|
|
|
|
INCLUDE_ASM(code_f4c60_len_4300, DisablePulseStone);
|
|
|
|
|
|
|
|
INCLUDE_ASM(code_f4c60_len_4300, GetCurrentPartner);
|
|
|
|
|
|
|
|
INCLUDE_ASM(code_f4c60_len_4300, Disable8bitMario);
|
|
|
|
|
|
|
|
INCLUDE_ASM(code_f4c60_len_4300, PlaySoundAtPlayer);
|
|
|
|
|
|
|
|
INCLUDE_ASM(code_f4c60_len_4300, func_802D2D30);
|
|
|
|
|
|
|
|
INCLUDE_ASM(code_f4c60_len_4300, func_802D2F34);
|
|
|
|
|
|
|
|
INCLUDE_ASM(code_f4c60_len_4300, CreateImageObj);
|
|
|
|
|
|
|
|
INCLUDE_ASM(code_f4c60_len_4300, RemoveImageObj);
|
|
|
|
|
|
|
|
INCLUDE_ASM(code_f4c60_len_4300, SetObjPosition);
|
|
|
|
|
|
|
|
INCLUDE_ASM(code_f4c60_len_4300, SetObjRotation);
|
|
|
|
|
|
|
|
INCLUDE_ASM(code_f4c60_len_4300, SetObjScale);
|
|
|
|
|
|
|
|
INCLUDE_ASM(code_f4c60_len_4300, SetObjJumpScale);
|
|
|
|
|
|
|
|
INCLUDE_ASM(code_f4c60_len_4300, JumpObj);
|
|
|
|
|
|
|
|
INCLUDE_ASM(code_f4c60_len_4300, func_802D4164);
|
|
|
|
|
|
|
|
INCLUDE_ASM(code_f4c60_len_4300, func_802D43F4);
|
|
|
|
|
|
|
|
INCLUDE_ASM(code_f4c60_len_4300, func_802D4488);
|
|
|
|
|
|
|
|
INCLUDE_ASM(code_f4c60_len_4300, func_802D4560);
|