mirror of
https://github.com/izzy2lost/2ship2harkinian-Android.git
synced 2026-06-19 01:20:08 -07:00
EnBaba Documented (Bomb Shop Lady) (#825)
* Merge in sub_s_models * Update subs DL names * Unused Weight pathing * Function headers for weightpathing * TimePathing WIP * Timepathing, still unsure about unk184 * Move subs functions from functions.h to z64subs.h * Add fake comment * Some cleanup and renames * Renames/cleanup of actors that use timepath * Cleanup * More cleanup * Rename unk stuff * Merge in upstream/master * TimeElapsed -> elapsedTime * Fix * Final cleanup * SubS Time Paths * Still needs dialog action functions * Fix waypoint comments * Review pt. 1 * Baba review * ScheduleResult -> ScheduleOutput * Forgot to update functions.txt oops * Add clarifying comment to SubS_TimePathing_FillWeightArray * format.sh * Finish up docs * Fix order comments * Fix * Change bombShopkeeper struct member to * Fix a few merge mistakes * Add ScheduleOutput to namefixer * format * Format and fix merge * Review * PR * z64schedule.h * text summary Co-authored-by: Maide <34639600+Kelebek1@users.noreply.github.com> Co-authored-by: Tom Overton <tom-overton@users.noreply.github.com>
This commit is contained in:
co-authored by
Maide
Tom Overton
parent
f0e4581e22
commit
cbeeeb172a
@@ -18,7 +18,7 @@
|
||||
<DList Name="gBbaFeetDL" Offset="0x4180" />
|
||||
|
||||
<!-- Animations -->
|
||||
<Animation Name="gBbaWalkingAnim" Offset="0x4910" /> <!-- Looks to be unused -->
|
||||
<Animation Name="gBbaSwayAnim" Offset="0x4910" />
|
||||
<Animation Name="gBbaKnockedOverAnim" Offset="0x5154" />
|
||||
<Animation Name="gBbaLyingDownAnim" Offset="0x58B8" />
|
||||
<Animation Name="gBbaIdleHoldingBagAnim" Offset="0x5DC4" />
|
||||
|
||||
+1
-1
@@ -2247,7 +2247,7 @@ s32 Entrance_GetSceneNum(u16 entranceIndex);
|
||||
s32 Entrance_GetSceneNumAbsolute(u16 entranceIndex);
|
||||
s32 Entrance_GetSpawnNum(u16 entranceIndex);
|
||||
s32 Entrance_GetTransitionFlags(u16 entranceIndex);
|
||||
s32 Schedule_RunScript(PlayState* play, u8* script, ScheduleResult* result);
|
||||
s32 Schedule_RunScript(PlayState* play, u8* script, ScheduleOutput* output);
|
||||
void SkelAnime_DrawLimbLod(PlayState* play, s32 limbIndex, void** skeleton, Vec3s* jointTable, OverrideLimbDrawOpa overrideLimbDraw, PostLimbDrawOpa postLimbDraw, Actor* actor, s32 lod);
|
||||
void SkelAnime_DrawLod(PlayState* play, void** skeleton, Vec3s* jointTable, OverrideLimbDrawOpa overrideLimbDraw, PostLimbDrawOpa postLimbDraw, Actor* actor, s32 lod);
|
||||
void SkelAnime_DrawFlexLimbLod(PlayState* play, s32 limbIndex, void** skeleton, Vec3s* jointTable, OverrideLimbDrawFlex overrideLimbDraw, PostLimbDrawFlex postLimbDraw, Actor* actor, s32 lod, Mtx** mtx);
|
||||
|
||||
+33
-25
@@ -3,37 +3,45 @@
|
||||
|
||||
#include "ultra64.h"
|
||||
|
||||
/*
|
||||
Schedule is a subsystem that acts as a way to make decisions based on the
|
||||
time and scene (and a limited selection of items). It is utilized by writing
|
||||
a script that is encoded into bytecode and ran, returning the result in a
|
||||
struct. The returned result can be a value or a encoded time value.
|
||||
/**
|
||||
* Schedule is a subsystem that acts as a way to make decisions based on the
|
||||
* time and scene (and a limited selection of items). It is utilized by writing
|
||||
* a script that is encoded into bytecode and ran, returning the result in a
|
||||
* struct. The returned result can be a value or a encoded time value.
|
||||
*
|
||||
* The scripts contain 2 kinds of instructions:
|
||||
* - Checks with branches (relative offsets, either 1-byte offsets (short, *_S),
|
||||
* or 2-byte offsets (long, *_L))
|
||||
* - Returns
|
||||
*
|
||||
* Scripts are stored as u8[]. They are built using the macros are the bottom of
|
||||
* this file. The scheduledis.py script can be used to convert any scripts in
|
||||
* actor data into the macros.
|
||||
*/
|
||||
|
||||
The scripts contain 2 kinds of instructions:
|
||||
- Checks with branches (relative offsets, either 1-byte offsets (short, *_S),
|
||||
or 2-byte offsets (long, *_L))
|
||||
- Returns
|
||||
|
||||
Scripts are stored as u8[]. They are built using the macros are the bottom of
|
||||
this file. The scheduledis.py script can be used to convert any scripts in
|
||||
actor data into the macros.
|
||||
*/
|
||||
/**
|
||||
* Actors that use this system generally create 3 functions to interact with it.
|
||||
*
|
||||
* - FollowSchedule: The action function an actor sets to follow the schedule.
|
||||
* - ProcessScheduleOutput: Holds the logic of processing the output received by running the schedule script, called by FollowSchedule
|
||||
* - HandleSchedule: Holds the actual logic of how to actually follow the schedule based on the processed output, called by FollowSchedule
|
||||
*/
|
||||
|
||||
// Macro to convert the time format used in the save struct into the format used in Schedule
|
||||
#define SCHEDULE_CONVERT_TIME(time) ((time) - 0x10000 / 360 * 90)
|
||||
#define SCHEDULE_TIME_NOW SCHEDULE_CONVERT_TIME(gSaveContext.save.time)
|
||||
|
||||
typedef enum {
|
||||
/* 00 */ SCHEDULE_CMD_ID_CHECK_FLAG_S, // Checks if a weekEventReg flag is set and branches if so, short range branch
|
||||
/* 01 */ SCHEDULE_CMD_ID_CHECK_FLAG_L, // Checks if a weekEventReg flag is set and branches if so, long range branch
|
||||
/* 02 */ SCHEDULE_CMD_ID_CHECK_TIME_RANGE_S, // Checks if the current time is within the range of the two provided times and branches if so, short range branch
|
||||
/* 03 */ SCHEDULE_CMD_ID_CHECK_TIME_RANGE_L, // Checks if the current time is within the range of the two provided times and branches if so, long range branch
|
||||
/* 04 */ SCHEDULE_CMD_ID_RET_VAL_L, // Ends script and returns 2-byte value (Note: bugged as the return value size is only 1 byte in the struct)
|
||||
/* 05 */ SCHEDULE_CMD_ID_RET_NONE, // Ends script without returning anything
|
||||
/* 06 */ SCHEDULE_CMD_ID_RET_EMPTY, // Ends script and indicates return without changing existing value
|
||||
/* 07 */ SCHEDULE_CMD_ID_NOP, // No-Op
|
||||
/* 08 */ SCHEDULE_CMD_ID_CHECK_MISC_S, // Special check based on items or masks and branches if check passes, short range branch
|
||||
/* 09 */ SCHEDULE_CMD_ID_RET_VAL_S, // Ends script and returns byte value
|
||||
/* 0 */ SCHEDULE_CMD_ID_CHECK_FLAG_S, // Checks if a weekEventReg flag is set and branches if so, short range branch
|
||||
/* 1 */ SCHEDULE_CMD_ID_CHECK_FLAG_L, // Checks if a weekEventReg flag is set and branches if so, long range branch
|
||||
/* 2 */ SCHEDULE_CMD_ID_CHECK_TIME_RANGE_S, // Checks if the current time is within the range of the two provided times and branches if so, short range branch
|
||||
/* 3 */ SCHEDULE_CMD_ID_CHECK_TIME_RANGE_L, // Checks if the current time is within the range of the two provided times and branches if so, long range branch
|
||||
/* 4 */ SCHEDULE_CMD_ID_RET_VAL_L, // Ends script and returns 2-byte value (Note: bugged as the return value size is only 1 byte in the struct)
|
||||
/* 5 */ SCHEDULE_CMD_ID_RET_NONE, // Ends script without returning anything
|
||||
/* 6 */ SCHEDULE_CMD_ID_RET_EMPTY, // Ends script and indicates return without changing existing value
|
||||
/* 7 */ SCHEDULE_CMD_ID_NOP, // No-Op
|
||||
/* 8 */ SCHEDULE_CMD_ID_CHECK_MISC_S, // Special check based on items or masks and branches if check passes, short range branch
|
||||
/* 9 */ SCHEDULE_CMD_ID_RET_VAL_S, // Ends script and returns byte value
|
||||
/* 10 */ SCHEDULE_CMD_ID_CHECK_NOT_IN_SCENE_S, // Checks if the current scene is not SceneNum and branches if so, short range branch
|
||||
/* 11 */ SCHEDULE_CMD_ID_CHECK_NOT_IN_SCENE_L, // Checks if the current scene is not SceneNum and branches if so, long range branch
|
||||
/* 12 */ SCHEDULE_CMD_ID_CHECK_NOT_IN_DAY_S, // Checks if the current day is not Day and branches if so, short range branch
|
||||
@@ -56,7 +64,7 @@ typedef struct {
|
||||
/* 0x4 */ s32 time0;
|
||||
/* 0x8 */ s32 time1;
|
||||
/* 0xC */ s32 hasResult;
|
||||
} ScheduleResult; // size = 0x10
|
||||
} ScheduleOutput; // size = 0x10
|
||||
|
||||
typedef struct {
|
||||
/* 0x0 */ u8 cmd;
|
||||
|
||||
+1
-1
@@ -122,7 +122,7 @@ void SubS_GenShadowTex(Vec3f bodyPartsPos[], Vec3f* worldPos, u8* tex, f32 tween
|
||||
void SubS_DrawShadowTex(Actor* actor, struct GameState* gameState, u8* tex);
|
||||
|
||||
s16 SubS_ComputeTrackPointRot(s16* rot, s16 rotMax, s16 target, f32 slowness, f32 stepMin, f32 stepMax);
|
||||
s32 SubS_TrackPoint(Vec3f* point, Vec3f* focusPos, Vec3s* shapeRot, Vec3s* turnTarget, Vec3s* headRot, Vec3s* torsoRot, TrackOptionsSet* options);
|
||||
s32 SubS_TrackPoint(Vec3f* point, Vec3f* focusPos, Vec3s* shapeRot, Vec3s* trackTarget, Vec3s* headRot, Vec3s* torsoRot, TrackOptionsSet* options);
|
||||
|
||||
s32 SubS_AngleDiffLessEqual(s16 angleA, s16 threshold, s16 angleB);
|
||||
|
||||
|
||||
+33
-33
@@ -6,7 +6,7 @@
|
||||
(dest) = (temp) * (0x10000 / 60 / 24.0f); \
|
||||
(dest) = SCHEDULE_CONVERT_TIME(dest);
|
||||
|
||||
s32 Schedule_CheckFlagS(PlayState* play, u8** script, ScheduleResult* result) {
|
||||
s32 Schedule_CheckFlagS(PlayState* play, u8** script, ScheduleOutput* output) {
|
||||
ScheduleCmdCheckFlagS* cmd = (ScheduleCmdCheckFlagS*)*script;
|
||||
u16 flag = (cmd->flagByte << 8) | cmd->flagMask;
|
||||
|
||||
@@ -17,7 +17,7 @@ s32 Schedule_CheckFlagS(PlayState* play, u8** script, ScheduleResult* result) {
|
||||
return false;
|
||||
}
|
||||
|
||||
s32 Schedule_CheckFlagL(PlayState* play, u8** script, ScheduleResult* result) {
|
||||
s32 Schedule_CheckFlagL(PlayState* play, u8** script, ScheduleOutput* output) {
|
||||
ScheduleCmdCheckFlagL* cmd = (ScheduleCmdCheckFlagL*)*script;
|
||||
u16 flag = (cmd->flagByte << 8) | cmd->flagMask;
|
||||
|
||||
@@ -28,7 +28,7 @@ s32 Schedule_CheckFlagL(PlayState* play, u8** script, ScheduleResult* result) {
|
||||
return false;
|
||||
}
|
||||
|
||||
s32 Schedule_CheckTimeRangeS(PlayState* play, u8** script, ScheduleResult* result) {
|
||||
s32 Schedule_CheckTimeRangeS(PlayState* play, u8** script, ScheduleOutput* output) {
|
||||
s32 inRange = false;
|
||||
ScheduleCmdCheckTimeRangeS* cmd = (ScheduleCmdCheckTimeRangeS*)*script;
|
||||
f32 f;
|
||||
@@ -54,7 +54,7 @@ s32 Schedule_CheckTimeRangeS(PlayState* play, u8** script, ScheduleResult* resul
|
||||
return false;
|
||||
}
|
||||
|
||||
s32 Schedule_CheckTimeRangeL(PlayState* play, u8** script, ScheduleResult* result) {
|
||||
s32 Schedule_CheckTimeRangeL(PlayState* play, u8** script, ScheduleOutput* output) {
|
||||
s32 inRange = false;
|
||||
ScheduleCmdCheckTimeRangeL* cmd = (ScheduleCmdCheckTimeRangeL*)*script;
|
||||
f32 f;
|
||||
@@ -80,33 +80,33 @@ s32 Schedule_CheckTimeRangeL(PlayState* play, u8** script, ScheduleResult* resul
|
||||
return false;
|
||||
}
|
||||
|
||||
s32 Schedule_ReturnValueL(PlayState* play, u8** script, ScheduleResult* result) {
|
||||
s32 Schedule_ReturnValueL(PlayState* play, u8** script, ScheduleOutput* output) {
|
||||
ScheduleCmdReturnValueL* cmd = (ScheduleCmdReturnValueL*)*script;
|
||||
|
||||
//! @bug result is a u8, value is truncated
|
||||
result->result = (cmd->retH << 8) | cmd->retL;
|
||||
result->hasResult = true;
|
||||
output->result = (cmd->retH << 8) | cmd->retL;
|
||||
output->hasResult = true;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
s32 Schedule_ReturnNone(PlayState* play, u8** script, ScheduleResult* result) {
|
||||
result->hasResult = false;
|
||||
s32 Schedule_ReturnNone(PlayState* play, u8** script, ScheduleOutput* output) {
|
||||
output->hasResult = false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
s32 Schedule_ReturnEmpty(PlayState* play, u8** script, ScheduleResult* result) {
|
||||
result->hasResult = true;
|
||||
s32 Schedule_ReturnEmpty(PlayState* play, u8** script, ScheduleOutput* output) {
|
||||
output->hasResult = true;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
s32 Schedule_Nop(PlayState* play, u8** script, ScheduleResult* result) {
|
||||
s32 Schedule_Nop(PlayState* play, u8** script, ScheduleOutput* output) {
|
||||
return false;
|
||||
}
|
||||
|
||||
s32 Schedule_CheckMiscS(PlayState* play, u8** script, ScheduleResult* result) {
|
||||
s32 Schedule_CheckMiscS(PlayState* play, u8** script, ScheduleOutput* output) {
|
||||
ScheduleCmdCheckMiscS* cmd = (ScheduleCmdCheckMiscS*)*script;
|
||||
|
||||
if (((cmd->which == SCHEDULE_CHECK_MISC_ROOM_KEY) && (INV_CONTENT(ITEM_ROOM_KEY) == ITEM_ROOM_KEY)) ||
|
||||
@@ -119,16 +119,16 @@ s32 Schedule_CheckMiscS(PlayState* play, u8** script, ScheduleResult* result) {
|
||||
return false;
|
||||
}
|
||||
|
||||
s32 Schedule_ReturnValueS(PlayState* play, u8** script, ScheduleResult* result) {
|
||||
s32 Schedule_ReturnValueS(PlayState* play, u8** script, ScheduleOutput* output) {
|
||||
ScheduleCmdReturnValueS* cmd = (ScheduleCmdReturnValueS*)*script;
|
||||
|
||||
result->result = cmd->result;
|
||||
result->hasResult = true;
|
||||
output->result = cmd->result;
|
||||
output->hasResult = true;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
s32 Schedule_CheckNotInSceneS(PlayState* play, u8** script, ScheduleResult* result) {
|
||||
s32 Schedule_CheckNotInSceneS(PlayState* play, u8** script, ScheduleOutput* output) {
|
||||
ScheduleCmdCheckNotInSceneS* cmd = (ScheduleCmdCheckNotInSceneS*)*script;
|
||||
s16 scene = (cmd->sceneH << 8) | cmd->sceneL;
|
||||
|
||||
@@ -139,7 +139,7 @@ s32 Schedule_CheckNotInSceneS(PlayState* play, u8** script, ScheduleResult* resu
|
||||
return false;
|
||||
}
|
||||
|
||||
s32 Schedule_CheckNotInSceneL(PlayState* play, u8** script, ScheduleResult* result) {
|
||||
s32 Schedule_CheckNotInSceneL(PlayState* play, u8** script, ScheduleOutput* output) {
|
||||
ScheduleCmdCheckNotInSceneL* cmd = (ScheduleCmdCheckNotInSceneL*)*script;
|
||||
s16 scene = (cmd->sceneH << 8) | cmd->sceneL;
|
||||
|
||||
@@ -150,7 +150,7 @@ s32 Schedule_CheckNotInSceneL(PlayState* play, u8** script, ScheduleResult* resu
|
||||
return false;
|
||||
}
|
||||
|
||||
s32 Schedule_CheckNotInDayS(PlayState* play, u8** script, ScheduleResult* result) {
|
||||
s32 Schedule_CheckNotInDayS(PlayState* play, u8** script, ScheduleOutput* output) {
|
||||
ScheduleCmdCheckNotInDayS* cmd = (ScheduleCmdCheckNotInDayS*)*script;
|
||||
s16 day = (cmd->dayH << 8) | cmd->dayL;
|
||||
|
||||
@@ -161,7 +161,7 @@ s32 Schedule_CheckNotInDayS(PlayState* play, u8** script, ScheduleResult* result
|
||||
return false;
|
||||
}
|
||||
|
||||
s32 Schedule_CheckNotInDayL(PlayState* play, u8** script, ScheduleResult* result) {
|
||||
s32 Schedule_CheckNotInDayL(PlayState* play, u8** script, ScheduleOutput* output) {
|
||||
ScheduleCmdCheckNotInDayL* cmd = (ScheduleCmdCheckNotInDayL*)*script;
|
||||
s16 day = (cmd->dayH << 8) | cmd->dayL;
|
||||
|
||||
@@ -172,7 +172,7 @@ s32 Schedule_CheckNotInDayL(PlayState* play, u8** script, ScheduleResult* result
|
||||
return false;
|
||||
}
|
||||
|
||||
s32 Schedule_ReturnTime(PlayState* play, u8** script, ScheduleResult* result) {
|
||||
s32 Schedule_ReturnTime(PlayState* play, u8** script, ScheduleOutput* output) {
|
||||
ScheduleCmdReturnTime* cmd = (ScheduleCmdReturnTime*)*script;
|
||||
f32 f;
|
||||
u16 time0;
|
||||
@@ -183,15 +183,15 @@ s32 Schedule_ReturnTime(PlayState* play, u8** script, ScheduleResult* result) {
|
||||
SCHEDULE_CALC_TIME(cmd->time1Hr, cmd->time1Min, time1, f);
|
||||
time1--;
|
||||
|
||||
result->result = cmd->result;
|
||||
result->time0 = time0;
|
||||
result->time1 = time1;
|
||||
result->hasResult = true;
|
||||
output->result = cmd->result;
|
||||
output->time0 = time0;
|
||||
output->time1 = time1;
|
||||
output->hasResult = true;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
s32 Schedule_CheckBeforeTimeS(PlayState* play, u8** script, ScheduleResult* result) {
|
||||
s32 Schedule_CheckBeforeTimeS(PlayState* play, u8** script, ScheduleOutput* output) {
|
||||
ScheduleCmdCheckBeforeTimeS* cmd = (ScheduleCmdCheckBeforeTimeS*)*script;
|
||||
f32 f;
|
||||
u16 testTime;
|
||||
@@ -208,7 +208,7 @@ s32 Schedule_CheckBeforeTimeS(PlayState* play, u8** script, ScheduleResult* resu
|
||||
return false;
|
||||
}
|
||||
|
||||
s32 Schedule_CheckBeforeTimeL(PlayState* play, u8** script, ScheduleResult* result) {
|
||||
s32 Schedule_CheckBeforeTimeL(PlayState* play, u8** script, ScheduleOutput* output) {
|
||||
ScheduleCmdCheckBeforeTimeL* cmd = (ScheduleCmdCheckBeforeTimeL*)*script;
|
||||
f32 f;
|
||||
u16 testTime;
|
||||
@@ -225,21 +225,21 @@ s32 Schedule_CheckBeforeTimeL(PlayState* play, u8** script, ScheduleResult* resu
|
||||
return false;
|
||||
}
|
||||
|
||||
s32 Schedule_BranchS(PlayState* play, u8** script, ScheduleResult* result) {
|
||||
s32 Schedule_BranchS(PlayState* play, u8** script, ScheduleOutput* output) {
|
||||
ScheduleCmdBranchS* cmd = (ScheduleCmdBranchS*)*script;
|
||||
|
||||
*script += cmd->offset;
|
||||
return false;
|
||||
}
|
||||
|
||||
s32 Schedule_BranchL(PlayState* play, u8** script, ScheduleResult* result) {
|
||||
s32 Schedule_BranchL(PlayState* play, u8** script, ScheduleOutput* output) {
|
||||
ScheduleCmdBranchL* cmd = (ScheduleCmdBranchL*)*script;
|
||||
|
||||
*script += (s16)((cmd->offsetH << 8) | cmd->offsetL);
|
||||
return false;
|
||||
}
|
||||
|
||||
static s32 (*sScheduleCmdFuncs[])(PlayState*, u8**, ScheduleResult*) = {
|
||||
static s32 (*sScheduleCmdFuncs[])(PlayState*, u8**, ScheduleOutput*) = {
|
||||
Schedule_CheckFlagS, Schedule_CheckFlagL, Schedule_CheckTimeRangeS, Schedule_CheckTimeRangeL,
|
||||
Schedule_ReturnValueL, Schedule_ReturnNone, Schedule_ReturnEmpty, Schedule_Nop,
|
||||
Schedule_CheckMiscS, Schedule_ReturnValueS, Schedule_CheckNotInSceneS, Schedule_CheckNotInSceneL,
|
||||
@@ -269,15 +269,15 @@ static u8 sScheduleCmdSizes[] = {
|
||||
sizeof(ScheduleCmdBranchL),
|
||||
};
|
||||
|
||||
s32 Schedule_RunScript(PlayState* play, u8* script, ScheduleResult* result) {
|
||||
s32 Schedule_RunScript(PlayState* play, u8* script, ScheduleOutput* output) {
|
||||
u8 size;
|
||||
s32 stop;
|
||||
|
||||
do {
|
||||
size = sScheduleCmdSizes[*script];
|
||||
stop = (*sScheduleCmdFuncs[*script])(play, &script, result);
|
||||
stop = (*sScheduleCmdFuncs[*script])(play, &script, output);
|
||||
script += size;
|
||||
} while (!stop);
|
||||
|
||||
return result->hasResult;
|
||||
return output->hasResult;
|
||||
}
|
||||
|
||||
+2
-2
@@ -480,13 +480,13 @@ void SubS_TimePathing_ComputeInitialY(PlayState* play, Path* path, s32 waypoint,
|
||||
}
|
||||
}
|
||||
|
||||
Path* SubS_GetAdditionalPath(PlayState* play, u8 pathIndex, s32 max) {
|
||||
Path* SubS_GetAdditionalPath(PlayState* play, u8 pathIndex, s32 limit) {
|
||||
Path* path;
|
||||
s32 i = 0;
|
||||
|
||||
do {
|
||||
path = &play->setupPathList[pathIndex];
|
||||
if (i >= max) {
|
||||
if (i >= limit) {
|
||||
break;
|
||||
}
|
||||
pathIndex = path->unk1;
|
||||
|
||||
@@ -376,7 +376,7 @@ s32 func_80BD3320(EnAh* this, PlayState* play, u8 actorCat, s16 actorId) {
|
||||
return ret;
|
||||
}
|
||||
|
||||
s32 func_80BD3374(EnAh* this, PlayState* play, ScheduleResult* arg2) {
|
||||
s32 func_80BD3374(EnAh* this, PlayState* play, ScheduleOutput* scheduleOutput) {
|
||||
s32 pad;
|
||||
|
||||
Math_Vec3f_Copy(&this->actor.world.pos, &D_80BD3EC4.pos);
|
||||
@@ -388,7 +388,7 @@ s32 func_80BD3374(EnAh* this, PlayState* play, ScheduleResult* arg2) {
|
||||
return true;
|
||||
}
|
||||
|
||||
s32 func_80BD33FC(EnAh* this, PlayState* play, ScheduleResult* arg2) {
|
||||
s32 func_80BD33FC(EnAh* this, PlayState* play, ScheduleOutput* scheduleOutput) {
|
||||
s32 pad;
|
||||
|
||||
Math_Vec3f_Copy(&this->actor.world.pos, &D_80BD3ED8.pos);
|
||||
@@ -400,7 +400,7 @@ s32 func_80BD33FC(EnAh* this, PlayState* play, ScheduleResult* arg2) {
|
||||
return true;
|
||||
}
|
||||
|
||||
s32 func_80BD3484(EnAh* this, PlayState* play, ScheduleResult* arg2) {
|
||||
s32 func_80BD3484(EnAh* this, PlayState* play, ScheduleOutput* scheduleOutput) {
|
||||
s32 ret = false;
|
||||
|
||||
if (func_80BD3320(this, play, ACTORCAT_NPC, ACTOR_EN_AN)) {
|
||||
@@ -419,26 +419,26 @@ s32 func_80BD3484(EnAh* this, PlayState* play, ScheduleResult* arg2) {
|
||||
return ret;
|
||||
}
|
||||
|
||||
s32 func_80BD3548(EnAh* this, PlayState* play, ScheduleResult* arg2) {
|
||||
s32 func_80BD3548(EnAh* this, PlayState* play, ScheduleOutput* scheduleOutput) {
|
||||
s32 ret;
|
||||
|
||||
this->unk_2D8 = 0;
|
||||
|
||||
switch (arg2->result) {
|
||||
switch (scheduleOutput->result) {
|
||||
default:
|
||||
ret = false;
|
||||
break;
|
||||
|
||||
case 1:
|
||||
ret = func_80BD3374(this, play, arg2);
|
||||
ret = func_80BD3374(this, play, scheduleOutput);
|
||||
break;
|
||||
|
||||
case 2:
|
||||
ret = func_80BD33FC(this, play, arg2);
|
||||
ret = func_80BD33FC(this, play, scheduleOutput);
|
||||
break;
|
||||
|
||||
case 3:
|
||||
ret = func_80BD3484(this, play, arg2);
|
||||
ret = func_80BD3484(this, play, scheduleOutput);
|
||||
break;
|
||||
}
|
||||
return ret;
|
||||
@@ -472,7 +472,7 @@ void func_80BD3658(EnAh* this, PlayState* play) {
|
||||
}
|
||||
|
||||
void func_80BD36B8(EnAh* this, PlayState* play) {
|
||||
ScheduleResult sp18;
|
||||
ScheduleOutput sp18;
|
||||
|
||||
if (!Schedule_RunScript(play, D_80BD3DB0, &sp18) ||
|
||||
((this->unk_1DC != sp18.result) && !func_80BD3548(this, play, &sp18))) {
|
||||
|
||||
@@ -635,7 +635,7 @@ s32 func_80BDF064(EnAl* this, PlayState* play) {
|
||||
return false;
|
||||
}
|
||||
|
||||
s32 func_80BDF244(EnAl* this, PlayState* play, ScheduleResult* arg2) {
|
||||
s32 func_80BDF244(EnAl* this, PlayState* play, ScheduleOutput* scheduleOutput) {
|
||||
s32 ret = false;
|
||||
Actor* sp20 = func_80BDE1A0(this, play, ACTORCAT_NPC, ACTOR_EN_GM);
|
||||
Actor* temp_v0 = func_80BDE1A0(this, play, ACTORCAT_NPC, ACTOR_EN_TOTO);
|
||||
@@ -650,10 +650,10 @@ s32 func_80BDF244(EnAl* this, PlayState* play, ScheduleResult* arg2) {
|
||||
return ret;
|
||||
}
|
||||
|
||||
s32 func_80BDF308(EnAl* this, PlayState* play, ScheduleResult* arg2) {
|
||||
s32 func_80BDF308(EnAl* this, PlayState* play, ScheduleOutput* scheduleOutput) {
|
||||
SubS_UpdateFlags(&this->unk_4C2, 3, 7);
|
||||
|
||||
switch (arg2->result) {
|
||||
switch (scheduleOutput->result) {
|
||||
case 1:
|
||||
func_80BDE27C(this, 0);
|
||||
break;
|
||||
@@ -667,7 +667,7 @@ s32 func_80BDF308(EnAl* this, PlayState* play, ScheduleResult* arg2) {
|
||||
return true;
|
||||
}
|
||||
|
||||
s32 func_80BDF390(EnAl* this, PlayState* play, ScheduleResult* arg2) {
|
||||
s32 func_80BDF390(EnAl* this, PlayState* play, ScheduleOutput* scheduleOutput) {
|
||||
s32 ret;
|
||||
|
||||
this->actor.flags |= ACTOR_FLAG_1;
|
||||
@@ -676,14 +676,14 @@ s32 func_80BDF390(EnAl* this, PlayState* play, ScheduleResult* arg2) {
|
||||
this->unk_4C2 = 0;
|
||||
this->unk_4D4 = 40.0f;
|
||||
|
||||
switch (arg2->result) {
|
||||
switch (scheduleOutput->result) {
|
||||
case 3:
|
||||
ret = func_80BDF244(this, play, arg2);
|
||||
ret = func_80BDF244(this, play, scheduleOutput);
|
||||
break;
|
||||
|
||||
case 1:
|
||||
case 2:
|
||||
ret = func_80BDF308(this, play, arg2);
|
||||
ret = func_80BDF308(this, play, scheduleOutput);
|
||||
break;
|
||||
|
||||
default:
|
||||
@@ -746,7 +746,7 @@ void func_80BDF578(EnAl* this, PlayState* play) {
|
||||
}
|
||||
|
||||
void func_80BDF5E8(EnAl* this, PlayState* play) {
|
||||
ScheduleResult sp20;
|
||||
ScheduleOutput sp20;
|
||||
|
||||
this->unk_4E0 = REG(15) + ((void)0, gSaveContext.save.daySpeed);
|
||||
if (!Schedule_RunScript(play, D_80BDFC70, &sp20) ||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -2,58 +2,60 @@
|
||||
#define Z_EN_BABA_H
|
||||
|
||||
#include "global.h"
|
||||
#include "overlays/actors/ovl_En_Sob1/z_en_sob1.h"
|
||||
#include "objects/object_bba/object_bba.h"
|
||||
|
||||
struct EnBaba;
|
||||
|
||||
typedef void (*EnBabaActionFunc)(struct EnBaba*, PlayState*);
|
||||
|
||||
#define ENBABA_GET_3F00(thisx) (((thisx)->params & 0x3F00) >> 8)
|
||||
#define ENBABA_GET_C000(thisx) (((thisx)->params & 0xC000) >> 0xE)
|
||||
#define BOMB_SHOP_LADY_GET_PATH_INDEX(thisx) (((thisx)->params & 0x3F00) >> 8)
|
||||
#define BOMB_SHOP_LADY_GET_TYPE(thisx) (((thisx)->params & 0xC000) >> 0xE)
|
||||
|
||||
#define ENBABA_3F00_3F 0x3F
|
||||
|
||||
enum {
|
||||
/* 0 */ ENBABA_C000_0,
|
||||
/* 1 */ ENBABA_C000_1,
|
||||
/* 2 */ ENBABA_C000_2,
|
||||
};
|
||||
// Types BOMB_SHOP_LADY_TYPE_FOLLOW_SCHEDULE and BOMB_SHOP_LADY_TYPE_IDLE can only be used in SCENE_BACKTOWN
|
||||
// Type BOMB_SHOP_LADY_TYPE_SWAY can be used anywhere except SCENE_BACKTOWN and SCENE_BOMYA
|
||||
typedef enum {
|
||||
/* 0 */ BOMB_SHOP_LADY_TYPE_FOLLOW_SCHEDULE,
|
||||
/* 1 */ BOMB_SHOP_LADY_TYPE_IDLE,
|
||||
/* 2 */ BOMB_SHOP_LADY_TYPE_SWAY
|
||||
} BombShopLadyType;
|
||||
|
||||
typedef struct EnBaba {
|
||||
/* 0x000 */ Actor actor;
|
||||
/* 0x144 */ struct EnOssan* unk_144;
|
||||
/* 0x144 */ EnSob1* bombShopkeeper;
|
||||
/* 0x148 */ EnBabaActionFunc actionFunc;
|
||||
/* 0x14C */ UNK_TYPE1 unk14C[4];
|
||||
/* 0x150 */ SkelAnime skelAnime;
|
||||
/* 0x194 */ ColliderCylinder collider;
|
||||
/* 0x1E0 */ u16 unk_1E0;
|
||||
/* 0x1E2 */ u8 unk_1E2;
|
||||
/* 0x1E0 */ u16 textId;
|
||||
/* 0x1E2 */ u8 inMsgState3;
|
||||
/* 0x1E4 */ Path* path;
|
||||
/* 0x1E8 */ s16 unk_1E8;
|
||||
/* 0x1E8 */ s16 waypoint;
|
||||
/* 0x1EA */ UNK_TYPE1 unk1EA[0x1C];
|
||||
/* 0x206 */ Vec3s jointTable[18];
|
||||
/* 0x272 */ Vec3s morphTable[18];
|
||||
/* 0x206 */ Vec3s jointTable[BBA_LIMB_MAX];
|
||||
/* 0x272 */ Vec3s morphTable[BBA_LIMB_MAX];
|
||||
/* 0x2DE */ Vec3s trackTarget;
|
||||
/* 0x2E4 */ Vec3s headRot;
|
||||
/* 0x2EA */ Vec3s torsoRot;
|
||||
/* 0x2F0 */ UNK_TYPE1 unk2F0[0x12];
|
||||
/* 0x302 */ s16 unk_302[18];
|
||||
/* 0x326 */ s16 unk_326[18];
|
||||
/* 0x302 */ s16 limbRotTableY[18];
|
||||
/* 0x326 */ s16 limbRotTableZ[18];
|
||||
/* 0x34A */ UNK_TYPE1 unk34A[0xBA];
|
||||
/* 0x404 */ s16 unk_404;
|
||||
/* 0x404 */ s16 sakonDeadTimer;
|
||||
/* 0x406 */ UNK_TYPE1 unk406[4];
|
||||
/* 0x40A */ u16 unk_40A;
|
||||
/* 0x40C */ s32 unk_40C;
|
||||
/* 0x40A */ u16 stateFlags;
|
||||
/* 0x40C */ s32 animIndex;
|
||||
/* 0x410 */ Path* timePath;
|
||||
/* 0x414 */ Vec3f timePathTargetPos;
|
||||
/* 0x414 */ Vec3f timePathPoint;
|
||||
/* 0x420 */ f32 timePathProgress;
|
||||
/* 0x424 */ s32 timePathTotalTime;
|
||||
/* 0x428 */ s32 timePathWaypointTime;
|
||||
/* 0x42C */ s32 timePathWaypoint;
|
||||
/* 0x430 */ s32 timePathElapsedTime;
|
||||
/* 0x434 */ u8 unk_434;
|
||||
/* 0x434 */ u8 scheduleResult;
|
||||
/* 0x436 */ s16 timePathTimeSpeed;
|
||||
/* 0x438 */ s32 unk_438;
|
||||
/* 0x43C */ s32 unk_43C;
|
||||
/* 0x438 */ s32 timePathIsSetup;
|
||||
/* 0x43C */ s32 timePathHasReachedEnd;
|
||||
} EnBaba; // size = 0x440
|
||||
|
||||
extern const ActorInit En_Baba_InitVars;
|
||||
|
||||
@@ -162,7 +162,7 @@ void EnBba01_FinishInit(EnHy* this, PlayState* play) {
|
||||
this->actor.flags |= ACTOR_FLAG_1;
|
||||
this->actor.draw = EnBba01_Draw;
|
||||
this->waitingOnInit = false;
|
||||
if (ENBBA01_GET_PATH(&this->actor) == ENBBA01_NO_PATH) {
|
||||
if (ENBBA01_GET_PATH(&this->actor) == 0x3F) {
|
||||
this->actionFunc = EnBba01_FaceFoward;
|
||||
} else {
|
||||
this->actionFunc = EnBba01_Walk;
|
||||
@@ -225,7 +225,7 @@ void EnBba01_Init(Actor* thisx, PlayState* play) {
|
||||
Collider_SetCylinder(play, &this->enHy.collider, &this->enHy.actor, &sCylinderInit);
|
||||
CollisionCheck_SetInfo2(&this->enHy.actor.colChkInfo, &sDamageTable, &sColChkInfoInit);
|
||||
this->enHy.actor.flags &= ~ACTOR_FLAG_1;
|
||||
this->enHy.path = SubS_GetPathByIndex(play, ENBBA01_GET_PATH(&this->enHy.actor), ENBBA01_NO_PATH);
|
||||
this->enHy.path = SubS_GetPathByIndex(play, ENBBA01_GET_PATH(&this->enHy.actor), 0x3F);
|
||||
this->enHy.waitingOnInit = true;
|
||||
Actor_SetScale(&this->enHy.actor, 0.01f);
|
||||
this->enHy.actionFunc = EnBba01_FinishInit;
|
||||
|
||||
@@ -8,7 +8,6 @@ struct EnBba01;
|
||||
typedef void (*EnBba01ActionFunc)(struct EnBba01*, PlayState*);
|
||||
|
||||
#define ENBBA01_GET_PATH(thisx) (((thisx)->params & 0x7E00) >> 9)
|
||||
#define ENBBA01_NO_PATH 0x3F
|
||||
|
||||
typedef struct EnBba01 {
|
||||
/* 0x000 */ EnHy enHy;
|
||||
|
||||
@@ -152,7 +152,7 @@ void EnCne01_FinishInit(EnHy* this, PlayState* play) {
|
||||
this->actor.flags |= ACTOR_FLAG_1;
|
||||
this->actor.draw = EnCne01_Draw;
|
||||
this->waitingOnInit = false;
|
||||
if (ENCNE01_GET_PATH(&this->actor) == ENCNE01_NO_PATH) {
|
||||
if (ENCNE01_GET_PATH(&this->actor) == 0x3F) {
|
||||
this->actionFunc = EnCne01_FaceForward;
|
||||
} else {
|
||||
this->actionFunc = EnCne01_Walk;
|
||||
@@ -215,7 +215,7 @@ void EnCne01_Init(Actor* thisx, PlayState* play) {
|
||||
Collider_SetCylinder(play, &this->enHy.collider, &this->enHy.actor, &sCylinderInit);
|
||||
CollisionCheck_SetInfo2(&this->enHy.actor.colChkInfo, &sDamageTable, &sColChkInfoInit);
|
||||
this->enHy.actor.flags &= ~ACTOR_FLAG_1;
|
||||
this->enHy.path = SubS_GetPathByIndex(play, ENCNE01_GET_PATH(&this->enHy.actor), ENCNE01_NO_PATH);
|
||||
this->enHy.path = SubS_GetPathByIndex(play, ENCNE01_GET_PATH(&this->enHy.actor), 0x3F);
|
||||
this->enHy.waitingOnInit = true;
|
||||
Actor_SetScale(&this->enHy.actor, 0.01f);
|
||||
this->enHy.actionFunc = EnCne01_FinishInit;
|
||||
|
||||
@@ -8,7 +8,6 @@ struct EnCne01;
|
||||
typedef void (*EnCne01ActionFunc)(struct EnCne01*, PlayState*);
|
||||
|
||||
#define ENCNE01_GET_PATH(thisx) (((thisx)->params & 0x7E00) >> 9)
|
||||
#define ENCNE01_NO_PATH 0x3F
|
||||
|
||||
typedef struct EnCne01 {
|
||||
/* 0x000 */ EnHy enHy;
|
||||
|
||||
@@ -532,7 +532,7 @@ void func_80866B20(EnDoor* this, PlayState* play) {
|
||||
this->dyna.actor.textId = baseTextId + textIdOffset;
|
||||
}
|
||||
} else if ((this->unk_1A4 == 5) && (playerPosRelToDoor.z > 0.0f)) {
|
||||
ScheduleResult sp30;
|
||||
ScheduleOutput sp30;
|
||||
|
||||
if (Schedule_RunScript(play, D_8086778C[this->switchFlag], &sp30) != 0) {
|
||||
this->dyna.actor.textId = sp30.result + 0x1800;
|
||||
|
||||
@@ -53,20 +53,20 @@ typedef enum {
|
||||
} EnFsnCutsceneState;
|
||||
|
||||
typedef enum {
|
||||
/* 00 */ FSN_ANIMATION_IDLE,
|
||||
/* 01 */ FSN_ANIMATION_SCRATCH_BACK,
|
||||
/* 02 */ FSN_ANIMATION_TURN_AROUND_FORWARD,
|
||||
/* 03 */ FSN_ANIMATION_TURN_AROUND_REVERSE,
|
||||
/* 04 */ FSN_ANIMATION_HANDS_ON_COUNTER_START,
|
||||
/* 05 */ FSN_ANIMATION_HANDS_ON_COUNTER_LOOP,
|
||||
/* 06 */ FSN_ANIMATION_HAND_ON_FACE_START,
|
||||
/* 07 */ FSN_ANIMATION_HAND_ON_FACE_LOOP,
|
||||
/* 08 */ FSN_ANIMATION_LEAN_FORWARD_START,
|
||||
/* 09 */ FSN_ANIMATION_LEAN_FORWARD_LOOP,
|
||||
/* 10 */ FSN_ANIMATION_SLAM_COUNTER_START,
|
||||
/* 11 */ FSN_ANIMATION_SLAM_COUNTER_LOOP,
|
||||
/* 12 */ FSN_ANIMATION_MAKE_OFFER,
|
||||
/* 13 */ FSN_ANIMATION_MAX
|
||||
/* 0 */ FSN_ANIM_IDLE,
|
||||
/* 1 */ FSN_ANIM_SCRATCH_BACK,
|
||||
/* 2 */ FSN_ANIM_TURN_AROUND_FORWARD,
|
||||
/* 3 */ FSN_ANIM_TURN_AROUND_REVERSE,
|
||||
/* 4 */ FSN_ANIM_HANDS_ON_COUNTER_START,
|
||||
/* 5 */ FSN_ANIM_HANDS_ON_COUNTER_LOOP,
|
||||
/* 6 */ FSN_ANIM_HAND_ON_FACE_START,
|
||||
/* 7 */ FSN_ANIM_HAND_ON_FACE_LOOP,
|
||||
/* 8 */ FSN_ANIM_LEAN_FORWARD_START,
|
||||
/* 9 */ FSN_ANIM_LEAN_FORWARD_LOOP,
|
||||
/* 10 */ FSN_ANIM_SLAM_COUNTER_START,
|
||||
/* 11 */ FSN_ANIM_SLAM_COUNTER_LOOP,
|
||||
/* 12 */ FSN_ANIM_MAKE_OFFER,
|
||||
/* 13 */ FSN_ANIM_MAX
|
||||
} FsnAnimation;
|
||||
|
||||
const ActorInit En_Fsn_InitVars = {
|
||||
@@ -711,7 +711,7 @@ void EnFsn_InitShop(EnFsn* this, PlayState* play) {
|
||||
this->stickAnimTween = this->arrowAnimTween = 0.0f;
|
||||
}
|
||||
this->blinkTimer = 20;
|
||||
this->animationIndex = FSN_ANIMATION_HANDS_ON_COUNTER_START;
|
||||
this->animationIndex = FSN_ANIM_HANDS_ON_COUNTER_START;
|
||||
this->eyeTextureIdx = 0;
|
||||
SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimations, this->animationIndex);
|
||||
this->actionFunc = EnFsn_Idle;
|
||||
@@ -720,11 +720,11 @@ void EnFsn_InitShop(EnFsn* this, PlayState* play) {
|
||||
void EnFsn_Idle(EnFsn* this, PlayState* play) {
|
||||
Player* player = GET_PLAYER(play);
|
||||
|
||||
if (this->animationIndex == FSN_ANIMATION_HANDS_ON_COUNTER_START) {
|
||||
if (this->animationIndex == FSN_ANIM_HANDS_ON_COUNTER_START) {
|
||||
s16 curFrame = this->skelAnime.curFrame;
|
||||
s16 frameCount = Animation_GetLastFrame(sAnimations[this->animationIndex].animation);
|
||||
if (curFrame == frameCount) {
|
||||
this->animationIndex = FSN_ANIMATION_HANDS_ON_COUNTER_LOOP;
|
||||
this->animationIndex = FSN_ANIM_HANDS_ON_COUNTER_LOOP;
|
||||
SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimations, this->animationIndex);
|
||||
}
|
||||
return;
|
||||
@@ -762,24 +762,24 @@ void EnFsn_Haggle(EnFsn* this, PlayState* play) {
|
||||
|
||||
if (this->flags & ENFSN_ANGRY) {
|
||||
this->flags &= ~ENFSN_ANGRY;
|
||||
this->animationIndex = FSN_ANIMATION_SLAM_COUNTER_LOOP;
|
||||
this->animationIndex = FSN_ANIM_SLAM_COUNTER_LOOP;
|
||||
SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimations, this->animationIndex);
|
||||
} else {
|
||||
if (this->animationIndex == FSN_ANIMATION_SLAM_COUNTER_LOOP && Animation_OnFrame(&this->skelAnime, 18.0f)) {
|
||||
if (this->animationIndex == FSN_ANIM_SLAM_COUNTER_LOOP && Animation_OnFrame(&this->skelAnime, 18.0f)) {
|
||||
Actor_PlaySfxAtPos(&this->actor, NA_SE_EV_HANKO);
|
||||
}
|
||||
if (this->flags & ENFSN_CALM_DOWN) {
|
||||
this->flags &= ~ENFSN_CALM_DOWN;
|
||||
this->animationIndex = FSN_ANIMATION_HANDS_ON_COUNTER_LOOP;
|
||||
this->animationIndex = FSN_ANIM_HANDS_ON_COUNTER_LOOP;
|
||||
SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimations, this->animationIndex);
|
||||
} else if (this->flags & ENFSN_OFFER_FINAL_PRICE) {
|
||||
this->flags &= ~ENFSN_OFFER_FINAL_PRICE;
|
||||
this->animationIndex = FSN_ANIMATION_MAKE_OFFER;
|
||||
this->animationIndex = FSN_ANIM_MAKE_OFFER;
|
||||
SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimations, this->animationIndex);
|
||||
} else {
|
||||
if (this->animationIndex == FSN_ANIMATION_MAKE_OFFER) {
|
||||
if (this->animationIndex == FSN_ANIM_MAKE_OFFER) {
|
||||
if (curFrame == frameCount) {
|
||||
this->animationIndex = FSN_ANIMATION_HANDS_ON_COUNTER_LOOP;
|
||||
this->animationIndex = FSN_ANIM_HANDS_ON_COUNTER_LOOP;
|
||||
SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimations, this->animationIndex);
|
||||
} else {
|
||||
if (Animation_OnFrame(&this->skelAnime, 28.0f)) {
|
||||
@@ -1430,7 +1430,7 @@ void EnFsn_Init(Actor* thisx, PlayState* play) {
|
||||
this->eyeTextureIdx = 0;
|
||||
this->actor.flags |= ACTOR_FLAG_1;
|
||||
this->actor.targetMode = 0;
|
||||
this->animationIndex = FSN_ANIMATION_IDLE;
|
||||
this->animationIndex = FSN_ANIM_IDLE;
|
||||
SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimations, this->animationIndex);
|
||||
this->actionFunc = EnFsn_IdleBackroom;
|
||||
}
|
||||
|
||||
@@ -1027,7 +1027,7 @@ void EnGk_Init(Actor* thisx, PlayState* play) {
|
||||
Actor_MarkForDeath(&this->actor);
|
||||
} else {
|
||||
this->unk_318 = this->actor.cutscene;
|
||||
this->path = SubS_GetPathByIndex(play, ENGK_GET_F0(&this->actor), 15);
|
||||
this->path = SubS_GetPathByIndex(play, ENGK_GET_F0(&this->actor), 0xF);
|
||||
this->actionFunc = func_80B51760;
|
||||
}
|
||||
} else if (play->sceneNum == SCENE_GORONRACE) {
|
||||
|
||||
@@ -969,7 +969,7 @@ s32 func_8094F53C(EnGm* this, PlayState* play) {
|
||||
return false;
|
||||
}
|
||||
|
||||
s32 func_8094F7D0(EnGm* this, PlayState* play, ScheduleResult* arg2, u8 arg3, s16 arg4) {
|
||||
s32 func_8094F7D0(EnGm* this, PlayState* play, ScheduleOutput* scheduleOutput, u8 arg3, s16 arg4) {
|
||||
u8 sp4F = ENGM_GET_FF(&this->actor);
|
||||
Vec3s* sp48;
|
||||
Vec3f sp3C;
|
||||
@@ -981,8 +981,8 @@ s32 func_8094F7D0(EnGm* this, PlayState* play, ScheduleResult* arg2, u8 arg3, s1
|
||||
this->timePath = NULL;
|
||||
actor = func_8094DEE0(this, play, arg3, arg4);
|
||||
|
||||
if (D_80951A0C[arg2->result] >= 0) {
|
||||
this->timePath = SubS_GetAdditionalPath(play, sp4F, D_80951A0C[arg2->result]);
|
||||
if (D_80951A0C[scheduleOutput->result] >= 0) {
|
||||
this->timePath = SubS_GetAdditionalPath(play, sp4F, D_80951A0C[scheduleOutput->result]);
|
||||
}
|
||||
|
||||
if ((actor != NULL) && (actor->update != NULL)) {
|
||||
@@ -999,7 +999,7 @@ s32 func_8094F7D0(EnGm* this, PlayState* play, ScheduleResult* arg2, u8 arg3, s1
|
||||
return ret;
|
||||
}
|
||||
|
||||
s32 func_8094F904(EnGm* this, PlayState* play, ScheduleResult* arg2) {
|
||||
s32 func_8094F904(EnGm* this, PlayState* play, ScheduleOutput* scheduleOutput) {
|
||||
u16 sp56 = SCHEDULE_TIME_NOW;
|
||||
u8 sp55 = ENGM_GET_FF(&this->actor);
|
||||
EnDoor* door;
|
||||
@@ -1010,10 +1010,10 @@ s32 func_8094F904(EnGm* this, PlayState* play, ScheduleResult* arg2) {
|
||||
s32 ret = false;
|
||||
|
||||
this->timePath = NULL;
|
||||
door = func_8094DF90(play, arg2->result);
|
||||
door = func_8094DF90(play, scheduleOutput->result);
|
||||
|
||||
if (D_80951A0C[arg2->result] >= 0) {
|
||||
this->timePath = SubS_GetAdditionalPath(play, sp55, D_80951A0C[arg2->result]);
|
||||
if (D_80951A0C[scheduleOutput->result] >= 0) {
|
||||
this->timePath = SubS_GetAdditionalPath(play, sp55, D_80951A0C[scheduleOutput->result]);
|
||||
}
|
||||
|
||||
if ((door != NULL) && (door->dyna.actor.update != NULL)) {
|
||||
@@ -1032,8 +1032,8 @@ s32 func_8094F904(EnGm* this, PlayState* play, ScheduleResult* arg2) {
|
||||
this->unk_261 = 75;
|
||||
}
|
||||
|
||||
this->unk_3B8 = arg2->time1 - arg2->time0;
|
||||
this->unk_3BA = sp56 - arg2->time0;
|
||||
this->unk_3B8 = scheduleOutput->time1 - scheduleOutput->time0;
|
||||
this->unk_3BA = sp56 - scheduleOutput->time0;
|
||||
this->actor.flags &= ~ACTOR_FLAG_1;
|
||||
this->unk_3A4 |= 0x100;
|
||||
this->unk_3A4 |= 0x200;
|
||||
@@ -1045,16 +1045,17 @@ s32 func_8094F904(EnGm* this, PlayState* play, ScheduleResult* arg2) {
|
||||
return ret;
|
||||
}
|
||||
|
||||
s32 func_8094FAC4(EnGm* this, PlayState* play, ScheduleResult* arg2) {
|
||||
s32 func_8094FAC4(EnGm* this, PlayState* play, ScheduleOutput* scheduleOutput) {
|
||||
u16 sp2E = SCHEDULE_TIME_NOW;
|
||||
u16 phi_v1;
|
||||
u8 sp2B = ENGM_GET_FF(&this->actor);
|
||||
s32 pad;
|
||||
u16 tmp;
|
||||
s16 pad;
|
||||
s32 ret = false;
|
||||
|
||||
this->timePath = NULL;
|
||||
if (D_80951A0C[arg2->result] >= 0) {
|
||||
this->timePath = SubS_GetAdditionalPath(play, sp2B, D_80951A0C[arg2->result]);
|
||||
if (D_80951A0C[scheduleOutput->result] >= 0) {
|
||||
this->timePath = SubS_GetAdditionalPath(play, sp2B, D_80951A0C[scheduleOutput->result]);
|
||||
}
|
||||
|
||||
if ((this->timePath != NULL) && (this->timePath->count < 3)) {
|
||||
@@ -1065,18 +1066,18 @@ s32 func_8094FAC4(EnGm* this, PlayState* play, ScheduleResult* arg2) {
|
||||
if ((this->unk_258 < 9) && (this->unk_258 != 0) && (this->timePathTimeSpeed >= 0)) {
|
||||
phi_v1 = sp2E;
|
||||
} else {
|
||||
phi_v1 = arg2->time0;
|
||||
phi_v1 = scheduleOutput->time0;
|
||||
}
|
||||
|
||||
if (arg2->time1 < phi_v1) {
|
||||
this->timePathTotalTime = (phi_v1 - arg2->time1) + 0xFFFF;
|
||||
if (scheduleOutput->time1 < phi_v1) {
|
||||
this->timePathTotalTime = (phi_v1 - scheduleOutput->time1) + 0xFFFF;
|
||||
} else {
|
||||
this->timePathTotalTime = arg2->time1 - phi_v1;
|
||||
this->timePathTotalTime = scheduleOutput->time1 - phi_v1;
|
||||
}
|
||||
|
||||
this->timePathElapsedTime = sp2E - phi_v1;
|
||||
phi_v1 = this->timePath->count - (SUBS_TIME_PATHING_ORDER - 1);
|
||||
this->timePathWaypointTime = this->timePathTotalTime / phi_v1;
|
||||
tmp = phi_v1 = this->timePath->count - (SUBS_TIME_PATHING_ORDER - 1);
|
||||
this->timePathWaypointTime = this->timePathTotalTime / tmp;
|
||||
this->timePathWaypoint =
|
||||
(this->timePathElapsedTime / this->timePathWaypointTime) + (SUBS_TIME_PATHING_ORDER - 1);
|
||||
this->unk_3A4 &= ~0x8;
|
||||
@@ -1091,11 +1092,11 @@ s32 func_8094FAC4(EnGm* this, PlayState* play, ScheduleResult* arg2) {
|
||||
return ret;
|
||||
}
|
||||
|
||||
s32 func_8094FCC4(EnGm* this, PlayState* play, ScheduleResult* arg2) {
|
||||
s32 func_8094FCC4(EnGm* this, PlayState* play, ScheduleOutput* scheduleOutput) {
|
||||
static Vec3f D_80951D90 = { 64.0f, 0.0f, -122.0f };
|
||||
s32 ret = false;
|
||||
|
||||
if (func_8094F7D0(this, play, arg2, ACTORCAT_NPC, ACTOR_EN_TAB)) {
|
||||
if (func_8094F7D0(this, play, scheduleOutput, ACTORCAT_NPC, ACTOR_EN_TAB)) {
|
||||
if (this->unk_258 == 0) {
|
||||
Math_Vec3f_Copy(&this->actor.world.pos, &D_80951D90);
|
||||
SubS_UpdateFlags(&this->unk_3A4, 3, 7);
|
||||
@@ -1111,10 +1112,10 @@ s32 func_8094FCC4(EnGm* this, PlayState* play, ScheduleResult* arg2) {
|
||||
return ret;
|
||||
}
|
||||
|
||||
s32 func_8094FD88(EnGm* this, PlayState* play, ScheduleResult* arg2) {
|
||||
s32 func_8094FD88(EnGm* this, PlayState* play, ScheduleOutput* scheduleOutput) {
|
||||
s32 ret = false;
|
||||
|
||||
if (func_8094F7D0(this, play, arg2, ACTORCAT_NPC, ACTOR_EN_RECEPGIRL)) {
|
||||
if (func_8094F7D0(this, play, scheduleOutput, ACTORCAT_NPC, ACTOR_EN_RECEPGIRL)) {
|
||||
func_8094E054(this, play, 11);
|
||||
SubS_UpdateFlags(&this->unk_3A4, 3, 7);
|
||||
this->unk_3A4 |= 0x100;
|
||||
@@ -1124,12 +1125,13 @@ s32 func_8094FD88(EnGm* this, PlayState* play, ScheduleResult* arg2) {
|
||||
return ret;
|
||||
}
|
||||
|
||||
s32 func_8094FE10(EnGm* this, PlayState* play, ScheduleResult* arg2) {
|
||||
s32 func_8094FE10(EnGm* this, PlayState* play, ScheduleOutput* scheduleOutput) {
|
||||
s32 ret = false;
|
||||
Actor* al;
|
||||
|
||||
al = func_8094DEE0(this, play, ACTORCAT_NPC, ACTOR_EN_AL);
|
||||
if (func_8094F7D0(this, play, arg2, ACTORCAT_NPC, ACTOR_EN_TOTO) && (al != NULL) && (al->update != NULL)) {
|
||||
if (func_8094F7D0(this, play, scheduleOutput, ACTORCAT_NPC, ACTOR_EN_TOTO) && (al != NULL) &&
|
||||
(al->update != NULL)) {
|
||||
func_8094E054(this, play, 11);
|
||||
SubS_UpdateFlags(&this->unk_3A4, 3, 7);
|
||||
this->unk_268 = al;
|
||||
@@ -1145,7 +1147,7 @@ s32 func_8094FE10(EnGm* this, PlayState* play, ScheduleResult* arg2) {
|
||||
return ret;
|
||||
}
|
||||
|
||||
s32 func_8094FF04(EnGm* this, PlayState* play, ScheduleResult* arg2) {
|
||||
s32 func_8094FF04(EnGm* this, PlayState* play, ScheduleOutput* scheduleOutput) {
|
||||
static Vec3f D_80951D9C = { 64.0f, 0.0f, -122.0f };
|
||||
u8 sp4F = ENGM_GET_FF(&this->actor);
|
||||
Vec3s* sp48;
|
||||
@@ -1156,8 +1158,8 @@ s32 func_8094FF04(EnGm* this, PlayState* play, ScheduleResult* arg2) {
|
||||
|
||||
this->timePath = NULL;
|
||||
|
||||
if (D_80951A0C[arg2->result] >= 0) {
|
||||
this->timePath = SubS_GetAdditionalPath(play, sp4F, D_80951A0C[arg2->result]);
|
||||
if (D_80951A0C[scheduleOutput->result] >= 0) {
|
||||
this->timePath = SubS_GetAdditionalPath(play, sp4F, D_80951A0C[scheduleOutput->result]);
|
||||
}
|
||||
|
||||
if (this->timePath != NULL) {
|
||||
@@ -1187,7 +1189,7 @@ s32 func_8094FF04(EnGm* this, PlayState* play, ScheduleResult* arg2) {
|
||||
return ret;
|
||||
}
|
||||
|
||||
s32 func_80950088(EnGm* this, PlayState* play, ScheduleResult* arg2) {
|
||||
s32 func_80950088(EnGm* this, PlayState* play, ScheduleOutput* scheduleOutput) {
|
||||
static Vec3f D_80951DA8 = { 278.0f, 0.0f, 223.0f };
|
||||
static Vec3s D_80951DB4 = { 0x0000, 0xC000, 0x0000 };
|
||||
s32 pad;
|
||||
@@ -1202,7 +1204,7 @@ s32 func_80950088(EnGm* this, PlayState* play, ScheduleResult* arg2) {
|
||||
return true;
|
||||
}
|
||||
|
||||
s32 func_80950120(EnGm* this, PlayState* play, ScheduleResult* arg2) {
|
||||
s32 func_80950120(EnGm* this, PlayState* play, ScheduleOutput* scheduleOutput) {
|
||||
static Vec3f D_80951DBC = { -525.0f, 214.0f, 515.0f };
|
||||
static Vec3s D_80951DC8 = { 0x0000, 0x38E0, 0x0000 };
|
||||
s32 pad;
|
||||
@@ -1217,7 +1219,7 @@ s32 func_80950120(EnGm* this, PlayState* play, ScheduleResult* arg2) {
|
||||
return true;
|
||||
}
|
||||
|
||||
s32 func_809501B8(EnGm* this, PlayState* play, ScheduleResult* arg2) {
|
||||
s32 func_809501B8(EnGm* this, PlayState* play, ScheduleOutput* scheduleOutput) {
|
||||
static Vec3f D_80951DD0 = { -334.0f, 225.0f, 903.0f };
|
||||
static Vec3s D_80951DDC = { 0x0000, 0x7FFF, 0x0000 };
|
||||
s32 pad;
|
||||
@@ -1238,7 +1240,7 @@ s32 func_809501B8(EnGm* this, PlayState* play, ScheduleResult* arg2) {
|
||||
return true;
|
||||
}
|
||||
|
||||
s32 func_80950280(EnGm* this, PlayState* play, ScheduleResult* arg2) {
|
||||
s32 func_80950280(EnGm* this, PlayState* play, ScheduleOutput* scheduleOutput) {
|
||||
s32 phi_v1;
|
||||
|
||||
this->actor.flags |= ACTOR_FLAG_1;
|
||||
@@ -1249,33 +1251,33 @@ s32 func_80950280(EnGm* this, PlayState* play, ScheduleResult* arg2) {
|
||||
this->unk_3CC = 8;
|
||||
this->unk_3B4 = 40.0f;
|
||||
|
||||
switch (arg2->result) {
|
||||
switch (scheduleOutput->result) {
|
||||
case 1:
|
||||
phi_v1 = func_8094FD88(this, play, arg2);
|
||||
phi_v1 = func_8094FD88(this, play, scheduleOutput);
|
||||
break;
|
||||
|
||||
case 2:
|
||||
phi_v1 = func_8094FE10(this, play, arg2);
|
||||
phi_v1 = func_8094FE10(this, play, scheduleOutput);
|
||||
break;
|
||||
|
||||
case 3:
|
||||
phi_v1 = func_8094FCC4(this, play, arg2);
|
||||
phi_v1 = func_8094FCC4(this, play, scheduleOutput);
|
||||
break;
|
||||
|
||||
case 5:
|
||||
phi_v1 = func_8094FF04(this, play, arg2);
|
||||
phi_v1 = func_8094FF04(this, play, scheduleOutput);
|
||||
break;
|
||||
|
||||
case 6:
|
||||
phi_v1 = func_80950088(this, play, arg2);
|
||||
phi_v1 = func_80950088(this, play, scheduleOutput);
|
||||
break;
|
||||
|
||||
case 7:
|
||||
phi_v1 = func_809501B8(this, play, arg2);
|
||||
phi_v1 = func_809501B8(this, play, scheduleOutput);
|
||||
break;
|
||||
|
||||
case 8:
|
||||
phi_v1 = func_80950120(this, play, arg2);
|
||||
phi_v1 = func_80950120(this, play, scheduleOutput);
|
||||
break;
|
||||
|
||||
case 9:
|
||||
@@ -1290,7 +1292,7 @@ s32 func_80950280(EnGm* this, PlayState* play, ScheduleResult* arg2) {
|
||||
case 18:
|
||||
case 19:
|
||||
case 20:
|
||||
phi_v1 = func_8094F904(this, play, arg2);
|
||||
phi_v1 = func_8094F904(this, play, scheduleOutput);
|
||||
break;
|
||||
|
||||
case 21:
|
||||
@@ -1303,7 +1305,7 @@ s32 func_80950280(EnGm* this, PlayState* play, ScheduleResult* arg2) {
|
||||
case 28:
|
||||
case 29:
|
||||
case 30:
|
||||
phi_v1 = func_8094FAC4(this, play, arg2);
|
||||
phi_v1 = func_8094FAC4(this, play, scheduleOutput);
|
||||
break;
|
||||
|
||||
default:
|
||||
@@ -1576,7 +1578,7 @@ void func_80950C24(EnGm* this, PlayState* play) {
|
||||
}
|
||||
|
||||
void func_80950CDC(EnGm* this, PlayState* play) {
|
||||
ScheduleResult sp20;
|
||||
ScheduleOutput sp20;
|
||||
|
||||
this->timePathTimeSpeed = REG(15) + ((void)0, gSaveContext.save.daySpeed);
|
||||
|
||||
|
||||
@@ -496,7 +496,7 @@ s32 func_80BF1B40(EnIg* this, PlayState* play) {
|
||||
return false;
|
||||
}
|
||||
|
||||
s32 func_80BF1C44(EnIg* this, PlayState* play, ScheduleResult* arg2, s32 arg3, s32 arg4) {
|
||||
s32 func_80BF1C44(EnIg* this, PlayState* play, ScheduleOutput* scheduleOutput, s32 arg3, s32 arg4) {
|
||||
u8 sp4F = ENIG_GET_FF(&this->actor);
|
||||
Vec3s* sp48;
|
||||
Vec3f sp3C;
|
||||
@@ -508,8 +508,8 @@ s32 func_80BF1C44(EnIg* this, PlayState* play, ScheduleResult* arg2, s32 arg3, s
|
||||
sp2C = func_80BF1150(this, play, arg3, arg4);
|
||||
this->timePath = NULL;
|
||||
|
||||
if (D_80BF3318[arg2->result] >= 0) {
|
||||
this->timePath = SubS_GetAdditionalPath(play, sp4F, D_80BF3318[arg2->result]);
|
||||
if (D_80BF3318[scheduleOutput->result] >= 0) {
|
||||
this->timePath = SubS_GetAdditionalPath(play, sp4F, D_80BF3318[scheduleOutput->result]);
|
||||
}
|
||||
|
||||
if ((sp2C != NULL) && (sp2C->update != NULL)) {
|
||||
@@ -526,10 +526,10 @@ s32 func_80BF1C44(EnIg* this, PlayState* play, ScheduleResult* arg2, s32 arg3, s
|
||||
return sp24;
|
||||
}
|
||||
|
||||
s32 func_80BF1D78(EnIg* this, PlayState* play, ScheduleResult* arg2) {
|
||||
s32 func_80BF1D78(EnIg* this, PlayState* play, ScheduleOutput* scheduleOutput) {
|
||||
s32 sp2C = 0;
|
||||
|
||||
if (func_80BF1C44(this, play, arg2, ACTORCAT_NPC, ACTOR_EN_AN)) {
|
||||
if (func_80BF1C44(this, play, scheduleOutput, ACTORCAT_NPC, ACTOR_EN_AN)) {
|
||||
func_80BF1284(this, 0);
|
||||
SubS_UpdateFlags(&this->unk_3D0, 3, 7);
|
||||
this->unk_3D0 |= 0x20;
|
||||
@@ -539,7 +539,7 @@ s32 func_80BF1D78(EnIg* this, PlayState* play, ScheduleResult* arg2) {
|
||||
return sp2C;
|
||||
}
|
||||
|
||||
s32 func_80BF1DF4(EnIg* this, PlayState* play, ScheduleResult* arg2) {
|
||||
s32 func_80BF1DF4(EnIg* this, PlayState* play, ScheduleOutput* scheduleOutput) {
|
||||
u16 sp56 = SCHEDULE_TIME_NOW;
|
||||
u8 sp55 = ENIG_GET_FF(&this->actor);
|
||||
EnDoor* door;
|
||||
@@ -550,10 +550,10 @@ s32 func_80BF1DF4(EnIg* this, PlayState* play, ScheduleResult* arg2) {
|
||||
s32 ret = false;
|
||||
|
||||
this->timePath = NULL;
|
||||
door = func_80BF1200(play, arg2->result);
|
||||
door = func_80BF1200(play, scheduleOutput->result);
|
||||
|
||||
if (D_80BF3318[arg2->result] >= 0) {
|
||||
this->timePath = SubS_GetAdditionalPath(play, sp55, D_80BF3318[arg2->result]);
|
||||
if (D_80BF3318[scheduleOutput->result] >= 0) {
|
||||
this->timePath = SubS_GetAdditionalPath(play, sp55, D_80BF3318[scheduleOutput->result]);
|
||||
}
|
||||
|
||||
if ((door != NULL) && (door->dyna.actor.update != NULL)) {
|
||||
@@ -572,8 +572,8 @@ s32 func_80BF1DF4(EnIg* this, PlayState* play, ScheduleResult* arg2) {
|
||||
this->unk_2A4 = 75;
|
||||
}
|
||||
|
||||
this->unk_3E0 = arg2->time1 - arg2->time0;
|
||||
this->unk_3E2 = sp56 - arg2->time0;
|
||||
this->unk_3E0 = scheduleOutput->time1 - scheduleOutput->time0;
|
||||
this->unk_3E2 = sp56 - scheduleOutput->time0;
|
||||
this->actor.flags &= ~ACTOR_FLAG_1;
|
||||
this->unk_3D0 |= 0x100;
|
||||
func_80BF1284(this, 3);
|
||||
@@ -584,17 +584,18 @@ s32 func_80BF1DF4(EnIg* this, PlayState* play, ScheduleResult* arg2) {
|
||||
return ret;
|
||||
}
|
||||
|
||||
s32 func_80BF1FA8(EnIg* this, PlayState* play, ScheduleResult* arg2) {
|
||||
s32 func_80BF1FA8(EnIg* this, PlayState* play, ScheduleOutput* scheduleOutput) {
|
||||
u16 sp2E = SCHEDULE_TIME_NOW;
|
||||
u16 phi_v1;
|
||||
u8 sp2B = ENIG_GET_FF(&this->actor);
|
||||
s32 pad;
|
||||
u16 tmp;
|
||||
s16 pad;
|
||||
s32 ret = false;
|
||||
|
||||
this->timePath = NULL;
|
||||
|
||||
if (D_80BF3318[arg2->result] >= 0) {
|
||||
this->timePath = SubS_GetAdditionalPath(play, sp2B, D_80BF3318[arg2->result]);
|
||||
if (D_80BF3318[scheduleOutput->result] >= 0) {
|
||||
this->timePath = SubS_GetAdditionalPath(play, sp2B, D_80BF3318[scheduleOutput->result]);
|
||||
}
|
||||
|
||||
if ((this->timePath != NULL) && (this->timePath->count < 3)) {
|
||||
@@ -605,20 +606,20 @@ s32 func_80BF1FA8(EnIg* this, PlayState* play, ScheduleResult* arg2) {
|
||||
if ((this->scheduleResult < 10) && (this->scheduleResult != 0) && (this->timePathTimeSpeed >= 0)) {
|
||||
phi_v1 = sp2E;
|
||||
} else {
|
||||
phi_v1 = arg2->time0;
|
||||
phi_v1 = scheduleOutput->time0;
|
||||
}
|
||||
|
||||
if (arg2->time1 < phi_v1) {
|
||||
this->timePathTotalTime = (phi_v1 - arg2->time1) + 0xFFFF;
|
||||
if (scheduleOutput->time1 < phi_v1) {
|
||||
this->timePathTotalTime = (phi_v1 - scheduleOutput->time1) + 0xFFFF;
|
||||
} else {
|
||||
this->timePathTotalTime = arg2->time1 - phi_v1;
|
||||
this->timePathTotalTime = scheduleOutput->time1 - phi_v1;
|
||||
}
|
||||
|
||||
this->timePathElapsedTime = sp2E - phi_v1;
|
||||
|
||||
phi_v1 = this->timePath->count - (SUBS_TIME_PATHING_ORDER - 1);
|
||||
tmp = phi_v1 = this->timePath->count - (SUBS_TIME_PATHING_ORDER - 1);
|
||||
|
||||
this->timePathWaypointTime = this->timePathTotalTime / phi_v1;
|
||||
this->timePathWaypointTime = this->timePathTotalTime / tmp;
|
||||
this->timePathWaypoint =
|
||||
(this->timePathElapsedTime / this->timePathWaypointTime) + (SUBS_TIME_PATHING_ORDER - 1);
|
||||
|
||||
@@ -633,7 +634,7 @@ s32 func_80BF1FA8(EnIg* this, PlayState* play, ScheduleResult* arg2) {
|
||||
return ret;
|
||||
}
|
||||
|
||||
s32 func_80BF219C(EnIg* this, PlayState* play, ScheduleResult* arg2) {
|
||||
s32 func_80BF219C(EnIg* this, PlayState* play, ScheduleOutput* scheduleOutput) {
|
||||
u8 sp4F = ENIG_GET_FF(&this->actor);
|
||||
Vec3f sp40;
|
||||
Vec3f sp34;
|
||||
@@ -643,8 +644,8 @@ s32 func_80BF219C(EnIg* this, PlayState* play, ScheduleResult* arg2) {
|
||||
|
||||
this->timePath = NULL;
|
||||
|
||||
if (D_80BF3318[arg2->result] >= 0) {
|
||||
this->timePath = SubS_GetAdditionalPath(play, sp4F, D_80BF3318[arg2->result]);
|
||||
if (D_80BF3318[scheduleOutput->result] >= 0) {
|
||||
this->timePath = SubS_GetAdditionalPath(play, sp4F, D_80BF3318[scheduleOutput->result]);
|
||||
}
|
||||
|
||||
if ((this->timePath != 0) && (this->timePath->count >= 2)) {
|
||||
@@ -656,7 +657,7 @@ s32 func_80BF219C(EnIg* this, PlayState* play, ScheduleResult* arg2) {
|
||||
Math_Vec3f_Copy(&this->actor.world.pos, &sp40);
|
||||
Math_Vec3f_Copy(&this->actor.prevPos, &sp40);
|
||||
|
||||
switch (arg2->result) {
|
||||
switch (scheduleOutput->result) {
|
||||
case 2:
|
||||
this->actor.home.rot.y = this->actor.world.rot.y;
|
||||
this->actor.home.rot.y += 0x8000;
|
||||
@@ -678,20 +679,20 @@ s32 func_80BF219C(EnIg* this, PlayState* play, ScheduleResult* arg2) {
|
||||
return ret;
|
||||
}
|
||||
|
||||
s32 func_80BF2368(EnIg* this, PlayState* play, ScheduleResult* arg2) {
|
||||
s32 func_80BF2368(EnIg* this, PlayState* play, ScheduleOutput* scheduleOutput) {
|
||||
s32 ret = false;
|
||||
|
||||
this->actor.targetMode = 0;
|
||||
this->unk_3D0 = 0;
|
||||
this->actor.flags |= ACTOR_FLAG_1;
|
||||
|
||||
switch (arg2->result) {
|
||||
switch (scheduleOutput->result) {
|
||||
case 5:
|
||||
case 6:
|
||||
case 7:
|
||||
case 8:
|
||||
case 9:
|
||||
ret = func_80BF1DF4(this, play, arg2);
|
||||
ret = func_80BF1DF4(this, play, scheduleOutput);
|
||||
break;
|
||||
|
||||
case 10:
|
||||
@@ -699,16 +700,16 @@ s32 func_80BF2368(EnIg* this, PlayState* play, ScheduleResult* arg2) {
|
||||
case 12:
|
||||
case 13:
|
||||
case 14:
|
||||
ret = func_80BF1FA8(this, play, arg2);
|
||||
ret = func_80BF1FA8(this, play, scheduleOutput);
|
||||
break;
|
||||
|
||||
case 2:
|
||||
case 4:
|
||||
ret = func_80BF219C(this, play, arg2);
|
||||
ret = func_80BF219C(this, play, scheduleOutput);
|
||||
break;
|
||||
|
||||
case 3:
|
||||
ret = func_80BF1D78(this, play, arg2);
|
||||
ret = func_80BF1D78(this, play, scheduleOutput);
|
||||
break;
|
||||
}
|
||||
return ret;
|
||||
@@ -873,7 +874,7 @@ void func_80BF2A50(EnIg* this, PlayState* play) {
|
||||
}
|
||||
|
||||
void func_80BF2AF8(EnIg* this, PlayState* play) {
|
||||
ScheduleResult sp20;
|
||||
ScheduleOutput sp20;
|
||||
|
||||
this->timePathTimeSpeed = REG(15) + ((void)0, gSaveContext.save.daySpeed);
|
||||
|
||||
|
||||
@@ -239,7 +239,7 @@ void func_80BC1E40(EnJa* this, PlayState* play) {
|
||||
this->unk_374 = sp20;
|
||||
}
|
||||
|
||||
s32 func_80BC1FC8(EnJa* this, PlayState* play, ScheduleResult* arg2) {
|
||||
s32 func_80BC1FC8(EnJa* this, PlayState* play, ScheduleOutput* scheduleOutput) {
|
||||
s32 ret = false;
|
||||
|
||||
if (func_80BC1AE0(this, play)) {
|
||||
@@ -252,7 +252,7 @@ s32 func_80BC1FC8(EnJa* this, PlayState* play, ScheduleResult* arg2) {
|
||||
return ret;
|
||||
}
|
||||
|
||||
s32 func_80BC203C(EnJa* this, PlayState* play, ScheduleResult* arg2) {
|
||||
s32 func_80BC203C(EnJa* this, PlayState* play, ScheduleOutput* scheduleOutput) {
|
||||
s32 ret = false;
|
||||
|
||||
if (func_80BC1AE0(this, play)) {
|
||||
@@ -269,19 +269,19 @@ s32 func_80BC203C(EnJa* this, PlayState* play, ScheduleResult* arg2) {
|
||||
return ret;
|
||||
}
|
||||
|
||||
s32 func_80BC20D0(EnJa* this, PlayState* play, ScheduleResult* arg2) {
|
||||
s32 func_80BC20D0(EnJa* this, PlayState* play, ScheduleOutput* scheduleOutput) {
|
||||
s32 ret = false;
|
||||
|
||||
this->unk_340 = 0;
|
||||
|
||||
switch (arg2->result) {
|
||||
switch (scheduleOutput->result) {
|
||||
case 1:
|
||||
ret = func_80BC1FC8(this, play, arg2);
|
||||
if (ret == 1) {}
|
||||
ret = func_80BC1FC8(this, play, scheduleOutput);
|
||||
if (ret == true) {}
|
||||
break;
|
||||
|
||||
case 2:
|
||||
ret = func_80BC203C(this, play, arg2);
|
||||
ret = func_80BC203C(this, play, scheduleOutput);
|
||||
break;
|
||||
}
|
||||
return ret;
|
||||
@@ -299,7 +299,7 @@ void func_80BC2150(EnJa* this, PlayState* play) {
|
||||
}
|
||||
|
||||
void func_80BC21A8(EnJa* this, PlayState* play) {
|
||||
ScheduleResult sp18;
|
||||
ScheduleOutput sp18;
|
||||
|
||||
this->unk_35C = REG(15) + ((void)0, gSaveContext.save.daySpeed);
|
||||
if (!Schedule_RunScript(play, D_80BC35F0, &sp18) ||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user