papermario/src/code_1f580_len_1940.c

131 lines
4.9 KiB
C
Raw Normal View History

2020-08-04 08:49:11 +02:00
#include "common.h"
2020-09-26 03:51:54 +02:00
INCLUDE_ASM(s32, "code_1f580_len_1940", SetEncounterStatusFlags, ScriptInstance* script, s32 isInitialCall);
2020-08-04 08:49:11 +02:00
2020-09-25 23:18:09 +02:00
INCLUDE_ASM(s32, "code_1f580_len_1940", func_800441F0);
2020-09-24 05:16:13 +02:00
2020-09-25 23:18:09 +02:00
INCLUDE_ASM(s32, "code_1f580_len_1940", func_80044238);
2020-09-24 05:16:13 +02:00
2020-08-16 08:55:51 +02:00
ApiStatus LoadDemoBattle(ScriptInstance* script, s32 isInitialCall) {
2020-08-10 07:03:56 +02:00
load_demo_battle(get_variable(script, *script->ptrReadPos));
2020-08-16 08:55:51 +02:00
return ApiStatus_DONE2;
2020-08-10 07:03:56 +02:00
}
// ???
2020-08-16 08:55:51 +02:00
ApiStatus func_80044290(ScriptInstance* script, s32 isInitialCall) {
return ApiStatus_DONE2;
2020-08-10 07:03:56 +02:00
}
2020-08-04 08:49:11 +02:00
2020-09-26 03:51:54 +02:00
INCLUDE_ASM(s32, "code_1f580_len_1940", MakeNpcs, ScriptInstance* script, s32 isInitialCall);
2020-08-04 08:49:11 +02:00
2020-09-26 03:51:54 +02:00
INCLUDE_ASM(s32, "code_1f580_len_1940", RemoveNpc, ScriptInstance* script, s32 isInitialCall);
2020-08-04 08:49:11 +02:00
2020-09-26 03:51:54 +02:00
INCLUDE_ASM(s32, "code_1f580_len_1940", RemoveEncounter, ScriptInstance* script, s32 isInitialCall);
2020-08-04 08:49:11 +02:00
2020-09-26 03:51:54 +02:00
INCLUDE_ASM(s32, "code_1f580_len_1940", GetBattleOutcome, ScriptInstance* script, s32 isInitialCall);
2020-08-04 08:49:11 +02:00
2020-09-25 23:18:09 +02:00
INCLUDE_ASM(s32, "code_1f580_len_1940", func_800445A8);
2020-09-24 05:16:13 +02:00
2020-09-25 23:18:09 +02:00
INCLUDE_ASM(s32, "code_1f580_len_1940", func_800445D4);
2020-09-24 05:16:13 +02:00
2020-09-26 03:51:54 +02:00
ApiStatus GetOwnerEncounterTrigger(ScriptInstance* script, s32 isInitialCall) {
2020-08-10 07:03:56 +02:00
set_variable(script, *script->ptrReadPos, script->ownerActorID->encountered);
2020-08-16 08:55:51 +02:00
return ApiStatus_DONE2;
2020-08-10 07:03:56 +02:00
}
2020-08-04 08:49:11 +02:00
2020-09-26 03:51:54 +02:00
INCLUDE_ASM(s32, "code_1f580_len_1940", DoNpcDefeat, ScriptInstance* script, s32 isInitialCall);
2020-08-04 08:49:11 +02:00
2020-09-25 23:18:09 +02:00
INCLUDE_ASM(s32, "code_1f580_len_1940", start_battle);
2020-08-04 08:49:11 +02:00
2020-08-16 08:55:51 +02:00
ApiStatus StartBattle(ScriptInstance* script, s32 isInitialCall) {
2020-08-10 07:03:56 +02:00
start_battle(script, -1);
2020-08-16 08:55:51 +02:00
return ApiStatus_DONE1;
2020-08-10 07:03:56 +02:00
}
2020-08-04 08:49:11 +02:00
2020-08-16 08:55:51 +02:00
ApiStatus StartBattleWith(ScriptInstance* script, s32 isInitialCall) {
2020-08-10 07:03:56 +02:00
start_battle(script, get_variable(script, *script->ptrReadPos));
2020-08-16 08:55:51 +02:00
return ApiStatus_DONE1;
2020-08-10 07:03:56 +02:00
}
2020-08-04 08:49:11 +02:00
2020-09-26 03:51:54 +02:00
INCLUDE_ASM(s32, "code_1f580_len_1940", StartBossBattle, ScriptInstance* script, s32 isInitialCall);
2020-08-04 08:49:11 +02:00
2020-09-07 23:12:31 +02:00
ApiStatus SetBattleMusic(ScriptInstance* script, s32 isInitialCall) {
Bytecode songID = get_variable(script, *script->ptrReadPos);
EncounterStatus* currentEncounter = &gCurrentEncounter;
currentEncounter->allowFleeing = 1;
currentEncounter->songID = songID;
currentEncounter->unk_18 = -1;
return ApiStatus_DONE2;
}
2020-08-04 08:49:11 +02:00
2020-09-26 03:51:54 +02:00
INCLUDE_ASM(s32, "code_1f580_len_1940", BindNpcAI, ScriptInstance* script, s32 isInitialCall);
2020-08-04 08:49:11 +02:00
2020-09-26 03:51:54 +02:00
INCLUDE_ASM(s32, "code_1f580_len_1940", BindNpcIdle, ScriptInstance* script, s32 isInitialCall);
2020-08-04 08:49:11 +02:00
2020-09-26 03:51:54 +02:00
INCLUDE_ASM(s32, "code_1f580_len_1940", RestartNpcAI, ScriptInstance* script, s32 isInitialCall);
2020-08-04 08:49:11 +02:00
2020-09-26 03:51:54 +02:00
INCLUDE_ASM(s32, "code_1f580_len_1940", EnableNpcAI, ScriptInstance* script, s32 isInitialCall);
2020-08-04 08:49:11 +02:00
2020-09-26 03:51:54 +02:00
INCLUDE_ASM(s32, "code_1f580_len_1940", SetNpcAux, ScriptInstance* script, s32 isInitialCall);
2020-08-04 08:49:11 +02:00
2020-09-26 03:51:54 +02:00
INCLUDE_ASM(s32, "code_1f580_len_1940", BindNpcAux, ScriptInstance* script, s32 isInitialCall);
2020-08-04 08:49:11 +02:00
2020-09-26 03:51:54 +02:00
INCLUDE_ASM(s32, "code_1f580_len_1940", RestartNpcAux, ScriptInstance* script, s32 isInitialCall);
2020-08-04 08:49:11 +02:00
2020-09-26 03:51:54 +02:00
INCLUDE_ASM(s32, "code_1f580_len_1940", EnableNpcAux, ScriptInstance* script, s32 isInitialCall);
2020-08-04 08:49:11 +02:00
2020-09-26 03:51:54 +02:00
INCLUDE_ASM(s32, "code_1f580_len_1940", BindNpcInteract, ScriptInstance* script, s32 isInitialCall);
2020-08-04 08:49:11 +02:00
2020-09-26 03:51:54 +02:00
INCLUDE_ASM(s32, "code_1f580_len_1940", BindNpcHit, ScriptInstance* script, s32 isInitialCall);
2020-08-04 08:49:11 +02:00
2020-09-26 03:51:54 +02:00
INCLUDE_ASM(s32, "code_1f580_len_1940", BindNpcDefeat, ScriptInstance* script, s32 isInitialCall);
2020-08-04 08:49:11 +02:00
2020-09-26 03:51:54 +02:00
INCLUDE_ASM(s32, "code_1f580_len_1940", SetSelfVar, ScriptInstance* script, s32 isInitialCall);
2020-08-04 08:49:11 +02:00
2020-09-26 03:51:54 +02:00
INCLUDE_ASM(s32, "code_1f580_len_1940", GetSelfVar, ScriptInstance* script, s32 isInitialCall);
2020-08-04 08:49:11 +02:00
2020-09-26 03:51:54 +02:00
INCLUDE_ASM(s32, "code_1f580_len_1940", SetNpcVar, ScriptInstance* script, s32 isInitialCall);
2020-08-04 08:49:11 +02:00
2020-09-26 03:51:54 +02:00
INCLUDE_ASM(s32, "code_1f580_len_1940", GetNpcVar, ScriptInstance* script, s32 isInitialCall);
2020-08-04 08:49:11 +02:00
2020-09-26 03:51:54 +02:00
INCLUDE_ASM(s32, "code_1f580_len_1940", SetSelfRotation, ScriptInstance* script, s32 isInitialCall);
2020-08-04 08:49:11 +02:00
2020-08-16 08:55:51 +02:00
ApiStatus SetSelfEnemyFlags(ScriptInstance* script, s32 isInitialCall) {
2020-08-10 07:03:56 +02:00
script->ownerActorID->flags = *script->ptrReadPos;
2020-08-16 08:55:51 +02:00
return ApiStatus_DONE2;
2020-08-10 07:03:56 +02:00
}
2020-08-04 08:49:11 +02:00
2020-09-26 03:51:54 +02:00
INCLUDE_ASM(s32, "code_1f580_len_1940", SetSelfEnemyFlagBits, ScriptInstance* script, s32 isInitialCall);
2020-08-04 08:49:11 +02:00
2020-09-25 23:18:09 +02:00
INCLUDE_ASM(s32, "code_1f580_len_1940", func_80045580);
2020-09-24 05:16:13 +02:00
2020-08-16 08:55:51 +02:00
ApiStatus GetSelfNpcID(ScriptInstance* script, s32 isInitialCall) {
2020-08-10 07:03:56 +02:00
set_variable(script, *script->ptrReadPos, script->ownerActorID->npcID);
2020-08-16 08:55:51 +02:00
return ApiStatus_DONE2;
2020-08-10 07:03:56 +02:00
}
2020-08-04 08:49:11 +02:00
2020-09-26 03:51:54 +02:00
INCLUDE_ASM(s32, "code_1f580_len_1940", ClearDefeatedEnemies, ScriptInstance* script, s32 isInitialCall);
2020-08-04 08:49:11 +02:00
2020-09-26 03:51:54 +02:00
INCLUDE_ASM(s32, "code_1f580_len_1940", SetEnemyFlagBits, ScriptInstance* script, s32 isInitialCall);
2020-08-04 08:49:11 +02:00
2020-09-25 23:18:09 +02:00
INCLUDE_ASM(s32, "code_1f580_len_1940", func_8004572C);
2020-09-24 05:16:13 +02:00
2020-09-26 03:51:54 +02:00
INCLUDE_ASM(s32, "code_1f580_len_1940", GetSelfAnimationFromTable, ScriptInstance* script, s32 isInitialCall);
2020-09-24 05:16:13 +02:00
2020-09-25 23:18:09 +02:00
INCLUDE_ASM(s32, "code_1f580_len_1940", func_80045798);
2020-09-24 05:16:13 +02:00
2020-09-25 23:18:09 +02:00
INCLUDE_ASM(s32, "code_1f580_len_1940", func_800457C4);
2020-09-24 05:16:13 +02:00
2020-09-25 23:18:09 +02:00
INCLUDE_ASM(s32, "code_1f580_len_1940", func_800457F8);
2020-09-24 05:16:13 +02:00
2020-09-25 23:18:09 +02:00
INCLUDE_ASM(s32, "code_1f580_len_1940", func_8004580C);
2020-09-24 05:16:13 +02:00
2020-09-25 23:18:09 +02:00
INCLUDE_ASM(s32, "code_1f580_len_1940", func_80045838);
2020-09-24 05:16:13 +02:00
2020-09-25 23:18:09 +02:00
INCLUDE_ASM(s32, "code_1f580_len_1940", func_800458CC);
2020-09-24 05:16:13 +02:00
2020-09-25 23:18:09 +02:00
INCLUDE_ASM(s32, "code_1f580_len_1940", func_80045900);
2020-09-24 05:16:13 +02:00
2020-09-25 23:18:09 +02:00
INCLUDE_ASM(s32, "code_1f580_len_1940", func_80045A58);