2020-08-04 08:49:11 +02:00
|
|
|
#include "common.h"
|
|
|
|
|
2020-08-16 08:55:51 +02:00
|
|
|
ApiStatus SpeakToPlayer(ScriptInstance* script, s32 isInitialCall) {
|
|
|
|
return _show_message(script, isInitialCall, 0);
|
2020-08-15 22:11:31 +02:00
|
|
|
}
|
2020-08-04 08:49:11 +02:00
|
|
|
|
2020-08-16 08:55:51 +02:00
|
|
|
ApiStatus EndSpeech(ScriptInstance* script, s32 isInitialCall) {
|
|
|
|
return _show_message(script, isInitialCall, 1);
|
2020-08-15 22:54:06 +02:00
|
|
|
}
|
2020-08-04 08:49:11 +02:00
|
|
|
|
2020-08-16 08:55:51 +02:00
|
|
|
ApiStatus ContinueSpeech(ScriptInstance* script, s32 isInitialCall) {
|
|
|
|
return _show_message(script, isInitialCall, 2);
|
2020-08-15 22:54:06 +02:00
|
|
|
}
|
2020-08-04 08:49:11 +02:00
|
|
|
|
2020-08-16 08:55:51 +02:00
|
|
|
ApiStatus SpeakToNpc(ScriptInstance* script, s32 isInitialCall) {
|
|
|
|
return _show_message(script, isInitialCall, 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);
|
|
|
|
|
2020-08-16 08:55:51 +02:00
|
|
|
INCLUDE_API_ASM(code_f4c60_len_4300, ShowMessageAtScreenPos);
|
2020-08-04 08:49:11 +02:00
|
|
|
|
2020-08-16 08:55:51 +02:00
|
|
|
INCLUDE_API_ASM(code_f4c60_len_4300, ShowMessageAtWorldPos);
|
2020-08-04 08:49:11 +02:00
|
|
|
|
2020-08-16 08:55:51 +02:00
|
|
|
INCLUDE_API_ASM(code_f4c60_len_4300, CloseMessage);
|
2020-08-04 08:49:11 +02:00
|
|
|
|
2020-08-16 08:55:51 +02:00
|
|
|
INCLUDE_API_ASM(code_f4c60_len_4300, SwitchMessage);
|
2020-08-04 08:49:11 +02:00
|
|
|
|
2020-08-16 08:55:51 +02:00
|
|
|
INCLUDE_API_ASM(code_f4c60_len_4300, ShowChoice);
|
2020-08-04 08:49:11 +02:00
|
|
|
|
2020-08-16 08:55:51 +02:00
|
|
|
ApiStatus CloseChoice(ScriptInstance* script, s32 isInitialCall) {
|
2020-08-15 23:51:44 +02:00
|
|
|
close_message(D_802DB268);
|
2020-08-16 08:55:51 +02:00
|
|
|
return ApiStatus_DONE1;
|
2020-08-15 23:51:44 +02:00
|
|
|
}
|
2020-08-04 08:49:11 +02:00
|
|
|
|
2020-08-16 08:55:51 +02:00
|
|
|
ApiStatus CancelMessage(ScriptInstance* script, s32 isInitialCall) {
|
2020-08-15 23:51:44 +02:00
|
|
|
cancel_message(gCurrentPrintContext);
|
2020-08-16 08:55:51 +02:00
|
|
|
return ApiStatus_DONE2;
|
2020-08-15 23:51:44 +02:00
|
|
|
}
|
2020-08-04 08:49:11 +02:00
|
|
|
|
2020-08-16 08:55:51 +02:00
|
|
|
ApiStatus CancelMessageAndBlock(ScriptInstance* script, s32 isInitialCall) {
|
2020-08-15 23:51:44 +02:00
|
|
|
cancel_message(gCurrentPrintContext);
|
2020-08-16 08:55:51 +02:00
|
|
|
return ApiStatus_BLOCK;
|
2020-08-15 23:51:44 +02:00
|
|
|
}
|
2020-08-04 08:49:11 +02:00
|
|
|
|
2020-08-16 08:55:51 +02:00
|
|
|
ApiStatus SetMessageImages(ScriptInstance* script, s32 isInitialCall) {
|
2020-08-15 22:54:06 +02:00
|
|
|
set_message_images(*script->ptrReadPos);
|
2020-08-16 08:55:51 +02:00
|
|
|
return ApiStatus_DONE2;
|
2020-08-15 22:54:06 +02:00
|
|
|
}
|
2020-08-04 08:49:11 +02:00
|
|
|
|
2020-08-16 08:55:51 +02:00
|
|
|
ApiStatus 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;
|
|
|
|
}
|
2020-08-16 08:55:51 +02:00
|
|
|
return ApiStatus_DONE2;
|
2020-08-15 22:54:06 +02:00
|
|
|
}
|
|
|
|
|
2020-08-16 08:55:51 +02:00
|
|
|
ApiStatus SetMessageString(ScriptInstance* script, s32 isInitialCall) {
|
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);
|
2020-08-16 08:55:51 +02:00
|
|
|
return ApiStatus_DONE2;
|
2020-08-15 22:54:06 +02:00
|
|
|
}
|
2020-08-04 08:49:11 +02:00
|
|
|
|
2020-08-19 03:45:26 +02:00
|
|
|
#ifdef NON_MATCHING
|
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-16 08:55:51 +02:00
|
|
|
ApiStatus SetMessageValue(ScriptInstance* script, s32 initialCall) {
|
|
|
|
Bytecode* ptrReadPos = script->ptrReadPos;
|
|
|
|
Bytecode value = get_variable(script, *ptrReadPos++);
|
|
|
|
Bytecode index = get_variable(script, *ptrReadPos);
|
2020-08-15 22:54:06 +02:00
|
|
|
|
|
|
|
set_message_value(value, index);
|
2020-08-16 08:55:51 +02:00
|
|
|
return ApiStatus_DONE2;
|
2020-08-15 22:54:06 +02:00
|
|
|
}
|
2020-08-19 03:45:26 +02:00
|
|
|
#else
|
|
|
|
INCLUDE_API_ASM(code_f4c60_len_4300, SetMessageValue);
|
|
|
|
#endif
|
2020-08-04 08:49:11 +02:00
|
|
|
|
2020-08-16 08:55:51 +02:00
|
|
|
INCLUDE_API_ASM(code_f4c60_len_4300, HidePlayerShadow);
|
2020-08-04 08:49:11 +02:00
|
|
|
|
2020-08-16 08:55:51 +02:00
|
|
|
INCLUDE_API_ASM(code_f4c60_len_4300, DisablePlayerPhysics);
|
2020-08-04 08:49:11 +02:00
|
|
|
|
2020-08-16 08:55:51 +02:00
|
|
|
INCLUDE_API_ASM(code_f4c60_len_4300, DisablePlayerInput);
|
2020-08-04 08:49:11 +02:00
|
|
|
|
2020-08-16 08:55:51 +02:00
|
|
|
INCLUDE_API_ASM(code_f4c60_len_4300, SetPlayerPos);
|
2020-08-04 08:49:11 +02:00
|
|
|
|
2020-08-16 08:55:51 +02:00
|
|
|
INCLUDE_API_ASM(code_f4c60_len_4300, SetPlayerCollisionSize);
|
2020-08-04 08:49:11 +02:00
|
|
|
|
2020-08-16 08:55:51 +02:00
|
|
|
INCLUDE_API_ASM(code_f4c60_len_4300, SetPlayerSpeed);
|
2020-08-04 08:49:11 +02:00
|
|
|
|
2020-08-16 08:55:51 +02:00
|
|
|
INCLUDE_API_ASM(code_f4c60_len_4300, SetPlayerJumpscale);
|
2020-08-04 08:49:11 +02:00
|
|
|
|
2020-08-16 08:55:51 +02:00
|
|
|
INCLUDE_API_ASM(code_f4c60_len_4300, SetPlayerAnimation);
|
2020-08-04 08:49:11 +02:00
|
|
|
|
2020-08-16 08:55:51 +02:00
|
|
|
INCLUDE_API_ASM(code_f4c60_len_4300, SetPlayerActionState);
|
2020-08-04 08:49:11 +02:00
|
|
|
|
2020-08-16 08:55:51 +02:00
|
|
|
INCLUDE_API_ASM(code_f4c60_len_4300, MovePlayerTo);
|
2020-08-04 08:49:11 +02:00
|
|
|
|
|
|
|
INCLUDE_ASM(code_f4c60_len_4300, player_jump);
|
|
|
|
|
2020-08-16 08:55:51 +02:00
|
|
|
INCLUDE_API_ASM(code_f4c60_len_4300, PlayerJump);
|
2020-08-04 08:49:11 +02:00
|
|
|
|
2020-08-16 08:55:51 +02:00
|
|
|
INCLUDE_API_ASM(code_f4c60_len_4300, PlayerJump1);
|
2020-08-04 08:49:11 +02:00
|
|
|
|
2020-08-16 08:55:51 +02:00
|
|
|
INCLUDE_API_ASM(code_f4c60_len_4300, PlayerJump2);
|
2020-08-04 08:49:11 +02:00
|
|
|
|
2020-08-16 08:55:51 +02:00
|
|
|
INCLUDE_API_ASM(code_f4c60_len_4300, InterpPlayerYaw);
|
2020-08-04 08:49:11 +02:00
|
|
|
|
2020-08-16 08:55:51 +02:00
|
|
|
INCLUDE_API_ASM(code_f4c60_len_4300, PlayerFaceNpc);
|
2020-08-04 08:49:11 +02:00
|
|
|
|
2020-08-16 08:55:51 +02:00
|
|
|
INCLUDE_API_ASM(code_f4c60_len_4300, GetPlayerTargetYaw);
|
2020-08-04 08:49:11 +02:00
|
|
|
|
2020-08-16 08:55:51 +02:00
|
|
|
INCLUDE_API_ASM(code_f4c60_len_4300, SetPlayerFlagBits);
|
2020-08-04 08:49:11 +02:00
|
|
|
|
2020-08-16 08:55:51 +02:00
|
|
|
INCLUDE_API_ASM(code_f4c60_len_4300, GetPlayerActionState);
|
2020-08-04 08:49:11 +02:00
|
|
|
|
2020-08-16 08:55:51 +02:00
|
|
|
INCLUDE_API_ASM(code_f4c60_len_4300, GetPlayerPos);
|
2020-08-04 08:49:11 +02:00
|
|
|
|
2020-08-16 08:55:51 +02:00
|
|
|
INCLUDE_API_ASM(code_f4c60_len_4300, GetPlayerAnimation);
|
2020-08-04 08:49:11 +02:00
|
|
|
|
2020-08-16 08:55:51 +02:00
|
|
|
INCLUDE_API_ASM(code_f4c60_len_4300, FullyRestoreHPandFP);
|
2020-08-04 08:49:11 +02:00
|
|
|
|
2020-08-16 08:55:51 +02:00
|
|
|
INCLUDE_API_ASM(code_f4c60_len_4300, FullyRestoreSP);
|
2020-08-04 08:49:11 +02:00
|
|
|
|
2020-08-16 08:55:51 +02:00
|
|
|
INCLUDE_API_ASM(code_f4c60_len_4300, EnablePartner);
|
2020-08-04 08:49:11 +02:00
|
|
|
|
2020-08-16 08:55:51 +02:00
|
|
|
INCLUDE_API_ASM(code_f4c60_len_4300, DisablePartner);
|
2020-08-04 08:49:11 +02:00
|
|
|
|
2020-08-16 08:55:51 +02:00
|
|
|
INCLUDE_API_ASM(code_f4c60_len_4300, ForceExitHeading);
|
2020-08-04 08:49:11 +02:00
|
|
|
|
2020-08-16 08:55:51 +02:00
|
|
|
INCLUDE_API_ASM(code_f4c60_len_4300, UseExitHeading);
|
2020-08-04 08:49:11 +02:00
|
|
|
|
|
|
|
INCLUDE_ASM(code_f4c60_len_4300, func_802D23F8);
|
|
|
|
|
2020-08-16 08:55:51 +02:00
|
|
|
INCLUDE_API_ASM(code_f4c60_len_4300, DisablePulseStone);
|
2020-08-04 08:49:11 +02:00
|
|
|
|
2020-08-16 08:55:51 +02:00
|
|
|
INCLUDE_API_ASM(code_f4c60_len_4300, GetCurrentPartner);
|
2020-08-04 08:49:11 +02:00
|
|
|
|
2020-08-16 08:55:51 +02:00
|
|
|
INCLUDE_API_ASM(code_f4c60_len_4300, Disable8bitMario);
|
2020-08-04 08:49:11 +02:00
|
|
|
|
2020-08-16 08:55:51 +02:00
|
|
|
INCLUDE_API_ASM(code_f4c60_len_4300, PlaySoundAtPlayer);
|
2020-08-04 08:49:11 +02:00
|
|
|
|
|
|
|
INCLUDE_ASM(code_f4c60_len_4300, func_802D2D30);
|
|
|
|
|
|
|
|
INCLUDE_ASM(code_f4c60_len_4300, func_802D2F34);
|
|
|
|
|
2020-08-16 08:55:51 +02:00
|
|
|
INCLUDE_API_ASM(code_f4c60_len_4300, CreateImageObj);
|
2020-08-04 08:49:11 +02:00
|
|
|
|
2020-08-16 08:55:51 +02:00
|
|
|
INCLUDE_API_ASM(code_f4c60_len_4300, RemoveImageObj);
|
2020-08-04 08:49:11 +02:00
|
|
|
|
2020-08-16 08:55:51 +02:00
|
|
|
INCLUDE_API_ASM(code_f4c60_len_4300, SetObjPosition);
|
2020-08-04 08:49:11 +02:00
|
|
|
|
2020-08-16 08:55:51 +02:00
|
|
|
INCLUDE_API_ASM(code_f4c60_len_4300, SetObjRotation);
|
2020-08-04 08:49:11 +02:00
|
|
|
|
2020-08-16 08:55:51 +02:00
|
|
|
INCLUDE_API_ASM(code_f4c60_len_4300, SetObjScale);
|
2020-08-04 08:49:11 +02:00
|
|
|
|
2020-08-16 08:55:51 +02:00
|
|
|
INCLUDE_API_ASM(code_f4c60_len_4300, SetObjJumpScale);
|
2020-08-04 08:49:11 +02:00
|
|
|
|
2020-08-16 08:55:51 +02:00
|
|
|
INCLUDE_API_ASM(code_f4c60_len_4300, JumpObj);
|
2020-08-04 08:49:11 +02:00
|
|
|
|
|
|
|
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);
|