diff --git a/assets/xml/objects/gameplay_keep.xml b/assets/xml/objects/gameplay_keep.xml index cd93dfe3a..3bfb60efd 100644 --- a/assets/xml/objects/gameplay_keep.xml +++ b/assets/xml/objects/gameplay_keep.xml @@ -834,10 +834,12 @@ - - - - + + + + + + diff --git a/assets/xml/objects/object_rat.xml b/assets/xml/objects/object_rat.xml index ce32e20cc..af47a3437 100644 --- a/assets/xml/objects/object_rat.xml +++ b/assets/xml/objects/object_rat.xml @@ -1,28 +1,38 @@  + - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/assets/xml/objects/object_thiefbird.xml b/assets/xml/objects/object_thiefbird.xml index e7cb3ac91..5a4cec335 100644 --- a/assets/xml/objects/object_thiefbird.xml +++ b/assets/xml/objects/object_thiefbird.xml @@ -1,66 +1,84 @@  + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/assets/xml/overlays/ovl_Oceff_Wipe7.xml b/assets/xml/overlays/ovl_Oceff_Wipe7.xml new file mode 100644 index 000000000..682bd0c98 --- /dev/null +++ b/assets/xml/overlays/ovl_Oceff_Wipe7.xml @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/docs/tutorial/object_decomp_example.md b/docs/tutorial/object_decomp_example.md index 0917ebdd4..d1cc4738a 100644 --- a/docs/tutorial/object_decomp_example.md +++ b/docs/tutorial/object_decomp_example.md @@ -110,7 +110,7 @@ After naming the animations, the end result will look something like this: Once again, we can run `./extract_assets.py -s objects/object_dns` to extract the object, and we can update the animation names in `z_en_dns.c` to use our new names like so: ```c -static AnimationInfoS sAnimations[] = { +static AnimationInfoS sAnimationInfo[] = { { &gKingsChamberDekuGuardIdleAnim, 1.0f, 0, -1, ANIMMODE_LOOP, 0 }, { &gKingsChamberDekuGuardIdleAnim, 1.0f, 0, -1, ANIMMODE_LOOP, -4 }, { &gKingsChamberDekuGuardWalkAnim, 1.0f, 0, -1, ANIMMODE_LOOP, 0 }, diff --git a/include/functions.h b/include/functions.h index 58bb7a3d3..c6a8a0c09 100644 --- a/include/functions.h +++ b/include/functions.h @@ -678,8 +678,8 @@ PosRot* Actor_GetWorldPosShapeRot(PosRot* dest, Actor* actor); s32 func_800B83F8(Actor* actor, Player* player, s32 flag); s32 Actor_ProcessTalkRequest(Actor* actor, GameState* gameState); -s32 func_800B8500(Actor* actor, PlayState* play, f32 xzRange, f32 yRange, s32 exchangeItemId); -s32 func_800B85E0(Actor* actor, PlayState* play, f32 radius, s32 exchangeItemId); +s32 func_800B8500(Actor* actor, PlayState* play, f32 xzRange, f32 yRange, PlayerActionParam exchangeItemId); +s32 func_800B85E0(Actor* actor, PlayState* play, f32 radius, PlayerActionParam exchangeItemId); s32 func_800B8614(Actor* actor, PlayState* play, f32 radius); s32 func_800B863C(Actor* actor, PlayState* play); s32 Actor_TextboxIsClosing(Actor* actor, PlayState* play); @@ -757,7 +757,7 @@ s32 func_800BD2B4(PlayState* play, Actor* actor, s16* arg2, f32 arg3, u16 (*text void func_800BD888(Actor* actor, struct_800BD888_arg1* arg1, s16 arg2, s16 arg3); void func_800BD9E0(PlayState* play, SkelAnime* skelAnime, OverrideLimbDraw overrideLimbDraw, PostLimbDraw postLimbDraw, Actor* actor, s16 alpha); void func_800BDAA0(PlayState* play, SkelAnime* skelAnime, OverrideLimbDraw overrideLimbDraw, PostLimbDraw postLimbDraw, Actor* actor, s16 alpha); -void Actor_ChangeAnimationByInfo(SkelAnime* skelAnime, AnimationInfo* animation, s32 index); +void Actor_ChangeAnimationByInfo(SkelAnime* skelAnime, AnimationInfo* animationInfo, s32 animIndex); void Actor_Noop(Actor* actor, PlayState* play); void Gfx_DrawDListOpa(PlayState* play, Gfx* dlist); @@ -959,39 +959,7 @@ s32 DynaPolyActor_IsInRidingRotatingState(DynaPolyActor* dynaActor); s32 DynaPolyActor_IsInSwitchPressedState(DynaPolyActor* dynaActor); s32 DynaPolyActor_IsInHeavySwitchPressedState(DynaPolyActor* dynaActor); s32 DynaPolyActor_ValidateMove(PlayState* play, DynaPolyActor* dynaActor, s16 startRadius, s16 endRadius, s16 startHeight); -f32 Camera_fabsf(f32 f); -f32 Camera_LengthVec3f(Vec3f* v); -// void func_800CB270(void); -f32 Camera_Lerpf(f32 b, f32 a, f32 t, f32 minDist); -s16 Camera_Lerps(s16 b, s16 a, f32 t, s16 minDist); -// void func_800CB42C(void); -void Camera_LerpVec3f(Vec3f* b, Vec3f* a, f32 tXZ, f32 tY, f32 minDist); -void func_800CB544(Camera* camera); -// void func_800CB584(void); -// void func_800CB5DC(void); -// void func_800CB60C(void); -// void func_800CB674(void); -// void func_800CB6C8(void); -f32 func_800CB700(Camera* camera); -// void func_800CB780(void); -// void func_800CB7CC(void); -// void func_800CB7F8(void); -// void func_800CB828(void); -// void func_800CB854(void); -// void Camera_IsSwimming(void); -// void func_800CB8C8(void); -// void func_800CB8F4(void); -// void func_800CB924(void); -// void func_800CB950(void); -// void func_800CBA08(void); -// void func_800CBA34(void); -// void func_800CBA7C(void); -// void func_800CBAAC(void); -// void func_800CBAD4(void); -// void func_800CBB58(void); -// void func_800CBB88(void); -// void func_800CBC00(void); -// void func_800CBC30(void); + // void func_800CBC84(void); // void func_800CBFA4(void); // void func_800CC000(void); @@ -2178,8 +2146,8 @@ void Scene_HeaderCmdSetAreaVisitedFlag(PlayState* play, SceneCmd* cmd); void Scene_HeaderCmdAnimatedMaterials(PlayState* play, SceneCmd* cmd); void Scene_SetExitFade(PlayState* play); s32 Scene_ProcessHeader(PlayState* play, SceneCmd* header); -u16 Entrance_CreateIndex(s32 sceneIndex, s32 spawnIndex, s32 sceneSetup); -u16 Entrance_CreateIndexFromSpawn(s32 spawnIndex); +u16 Entrance_Create(s32 scene, s32 spawn, s32 layer); +u16 Entrance_CreateFromSpawn(s32 spawn); void Scene_ExecuteDrawConfig(PlayState* play); void Scene_DrawConfigDefault(PlayState* play); Gfx* AnimatedMat_TexScroll(PlayState* play, AnimatedMatTexScrollParams* params); @@ -2217,10 +2185,10 @@ void Scene_DrawConfig5(PlayState* play); void Scene_DrawConfigMatAnimManualStep(PlayState* play); void Scene_DrawConfigGreatBayTemple(PlayState* play); EntranceTableEntry* Entrance_GetTableEntry(u16 entrance); -s32 Entrance_GetSceneNum(u16 entranceIndex); -s32 Entrance_GetSceneNumAbsolute(u16 entranceIndex); -s32 Entrance_GetSpawnNum(u16 entranceIndex); -s32 Entrance_GetTransitionFlags(u16 entranceIndex); +s32 Entrance_GetSceneNum(u16 entrance); +s32 Entrance_GetSceneNumAbsolute(u16 entrance); +s32 Entrance_GetSpawnNum(u16 entrance); +s32 Entrance_GetTransitionFlags(u16 entrance); 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); @@ -2243,7 +2211,7 @@ s16 SkelAnime_GetFrameDataLegacy(LegacyAnimationHeader* animation, s32 frame, Ve s16 Animation_GetLimbCount2(LegacyAnimationHeader* animation); s16 Animation_GetLength2(LegacyAnimationHeader* animation); s16 Animation_GetLastFrame2(LegacyAnimationHeader* animation); -void SkelAnime_InterpFrameTable(s32 limbCount, Vec3s* dst, Vec3s* vec2, Vec3s* vec3, f32 unkf); +void SkelAnime_InterpFrameTable(s32 limbCount, Vec3s* dst, Vec3s* start, Vec3s* target, f32 weight); void AnimationContext_Reset(AnimationContext* animationCtx); void AnimationContext_SetNextQueue(PlayState* play); void AnimationContext_DisableQueue(PlayState* play); @@ -3015,6 +2983,7 @@ void osFlashSectorEraseThrough(u32 pageNum); s32 osFlashWriteBuffer(OSIoMesg* mb, s32 priority, void* dramAddr, OSMesgQueue* mq); s32 osFlashWriteArray(u32 pageNum); s32 osFlashReadArray(OSIoMesg* mb, s32 priority, u32 pageNum, void* dramAddr, u32 pageCount, OSMesgQueue* mq); + // void func_801877D0(void); // void func_80187B64(void); // void func_80187BEC(void); @@ -3057,6 +3026,7 @@ s32 osFlashReadArray(OSIoMesg* mb, s32 priority, u32 pageNum, void* dramAddr, u3 // void func_8018A808(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE2 param_5, UNK_TYPE4 param_6); // void func_8018ACC4(void); // void func_8018AE34(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5, UNK_TYPE4 param_6); + void AudioHeap_DiscardFont(s32 fontId); void* AudioHeap_WritebackDCache(void* addr, size_t size); void* AudioHeap_AllocAttemptExternal(AudioAllocPool* pool, size_t size); @@ -3076,6 +3046,7 @@ void* AudioHeap_AllocPermanent(s32 tableType, s32 id, size_t size); void* AudioHeap_AllocSampleCache(size_t size, s32 sampleBankId, void* sampleAddr, s8 medium, s32 cache); void AudioHeap_ApplySampleBankCache(s32 sampleBankId); void AudioHeap_SetReverbData(s32 reverbIndex, u32 dataType, s32 data, s32 flags); + void AudioLoad_DecreaseSampleDmaTtls(void); void* AudioLoad_DmaSampleData(uintptr_t devAddr, size_t size, s32 arg2, u8* dmaIndexRef, s32 medium); void AudioLoad_InitSampleDmaBuffers(s32 numNotes); @@ -3104,6 +3075,7 @@ void AudioLoad_LoadPermanentSamples(void); void AudioLoad_ScriptLoad(s32 tableType, s32 id, s8* isDone); void AudioLoad_ProcessScriptLoads(void); void AudioLoad_InitScriptLoads(void); + AudioTask* func_80192BE0(void); // void func_80192C00(void); // void func_8019319C(void); @@ -3112,10 +3084,10 @@ AudioTask* func_80192BE0(void); // void func_80193774(void); // void func_8019380C(void); // void func_80193858(void); -// void func_8019387C(void); -void Audio_QueueCmdS8(u32 opArgs, s8 data); +void AudioThread_QueueCmdS32(u32 opArgs, s32 data); +void AudioThread_QueueCmdS8(u32 opArgs, s8 data); // void func_801938D0(void); -// void func_80193900(void); +s32 AudioThread_ScheduleProcessCmds(void); // void func_80193990(void); // void func_801939A8(void); // void func_80193AEC(void); @@ -3137,11 +3109,14 @@ void Audio_QueueCmdS8(u32 opArgs, s8 data); // void func_80194528(void); // void func_80194548(void); // void func_80194568(void); -u32 Audio_NextRandom(void); -void Audio_InitMesgQueues(void); +u32 AudioThread_NextRandom(void); +void AudioThread_InitMesgQueues(void); + void Audio_InvalDCache(void* buf, size_t size); void Audio_WritebackDCache(void* buf, size_t size); + s32 osAiSetNextBuffer(void* buf, u32 size); + void AudioPlayback_NoteDisable(Note* note); void AudioPlayback_ProcessNotes(void); SoundFontSound* AudioPlayback_InstrumentGetSound(Instrument* instrument, s32 semitone); @@ -3159,12 +3134,14 @@ void AudioPlayback_NotePoolFill(NotePool* pool, s32 count); void AudioPlayback_AudioListRemove(AudioListItem* item); Note* AudioPlayback_AllocNote(SequenceLayer* layer); void AudioPlayback_NoteInitAll(void); + void AudioEffects_SequencePlayerProcessSound(SequencePlayer* seqPlayer); void AudioEffects_NoteVibratoUpdate(Note* note); void AudioEffects_NoteVibratoInit(Note* note); void AudioEffects_NotePortamentoInit(Note* note); void AudioEffects_AdsrInit(AdsrState* adsr, EnvelopePoint* envelope, s16* volOut); f32 AudioEffects_AdsrUpdate(AdsrState* adsr); + void AudioSeq_SequenceChannelDisable(SequenceChannel* channel); void AudioSeq_SequencePlayerDisableAsFinished(SequencePlayer* seqPlayer); void AudioSeq_SequencePlayerDisable(SequencePlayer* seqPlayer); @@ -3175,6 +3152,7 @@ void AudioSeq_SkipForwardSequence(SequencePlayer* seqPlayer); void AudioSeq_ResetSequencePlayer(SequencePlayer* seqPlayer); void AudioSeq_InitSequencePlayerChannels(s32 playerIndex); void AudioSeq_InitSequencePlayers(void); + void func_8019AE40(s32 param_1, s32 param_2, u32 param_3, s32 param_4); void func_8019AEC0(UNK_PTR param_1, UNK_PTR param_2); @@ -3197,27 +3175,17 @@ void AudioOcarina_PlayLongScarecrowAfterCredits(void); void func_8019E014(void); // void func_8019E110(void); -// void func_8019E14C(void); -// void func_8019E324(void); -// void func_8019E4B0(void); -// void func_8019E634(void); -// void func_8019E864(void); -// void func_8019EA40(void); -// void func_8019EB2C(void); -// void func_8019F024(void); -// void func_8019F05C(void); +void AudioSfx_SetProperties(u8 bankId, u8 entryIndex, u8 channelIndex); void play_sound(u16 sfxId); void func_8019F128(u16 sfxId); void func_8019F170(Vec3f* pos, u16 sfxId); void Audio_PlaySfxAtPos(Vec3f* pos, u16 sfxId); void func_8019F208(void); // decide sfx void func_8019F230(void); // cancel sfx -// void func_8019F258(void); -// void func_8019F300(void); void func_8019F420(Vec3f* pos, u16 sfxId); void func_8019F4AC(Vec3f* pos, u16 sfxId); void func_8019F540(s8 arg0); -void func_8019F570(Vec3f* pos, s8 arg1); +void AudioSfx_LowerSfxSettingsReverb(Vec3f* pos, s8 isReverbLowered); // void func_8019F5AC(void); // void func_8019F638(void); // void func_8019F780(void); @@ -3249,7 +3217,7 @@ void func_801A0238(s32 arg0, s32 arg1); // void Audio_UpdateRiverSoundVolumes(void); // void func_801A0554(void); // void func_801A05F0(void); -void func_801A0654(Vec3f* arg0, u16 sfxId, s32 arg2); +void AudioSfx_SetChannelIO(Vec3f* pos, u16 sfxId, u8 ioData); void func_801A0810(Vec3f* arg0, u16 sfxId, u8 arg2); void func_801A0868(Vec3f* pos, u16 sfxId, u8 val); // void func_801A09D4(void); @@ -3331,14 +3299,14 @@ void func_801A479C(Vec3f* arg0, u16 sfxId, s32 arg2); void func_801A47DC(u8 channelIndexRange, u8 port, u8 val); // void func_801A48E0(void); void func_801A4A28(u8 natureSeqId); -// void func_801A4B80(void); -void func_801A4C30(void); -// void func_801A4C54(void); +// void Audio_SetNatureAmbienceRandomBend(void); +void Audio_Init(void); void func_801A4D00(void); // void func_801A4D50(void); // void func_801A4DA4(void); // void func_801A4DF4(void); // void func_801A4E64(void); + // void func_801A4EB0(void); // void func_801A4EB8(void); // void func_801A4FD8(void); @@ -3357,29 +3325,24 @@ UNK_TYPE func_801A51F0(UNK_TYPE arg0); // void func_801A5808(void); // void func_801A5A10(void); // void func_801A5A1C(void); -void Audio_SetSfxBanksMute(u16 muteMask); -void Audio_SetFlagForBgmVolumeLow(u8 channelIndex); -void Audio_ClearFlagForBgmVolumeLow(u8 channelIndex); -void Audio_PlaySfxGeneral(u16 sfxId, Vec3f* param_2, u8 param_3, f32* param_4, f32* param_5, s8* param_6); -// void func_801A5DDC(void); -// void func_801A5F7C(void); -// void func_801A6430(void); -// void func_801A65C8(void); -// void func_801A6D0C(void); -void func_801A7084(u8 bankId); -// void func_801A7168(void); -// void func_801A7284(void); -void Audio_StopSfxByPos(Vec3f* pos); -void func_801A7328(Vec3f* pos, u16 sfxId); -// void func_801A7484(void); -void Audio_StopSfxById(u16 sfxId); -// void func_801A7720(void); -void func_801A7794(u32 param_1, u32 param_2, u32 param_3); -// void func_801A7828(void); -// void func_801A787C(void); -u8 Audio_IsSfxPlaying(u32 sfxId); -// void func_801A794C(void); -// void func_801A7B10(void); + +void AudioSfx_MuteBanks(u16 muteMask); +void AudioSfx_LowerBgmVolume(u8 channelIndex); +void AudioSfx_RestoreBgmVolume(u8 channelIndex); +void AudioSfx_PlaySfx(u16 sfxId, Vec3f* pos, u8 token, f32* freqScale, f32* volume, s8* reverbAdd); +void AudioSfx_ProcessRequest(void); +void AudioSfx_StopByBank(u8 bankId); +void AudioSfx_StopByPosAndBank(u8 bankId, Vec3f* pos); +void AudioSfx_StopByPos(Vec3f* pos); +void AudioSfx_StopByPosAndId(Vec3f* pos, u16 sfxId); +void AudioSfx_StopByTokenAndId(u8 token, u16 sfxId); +void AudioSfx_StopById(u32 sfxId); +void AudioSfx_ProcessRequests(void); +void AudioSfx_ProcessActiveSfx(void); +u8 AudioSfx_IsPlaying(u32 sfxId); +void AudioSfx_Reset(void); + +void Audio_StartSequence(u8 playerIndex, u8 seqId, u8 seqArgs, u16 fadeTimer); // void func_801A7D04(void); // void func_801A7D84(void); void Audio_QueueSeqCmd(u32 cmd); diff --git a/include/sfx.h b/include/sfx.h index 6f432db98..33c79abf4 100644 --- a/include/sfx.h +++ b/include/sfx.h @@ -1,6 +1,19 @@ #ifndef SFX_H #define SFX_H +/** + * With `SFX_FLAG` on, play the entire sfx audio clip. + * Requesting the sfx while playing will restart the sfx from the beginning. + * i.e. sfx only needs to be requested once. + * + * With `SFX_FLAG` off, play the sfx for only one frame. + * Requesting the sfx while playing will allow the sfx to continue to the next frame. + * i.e. sfx needs to be requested every frame. + * + * By default, `SFX_FLAG` is on. + * Use `- SFX_FLAG` to turn `SFX_FLAG` off. + */ +#define SFX_FLAG_MASK 0xC00 #define SFX_FLAG 0x800 // ------------ PLAYER ------------ diff --git a/include/tables/sfx/enemybank_table.h b/include/tables/sfx/enemybank_table.h index c395730d9..e969fef59 100644 --- a/include/tables/sfx/enemybank_table.h +++ b/include/tables/sfx/enemybank_table.h @@ -22,12 +22,12 @@ /* 0x3808 */ DEFINE_SFX(NA_SE_EN_MIBOSS_FALL_OLD_OLD, 0x40, 3, 0, 0, 0) /* 0x3809 */ DEFINE_SFX(NA_SE_EN_MIBOSS_DAMAGE_OLD, 0x58, 3, 0, 0, 0) /* 0x380A */ DEFINE_SFX(NA_SE_EN_MIBOSS_DASH_OLD, 0x40, 3, 0, 0, 0) -/* 0x380B */ DEFINE_SFX(NA_SE_EN_MIBOSS_DEAD_OLD, 0x68, 3, 0, 0, SFX_FLAG_12) +/* 0x380B */ DEFINE_SFX(NA_SE_EN_MIBOSS_DEAD_OLD, 0x68, 3, 0, 0, SFX_FLAG_REVERB_NO_DIST) /* 0x380C */ DEFINE_SFX(NA_SE_EN_MIBOSS_GND1_OLD, 0x40, 3, 0, 0, 0) /* 0x380D */ DEFINE_SFX(NA_SE_EN_GOMA_DOWN, 0x30, 3, 0, 0, 0) /* 0x380E */ DEFINE_SFX(NA_SE_EN_MIBOSS_GND2_OLD, 0x40, 3, 0, 0, 0) /* 0x380F */ DEFINE_SFX(NA_SE_EN_MIBOSS_UNARI_OLD, 0x40, 3, 0, 0, 0) -/* 0x3810 */ DEFINE_SFX(NA_SE_EN_MIBOSS_RHYTHM_OLD, 0x54, 3, 0, 0, SFX_FLAG_3) +/* 0x3810 */ DEFINE_SFX(NA_SE_EN_MIBOSS_RHYTHM_OLD, 0x54, 3, 0, 0, SFX_FLAG_LOWER_VOLUME_BGM) /* 0x3811 */ DEFINE_SFX(NA_SE_EN_MIBOSS_SWORD_OLD, 0x54, 3, 0, 0, 0) /* 0x3812 */ DEFINE_SFX(NA_SE_EN_ANSATSUSYA_ENTRY, 0x30, 3, 0, 0, 0) /* 0x3813 */ DEFINE_SFX(NA_SE_EN_MIBOSS_JUMP1, 0x40, 3, 0, 0, 0) @@ -35,7 +35,7 @@ /* 0x3815 */ DEFINE_SFX(NA_SE_EN_MIBOSS_VOICE1_OLD, 0x54, 3, 0, 0, 0) /* 0x3816 */ DEFINE_SFX(NA_SE_EN_MIBOSS_VOICE2_OLD, 0x54, 3, 0, 0, 0) /* 0x3817 */ DEFINE_SFX(NA_SE_EN_MIBOSS_VOICE3_OLD, 0x54, 3, 0, 0, 0) -/* 0x3818 */ DEFINE_SFX(NA_SE_EN_INBOSS_SAND_OLD, 0x30, 3, 0, 0, SFX_FLAG_13) +/* 0x3818 */ DEFINE_SFX(NA_SE_EN_INBOSS_SAND_OLD, 0x30, 3, 0, 0, SFX_FLAG_VOLUME_NO_DIST) /* 0x3819 */ DEFINE_SFX(NA_SE_EN_INBOSS_ROAR_OLD, 0x50, 3, 0, 0, 0) /* 0x381A */ DEFINE_SFX(NA_SE_EN_INBOSS_DAMAGE_OLD, 0x58, 3, 0, 0, 0) /* 0x381B */ DEFINE_SFX(NA_SE_EN_COMMON_WEAKENED, 0x38, 3, 0, 0, 0) @@ -50,7 +50,7 @@ /* 0x3824 */ DEFINE_SFX(NA_SE_EN_DODO_M_UP, 0x14, 0, 0, 0, 0) /* 0x3825 */ DEFINE_SFX(NA_SE_EN_MIZUBABA_TRANSFORM, 0x30, 0, 0, 0, 0) /* 0x3826 */ DEFINE_SFX(NA_SE_EN_DODO_M_EAT, 0x30, 0, 0, 0, 0) -/* 0x3827 */ DEFINE_SFX(NA_SE_EN_MIZUBABA2_WALK, 0x28, 0, 0, 0, SFX_FLAG_14) +/* 0x3827 */ DEFINE_SFX(NA_SE_EN_MIZUBABA2_WALK, 0x28, 0, 0, 0, SFX_PARAM_RAND_FREQ_LOWER) /* 0x3828 */ DEFINE_SFX(NA_SE_EN_BOMCHU_WALK, 0x28, 0, 0, 0, 0) /* 0x3829 */ DEFINE_SFX(NA_SE_EN_RIZA_CRY, 0x30, 2, 0, 0, 0) /* 0x382A */ DEFINE_SFX(NA_SE_EN_RIZA_ATTACK, 0x32, 2, 0, 0, 0) @@ -85,7 +85,7 @@ /* 0x3847 */ DEFINE_SFX(NA_SE_EN_EYEGOLE_DAMAGE, 0x38, 2, 0, 0, 0) /* 0x3848 */ DEFINE_SFX(NA_SE_EN_AMOS_VOICE, 0x20, 0, 0, 0, 0) /* 0x3849 */ DEFINE_SFX(NA_SE_EN_KUSAMUSHI_VIBE, 0x18, 0, 0, 0, 0) -/* 0x384A */ DEFINE_SFX(NA_SE_EN_BEE_FLY, 0x40, 7, 0, 0, SFX_FLAG_14) +/* 0x384A */ DEFINE_SFX(NA_SE_EN_BEE_FLY, 0x40, 7, 0, 0, SFX_PARAM_RAND_FREQ_LOWER) /* 0x384B */ DEFINE_SFX(NA_SE_EN_WOLFOS_DEAD, 0x40, 1, 0, 0, 0) /* 0x384C */ DEFINE_SFX(NA_SE_EN_COMMON_E_BALL, 0x30, 3, 0, 0, 0) /* 0x384D */ DEFINE_SFX(NA_SE_EN_COMMON_THUNDER_THR, 0x30, 3, 0, 0, 0) @@ -155,9 +155,9 @@ /* 0x388D */ DEFINE_SFX(NA_SE_EN_STALWALL_DASH, 0x30, 0, 0, 0, 0) /* 0x388E */ DEFINE_SFX(NA_SE_EN_TEKU_JUMP_WATER, 0x20, 0, 0, 0, 0) /* 0x388F */ DEFINE_SFX(NA_SE_EN_TEKU_LAND_WATER2, 0x20, 0, 0, 0, 0) -/* 0x3890 */ DEFINE_SFX(NA_SE_EN_FALL_AIM, 0x38, 0, 0, 0, SFX_FLAG_13) +/* 0x3890 */ DEFINE_SFX(NA_SE_EN_FALL_AIM, 0x38, 0, 0, 0, SFX_FLAG_VOLUME_NO_DIST) /* 0x3891 */ DEFINE_SFX(NA_SE_EN_FALL_UP, 0x30, 3, 0, 0, 0) -/* 0x3892 */ DEFINE_SFX(NA_SE_EN_FALL_CATCH, 0x30, 0, 0, 0, SFX_FLAG_13) +/* 0x3892 */ DEFINE_SFX(NA_SE_EN_FALL_CATCH, 0x30, 0, 0, 0, SFX_FLAG_VOLUME_NO_DIST) /* 0x3893 */ DEFINE_SFX(NA_SE_EN_FALL_LAND, 0x30, 0, 0, 0, 0) /* 0x3894 */ DEFINE_SFX(NA_SE_EN_FALL_WALK, 0x14, 0, 0, 0, 0) /* 0x3895 */ DEFINE_SFX(NA_SE_EN_FALL_DAMAGE, 0x38, 1, 0, 0, 0) @@ -183,13 +183,13 @@ /* 0x38A9 */ DEFINE_SFX(NA_SE_EN_WIZ_DAMAGE, 0x38, 3, 0, 0, 0) /* 0x38AA */ DEFINE_SFX(NA_SE_EN_WIZ_DEAD, 0x40, 3, 0, 0, 0) /* 0x38AB */ DEFINE_SFX(NA_SE_EN_WIZ_EXP, 0x30, 3, 0, 0, 0) -/* 0x38AC */ DEFINE_SFX(NA_SE_EN_DAIOCTA_DEAD, 0x30, 0, 0, 0, SFX_FLAG_13) +/* 0x38AC */ DEFINE_SFX(NA_SE_EN_DAIOCTA_DEAD, 0x30, 0, 0, 0, SFX_FLAG_VOLUME_NO_DIST) /* 0x38AD */ DEFINE_SFX(NA_SE_EN_DAIOCTA_DEAD2, 0x30, 3, 0, 0, 0) /* 0x38AE */ DEFINE_SFX(NA_SE_EN_FANTOM_DAMAGE, 0x38, 3, 0, 0, 0) /* 0x38AF */ DEFINE_SFX(NA_SE_EN_DAIOCTA_DAMAGE, 0x40, 3, 0, 0, 0) /* 0x38B0 */ DEFINE_SFX(NA_SE_EN_WIZ_LAUGH2, 0x30, 3, 0, 0, 0) /* 0x38B1 */ DEFINE_SFX(NA_SE_EN_GOLON_SIT_IMT, 0x30, 3, 0, 0, 0) -/* 0x38B2 */ DEFINE_SFX(NA_SE_EN_FANTOM_VOICE, 0x30, 3, 0, 0, SFX_FLAG_10) +/* 0x38B2 */ DEFINE_SFX(NA_SE_EN_FANTOM_VOICE, 0x30, 3, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) /* 0x38B3 */ DEFINE_SFX(NA_SE_EN_KAICHO_DAMAGE, 0x38, 1, 0, 0, 0) /* 0x38B4 */ DEFINE_SFX(NA_SE_EN_GOLON_COLD, 0x30, 3, 1, 0, 0) /* 0x38B5 */ DEFINE_SFX(NA_SE_EN_GOLON_JUMP, 0x30, 3, 0, 0, 0) @@ -228,8 +228,8 @@ /* 0x38D6 */ DEFINE_SFX(NA_SE_EN_FROG_DEAD, 0x48, 3, 0, 0, 0) /* 0x38D7 */ DEFINE_SFX(NA_SE_EN_UTSUBO_BITE, 0x30, 3, 0, 0, 0) /* 0x38D8 */ DEFINE_SFX(NA_SE_EN_B_SLIME_REVERSE, 0x34, 3, 0, 0, 0) -/* 0x38D9 */ DEFINE_SFX(NA_SE_EN_SLIME_JUMP1, 0x30, 3, 2, 0, SFX_FLAG_14) -/* 0x38DA */ DEFINE_SFX(NA_SE_EN_SLIME_JUMP2, 0x30, 3, 2, 0, SFX_FLAG_14) +/* 0x38D9 */ DEFINE_SFX(NA_SE_EN_SLIME_JUMP1, 0x30, 3, 2, 0, SFX_PARAM_RAND_FREQ_LOWER) +/* 0x38DA */ DEFINE_SFX(NA_SE_EN_SLIME_JUMP2, 0x30, 3, 2, 0, SFX_PARAM_RAND_FREQ_LOWER) /* 0x38DB */ DEFINE_SFX(NA_SE_EN_B_SLIME_BREAK, 0x40, 3, 0, 0, 0) /* 0x38DC */ DEFINE_SFX(NA_SE_EN_BARI_DAMAGE, 0x38, 1, 0, 0, 0) /* 0x38DD */ DEFINE_SFX(NA_SE_EN_HIPLOOP_LAND, 0x30, 1, 0, 0, 0) @@ -237,13 +237,13 @@ /* 0x38DF */ DEFINE_SFX(NA_SE_EN_MOFER_CORE_SMJUMP, 0x28, 3, 0, 0, 0) /* 0x38E0 */ DEFINE_SFX(NA_SE_EN_MONBLIN_GNDWAVE, 0x30, 3, 0, 0, 0) /* 0x38E1 */ DEFINE_SFX(NA_SE_EN_MONBLIN_HAM_DOWN, 0x30, 3, 0, 0, 0) -/* 0x38E2 */ DEFINE_SFX(NA_SE_EN_MONBLIN_HAM_UP, 0x30, 3, 0, 0, SFX_FLAG_13) +/* 0x38E2 */ DEFINE_SFX(NA_SE_EN_MONBLIN_HAM_UP, 0x30, 3, 0, 0, SFX_FLAG_VOLUME_NO_DIST) /* 0x38E3 */ DEFINE_SFX(NA_SE_EN_BUBLE_DAMAGE, 0x38, 1, 0, 0, 0) /* 0x38E4 */ DEFINE_SFX(NA_SE_EN_REDEAD_CRY, 0x20, 0, 0, 0, 0) /* 0x38E5 */ DEFINE_SFX(NA_SE_EN_REDEAD_AIM, 0x34, 0, 0, 0, 0) /* 0x38E6 */ DEFINE_SFX(NA_SE_EN_REDEAD_DAMAGE, 0x38, 1, 0, 0, 0) /* 0x38E7 */ DEFINE_SFX(NA_SE_EN_REDEAD_DEAD, 0x40, 1, 0, 0, 0) -/* 0x38E8 */ DEFINE_SFX(NA_SE_EN_REDEAD_ATTACK, 0x34, 0, 0, 0, SFX_FLAG_13) +/* 0x38E8 */ DEFINE_SFX(NA_SE_EN_REDEAD_ATTACK, 0x34, 0, 0, 0, SFX_FLAG_VOLUME_NO_DIST) /* 0x38E9 */ DEFINE_SFX(NA_SE_EN_GOLON_KID_SOB, 0x20, 0, 0, 0, 0) /* 0x38EA */ DEFINE_SFX(NA_SE_EN_GOLON_KID_CRY, 0x38, 2, 1, 0, 0) /* 0x38EB */ DEFINE_SFX(NA_SE_EN_KAICHO_DEAD, 0x40, 1, 0, 0, 0) @@ -273,13 +273,13 @@ /* 0x3903 */ DEFINE_SFX(NA_SE_EN_KOUME_LAUGH, 0x30, 3, 2, 0, 0) /* 0x3904 */ DEFINE_SFX(NA_SE_EN_KOUME_FLY, 0x38, 3, 0, 0, 0) /* 0x3905 */ DEFINE_SFX(NA_SE_EN_KOUME_AWAY, 0x18, 3, 0, 0, 0) -/* 0x3906 */ DEFINE_SFX(NA_SE_EN_KOUME_MAGIC, 0x30, 0, 0, 0, SFX_FLAG_13) +/* 0x3906 */ DEFINE_SFX(NA_SE_EN_KOUME_MAGIC, 0x30, 0, 0, 0, SFX_FLAG_VOLUME_NO_DIST) /* 0x3907 */ DEFINE_SFX(NA_SE_EN_DAIGOLON_SLEEP2, 0x38, 3, 0, 0, 0) /* 0x3908 */ DEFINE_SFX(NA_SE_EN_STALKIDS_JUMP, 0x30, 3, 0, 0, 0) /* 0x3909 */ DEFINE_SFX(NA_SE_EN_STALKIDS_FADEOUT, 0x40, 3, 0, 0, 0) -/* 0x390A */ DEFINE_SFX(NA_SE_EN_STALKIDS_LAUGH, 0x40, 4, 0, 0, SFX_FLAG_13) +/* 0x390A */ DEFINE_SFX(NA_SE_EN_STALKIDS_LAUGH, 0x40, 4, 0, 0, SFX_FLAG_VOLUME_NO_DIST) /* 0x390B */ DEFINE_SFX(NA_SE_EN_STALKIDS_SHAKEHEAD, 0x38, 5, 0, 0, 0) -/* 0x390C */ DEFINE_SFX(NA_SE_EN_STALKIDS_ONGND, 0x30, 0, 0, 0, SFX_FLAG_13) +/* 0x390C */ DEFINE_SFX(NA_SE_EN_STALKIDS_ONGND, 0x30, 0, 0, 0, SFX_FLAG_VOLUME_NO_DIST) /* 0x390D */ DEFINE_SFX(NA_SE_EN_STALKIDS_SURPRISED, 0x30, 3, 0, 0, 0) /* 0x390E */ DEFINE_SFX(NA_SE_EN_STALKIDS_WALK, 0x30, 0, 2, 0, 0) /* 0x390F */ DEFINE_SFX(NA_SE_EN_STALKIDS_REVERSE, 0x30, 5, 0, 0, 0) @@ -290,11 +290,11 @@ /* 0x3914 */ DEFINE_SFX(NA_SE_EN_TWINROBA_CUTBODY, 0x30, 3, 0, 0, 0) /* 0x3915 */ DEFINE_SFX(NA_SE_EN_STALKIDS_MASK_OFF, 0x30, 4, 2, 0, 0) /* 0x3916 */ DEFINE_SFX(NA_SE_EN_STALKIDS_RIDE, 0x38, 0, 2, 0, 0) -/* 0x3917 */ DEFINE_SFX(NA_SE_EN_DEKNUTS_DANCE, 0x38, 3, 2, 0, SFX_FLAG_14 | SFX_FLAG_13) -/* 0x3918 */ DEFINE_SFX(NA_SE_EN_DEKNUTS_DANCE1, 0x38, 3, 2, 0, SFX_FLAG_14 | SFX_FLAG_13) -/* 0x3919 */ DEFINE_SFX(NA_SE_EN_DEKNUTS_DANCE2, 0x38, 3, 2, 0, SFX_FLAG_14 | SFX_FLAG_13) -/* 0x391A */ DEFINE_SFX(NA_SE_EN_DEKNUTS_DANCE_BIG, 0x38, 3, 2, 0, SFX_FLAG_14 | SFX_FLAG_13) -/* 0x391B */ DEFINE_SFX(NA_SE_EN_EYEGOLE_BEAM, 0x40, 2, 2, 0, SFX_FLAG_14) +/* 0x3917 */ DEFINE_SFX(NA_SE_EN_DEKNUTS_DANCE, 0x38, 3, 2, 0, SFX_PARAM_RAND_FREQ_LOWER | SFX_FLAG_VOLUME_NO_DIST) +/* 0x3918 */ DEFINE_SFX(NA_SE_EN_DEKNUTS_DANCE1, 0x38, 3, 2, 0, SFX_PARAM_RAND_FREQ_LOWER | SFX_FLAG_VOLUME_NO_DIST) +/* 0x3919 */ DEFINE_SFX(NA_SE_EN_DEKNUTS_DANCE2, 0x38, 3, 2, 0, SFX_PARAM_RAND_FREQ_LOWER | SFX_FLAG_VOLUME_NO_DIST) +/* 0x391A */ DEFINE_SFX(NA_SE_EN_DEKNUTS_DANCE_BIG, 0x38, 3, 2, 0, SFX_PARAM_RAND_FREQ_LOWER | SFX_FLAG_VOLUME_NO_DIST) +/* 0x391B */ DEFINE_SFX(NA_SE_EN_EYEGOLE_BEAM, 0x40, 2, 2, 0, SFX_PARAM_RAND_FREQ_LOWER) /* 0x391C */ DEFINE_SFX(NA_SE_EN_GOLON_EYE_BIG, 0x18, 3, 2, 0, 0) /* 0x391D */ DEFINE_SFX(NA_SE_EN_GOLON_GOOD_BIG, 0x30, 3, 0, 0, 0) /* 0x391E */ DEFINE_SFX(NA_SE_EN_STALKIDS_LAUGH_MID, 0x30, 3, 0, 0, 0) @@ -323,26 +323,26 @@ /* 0x3935 */ DEFINE_SFX(NA_SE_EN_KUSAMUSHI_HIDE, 0x20, 1, 0, 0, 0) /* 0x3936 */ DEFINE_SFX(NA_SE_EN_FLOORMASTER_SM_STICK, 0x38, 3, 0, 0, 0) /* 0x3937 */ DEFINE_SFX(NA_SE_EN_FLOORMASTER_SM_LAND, 0x30, 0, 0, 0, 0) -/* 0x3938 */ DEFINE_SFX(NA_SE_EN_B_SLIME_COMBINE, 0x40, 3, 0, 0, SFX_FLAG_14) -/* 0x3939 */ DEFINE_SFX(NA_SE_EN_B_SLIME_PUNCH_MOVE, 0x30, 3, 0, 0, SFX_FLAG_14) +/* 0x3938 */ DEFINE_SFX(NA_SE_EN_B_SLIME_COMBINE, 0x40, 3, 0, 0, SFX_PARAM_RAND_FREQ_LOWER) +/* 0x3939 */ DEFINE_SFX(NA_SE_EN_B_SLIME_PUNCH_MOVE, 0x30, 3, 0, 0, SFX_PARAM_RAND_FREQ_LOWER) /* 0x393A */ DEFINE_SFX(NA_SE_EN_IRONNACK_ARMOR_HIT, 0x38, 3, 0, 0, 0) /* 0x393B */ DEFINE_SFX(NA_SE_EN_CUTBODY, 0x38, 3, 0, 0, 0) /* 0x393C */ DEFINE_SFX(NA_SE_EN_LAST1_TRANSFORM, 0x40, 3, 0, 0, 0) /* 0x393D */ DEFINE_SFX(NA_SE_EN_LAST1_DEMO_BREAK, 0x40, 3, 2, 0, 0) /* 0x393E */ DEFINE_SFX(NA_SE_EN_LAST1_DEMO_WALL, 0x40, 3, 2, 0, 0) /* 0x393F */ DEFINE_SFX(NA_SE_EN_B_PAMET_BREAK, 0x40, 3, 0, 0, 0) -/* 0x3940 */ DEFINE_SFX(NA_SE_EN_KONB_DEMO_MOVE_OLD, 0x21, 3, 0, 0, SFX_FLAG_14) +/* 0x3940 */ DEFINE_SFX(NA_SE_EN_KONB_DEMO_MOVE_OLD, 0x21, 3, 0, 0, SFX_PARAM_RAND_FREQ_LOWER) /* 0x3941 */ DEFINE_SFX(NA_SE_EN_KONB_JUMP_OLD, 0x54, 3, 0, 0, 0) /* 0x3942 */ DEFINE_SFX(NA_SE_EN_KONB_SINK_OLD, 0x54, 3, 0, 0, 0) /* 0x3943 */ DEFINE_SFX(NA_SE_EN_UTSUBO_EAT, 0x54, 3, 0, 0, 0) /* 0x3944 */ DEFINE_SFX(NA_SE_EN_YMAJIN_HOLD_SNOW, 0x34, 2, 0, 0, 0) /* 0x3945 */ DEFINE_SFX(NA_SE_EN_KONB_DAMAGE_OLD, 0x58, 3, 0, 0, 0) /* 0x3946 */ DEFINE_SFX(NA_SE_EN_KONB_DEAD_OLD, 0x68, 3, 0, 0, 0) -/* 0x3947 */ DEFINE_SFX(NA_SE_EN_KONB_BOUND_OLD, 0x50, 3, 3, 0, SFX_FLAG_14) +/* 0x3947 */ DEFINE_SFX(NA_SE_EN_KONB_BOUND_OLD, 0x50, 3, 3, 0, SFX_PARAM_RAND_FREQ_LOWER) /* 0x3948 */ DEFINE_SFX(NA_SE_EN_AWA_BOUND, 0x14, 0, 0, 0, 0) /* 0x3949 */ DEFINE_SFX(NA_SE_EN_AWA_BREAK, 0x20, 1, 0, 0, 0) -/* 0x394A */ DEFINE_SFX(NA_SE_EN_ICEB_FOOTSTEP_OLD, 0x48, 0, 2, 0, SFX_FLAG_14) -/* 0x394B */ DEFINE_SFX(NA_SE_EN_COMMON_THUNDER, 0x30, 0, 2, 0, SFX_FLAG_14) +/* 0x394A */ DEFINE_SFX(NA_SE_EN_ICEB_FOOTSTEP_OLD, 0x48, 0, 2, 0, SFX_PARAM_RAND_FREQ_LOWER) +/* 0x394B */ DEFINE_SFX(NA_SE_EN_COMMON_THUNDER, 0x30, 0, 2, 0, SFX_PARAM_RAND_FREQ_LOWER) /* 0x394C */ DEFINE_SFX(NA_SE_EN_ICEB_CRY_OLD, 0x50, 1, 0, 0, 0) /* 0x394D */ DEFINE_SFX(NA_SE_EN_ICEB_STEAM_LONG_OLD, 0x50, 1, 0, 0, 0) /* 0x394E */ DEFINE_SFX(NA_SE_EN_ICEB_STEAMS_DEMO_OLD, 0x50, 0, 0, 0, 0) @@ -358,7 +358,7 @@ /* 0x3958 */ DEFINE_SFX(NA_SE_EN_KONB_BOUND2_OLD, 0x50, 3, 0, 0, 0) /* 0x3959 */ DEFINE_SFX(NA_SE_EN_KONB_DEAD_JUMP_OLD, 0x50, 3, 0, 0, 0) /* 0x395A */ DEFINE_SFX(NA_SE_EN_KONB_DEAD_JUMP2_OLD, 0x50, 3, 0, 0, 0) -/* 0x395B */ DEFINE_SFX(NA_SE_EN_FROG_JUMP, 0x40, 3, 2, 0, SFX_FLAG_14) +/* 0x395B */ DEFINE_SFX(NA_SE_EN_FROG_JUMP, 0x40, 3, 2, 0, SFX_PARAM_RAND_FREQ_LOWER) /* 0x395C */ DEFINE_SFX(NA_SE_EN_FROG_GREET, 0x40, 3, 0, 0, 0) /* 0x395D */ DEFINE_SFX(NA_SE_EN_FROG_HOLD_SLIME, 0x40, 3, 0, 0, 0) /* 0x395E */ DEFINE_SFX(NA_SE_EN_FROG_THROW_SLIME, 0x40, 3, 0, 0, 0) @@ -371,7 +371,7 @@ /* 0x3965 */ DEFINE_SFX(NA_SE_EN_FROG_JUMP_ABOVE, 0x48, 3, 0, 0, 0) /* 0x3966 */ DEFINE_SFX(NA_SE_EN_FROG_KICK, 0x40, 3, 0, 0, 0) /* 0x3967 */ DEFINE_SFX(NA_SE_EN_YMAJIN_MINI_HOLD, 0x34, 2, 0, 0, 0) -/* 0x3968 */ DEFINE_SFX(NA_SE_EN_YMAJIN_MINI_THROW, 0x34, 2, 0, 0, SFX_FLAG_13) +/* 0x3968 */ DEFINE_SFX(NA_SE_EN_YMAJIN_MINI_THROW, 0x34, 2, 0, 0, SFX_FLAG_VOLUME_NO_DIST) /* 0x3969 */ DEFINE_SFX(NA_SE_EN_YMAJIN_MOVE, 0x28, 2, 0, 0, 0) /* 0x396A */ DEFINE_SFX(NA_SE_EN_YMAJIN_MINI_MOVE, 0x28, 2, 0, 0, 0) /* 0x396B */ DEFINE_SFX(NA_SE_EN_YMAJIN_SURFACE, 0x30, 2, 0, 0, 0) @@ -397,7 +397,7 @@ /* 0x397F */ DEFINE_SFX(NA_SE_EN_HIPLOOP_FOOTSTEP, 0x30, 1, 0, 0, 0) /* 0x3980 */ DEFINE_SFX(NA_SE_EN_DEKUHIME_WALK, 0x38, 3, 2, 0, 0) /* 0x3981 */ DEFINE_SFX(NA_SE_EN_DEKUHIME_TURN, 0x30, 3, 0, 0, 0) -/* 0x3982 */ DEFINE_SFX(NA_SE_EN_DEKUHIME_GREET, 0x20, 0, 0, 0, SFX_FLAG_13) +/* 0x3982 */ DEFINE_SFX(NA_SE_EN_DEKUHIME_GREET, 0x20, 0, 0, 0, SFX_FLAG_VOLUME_NO_DIST) /* 0x3983 */ DEFINE_SFX(NA_SE_EN_DEKUHIME_GREET2, 0x30, 3, 0, 0, 0) /* 0x3984 */ DEFINE_SFX(NA_SE_EN_PIHAT_SM_FLY, 0x30, 0, 0, 0, 0) /* 0x3985 */ DEFINE_SFX(NA_SE_EN_PIHAT_SM_DEAD, 0x40, 1, 0, 0, 0) @@ -406,7 +406,7 @@ /* 0x3988 */ DEFINE_SFX(NA_SE_EN_RIVA_DAMAGE, 0x38, 1, 0, 0, 0) /* 0x3989 */ DEFINE_SFX(NA_SE_EN_RIVA_DEAD, 0x40, 1, 0, 0, 0) /* 0x398A */ DEFINE_SFX(NA_SE_EN_RIVA_MOVE, 0x30, 0, 0, 0, 0) -/* 0x398B */ DEFINE_SFX(NA_SE_EN_DEKUHIME_VOICE_SAD, 0x30, 0, 0, 0, SFX_FLAG_13) +/* 0x398B */ DEFINE_SFX(NA_SE_EN_DEKUHIME_VOICE_SAD, 0x30, 0, 0, 0, SFX_FLAG_VOLUME_NO_DIST) /* 0x398C */ DEFINE_SFX(NA_SE_EN_DEKUHIME_VOICE_JOY, 0x30, 3, 0, 0, 0) /* 0x398D */ DEFINE_SFX(NA_SE_EN_NUTS_JUMP, 0x30, 2, 0, 0, 0) /* 0x398E */ DEFINE_SFX(NA_SE_EN_NUTS_CLOTHES, 0x30, 3, 0, 0, 0) @@ -422,7 +422,7 @@ /* 0x3998 */ DEFINE_SFX(NA_SE_EN_PIRATE_ATTACK, 0x30, 2, 0, 0, 0) /* 0x3999 */ DEFINE_SFX(NA_SE_EN_PIRATE_DAMAGE, 0x38, 0, 0, 0, 0) /* 0x399A */ DEFINE_SFX(NA_SE_EN_PIRATE_DEAD, 0x48, 0, 0, 0, 0) -/* 0x399B */ DEFINE_SFX(NA_SE_EN_MB_MOTH_FLY, 0x28, 4, 0, 0, SFX_FLAG_14) +/* 0x399B */ DEFINE_SFX(NA_SE_EN_MB_MOTH_FLY, 0x28, 4, 0, 0, SFX_PARAM_RAND_FREQ_LOWER) /* 0x399C */ DEFINE_SFX(NA_SE_EN_MB_MOTH_DEAD, 0x48, 4, 0, 0, 0) /* 0x399D */ DEFINE_SFX(NA_SE_EN_MB_INSECT_WALK, 0x20, 4, 0, 0, 0) /* 0x399E */ DEFINE_SFX(NA_SE_EN_B_PAMET_ROLL, 0x25, 3, 0, 0, 0) @@ -451,8 +451,8 @@ /* 0x39B5 */ DEFINE_SFX(NA_SE_EN_LAST3_DEAD_WIND3_OLD, 0x34, 3, 0, 0, 0) /* 0x39B6 */ DEFINE_SFX(NA_SE_EN_LAST3_DEAD_LIGHTS_OLD, 0x40, 0, 0, 0, 0) /* 0x39B7 */ DEFINE_SFX(NA_SE_EN_PIRATE_BREATH, 0x30, 3, 0, 0, 0) -/* 0x39B8 */ DEFINE_SFX(NA_SE_EN_LAST3_DEAD_ROD, 0x40, 0, 0, 0, SFX_FLAG_13) -/* 0x39B9 */ DEFINE_SFX(NA_SE_EN_LAST2_SHOUT, 0x30, 0, 0, 0, SFX_FLAG_13) +/* 0x39B8 */ DEFINE_SFX(NA_SE_EN_LAST3_DEAD_ROD, 0x40, 0, 0, 0, SFX_FLAG_VOLUME_NO_DIST) +/* 0x39B9 */ DEFINE_SFX(NA_SE_EN_LAST2_SHOUT, 0x30, 0, 0, 0, SFX_FLAG_VOLUME_NO_DIST) /* 0x39BA */ DEFINE_SFX(NA_SE_EN_LAST2_PUMP_UP_OLD, 0x30, 0, 3, 0, 0) /* 0x39BB */ DEFINE_SFX(NA_SE_EN_LAST2_GROW_HEAD_OLD, 0x30, 0, 3, 0, 0) /* 0x39BC */ DEFINE_SFX(NA_SE_EN_LAST2_HEARTBEAT_OLD, 0x40, 0, 0, 0, 0) @@ -486,15 +486,15 @@ /* 0x39D8 */ DEFINE_SFX(NA_SE_EN_MGANON_STAND, 0x34, 3, 0, 0, 0) /* 0x39D9 */ DEFINE_SFX(NA_SE_EN_LAST2_FIRE_OLD, 0x20, 3, 2, 0, 0) /* 0x39DA */ DEFINE_SFX(NA_SE_EN_STALGOLD_ROLL, 0x30, 4, 0, 0, 0) -/* 0x39DB */ DEFINE_SFX(NA_SE_EN_LAST2_WALK_OLD, 0x30, 2, 1, 0, SFX_FLAG_14) -/* 0x39DC */ DEFINE_SFX(NA_SE_EN_LAST2_WAIT_OLD, 0x40, 2, 1, 0, SFX_FLAG_14) +/* 0x39DB */ DEFINE_SFX(NA_SE_EN_LAST2_WALK_OLD, 0x30, 2, 1, 0, SFX_PARAM_RAND_FREQ_LOWER) +/* 0x39DC */ DEFINE_SFX(NA_SE_EN_LAST2_WAIT_OLD, 0x40, 2, 1, 0, SFX_PARAM_RAND_FREQ_LOWER) /* 0x39DD */ DEFINE_SFX(NA_SE_EN_LAST2_JUMP_OLD, 0x40, 3, 2, 0, 0) -/* 0x39DE */ DEFINE_SFX(NA_SE_EN_LAST2_BIRD_OLD, 0x30, 2, 1, 0, SFX_FLAG_14) -/* 0x39DF */ DEFINE_SFX(NA_SE_EN_LAST2_BIRD2_OLD, 0x30, 2, 1, 0, SFX_FLAG_14) +/* 0x39DE */ DEFINE_SFX(NA_SE_EN_LAST2_BIRD_OLD, 0x30, 2, 1, 0, SFX_PARAM_RAND_FREQ_LOWER) +/* 0x39DF */ DEFINE_SFX(NA_SE_EN_LAST2_BIRD2_OLD, 0x30, 2, 1, 0, SFX_PARAM_RAND_FREQ_LOWER) /* 0x39E0 */ DEFINE_SFX(NA_SE_EN_STALTU_WAVE, 0x30, 0, 0, 0, 0) /* 0x39E1 */ DEFINE_SFX(NA_SE_EN_STALTU_DOWN_SET, 0x30, 0, 0, 0, 0) /* 0x39E2 */ DEFINE_SFX(NA_SE_EN_DEKU_WAKEUP, 0x30, 1, 0, 0, 0) -/* 0x39E3 */ DEFINE_SFX(NA_SE_EN_LAST2_WALK2_OLD, 0x32, 2, 2, 0, SFX_FLAG_14) +/* 0x39E3 */ DEFINE_SFX(NA_SE_EN_LAST2_WALK2_OLD, 0x32, 2, 2, 0, SFX_PARAM_RAND_FREQ_LOWER) /* 0x39E4 */ DEFINE_SFX(NA_SE_EN_LAST1_FLOAT_OLD, 0x32, 3, 0, 0, 0) /* 0x39E5 */ DEFINE_SFX(NA_SE_EN_LAST1_ATTACK_2ND_OLD, 0x54, 1, 0, 0, 0) /* 0x39E6 */ DEFINE_SFX(NA_SE_EN_LAST1_ROLLING_OLD, 0x52, 0, 0, 0, 0) @@ -504,9 +504,9 @@ /* 0x39EA */ DEFINE_SFX(NA_SE_EN_STALGOLD_UP_CRY, 0x30, 1, 0, 0, 0) /* 0x39EB */ DEFINE_SFX(NA_SE_EN_GOLON_CRY, 0x30, 3, 0, 0, 0) /* 0x39EC */ DEFINE_SFX(NA_SE_EN_LAST3_ROD_SOFT, 0x54, 3, 0, 0, 0) -/* 0x39ED */ DEFINE_SFX(NA_SE_EN_LAST3_ROD_MID_OLD, 0x54, 0, 0, 0, SFX_FLAG_13) +/* 0x39ED */ DEFINE_SFX(NA_SE_EN_LAST3_ROD_MID_OLD, 0x54, 0, 0, 0, SFX_FLAG_VOLUME_NO_DIST) /* 0x39EE */ DEFINE_SFX(NA_SE_EN_RIVA_BIG_APPEAR, 0x34, 3, 0, 0, 0) -/* 0x39EF */ DEFINE_SFX(NA_SE_EN_LAST3_ROD_HARD, 0x54, 0, 0, 0, SFX_FLAG_13) +/* 0x39EF */ DEFINE_SFX(NA_SE_EN_LAST3_ROD_HARD, 0x54, 0, 0, 0, SFX_FLAG_VOLUME_NO_DIST) /* 0x39F0 */ DEFINE_SFX(NA_SE_EN_MUSI_WALK, 0x08, 0, 0, 0, 0) /* 0x39F1 */ DEFINE_SFX(NA_SE_EN_LAST3_COIL_ATTACK_OLD, 0x54, 0, 0, 0, 0) /* 0x39F2 */ DEFINE_SFX(NA_SE_EN_STALWALL_LAUGH, 0x34, 0, 0, 0, 0) @@ -523,8 +523,8 @@ /* 0x39FD */ DEFINE_SFX(NA_SE_EN_HANDW_RELEASE, 0x30, 0, 0, 0, 0) /* 0x39FE */ DEFINE_SFX(NA_SE_EN_SLIME_SURFACE, 0x30, 0, 0, 0, 0) /* 0x39FF */ DEFINE_SFX(NA_SE_EN_KOTAKE_SLEEP, 0x30, 0, 0, 0, 0) -/* 0x3A00 */ DEFINE_SFX(NA_SE_EN_KOTAKE_SURPRISED2, 0x30, 0, 2, SFX_FLAG2_0, 0) -/* 0x3A01 */ DEFINE_SFX(NA_SE_EN_NEMURI_SLEEP, 0x30, 6, 0, SFX_FLAG2_7 | SFX_FLAG2_5 | SFX_FLAG2_4 | SFX_FLAG2_2, 0) +/* 0x3A00 */ DEFINE_SFX(NA_SE_EN_KOTAKE_SURPRISED2, 0x30, 0, 2, SFX_FLAG2_FORCE_RESET, 0) +/* 0x3A01 */ DEFINE_SFX(NA_SE_EN_NEMURI_SLEEP, 0x30, 6, 0, SFX_FLAG2_APPLY_LOWPASS_FILTER | SFX_FLAG2_SURROUND_NO_HIGHPASS_FILTER | SFX_FLAG2_UNUSED4 | SFX_FLAG2_UNUSED2, 0) /* 0x3A02 */ DEFINE_SFX(NA_SE_EN_LAST1_DEAD_OLD, 0x30, 0, 0, 0, 0) /* 0x3A03 */ DEFINE_SFX(NA_SE_EN_GOLON_SIRLOIN_ROLL, 0x30, 6, 0, 0, 0) /* 0x3A04 */ DEFINE_SFX(NA_SE_EN_GOLON_VOICE_EATFULL, 0x30, 3, 2, 0, 0) @@ -555,15 +555,15 @@ /* 0x3A1D */ DEFINE_SFX(NA_SE_EN_INBOSS_DEAD_OLD, 0x68, 3, 0, 0, 0) /* 0x3A1E */ DEFINE_SFX(NA_SE_EN_LAST1_BEAM2_OLD, 0x30, 0, 0, 0, 0) /* 0x3A1F */ DEFINE_SFX(NA_SE_EN_COMMON_EXTINCT_LEV, 0x45, 2, 0, 0, 0) -/* 0x3A20 */ DEFINE_SFX(NA_SE_EN_BOSU_HEAD_MID, 0x40, 3, 1, 0, SFX_FLAG_14) -/* 0x3A21 */ DEFINE_SFX(NA_SE_EN_BOSU_HEAD_SHORT, 0x40, 3, 1, 0, SFX_FLAG_14) -/* 0x3A22 */ DEFINE_SFX(NA_SE_EN_DEBU_HEAD_MID, 0x30, 3, 1, 0, SFX_FLAG_14) -/* 0x3A23 */ DEFINE_SFX(NA_SE_EN_DEBU_HEAD_SHORT, 0x30, 3, 1, 0, SFX_FLAG_14) -/* 0x3A24 */ DEFINE_SFX(NA_SE_EN_YASE_HEAD_MID, 0x30, 3, 1, 0, SFX_FLAG_14) -/* 0x3A25 */ DEFINE_SFX(NA_SE_EN_YASE_HEAD_SHORT, 0x30, 3, 1, 0, SFX_FLAG_14) -/* 0x3A26 */ DEFINE_SFX(NA_SE_EN_BOSU_WALK, 0x30, 3, 2, 0, SFX_FLAG_14) -/* 0x3A27 */ DEFINE_SFX(NA_SE_EN_DEBU_WALK, 0x30, 3, 2, 0, SFX_FLAG_14) -/* 0x3A28 */ DEFINE_SFX(NA_SE_EN_YASE_WALK, 0x30, 3, 2, 0, SFX_FLAG_14) +/* 0x3A20 */ DEFINE_SFX(NA_SE_EN_BOSU_HEAD_MID, 0x40, 3, 1, 0, SFX_PARAM_RAND_FREQ_LOWER) +/* 0x3A21 */ DEFINE_SFX(NA_SE_EN_BOSU_HEAD_SHORT, 0x40, 3, 1, 0, SFX_PARAM_RAND_FREQ_LOWER) +/* 0x3A22 */ DEFINE_SFX(NA_SE_EN_DEBU_HEAD_MID, 0x30, 3, 1, 0, SFX_PARAM_RAND_FREQ_LOWER) +/* 0x3A23 */ DEFINE_SFX(NA_SE_EN_DEBU_HEAD_SHORT, 0x30, 3, 1, 0, SFX_PARAM_RAND_FREQ_LOWER) +/* 0x3A24 */ DEFINE_SFX(NA_SE_EN_YASE_HEAD_MID, 0x30, 3, 1, 0, SFX_PARAM_RAND_FREQ_LOWER) +/* 0x3A25 */ DEFINE_SFX(NA_SE_EN_YASE_HEAD_SHORT, 0x30, 3, 1, 0, SFX_PARAM_RAND_FREQ_LOWER) +/* 0x3A26 */ DEFINE_SFX(NA_SE_EN_BOSU_WALK, 0x30, 3, 2, 0, SFX_PARAM_RAND_FREQ_LOWER) +/* 0x3A27 */ DEFINE_SFX(NA_SE_EN_DEBU_WALK, 0x30, 3, 2, 0, SFX_PARAM_RAND_FREQ_LOWER) +/* 0x3A28 */ DEFINE_SFX(NA_SE_EN_YASE_WALK, 0x30, 3, 2, 0, SFX_PARAM_RAND_FREQ_LOWER) /* 0x3A29 */ DEFINE_SFX(NA_SE_EN_BOSU_SIT, 0x50, 3, 0, 0, 0) /* 0x3A2A */ DEFINE_SFX(NA_SE_EN_BOSU_STAND, 0x30, 3, 0, 0, 0) /* 0x3A2B */ DEFINE_SFX(NA_SE_EN_BOSU_HAND, 0x30, 3, 0, 0, 0) @@ -588,10 +588,10 @@ /* 0x3A3E */ DEFINE_SFX(NA_SE_EN_DEBU_DEAD, 0x38, 3, 1, 0, 0) /* 0x3A3F */ DEFINE_SFX(NA_SE_EN_YASE_DEAD, 0x48, 3, 1, 0, 0) /* 0x3A40 */ DEFINE_SFX(NA_SE_EN_DEBU_PAUSE_K, 0x34, 3, 2, 0, 0) -/* 0x3A41 */ DEFINE_SFX(NA_SE_EN_DEBU_LAUGH_SHORT_K, 0x34, 3, 1, 0, SFX_FLAG_14) -/* 0x3A42 */ DEFINE_SFX(NA_SE_EN_DEBU_LAUGH_K, 0x34, 3, 1, 0, SFX_FLAG_14) +/* 0x3A41 */ DEFINE_SFX(NA_SE_EN_DEBU_LAUGH_SHORT_K, 0x34, 3, 1, 0, SFX_PARAM_RAND_FREQ_LOWER) +/* 0x3A42 */ DEFINE_SFX(NA_SE_EN_DEBU_LAUGH_K, 0x34, 3, 1, 0, SFX_PARAM_RAND_FREQ_LOWER) /* 0x3A43 */ DEFINE_SFX(NA_SE_EN_YASE_PAUSE_K, 0x34, 3, 2, 0, 0) -/* 0x3A44 */ DEFINE_SFX(NA_SE_EN_YASE_LAUGH_K, 0x34, 3, 1, 0, SFX_FLAG_14) +/* 0x3A44 */ DEFINE_SFX(NA_SE_EN_YASE_LAUGH_K, 0x34, 3, 1, 0, SFX_PARAM_RAND_FREQ_LOWER) /* 0x3A45 */ DEFINE_SFX(NA_SE_EN_BOSU_LAUGH_DEMO_K, 0x50, 3, 1, 0, 0) /* 0x3A46 */ DEFINE_SFX(NA_SE_EN_DEBU_LAUGH_SHORT, 0x34, 3, 1, 0, 0) /* 0x3A47 */ DEFINE_SFX(NA_SE_EN_BOSU_LAUGH_K, 0x50, 3, 1, 0, 0) @@ -621,10 +621,10 @@ /* 0x3A5F */ DEFINE_SFX(NA_SE_EN_LAST2_MOONWALK_OLD, 0x50, 3, 0, 0, 0) /* 0x3A60 */ DEFINE_SFX(NA_SE_EN_SHARP_FLOAT, 0x28, 4, 0, 0, 0) /* 0x3A61 */ DEFINE_SFX(NA_SE_EN_SHARP_REACTION, 0x34, 2, 0, 0, 0) -/* 0x3A62 */ DEFINE_SFX(NA_SE_EN_REDEAD_WEAKENED1, 0x30, 0, 2, 0, SFX_FLAG_14) -/* 0x3A63 */ DEFINE_SFX(NA_SE_EN_REDEAD_WEAKENED_L1, 0x30, 0, 2, 0, SFX_FLAG_14) -/* 0x3A64 */ DEFINE_SFX(NA_SE_EN_REDEAD_WEAKENED2, 0x30, 0, 2, 0, SFX_FLAG_14) -/* 0x3A65 */ DEFINE_SFX(NA_SE_EN_REDEAD_WEAKENED_L2, 0x30, 0, 2, 0, SFX_FLAG_14) +/* 0x3A62 */ DEFINE_SFX(NA_SE_EN_REDEAD_WEAKENED1, 0x30, 0, 2, 0, SFX_PARAM_RAND_FREQ_LOWER) +/* 0x3A63 */ DEFINE_SFX(NA_SE_EN_REDEAD_WEAKENED_L1, 0x30, 0, 2, 0, SFX_PARAM_RAND_FREQ_LOWER) +/* 0x3A64 */ DEFINE_SFX(NA_SE_EN_REDEAD_WEAKENED2, 0x30, 0, 2, 0, SFX_PARAM_RAND_FREQ_LOWER) +/* 0x3A65 */ DEFINE_SFX(NA_SE_EN_REDEAD_WEAKENED_L2, 0x30, 0, 2, 0, SFX_PARAM_RAND_FREQ_LOWER) /* 0x3A66 */ DEFINE_SFX(NA_SE_EN_PIRATE_ONGND, 0x30, 1, 0, 0, 0) /* 0x3A67 */ DEFINE_SFX(NA_SE_EN_FOLLOWERS_STAY, 0x30, 4, 2, 0, 0) /* 0x3A68 */ DEFINE_SFX(NA_SE_EN_LAST2_VOICE_BALLET, 0x50, 3, 0, 0, 0) @@ -652,22 +652,22 @@ /* 0x3A7E */ DEFINE_SFX(NA_SE_EN_STAL10_LAUGH_SHY, 0x34, 0, 0, 0, 0) /* 0x3A7F */ DEFINE_SFX(NA_SE_EN_STAL11_LAUGH_SHY2, 0x54, 0, 0, 0, 0) /* 0x3A80 */ DEFINE_SFX(NA_SE_EN_STAL12_LAUGH_KIDLY, 0x34, 0, 0, 0, 0) -/* 0x3A81 */ DEFINE_SFX(NA_SE_EN_STAL20_CALL_MOON, 0x34, 0, 0, 0, SFX_FLAG_13) -/* 0x3A82 */ DEFINE_SFX(NA_SE_EN_STAL20_CALL_MOON2, 0x34, 0, 0, 0, SFX_FLAG_13) +/* 0x3A81 */ DEFINE_SFX(NA_SE_EN_STAL20_CALL_MOON, 0x34, 0, 0, 0, SFX_FLAG_VOLUME_NO_DIST) +/* 0x3A82 */ DEFINE_SFX(NA_SE_EN_STAL20_CALL_MOON2, 0x34, 0, 0, 0, SFX_FLAG_VOLUME_NO_DIST) /* 0x3A83 */ DEFINE_SFX(NA_SE_EN_STAL21_PSYCHO_VOICE, 0x34, 0, 0, 0, 0) /* 0x3A84 */ DEFINE_SFX(NA_SE_EN_STALKIDS_DOWN_K, 0x30, 5, 0, 0, 0) /* 0x3A85 */ DEFINE_SFX(NA_SE_EN_AKINDO_FLY, 0x30, 1, 0, 0, 0) /* 0x3A86 */ DEFINE_SFX(NA_SE_EN_NPC_APPEAR, 0x30, 0, 0, 0, 0) /* 0x3A87 */ DEFINE_SFX(NA_SE_EN_NPC_FADEAWAY, 0x30, 0, 0, 0, 0) -/* 0x3A88 */ DEFINE_SFX(NA_SE_EN_DEBU_PAUSEx2, 0x34, 3, 2, 0, SFX_FLAG_14) -/* 0x3A89 */ DEFINE_SFX(NA_SE_EN_YASE_PAUSEx2, 0x34, 3, 2, 0, SFX_FLAG_14) -/* 0x3A8A */ DEFINE_SFX(NA_SE_EN_DEBU_HEAD_UP, 0x30, 3, 2, 0, SFX_FLAG_14) -/* 0x3A8B */ DEFINE_SFX(NA_SE_EN_YASE_HEAD_UP, 0x30, 3, 2, 0, SFX_FLAG_14) +/* 0x3A88 */ DEFINE_SFX(NA_SE_EN_DEBU_PAUSEx2, 0x34, 3, 2, 0, SFX_PARAM_RAND_FREQ_LOWER) +/* 0x3A89 */ DEFINE_SFX(NA_SE_EN_YASE_PAUSEx2, 0x34, 3, 2, 0, SFX_PARAM_RAND_FREQ_LOWER) +/* 0x3A8A */ DEFINE_SFX(NA_SE_EN_DEBU_HEAD_UP, 0x30, 3, 2, 0, SFX_PARAM_RAND_FREQ_LOWER) +/* 0x3A8B */ DEFINE_SFX(NA_SE_EN_YASE_HEAD_UP, 0x30, 3, 2, 0, SFX_PARAM_RAND_FREQ_LOWER) /* 0x3A8C */ DEFINE_SFX(NA_SE_EN_STAL22_LAUGH_KID_L, 0x34, 0, 0, 0, 0) /* 0x3A8D */ DEFINE_SFX(NA_SE_EN_EVIL_POWER, 0x30, 0, 0, 0, 0) -/* 0x3A8E */ DEFINE_SFX(NA_SE_NE_STAL23_COLD, 0x34, 3, 2, 0, SFX_FLAG_12) -/* 0x3A8F */ DEFINE_SFX(NA_SE_EN_STALKIDS_GASAGOSO, 0x30, 5, 0, 0, SFX_FLAG_12) -/* 0x3A90 */ DEFINE_SFX(NA_SE_EN_BOSU_TALK, 0x30, 0, 2, 0, SFX_FLAG_14) +/* 0x3A8E */ DEFINE_SFX(NA_SE_NE_STAL23_COLD, 0x34, 3, 2, 0, SFX_FLAG_REVERB_NO_DIST) +/* 0x3A8F */ DEFINE_SFX(NA_SE_EN_STALKIDS_GASAGOSO, 0x30, 5, 0, 0, SFX_FLAG_REVERB_NO_DIST) +/* 0x3A90 */ DEFINE_SFX(NA_SE_EN_BOSU_TALK, 0x30, 0, 2, 0, SFX_PARAM_RAND_FREQ_LOWER) /* 0x3A91 */ DEFINE_SFX(NA_SE_EN_FAMOS_REVERSE1, 0x34, 0, 0, 0, 0) /* 0x3A92 */ DEFINE_SFX(NA_SE_EN_FAMOS_REVERSE2, 0x34, 0, 0, 0, 0) /* 0x3A93 */ DEFINE_SFX(NA_SE_EN_FAMOS_FLOAT, 0x30, 6, 0, 0, 0) @@ -697,8 +697,8 @@ /* 0x3AAB */ DEFINE_SFX(NA_SE_EN_KONB_WAIT_OLD, 0x30, 3, 0, 0, 0) /* 0x3AAC */ DEFINE_SFX(NA_SE_EN_DEATH_SCYTHE, 0x54, 5, 0, 0, 0) /* 0x3AAD */ DEFINE_SFX(NA_SE_EN_DEATH_ROLL, 0x28, 5, 0, 0, 0) -/* 0x3AAE */ DEFINE_SFX(NA_SE_EN_DEATH_SCYTHE_LEV, 0x78, 0, 0, 0, SFX_FLAG_13) -/* 0x3AAF */ DEFINE_SFX(NA_SE_EN_DEATH_SCYTHE_ONGND, 0x78, 0, 0, 0, SFX_FLAG_13) +/* 0x3AAE */ DEFINE_SFX(NA_SE_EN_DEATH_SCYTHE_LEV, 0x78, 0, 0, 0, SFX_FLAG_VOLUME_NO_DIST) +/* 0x3AAF */ DEFINE_SFX(NA_SE_EN_DEATH_SCYTHE_ONGND, 0x78, 0, 0, 0, SFX_FLAG_VOLUME_NO_DIST) /* 0x3AB0 */ DEFINE_SFX(NA_SE_EN_DEATH_VOICE, 0x50, 3, 0, 0, 0) /* 0x3AB1 */ DEFINE_SFX(NA_SE_EN_DEATH_DAMAGE, 0x58, 3, 0, 0, 0) /* 0x3AB2 */ DEFINE_SFX(NA_SE_EN_DEATH_DEAD, 0x68, 3, 0, 0, 0) @@ -714,14 +714,14 @@ /* 0x3ABC */ DEFINE_SFX(NA_SE_EN_IWAIGORON_EVERYBODY, 0x30, 0, 0, 0, 0) /* 0x3ABD */ DEFINE_SFX(NA_SE_EN_IWAIGORON_SOLO, 0x30, 3, 3, 0, 0) /* 0x3ABE */ DEFINE_SFX(NA_SE_EN_ROMANI_WALK, 0x30, 0, 2, 0, 0) -/* 0x3ABF */ DEFINE_SFX(NA_SE_EN_MOON_SCREAM1, 0x30, 0, 0, 0, SFX_FLAG_13) -/* 0x3AC0 */ DEFINE_SFX(NA_SE_EN_MOON_SCREAM2, 0x30, 0, 0, 0, SFX_FLAG_13) -/* 0x3AC1 */ DEFINE_SFX(NA_SE_EN_MOON_SCREAM3, 0x30, 0, 0, 0, SFX_FLAG_13) -/* 0x3AC2 */ DEFINE_SFX(NA_SE_EN_MOON_SCREAM4, 0x30, 0, 0, 0, SFX_FLAG_13) -/* 0x3AC3 */ DEFINE_SFX(NA_SE_EN_STALKIDS_HEADACHE, 0x30, 0, 0, 0, SFX_FLAG_13) +/* 0x3ABF */ DEFINE_SFX(NA_SE_EN_MOON_SCREAM1, 0x30, 0, 0, 0, SFX_FLAG_VOLUME_NO_DIST) +/* 0x3AC0 */ DEFINE_SFX(NA_SE_EN_MOON_SCREAM2, 0x30, 0, 0, 0, SFX_FLAG_VOLUME_NO_DIST) +/* 0x3AC1 */ DEFINE_SFX(NA_SE_EN_MOON_SCREAM3, 0x30, 0, 0, 0, SFX_FLAG_VOLUME_NO_DIST) +/* 0x3AC2 */ DEFINE_SFX(NA_SE_EN_MOON_SCREAM4, 0x30, 0, 0, 0, SFX_FLAG_VOLUME_NO_DIST) +/* 0x3AC3 */ DEFINE_SFX(NA_SE_EN_STALKIDS_HEADACHE, 0x30, 0, 0, 0, SFX_FLAG_VOLUME_NO_DIST) /* 0x3AC4 */ DEFINE_SFX(NA_SE_EN_BIGNUTS_WALK, 0x30, 5, 1, 0, 0) /* 0x3AC5 */ DEFINE_SFX(NA_SE_EN_KITA_PAUSE, 0x60, 2, 0, 0, 0) -/* 0x3AC6 */ DEFINE_SFX(NA_SE_EN_ANSATSUSYA_LAUGH, 0x70, 0, 0, 0, SFX_FLAG_13) +/* 0x3AC6 */ DEFINE_SFX(NA_SE_EN_ANSATSUSYA_LAUGH, 0x70, 0, 0, 0, SFX_FLAG_VOLUME_NO_DIST) /* 0x3AC7 */ DEFINE_SFX(NA_SE_EN__copy514, 0x30, 0, 2, 0, 0) /* 0x3AC8 */ DEFINE_SFX(NA_SE_EN__copy515, 0x30, 0, 2, 0, 0) /* 0x3AC9 */ DEFINE_SFX(NA_SE_EN__copy516, 0x30, 0, 2, 0, 0) diff --git a/include/tables/sfx/environmentbank_table.h b/include/tables/sfx/environmentbank_table.h index c340f12f7..ab7945c34 100644 --- a/include/tables/sfx/environmentbank_table.h +++ b/include/tables/sfx/environmentbank_table.h @@ -11,13 +11,13 @@ * * WARNING: entries must align with the table defined for the environment bank in sequence 0 */ -/* 0x2800 */ DEFINE_SFX(NA_SE_EV_DOOR_OPEN, 0x70, 0, 1, 0, SFX_FLAG_10 | SFX_FLAG_9) +/* 0x2800 */ DEFINE_SFX(NA_SE_EV_DOOR_OPEN, 0x70, 0, 1, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX | SFX_FLAG_SURROUND_LOWPASS_FILTER) /* 0x2801 */ DEFINE_SFX(NA_SE_EV_DOOR_CLOSE, 0x80, 0, 1, 0, 0) /* 0x2802 */ DEFINE_SFX(NA_SE_EV_EXPLOSION, 0x30, 0, 0, 0, 0) /* 0x2803 */ DEFINE_SFX(NA_SE_EV_HORSE_WALK, 0x60, 0, 1, 0, 0) /* 0x2804 */ DEFINE_SFX(NA_SE_EV_HORSE_RUN, 0x60, 0, 1, 0, 0) /* 0x2805 */ DEFINE_SFX(NA_SE_EV_HORSE_NEIGH, 0x70, 0, 1, 0, 0) -/* 0x2806 */ DEFINE_SFX(NA_SE_EV_RIVER_STREAM, 0x30, 0, 2, 0, SFX_FLAG_10) +/* 0x2806 */ DEFINE_SFX(NA_SE_EV_RIVER_STREAM, 0x30, 0, 2, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) /* 0x2807 */ DEFINE_SFX(NA_SE_EV_WATER_WALL_BIG, 0x70, 2, 0, 0, 0) /* 0x2808 */ DEFINE_SFX(NA_SE_EV_OUT_OF_WATER, 0x30, 0, 1, 0, 0) /* 0x2809 */ DEFINE_SFX(NA_SE_EV_DIVE_WATER, 0x30, 0, 1, 0, 0) @@ -44,18 +44,18 @@ /* 0x281E */ DEFINE_SFX(NA_SE_EV_STONE_STATUE_OPEN, 0x30, 3, 1, 0, 0) /* 0x281F */ DEFINE_SFX(NA_SE_EV_TBOX_UNLOCK, 0x30, 0, 0, 0, 0) /* 0x2820 */ DEFINE_SFX(NA_SE_EV_TBOX_OPEN, 0x30, 0, 0, 0, 0) -/* 0x2821 */ DEFINE_SFX(NA_SE_SY_TIMER, 0xA0, 0, 0, 0, SFX_FLAG_13 | SFX_FLAG_3) +/* 0x2821 */ DEFINE_SFX(NA_SE_SY_TIMER, 0xA0, 0, 0, 0, SFX_FLAG_VOLUME_NO_DIST | SFX_FLAG_LOWER_VOLUME_BGM) /* 0x2822 */ DEFINE_SFX(NA_SE_EV_FLAME_IGNITION, 0x20, 2, 0, 0, 0) /* 0x2823 */ DEFINE_SFX(NA_SE_EV_SPEAR_HIT, 0x30, 0, 0, 0, 0) -/* 0x2824 */ DEFINE_SFX(NA_SE_EV_ELEVATOR_MOVE, 0x30, 0, 0, 0, SFX_FLAG_11) -/* 0x2825 */ DEFINE_SFX(NA_SE_EV_WARP_HOLE, 0x30, 0, 0, 0, SFX_FLAG_15 | SFX_FLAG_11) -/* 0x2826 */ DEFINE_SFX(NA_SE_EV_LINK_WARP, 0x30, 0, 0, 0, SFX_FLAG_15) +/* 0x2824 */ DEFINE_SFX(NA_SE_EV_ELEVATOR_MOVE, 0x30, 0, 0, 0, SFX_PARAM_RAND_FREQ_SCALE) +/* 0x2825 */ DEFINE_SFX(NA_SE_EV_WARP_HOLE, 0x30, 0, 0, 0, SFX_FLAG_FREQ_NO_DIST | SFX_PARAM_RAND_FREQ_SCALE) +/* 0x2826 */ DEFINE_SFX(NA_SE_EV_LINK_WARP, 0x30, 0, 0, 0, SFX_FLAG_FREQ_NO_DIST) /* 0x2827 */ DEFINE_SFX(NA_SE_EV_PILLAR_SINK, 0x30, 2, 0, 0, 0) /* 0x2828 */ DEFINE_SFX(NA_SE_EV_WATER_WALL, 0x30, 0, 0, 0, 0) /* 0x2829 */ DEFINE_SFX(NA_SE_EV_RIVER_STREAM_S, 0x30, 0, 0, 0, 0) /* 0x282A */ DEFINE_SFX(NA_SE_EV_RIVER_STREAM_F, 0x30, 0, 0, 0, 0) /* 0x282B */ DEFINE_SFX(NA_SE_EV_KID_HORSE_LAND2, 0x60, 0, 0, 0, 0) -/* 0x282C */ DEFINE_SFX(NA_SE_EV_KID_HORSE_SANDDUST, 0x60, 0, 0, 0, SFX_FLAG_10) +/* 0x282C */ DEFINE_SFX(NA_SE_EV_KID_HORSE_SANDDUST, 0x60, 0, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) /* 0x282D */ DEFINE_SFX(NA_SE_EV_DUMMY_45, 0x30, 0, 0, 0, 0) /* 0x282E */ DEFINE_SFX(NA_SE_EV_LIGHTNING, 0x80, 0, 0, 0, 0) /* 0x282F */ DEFINE_SFX(NA_SE_EV_BOMB_BOUND, 0x30, 0, 2, 0, 0) @@ -63,9 +63,9 @@ /* 0x2831 */ DEFINE_SFX(NA_SE_EV_TORCH, 0x10, 0, 0, 0, 0) /* 0x2832 */ DEFINE_SFX(NA_SE_EV_MAGMA_LEVEL_M, 0xA0, 3, 0, 0, 0) /* 0x2833 */ DEFINE_SFX(NA_SE_EV_FIRE_PILLAR, 0x30, 0, 0, 0, SFX_FLAG_8) -/* 0x2834 */ DEFINE_SFX(NA_SE_EV_FIRE_PLATE, 0x30, 0, 0, 0, SFX_FLAG_4) +/* 0x2834 */ DEFINE_SFX(NA_SE_EV_FIRE_PLATE, 0x30, 0, 0, 0, SFX_FLAG_PRIORITY_NO_DIST) /* 0x2835 */ DEFINE_SFX(NA_SE_EV_BLOCK_BOUND, 0x30, 3, 0, 0, 0) -/* 0x2836 */ DEFINE_SFX(NA_SE_EV_METALDOOR_SLIDE, 0x60, 3, 0, SFX_FLAG2_6, 0) +/* 0x2836 */ DEFINE_SFX(NA_SE_EV_METALDOOR_SLIDE, 0x60, 3, 0, SFX_FLAG2_UNUSED6, 0) /* 0x2837 */ DEFINE_SFX(NA_SE_EV_METALDOOR_STOP, 0x30, 0, 0, 0, 0) /* 0x2838 */ DEFINE_SFX(NA_SE_EV_BLOCK_SHAKE, 0x30, 0, 0, 0, 0) /* 0x2839 */ DEFINE_SFX(NA_SE_EV_BOX_BREAK, 0x30, 2, 0, 0, 0) @@ -75,16 +75,16 @@ /* 0x283D */ DEFINE_SFX(NA_SE_EV_WATERDROP_GRD, 0x30, 0, 0, 0, 0) /* 0x283E */ DEFINE_SFX(NA_SE_EV_EXPLSION_LONG, 0x30, 3, 0, 0, 0) /* 0x283F */ DEFINE_SFX(NA_SE_EV_WATER_WALL_BIG_SILENT, 0x70, 0, 0, 0, 0) -/* 0x2840 */ DEFINE_SFX(NA_SE_EV_DESERT_WARPHOLE, 0x60, 0, 0, 0, SFX_FLAG_15) -/* 0x2841 */ DEFINE_SFX(NA_SE_EV_FOUNTAIN, 0x30, 0, 0, 0, SFX_FLAG_15) +/* 0x2840 */ DEFINE_SFX(NA_SE_EV_DESERT_WARPHOLE, 0x60, 0, 0, 0, SFX_FLAG_FREQ_NO_DIST) +/* 0x2841 */ DEFINE_SFX(NA_SE_EV_FOUNTAIN, 0x30, 0, 0, 0, SFX_FLAG_FREQ_NO_DIST) /* 0x2842 */ DEFINE_SFX(NA_SE_EV_KID_HORSE_WALK, 0x60, 0, 0, 0, 0) /* 0x2843 */ DEFINE_SFX(NA_SE_EV_KID_HORSE_RUN, 0x60, 0, 0, 0, 0) /* 0x2844 */ DEFINE_SFX(NA_SE_EV_KID_HORSE_NEIGH, 0x60, 0, 0, 0, 0) /* 0x2845 */ DEFINE_SFX(NA_SE_EV_KID_HORSE_GROAN, 0x60, 0, 0, 0, 0) -/* 0x2846 */ DEFINE_SFX(NA_SE_EV_S_STONE_FLASH, 0x30, 3, 0, 0, SFX_FLAG_13) +/* 0x2846 */ DEFINE_SFX(NA_SE_EV_S_STONE_FLASH, 0x30, 3, 0, 0, SFX_FLAG_VOLUME_NO_DIST) /* 0x2847 */ DEFINE_SFX(NA_SE_EV_LIGHT_GATHER, 0x30, 0, 0, 0, 0) /* 0x2848 */ DEFINE_SFX(NA_SE_EV_TREE_CUT, 0x30, 0, 0, 0, 0) -/* 0x2849 */ DEFINE_SFX(NA_SE_EV_VOLCANO, 0x30, 0, 0, 0, SFX_FLAG_13 | SFX_FLAG_4) +/* 0x2849 */ DEFINE_SFX(NA_SE_EV_VOLCANO, 0x30, 0, 0, 0, SFX_FLAG_VOLUME_NO_DIST | SFX_FLAG_PRIORITY_NO_DIST) /* 0x284A */ DEFINE_SFX(NA_SE_EV_POSTMAN_WALK, 0x30, 0, 1, 0, 0) /* 0x284B */ DEFINE_SFX(NA_SE_EV_POSTMACHINE_HIT_OPEN, 0x60, 0, 0, 0, 0) /* 0x284C */ DEFINE_SFX(NA_SE_EV_POSTMACHINE_OPEN, 0x60, 3, 0, 0, 0) @@ -104,7 +104,7 @@ /* 0x285A */ DEFINE_SFX(NA_SE_EV_METALDOOR_CLOSE, 0x90, 3, 0, 0, 0) /* 0x285B */ DEFINE_SFX(NA_SE_EV_BURN_OUT, 0x30, 0, 0, 0, 0) /* 0x285C */ DEFINE_SFX(NA_SE_EV_BLOCKSINK, 0x30, 2, 0, 0, 0) -/* 0x285D */ DEFINE_SFX(NA_SE_EV_CROWD, 0x30, 0, 0, 0, SFX_FLAG_13 | SFX_FLAG_12 | SFX_FLAG_11) +/* 0x285D */ DEFINE_SFX(NA_SE_EV_CROWD, 0x30, 0, 0, 0, SFX_FLAG_VOLUME_NO_DIST | SFX_FLAG_REVERB_NO_DIST | SFX_PARAM_RAND_FREQ_SCALE) /* 0x285E */ DEFINE_SFX(NA_SE_EV_WATER_LEVEL_DOWN, 0x30, 0, 0, 0, 0) /* 0x285F */ DEFINE_SFX(NA_SE_EV_NAVY_VANISH, 0x30, 0, 0, 0, 0) /* 0x2860 */ DEFINE_SFX(NA_SE_EV_STONE_SWITCH_OFF, 0x30, 3, 0, 0, 0) @@ -120,7 +120,7 @@ /* 0x286A */ DEFINE_SFX(NA_SE_EV_KAKASHI_SWING, 0x30, 0, 0, 0, 0) /* 0x286B */ DEFINE_SFX(NA_SE_EV_KAKASHI_ROLL, 0x30, 0, 0, 0, 0) /* 0x286C */ DEFINE_SFX(NA_SE_EV_BOTTLE_CAP_OPEN, 0x30, 3, 0, 0, 0) -/* 0x286D */ DEFINE_SFX(NA_SE_EV_G_STONE_CRUSH, 0x30, 3, 0, 0, SFX_FLAG_11) +/* 0x286D */ DEFINE_SFX(NA_SE_EV_G_STONE_CRUSH, 0x30, 3, 0, 0, SFX_PARAM_RAND_FREQ_SCALE) /* 0x286E */ DEFINE_SFX(NA_SE_EV_KAKASH_LONGI_ROLL, 0x30, 0, 0, 0, 0) /* 0x286F */ DEFINE_SFX(NA_SE_EV_SUN_MARK_FLASH, 0x30, 3, 0, 0, 0) /* 0x2870 */ DEFINE_SFX(NA_SE_EV_FALL_DOWN_DIRT, 0x30, 0, 0, 0, 0) @@ -131,7 +131,7 @@ /* 0x2875 */ DEFINE_SFX(NA_SE_EV_DROP_FALL, 0x30, 0, 0, 0, 0) /* 0x2876 */ DEFINE_SFX(NA_SE_EV_WOOD_GEAR, 0x30, 2, 0, 0, 0) /* 0x2877 */ DEFINE_SFX(NA_SE_EV_TREE_SWING, 0x60, 0, 0, 0, 0) -/* 0x2878 */ DEFINE_SFX(NA_SE_EV_AUTO_DOOR_CLOSE, 0x30, 0, 1, 0, SFX_FLAG_10 | SFX_FLAG_9) +/* 0x2878 */ DEFINE_SFX(NA_SE_EV_AUTO_DOOR_CLOSE, 0x30, 0, 1, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX | SFX_FLAG_SURROUND_LOWPASS_FILTER) /* 0x2879 */ DEFINE_SFX(NA_SE_EV_NAVY_FLY_REBIRTH, 0x30, 2, 0, 0, 0) /* 0x287A */ DEFINE_SFX(NA_SE_EV_CHAINLIFT_STOP, 0x30, 2, 0, 0, 0) /* 0x287B */ DEFINE_SFX(NA_SE_EV_TRE_BOX_APPEAR, 0x80, 2, 0, 0, 0) @@ -145,7 +145,7 @@ /* 0x2883 */ DEFINE_SFX(NA_SE_EV_WALL_SLIDE, 0x30, 0, 0, 0, 0) /* 0x2884 */ DEFINE_SFX(NA_SE_EV_TRE_BOX_FLASH, 0x30, 0, 0, 0, 0) /* 0x2885 */ DEFINE_SFX(NA_SE_EV_WINDMILL_LEVEL, 0x60, 4, 0, 0, 0) -/* 0x2886 */ DEFINE_SFX(NA_SE_EV_GOTO_HEAVEN, 0x30, 0, 0, 0, SFX_FLAG_11) +/* 0x2886 */ DEFINE_SFX(NA_SE_EV_GOTO_HEAVEN, 0x30, 0, 0, 0, SFX_PARAM_RAND_FREQ_SCALE) /* 0x2887 */ DEFINE_SFX(NA_SE_EV_POT_BROKEN, 0x30, 0, 1, 0, 0) /* 0x2888 */ DEFINE_SFX(NA_SE_PL_PUT_DOWN_POT, 0x30, 0, 0, 0, 0) /* 0x2889 */ DEFINE_SFX(NA_SE_EV_DIVE_INTO_WATER, 0x60, 0, 0, 0, 0) @@ -157,7 +157,7 @@ /* 0x288F */ DEFINE_SFX(NA_SE_EV_BUYOSTAND_RISING, 0x30, 3, 0, 0, 0) /* 0x2890 */ DEFINE_SFX(NA_SE_EV_BUYOSTAND_FALL, 0x30, 3, 0, 0, 0) /* 0x2891 */ DEFINE_SFX(NA_SE_EV_MILK_POT_BROKEN, 0x80, 0, 0, 0, 0) -/* 0x2892 */ DEFINE_SFX(NA_SE_EV_CHAIR_ROLL, 0x30, 0, 0, 0, SFX_FLAG_13) +/* 0x2892 */ DEFINE_SFX(NA_SE_EV_CHAIR_ROLL, 0x30, 0, 0, 0, SFX_FLAG_VOLUME_NO_DIST) /* 0x2893 */ DEFINE_SFX(NA_SE_EV_STONEDOOR_STOP, 0x30, 3, 0, 0, 0) /* 0x2894 */ DEFINE_SFX(NA_SE_EV_S_STONE_REVIVAL, 0x30, 0, 0, 0, 0) /* 0x2895 */ DEFINE_SFX(NA_SE_EV_WATER_TANK, 0x30, 0, 0, 0, 0) @@ -167,8 +167,8 @@ /* 0x2899 */ DEFINE_SFX(NA_SE_EV_SWEEP, 0x30, 0, 0, 0, 0) /* 0x289A */ DEFINE_SFX(NA_SE_EV_GOD_LIGHTBALL_2, 0x30, 0, 0, 0, 0) /* 0x289B */ DEFINE_SFX(NA_SE_EV_RUN_AROUND, 0x30, 0, 0, 0, 0) -/* 0x289C */ DEFINE_SFX(NA_SE_EV_CONSENTRATION, 0x30, 0, 0, 0, SFX_FLAG_11) -/* 0x289D */ DEFINE_SFX(NA_SE_EV_TIMETRIP_LIGHT, 0x30, 0, 0, 0, SFX_FLAG_11) +/* 0x289C */ DEFINE_SFX(NA_SE_EV_CONSENTRATION, 0x30, 0, 0, 0, SFX_PARAM_RAND_FREQ_SCALE) +/* 0x289D */ DEFINE_SFX(NA_SE_EV_TIMETRIP_LIGHT, 0x30, 0, 0, 0, SFX_PARAM_RAND_FREQ_SCALE) /* 0x289E */ DEFINE_SFX(NA_SE_EV_DOOR_BELL, 0x30, 2, 0, 0, 0) /* 0x289F */ DEFINE_SFX(NA_SE_EV_BOUND_ON_MAGMA, 0x30, 3, 0, 0, 0) /* 0x28A0 */ DEFINE_SFX(NA_SE_EV_HONEYCOMB_FALL, 0x30, 0, 0, 0, 0) @@ -177,7 +177,7 @@ /* 0x28A3 */ DEFINE_SFX(NA_SE_EV_FIRE_PILLAR_S, 0x30, 0, 0, 0, 0) /* 0x28A4 */ DEFINE_SFX(NA_SE_EV_BLOCK_RISING, 0x20, 3, 0, 0, 0) /* 0x28A5 */ DEFINE_SFX(NA_SE_EV_CHINCLE_SPELL_EFFECT, 0x30, 0, 0, 0, 0) -/* 0x28A6 */ DEFINE_SFX(NA_SE_EV_LINK_WARP_IN, 0x30, 0, 0, 0, SFX_FLAG_15) +/* 0x28A6 */ DEFINE_SFX(NA_SE_EV_LINK_WARP_IN, 0x30, 0, 0, 0, SFX_FLAG_FREQ_NO_DIST) /* 0x28A7 */ DEFINE_SFX(NA_SE_EV_LINK_WARP_OUT, 0x30, 0, 0, 0, 0) /* 0x28A8 */ DEFINE_SFX(NA_SE_EV_FIATY_HEAL, 0x30, 0, 0, 0, 0) /* 0x28A9 */ DEFINE_SFX(NA_SE_EV_CHAIN_KEY_UNLOCK_B, 0x30, 0, 0, 0, 0) @@ -189,12 +189,12 @@ /* 0x28AF */ DEFINE_SFX(NA_SE_EV_JABJAB_HICCUP, 0x30, 0, 0, 0, 0) /* 0x28B0 */ DEFINE_SFX(NA_SE_EV_STICK_SWING, 0x30, 0, 0, 0, 0) /* 0x28B1 */ DEFINE_SFX(NA_SE_EV_FROG_JUMP, 0x30, 0, 0, 0, 0) -/* 0x28B2 */ DEFINE_SFX(NA_SE_EV_ICE_FREEZE, 0x30, 3, 0, 0, SFX_FLAG_13) +/* 0x28B2 */ DEFINE_SFX(NA_SE_EV_ICE_FREEZE, 0x30, 3, 0, 0, SFX_FLAG_VOLUME_NO_DIST) /* 0x28B3 */ DEFINE_SFX(NA_SE_EV_BURNING, 0x20, 0, 0, 0, 0) /* 0x28B4 */ DEFINE_SFX(NA_SE_EV_WOODPLATE_BOUND, 0x30, 0, 3, 0, 0) -/* 0x28B5 */ DEFINE_SFX(NA_SE_EV_MOON_CRY, 0x30, 0, 0, 0, SFX_FLAG_13) +/* 0x28B5 */ DEFINE_SFX(NA_SE_EV_MOON_CRY, 0x30, 0, 0, 0, SFX_FLAG_VOLUME_NO_DIST) /* 0x28B6 */ DEFINE_SFX(NA_SE_EV_JABJAB_GROAN, 0x30, 0, 0, 0, 0) -/* 0x28B7 */ DEFINE_SFX(NA_SE_EV_WAVE_S, 0x30, 2, 0, 0, SFX_FLAG_10) +/* 0x28B7 */ DEFINE_SFX(NA_SE_EV_WAVE_S, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) /* 0x28B8 */ DEFINE_SFX(NA_SE_EV_BIGBALL_ROLL, 0x30, 0, 0, 0, 0) /* 0x28B9 */ DEFINE_SFX(NA_SE_EV_ELEVATOR_MOVE3, 0x30, 0, 0, 0, 0) /* 0x28BA */ DEFINE_SFX(NA_SE_EV_DIAMOND_SWITCH, 0x30, 2, 0, 0, 0) @@ -220,20 +220,20 @@ /* 0x28CE */ DEFINE_SFX(NA_SE_EV_GROUND_GATE_OPEN, 0x30, 3, 0, 0, 0) /* 0x28CF */ DEFINE_SFX(NA_SE_EV_FACE_BREAKDOWN, 0x30, 3, 0, 0, 0) /* 0x28D0 */ DEFINE_SFX(NA_SE_EV_TOILET_HAND_APPEAR, 0x30, 0, 0, 0, 0) -/* 0x28D1 */ DEFINE_SFX(NA_SE_EV_TOILET_HAND_VANISH, 0x30, 3, 2, 0, SFX_FLAG_14) +/* 0x28D1 */ DEFINE_SFX(NA_SE_EV_TOILET_HAND_VANISH, 0x30, 3, 2, 0, SFX_PARAM_RAND_FREQ_LOWER) /* 0x28D2 */ DEFINE_SFX(NA_SE_EV_ROUND_TRAP_MOVE, 0x30, 0, 0, 0, 0) /* 0x28D3 */ DEFINE_SFX(NA_SE_EV_HIT_SOUND, 0x30, 0, 0, 0, 0) /* 0x28D4 */ DEFINE_SFX(NA_SE_EV_ICE_SWING, 0x30, 0, 0, 0, 0) /* 0x28D5 */ DEFINE_SFX(NA_SE_EV_DOWN_TO_GROUND, 0x30, 0, 0, 0, 0) /* 0x28D6 */ DEFINE_SFX(NA_SE_EV_BIG_TORTOISE_SWIM, 0x60, 3, 2, 0, 0) -/* 0x28D7 */ DEFINE_SFX(NA_SE_EV_TORTOISE_WAKE_UP, 0x80, 0, 0, 0, SFX_FLAG_13) +/* 0x28D7 */ DEFINE_SFX(NA_SE_EV_TORTOISE_WAKE_UP, 0x80, 0, 0, 0, SFX_FLAG_VOLUME_NO_DIST) /* 0x28D8 */ DEFINE_SFX(NA_SE_EV_SMALL_DOG_BARK, 0x50, 0, 0, 0, 0) /* 0x28D9 */ DEFINE_SFX(NA_SE_EV_RUPY_FALL, 0x60, 0, 0, 0, 0) /* 0x28DA */ DEFINE_SFX(NA_SE_EV_RAIN, 0x90, 0, 0, 0, 0) /* 0x28DB */ DEFINE_SFX(NA_SE_EV_IRON_DOOR_OPEN, 0x30, 0, 0, 0, 0) /* 0x28DC */ DEFINE_SFX(NA_SE_EV_IRON_DOOR_CLOSE, 0x30, 0, 0, 0, 0) /* 0x28DD */ DEFINE_SFX(NA_SE_EV_WHIRLPOOL, 0x30, 0, 0, 0, 0) -/* 0x28DE */ DEFINE_SFX(NA_SE_EV_BIG_TORTOISE_ROLL, 0x60, 0, 0, 0, SFX_FLAG_13) +/* 0x28DE */ DEFINE_SFX(NA_SE_EV_BIG_TORTOISE_ROLL, 0x60, 0, 0, 0, SFX_FLAG_VOLUME_NO_DIST) /* 0x28DF */ DEFINE_SFX(NA_SE_EV_COW_CRY, 0x30, 0, 0, 0, 0) /* 0x28E0 */ DEFINE_SFX(NA_SE_EV_METAL_BOX_BOUND, 0x30, 0, 0, 0, 0) /* 0x28E1 */ DEFINE_SFX(NA_SE_EV_ELECTRIC_EXPLOSION, 0x30, 3, 0, 0, 0) @@ -243,7 +243,7 @@ /* 0x28E5 */ DEFINE_SFX(NA_SE_EV_COW_CRY_LV, 0x30, 0, 0, 0, 0) /* 0x28E6 */ DEFINE_SFX(NA_SE_EV_RONRON_DOOR_CLOSE, 0x30, 0, 0, 0, 0) /* 0x28E7 */ DEFINE_SFX(NA_SE_EV_BUTTERFRY_TO_FAIRY, 0x30, 0, 0, 0, 0) -/* 0x28E8 */ DEFINE_SFX(NA_SE_EV_FIVE_COUNT_LUPY, 0xA0, 0, 0, 0, SFX_FLAG_11) +/* 0x28E8 */ DEFINE_SFX(NA_SE_EV_FIVE_COUNT_LUPY, 0xA0, 0, 0, 0, SFX_PARAM_RAND_FREQ_SCALE) /* 0x28E9 */ DEFINE_SFX(NA_SE_EV_STONE_GROW_UP, 0x30, 0, 0, 0, 0) /* 0x28EA */ DEFINE_SFX(NA_SE_EV_STONE_LAUNCH, 0x30, 0, 0, 0, 0) /* 0x28EB */ DEFINE_SFX(NA_SE_EV_STONE_ROLLING, 0x30, 0, 0, 0, 0) @@ -253,7 +253,7 @@ /* 0x28EF */ DEFINE_SFX(NA_SE_EV_MONKEY_WALK, 0x20, 0, 0, 0, 0) /* 0x28F0 */ DEFINE_SFX(NA_SE_EV_KNIGHT_WALK, 0x30, 0, 0, 0, 0) /* 0x28F1 */ DEFINE_SFX(NA_SE_EV_PILLAR_MOVE_STOP, 0x30, 0, 1, 0, 0) -/* 0x28F2 */ DEFINE_SFX(NA_SE_EV_WAVE, 0x30, 2, 0, 0, SFX_FLAG_10) +/* 0x28F2 */ DEFINE_SFX(NA_SE_EV_WAVE, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) /* 0x28F3 */ DEFINE_SFX(NA_SE_EV_BIGBELL, 0x30, 2, 0, 0, 0) /* 0x28F4 */ DEFINE_SFX(NA_SE_EV_NUTS_BROKEN, 0x30, 0, 0, 0, 0) /* 0x28F5 */ DEFINE_SFX(NA_SE_EV_SNOWBALL_BROKEN, 0x30, 2, 0, 0, 0) @@ -277,7 +277,7 @@ /* 0x2907 */ DEFINE_SFX(NA_SE_EV_BIGBALL_ROLL_SR_3, 0x30, 0, 0, 0, 0) /* 0x2908 */ DEFINE_SFX(NA_SE_EV_BEAVER_SWIM_MOTOR, 0x68, 2, 0, 0, 0) /* 0x2909 */ DEFINE_SFX(NA_SE_EV_BEAVER_SWIM_HAND, 0x30, 2, 0, 0, 0) -/* 0x290A */ DEFINE_SFX(NA_SE_EV_SMALL_DOG_CRY, 0x30, 0, 1, 0, SFX_FLAG_14) +/* 0x290A */ DEFINE_SFX(NA_SE_EV_SMALL_DOG_CRY, 0x30, 0, 1, 0, SFX_PARAM_RAND_FREQ_LOWER) /* 0x290B */ DEFINE_SFX(NA_SE_EV_SMALL_DOG_GROAN, 0x30, 0, 0, 0, 0) /* 0x290C */ DEFINE_SFX(NA_SE_EV_SMALL_DOG_ATK_BARK, 0x30, 0, 0, 0, 0) /* 0x290D */ DEFINE_SFX(NA_SE_EV_ICE_PILLAR_RISING, 0x30, 2, 0, 0, 0) @@ -290,7 +290,7 @@ /* 0x2914 */ DEFINE_SFX(NA_SE_EV_PANIC_IN_HOUSE, 0x80, 0, 0, 0, 0) /* 0x2915 */ DEFINE_SFX(NA_SE_EV_CLOCK_TOWER_BELL, 0x30, 0, 0, 0, 0) /* 0x2916 */ DEFINE_SFX(NA_SE_EV_CLOCK_TOWER_SECOND_HAND, 0x30, 2, 0, 0, 0) -/* 0x2917 */ DEFINE_SFX(NA_SE_EV_SIGNAL_BIGBELL, 0xA0, 3, 0, 0, SFX_FLAG_15 | SFX_FLAG_13) +/* 0x2917 */ DEFINE_SFX(NA_SE_EV_SIGNAL_BIGBELL, 0xA0, 3, 0, 0, SFX_FLAG_FREQ_NO_DIST | SFX_FLAG_VOLUME_NO_DIST) /* 0x2918 */ DEFINE_SFX(NA_SE_EV_DUMMY_280, 0x30, 0, 0, 0, 0) /* 0x2919 */ DEFINE_SFX(NA_SE_EV_BEAVER_VOICE_0, 0x30, 0, 0, 0, 0) /* 0x291A */ DEFINE_SFX(NA_SE_EV_BEAVER_VOICE_1, 0x30, 0, 0, 0, 0) @@ -301,12 +301,12 @@ /* 0x291F */ DEFINE_SFX(NA_SE_EV_SECRET_CHEER, 0x30, 0, 0, 0, 0) /* 0x2920 */ DEFINE_SFX(NA_SE_EV_BOTTLE_WATERING, 0x30, 0, 0, 0, 0) /* 0x2921 */ DEFINE_SFX(NA_SE_EV_MONKEY_VO_SADNESS, 0x30, 0, 0, 0, 0) -/* 0x2922 */ DEFINE_SFX(NA_SE_EV_SNOWSTORM_HARD, 0x60, 0, 0, 0, SFX_FLAG_13) +/* 0x2922 */ DEFINE_SFX(NA_SE_EV_SNOWSTORM_HARD, 0x60, 0, 0, 0, SFX_FLAG_VOLUME_NO_DIST) /* 0x2923 */ DEFINE_SFX(NA_SE_EV_UNSKILLFUL_OCARINA, 0x30, 0, 0, 0, 0) /* 0x2924 */ DEFINE_SFX(NA_SE_EV_BLACK_FAIRY_DASH, 0x30, 0, 1, 0, 0) /* 0x2925 */ DEFINE_SFX(NA_SE_EV_FAIRY_SURPRISE, 0x30, 0, 0, 0, 0) /* 0x2926 */ DEFINE_SFX(NA_SE_EV_MONDO_SURPRISE, 0x30, 0, 0, 0, 0) -/* 0x2927 */ DEFINE_SFX(NA_SE_EV_SPOT_LIGHT_OPEN, 0x30, 0, 0, 0, SFX_FLAG_13) +/* 0x2927 */ DEFINE_SFX(NA_SE_EV_SPOT_LIGHT_OPEN, 0x30, 0, 0, 0, SFX_FLAG_VOLUME_NO_DIST) /* 0x2928 */ DEFINE_SFX(NA_SE_EV_HOUSE_BROKEN, 0x30, 2, 0, 0, 0) /* 0x2929 */ DEFINE_SFX(NA_SE_EV_MOON_FALL, 0x30, 3, 0, 0, 0) /* 0x292A */ DEFINE_SFX(NA_SE_EV_OCARINA_BOUND_0, 0x30, 0, 0, 0, 0) @@ -326,7 +326,7 @@ /* 0x2938 */ DEFINE_SFX(NA_SE_EV_CHIBI_FAIRY_HEAL_ORG, 0x80, 0, 0, 0, 0) /* 0x2939 */ DEFINE_SFX(NA_SE_EV_BOMBERS_CLIMB, 0x30, 0, 0, 0, 0) /* 0x293A */ DEFINE_SFX(NA_SE_EV_WOODPLATE_BROKEN, 0x30, 3, 1, 0, 0) -/* 0x293B */ DEFINE_SFX(NA_SE_EV_WATER_LEVEL_DOWN_FIX, 0x30, 0, 0, 0, SFX_FLAG_13) +/* 0x293B */ DEFINE_SFX(NA_SE_EV_WATER_LEVEL_DOWN_FIX, 0x30, 0, 0, 0, SFX_FLAG_VOLUME_NO_DIST) /* 0x293C */ DEFINE_SFX(NA_SE_EV_HONEYCOMB_BROKEN, 0x30, 0, 0, 0, 0) /* 0x293D */ DEFINE_SFX(NA_SE_EV_CLOCK_TOWER_UP, 0x30, 3, 0, 0, 0) /* 0x293E */ DEFINE_SFX(NA_SE_EV_CLOCK_TOWER_STOP, 0x30, 3, 0, 0, 0) @@ -337,17 +337,17 @@ /* 0x2943 */ DEFINE_SFX(NA_SE_EV_STONEDOOR_OPEN_S, 0x30, 0, 0, 0, 0) /* 0x2944 */ DEFINE_SFX(NA_SE_EV_ICE_MELT_LEVEL, 0x30, 0, 0, 0, 0) /* 0x2945 */ DEFINE_SFX(NA_SE_EV_CLOCK_TOWER_STAIR_MOVE, 0x30, 3, 0, 0, 0) -/* 0x2946 */ DEFINE_SFX(NA_SE_EV_DUMMY_326, 0xA0, 0, 0, 0, SFX_FLAG_14) +/* 0x2946 */ DEFINE_SFX(NA_SE_EV_DUMMY_326, 0xA0, 0, 0, 0, SFX_PARAM_RAND_FREQ_LOWER) /* 0x2947 */ DEFINE_SFX(NA_SE_EV_OBJECT_STICK, 0x30, 3, 1, 0, 0) /* 0x2948 */ DEFINE_SFX(NA_SE_EV_CHICK_TO_CHICKEN, 0x30, 0, 1, 0, 0) /* 0x2949 */ DEFINE_SFX(NA_SE_EV_MUJURA_BALLOON_BROKEN, 0x60, 2, 0, 0, 0) /* 0x294A */ DEFINE_SFX(NA_SE_EV_BALLOON_SWELL, 0x30, 0, 0, 0, 0) /* 0x294B */ DEFINE_SFX(NA_SE_EV_SEAHORSE_OUT_BOTTLE, 0x30, 0, 0, 0, 0) -/* 0x294C */ DEFINE_SFX(NA_SE_EV_KYOJIN_VOICE_SUCCESS, 0x30, 0, 2, 0, SFX_FLAG_13) -/* 0x294D */ DEFINE_SFX(NA_SE_EV_KYOJIN_VOICE_FAIL, 0x30, 0, 2, 0, SFX_FLAG_13) -/* 0x294E */ DEFINE_SFX(NA_SE_EV_KYOJIN_WALK, 0x30, 0, 0, 0, SFX_FLAG_13) +/* 0x294C */ DEFINE_SFX(NA_SE_EV_KYOJIN_VOICE_SUCCESS, 0x30, 0, 2, 0, SFX_FLAG_VOLUME_NO_DIST) +/* 0x294D */ DEFINE_SFX(NA_SE_EV_KYOJIN_VOICE_FAIL, 0x30, 0, 2, 0, SFX_FLAG_VOLUME_NO_DIST) +/* 0x294E */ DEFINE_SFX(NA_SE_EV_KYOJIN_WALK, 0x30, 0, 0, 0, SFX_FLAG_VOLUME_NO_DIST) /* 0x294F */ DEFINE_SFX(NA_SE_EV_MOON_FALL_LAST, 0x30, 0, 0, 0, 0) -/* 0x2950 */ DEFINE_SFX(NA_SE_EV_EARTHQUAKE_LAST, 0x30, 0, 0, 0, SFX_FLAG_13) +/* 0x2950 */ DEFINE_SFX(NA_SE_EV_EARTHQUAKE_LAST, 0x30, 0, 0, 0, SFX_FLAG_VOLUME_NO_DIST) /* 0x2951 */ DEFINE_SFX(NA_SE_EV_SEAHORSE_SWIM, 0x30, 0, 0, 0, 0) /* 0x2952 */ DEFINE_SFX(NA_SE_EV_OPEN_AMBRELLA, 0x30, 0, 0, 0, 0) /* 0x2953 */ DEFINE_SFX(NA_SE_EV_BUTLER_FRY, 0x60, 0, 0, 0, 0) @@ -356,20 +356,20 @@ /* 0x2956 */ DEFINE_SFX(NA_SE_EV_DORA_L, 0x30, 2, 0, 0, 0) /* 0x2957 */ DEFINE_SFX(NA_SE_EV_LOG_BOUND, 0x30, 0, 2, 0, 0) /* 0x2958 */ DEFINE_SFX(NA_SE_EV_CART_WHEEL, 0x60, 2, 1, 0, 0) -/* 0x2959 */ DEFINE_SFX(NA_SE_EV_EARTHQUAKE_LAST2, 0x30, 0, 0, 0, SFX_FLAG_13) +/* 0x2959 */ DEFINE_SFX(NA_SE_EV_EARTHQUAKE_LAST2, 0x30, 0, 0, 0, SFX_FLAG_VOLUME_NO_DIST) /* 0x295A */ DEFINE_SFX(NA_SE_EV_DORA_S, 0x30, 0, 0, 0, 0) /* 0x295B */ DEFINE_SFX(NA_SE_EV_ROCK_FALL, 0x30, 0, 0, 0, 0) /* 0x295C */ DEFINE_SFX(NA_SE_EV_FREEZE_S, 0x30, 0, 0, 0, 0) /* 0x295D */ DEFINE_SFX(NA_SE_EV_WOOD_BOUND_S, 0x30, 0, 0, 0, 0) /* 0x295E */ DEFINE_SFX(NA_SE_EV_CLOSE_AMBRELLA, 0x30, 0, 0, 0, 0) /* 0x295F */ DEFINE_SFX(NA_SE_EV_OBJECT_SLIDE, 0x30, 0, 0, 0, 0) -/* 0x2960 */ DEFINE_SFX(NA_SE_EV_ROLL_AND_FALL, 0x30, 0, 0, 0, SFX_FLAG_13) -/* 0x2961 */ DEFINE_SFX(NA_SE_EV_GORON_BOUND_0, 0x30, 0, 0, 0, SFX_FLAG_13) -/* 0x2962 */ DEFINE_SFX(NA_SE_EV_GORON_BOUND_1, 0x30, 0, 0, 0, SFX_FLAG_13) +/* 0x2960 */ DEFINE_SFX(NA_SE_EV_ROLL_AND_FALL, 0x30, 0, 0, 0, SFX_FLAG_VOLUME_NO_DIST) +/* 0x2961 */ DEFINE_SFX(NA_SE_EV_GORON_BOUND_0, 0x30, 0, 0, 0, SFX_FLAG_VOLUME_NO_DIST) +/* 0x2962 */ DEFINE_SFX(NA_SE_EV_GORON_BOUND_1, 0x30, 0, 0, 0, SFX_FLAG_VOLUME_NO_DIST) /* 0x2963 */ DEFINE_SFX(NA_SE_EV_MONKEY_VO_DAMAGE, 0x30, 0, 0, 0, 0) -/* 0x2964 */ DEFINE_SFX(NA_SE_EV_FORT_RISING, 0x30, 0, 0, 0, SFX_FLAG_13) +/* 0x2964 */ DEFINE_SFX(NA_SE_EV_FORT_RISING, 0x30, 0, 0, 0, SFX_FLAG_VOLUME_NO_DIST) /* 0x2965 */ DEFINE_SFX(NA_SE_EV_MONKEY_VO_REWARD, 0x30, 0, 0, 0, 0) -/* 0x2966 */ DEFINE_SFX(NA_SE_EV_WATER_PURIFICATION, 0x30, 0, 0, 0, SFX_FLAG_13) +/* 0x2966 */ DEFINE_SFX(NA_SE_EV_WATER_PURIFICATION, 0x30, 0, 0, 0, SFX_FLAG_VOLUME_NO_DIST) /* 0x2967 */ DEFINE_SFX(NA_SE_EV_OWL_WARP_SWITCH_ON, 0x80, 0, 0, 0, 0) /* 0x2968 */ DEFINE_SFX(NA_SE_EV_BIG_WATER_WHEEL_RR, 0x80, 3, 0, 0, 0) /* 0x2969 */ DEFINE_SFX(NA_SE_EV_BIG_WATER_WHEEL_LR, 0x80, 3, 0, 0, 0) @@ -382,8 +382,8 @@ /* 0x2970 */ DEFINE_SFX(NA_SE_EV_ZORA_WALK, 0x30, 2, 1, 0, 0) /* 0x2971 */ DEFINE_SFX(NA_SE_EV_PIRATE_WALK, 0x30, 2, 1, 0, 0) /* 0x2972 */ DEFINE_SFX(NA_SE_EV_PILLAR_UP_FAST, 0x30, 3, 1, 0, 0) -/* 0x2973 */ DEFINE_SFX(NA_SE_EV_DUMMY_WATER_WHEEL_RR, 0x60, 0, 0, SFX_FLAG2_7, SFX_FLAG_13) -/* 0x2974 */ DEFINE_SFX(NA_SE_EV_DUMMY_WATER_WHEEL_LR, 0x60, 0, 0, SFX_FLAG2_7, SFX_FLAG_13) +/* 0x2973 */ DEFINE_SFX(NA_SE_EV_DUMMY_WATER_WHEEL_RR, 0x60, 0, 0, SFX_FLAG2_APPLY_LOWPASS_FILTER, SFX_FLAG_VOLUME_NO_DIST) +/* 0x2974 */ DEFINE_SFX(NA_SE_EV_DUMMY_WATER_WHEEL_LR, 0x60, 0, 0, SFX_FLAG2_APPLY_LOWPASS_FILTER, SFX_FLAG_VOLUME_NO_DIST) /* 0x2975 */ DEFINE_SFX(NA_SE_EV_MUJURA_FOLLOWERS_FLY, 0x30, 0, 0, 0, 0) /* 0x2976 */ DEFINE_SFX(NA_SE_EV_MAKE_TURRET, 0x30, 0, 0, 0, 0) /* 0x2977 */ DEFINE_SFX(NA_SE_EV_CHANDELIER_ROLL, 0x30, 3, 0, 0, 0) @@ -391,18 +391,18 @@ /* 0x2979 */ DEFINE_SFX(NA_SE_EV_SINK_WOOD_FLOOR, 0x30, 0, 0, 0, 0) /* 0x297A */ DEFINE_SFX(NA_SE_EV_REBOUND_WOOD_FLOOR, 0x30, 0, 0, 0, 0) /* 0x297B */ DEFINE_SFX(NA_SE_EV_UFO_APPEAR, 0x30, 3, 0, 0, 0) -/* 0x297C */ DEFINE_SFX(NA_SE_EV_UFO_DASH, 0x30, 0, 0, 0, SFX_FLAG_13) -/* 0x297D */ DEFINE_SFX(NA_SE_EV_TORNADE, 0x80, 0, 0, 0, SFX_FLAG_13) +/* 0x297C */ DEFINE_SFX(NA_SE_EV_UFO_DASH, 0x30, 0, 0, 0, SFX_FLAG_VOLUME_NO_DIST) +/* 0x297D */ DEFINE_SFX(NA_SE_EV_TORNADE, 0x80, 0, 0, 0, SFX_FLAG_VOLUME_NO_DIST) /* 0x297E */ DEFINE_SFX(NA_SE_EV_MILK_POT_DAMAGE, 0x80, 3, 0, 0, 0) /* 0x297F */ DEFINE_SFX(NA_SE_EV_DUMMY_383, 0x30, 0, 0, 0, 0) -/* 0x2980 */ DEFINE_SFX(NA_SE_EV_KYOJIN_SIGN, 0x30, 0, 0, 0, SFX_FLAG_13) -/* 0x2981 */ DEFINE_SFX(NA_SE_EV_KYOJIN_GRATITUDE0, 0x30, 0, 0, 0, SFX_FLAG_13) -/* 0x2982 */ DEFINE_SFX(NA_SE_EV_KYOJIN_GRATITUDE1, 0x30, 0, 0, 0, SFX_FLAG_13) -/* 0x2983 */ DEFINE_SFX(NA_SE_EV_KYOJIN_GRATITUDE2, 0x30, 0, 0, 0, SFX_FLAG_13) +/* 0x2980 */ DEFINE_SFX(NA_SE_EV_KYOJIN_SIGN, 0x30, 0, 0, 0, SFX_FLAG_VOLUME_NO_DIST) +/* 0x2981 */ DEFINE_SFX(NA_SE_EV_KYOJIN_GRATITUDE0, 0x30, 0, 0, 0, SFX_FLAG_VOLUME_NO_DIST) +/* 0x2982 */ DEFINE_SFX(NA_SE_EV_KYOJIN_GRATITUDE1, 0x30, 0, 0, 0, SFX_FLAG_VOLUME_NO_DIST) +/* 0x2983 */ DEFINE_SFX(NA_SE_EV_KYOJIN_GRATITUDE2, 0x30, 0, 0, 0, SFX_FLAG_VOLUME_NO_DIST) /* 0x2984 */ DEFINE_SFX(NA_SE_EV_IKANA_DOOR_OPEN, 0x30, 0, 0, 0, 0) /* 0x2985 */ DEFINE_SFX(NA_SE_EV_IKANA_DOOR_CLOSE, 0x30, 0, 0, 0, 0) /* 0x2986 */ DEFINE_SFX(NA_SE_EV_MOONSTONE_FALL, 0x80, 3, 0, 0, 0) -/* 0x2987 */ DEFINE_SFX(NA_SE_EV_COMING_FIRE, 0x30, 0, 0, 0, SFX_FLAG_13) +/* 0x2987 */ DEFINE_SFX(NA_SE_EV_COMING_FIRE, 0x30, 0, 0, 0, SFX_FLAG_VOLUME_NO_DIST) /* 0x2988 */ DEFINE_SFX(NA_SE_EV_FAIRY_GROUP_FRY, 0x30, 0, 0, 0, 0) /* 0x2989 */ DEFINE_SFX(NA_SE_EV_FAIRY_GROUP_HEAL, 0x30, 0, 0, 0, 0) /* 0x298A */ DEFINE_SFX(NA_SE_EV_WOOD_DOOR_OPEN_SPEEDY, 0x30, 0, 0, 0, 0) @@ -414,7 +414,7 @@ /* 0x2990 */ DEFINE_SFX(NA_SE_EV_GET_UP_ON_BED, 0x30, 3, 0, 0, 0) /* 0x2991 */ DEFINE_SFX(NA_SE_EV_LIE_DOWN_ON_BED, 0x30, 3, 0, 0, 0) /* 0x2992 */ DEFINE_SFX(NA_SE_EV_BANK_MAN_HAND_HIT, 0x30, 0, 0, 0, 0) -/* 0x2993 */ DEFINE_SFX(NA_SE_EV_HANKO, 0x30, 0, 0, 0, SFX_FLAG_13) +/* 0x2993 */ DEFINE_SFX(NA_SE_EV_HANKO, 0x30, 0, 0, 0, SFX_FLAG_VOLUME_NO_DIST) /* 0x2994 */ DEFINE_SFX(NA_SE_EV_CHICK_SONG, 0x10, 7, 0, 0, 0) /* 0x2995 */ DEFINE_SFX(NA_SE_EV_LAND_SAND, 0x30, 0, 0, 0, 0) /* 0x2996 */ DEFINE_SFX(NA_SE_EV_JUMP_SAND, 0x30, 0, 0, 0, 0) @@ -423,10 +423,10 @@ /* 0x2999 */ DEFINE_SFX(NA_SE_EV_DIVE_INTO_WEED, 0x30, 0, 0, 0, 0) /* 0x299A */ DEFINE_SFX(NA_SE_EV_FAIRY_SHIVER, 0x30, 0, 0, 0, 0) /* 0x299B */ DEFINE_SFX(NA_SE_EV_MASK_RISING, 0x30, 0, 0, 0, 0) -/* 0x299C */ DEFINE_SFX(NA_SE_EV_MOON_EYE_FLASH, 0x30, 0, 0, 0, SFX_FLAG_13) -/* 0x299D */ DEFINE_SFX(NA_SE_EV_SLIP_MOON, 0x30, 0, 0, 0, SFX_FLAG_13) -/* 0x299E */ DEFINE_SFX(NA_SE_EV_FALL_POWER, 0x30, 0, 0, 0, SFX_FLAG_13) -/* 0x299F */ DEFINE_SFX(NA_SE_EV_BELL_DASH_NORMAL, 0x58, 0, 1, 0, SFX_FLAG_5) +/* 0x299C */ DEFINE_SFX(NA_SE_EV_MOON_EYE_FLASH, 0x30, 0, 0, 0, SFX_FLAG_VOLUME_NO_DIST) +/* 0x299D */ DEFINE_SFX(NA_SE_EV_SLIP_MOON, 0x30, 0, 0, 0, SFX_FLAG_VOLUME_NO_DIST) +/* 0x299E */ DEFINE_SFX(NA_SE_EV_FALL_POWER, 0x30, 0, 0, 0, SFX_FLAG_VOLUME_NO_DIST) +/* 0x299F */ DEFINE_SFX(NA_SE_EV_BELL_DASH_NORMAL, 0x58, 0, 1, 0, SFX_FLAG_BLOCK_EQUAL_IMPORTANCE) /* 0x29A0 */ DEFINE_SFX(NA_SE_EV_IKANA_BLOCK_MOVE_X, 0x60, 3, 0, 0, 0) /* 0x29A1 */ DEFINE_SFX(NA_SE_EV_IKANA_BLOCK_MOVE_Z, 0x60, 3, 0, 0, 0) /* 0x29A2 */ DEFINE_SFX(NA_SE_EV_IKANA_BLOCK_MOVE_Y, 0x60, 3, 0, 0, 0) @@ -441,13 +441,13 @@ /* 0x29AB */ DEFINE_SFX(NA_SE_EV_CONVEYOR_SHUTTER_OPEN, 0x60, 0, 0, 0, 0) /* 0x29AC */ DEFINE_SFX(NA_SE_EV_CONVEYOR_SHUTTER_CLOSE, 0x60, 0, 0, 0, 0) /* 0x29AD */ DEFINE_SFX(NA_SE_EV_ROOM_CARTAIN, 0x30, 0, 0, 0, 0) -/* 0x29AE */ DEFINE_SFX(NA_SE_EV_ZORA_KIDS_BORN, 0x30, 0, 0, SFX_FLAG2_7, 0) -/* 0x29AF */ DEFINE_SFX(NA_SE_EV_ZORA_KIDS_SWIM_0, 0x30, 0, 1, SFX_FLAG2_7, 0) -/* 0x29B0 */ DEFINE_SFX(NA_SE_EV_ZORA_KIDS_SWIM_1, 0x30, 0, 1, SFX_FLAG2_7, 0) -/* 0x29B1 */ DEFINE_SFX(NA_SE_EV_MOON_EXPLOSION, 0x60, 0, 0, 0, SFX_FLAG_13) -/* 0x29B2 */ DEFINE_SFX(NA_SE_EV_RAINBOW, 0x70, 0, 0, 0, SFX_FLAG_13) +/* 0x29AE */ DEFINE_SFX(NA_SE_EV_ZORA_KIDS_BORN, 0x30, 0, 0, SFX_FLAG2_APPLY_LOWPASS_FILTER, 0) +/* 0x29AF */ DEFINE_SFX(NA_SE_EV_ZORA_KIDS_SWIM_0, 0x30, 0, 1, SFX_FLAG2_APPLY_LOWPASS_FILTER, 0) +/* 0x29B0 */ DEFINE_SFX(NA_SE_EV_ZORA_KIDS_SWIM_1, 0x30, 0, 1, SFX_FLAG2_APPLY_LOWPASS_FILTER, 0) +/* 0x29B1 */ DEFINE_SFX(NA_SE_EV_MOON_EXPLOSION, 0x60, 0, 0, 0, SFX_FLAG_VOLUME_NO_DIST) +/* 0x29B2 */ DEFINE_SFX(NA_SE_EV_RAINBOW, 0x70, 0, 0, 0, SFX_FLAG_VOLUME_NO_DIST) /* 0x29B3 */ DEFINE_SFX(NA_SE_EV_OMENYA_WALK, 0x30, 0, 2, 0, 0) -/* 0x29B4 */ DEFINE_SFX(NA_SE_EV_KYOJIN_GROAN, 0x30, 0, 0, 0, SFX_FLAG_13) +/* 0x29B4 */ DEFINE_SFX(NA_SE_EV_KYOJIN_GROAN, 0x30, 0, 0, 0, SFX_FLAG_VOLUME_NO_DIST) /* 0x29B5 */ DEFINE_SFX(NA_SE_EV_UFO_FLY, 0x30, 3, 0, 0, 0) /* 0x29B6 */ DEFINE_SFX(NA_SE_EV_GRASS_WALL_BROKEN, 0x30, 0, 0, 0, 0) /* 0x29B7 */ DEFINE_SFX(NA_SE_EV_WARP_HOLE_ENERGY, 0x60, 3, 0, 0, 0) diff --git a/include/tables/sfx/itembank_table.h b/include/tables/sfx/itembank_table.h index baff254f0..f8b25aaa0 100644 --- a/include/tables/sfx/itembank_table.h +++ b/include/tables/sfx/itembank_table.h @@ -11,23 +11,23 @@ * * WARNING: entries must align with the table defined for the item bank in sequence 0 */ -/* 0x1800 */ DEFINE_SFX(NA_SE_IT_SWORD_IMPACT, 0x30, 0, 1, 0, SFX_FLAG_15) +/* 0x1800 */ DEFINE_SFX(NA_SE_IT_SWORD_IMPACT, 0x30, 0, 1, 0, SFX_FLAG_FREQ_NO_DIST) /* 0x1801 */ DEFINE_SFX(NA_SE_IT_SWORD_SWING, 0x30, 0, 1, 0, 0) /* 0x1802 */ DEFINE_SFX(NA_SE_IT_SWORD_PUTAWAY, 0x30, 0, 0, 0, 0) /* 0x1803 */ DEFINE_SFX(NA_SE_IT_SWORD_PICKOUT, 0x30, 0, 0, 0, 0) -/* 0x1804 */ DEFINE_SFX(NA_SE_IT_ARROW_SHOT, 0x40, 0, 1, 0, SFX_FLAG_10) -/* 0x1805 */ DEFINE_SFX(NA_SE_IT_BOOMERANG_THROW, 0x30, 0, 1, 0, SFX_FLAG_10) +/* 0x1804 */ DEFINE_SFX(NA_SE_IT_ARROW_SHOT, 0x40, 0, 1, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x1805 */ DEFINE_SFX(NA_SE_IT_BOOMERANG_THROW, 0x30, 0, 1, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) /* 0x1806 */ DEFINE_SFX(NA_SE_IT_SHIELD_BOUND, 0x60, 3, 2, 0, 0) -/* 0x1807 */ DEFINE_SFX(NA_SE_IT_BOW_DRAW, 0x30, 0, 1, 0, SFX_FLAG_10) +/* 0x1807 */ DEFINE_SFX(NA_SE_IT_BOW_DRAW, 0x30, 0, 1, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) /* 0x1808 */ DEFINE_SFX(NA_SE_IT_SHIELD_REFLECT_SW, 0x80, 3, 1, 0, 0) /* 0x1809 */ DEFINE_SFX(NA_SE_IT_ARROW_STICK_HRAD, 0x30, 0, 0, 0, 0) /* 0x180A */ DEFINE_SFX(NA_SE_IT_HAMMER_HIT, 0x30, 0, 1, 0, 0) -/* 0x180B */ DEFINE_SFX(NA_SE_IT_HOOKSHOT_CHAIN, 0x38, 0, 0, 0, SFX_FLAG_10) -/* 0x180C */ DEFINE_SFX(NA_SE_IT_SHIELD_REFLECT_MG, 0x30, 1, 0, 0, SFX_FLAG_10) +/* 0x180B */ DEFINE_SFX(NA_SE_IT_HOOKSHOT_CHAIN, 0x38, 0, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x180C */ DEFINE_SFX(NA_SE_IT_SHIELD_REFLECT_MG, 0x30, 1, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) /* 0x180D */ DEFINE_SFX(NA_SE_IT_BOMB_IGNIT, 0x50, 0, 0, 0, SFX_FLAG_8) /* 0x180E */ DEFINE_SFX(NA_SE_IT_BOMB_EXPLOSION, 0x90, 2, 0, 0, 0) /* 0x180F */ DEFINE_SFX(NA_SE_IT_BOMB_UNEXPLOSION, 0x50, 2, 0, 0, 0) -/* 0x1810 */ DEFINE_SFX(NA_SE_IT_BOOMERANG_FLY, 0x30, 0, 0, 0, SFX_FLAG_10) +/* 0x1810 */ DEFINE_SFX(NA_SE_IT_BOOMERANG_FLY, 0x30, 0, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) /* 0x1811 */ DEFINE_SFX(NA_SE_IT_SWORD_STRIKE, 0x40, 2, 0, 0, 0) /* 0x1812 */ DEFINE_SFX(NA_SE_IT_HAMMER_SWING, 0x30, 0, 1, 0, 0) /* 0x1813 */ DEFINE_SFX(NA_SE_IT_HOOKSHOT_REFLECT, 0x30, 0, 0, 0, 0) @@ -43,37 +43,37 @@ /* 0x181D */ DEFINE_SFX(NA_SE_IT_WOODSTICK_BROKEN, 0x30, 0, 0, 0, 0) /* 0x181E */ DEFINE_SFX(NA_SE_IT_LASH, 0x30, 0, 2, 0, 0) /* 0x181F */ DEFINE_SFX(NA_SE_IT_SHIELD_SWING, 0x30, 0, 1, 0, 0) -/* 0x1820 */ DEFINE_SFX(NA_SE_IT_SLING_SHOT, 0x30, 0, 0, 0, SFX_FLAG_10) -/* 0x1821 */ DEFINE_SFX(NA_SE_IT_SLING_DRAW, 0x20, 0, 0, 0, SFX_FLAG_10) +/* 0x1820 */ DEFINE_SFX(NA_SE_IT_SLING_SHOT, 0x30, 0, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x1821 */ DEFINE_SFX(NA_SE_IT_SLING_DRAW, 0x20, 0, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) /* 0x1822 */ DEFINE_SFX(NA_SE_IT_SWORD_CHARGE, 0x30, 0, 0, 0, 0) /* 0x1823 */ DEFINE_SFX(NA_SE_IT_ROLLING_CUT, 0x30, 0, 0, 0, 0) /* 0x1824 */ DEFINE_SFX(NA_SE_IT_SWORD_STRIKE_HARD, 0x30, 0, 0, 0, 0) /* 0x1825 */ DEFINE_SFX(NA_SE_IT_SLING_REFLECT, 0x30, 0, 0, 0, 0) /* 0x1826 */ DEFINE_SFX(NA_SE_IT_SHIELD_REMOVE, 0x30, 0, 0, 0, 0) -/* 0x1827 */ DEFINE_SFX(NA_SE_IT_HOOKSHOT_READY, 0x30, 0, 0, 0, SFX_FLAG_10) -/* 0x1828 */ DEFINE_SFX(NA_SE_IT_HOOKSHOT_RECEIVE, 0x30, 0, 0, 0, SFX_FLAG_10) +/* 0x1827 */ DEFINE_SFX(NA_SE_IT_HOOKSHOT_READY, 0x30, 0, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x1828 */ DEFINE_SFX(NA_SE_IT_HOOKSHOT_RECEIVE, 0x30, 0, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) /* 0x1829 */ DEFINE_SFX(NA_SE_IT_HOOKSHOT_STICK_OBJ, 0x60, 3, 1, 0, 0) /* 0x182A */ DEFINE_SFX(NA_SE_IT_SWORD_REFLECT_MG, 0x30, 1, 0, 0, 0) -/* 0x182B */ DEFINE_SFX(NA_SE_IT_DEKU, 0x30, 1, 0, 0, SFX_FLAG_10) +/* 0x182B */ DEFINE_SFX(NA_SE_IT_DEKU, 0x30, 1, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) /* 0x182C */ DEFINE_SFX(NA_SE_IT_WALL_HIT_BUYO, 0x30, 0, 0, 0, 0) /* 0x182D */ DEFINE_SFX(NA_SE_IT_SWORD_PUTAWAY_STN, 0x30, 0, 0, 0, 0) /* 0x182E */ DEFINE_SFX(NA_SE_IT_ROLLING_CUT_LV1, 0xA0, 2, 0, 0, 0) /* 0x182F */ DEFINE_SFX(NA_SE_IT_ROLLING_CUT_LV2, 0xA0, 2, 0, 0, 0) -/* 0x1830 */ DEFINE_SFX(NA_SE_IT_BOW_FLICK, 0x30, 0, 0, 0, SFX_FLAG_10) +/* 0x1830 */ DEFINE_SFX(NA_SE_IT_BOW_FLICK, 0x30, 0, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) /* 0x1831 */ DEFINE_SFX(NA_SE_IT_BOMBCHU_MOVE, 0x30, 0, 0, 0, SFX_FLAG_8) /* 0x1832 */ DEFINE_SFX(NA_SE_IT_SHIELD_CHARGE_LV1, 0x60, 0, 0, 0, 0) /* 0x1833 */ DEFINE_SFX(NA_SE_IT_SHIELD_CHARGE_LV2, 0x60, 0, 0, 0, 0) /* 0x1834 */ DEFINE_SFX(NA_SE_IT_SHIELD_CHARGE_LV3, 0x60, 0, 0, 0, 0) -/* 0x1835 */ DEFINE_SFX(NA_SE_IT_SLING_FLICK, 0x30, 0, 0, 0, SFX_FLAG_10) +/* 0x1835 */ DEFINE_SFX(NA_SE_IT_SLING_FLICK, 0x30, 0, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) /* 0x1836 */ DEFINE_SFX(NA_SE_IT_SWORD_STICK_STN, 0x30, 0, 0, 0, 0) /* 0x1837 */ DEFINE_SFX(NA_SE_IT_REFLECTION_WOOD, 0x60, 1, 2, 0, 0) /* 0x1838 */ DEFINE_SFX(NA_SE_IT_SHIELD_REFLECT_MG2, 0x30, 0, 0, 0, 0) -/* 0x1839 */ DEFINE_SFX(NA_SE_IT_MAGIC_ARROW_SHOT, 0x30, 0, 0, 0, SFX_FLAG_10) -/* 0x183A */ DEFINE_SFX(NA_SE_IT_EXPLOSION_FRAME, 0x60, 3, 0, 0, SFX_FLAG_15) -/* 0x183B */ DEFINE_SFX(NA_SE_IT_EXPLOSION_ICE, 0x60, 3, 0, 0, SFX_FLAG_15) -/* 0x183C */ DEFINE_SFX(NA_SE_IT_EXPLOSION_LIGHT, 0x60, 3, 0, 0, SFX_FLAG_15) -/* 0x183D */ DEFINE_SFX(NA_SE_IT_FISHING_REEL_SLOW, 0x30, 0, 0, 0, SFX_FLAG_14) -/* 0x183E */ DEFINE_SFX(NA_SE_IT_FISHING_REEL_HIGH, 0x30, 0, 0, 0, SFX_FLAG_14) +/* 0x1839 */ DEFINE_SFX(NA_SE_IT_MAGIC_ARROW_SHOT, 0x30, 0, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x183A */ DEFINE_SFX(NA_SE_IT_EXPLOSION_FRAME, 0x60, 3, 0, 0, SFX_FLAG_FREQ_NO_DIST) +/* 0x183B */ DEFINE_SFX(NA_SE_IT_EXPLOSION_ICE, 0x60, 3, 0, 0, SFX_FLAG_FREQ_NO_DIST) +/* 0x183C */ DEFINE_SFX(NA_SE_IT_EXPLOSION_LIGHT, 0x60, 3, 0, 0, SFX_FLAG_FREQ_NO_DIST) +/* 0x183D */ DEFINE_SFX(NA_SE_IT_FISHING_REEL_SLOW, 0x30, 0, 0, 0, SFX_PARAM_RAND_FREQ_LOWER) +/* 0x183E */ DEFINE_SFX(NA_SE_IT_FISHING_REEL_HIGH, 0x30, 0, 0, 0, SFX_PARAM_RAND_FREQ_LOWER) /* 0x183F */ DEFINE_SFX(NA_SE_IT_PULL_FISHING_ROD, 0x30, 0, 1, 0, 0) /* 0x1840 */ DEFINE_SFX(NA_SE_IT_DM_FLYING_GOD_PASS, 0x80, 3, 0, 0, 0) /* 0x1841 */ DEFINE_SFX(NA_SE_IT_DM_FLYING_GOD_DASH, 0x80, 3, 0, 0, 0) @@ -105,12 +105,12 @@ /* 0x185B */ DEFINE_SFX(NA_SE_IT_BIG_BOMB_IGNIT, 0x60, 0, 0, 0, SFX_FLAG_8) /* 0x185C */ DEFINE_SFX(NA_SE_IT_BIG_BOMB_EXPLOSION, 0x70, 0, 0, 0, 0) /* 0x185D */ DEFINE_SFX(NA_SE_IT_REFLECTION_SNOW, 0x60, 0, 0, 0, 0) -/* 0x185E */ DEFINE_SFX(NA_SE_IT_GORON_ROLLING_REFLECTION, 0x30, 3, 2, 0, SFX_FLAG_10) +/* 0x185E */ DEFINE_SFX(NA_SE_IT_GORON_ROLLING_REFLECTION, 0x30, 3, 2, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) /* 0x185F */ DEFINE_SFX(NA_SE_IT_MASK_BOUND_0, 0x30, 0, 1, 0, 0) /* 0x1860 */ DEFINE_SFX(NA_SE_IT_MASK_BOUND_1, 0x30, 0, 1, 0, 0) /* 0x1861 */ DEFINE_SFX(NA_SE_IT_MASK_BOUND_SAND, 0x30, 0, 0, 0, 0) /* 0x1862 */ DEFINE_SFX(NA_SE_IT_REFLECTION_WATER, 0x30, 0, 0, 0, 0) -/* 0x1863 */ DEFINE_SFX(NA_SE_IT_KYOJIN_BEARING, 0x60, 0, 0, 0, SFX_FLAG_13) +/* 0x1863 */ DEFINE_SFX(NA_SE_IT_KYOJIN_BEARING, 0x60, 0, 0, 0, SFX_FLAG_VOLUME_NO_DIST) /* 0x1864 */ DEFINE_SFX(NA_SE_FISHING_REEL_SLOW2, 0x30, 0, 0, 0, 0) /* 0x1865 */ DEFINE_SFX(NA_SE_IT_LURE_LAND1, 0x30, 0, 0, 0, 0) /* 0x1866 */ DEFINE_SFX(NA_SE_IT_ROD_THROW, 0x30, 0, 0, 0, 0) diff --git a/include/tables/sfx/ocarinabank_table.h b/include/tables/sfx/ocarinabank_table.h index 8703703d8..fa83394ab 100644 --- a/include/tables/sfx/ocarinabank_table.h +++ b/include/tables/sfx/ocarinabank_table.h @@ -12,8 +12,8 @@ * WARNING: entries must align with the table defined for the ocarina bank in sequence 0 */ /* 0x5800 */ DEFINE_SFX(NA_SE_OC_OCARINA, 0x30, 0, 0, 0, 0) -/* 0x5801 */ DEFINE_SFX(NA_SE_OC_ABYSS, 0x30, 0, 0, 0, SFX_FLAG_5) -/* 0x5802 */ DEFINE_SFX(NA_SE_OC_DOOR_OPEN, 0x30, 2, 1, 0, SFX_FLAG_10 | SFX_FLAG_9) +/* 0x5801 */ DEFINE_SFX(NA_SE_OC_ABYSS, 0x30, 0, 0, 0, SFX_FLAG_BLOCK_EQUAL_IMPORTANCE) +/* 0x5802 */ DEFINE_SFX(NA_SE_OC_DOOR_OPEN, 0x30, 2, 1, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX | SFX_FLAG_SURROUND_LOWPASS_FILTER) /* 0x5803 */ DEFINE_SFX(NA_SE_OC_SECRET_WARP_IN, 0x30, 0, 0, 0, 0) /* 0x5804 */ DEFINE_SFX(NA_SE_OC_SECRET_WARP_OUT, 0x30, 0, 0, 0, 0) /* 0x5805 */ DEFINE_SFX(NA_SE_OC_SECRET_HOLE_OUT, 0x30, 0, 0, 0, 0) @@ -21,8 +21,8 @@ /* 0x5807 */ DEFINE_SFX(NA_SE_OC_TUNAMI, 0x30, 0, 0, 0, 0) /* 0x5808 */ DEFINE_SFX(NA_SE_OC_TELOP_IMPACT, 0x30, 0, 0, 0, 0) /* 0x5809 */ DEFINE_SFX(NA_SE_OC_WOOD_GATE_OPEN, 0x30, 0, 0, 0, 0) -/* 0x580A */ DEFINE_SFX(NA_SE_OC_FIREWORKS, 0x30, 0, 0, 0, SFX_FLAG_13) -/* 0x580B */ DEFINE_SFX(NA_SE_OC_WHITE_OUT_INTO_KYOJIN, 0x30, 0, 0, 0, SFX_FLAG_13) +/* 0x580A */ DEFINE_SFX(NA_SE_OC_FIREWORKS, 0x30, 0, 0, 0, SFX_FLAG_VOLUME_NO_DIST) +/* 0x580B */ DEFINE_SFX(NA_SE_OC_WHITE_OUT_INTO_KYOJIN, 0x30, 0, 0, 0, SFX_FLAG_VOLUME_NO_DIST) /* 0x580C */ DEFINE_SFX(NA_SE_OC_12, 0x30, 0, 0, 0, 0) /* 0x580D */ DEFINE_SFX(NA_SE_OC_13, 0x30, 0, 0, 0, 0) /* 0x580E */ DEFINE_SFX(NA_SE_OC_14, 0x30, 0, 0, 0, 0) diff --git a/include/tables/sfx/playerbank_table.h b/include/tables/sfx/playerbank_table.h index fce11d475..bcec96a67 100644 --- a/include/tables/sfx/playerbank_table.h +++ b/include/tables/sfx/playerbank_table.h @@ -11,70 +11,70 @@ * * WARNING: entries must align with the table defined for the player bank in sequence 0 */ -/* 0x800 */ DEFINE_SFX(NA_SE_PL_WALK_GROUND, 0x20, 0, 2, 0, SFX_FLAG_10) -/* 0x801 */ DEFINE_SFX(NA_SE_PL_WALK_SAND, 0x20, 0, 2, 0, SFX_FLAG_10) -/* 0x802 */ DEFINE_SFX(NA_SE_PL_WALK_CONCRETE, 0x20, 0, 2, 0, SFX_FLAG_10) -/* 0x803 */ DEFINE_SFX(NA_SE_PL_WALK_DIRT, 0x20, 0, 2, 0, SFX_FLAG_10) -/* 0x804 */ DEFINE_SFX(NA_SE_PL_WALK_WATER0, 0x20, 0, 1, 0, SFX_FLAG_10) -/* 0x805 */ DEFINE_SFX(NA_SE_PL_WALK_WATER1, 0x20, 0, 1, 0, SFX_FLAG_10) -/* 0x806 */ DEFINE_SFX(NA_SE_PL_WALK_WATER2, 0x20, 0, 1, 0, SFX_FLAG_10) -/* 0x807 */ DEFINE_SFX(NA_SE_PL_WALK_MAGMA, 0x20, 0, 1, 0, SFX_FLAG_10) -/* 0x808 */ DEFINE_SFX(NA_SE_PL_WALK_GRASS, 0x20, 0, 2, 0, SFX_FLAG_10) -/* 0x809 */ DEFINE_SFX(NA_SE_PL_WALK_IRON, 0x20, 0, 1, 0, SFX_FLAG_10) -/* 0x80A */ DEFINE_SFX(NA_SE_PL_WALK_LADDER, 0x20, 0, 2, 0, SFX_FLAG_10) -/* 0x80B */ DEFINE_SFX(NA_SE_PL_WALK_GLASS, 0x20, 0, 0, 0, SFX_FLAG_10) -/* 0x80C */ DEFINE_SFX(NA_SE_PL_WALK_METAL1, 0x20, 0, 0, 0, SFX_FLAG_10) -/* 0x80D */ DEFINE_SFX(NA_CODE_DIRT_DEEP, 0x20, 0, 0, 0, SFX_FLAG_10) -/* 0x80E */ DEFINE_SFX(NA_SE_PL_WALK_SNOW, 0x20, 0, 0, 0, SFX_FLAG_10) -/* 0x80F */ DEFINE_SFX(NA_SE_PL_WALK_ICE, 0x20, 0, 0, 0, SFX_FLAG_10) -/* 0x810 */ DEFINE_SFX(NA_SE_PL_JUMP_GROUND, 0x30, 0, 0, 0, SFX_FLAG_10) -/* 0x811 */ DEFINE_SFX(NA_SE_PL_JUMP_SAND, 0x30, 0, 0, 0, SFX_FLAG_10) -/* 0x812 */ DEFINE_SFX(NA_SE_PL_JUMP_CONCRETE, 0x30, 0, 0, 0, SFX_FLAG_10) -/* 0x813 */ DEFINE_SFX(NA_SE_PL_JUMP_DIRT, 0x30, 0, 0, 0, SFX_FLAG_10) -/* 0x814 */ DEFINE_SFX(NA_SE_PL_JUMP_WATER0, 0x30, 0, 0, 0, SFX_FLAG_10) -/* 0x815 */ DEFINE_SFX(NA_SE_PL_JUMP_WATER1, 0x30, 0, 0, 0, SFX_FLAG_10) -/* 0x816 */ DEFINE_SFX(NA_SE_PL_JUMP_WATER2, 0x30, 0, 0, 0, SFX_FLAG_10) -/* 0x817 */ DEFINE_SFX(NA_SE_PL_JUMP_MAGMA, 0x30, 0, 0, 0, SFX_FLAG_10) -/* 0x818 */ DEFINE_SFX(NA_SE_PL_JUMP_GRASS, 0x30, 0, 0, 0, SFX_FLAG_10) -/* 0x819 */ DEFINE_SFX(NA_SE_PL_JUMP_IRON, 0x30, 0, 0, 0, SFX_FLAG_10) -/* 0x81A */ DEFINE_SFX(NA_SE_PL_JUMP_LADDER, 0x30, 0, 0, 0, SFX_FLAG_10) -/* 0x81B */ DEFINE_SFX(NA_SE_PL_JUMP_GLASS, 0x30, 0, 0, 0, SFX_FLAG_10) -/* 0x81C */ DEFINE_SFX(NA_SE_PL_DUMMY_28, 0x30, 0, 0, 0, SFX_FLAG_10) -/* 0x81D */ DEFINE_SFX(NA_SE_PL_JUMP_HEAVYBOOTS, 0x30, 0, 0, 0, SFX_FLAG_10) -/* 0x81E */ DEFINE_SFX(NA_SE_PL_JUMP_SNOW, 0x30, 0, 0, 0, SFX_FLAG_10) -/* 0x81F */ DEFINE_SFX(NA_SE_PL_JUMP_ICE, 0x30, 0, 0, 0, SFX_FLAG_10) -/* 0x820 */ DEFINE_SFX(NA_SE_PL_LAND_GROUND, 0x40, 0, 1, 0, SFX_FLAG_10) -/* 0x821 */ DEFINE_SFX(NA_SE_PL_LAND_SAND, 0x40, 0, 1, 0, SFX_FLAG_10) -/* 0x822 */ DEFINE_SFX(NA_SE_PL_LAND_CONCRETE, 0x40, 0, 1, 0, SFX_FLAG_10) -/* 0x823 */ DEFINE_SFX(NA_SE_PL_LAND_DIRT, 0x40, 0, 1, 0, SFX_FLAG_10) -/* 0x824 */ DEFINE_SFX(NA_SE_PL_LAND_WATER0, 0x40, 0, 1, 0, SFX_FLAG_10) -/* 0x825 */ DEFINE_SFX(NA_SE_PL_LAND_WATER1, 0x40, 0, 1, 0, SFX_FLAG_10) -/* 0x826 */ DEFINE_SFX(NA_SE_PL_LAND_WATER2, 0x40, 0, 1, 0, SFX_FLAG_10) -/* 0x827 */ DEFINE_SFX(NA_SE_PL_LAND_MAGMA, 0x40, 0, 1, 0, SFX_FLAG_10) -/* 0x828 */ DEFINE_SFX(NA_SE_PL_LAND_GRASS, 0x40, 0, 1, 0, SFX_FLAG_10) -/* 0x829 */ DEFINE_SFX(NA_SE_PL_LAND_IRON, 0x40, 0, 1, 0, SFX_FLAG_10) -/* 0x82A */ DEFINE_SFX(NA_SE_PL_LAND_LADDER, 0x40, 0, 1, 0, SFX_FLAG_10) -/* 0x82B */ DEFINE_SFX(NA_SE_PL_LAND_GLASS, 0x40, 0, 1, 0, SFX_FLAG_10) -/* 0x82C */ DEFINE_SFX(NA_SE_PL_DUMMY_44, 0x40, 0, 1, 0, SFX_FLAG_10) -/* 0x82D */ DEFINE_SFX(NA_SE_PL_LAND_HEAVYBOOTS, 0x40, 0, 1, 0, SFX_FLAG_10) -/* 0x82E */ DEFINE_SFX(NA_SE_PL_LAND_SNOW, 0x40, 0, 1, 0, SFX_FLAG_10) -/* 0x82F */ DEFINE_SFX(NA_SE_PL_LAND_ICE, 0x40, 0, 1, 0, SFX_FLAG_10) +/* 0x800 */ DEFINE_SFX(NA_SE_PL_WALK_GROUND, 0x20, 0, 2, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x801 */ DEFINE_SFX(NA_SE_PL_WALK_SAND, 0x20, 0, 2, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x802 */ DEFINE_SFX(NA_SE_PL_WALK_CONCRETE, 0x20, 0, 2, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x803 */ DEFINE_SFX(NA_SE_PL_WALK_DIRT, 0x20, 0, 2, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x804 */ DEFINE_SFX(NA_SE_PL_WALK_WATER0, 0x20, 0, 1, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x805 */ DEFINE_SFX(NA_SE_PL_WALK_WATER1, 0x20, 0, 1, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x806 */ DEFINE_SFX(NA_SE_PL_WALK_WATER2, 0x20, 0, 1, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x807 */ DEFINE_SFX(NA_SE_PL_WALK_MAGMA, 0x20, 0, 1, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x808 */ DEFINE_SFX(NA_SE_PL_WALK_GRASS, 0x20, 0, 2, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x809 */ DEFINE_SFX(NA_SE_PL_WALK_IRON, 0x20, 0, 1, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x80A */ DEFINE_SFX(NA_SE_PL_WALK_LADDER, 0x20, 0, 2, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x80B */ DEFINE_SFX(NA_SE_PL_WALK_GLASS, 0x20, 0, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x80C */ DEFINE_SFX(NA_SE_PL_WALK_METAL1, 0x20, 0, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x80D */ DEFINE_SFX(NA_CODE_DIRT_DEEP, 0x20, 0, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x80E */ DEFINE_SFX(NA_SE_PL_WALK_SNOW, 0x20, 0, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x80F */ DEFINE_SFX(NA_SE_PL_WALK_ICE, 0x20, 0, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x810 */ DEFINE_SFX(NA_SE_PL_JUMP_GROUND, 0x30, 0, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x811 */ DEFINE_SFX(NA_SE_PL_JUMP_SAND, 0x30, 0, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x812 */ DEFINE_SFX(NA_SE_PL_JUMP_CONCRETE, 0x30, 0, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x813 */ DEFINE_SFX(NA_SE_PL_JUMP_DIRT, 0x30, 0, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x814 */ DEFINE_SFX(NA_SE_PL_JUMP_WATER0, 0x30, 0, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x815 */ DEFINE_SFX(NA_SE_PL_JUMP_WATER1, 0x30, 0, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x816 */ DEFINE_SFX(NA_SE_PL_JUMP_WATER2, 0x30, 0, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x817 */ DEFINE_SFX(NA_SE_PL_JUMP_MAGMA, 0x30, 0, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x818 */ DEFINE_SFX(NA_SE_PL_JUMP_GRASS, 0x30, 0, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x819 */ DEFINE_SFX(NA_SE_PL_JUMP_IRON, 0x30, 0, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x81A */ DEFINE_SFX(NA_SE_PL_JUMP_LADDER, 0x30, 0, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x81B */ DEFINE_SFX(NA_SE_PL_JUMP_GLASS, 0x30, 0, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x81C */ DEFINE_SFX(NA_SE_PL_DUMMY_28, 0x30, 0, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x81D */ DEFINE_SFX(NA_SE_PL_JUMP_HEAVYBOOTS, 0x30, 0, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x81E */ DEFINE_SFX(NA_SE_PL_JUMP_SNOW, 0x30, 0, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x81F */ DEFINE_SFX(NA_SE_PL_JUMP_ICE, 0x30, 0, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x820 */ DEFINE_SFX(NA_SE_PL_LAND_GROUND, 0x40, 0, 1, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x821 */ DEFINE_SFX(NA_SE_PL_LAND_SAND, 0x40, 0, 1, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x822 */ DEFINE_SFX(NA_SE_PL_LAND_CONCRETE, 0x40, 0, 1, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x823 */ DEFINE_SFX(NA_SE_PL_LAND_DIRT, 0x40, 0, 1, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x824 */ DEFINE_SFX(NA_SE_PL_LAND_WATER0, 0x40, 0, 1, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x825 */ DEFINE_SFX(NA_SE_PL_LAND_WATER1, 0x40, 0, 1, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x826 */ DEFINE_SFX(NA_SE_PL_LAND_WATER2, 0x40, 0, 1, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x827 */ DEFINE_SFX(NA_SE_PL_LAND_MAGMA, 0x40, 0, 1, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x828 */ DEFINE_SFX(NA_SE_PL_LAND_GRASS, 0x40, 0, 1, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x829 */ DEFINE_SFX(NA_SE_PL_LAND_IRON, 0x40, 0, 1, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x82A */ DEFINE_SFX(NA_SE_PL_LAND_LADDER, 0x40, 0, 1, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x82B */ DEFINE_SFX(NA_SE_PL_LAND_GLASS, 0x40, 0, 1, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x82C */ DEFINE_SFX(NA_SE_PL_DUMMY_44, 0x40, 0, 1, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x82D */ DEFINE_SFX(NA_SE_PL_LAND_HEAVYBOOTS, 0x40, 0, 1, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x82E */ DEFINE_SFX(NA_SE_PL_LAND_SNOW, 0x40, 0, 1, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x82F */ DEFINE_SFX(NA_SE_PL_LAND_ICE, 0x40, 0, 1, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) /* 0x830 */ DEFINE_SFX(NA_SE_PL_SLIPDOWN, 0x30, 0, 2, 0, 0) /* 0x831 */ DEFINE_SFX(NA_SE_PL_CLIMB_CLIFF, 0x30, 0, 0, 0, 0) /* 0x832 */ DEFINE_SFX(NA_SE_PL_SIT_ON_HORSE, 0x30, 0, 0, 0, 0) /* 0x833 */ DEFINE_SFX(NA_SE_PL_GET_OFF_HORSE, 0x30, 0, 0, 0, 0) -/* 0x834 */ DEFINE_SFX(NA_SE_PL_TAKE_OUT_SHIELD, 0x30, 0, 0, 0, SFX_FLAG_10) -/* 0x835 */ DEFINE_SFX(NA_SE_PL_CHANGE_ARMS, 0x30, 0, 0, 0, SFX_FLAG_10) -/* 0x836 */ DEFINE_SFX(NA_SE_PL_CATCH_BOOMERANG, 0x30, 0, 0, 0, SFX_FLAG_10) +/* 0x834 */ DEFINE_SFX(NA_SE_PL_TAKE_OUT_SHIELD, 0x30, 0, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x835 */ DEFINE_SFX(NA_SE_PL_CHANGE_ARMS, 0x30, 0, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x836 */ DEFINE_SFX(NA_SE_PL_CATCH_BOOMERANG, 0x30, 0, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) /* 0x837 */ DEFINE_SFX(NA_SE_PL_DIVE_INTO_WATER, 0x30, 0, 1, 0, 0) /* 0x838 */ DEFINE_SFX(NA_SE_PL_JUMP_OUT_WATER, 0x30, 0, 1, 0, 0) /* 0x839 */ DEFINE_SFX(NA_SE_PL_SWIM, 0x30, 0, 2, 0, 0) -/* 0x83A */ DEFINE_SFX(NA_SE_PL_THROW, 0x30, 0, 0, 0, SFX_FLAG_10) -/* 0x83B */ DEFINE_SFX(NA_SE_PL_BODY_BOUND, 0x30, 0, 0, 0, SFX_FLAG_10) -/* 0x83C */ DEFINE_SFX(NA_SE_PL_ROLL, 0x40, 0, 0, 0, SFX_FLAG_10) -/* 0x83D */ DEFINE_SFX(NA_SE_PL_SKIP, 0x30, 0, 0, 0, SFX_FLAG_10) -/* 0x83E */ DEFINE_SFX(NA_SE_PL_BODY_HIT, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x83F */ DEFINE_SFX(NA_SE_PL_DAMAGE, 0x30, 0, 0, 0, SFX_FLAG_10) +/* 0x83A */ DEFINE_SFX(NA_SE_PL_THROW, 0x30, 0, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x83B */ DEFINE_SFX(NA_SE_PL_BODY_BOUND, 0x30, 0, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x83C */ DEFINE_SFX(NA_SE_PL_ROLL, 0x40, 0, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x83D */ DEFINE_SFX(NA_SE_PL_SKIP, 0x30, 0, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x83E */ DEFINE_SFX(NA_SE_PL_BODY_HIT, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x83F */ DEFINE_SFX(NA_SE_PL_DAMAGE, 0x30, 0, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) /* 0x840 */ DEFINE_SFX(NA_SE_PL_SLIP, 0x30, 0, 1, 0, 0) /* 0x841 */ DEFINE_SFX(NA_SE_PL_SLIP_SAND, 0x30, 0, 1, 0, 0) /* 0x842 */ DEFINE_SFX(NA_SE_PL_SLIP_CONCRETE, 0x30, 0, 1, 0, 0) @@ -107,14 +107,14 @@ /* 0x85D */ DEFINE_SFX(NA_SE_PL_BOUND_HEAVYBOOTS, 0x80, 0, 0, 0, 0) /* 0x85E */ DEFINE_SFX(NA_SE_PL_BOUND_SNOW, 0x80, 0, 0, 0, 0) /* 0x85F */ DEFINE_SFX(NA_SE_PL_BOUND_ICE, 0x80, 0, 0, 0, 0) -/* 0x860 */ DEFINE_SFX(NA_SE_PL_BOW_DRAW, 0x30, 0, 1, 0, SFX_FLAG_10) +/* 0x860 */ DEFINE_SFX(NA_SE_PL_BOW_DRAW, 0x30, 0, 1, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) /* 0x861 */ DEFINE_SFX(NA_SE_PL_MEATL_BOOTS_JUMP, 0x30, 0, 0, 0, 0) /* 0x862 */ DEFINE_SFX(NA_SE_PL_DUMMY_98, 0x30, 0, 0, 0, 0) /* 0x863 */ DEFINE_SFX(NA_SE_PL_FACE_UP, 0x30, 0, 0, 0, 0) /* 0x864 */ DEFINE_SFX(NA_SE_PL_DIVE_BUBBLE, 0x30, 0, 0, 0, 0) /* 0x865 */ DEFINE_SFX(NA_SE_PL_MOVE_BUBBLE, 0x30, 0, 0, 0, 0) -/* 0x866 */ DEFINE_SFX(NA_SE_PL_METALEFFECT_KID, 0x30, 0, 0, 0, SFX_FLAG_10) -/* 0x867 */ DEFINE_SFX(NA_SE_PL_METALEFFECT_ADULT, 0x30, 0, 0, 0, SFX_FLAG_10) +/* 0x866 */ DEFINE_SFX(NA_SE_PL_METALEFFECT_KID, 0x30, 0, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x867 */ DEFINE_SFX(NA_SE_PL_METALEFFECT_ADULT, 0x30, 0, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) /* 0x868 */ DEFINE_SFX(NA_SE_PL_SPARK, 0x30, 0, 0, 0, 0) /* 0x869 */ DEFINE_SFX(NA_SE_PL_PULL_UP_PLANT, 0x30, 0, 0, 0, 0) /* 0x86A */ DEFINE_SFX(NA_SE_PL_PULL_UP_ROCK, 0x30, 0, 0, 0, 0) @@ -134,11 +134,11 @@ /* 0x878 */ DEFINE_SFX(NA_SE_PL_PULL_UP_WOODBOX, 0x30, 0, 0, 0, 0) /* 0x879 */ DEFINE_SFX(NA_SE_PL_MAGIC_FIRE, 0x30, 0, 0, 0, 0) /* 0x87A */ DEFINE_SFX(NA_SE_PL_MAGIC_WIND_NORMAL, 0x30, 0, 0, 0, 0) -/* 0x87B */ DEFINE_SFX(NA_SE_PL_MAGIC_WIND_WARP, 0x30, 0, 0, 0, SFX_FLAG_13) -/* 0x87C */ DEFINE_SFX(NA_SE_PL_MAGIC_SOUL_NORMAL, 0x30, 0, 0, 0, SFX_FLAG_11 | SFX_FLAG_10) -/* 0x87D */ DEFINE_SFX(NA_SE_PL_ARROW_CHARGE_FIRE, 0x30, 0, 0, 0, SFX_FLAG_10) -/* 0x87E */ DEFINE_SFX(NA_SE_PL_ARROW_CHARGE_ICE, 0x30, 0, 0, 0, SFX_FLAG_10) -/* 0x87F */ DEFINE_SFX(NA_SE_PL_ARROW_CHARGE_LIGHT, 0x30, 0, 0, 0, SFX_FLAG_10) +/* 0x87B */ DEFINE_SFX(NA_SE_PL_MAGIC_WIND_WARP, 0x30, 0, 0, 0, SFX_FLAG_VOLUME_NO_DIST) +/* 0x87C */ DEFINE_SFX(NA_SE_PL_MAGIC_SOUL_NORMAL, 0x30, 0, 0, 0, SFX_PARAM_RAND_FREQ_SCALE | SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x87D */ DEFINE_SFX(NA_SE_PL_ARROW_CHARGE_FIRE, 0x30, 0, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x87E */ DEFINE_SFX(NA_SE_PL_ARROW_CHARGE_ICE, 0x30, 0, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x87F */ DEFINE_SFX(NA_SE_PL_ARROW_CHARGE_LIGHT, 0x30, 0, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) /* 0x880 */ DEFINE_SFX(NA_SE_DUMMY_128, 0x20, 0, 2, 0, 0) /* 0x881 */ DEFINE_SFX(NA_SE_DUMMY_129, 0x20, 0, 2, 0, 0) /* 0x882 */ DEFINE_SFX(NA_SE_DUMMY_130, 0x20, 0, 2, 0, 0) @@ -187,24 +187,24 @@ /* 0x8AD */ DEFINE_SFX(NA_SE_DUMMY_173, 0x40, 0, 0, 0, 0) /* 0x8AE */ DEFINE_SFX(NA_SE_DUMMY_174, 0x40, 0, 0, 0, 0) /* 0x8AF */ DEFINE_SFX(NA_SE_DUMMY_175, 0x40, 0, 0, 0, 0) -/* 0x8B0 */ DEFINE_SFX(NA_SE_PL_CRAWL, 0x30, 0, 1, 0, SFX_FLAG_10) -/* 0x8B1 */ DEFINE_SFX(NA_SE_PL_CRAWL_SAND, 0x30, 0, 1, 0, SFX_FLAG_10) -/* 0x8B2 */ DEFINE_SFX(NA_SE_PL_CRAWL_CONCRETE, 0x30, 0, 1, 0, SFX_FLAG_10) -/* 0x8B3 */ DEFINE_SFX(NA_SE_PL_CRAWL_DIRT, 0x30, 0, 1, 0, SFX_FLAG_10) -/* 0x8B4 */ DEFINE_SFX(NA_SE_PL_CRAWL_WATER0, 0x30, 0, 1, 0, SFX_FLAG_10) -/* 0x8B5 */ DEFINE_SFX(NA_SE_DUMMY_181, 0x30, 0, 1, 0, SFX_FLAG_10) -/* 0x8B6 */ DEFINE_SFX(NA_SE_DUMMY_182, 0x30, 0, 1, 0, SFX_FLAG_10) -/* 0x8B7 */ DEFINE_SFX(NA_SE_DUMMY_183, 0x30, 0, 1, 0, SFX_FLAG_10) -/* 0x8B8 */ DEFINE_SFX(NA_SE_DUMMY_184, 0x30, 0, 1, 0, SFX_FLAG_10) -/* 0x8B9 */ DEFINE_SFX(NA_SE_DUMMY_185, 0x30, 0, 1, 0, SFX_FLAG_10) -/* 0x8BA */ DEFINE_SFX(NA_SE_DUMMY_186, 0x30, 0, 1, 0, SFX_FLAG_10) -/* 0x8BB */ DEFINE_SFX(NA_SE_PL_CRAWL_WOOD, 0x30, 0, 1, 0, SFX_FLAG_10) -/* 0x8BC */ DEFINE_SFX(NA_SE_DUMMY_188, 0x30, 0, 1, 0, SFX_FLAG_10) -/* 0x8BD */ DEFINE_SFX(NA_SE_DUMMY_189, 0x30, 0, 1, 0, SFX_FLAG_10) -/* 0x8BE */ DEFINE_SFX(NA_SE_DUMMY_190, 0x30, 0, 1, 0, SFX_FLAG_10) -/* 0x8BF */ DEFINE_SFX(NA_SE_PL_CRAWL_ICE, 0x30, 0, 1, 0, SFX_FLAG_10) -/* 0x8C0 */ DEFINE_SFX(NA_SE_PL_MAGIC_SOUL_FLASH, 0x30, 0, 0, 0, SFX_FLAG_11 | SFX_FLAG_10) -/* 0x8C1 */ DEFINE_SFX(NA_SE_PL_ROLL_DUST, 0x30, 0, 2, 0, SFX_FLAG_14) +/* 0x8B0 */ DEFINE_SFX(NA_SE_PL_CRAWL, 0x30, 0, 1, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x8B1 */ DEFINE_SFX(NA_SE_PL_CRAWL_SAND, 0x30, 0, 1, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x8B2 */ DEFINE_SFX(NA_SE_PL_CRAWL_CONCRETE, 0x30, 0, 1, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x8B3 */ DEFINE_SFX(NA_SE_PL_CRAWL_DIRT, 0x30, 0, 1, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x8B4 */ DEFINE_SFX(NA_SE_PL_CRAWL_WATER0, 0x30, 0, 1, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x8B5 */ DEFINE_SFX(NA_SE_DUMMY_181, 0x30, 0, 1, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x8B6 */ DEFINE_SFX(NA_SE_DUMMY_182, 0x30, 0, 1, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x8B7 */ DEFINE_SFX(NA_SE_DUMMY_183, 0x30, 0, 1, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x8B8 */ DEFINE_SFX(NA_SE_DUMMY_184, 0x30, 0, 1, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x8B9 */ DEFINE_SFX(NA_SE_DUMMY_185, 0x30, 0, 1, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x8BA */ DEFINE_SFX(NA_SE_DUMMY_186, 0x30, 0, 1, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x8BB */ DEFINE_SFX(NA_SE_PL_CRAWL_WOOD, 0x30, 0, 1, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x8BC */ DEFINE_SFX(NA_SE_DUMMY_188, 0x30, 0, 1, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x8BD */ DEFINE_SFX(NA_SE_DUMMY_189, 0x30, 0, 1, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x8BE */ DEFINE_SFX(NA_SE_DUMMY_190, 0x30, 0, 1, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x8BF */ DEFINE_SFX(NA_SE_PL_CRAWL_ICE, 0x30, 0, 1, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x8C0 */ DEFINE_SFX(NA_SE_PL_MAGIC_SOUL_FLASH, 0x30, 0, 0, 0, SFX_PARAM_RAND_FREQ_SCALE | SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x8C1 */ DEFINE_SFX(NA_SE_PL_ROLL_DUST, 0x30, 0, 2, 0, SFX_PARAM_RAND_FREQ_LOWER) /* 0x8C2 */ DEFINE_SFX(NA_SE_DUMMY_194, 0x30, 0, 0, 0, 0) /* 0x8C3 */ DEFINE_SFX(NA_SE_PL_MAGIC_SOUL_BALL, 0x30, 0, 0, 0, 0) /* 0x8C4 */ DEFINE_SFX(NA_SE_PL_SPIRAL_HEAL_BEAM, 0x30, 0, 0, 0, 0) @@ -214,10 +214,10 @@ /* 0x8C8 */ DEFINE_SFX(NA_SE_PL_MAGIC_WIND_VANISH, 0x60, 2, 0, 0, 0) /* 0x8C9 */ DEFINE_SFX(NA_SE_PL_HOBBERBOOTS_LV, 0x30, 0, 0, 0, 0) /* 0x8CA */ DEFINE_SFX(NA_SE_PL_PLANT_MOVE, 0x30, 0, 0, 0, 0) -/* 0x8CB */ DEFINE_SFX(NA_SE_EV_WALL_MOVE_SP, 0x30, 0, 0, 0, SFX_FLAG_11) +/* 0x8CB */ DEFINE_SFX(NA_SE_EV_WALL_MOVE_SP, 0x30, 0, 0, 0, SFX_PARAM_RAND_FREQ_SCALE) /* 0x8CC */ DEFINE_SFX(NA_SE_PL_PLANT_GROW_BIG, 0x30, 0, 0, 0, 0) /* 0x8CD */ DEFINE_SFX(NA_SE_PL_TELESCOPE_MOVEMENT, 0x30, 0, 0, 0, 0) -/* 0x8CE */ DEFINE_SFX(NA_SE_PL_GIANT_WALK, 0x30, 3, 0, 0, SFX_FLAG_10) +/* 0x8CE */ DEFINE_SFX(NA_SE_PL_GIANT_WALK, 0x30, 3, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) /* 0x8CF */ DEFINE_SFX(NA_SE_PL_CHIBI_FAIRY_HEAL, 0x30, 0, 0, 0, 0) /* 0x8D0 */ DEFINE_SFX(NA_SE_PL_SLIP_LEVEL, 0x30, 0, 0, 0, 0) /* 0x8D1 */ DEFINE_SFX(NA_SE_PL_SLIP_SAND_LEVEL, 0x30, 0, 0, 0, 0) @@ -235,7 +235,7 @@ /* 0x8DD */ DEFINE_SFX(NA_SE_PL_SLIP_HEAVYBOOTS_LEVEL, 0x30, 0, 0, 0, 0) /* 0x8DE */ DEFINE_SFX(NA_SE_PL_DUMMY_222, 0x30, 0, 0, 0, 0) /* 0x8DF */ DEFINE_SFX(NA_SE_PL_SLIP_ICE_LEVEL, 0x30, 0, 0, 0, 0) -/* 0x8E0 */ DEFINE_SFX(NA_SE_PL_DEKUNUTS_FIRE, 0x30, 0, 0, 0, SFX_FLAG_10) +/* 0x8E0 */ DEFINE_SFX(NA_SE_PL_DEKUNUTS_FIRE, 0x30, 0, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) /* 0x8E1 */ DEFINE_SFX(NA_SE_PL_GORON_BALLJUMP, 0x60, 0, 1, 0, 0) /* 0x8E2 */ DEFINE_SFX(NA_SE_PL_DEKUNUTS_IN_GRD, 0x40, 0, 0, 0, 0) /* 0x8E3 */ DEFINE_SFX(NA_SE_PL_DEKUNUTS_OUT_GRD, 0x30, 0, 0, 0, 0) @@ -251,227 +251,227 @@ /* 0x8ED */ DEFINE_SFX(NA_SE_PL_ZORA_SWIM_LV, 0x30, 0, 0, 0, 0) /* 0x8EE */ DEFINE_SFX(NA_SE_PL_ZORA_SWIM_ROLL, 0x30, 0, 0, 0, 0) /* 0x8EF */ DEFINE_SFX(NA_SE_PL_GORON_SQUAT, 0x30, 0, 0, 0, 0) -/* 0x8F0 */ DEFINE_SFX(NA_SE_PL_DUMMY_240, 0x20, 0, 2, 0, SFX_FLAG_10) -/* 0x8F1 */ DEFINE_SFX(NA_SE_PL_DUMMY_241, 0x20, 0, 2, 0, SFX_FLAG_10) -/* 0x8F2 */ DEFINE_SFX(NA_SE_PL_DUMMY_242, 0x20, 0, 2, 0, SFX_FLAG_10) -/* 0x8F3 */ DEFINE_SFX(NA_SE_PL_DUMMY_243, 0x20, 0, 2, 0, SFX_FLAG_10) -/* 0x8F4 */ DEFINE_SFX(NA_SE_PL_DUMMY_244, 0x20, 0, 1, 0, SFX_FLAG_10) -/* 0x8F5 */ DEFINE_SFX(NA_SE_PL_DUMMY_245, 0x20, 0, 1, 0, SFX_FLAG_10) -/* 0x8F6 */ DEFINE_SFX(NA_SE_PL_DUMMY_246, 0x20, 0, 1, 0, SFX_FLAG_10) -/* 0x8F7 */ DEFINE_SFX(NA_SE_PL_DUMMY_247, 0x20, 0, 1, 0, SFX_FLAG_10) -/* 0x8F8 */ DEFINE_SFX(NA_SE_PL_DUMMY_248, 0x20, 0, 2, 0, SFX_FLAG_10) -/* 0x8F9 */ DEFINE_SFX(NA_SE_PL_DUMMY_249, 0x20, 0, 1, 0, SFX_FLAG_10) -/* 0x8FA */ DEFINE_SFX(NA_SE_PL_DUMMY_250, 0x20, 0, 2, 0, SFX_FLAG_10) -/* 0x8FB */ DEFINE_SFX(NA_SE_PL_DUMMY_251, 0x20, 0, 0, 0, SFX_FLAG_10) -/* 0x8FC */ DEFINE_SFX(NA_SE_PL_DUMMY_252, 0x20, 0, 0, 0, SFX_FLAG_10) -/* 0x8FD */ DEFINE_SFX(NA_SE_PL_DUMMY_253, 0x20, 0, 0, 0, SFX_FLAG_10) -/* 0x8FE */ DEFINE_SFX(NA_SE_PL_DUMMY_254, 0x20, 0, 0, 0, SFX_FLAG_10) -/* 0x8FF */ DEFINE_SFX(NA_SE_PL_DUMMY_255, 0x20, 0, 0, 0, SFX_FLAG_10) -/* 0x900 */ DEFINE_SFX(NA_SE_PL_DUMMY_256, 0x30, 0, 0, 0, SFX_FLAG_10) -/* 0x901 */ DEFINE_SFX(NA_SE_PL_DUMMY_257, 0x30, 0, 0, 0, SFX_FLAG_10) -/* 0x902 */ DEFINE_SFX(NA_SE_PL_DUMMY_258, 0x30, 0, 0, 0, SFX_FLAG_10) -/* 0x903 */ DEFINE_SFX(NA_SE_PL_DUMMY_259, 0x30, 0, 0, 0, SFX_FLAG_10) -/* 0x904 */ DEFINE_SFX(NA_SE_PL_DUMMY_260, 0x30, 0, 0, 0, SFX_FLAG_10) -/* 0x905 */ DEFINE_SFX(NA_SE_PL_DUMMY_261, 0x30, 0, 0, 0, SFX_FLAG_10) -/* 0x906 */ DEFINE_SFX(NA_SE_PL_DUMMY_262, 0x30, 0, 0, 0, SFX_FLAG_10) -/* 0x907 */ DEFINE_SFX(NA_SE_PL_DUMMY_263, 0x30, 0, 0, 0, SFX_FLAG_10) -/* 0x908 */ DEFINE_SFX(NA_SE_PL_DUMMY_264, 0x30, 0, 0, 0, SFX_FLAG_10) -/* 0x909 */ DEFINE_SFX(NA_SE_PL_DUMMY_265, 0x30, 0, 0, 0, SFX_FLAG_10) -/* 0x90A */ DEFINE_SFX(NA_SE_PL_DUMMY_266, 0x30, 0, 0, 0, SFX_FLAG_10) -/* 0x90B */ DEFINE_SFX(NA_SE_PL_DUMMY_267, 0x30, 0, 0, 0, SFX_FLAG_10) -/* 0x90C */ DEFINE_SFX(NA_SE_PL_DUMMY_268, 0x30, 0, 0, 0, SFX_FLAG_10) -/* 0x90D */ DEFINE_SFX(NA_SE_PL_DUMMY_269, 0x30, 0, 0, 0, SFX_FLAG_10) -/* 0x90E */ DEFINE_SFX(NA_SE_PL_DUMMY_270, 0x30, 0, 0, 0, SFX_FLAG_10) -/* 0x90F */ DEFINE_SFX(NA_SE_PL_DUMMY_271, 0x30, 0, 0, 0, SFX_FLAG_10) -/* 0x910 */ DEFINE_SFX(NA_SE_PL_DUMMY_272, 0x40, 0, 1, 0, SFX_FLAG_10) -/* 0x911 */ DEFINE_SFX(NA_SE_PL_DUMMY_273, 0x40, 0, 1, 0, SFX_FLAG_10) -/* 0x912 */ DEFINE_SFX(NA_SE_PL_DUMMY_274, 0x40, 0, 1, 0, SFX_FLAG_10) -/* 0x913 */ DEFINE_SFX(NA_SE_PL_DUMMY_275, 0x40, 0, 1, 0, SFX_FLAG_10) -/* 0x914 */ DEFINE_SFX(NA_SE_PL_DUMMY_276, 0x40, 0, 1, 0, SFX_FLAG_10) -/* 0x915 */ DEFINE_SFX(NA_SE_PL_DUMMY_277, 0x40, 0, 1, 0, SFX_FLAG_10) -/* 0x916 */ DEFINE_SFX(NA_SE_PL_DUMMY_278, 0x40, 0, 1, 0, SFX_FLAG_10) -/* 0x917 */ DEFINE_SFX(NA_SE_PL_DUMMY_279, 0x40, 0, 1, 0, SFX_FLAG_10) -/* 0x918 */ DEFINE_SFX(NA_SE_PL_DUMMY_280, 0x40, 0, 1, 0, SFX_FLAG_10) -/* 0x919 */ DEFINE_SFX(NA_SE_PL_DUMMY_281, 0x40, 0, 1, 0, SFX_FLAG_10) -/* 0x91A */ DEFINE_SFX(NA_SE_PL_DUMMY_282, 0x40, 0, 1, 0, SFX_FLAG_10) -/* 0x91B */ DEFINE_SFX(NA_SE_PL_DUMMY_283, 0x40, 0, 1, 0, SFX_FLAG_10) -/* 0x91C */ DEFINE_SFX(NA_SE_PL_DUMMY_284, 0x40, 0, 1, 0, SFX_FLAG_10) -/* 0x91D */ DEFINE_SFX(NA_SE_PL_DUMMY_285, 0x40, 0, 1, 0, SFX_FLAG_10) -/* 0x91E */ DEFINE_SFX(NA_SE_PL_DUMMY_286, 0x40, 0, 1, 0, SFX_FLAG_10) -/* 0x91F */ DEFINE_SFX(NA_SE_PL_DUMMY_287, 0x40, 0, 1, 0, SFX_FLAG_10) -/* 0x920 */ DEFINE_SFX(NA_SE_PL_DUMMY_288, 0x20, 0, 2, 0, SFX_FLAG_10) -/* 0x921 */ DEFINE_SFX(NA_SE_PL_DUMMY_289, 0x20, 0, 2, 0, SFX_FLAG_10) -/* 0x922 */ DEFINE_SFX(NA_SE_PL_DUMMY_290, 0x20, 0, 2, 0, SFX_FLAG_10) -/* 0x923 */ DEFINE_SFX(NA_SE_PL_DUMMY_291, 0x20, 0, 2, 0, SFX_FLAG_10) -/* 0x924 */ DEFINE_SFX(NA_SE_PL_DUMMY_292, 0x20, 0, 1, 0, SFX_FLAG_10) -/* 0x925 */ DEFINE_SFX(NA_SE_PL_DUMMY_293, 0x20, 0, 1, 0, SFX_FLAG_10) -/* 0x926 */ DEFINE_SFX(NA_SE_PL_DUMMY_294, 0x20, 0, 1, 0, SFX_FLAG_10) -/* 0x927 */ DEFINE_SFX(NA_SE_PL_DUMMY_295, 0x20, 0, 1, 0, SFX_FLAG_10) -/* 0x928 */ DEFINE_SFX(NA_SE_PL_DUMMY_296, 0x20, 0, 2, 0, SFX_FLAG_10) -/* 0x929 */ DEFINE_SFX(NA_SE_PL_DUMMY_297, 0x20, 0, 1, 0, SFX_FLAG_10) -/* 0x92A */ DEFINE_SFX(NA_SE_PL_DUMMY_298, 0x20, 0, 2, 0, SFX_FLAG_10) -/* 0x92B */ DEFINE_SFX(NA_SE_PL_DUMMY_299, 0x20, 0, 0, 0, SFX_FLAG_10) -/* 0x92C */ DEFINE_SFX(NA_SE_PL_DUMMY_300, 0x20, 0, 0, 0, SFX_FLAG_10) -/* 0x92D */ DEFINE_SFX(NA_SE_PL_DUMMY_301, 0x20, 0, 0, 0, SFX_FLAG_10) -/* 0x92E */ DEFINE_SFX(NA_SE_PL_DUMMY_302, 0x20, 0, 0, 0, SFX_FLAG_10) -/* 0x92F */ DEFINE_SFX(NA_SE_PL_DUMMY_303, 0x20, 0, 0, 0, SFX_FLAG_10) -/* 0x930 */ DEFINE_SFX(NA_SE_PL_DUMMY_304, 0x30, 0, 0, 0, SFX_FLAG_10) -/* 0x931 */ DEFINE_SFX(NA_SE_PL_DUMMY_305, 0x30, 0, 0, 0, SFX_FLAG_10) -/* 0x932 */ DEFINE_SFX(NA_SE_PL_DUMMY_306, 0x30, 0, 0, 0, SFX_FLAG_10) -/* 0x933 */ DEFINE_SFX(NA_SE_PL_DUMMY_307, 0x30, 0, 0, 0, SFX_FLAG_10) -/* 0x934 */ DEFINE_SFX(NA_SE_PL_DUMMY_308, 0x30, 0, 0, 0, SFX_FLAG_10) -/* 0x935 */ DEFINE_SFX(NA_SE_PL_DUMMY_309, 0x30, 0, 0, 0, SFX_FLAG_10) -/* 0x936 */ DEFINE_SFX(NA_SE_PL_DUMMY_310, 0x30, 0, 0, 0, SFX_FLAG_10) -/* 0x937 */ DEFINE_SFX(NA_SE_PL_DUMMY_311, 0x30, 0, 0, 0, SFX_FLAG_10) -/* 0x938 */ DEFINE_SFX(NA_SE_PL_DUMMY_312, 0x30, 0, 0, 0, SFX_FLAG_10) -/* 0x939 */ DEFINE_SFX(NA_SE_PL_DUMMY_313, 0x30, 0, 0, 0, SFX_FLAG_10) -/* 0x93A */ DEFINE_SFX(NA_SE_PL_DUMMY_314, 0x30, 0, 0, 0, SFX_FLAG_10) -/* 0x93B */ DEFINE_SFX(NA_SE_PL_DUMMY_315, 0x30, 0, 0, 0, SFX_FLAG_10) -/* 0x93C */ DEFINE_SFX(NA_SE_PL_DUMMY_316, 0x30, 0, 0, 0, SFX_FLAG_10) -/* 0x93D */ DEFINE_SFX(NA_SE_PL_DUMMY_317, 0x30, 0, 0, 0, SFX_FLAG_10) -/* 0x93E */ DEFINE_SFX(NA_SE_PL_DUMMY_318, 0x30, 0, 0, 0, SFX_FLAG_10) -/* 0x93F */ DEFINE_SFX(NA_SE_PL_DUMMY_319, 0x30, 0, 0, 0, SFX_FLAG_10) -/* 0x940 */ DEFINE_SFX(NA_SE_PL_DUMMY_320, 0x40, 0, 1, 0, SFX_FLAG_10) -/* 0x941 */ DEFINE_SFX(NA_SE_PL_DUMMY_321, 0x40, 0, 1, 0, SFX_FLAG_10) -/* 0x942 */ DEFINE_SFX(NA_SE_PL_DUMMY_322, 0x40, 0, 1, 0, SFX_FLAG_10) -/* 0x943 */ DEFINE_SFX(NA_SE_PL_DUMMY_323, 0x40, 0, 1, 0, SFX_FLAG_10) -/* 0x944 */ DEFINE_SFX(NA_SE_PL_DUMMY_324, 0x40, 0, 1, 0, SFX_FLAG_10) -/* 0x945 */ DEFINE_SFX(NA_SE_PL_DUMMY_325, 0x40, 0, 1, 0, SFX_FLAG_10) -/* 0x946 */ DEFINE_SFX(NA_SE_PL_DUMMY_326, 0x40, 0, 1, 0, SFX_FLAG_10) -/* 0x947 */ DEFINE_SFX(NA_SE_PL_DUMMY_327, 0x40, 0, 1, 0, SFX_FLAG_10) -/* 0x948 */ DEFINE_SFX(NA_SE_PL_DUMMY_328, 0x40, 0, 1, 0, SFX_FLAG_10) -/* 0x949 */ DEFINE_SFX(NA_SE_PL_DUMMY_329, 0x40, 0, 1, 0, SFX_FLAG_10) -/* 0x94A */ DEFINE_SFX(NA_SE_PL_DUMMY_330, 0x40, 0, 1, 0, SFX_FLAG_10) -/* 0x94B */ DEFINE_SFX(NA_SE_PL_DUMMY_331, 0x40, 0, 1, 0, SFX_FLAG_10) -/* 0x94C */ DEFINE_SFX(NA_SE_PL_DUMMY_332, 0x40, 0, 1, 0, SFX_FLAG_10) -/* 0x94D */ DEFINE_SFX(NA_SE_PL_DUMMY_333, 0x40, 0, 1, 0, SFX_FLAG_10) -/* 0x94E */ DEFINE_SFX(NA_SE_PL_DUMMY_334, 0x40, 0, 1, 0, SFX_FLAG_10) -/* 0x94F */ DEFINE_SFX(NA_SE_PL_DUMMY_335, 0x40, 0, 1, 0, SFX_FLAG_10) -/* 0x950 */ DEFINE_SFX(NA_SE_PL_DUMMY_336, 0x20, 0, 2, 0, SFX_FLAG_10) -/* 0x951 */ DEFINE_SFX(NA_SE_PL_DUMMY_337, 0x20, 0, 2, 0, SFX_FLAG_10) -/* 0x952 */ DEFINE_SFX(NA_SE_PL_DUMMY_338, 0x20, 0, 2, 0, SFX_FLAG_10) -/* 0x953 */ DEFINE_SFX(NA_SE_PL_DUMMY_339, 0x20, 0, 2, 0, SFX_FLAG_10) -/* 0x954 */ DEFINE_SFX(NA_SE_PL_DUMMY_340, 0x20, 0, 1, 0, SFX_FLAG_10) -/* 0x955 */ DEFINE_SFX(NA_SE_PL_DUMMY_341, 0x20, 0, 1, 0, SFX_FLAG_10) -/* 0x956 */ DEFINE_SFX(NA_SE_PL_DUMMY_342, 0x20, 0, 1, 0, SFX_FLAG_10) -/* 0x957 */ DEFINE_SFX(NA_SE_PL_DUMMY_343, 0x20, 0, 1, 0, SFX_FLAG_10) -/* 0x958 */ DEFINE_SFX(NA_SE_PL_DUMMY_344, 0x20, 0, 2, 0, SFX_FLAG_10) -/* 0x959 */ DEFINE_SFX(NA_SE_PL_DUMMY_345, 0x20, 0, 1, 0, SFX_FLAG_10) -/* 0x95A */ DEFINE_SFX(NA_SE_PL_DUMMY_346, 0x20, 0, 2, 0, SFX_FLAG_10) -/* 0x95B */ DEFINE_SFX(NA_SE_PL_DUMMY_347, 0x20, 0, 0, 0, SFX_FLAG_10) -/* 0x95C */ DEFINE_SFX(NA_SE_PL_DUMMY_348, 0x20, 0, 0, 0, SFX_FLAG_10) -/* 0x95D */ DEFINE_SFX(NA_SE_PL_DUMMY_349, 0x20, 0, 0, 0, SFX_FLAG_10) -/* 0x95E */ DEFINE_SFX(NA_SE_PL_DUMMY_350, 0x20, 0, 0, 0, SFX_FLAG_10) -/* 0x95F */ DEFINE_SFX(NA_SE_PL_DUMMY_351, 0x20, 0, 0, 0, SFX_FLAG_10) -/* 0x960 */ DEFINE_SFX(NA_SE_EV_MARATHONMAN_RISE, 0x30, 0, 0, 0, SFX_FLAG_10) -/* 0x961 */ DEFINE_SFX(NA_SE_PL_DUMMY_353, 0x30, 0, 0, 0, SFX_FLAG_10) -/* 0x962 */ DEFINE_SFX(NA_SE_PL_DUMMY_354, 0x30, 0, 0, 0, SFX_FLAG_10) -/* 0x963 */ DEFINE_SFX(NA_SE_PL_DUMMY_355, 0x30, 0, 0, 0, SFX_FLAG_10) -/* 0x964 */ DEFINE_SFX(NA_SE_PL_DUMMY_356, 0x30, 0, 0, 0, SFX_FLAG_10) -/* 0x965 */ DEFINE_SFX(NA_SE_PL_DUMMY_357, 0x30, 0, 0, 0, SFX_FLAG_10) -/* 0x966 */ DEFINE_SFX(NA_SE_PL_DUMMY_358, 0x30, 0, 0, 0, SFX_FLAG_10) -/* 0x967 */ DEFINE_SFX(NA_SE_PL_DUMMY_359, 0x30, 0, 0, 0, SFX_FLAG_10) -/* 0x968 */ DEFINE_SFX(NA_SE_PL_DUMMY_360, 0x30, 0, 0, 0, SFX_FLAG_10) -/* 0x969 */ DEFINE_SFX(NA_SE_PL_DUMMY_361, 0x30, 0, 0, 0, SFX_FLAG_10) -/* 0x96A */ DEFINE_SFX(NA_SE_PL_DUMMY_362, 0x30, 0, 0, 0, SFX_FLAG_10) -/* 0x96B */ DEFINE_SFX(NA_SE_PL_DUMMY_363, 0x30, 0, 0, 0, SFX_FLAG_10) -/* 0x96C */ DEFINE_SFX(NA_SE_PL_DUMMY_364, 0x30, 0, 0, 0, SFX_FLAG_10) -/* 0x96D */ DEFINE_SFX(NA_SE_PL_DUMMY_365, 0x30, 0, 0, 0, SFX_FLAG_10) -/* 0x96E */ DEFINE_SFX(NA_SE_PL_DUMMY_366, 0x30, 0, 0, 0, SFX_FLAG_10) -/* 0x96F */ DEFINE_SFX(NA_SE_PL_DUMMY_367, 0x30, 0, 0, 0, SFX_FLAG_10) -/* 0x970 */ DEFINE_SFX(NA_SE_EV_MARATHONMAN_LAND, 0x40, 0, 1, 0, SFX_FLAG_10) -/* 0x971 */ DEFINE_SFX(NA_SE_PL_DUMMY_369, 0x40, 0, 1, 0, SFX_FLAG_10) -/* 0x972 */ DEFINE_SFX(NA_SE_PL_DUMMY_370, 0x40, 0, 1, 0, SFX_FLAG_10) -/* 0x973 */ DEFINE_SFX(NA_SE_PL_DUMMY_371, 0x40, 0, 1, 0, SFX_FLAG_10) -/* 0x974 */ DEFINE_SFX(NA_SE_PL_DUMMY_372, 0x40, 0, 1, 0, SFX_FLAG_10) -/* 0x975 */ DEFINE_SFX(NA_SE_PL_DUMMY_373, 0x40, 0, 1, 0, SFX_FLAG_10) -/* 0x976 */ DEFINE_SFX(NA_SE_PL_DUMMY_374, 0x40, 0, 1, 0, SFX_FLAG_10) -/* 0x977 */ DEFINE_SFX(NA_SE_PL_DUMMY_375, 0x40, 0, 1, 0, SFX_FLAG_10) -/* 0x978 */ DEFINE_SFX(NA_SE_PL_DUMMY_376, 0x40, 0, 1, 0, SFX_FLAG_10) -/* 0x979 */ DEFINE_SFX(NA_SE_PL_DUMMY_377, 0x40, 0, 1, 0, SFX_FLAG_10) -/* 0x97A */ DEFINE_SFX(NA_SE_PL_DUMMY378, 0x40, 0, 1, 0, SFX_FLAG_10) -/* 0x97B */ DEFINE_SFX(NA_SE_PL_DUMMY_379, 0x40, 0, 1, 0, SFX_FLAG_10) -/* 0x97C */ DEFINE_SFX(NA_SE_PL_DUMMY_380, 0x40, 0, 1, 0, SFX_FLAG_10) -/* 0x97D */ DEFINE_SFX(NA_SE_PL_DUMMY_381, 0x40, 0, 1, 0, SFX_FLAG_10) -/* 0x97E */ DEFINE_SFX(NA_SE_PL_DUMMY_382, 0x40, 0, 1, 0, SFX_FLAG_10) -/* 0x97F */ DEFINE_SFX(NA_SE_PL_DUMMY_383, 0x40, 0, 1, 0, SFX_FLAG_10) -/* 0x980 */ DEFINE_SFX(NA_SE_PL_GORON_CHG_ROLL, 0x30, 0, 0, 0, SFX_FLAG_10) -/* 0x981 */ DEFINE_SFX(NA_SE_PL_DUMMY_385, 0x30, 0, 0, 0, SFX_FLAG_10) -/* 0x982 */ DEFINE_SFX(NA_SE_PL_DUMMY_386, 0x30, 0, 0, 0, SFX_FLAG_10) -/* 0x983 */ DEFINE_SFX(NA_SE_PL_DUMMY_387, 0x30, 0, 0, 0, SFX_FLAG_10) -/* 0x984 */ DEFINE_SFX(NA_SE_PL_DUMMY_388, 0x30, 0, 0, 0, SFX_FLAG_10) -/* 0x985 */ DEFINE_SFX(NA_SE_PL_DUMMY_389, 0x30, 0, 0, 0, SFX_FLAG_10) -/* 0x986 */ DEFINE_SFX(NA_SE_PL_DUMMY_390, 0x30, 0, 0, 0, SFX_FLAG_10) -/* 0x987 */ DEFINE_SFX(NA_SE_PL_DUMMY_391, 0x30, 0, 0, 0, SFX_FLAG_10) -/* 0x988 */ DEFINE_SFX(NA_SE_PL_DUMMY_392, 0x30, 0, 0, 0, SFX_FLAG_10) -/* 0x989 */ DEFINE_SFX(NA_SE_PL_DUMMY_393, 0x30, 0, 0, 0, SFX_FLAG_10) -/* 0x98A */ DEFINE_SFX(NA_SE_PL_DUMMY_394, 0x30, 0, 0, 0, SFX_FLAG_10) -/* 0x98B */ DEFINE_SFX(NA_SE_PL_DUMMY_395, 0x30, 0, 0, 0, SFX_FLAG_10) -/* 0x98C */ DEFINE_SFX(NA_SE_PL_DUMMY_396, 0x30, 0, 0, 0, SFX_FLAG_10) -/* 0x98D */ DEFINE_SFX(NA_SE_PL_DUMMY_397, 0x30, 0, 0, 0, SFX_FLAG_10) -/* 0x98E */ DEFINE_SFX(NA_SE_PL_DUMMY_398, 0x30, 0, 0, 0, SFX_FLAG_10) -/* 0x98F */ DEFINE_SFX(NA_SE_PL_GORON_CHG_ROLL_ICE, 0x30, 0, 0, 0, SFX_FLAG_10) -/* 0x990 */ DEFINE_SFX(NA_SE_PL_GORON_ROLL, 0x30, 0, 0, 0, SFX_FLAG_10) -/* 0x991 */ DEFINE_SFX(NA_SE_PL_DUMMY_401, 0x30, 0, 0, 0, SFX_FLAG_10) -/* 0x992 */ DEFINE_SFX(NA_SE_PL_DUMMY_402, 0x50, 0, 0, 0, SFX_FLAG_10) -/* 0x993 */ DEFINE_SFX(NA_SE_PL_DUMMY_403, 0x50, 0, 0, 0, SFX_FLAG_10) -/* 0x994 */ DEFINE_SFX(NA_SE_PL_DUMMY_404, 0x30, 0, 0, 0, SFX_FLAG_10) -/* 0x995 */ DEFINE_SFX(NA_SE_PL_DUMMY_405, 0x30, 0, 0, 0, SFX_FLAG_10) -/* 0x996 */ DEFINE_SFX(NA_SE_PL_DUMMY_406, 0x30, 0, 0, 0, SFX_FLAG_10) -/* 0x997 */ DEFINE_SFX(NA_SE_PL_DUMMY_407, 0x30, 0, 0, 0, SFX_FLAG_10) -/* 0x998 */ DEFINE_SFX(NA_SE_PL_DUMMY_408, 0x30, 0, 0, 0, SFX_FLAG_10) -/* 0x999 */ DEFINE_SFX(NA_SE_PL_DUMMY_409, 0x30, 0, 0, 0, SFX_FLAG_10) -/* 0x99A */ DEFINE_SFX(NA_SE_PL_DUMMY_410, 0x30, 0, 0, 0, SFX_FLAG_10) -/* 0x99B */ DEFINE_SFX(NA_SE_PL_DUMMY_411, 0x30, 0, 0, 0, SFX_FLAG_10) -/* 0x99C */ DEFINE_SFX(NA_SE_PL_DUMMY_412, 0x30, 0, 0, 0, SFX_FLAG_10) -/* 0x99D */ DEFINE_SFX(NA_SE_PL_DUMMY_413, 0x30, 0, 0, 0, SFX_FLAG_10) -/* 0x99E */ DEFINE_SFX(NA_SE_PL_DUMMY_414, 0x30, 0, 0, 0, SFX_FLAG_10) -/* 0x99F */ DEFINE_SFX(NA_SE_PL_GORON_ROLL_ICE, 0x30, 0, 0, 0, SFX_FLAG_10) -/* 0x9A0 */ DEFINE_SFX(NA_SE_PL_DEKUNUTS_BUD, 0x30, 0, 0, 0, SFX_FLAG_10) -/* 0x9A1 */ DEFINE_SFX(NA_SE_PL_DEKUNUTS_BUBLE_BREATH, 0x30, 0, 0, 0, SFX_FLAG_10) -/* 0x9A2 */ DEFINE_SFX(NA_SE_PL_GORON_BALL_CHARGE_FAILED, 0x30, 0, 0, 0, SFX_FLAG_10) -/* 0x9A3 */ DEFINE_SFX(NA_SE_PL_GORON_BALL_CHARGE_DASH, 0x60, 0, 0, 0, SFX_FLAG_10) -/* 0x9A4 */ DEFINE_SFX(NA_SE_PL_FACE_CHANGE, 0x30, 0, 0, 0, SFX_FLAG_10) -/* 0x9A5 */ DEFINE_SFX(NA_SE_PL_FACE_UP_S, 0x30, 0, 0, 0, SFX_FLAG_10) -/* 0x9A6 */ DEFINE_SFX(NA_SE_PL_DEKUNUTS_STRUGGLE, 0x30, 0, 0, 0, SFX_FLAG_10) -/* 0x9A7 */ DEFINE_SFX(NA_SE_PL_WARP_PLATE, 0x30, 0, 0, 0, SFX_FLAG_10) -/* 0x9A8 */ DEFINE_SFX(NA_SE_PL_WARP_PLATE_OUT, 0x30, 0, 0, 0, SFX_FLAG_10) -/* 0x9A9 */ DEFINE_SFX(NA_SE_PL_DEKUNUTS_ATTACK, 0x30, 0, 0, 0, SFX_FLAG_10) -/* 0x9AA */ DEFINE_SFX(NA_SE_PL_TRANSFORM_VOICE, 0x30, 0, 0, 0, SFX_FLAG_10) -/* 0x9AB */ DEFINE_SFX(NA_SE_PL_FACE_RETURN, 0x30, 0, 0, 0, SFX_FLAG_10) -/* 0x9AC */ DEFINE_SFX(NA_SE_PL_DEKUNUTS_DROP_BOMB, 0x30, 0, 0, 0, SFX_FLAG_10) -/* 0x9AD */ DEFINE_SFX(NA_SE_PL_GORON_SLIP, 0x30, 0, 0, 0, SFX_FLAG_10) -/* 0x9AE */ DEFINE_SFX(NA_SE_PL_ROLL_SNOW_DUST, 0x30, 0, 2, 0, SFX_FLAG_14) -/* 0x9AF */ DEFINE_SFX(NA_SE_PL_ZORA_SPARK_BARRIER, 0x40, 3, 0, 0, SFX_FLAG_10) -/* 0x9B0 */ DEFINE_SFX(NA_SE_PL_DEKUNUTS_JUMP, 0x30, 0, 0, 0, SFX_FLAG_10) -/* 0x9B1 */ DEFINE_SFX(NA_SE_PL_DEKUNUTS_JUMP2, 0x30, 0, 0, 0, SFX_FLAG_10) -/* 0x9B2 */ DEFINE_SFX(NA_SE_PL_DEKUNUTS_JUMP3, 0x30, 0, 0, 0, SFX_FLAG_10) -/* 0x9B3 */ DEFINE_SFX(NA_SE_PL_DEKUNUTS_JUMP4, 0x30, 0, 0, 0, SFX_FLAG_10) -/* 0x9B4 */ DEFINE_SFX(NA_SE_PL_DEKUNUTS_JUMP5, 0x30, 0, 0, 0, SFX_FLAG_10) -/* 0x9B5 */ DEFINE_SFX(NA_SE_PL_DEKUNUTS_JUMP6, 0x30, 0, 0, 0, SFX_FLAG_10) -/* 0x9B6 */ DEFINE_SFX(NA_SE_PL_DEKUNUTS_JUMP7, 0x30, 0, 0, 0, SFX_FLAG_10) -/* 0x9B7 */ DEFINE_SFX(NA_SE_PL_DEKUNUTS_JUMP8, 0x30, 0, 0, 0, SFX_FLAG_10) -/* 0x9B8 */ DEFINE_SFX(NA_SE_PL_GORON_STOMACH_EXPLOSION, 0x30, 0, 0, 0, SFX_FLAG_10) -/* 0x9B9 */ DEFINE_SFX(NA_SE_PL_GORON_DRINK_BOMB, 0x30, 0, 0, 0, SFX_FLAG_10) -/* 0x9BA */ DEFINE_SFX(NA_SE_PL_GET_UP, 0x30, 0, 0, 0, SFX_FLAG_10) -/* 0x9BB */ DEFINE_SFX(NA_SE_PL_WARP_WING_OPEN, 0x30, 0, 0, 0, SFX_FLAG_13 | SFX_FLAG_10) -/* 0x9BC */ DEFINE_SFX(NA_SE_PL_WARP_WING_CLOSE, 0x30, 0, 0, 0, SFX_FLAG_13 | SFX_FLAG_10) -/* 0x9BD */ DEFINE_SFX(NA_SE_PL_WARP_WING_ROLL, 0x30, 0, 0, 0, SFX_FLAG_13 | SFX_FLAG_10) -/* 0x9BE */ DEFINE_SFX(NA_SE_PL_WARP_WING_VANISH, 0x30, 0, 0, 0, SFX_FLAG_13 | SFX_FLAG_10) -/* 0x9BF */ DEFINE_SFX(NA_SE_PL_DEKUNUTS_MISS_FIRE, 0x30, 0, 0, 0, SFX_FLAG_10) -/* 0x9C0 */ DEFINE_SFX(NA_SE_PL_FLYING_AIR, 0x30, 0, 0, 0, SFX_FLAG_10) +/* 0x8F0 */ DEFINE_SFX(NA_SE_PL_DUMMY_240, 0x20, 0, 2, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x8F1 */ DEFINE_SFX(NA_SE_PL_DUMMY_241, 0x20, 0, 2, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x8F2 */ DEFINE_SFX(NA_SE_PL_DUMMY_242, 0x20, 0, 2, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x8F3 */ DEFINE_SFX(NA_SE_PL_DUMMY_243, 0x20, 0, 2, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x8F4 */ DEFINE_SFX(NA_SE_PL_DUMMY_244, 0x20, 0, 1, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x8F5 */ DEFINE_SFX(NA_SE_PL_DUMMY_245, 0x20, 0, 1, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x8F6 */ DEFINE_SFX(NA_SE_PL_DUMMY_246, 0x20, 0, 1, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x8F7 */ DEFINE_SFX(NA_SE_PL_DUMMY_247, 0x20, 0, 1, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x8F8 */ DEFINE_SFX(NA_SE_PL_DUMMY_248, 0x20, 0, 2, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x8F9 */ DEFINE_SFX(NA_SE_PL_DUMMY_249, 0x20, 0, 1, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x8FA */ DEFINE_SFX(NA_SE_PL_DUMMY_250, 0x20, 0, 2, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x8FB */ DEFINE_SFX(NA_SE_PL_DUMMY_251, 0x20, 0, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x8FC */ DEFINE_SFX(NA_SE_PL_DUMMY_252, 0x20, 0, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x8FD */ DEFINE_SFX(NA_SE_PL_DUMMY_253, 0x20, 0, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x8FE */ DEFINE_SFX(NA_SE_PL_DUMMY_254, 0x20, 0, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x8FF */ DEFINE_SFX(NA_SE_PL_DUMMY_255, 0x20, 0, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x900 */ DEFINE_SFX(NA_SE_PL_DUMMY_256, 0x30, 0, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x901 */ DEFINE_SFX(NA_SE_PL_DUMMY_257, 0x30, 0, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x902 */ DEFINE_SFX(NA_SE_PL_DUMMY_258, 0x30, 0, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x903 */ DEFINE_SFX(NA_SE_PL_DUMMY_259, 0x30, 0, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x904 */ DEFINE_SFX(NA_SE_PL_DUMMY_260, 0x30, 0, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x905 */ DEFINE_SFX(NA_SE_PL_DUMMY_261, 0x30, 0, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x906 */ DEFINE_SFX(NA_SE_PL_DUMMY_262, 0x30, 0, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x907 */ DEFINE_SFX(NA_SE_PL_DUMMY_263, 0x30, 0, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x908 */ DEFINE_SFX(NA_SE_PL_DUMMY_264, 0x30, 0, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x909 */ DEFINE_SFX(NA_SE_PL_DUMMY_265, 0x30, 0, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x90A */ DEFINE_SFX(NA_SE_PL_DUMMY_266, 0x30, 0, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x90B */ DEFINE_SFX(NA_SE_PL_DUMMY_267, 0x30, 0, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x90C */ DEFINE_SFX(NA_SE_PL_DUMMY_268, 0x30, 0, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x90D */ DEFINE_SFX(NA_SE_PL_DUMMY_269, 0x30, 0, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x90E */ DEFINE_SFX(NA_SE_PL_DUMMY_270, 0x30, 0, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x90F */ DEFINE_SFX(NA_SE_PL_DUMMY_271, 0x30, 0, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x910 */ DEFINE_SFX(NA_SE_PL_DUMMY_272, 0x40, 0, 1, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x911 */ DEFINE_SFX(NA_SE_PL_DUMMY_273, 0x40, 0, 1, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x912 */ DEFINE_SFX(NA_SE_PL_DUMMY_274, 0x40, 0, 1, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x913 */ DEFINE_SFX(NA_SE_PL_DUMMY_275, 0x40, 0, 1, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x914 */ DEFINE_SFX(NA_SE_PL_DUMMY_276, 0x40, 0, 1, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x915 */ DEFINE_SFX(NA_SE_PL_DUMMY_277, 0x40, 0, 1, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x916 */ DEFINE_SFX(NA_SE_PL_DUMMY_278, 0x40, 0, 1, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x917 */ DEFINE_SFX(NA_SE_PL_DUMMY_279, 0x40, 0, 1, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x918 */ DEFINE_SFX(NA_SE_PL_DUMMY_280, 0x40, 0, 1, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x919 */ DEFINE_SFX(NA_SE_PL_DUMMY_281, 0x40, 0, 1, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x91A */ DEFINE_SFX(NA_SE_PL_DUMMY_282, 0x40, 0, 1, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x91B */ DEFINE_SFX(NA_SE_PL_DUMMY_283, 0x40, 0, 1, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x91C */ DEFINE_SFX(NA_SE_PL_DUMMY_284, 0x40, 0, 1, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x91D */ DEFINE_SFX(NA_SE_PL_DUMMY_285, 0x40, 0, 1, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x91E */ DEFINE_SFX(NA_SE_PL_DUMMY_286, 0x40, 0, 1, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x91F */ DEFINE_SFX(NA_SE_PL_DUMMY_287, 0x40, 0, 1, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x920 */ DEFINE_SFX(NA_SE_PL_DUMMY_288, 0x20, 0, 2, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x921 */ DEFINE_SFX(NA_SE_PL_DUMMY_289, 0x20, 0, 2, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x922 */ DEFINE_SFX(NA_SE_PL_DUMMY_290, 0x20, 0, 2, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x923 */ DEFINE_SFX(NA_SE_PL_DUMMY_291, 0x20, 0, 2, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x924 */ DEFINE_SFX(NA_SE_PL_DUMMY_292, 0x20, 0, 1, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x925 */ DEFINE_SFX(NA_SE_PL_DUMMY_293, 0x20, 0, 1, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x926 */ DEFINE_SFX(NA_SE_PL_DUMMY_294, 0x20, 0, 1, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x927 */ DEFINE_SFX(NA_SE_PL_DUMMY_295, 0x20, 0, 1, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x928 */ DEFINE_SFX(NA_SE_PL_DUMMY_296, 0x20, 0, 2, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x929 */ DEFINE_SFX(NA_SE_PL_DUMMY_297, 0x20, 0, 1, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x92A */ DEFINE_SFX(NA_SE_PL_DUMMY_298, 0x20, 0, 2, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x92B */ DEFINE_SFX(NA_SE_PL_DUMMY_299, 0x20, 0, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x92C */ DEFINE_SFX(NA_SE_PL_DUMMY_300, 0x20, 0, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x92D */ DEFINE_SFX(NA_SE_PL_DUMMY_301, 0x20, 0, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x92E */ DEFINE_SFX(NA_SE_PL_DUMMY_302, 0x20, 0, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x92F */ DEFINE_SFX(NA_SE_PL_DUMMY_303, 0x20, 0, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x930 */ DEFINE_SFX(NA_SE_PL_DUMMY_304, 0x30, 0, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x931 */ DEFINE_SFX(NA_SE_PL_DUMMY_305, 0x30, 0, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x932 */ DEFINE_SFX(NA_SE_PL_DUMMY_306, 0x30, 0, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x933 */ DEFINE_SFX(NA_SE_PL_DUMMY_307, 0x30, 0, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x934 */ DEFINE_SFX(NA_SE_PL_DUMMY_308, 0x30, 0, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x935 */ DEFINE_SFX(NA_SE_PL_DUMMY_309, 0x30, 0, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x936 */ DEFINE_SFX(NA_SE_PL_DUMMY_310, 0x30, 0, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x937 */ DEFINE_SFX(NA_SE_PL_DUMMY_311, 0x30, 0, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x938 */ DEFINE_SFX(NA_SE_PL_DUMMY_312, 0x30, 0, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x939 */ DEFINE_SFX(NA_SE_PL_DUMMY_313, 0x30, 0, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x93A */ DEFINE_SFX(NA_SE_PL_DUMMY_314, 0x30, 0, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x93B */ DEFINE_SFX(NA_SE_PL_DUMMY_315, 0x30, 0, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x93C */ DEFINE_SFX(NA_SE_PL_DUMMY_316, 0x30, 0, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x93D */ DEFINE_SFX(NA_SE_PL_DUMMY_317, 0x30, 0, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x93E */ DEFINE_SFX(NA_SE_PL_DUMMY_318, 0x30, 0, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x93F */ DEFINE_SFX(NA_SE_PL_DUMMY_319, 0x30, 0, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x940 */ DEFINE_SFX(NA_SE_PL_DUMMY_320, 0x40, 0, 1, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x941 */ DEFINE_SFX(NA_SE_PL_DUMMY_321, 0x40, 0, 1, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x942 */ DEFINE_SFX(NA_SE_PL_DUMMY_322, 0x40, 0, 1, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x943 */ DEFINE_SFX(NA_SE_PL_DUMMY_323, 0x40, 0, 1, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x944 */ DEFINE_SFX(NA_SE_PL_DUMMY_324, 0x40, 0, 1, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x945 */ DEFINE_SFX(NA_SE_PL_DUMMY_325, 0x40, 0, 1, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x946 */ DEFINE_SFX(NA_SE_PL_DUMMY_326, 0x40, 0, 1, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x947 */ DEFINE_SFX(NA_SE_PL_DUMMY_327, 0x40, 0, 1, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x948 */ DEFINE_SFX(NA_SE_PL_DUMMY_328, 0x40, 0, 1, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x949 */ DEFINE_SFX(NA_SE_PL_DUMMY_329, 0x40, 0, 1, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x94A */ DEFINE_SFX(NA_SE_PL_DUMMY_330, 0x40, 0, 1, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x94B */ DEFINE_SFX(NA_SE_PL_DUMMY_331, 0x40, 0, 1, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x94C */ DEFINE_SFX(NA_SE_PL_DUMMY_332, 0x40, 0, 1, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x94D */ DEFINE_SFX(NA_SE_PL_DUMMY_333, 0x40, 0, 1, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x94E */ DEFINE_SFX(NA_SE_PL_DUMMY_334, 0x40, 0, 1, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x94F */ DEFINE_SFX(NA_SE_PL_DUMMY_335, 0x40, 0, 1, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x950 */ DEFINE_SFX(NA_SE_PL_DUMMY_336, 0x20, 0, 2, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x951 */ DEFINE_SFX(NA_SE_PL_DUMMY_337, 0x20, 0, 2, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x952 */ DEFINE_SFX(NA_SE_PL_DUMMY_338, 0x20, 0, 2, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x953 */ DEFINE_SFX(NA_SE_PL_DUMMY_339, 0x20, 0, 2, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x954 */ DEFINE_SFX(NA_SE_PL_DUMMY_340, 0x20, 0, 1, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x955 */ DEFINE_SFX(NA_SE_PL_DUMMY_341, 0x20, 0, 1, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x956 */ DEFINE_SFX(NA_SE_PL_DUMMY_342, 0x20, 0, 1, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x957 */ DEFINE_SFX(NA_SE_PL_DUMMY_343, 0x20, 0, 1, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x958 */ DEFINE_SFX(NA_SE_PL_DUMMY_344, 0x20, 0, 2, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x959 */ DEFINE_SFX(NA_SE_PL_DUMMY_345, 0x20, 0, 1, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x95A */ DEFINE_SFX(NA_SE_PL_DUMMY_346, 0x20, 0, 2, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x95B */ DEFINE_SFX(NA_SE_PL_DUMMY_347, 0x20, 0, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x95C */ DEFINE_SFX(NA_SE_PL_DUMMY_348, 0x20, 0, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x95D */ DEFINE_SFX(NA_SE_PL_DUMMY_349, 0x20, 0, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x95E */ DEFINE_SFX(NA_SE_PL_DUMMY_350, 0x20, 0, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x95F */ DEFINE_SFX(NA_SE_PL_DUMMY_351, 0x20, 0, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x960 */ DEFINE_SFX(NA_SE_EV_MARATHONMAN_RISE, 0x30, 0, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x961 */ DEFINE_SFX(NA_SE_PL_DUMMY_353, 0x30, 0, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x962 */ DEFINE_SFX(NA_SE_PL_DUMMY_354, 0x30, 0, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x963 */ DEFINE_SFX(NA_SE_PL_DUMMY_355, 0x30, 0, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x964 */ DEFINE_SFX(NA_SE_PL_DUMMY_356, 0x30, 0, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x965 */ DEFINE_SFX(NA_SE_PL_DUMMY_357, 0x30, 0, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x966 */ DEFINE_SFX(NA_SE_PL_DUMMY_358, 0x30, 0, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x967 */ DEFINE_SFX(NA_SE_PL_DUMMY_359, 0x30, 0, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x968 */ DEFINE_SFX(NA_SE_PL_DUMMY_360, 0x30, 0, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x969 */ DEFINE_SFX(NA_SE_PL_DUMMY_361, 0x30, 0, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x96A */ DEFINE_SFX(NA_SE_PL_DUMMY_362, 0x30, 0, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x96B */ DEFINE_SFX(NA_SE_PL_DUMMY_363, 0x30, 0, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x96C */ DEFINE_SFX(NA_SE_PL_DUMMY_364, 0x30, 0, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x96D */ DEFINE_SFX(NA_SE_PL_DUMMY_365, 0x30, 0, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x96E */ DEFINE_SFX(NA_SE_PL_DUMMY_366, 0x30, 0, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x96F */ DEFINE_SFX(NA_SE_PL_DUMMY_367, 0x30, 0, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x970 */ DEFINE_SFX(NA_SE_EV_MARATHONMAN_LAND, 0x40, 0, 1, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x971 */ DEFINE_SFX(NA_SE_PL_DUMMY_369, 0x40, 0, 1, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x972 */ DEFINE_SFX(NA_SE_PL_DUMMY_370, 0x40, 0, 1, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x973 */ DEFINE_SFX(NA_SE_PL_DUMMY_371, 0x40, 0, 1, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x974 */ DEFINE_SFX(NA_SE_PL_DUMMY_372, 0x40, 0, 1, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x975 */ DEFINE_SFX(NA_SE_PL_DUMMY_373, 0x40, 0, 1, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x976 */ DEFINE_SFX(NA_SE_PL_DUMMY_374, 0x40, 0, 1, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x977 */ DEFINE_SFX(NA_SE_PL_DUMMY_375, 0x40, 0, 1, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x978 */ DEFINE_SFX(NA_SE_PL_DUMMY_376, 0x40, 0, 1, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x979 */ DEFINE_SFX(NA_SE_PL_DUMMY_377, 0x40, 0, 1, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x97A */ DEFINE_SFX(NA_SE_PL_DUMMY378, 0x40, 0, 1, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x97B */ DEFINE_SFX(NA_SE_PL_DUMMY_379, 0x40, 0, 1, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x97C */ DEFINE_SFX(NA_SE_PL_DUMMY_380, 0x40, 0, 1, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x97D */ DEFINE_SFX(NA_SE_PL_DUMMY_381, 0x40, 0, 1, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x97E */ DEFINE_SFX(NA_SE_PL_DUMMY_382, 0x40, 0, 1, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x97F */ DEFINE_SFX(NA_SE_PL_DUMMY_383, 0x40, 0, 1, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x980 */ DEFINE_SFX(NA_SE_PL_GORON_CHG_ROLL, 0x30, 0, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x981 */ DEFINE_SFX(NA_SE_PL_DUMMY_385, 0x30, 0, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x982 */ DEFINE_SFX(NA_SE_PL_DUMMY_386, 0x30, 0, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x983 */ DEFINE_SFX(NA_SE_PL_DUMMY_387, 0x30, 0, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x984 */ DEFINE_SFX(NA_SE_PL_DUMMY_388, 0x30, 0, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x985 */ DEFINE_SFX(NA_SE_PL_DUMMY_389, 0x30, 0, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x986 */ DEFINE_SFX(NA_SE_PL_DUMMY_390, 0x30, 0, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x987 */ DEFINE_SFX(NA_SE_PL_DUMMY_391, 0x30, 0, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x988 */ DEFINE_SFX(NA_SE_PL_DUMMY_392, 0x30, 0, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x989 */ DEFINE_SFX(NA_SE_PL_DUMMY_393, 0x30, 0, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x98A */ DEFINE_SFX(NA_SE_PL_DUMMY_394, 0x30, 0, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x98B */ DEFINE_SFX(NA_SE_PL_DUMMY_395, 0x30, 0, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x98C */ DEFINE_SFX(NA_SE_PL_DUMMY_396, 0x30, 0, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x98D */ DEFINE_SFX(NA_SE_PL_DUMMY_397, 0x30, 0, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x98E */ DEFINE_SFX(NA_SE_PL_DUMMY_398, 0x30, 0, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x98F */ DEFINE_SFX(NA_SE_PL_GORON_CHG_ROLL_ICE, 0x30, 0, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x990 */ DEFINE_SFX(NA_SE_PL_GORON_ROLL, 0x30, 0, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x991 */ DEFINE_SFX(NA_SE_PL_DUMMY_401, 0x30, 0, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x992 */ DEFINE_SFX(NA_SE_PL_DUMMY_402, 0x50, 0, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x993 */ DEFINE_SFX(NA_SE_PL_DUMMY_403, 0x50, 0, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x994 */ DEFINE_SFX(NA_SE_PL_DUMMY_404, 0x30, 0, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x995 */ DEFINE_SFX(NA_SE_PL_DUMMY_405, 0x30, 0, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x996 */ DEFINE_SFX(NA_SE_PL_DUMMY_406, 0x30, 0, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x997 */ DEFINE_SFX(NA_SE_PL_DUMMY_407, 0x30, 0, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x998 */ DEFINE_SFX(NA_SE_PL_DUMMY_408, 0x30, 0, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x999 */ DEFINE_SFX(NA_SE_PL_DUMMY_409, 0x30, 0, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x99A */ DEFINE_SFX(NA_SE_PL_DUMMY_410, 0x30, 0, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x99B */ DEFINE_SFX(NA_SE_PL_DUMMY_411, 0x30, 0, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x99C */ DEFINE_SFX(NA_SE_PL_DUMMY_412, 0x30, 0, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x99D */ DEFINE_SFX(NA_SE_PL_DUMMY_413, 0x30, 0, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x99E */ DEFINE_SFX(NA_SE_PL_DUMMY_414, 0x30, 0, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x99F */ DEFINE_SFX(NA_SE_PL_GORON_ROLL_ICE, 0x30, 0, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x9A0 */ DEFINE_SFX(NA_SE_PL_DEKUNUTS_BUD, 0x30, 0, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x9A1 */ DEFINE_SFX(NA_SE_PL_DEKUNUTS_BUBLE_BREATH, 0x30, 0, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x9A2 */ DEFINE_SFX(NA_SE_PL_GORON_BALL_CHARGE_FAILED, 0x30, 0, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x9A3 */ DEFINE_SFX(NA_SE_PL_GORON_BALL_CHARGE_DASH, 0x60, 0, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x9A4 */ DEFINE_SFX(NA_SE_PL_FACE_CHANGE, 0x30, 0, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x9A5 */ DEFINE_SFX(NA_SE_PL_FACE_UP_S, 0x30, 0, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x9A6 */ DEFINE_SFX(NA_SE_PL_DEKUNUTS_STRUGGLE, 0x30, 0, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x9A7 */ DEFINE_SFX(NA_SE_PL_WARP_PLATE, 0x30, 0, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x9A8 */ DEFINE_SFX(NA_SE_PL_WARP_PLATE_OUT, 0x30, 0, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x9A9 */ DEFINE_SFX(NA_SE_PL_DEKUNUTS_ATTACK, 0x30, 0, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x9AA */ DEFINE_SFX(NA_SE_PL_TRANSFORM_VOICE, 0x30, 0, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x9AB */ DEFINE_SFX(NA_SE_PL_FACE_RETURN, 0x30, 0, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x9AC */ DEFINE_SFX(NA_SE_PL_DEKUNUTS_DROP_BOMB, 0x30, 0, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x9AD */ DEFINE_SFX(NA_SE_PL_GORON_SLIP, 0x30, 0, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x9AE */ DEFINE_SFX(NA_SE_PL_ROLL_SNOW_DUST, 0x30, 0, 2, 0, SFX_PARAM_RAND_FREQ_LOWER) +/* 0x9AF */ DEFINE_SFX(NA_SE_PL_ZORA_SPARK_BARRIER, 0x40, 3, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x9B0 */ DEFINE_SFX(NA_SE_PL_DEKUNUTS_JUMP, 0x30, 0, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x9B1 */ DEFINE_SFX(NA_SE_PL_DEKUNUTS_JUMP2, 0x30, 0, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x9B2 */ DEFINE_SFX(NA_SE_PL_DEKUNUTS_JUMP3, 0x30, 0, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x9B3 */ DEFINE_SFX(NA_SE_PL_DEKUNUTS_JUMP4, 0x30, 0, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x9B4 */ DEFINE_SFX(NA_SE_PL_DEKUNUTS_JUMP5, 0x30, 0, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x9B5 */ DEFINE_SFX(NA_SE_PL_DEKUNUTS_JUMP6, 0x30, 0, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x9B6 */ DEFINE_SFX(NA_SE_PL_DEKUNUTS_JUMP7, 0x30, 0, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x9B7 */ DEFINE_SFX(NA_SE_PL_DEKUNUTS_JUMP8, 0x30, 0, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x9B8 */ DEFINE_SFX(NA_SE_PL_GORON_STOMACH_EXPLOSION, 0x30, 0, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x9B9 */ DEFINE_SFX(NA_SE_PL_GORON_DRINK_BOMB, 0x30, 0, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x9BA */ DEFINE_SFX(NA_SE_PL_GET_UP, 0x30, 0, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x9BB */ DEFINE_SFX(NA_SE_PL_WARP_WING_OPEN, 0x30, 0, 0, 0, SFX_FLAG_VOLUME_NO_DIST | SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x9BC */ DEFINE_SFX(NA_SE_PL_WARP_WING_CLOSE, 0x30, 0, 0, 0, SFX_FLAG_VOLUME_NO_DIST | SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x9BD */ DEFINE_SFX(NA_SE_PL_WARP_WING_ROLL, 0x30, 0, 0, 0, SFX_FLAG_VOLUME_NO_DIST | SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x9BE */ DEFINE_SFX(NA_SE_PL_WARP_WING_VANISH, 0x30, 0, 0, 0, SFX_FLAG_VOLUME_NO_DIST | SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x9BF */ DEFINE_SFX(NA_SE_PL_DEKUNUTS_MISS_FIRE, 0x30, 0, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x9C0 */ DEFINE_SFX(NA_SE_PL_FLYING_AIR, 0x30, 0, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) /* 0x9C1 */ DEFINE_SFX(NA_SE_PL_FIREWORKS, 0x30, 3, 1, 0, 0) /* 0x9C2 */ DEFINE_SFX(NA_SE_PL_FIREWORKS_DUMMY, 0x30, 3, 1, 0, 0) -/* 0x9C3 */ DEFINE_SFX(NA_SE_PL_PULL_UP_SNOWBALL, 0x30, 0, 0, 0, SFX_FLAG_10) -/* 0x9C4 */ DEFINE_SFX(NA_SE_PL_WARP_WING_ROLL_2, 0x30, 0, 0, 0, SFX_FLAG_10) -/* 0x9C5 */ DEFINE_SFX(NA_SE_PL_TRANSFORM_GIANT, 0x30, 0, 0, 0, SFX_FLAG_10) -/* 0x9C6 */ DEFINE_SFX(NA_SE_PL_TRANSFORM_NORAML, 0x30, 0, 0, 0, SFX_FLAG_10) -/* 0x9C7 */ DEFINE_SFX(NA_SE_PL_LI_OKARINATORI, 0x30, 0, 0, 0, SFX_FLAG_10) -/* 0x9C8 */ DEFINE_SFX(NA_SE_PL_LI_FUTTOBI, 0x30, 0, 0, 0, SFX_FLAG_10) -/* 0x9C9 */ DEFINE_SFX(NA_SE_PL_LI_OP_OKIAGARI, 0x30, 0, 0, 0, SFX_FLAG_10) -/* 0x9CA */ DEFINE_SFX(NA_SE_PL_LI_OP_TATIAGARI, 0x30, 0, 0, 0, SFX_FLAG_10) -/* 0x9CB */ DEFINE_SFX(NA_SE_PL_JUMP_METAL, 0x30, 0, 0, 0, SFX_FLAG_10) -/* 0x9CC */ DEFINE_SFX(NA_SE_PL_LAND_METAL, 0x30, 0, 0, 0, SFX_FLAG_10) -/* 0x9CD */ DEFINE_SFX(NA_SE_PL_BOUND_METAL, 0x30, 0, 0, 0, SFX_FLAG_10) -/* 0x9CE */ DEFINE_SFX(NA_SE_PL_WALK_WALL, 0x30, 0, 0, 0, SFX_FLAG_10) -/* 0x9CF */ DEFINE_SFX(NA_SE_PL_WALK_WALL_DEKU, 0x30, 0, 0, 0, SFX_FLAG_10) +/* 0x9C3 */ DEFINE_SFX(NA_SE_PL_PULL_UP_SNOWBALL, 0x30, 0, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x9C4 */ DEFINE_SFX(NA_SE_PL_WARP_WING_ROLL_2, 0x30, 0, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x9C5 */ DEFINE_SFX(NA_SE_PL_TRANSFORM_GIANT, 0x30, 0, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x9C6 */ DEFINE_SFX(NA_SE_PL_TRANSFORM_NORAML, 0x30, 0, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x9C7 */ DEFINE_SFX(NA_SE_PL_LI_OKARINATORI, 0x30, 0, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x9C8 */ DEFINE_SFX(NA_SE_PL_LI_FUTTOBI, 0x30, 0, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x9C9 */ DEFINE_SFX(NA_SE_PL_LI_OP_OKIAGARI, 0x30, 0, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x9CA */ DEFINE_SFX(NA_SE_PL_LI_OP_TATIAGARI, 0x30, 0, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x9CB */ DEFINE_SFX(NA_SE_PL_JUMP_METAL, 0x30, 0, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x9CC */ DEFINE_SFX(NA_SE_PL_LAND_METAL, 0x30, 0, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x9CD */ DEFINE_SFX(NA_SE_PL_BOUND_METAL, 0x30, 0, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x9CE */ DEFINE_SFX(NA_SE_PL_WALK_WALL, 0x30, 0, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x9CF */ DEFINE_SFX(NA_SE_PL_WALK_WALL_DEKU, 0x30, 0, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) diff --git a/include/tables/sfx/systembank_table.h b/include/tables/sfx/systembank_table.h index 6b6627c02..9d27d5d49 100644 --- a/include/tables/sfx/systembank_table.h +++ b/include/tables/sfx/systembank_table.h @@ -13,12 +13,12 @@ */ /* 0x4800 */ DEFINE_SFX(NA_SE_SY_WIN_OPEN, 0xC0, 0, 0, 0, 0) /* 0x4801 */ DEFINE_SFX(NA_SE_SY_WIN_CLOSE, 0xC0, 0, 0, 0, 0) -/* 0x4802 */ DEFINE_SFX(NA_SE_SY_CORRECT_CHIME, 0xB0, 0, 0, 0, SFX_FLAG_5) +/* 0x4802 */ DEFINE_SFX(NA_SE_SY_CORRECT_CHIME, 0xB0, 0, 0, 0, SFX_FLAG_BLOCK_EQUAL_IMPORTANCE) /* 0x4803 */ DEFINE_SFX(NA_SE_SY_GET_RUPY, 0x30, 0, 0, 0, 0) /* 0x4804 */ DEFINE_SFX(NA_SE_SY_MESSAGE_WOMAN, 0x30, 0, 0, 0, 0) /* 0x4805 */ DEFINE_SFX(NA_SE_SY_MESSAGE_MAN, 0x30, 0, 0, 0, 0) /* 0x4806 */ DEFINE_SFX(NA_SE_SY_ERROR, 0x50, 0, 0, 0, 0) -/* 0x4807 */ DEFINE_SFX(NA_SE_SY_TRE_BOX_APPEAR, 0x30, 0, 0, 0, SFX_FLAG_5) +/* 0x4807 */ DEFINE_SFX(NA_SE_SY_TRE_BOX_APPEAR, 0x30, 0, 0, 0, SFX_FLAG_BLOCK_EQUAL_IMPORTANCE) /* 0x4808 */ DEFINE_SFX(NA_SE_SY_DECIDE, 0x30, 0, 0, 0, 0) /* 0x4809 */ DEFINE_SFX(NA_SE_SY_CURSOR, 0x30, 0, 0, 0, 0) /* 0x480A */ DEFINE_SFX(NA_SE_SY_CANCEL, 0x30, 0, 0, 0, 0) @@ -95,7 +95,7 @@ /* 0x4851 */ DEFINE_SFX(NA_SE_SY_STALKIDS_PSYCHO, 0x60, 0, 0, 0, 0) /* 0x4852 */ DEFINE_SFX(NA_SE_SY_CHICK_JOIN_CHIME, 0x30, 0, 0, 0, 0) /* 0x4853 */ DEFINE_SFX(NA_SE_SY_HIT_SOUND_L, 0x30, 0, 0, 0, 0) -/* 0x4854 */ DEFINE_SFX(NA_SE_SY_FAIRY_MASK_SUCCESS, 0x30, 0, 0, 0, SFX_FLAG_5) +/* 0x4854 */ DEFINE_SFX(NA_SE_SY_FAIRY_MASK_SUCCESS, 0x30, 0, 0, 0, SFX_FLAG_BLOCK_EQUAL_IMPORTANCE) /* 0x4855 */ DEFINE_SFX(NA_SE_SY_SCHEDULE_WRITE, 0x60, 0, 0, 0, 0) /* 0x4856 */ DEFINE_SFX(NA_SE_SY_STOPWATCH_TIMER_3, 0x30, 0, 0, 0, 0) /* 0x4857 */ DEFINE_SFX(NA_SE_SY_STOPWATCH_TIMER_INF, 0x30, 0, 0, 0, 0) @@ -104,6 +104,6 @@ /* 0x485A */ DEFINE_SFX(NA_SE_SY_QUIZ_CORRECT, 0x30, 0, 0, 0, 0) /* 0x485B */ DEFINE_SFX(NA_SE_SY_QUIZ_INCORRECT, 0x30, 0, 0, 0, 0) /* 0x485C */ DEFINE_SFX(NA_SE_SY_DIZZY_EFFECT, 0x30, 0, 0, 0, 0) -/* 0x485D */ DEFINE_SFX(NA_SE_SY_TIME_CONTROL_SLOW, 0xA0, 0, 0, 0, SFX_FLAG_3) -/* 0x485E */ DEFINE_SFX(NA_SE_SY_TIME_CONTROL_NORMAL, 0xA0, 0, 0, 0, SFX_FLAG_3) +/* 0x485D */ DEFINE_SFX(NA_SE_SY_TIME_CONTROL_SLOW, 0xA0, 0, 0, 0, SFX_FLAG_LOWER_VOLUME_BGM) +/* 0x485E */ DEFINE_SFX(NA_SE_SY_TIME_CONTROL_NORMAL, 0xA0, 0, 0, 0, SFX_FLAG_LOWER_VOLUME_BGM) /* 0x485F */ DEFINE_SFX(NA_SE_SY_SECOM_WARNING, 0x30, 0, 0, 0, 0) diff --git a/include/tables/sfx/voicebank_table.h b/include/tables/sfx/voicebank_table.h index 568a21545..d2ce5aae3 100644 --- a/include/tables/sfx/voicebank_table.h +++ b/include/tables/sfx/voicebank_table.h @@ -11,74 +11,74 @@ * * WARNING: entries must align with the table defined for the voice bank in sequence 0 */ -/* 0x6800 */ DEFINE_SFX(NA_SE_VO_LI_SWORD_N, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x6801 */ DEFINE_SFX(NA_SE_VO_LI_SWORD_L, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x6802 */ DEFINE_SFX(NA_SE_VO_LI_LASH, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x6803 */ DEFINE_SFX(NA_SE_VO_LI_HANG, 0x20, 2, 0, 0, SFX_FLAG_10) -/* 0x6804 */ DEFINE_SFX(NA_SE_VO_LI_CLIMB_END, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x6805 */ DEFINE_SFX(NA_SE_VO_LI_DAMAGE_S, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x6806 */ DEFINE_SFX(NA_SE_VO_LI_FREEZE, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x6807 */ DEFINE_SFX(NA_SE_VO_LI_FALL_S, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x6808 */ DEFINE_SFX(NA_SE_VO_LI_FALL_L, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x6809 */ DEFINE_SFX(NA_SE_VO_LI_BREATH_REST, 0x30, 2, 1, 0, SFX_FLAG_10) -/* 0x680A */ DEFINE_SFX(NA_SE_VO_LI_BREATH_DRINK, 0x30, 2, 1, 0, SFX_FLAG_10) -/* 0x680B */ DEFINE_SFX(NA_SE_VO_LI_DOWN, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x680C */ DEFINE_SFX(NA_SE_VO_LI_TAKEN_AWAY, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x680D */ DEFINE_SFX(NA_SE_VO_LI_HELD, 0x50, 2, 0, 0, SFX_FLAG_10) -/* 0x680E */ DEFINE_SFX(NA_SE_VO_LI_SNEEZE, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x680F */ DEFINE_SFX(NA_SE_VO_LI_SWEAT, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x6810 */ DEFINE_SFX(NA_SE_VO_LI_DRINK, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x6811 */ DEFINE_SFX(NA_SE_VO_LI_RELAX, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x6812 */ DEFINE_SFX(NA_SE_VO_LI_SWORD_PUTAWAY, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x6813 */ DEFINE_SFX(NA_SE_VO_LI_GROAN, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x6814 */ DEFINE_SFX(NA_SE_VO_LI_AUTO_JUMP, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x6815 */ DEFINE_SFX(NA_SE_VO_LI_MAGIC_NALE, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x6816 */ DEFINE_SFX(NA_SE_VO_LI_SURPRISE, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x6817 */ DEFINE_SFX(NA_SE_VO_LI_MAGIC_FROL, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x6818 */ DEFINE_SFX(NA_SE_VO_LI_PUSH, 0x30, 2, 2, 0, SFX_FLAG_10) -/* 0x6819 */ DEFINE_SFX(NA_SE_VO_LI_HOOKSHOT_HANG, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x681A */ DEFINE_SFX(NA_SE_VO_LI_LAND_DAMAGE_S, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x681B */ DEFINE_SFX(NA_SE_VO_LI_MAGIC_START, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x681C */ DEFINE_SFX(NA_SE_VO_LI_MAGIC_ATTACK, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x681D */ DEFINE_SFX(NA_SE_VO_BL_DOWN, 0x80, 2, 0, 0, SFX_FLAG_10) -/* 0x681E */ DEFINE_SFX(NA_SE_VO_LI_DEMO_DAMAGE, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x681F */ DEFINE_SFX(NA_SE_VO_LI_SWORD_N_copy30, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x6820 */ DEFINE_SFX(NA_SE_VO_DUMMY_32, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x6821 */ DEFINE_SFX(NA_SE_VO_DUMMY_33, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x6822 */ DEFINE_SFX(NA_SE_VO_DUMMY_34, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x6823 */ DEFINE_SFX(NA_SE_VO_DUMMY_35, 0x20, 2, 0, 0, SFX_FLAG_10) -/* 0x6824 */ DEFINE_SFX(NA_SE_VO_DUMMY_36, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x6825 */ DEFINE_SFX(NA_SE_VO_DUMMY_37, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x6826 */ DEFINE_SFX(NA_SE_VO_DUMMY_38, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x6827 */ DEFINE_SFX(NA_SE_VO_DUMMY_39, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x6828 */ DEFINE_SFX(NA_SE_VO_NAVY_ENEMY, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x6829 */ DEFINE_SFX(NA_SE_VO_NAVY_HELLO, 0x30, 2, 1, 0, SFX_FLAG_10) -/* 0x682A */ DEFINE_SFX(NA_SE_VO_NAVY_HEAR, 0x30, 2, 1, 0, SFX_FLAG_10) -/* 0x682B */ DEFINE_SFX(NA_SE_VO_DUMMY_43, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x682C */ DEFINE_SFX(NA_SE_VO_DUMMY_44, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x682D */ DEFINE_SFX(NA_SE_VO_DUMMY_45, 0x50, 2, 0, 0, SFX_FLAG_10) -/* 0x682E */ DEFINE_SFX(NA_SE_VO_DUMMY_46, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x682F */ DEFINE_SFX(NA_SE_VO_DUMMY_47, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x6830 */ DEFINE_SFX(NA_SE_VO_DUMMY_48, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x6831 */ DEFINE_SFX(NA_SE_VO_DUMMY_49, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x6832 */ DEFINE_SFX(NA_SE_VO_DUMMY_50, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x6833 */ DEFINE_SFX(NA_SE_VO_DUMMY_51, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x6834 */ DEFINE_SFX(NA_SE_VO_DUMMY_52, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x6835 */ DEFINE_SFX(NA_SE_VO_DUMMY_53, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x6836 */ DEFINE_SFX(NA_SE_VO_DUMMY_54, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x6837 */ DEFINE_SFX(NA_SE_VO_DUMMY_55, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x6838 */ DEFINE_SFX(NA_SE_VO_DUMMY_56, 0x30, 1, 2, 0, SFX_FLAG_10) -/* 0x6839 */ DEFINE_SFX(NA_SE_VO_DUMMY_57, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x683A */ DEFINE_SFX(NA_SE_VO_DUMMY_58, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x683B */ DEFINE_SFX(NA_SE_VO_DUMMY_59, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x683C */ DEFINE_SFX(NA_SE_VO_DUMMY_60, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x683D */ DEFINE_SFX(NA_SE_VO_DUMMY_61, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x683E */ DEFINE_SFX(NA_SE_VO_DUMMY_62, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x683F */ DEFINE_SFX(NA_SE_VO_DUMMY_63, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x6840 */ DEFINE_SFX(NA_SE_VO_LK_WAKE_UP, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x6841 */ DEFINE_SFX(NA_SE_VO_LK_CATCH_DEMO, 0x30, 2, 0, 0, SFX_FLAG_10) +/* 0x6800 */ DEFINE_SFX(NA_SE_VO_LI_SWORD_N, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x6801 */ DEFINE_SFX(NA_SE_VO_LI_SWORD_L, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x6802 */ DEFINE_SFX(NA_SE_VO_LI_LASH, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x6803 */ DEFINE_SFX(NA_SE_VO_LI_HANG, 0x20, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x6804 */ DEFINE_SFX(NA_SE_VO_LI_CLIMB_END, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x6805 */ DEFINE_SFX(NA_SE_VO_LI_DAMAGE_S, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x6806 */ DEFINE_SFX(NA_SE_VO_LI_FREEZE, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x6807 */ DEFINE_SFX(NA_SE_VO_LI_FALL_S, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x6808 */ DEFINE_SFX(NA_SE_VO_LI_FALL_L, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x6809 */ DEFINE_SFX(NA_SE_VO_LI_BREATH_REST, 0x30, 2, 1, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x680A */ DEFINE_SFX(NA_SE_VO_LI_BREATH_DRINK, 0x30, 2, 1, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x680B */ DEFINE_SFX(NA_SE_VO_LI_DOWN, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x680C */ DEFINE_SFX(NA_SE_VO_LI_TAKEN_AWAY, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x680D */ DEFINE_SFX(NA_SE_VO_LI_HELD, 0x50, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x680E */ DEFINE_SFX(NA_SE_VO_LI_SNEEZE, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x680F */ DEFINE_SFX(NA_SE_VO_LI_SWEAT, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x6810 */ DEFINE_SFX(NA_SE_VO_LI_DRINK, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x6811 */ DEFINE_SFX(NA_SE_VO_LI_RELAX, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x6812 */ DEFINE_SFX(NA_SE_VO_LI_SWORD_PUTAWAY, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x6813 */ DEFINE_SFX(NA_SE_VO_LI_GROAN, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x6814 */ DEFINE_SFX(NA_SE_VO_LI_AUTO_JUMP, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x6815 */ DEFINE_SFX(NA_SE_VO_LI_MAGIC_NALE, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x6816 */ DEFINE_SFX(NA_SE_VO_LI_SURPRISE, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x6817 */ DEFINE_SFX(NA_SE_VO_LI_MAGIC_FROL, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x6818 */ DEFINE_SFX(NA_SE_VO_LI_PUSH, 0x30, 2, 2, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x6819 */ DEFINE_SFX(NA_SE_VO_LI_HOOKSHOT_HANG, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x681A */ DEFINE_SFX(NA_SE_VO_LI_LAND_DAMAGE_S, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x681B */ DEFINE_SFX(NA_SE_VO_LI_MAGIC_START, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x681C */ DEFINE_SFX(NA_SE_VO_LI_MAGIC_ATTACK, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x681D */ DEFINE_SFX(NA_SE_VO_BL_DOWN, 0x80, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x681E */ DEFINE_SFX(NA_SE_VO_LI_DEMO_DAMAGE, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x681F */ DEFINE_SFX(NA_SE_VO_LI_SWORD_N_copy30, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x6820 */ DEFINE_SFX(NA_SE_VO_DUMMY_32, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x6821 */ DEFINE_SFX(NA_SE_VO_DUMMY_33, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x6822 */ DEFINE_SFX(NA_SE_VO_DUMMY_34, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x6823 */ DEFINE_SFX(NA_SE_VO_DUMMY_35, 0x20, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x6824 */ DEFINE_SFX(NA_SE_VO_DUMMY_36, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x6825 */ DEFINE_SFX(NA_SE_VO_DUMMY_37, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x6826 */ DEFINE_SFX(NA_SE_VO_DUMMY_38, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x6827 */ DEFINE_SFX(NA_SE_VO_DUMMY_39, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x6828 */ DEFINE_SFX(NA_SE_VO_NAVY_ENEMY, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x6829 */ DEFINE_SFX(NA_SE_VO_NAVY_HELLO, 0x30, 2, 1, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x682A */ DEFINE_SFX(NA_SE_VO_NAVY_HEAR, 0x30, 2, 1, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x682B */ DEFINE_SFX(NA_SE_VO_DUMMY_43, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x682C */ DEFINE_SFX(NA_SE_VO_DUMMY_44, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x682D */ DEFINE_SFX(NA_SE_VO_DUMMY_45, 0x50, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x682E */ DEFINE_SFX(NA_SE_VO_DUMMY_46, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x682F */ DEFINE_SFX(NA_SE_VO_DUMMY_47, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x6830 */ DEFINE_SFX(NA_SE_VO_DUMMY_48, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x6831 */ DEFINE_SFX(NA_SE_VO_DUMMY_49, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x6832 */ DEFINE_SFX(NA_SE_VO_DUMMY_50, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x6833 */ DEFINE_SFX(NA_SE_VO_DUMMY_51, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x6834 */ DEFINE_SFX(NA_SE_VO_DUMMY_52, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x6835 */ DEFINE_SFX(NA_SE_VO_DUMMY_53, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x6836 */ DEFINE_SFX(NA_SE_VO_DUMMY_54, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x6837 */ DEFINE_SFX(NA_SE_VO_DUMMY_55, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x6838 */ DEFINE_SFX(NA_SE_VO_DUMMY_56, 0x30, 1, 2, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x6839 */ DEFINE_SFX(NA_SE_VO_DUMMY_57, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x683A */ DEFINE_SFX(NA_SE_VO_DUMMY_58, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x683B */ DEFINE_SFX(NA_SE_VO_DUMMY_59, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x683C */ DEFINE_SFX(NA_SE_VO_DUMMY_60, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x683D */ DEFINE_SFX(NA_SE_VO_DUMMY_61, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x683E */ DEFINE_SFX(NA_SE_VO_DUMMY_62, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x683F */ DEFINE_SFX(NA_SE_VO_DUMMY_63, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x6840 */ DEFINE_SFX(NA_SE_VO_LK_WAKE_UP, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x6841 */ DEFINE_SFX(NA_SE_VO_LK_CATCH_DEMO, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) /* 0x6842 */ DEFINE_SFX(NA_SE_VO_LK_DRAGGED_DAMAGE, 0x30, 0, 0, 0, 0) -/* 0x6843 */ DEFINE_SFX(NA_SE_VO_NAVY_CALL, 0x60, 0, 0, 0, SFX_FLAG_5) +/* 0x6843 */ DEFINE_SFX(NA_SE_VO_NAVY_CALL, 0x60, 0, 0, 0, SFX_FLAG_BLOCK_EQUAL_IMPORTANCE) /* 0x6844 */ DEFINE_SFX(NA_SE_VO_NA_HELLO_3, 0x30, 0, 0, 0, 0) /* 0x6845 */ DEFINE_SFX(NA_SE_VO_CHAT_MESSAGE_CALL, 0x30, 0, 0, 0, 0) /* 0x6846 */ DEFINE_SFX(NA_SE_VO_BELL_MESSAGE, 0x30, 0, 0, 0, 0) @@ -93,321 +93,321 @@ /* 0x684F */ DEFINE_SFX(NA_SE_VO_DUMMY_79, 0x30, 0, 0, 0, 0) /* 0x6850 */ DEFINE_SFX(NA_SE_VO_NARRATION_0, 0x30, 0, 0, 0, 0) /* 0x6851 */ DEFINE_SFX(NA_SE_VO_TA_SURPRISE, 0x30, 0, 0, 0, 0) -/* 0x6852 */ DEFINE_SFX(NA_SE_VO_TA_CRY_0, 0x30, 1, 1, 0, SFX_FLAG_15) -/* 0x6853 */ DEFINE_SFX(NA_SE_VO_TA_CRY_1, 0x30, 1, 1, 0, SFX_FLAG_15) -/* 0x6854 */ DEFINE_SFX(NA_SE_VO_IN_CRY_0, 0x30, 1, 1, 0, SFX_FLAG_15) -/* 0x6855 */ DEFINE_SFX(NA_SE_VO_IN_LOST, 0x30, 1, 1, 0, SFX_FLAG_15) -/* 0x6856 */ DEFINE_SFX(NA_SE_VO_IN_LASH_0, 0x30, 1, 1, 0, SFX_FLAG_15) -/* 0x6857 */ DEFINE_SFX(NA_SE_VO_IN_LASH_1, 0x30, 1, 1, 0, SFX_FLAG_15) -/* 0x6858 */ DEFINE_SFX(NA_SE_VO_FR_LAUGH_0, 0x30, 1, 1, 0, SFX_FLAG_15) -/* 0x6859 */ DEFINE_SFX(NA_SE_VO_FR_SMILE_0, 0x30, 1, 1, 0, SFX_FLAG_15) -/* 0x685A */ DEFINE_SFX(NA_SE_VO_NB_AGONY, 0x30, 1, 1, 0, SFX_FLAG_15) -/* 0x685B */ DEFINE_SFX(NA_SE_VO_NB_CRY_0, 0x30, 1, 1, 0, SFX_FLAG_15) -/* 0x685C */ DEFINE_SFX(NA_SE_VO_NB_NOTICE, 0x30, 1, 1, 0, SFX_FLAG_15) -/* 0x685D */ DEFINE_SFX(NA_SE_VO_NA_HELLO_0, 0x30, 0, 0, 0, SFX_FLAG_15) -/* 0x685E */ DEFINE_SFX(NA_SE_VO_NA_HELLO_1, 0x30, 0, 0, 0, SFX_FLAG_15) -/* 0x685F */ DEFINE_SFX(NA_SE_VO_NA_HELLO_2, 0x30, 0, 0, 0, SFX_FLAG_15) -/* 0x6860 */ DEFINE_SFX(NA_SE_VO_RT_CRASH, 0x30, 1, 1, 0, SFX_FLAG_15) -/* 0x6861 */ DEFINE_SFX(NA_SE_VO_RT_DISCOVER, 0x30, 1, 1, 0, SFX_FLAG_15) -/* 0x6862 */ DEFINE_SFX(NA_SE_VO_RT_FALL, 0x30, 1, 1, 0, SFX_FLAG_15) -/* 0x6863 */ DEFINE_SFX(NA_SE_VO_RT_LAUGH_0, 0x30, 1, 1, 0, SFX_FLAG_15) -/* 0x6864 */ DEFINE_SFX(NA_SE_VO_RT_LIFT, 0x30, 1, 1, 0, SFX_FLAG_15) -/* 0x6865 */ DEFINE_SFX(NA_SE_VO_RT_THROW, 0x30, 1, 1, 0, SFX_FLAG_15) -/* 0x6866 */ DEFINE_SFX(NA_SE_VO_RT_UNBALLANCE, 0x30, 1, 1, 0, SFX_FLAG_15) -/* 0x6867 */ DEFINE_SFX(NA_SE_VO_ST_DAMAGE, 0x30, 1, 1, 0, SFX_FLAG_15) -/* 0x6868 */ DEFINE_SFX(NA_SE_VO_ST_ATTACK, 0x30, 1, 1, 0, SFX_FLAG_15) -/* 0x6869 */ DEFINE_SFX(NA_SE_VO_Z0_HURRY, 0x30, 1, 1, 0, SFX_FLAG_15) -/* 0x686A */ DEFINE_SFX(NA_SE_VO_Z0_MEET, 0x30, 1, 1, 0, SFX_FLAG_15) -/* 0x686B */ DEFINE_SFX(NA_SE_VO_Z0_QUESTION, 0x30, 1, 1, 0, SFX_FLAG_15) -/* 0x686C */ DEFINE_SFX(NA_SE_VO_Z0_SIGH_0, 0x30, 1, 1, 0, SFX_FLAG_15) -/* 0x686D */ DEFINE_SFX(NA_SE_VO_Z0_SMILE_0, 0x30, 1, 1, 0, SFX_FLAG_15) -/* 0x686E */ DEFINE_SFX(NA_SE_VO_Z0_SURPRISE, 0x30, 1, 1, 0, SFX_FLAG_15) -/* 0x686F */ DEFINE_SFX(NA_SE_VO_Z0_THROW, 0x30, 1, 1, 0, SFX_FLAG_15) -/* 0x6870 */ DEFINE_SFX(NA_SE_VO_SK_CRY_0, 0x30, 1, 1, 0, SFX_FLAG_15) -/* 0x6871 */ DEFINE_SFX(NA_SE_VO_SK_CRY_1, 0x30, 1, 1, 0, SFX_FLAG_15) -/* 0x6872 */ DEFINE_SFX(NA_SE_VO_SK_CRASH, 0x30, 1, 1, 0, SFX_FLAG_15) -/* 0x6873 */ DEFINE_SFX(NA_SE_VO_NA_LISTEN, 0x30, 1, 1, 0, SFX_FLAG_15) -/* 0x6874 */ DEFINE_SFX(NA_SE_VO_SK_SHOUT, 0x30, 1, 0, 0, SFX_FLAG_15) -/* 0x6875 */ DEFINE_SFX(NA_SE_VO_Z1_CRY_0, 0x30, 3, 1, 0, SFX_FLAG_15) -/* 0x6876 */ DEFINE_SFX(NA_SE_VO_Z1_CRY_1, 0x30, 3, 1, 0, SFX_FLAG_15) -/* 0x6877 */ DEFINE_SFX(NA_SE_VO_Z1_OPENDOOR, 0x30, 3, 1, 0, SFX_FLAG_15) -/* 0x6878 */ DEFINE_SFX(NA_SE_VO_FR_SMILE_1, 0x30, 1, 1, 0, SFX_FLAG_15) -/* 0x6879 */ DEFINE_SFX(NA_SE_VO_FR_SMILE_2, 0x30, 1, 1, 0, SFX_FLAG_15) -/* 0x687A */ DEFINE_SFX(NA_SE_VO_KZ_MOVE, 0x30, 1, 1, 0, SFX_FLAG_15) -/* 0x687B */ DEFINE_SFX(NA_SE_VO_NB_LAUGH, 0x30, 1, 1, 0, SFX_FLAG_15) -/* 0x687C */ DEFINE_SFX(NA_SE_VO_IN_JOY0, 0x30, 1, 1, 0, SFX_FLAG_15) -/* 0x687D */ DEFINE_SFX(NA_SE_VO_IN_JOY1, 0x30, 1, 1, 0, SFX_FLAG_15) -/* 0x687E */ DEFINE_SFX(NA_SE_VO_IN_JOY2, 0x30, 1, 1, 0, SFX_FLAG_15) -/* 0x687F */ DEFINE_SFX(NA_SE_VO_DUMMY_127, 0x30, 1, 1, 0, SFX_FLAG_15) -/* 0x6880 */ DEFINE_SFX(NA_SE_VO_DUMMY_128, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x6881 */ DEFINE_SFX(NA_SE_VO_DUMMY_129, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x6882 */ DEFINE_SFX(NA_SE_VO_DUMMY_130, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x6883 */ DEFINE_SFX(NA_SE_VO_DUMMY_131, 0x20, 2, 0, 0, SFX_FLAG_10) -/* 0x6884 */ DEFINE_SFX(NA_SE_VO_DUMMY_132, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x6885 */ DEFINE_SFX(NA_SE_VO_DUMMY_133, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x6886 */ DEFINE_SFX(NA_SE_VO_DUMMY_134, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x6887 */ DEFINE_SFX(NA_SE_VO_DUMMY_135, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x6888 */ DEFINE_SFX(NA_SE_VO_DUMMY_136, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x6889 */ DEFINE_SFX(NA_SE_VO_DUMMY_137, 0x30, 2, 1, 0, SFX_FLAG_10) -/* 0x688A */ DEFINE_SFX(NA_SE_VO_DUMMY_138, 0x30, 2, 1, 0, SFX_FLAG_10) -/* 0x688B */ DEFINE_SFX(NA_SE_VO_DUMMY_139, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x688C */ DEFINE_SFX(NA_SE_VO_DUMMY_140, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x688D */ DEFINE_SFX(NA_SE_VO_DUMMY_141, 0x50, 2, 0, 0, SFX_FLAG_10) -/* 0x688E */ DEFINE_SFX(NA_SE_VO_DUMMY_142, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x688F */ DEFINE_SFX(NA_SE_VO_DUMMY_143, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x6890 */ DEFINE_SFX(NA_SE_VO_DUMMY_144, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x6891 */ DEFINE_SFX(NA_SE_VO_DUMMY_145, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x6892 */ DEFINE_SFX(NA_SE_VO_DUMMY_146, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x6893 */ DEFINE_SFX(NA_SE_VO_DUMMY_147, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x6894 */ DEFINE_SFX(NA_SE_VO_DUMMY_148, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x6895 */ DEFINE_SFX(NA_SE_VO_DUMMY_149, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x6896 */ DEFINE_SFX(NA_SE_VO_DUMMY_150, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x6897 */ DEFINE_SFX(NA_SE_VO_DUMMY_151, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x6898 */ DEFINE_SFX(NA_SE_VO_DUMMY_152, 0x30, 1, 2, 0, SFX_FLAG_10) -/* 0x6899 */ DEFINE_SFX(NA_SE_VO_DUMMY_153, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x689A */ DEFINE_SFX(NA_SE_VO_DUMMY_154, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x689B */ DEFINE_SFX(NA_SE_VO_DUMMY_155, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x689C */ DEFINE_SFX(NA_SE_VO_DUMMY_156, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x689D */ DEFINE_SFX(NA_SE_VO_DUMMY_157, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x689E */ DEFINE_SFX(NA_SE_VO_DUMMY_158, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x689F */ DEFINE_SFX(NA_SE_VO_DUMMY_159, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x68A0 */ DEFINE_SFX(NA_SE_VO_DUMMY_160, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x68A1 */ DEFINE_SFX(NA_SE_VO_DUMMY_161, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x68A2 */ DEFINE_SFX(NA_SE_VO_DUMMY_162, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x68A3 */ DEFINE_SFX(NA_SE_VO_DUMMY_163, 0x20, 2, 0, 0, SFX_FLAG_10) -/* 0x68A4 */ DEFINE_SFX(NA_SE_VO_DUMMY_164, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x68A5 */ DEFINE_SFX(NA_SE_VO_DUMMY_165, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x68A6 */ DEFINE_SFX(NA_SE_VO_DUMMY_166, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x68A7 */ DEFINE_SFX(NA_SE_VO_DUMMY_167, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x68A8 */ DEFINE_SFX(NA_SE_VO_DUMMY_168, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x68A9 */ DEFINE_SFX(NA_SE_VO_DUMMY_169, 0x30, 2, 1, 0, SFX_FLAG_10) -/* 0x68AA */ DEFINE_SFX(NA_SE_VO_DUMMY_170, 0x30, 2, 1, 0, SFX_FLAG_10) -/* 0x68AB */ DEFINE_SFX(NA_SE_VO_DUMMY_171, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x68AC */ DEFINE_SFX(NA_SE_VO_DUMMY_172, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x68AD */ DEFINE_SFX(NA_SE_VO_DUMMY_173, 0x50, 2, 0, 0, SFX_FLAG_10) -/* 0x68AE */ DEFINE_SFX(NA_SE_VO_DUMMY_174, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x68AF */ DEFINE_SFX(NA_SE_VO_DUMMY_175, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x68B0 */ DEFINE_SFX(NA_SE_VO_DUMMY_176, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x68B1 */ DEFINE_SFX(NA_SE_VO_DUMMY_177, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x68B2 */ DEFINE_SFX(NA_SE_VO_DUMMY_178, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x68B3 */ DEFINE_SFX(NA_SE_VO_DUMMY_179, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x68B4 */ DEFINE_SFX(NA_SE_VO_DUMMY_180, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x68B5 */ DEFINE_SFX(NA_SE_VO_DUMMY_181, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x68B6 */ DEFINE_SFX(NA_SE_VO_DUMMY_182, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x68B7 */ DEFINE_SFX(NA_SE_VO_DUMMY_183, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x68B8 */ DEFINE_SFX(NA_SE_VO_DUMMY_184, 0x30, 2, 2, 0, SFX_FLAG_10) -/* 0x68B9 */ DEFINE_SFX(NA_SE_VO_DUMMY_185, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x68BA */ DEFINE_SFX(NA_SE_VO_DUMMY_186, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x68BB */ DEFINE_SFX(NA_SE_VO_DUMMY_187, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x68BC */ DEFINE_SFX(NA_SE_VO_DUMMY_188, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x68BD */ DEFINE_SFX(NA_SE_VO_DUMMY_189, 0x80, 2, 0, 0, SFX_FLAG_10) -/* 0x68BE */ DEFINE_SFX(NA_SE_VO_DUMMY_190, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x68BF */ DEFINE_SFX(NA_SE_VO_DUMMY_191, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x68C0 */ DEFINE_SFX(NA_SE_VO_DUMMY_192, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x68C1 */ DEFINE_SFX(NA_SE_VO_DUMMY_193, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x68C2 */ DEFINE_SFX(NA_SE_VO_DUMMY_194, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x68C3 */ DEFINE_SFX(NA_SE_VO_DUMMY_195, 0x20, 2, 0, 0, SFX_FLAG_10) -/* 0x68C4 */ DEFINE_SFX(NA_SE_VO_DUMMY_196, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x68C5 */ DEFINE_SFX(NA_SE_VO_DUMMY_197, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x68C6 */ DEFINE_SFX(NA_SE_VO_DUMMY_198, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x68C7 */ DEFINE_SFX(NA_SE_VO_DUMMY_199, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x68C8 */ DEFINE_SFX(NA_SE_VO_DUMMY_200, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x68C9 */ DEFINE_SFX(NA_SE_VO_DUMMY_201, 0x30, 2, 1, 0, SFX_FLAG_10) -/* 0x68CA */ DEFINE_SFX(NA_SE_VO_DUMMY_202, 0x30, 2, 1, 0, SFX_FLAG_10) -/* 0x68CB */ DEFINE_SFX(NA_SE_VO_DUMMY_203, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x68CC */ DEFINE_SFX(NA_SE_VO_DUMMY_204, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x68CD */ DEFINE_SFX(NA_SE_VO_DUMMY_205, 0x50, 2, 0, 0, SFX_FLAG_10) -/* 0x68CE */ DEFINE_SFX(NA_SE_VO_DUMMY_206, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x68CF */ DEFINE_SFX(NA_SE_VO_DUMMY_207, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x68D0 */ DEFINE_SFX(NA_SE_VO_DUMMY_208, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x68D1 */ DEFINE_SFX(NA_SE_VO_DUMMY_209, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x68D2 */ DEFINE_SFX(NA_SE_VO_DUMMY_210, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x68D3 */ DEFINE_SFX(NA_SE_VO_DUMMY_211, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x68D4 */ DEFINE_SFX(NA_SE_VO_DUMMY_212, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x68D5 */ DEFINE_SFX(NA_SE_VO_DUMMY_213, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x68D6 */ DEFINE_SFX(NA_SE_VO_DUMMY_214, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x68D7 */ DEFINE_SFX(NA_SE_VO_DUMMY_215, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x68D8 */ DEFINE_SFX(NA_SE_VO_DUMMY_216, 0x30, 2, 2, 0, SFX_FLAG_10) -/* 0x68D9 */ DEFINE_SFX(NA_SE_VO_DUMMY_217, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x68DA */ DEFINE_SFX(NA_SE_VO_DUMMY_218, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x68DB */ DEFINE_SFX(NA_SE_VO_DUMMY_219, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x68DC */ DEFINE_SFX(NA_SE_VO_DUMMY_220, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x68DD */ DEFINE_SFX(NA_SE_VO_DUMMY_221, 0x80, 2, 0, 0, SFX_FLAG_10) -/* 0x68DE */ DEFINE_SFX(NA_SE_VO_DUMMY_222, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x68DF */ DEFINE_SFX(NA_SE_VO_DUMMY_223, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x68E0 */ DEFINE_SFX(NA_SE_VO_LI_POO_WAIT, 0x30, 2, 1, 0, SFX_FLAG_10) -/* 0x68E1 */ DEFINE_SFX(NA_SE_VO_DUMMY_225, 0x30, 2, 1, 0, SFX_FLAG_10) -/* 0x68E2 */ DEFINE_SFX(NA_SE_VO_DUMMY_226, 0x30, 2, 1, 0, SFX_FLAG_10) -/* 0x68E3 */ DEFINE_SFX(NA_SE_VO_DUMMY_227, 0x20, 2, 1, 0, SFX_FLAG_10) -/* 0x68E4 */ DEFINE_SFX(NA_SE_VO_DUMMY_228, 0x30, 2, 1, 0, SFX_FLAG_10) -/* 0x68E5 */ DEFINE_SFX(NA_SE_VO_DUMMY_229, 0x30, 2, 1, 0, SFX_FLAG_10) -/* 0x68E6 */ DEFINE_SFX(NA_SE_VO_DUMMY_230, 0x30, 2, 1, 0, SFX_FLAG_10) -/* 0x68E7 */ DEFINE_SFX(NA_SE_VO_DUMMY_231, 0x30, 2, 1, 0, SFX_FLAG_10) -/* 0x68E8 */ DEFINE_SFX(NA_SE_VO_DUMMY_232, 0x30, 2, 1, 0, SFX_FLAG_10) -/* 0x68E9 */ DEFINE_SFX(NA_SE_VO_DUMMY_233, 0x30, 2, 1, 0, SFX_FLAG_10) -/* 0x68EA */ DEFINE_SFX(NA_SE_VO_DUMMY_234, 0x30, 2, 1, 0, SFX_FLAG_10) -/* 0x68EB */ DEFINE_SFX(NA_SE_VO_DUMMY_235, 0x30, 2, 1, 0, SFX_FLAG_10) -/* 0x68EC */ DEFINE_SFX(NA_SE_VO_DUMMY_236, 0x30, 2, 1, 0, SFX_FLAG_10) -/* 0x68ED */ DEFINE_SFX(NA_SE_VO_DUMMY_237, 0x50, 2, 1, 0, SFX_FLAG_10) -/* 0x68EE */ DEFINE_SFX(NA_SE_VO_DUMMY_238, 0x30, 2, 1, 0, SFX_FLAG_10) -/* 0x68EF */ DEFINE_SFX(NA_SE_VO_DUMMY_239, 0x30, 2, 1, 0, SFX_FLAG_10) -/* 0x68F0 */ DEFINE_SFX(NA_SE_VO_DUMMY_240, 0x30, 2, 1, 0, SFX_FLAG_10) -/* 0x68F1 */ DEFINE_SFX(NA_SE_VO_DUMMY_241, 0x30, 2, 1, 0, SFX_FLAG_10) -/* 0x68F2 */ DEFINE_SFX(NA_SE_VO_DUMMY_242, 0x30, 2, 1, 0, SFX_FLAG_10) -/* 0x68F3 */ DEFINE_SFX(NA_SE_VO_DUMMY_243, 0x30, 2, 1, 0, SFX_FLAG_10) -/* 0x68F4 */ DEFINE_SFX(NA_SE_VO_DUMMY_244, 0x30, 2, 1, 0, SFX_FLAG_10) -/* 0x68F5 */ DEFINE_SFX(NA_SE_VO_DUMMY_245, 0x30, 2, 1, 0, SFX_FLAG_10) -/* 0x68F6 */ DEFINE_SFX(NA_SE_VO_DUMMY_246, 0x30, 2, 1, 0, SFX_FLAG_10) -/* 0x68F7 */ DEFINE_SFX(NA_SE_VO_DUMMY_247, 0x30, 2, 1, 0, SFX_FLAG_10) -/* 0x68F8 */ DEFINE_SFX(NA_SE_VO_DUMMY_248, 0x30, 2, 2, 0, SFX_FLAG_10) -/* 0x68F9 */ DEFINE_SFX(NA_SE_VO_DUMMY_249, 0x30, 2, 1, 0, SFX_FLAG_10) -/* 0x68FA */ DEFINE_SFX(NA_SE_VO_DUMMY_250, 0x30, 2, 1, 0, SFX_FLAG_10) -/* 0x68FB */ DEFINE_SFX(NA_SE_VO_DUMMY_251, 0x30, 2, 1, 0, SFX_FLAG_10) -/* 0x68FC */ DEFINE_SFX(NA_SE_VO_DUMMY_252, 0x30, 2, 1, 0, SFX_FLAG_10) -/* 0x68FD */ DEFINE_SFX(NA_SE_VO_DUMMY_253, 0x80, 2, 1, 0, SFX_FLAG_10) -/* 0x68FE */ DEFINE_SFX(NA_SE_VO_DUMMY_254, 0x30, 2, 1, 0, SFX_FLAG_10) -/* 0x68FF */ DEFINE_SFX(NA_SE_VO_DUMMY_255, 0x30, 2, 1, SFX_FLAG2_7, SFX_FLAG_10) -/* 0x6900 */ DEFINE_SFX(NA_SE_VO_JMVO02, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x6901 */ DEFINE_SFX(NA_SE_VO_JMVO04, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x6902 */ DEFINE_SFX(NA_SE_VO_CDVO00, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x6903 */ DEFINE_SFX(NA_SE_VO_CDVO01, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x6904 */ DEFINE_SFX(NA_SE_VO_CDVO02, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x6905 */ DEFINE_SFX(NA_SE_VO_CDVO03, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x6906 */ DEFINE_SFX(NA_SE_VO_BBVO00, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x6907 */ DEFINE_SFX(NA_SE_VO_BBVO01, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x6908 */ DEFINE_SFX(NA_SE_VO_BBVO02, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x6909 */ DEFINE_SFX(NA_SE_VO_BBVO03, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x690A */ DEFINE_SFX(NA_SE_VO_BBVO04, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x690B */ DEFINE_SFX(NA_SE_VO_BBVO05, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x690C */ DEFINE_SFX(NA_SE_VO_OBVO01, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x690D */ DEFINE_SFX(NA_SE_VO_ARVO00, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x690E */ DEFINE_SFX(NA_SE_VO_ARVO01, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x690F */ DEFINE_SFX(NA_SE_VO_MMVO00, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x6910 */ DEFINE_SFX(NA_SE_VO_MMVO01, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x6911 */ DEFINE_SFX(NA_SE_VO_MMVO02, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x6912 */ DEFINE_SFX(NA_SE_VO_MMVO03, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x6913 */ DEFINE_SFX(NA_SE_VO_MMVO04, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x6914 */ DEFINE_SFX(NA_SE_VO_MMVO05, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x6915 */ DEFINE_SFX(NA_SE_VO_ABVO00, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x6916 */ DEFINE_SFX(NA_SE_VO_ABVO01, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x6917 */ DEFINE_SFX(NA_SE_VO_NPVO00, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x6918 */ DEFINE_SFX(NA_SE_VO_FPVO00, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x6919 */ DEFINE_SFX(NA_SE_VO_FPVO01, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x691A */ DEFINE_SFX(NA_SE_VO_FPVO02, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x691B */ DEFINE_SFX(NA_SE_VO_FPVO03, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x691C */ DEFINE_SFX(NA_SE_VO_ROVO01, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x691D */ DEFINE_SFX(NA_SE_VO_ROVO02, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x691E */ DEFINE_SFX(NA_SE_VO_RYVO01, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x691F */ DEFINE_SFX(NA_SE_VO_RYVO02, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x6920 */ DEFINE_SFX(NA_SE_VO_RYVO03, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x6921 */ DEFINE_SFX(NA_SE_VO_RYVO04, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x6922 */ DEFINE_SFX(NA_SE_VO_ANVO00, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x6923 */ DEFINE_SFX(NA_SE_VO_ANVO01, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x6924 */ DEFINE_SFX(NA_SE_VO_ANVO02, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x6925 */ DEFINE_SFX(NA_SE_VO_ANVO03, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x6926 */ DEFINE_SFX(NA_SE_VO_CRVO00, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x6927 */ DEFINE_SFX(NA_SE_VO_CRVO01, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x6928 */ DEFINE_SFX(NA_SE_VO_CRVO02, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x6929 */ DEFINE_SFX(NA_SE_VO_CRVO03, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x692A */ DEFINE_SFX(NA_SE_VO_HNVO00, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x692B */ DEFINE_SFX(NA_SE_VO_HNVO01, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x692C */ DEFINE_SFX(NA_SE_VO_HNVO02, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x692D */ DEFINE_SFX(NA_SE_VO_RMVO00, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x692E */ DEFINE_SFX(NA_SE_VO_RMVO01, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x692F */ DEFINE_SFX(NA_SE_VO_RMVO02, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x6930 */ DEFINE_SFX(NA_SE_VO_PMVO01, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x6931 */ DEFINE_SFX(NA_SE_VO_PMVO02, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x6932 */ DEFINE_SFX(NA_SE_VO_PMVO03, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x6933 */ DEFINE_SFX(NA_SE_VO_DHVO00, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x6934 */ DEFINE_SFX(NA_SE_VO_DHVO01, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x6935 */ DEFINE_SFX(NA_SE_VO_DHVO02, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x6936 */ DEFINE_SFX(NA_SE_VO_DHVO03, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x6937 */ DEFINE_SFX(NA_SE_VO_DHVO04, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x6938 */ DEFINE_SFX(NA_SE_VO_TFVO00, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x6939 */ DEFINE_SFX(NA_SE_VO_ANVO04, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x693A */ DEFINE_SFX(NA_SE_VO_ANVO05, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x693B */ DEFINE_SFX(NA_SE_VO_PMVO00, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x693C */ DEFINE_SFX(NA_SE_VO_CHVO03, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x693D */ DEFINE_SFX(NA_SE_VO_CHVO04, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x693E */ DEFINE_SFX(NA_SE_VO_CHVO05, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x693F */ DEFINE_SFX(NA_SE_VO_CHVO06, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x6940 */ DEFINE_SFX(NA_SE_VO_CHVO07, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x6941 */ DEFINE_SFX(NA_SE_VO_CHVO08, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x6942 */ DEFINE_SFX(NA_SE_VO_CHVO09, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x6943 */ DEFINE_SFX(NA_SE_VO_DPVO00, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x6944 */ DEFINE_SFX(NA_SE_VO_DPVO01, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x6945 */ DEFINE_SFX(NA_SE_VO_DPVO02, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x6946 */ DEFINE_SFX(NA_SE_VO_SKVO00, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x6947 */ DEFINE_SFX(NA_SE_VO_SKVO01, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x6948 */ DEFINE_SFX(NA_SE_VO_KHVO00, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x6949 */ DEFINE_SFX(NA_SE_VO_KHVO01, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x694A */ DEFINE_SFX(NA_SE_VO_KHVO02, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x694B */ DEFINE_SFX(NA_SE_VO_SHVO00, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x694C */ DEFINE_SFX(NA_SE_VO_SHVO01, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x694D */ DEFINE_SFX(NA_SE_VO_KAVO02, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x694E */ DEFINE_SFX(NA_SE_VO_KAVO03, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x694F */ DEFINE_SFX(NA_SE_VO_MTVO00, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x6950 */ DEFINE_SFX(NA_SE_VO_TTVO00, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x6951 */ DEFINE_SFX(NA_SE_VO_ITVO00, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x6952 */ DEFINE_SFX(NA_SE_VO_ITVO01, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x6953 */ DEFINE_SFX(NA_SE_VO_ITVO02, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x6954 */ DEFINE_SFX(NA_SE_VO_KMVO00, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x6955 */ DEFINE_SFX(NA_SE_VO_KMVO01, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x6956 */ DEFINE_SFX(NA_SE_VO_JOVO00, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x6957 */ DEFINE_SFX(NA_SE_VO_JYVO00, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x6958 */ DEFINE_SFX(NA_SE_VO_DTVO00, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x6959 */ DEFINE_SFX(NA_SE_VO_GUVO00, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x695A */ DEFINE_SFX(NA_SE_VO_KTVO00, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x695B */ DEFINE_SFX(NA_SE_VO_KTVO01, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x695C */ DEFINE_SFX(NA_SE_VO_KTVO03, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x695D */ DEFINE_SFX(NA_SE_VO_ZBVO00, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x695E */ DEFINE_SFX(NA_SE_VO_ZBVO01, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x695F */ DEFINE_SFX(NA_SE_VO_DAVO01, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x6960 */ DEFINE_SFX(NA_SE_VO_SHVO04, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x6961 */ DEFINE_SFX(NA_SE_VO_GBVO02, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x6962 */ DEFINE_SFX(NA_SE_VO_GBVO03, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x6963 */ DEFINE_SFX(NA_SE_VO_PFVO00, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x6964 */ DEFINE_SFX(NA_SE_VO_PFVO01, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x6965 */ DEFINE_SFX(NA_SE_VO_GAVO00, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x6966 */ DEFINE_SFX(NA_SE_VO_GAVO01, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x6967 */ DEFINE_SFX(NA_SE_VO_DJVO00, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x6968 */ DEFINE_SFX(NA_SE_VO_DJVO01, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x6969 */ DEFINE_SFX(NA_SE_VO_MSVO00, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x696A */ DEFINE_SFX(NA_SE_VO_MSVO01, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x696B */ DEFINE_SFX(NA_SE_VO_JPVO00, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x696C */ DEFINE_SFX(NA_SE_VO_HYVO00, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x696D */ DEFINE_SFX(NA_SE_VO_HYVO01, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x696E */ DEFINE_SFX(NA_SE_VO_BAVO00, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x696F */ DEFINE_SFX(NA_SE_VO_POVO00, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x6970 */ DEFINE_SFX(NA_SE_VO_DAVO00, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x6971 */ DEFINE_SFX(NA_SE_VO_DAVO02, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x6972 */ DEFINE_SFX(NA_SE_VO_MKVO00, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x6973 */ DEFINE_SFX(NA_SE_VO_MKVO01, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x6974 */ DEFINE_SFX(NA_SE_VO_MKVO02, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x6975 */ DEFINE_SFX(NA_SE_VO_MKVO03, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x6976 */ DEFINE_SFX(NA_SE_VO_MKVO04, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x6977 */ DEFINE_SFX(NA_SE_VO_TIVO00, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x6978 */ DEFINE_SFX(NA_SE_VO_TIVO01, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x6979 */ DEFINE_SFX(NA_SE_VO_TIVO02, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x697A */ DEFINE_SFX(NA_SE_VO_TIVO03, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x697B */ DEFINE_SFX(NA_SE_VO_TIVO04, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x697C */ DEFINE_SFX(NA_SE_VO_TIVO05, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x697D */ DEFINE_SFX(NA_SE_VO_OMVO00, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x697E */ DEFINE_SFX(NA_SE_VO_OMVO01, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x697F */ DEFINE_SFX(NA_SE_VO_OMVO02, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x6980 */ DEFINE_SFX(NA_SE_VO_OMVO03, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x6981 */ DEFINE_SFX(NA_SE_VO_OMVO04, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x6982 */ DEFINE_SFX(NA_SE_VO_OMVO05, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x6983 */ DEFINE_SFX(NA_SE_VO_OMVO06, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x6984 */ DEFINE_SFX(NA_SE_VO_DEMO_FALL2, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x6985 */ DEFINE_SFX(NA_SE_VO_DEMO_384, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x6986 */ DEFINE_SFX(NA_SE_VO_DEMO_385, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x6987 */ DEFINE_SFX(NA_SE_VO_DEMO_386, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x6988 */ DEFINE_SFX(NA_SE_VO_DEMO_387, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x6989 */ DEFINE_SFX(NA_SE_VO_DEMO_388, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x698A */ DEFINE_SFX(NA_SE_VO_DEMO_389, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x698B */ DEFINE_SFX(NA_SE_VO_DEMO_390, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x698C */ DEFINE_SFX(NA_SE_VO_DEMO_391, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x698D */ DEFINE_SFX(NA_SE_VO_DEMO_392, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x698E */ DEFINE_SFX(NA_SE_VO_DEMO_393, 0x30, 2, 0, 0, SFX_FLAG_10) -/* 0x698E */ DEFINE_SFX(NA_SE_VO_DEMO_394, 0x30, 2, 0, 0, SFX_FLAG_10) +/* 0x6852 */ DEFINE_SFX(NA_SE_VO_TA_CRY_0, 0x30, 1, 1, 0, SFX_FLAG_FREQ_NO_DIST) +/* 0x6853 */ DEFINE_SFX(NA_SE_VO_TA_CRY_1, 0x30, 1, 1, 0, SFX_FLAG_FREQ_NO_DIST) +/* 0x6854 */ DEFINE_SFX(NA_SE_VO_IN_CRY_0, 0x30, 1, 1, 0, SFX_FLAG_FREQ_NO_DIST) +/* 0x6855 */ DEFINE_SFX(NA_SE_VO_IN_LOST, 0x30, 1, 1, 0, SFX_FLAG_FREQ_NO_DIST) +/* 0x6856 */ DEFINE_SFX(NA_SE_VO_IN_LASH_0, 0x30, 1, 1, 0, SFX_FLAG_FREQ_NO_DIST) +/* 0x6857 */ DEFINE_SFX(NA_SE_VO_IN_LASH_1, 0x30, 1, 1, 0, SFX_FLAG_FREQ_NO_DIST) +/* 0x6858 */ DEFINE_SFX(NA_SE_VO_FR_LAUGH_0, 0x30, 1, 1, 0, SFX_FLAG_FREQ_NO_DIST) +/* 0x6859 */ DEFINE_SFX(NA_SE_VO_FR_SMILE_0, 0x30, 1, 1, 0, SFX_FLAG_FREQ_NO_DIST) +/* 0x685A */ DEFINE_SFX(NA_SE_VO_NB_AGONY, 0x30, 1, 1, 0, SFX_FLAG_FREQ_NO_DIST) +/* 0x685B */ DEFINE_SFX(NA_SE_VO_NB_CRY_0, 0x30, 1, 1, 0, SFX_FLAG_FREQ_NO_DIST) +/* 0x685C */ DEFINE_SFX(NA_SE_VO_NB_NOTICE, 0x30, 1, 1, 0, SFX_FLAG_FREQ_NO_DIST) +/* 0x685D */ DEFINE_SFX(NA_SE_VO_NA_HELLO_0, 0x30, 0, 0, 0, SFX_FLAG_FREQ_NO_DIST) +/* 0x685E */ DEFINE_SFX(NA_SE_VO_NA_HELLO_1, 0x30, 0, 0, 0, SFX_FLAG_FREQ_NO_DIST) +/* 0x685F */ DEFINE_SFX(NA_SE_VO_NA_HELLO_2, 0x30, 0, 0, 0, SFX_FLAG_FREQ_NO_DIST) +/* 0x6860 */ DEFINE_SFX(NA_SE_VO_RT_CRASH, 0x30, 1, 1, 0, SFX_FLAG_FREQ_NO_DIST) +/* 0x6861 */ DEFINE_SFX(NA_SE_VO_RT_DISCOVER, 0x30, 1, 1, 0, SFX_FLAG_FREQ_NO_DIST) +/* 0x6862 */ DEFINE_SFX(NA_SE_VO_RT_FALL, 0x30, 1, 1, 0, SFX_FLAG_FREQ_NO_DIST) +/* 0x6863 */ DEFINE_SFX(NA_SE_VO_RT_LAUGH_0, 0x30, 1, 1, 0, SFX_FLAG_FREQ_NO_DIST) +/* 0x6864 */ DEFINE_SFX(NA_SE_VO_RT_LIFT, 0x30, 1, 1, 0, SFX_FLAG_FREQ_NO_DIST) +/* 0x6865 */ DEFINE_SFX(NA_SE_VO_RT_THROW, 0x30, 1, 1, 0, SFX_FLAG_FREQ_NO_DIST) +/* 0x6866 */ DEFINE_SFX(NA_SE_VO_RT_UNBALLANCE, 0x30, 1, 1, 0, SFX_FLAG_FREQ_NO_DIST) +/* 0x6867 */ DEFINE_SFX(NA_SE_VO_ST_DAMAGE, 0x30, 1, 1, 0, SFX_FLAG_FREQ_NO_DIST) +/* 0x6868 */ DEFINE_SFX(NA_SE_VO_ST_ATTACK, 0x30, 1, 1, 0, SFX_FLAG_FREQ_NO_DIST) +/* 0x6869 */ DEFINE_SFX(NA_SE_VO_Z0_HURRY, 0x30, 1, 1, 0, SFX_FLAG_FREQ_NO_DIST) +/* 0x686A */ DEFINE_SFX(NA_SE_VO_Z0_MEET, 0x30, 1, 1, 0, SFX_FLAG_FREQ_NO_DIST) +/* 0x686B */ DEFINE_SFX(NA_SE_VO_Z0_QUESTION, 0x30, 1, 1, 0, SFX_FLAG_FREQ_NO_DIST) +/* 0x686C */ DEFINE_SFX(NA_SE_VO_Z0_SIGH_0, 0x30, 1, 1, 0, SFX_FLAG_FREQ_NO_DIST) +/* 0x686D */ DEFINE_SFX(NA_SE_VO_Z0_SMILE_0, 0x30, 1, 1, 0, SFX_FLAG_FREQ_NO_DIST) +/* 0x686E */ DEFINE_SFX(NA_SE_VO_Z0_SURPRISE, 0x30, 1, 1, 0, SFX_FLAG_FREQ_NO_DIST) +/* 0x686F */ DEFINE_SFX(NA_SE_VO_Z0_THROW, 0x30, 1, 1, 0, SFX_FLAG_FREQ_NO_DIST) +/* 0x6870 */ DEFINE_SFX(NA_SE_VO_SK_CRY_0, 0x30, 1, 1, 0, SFX_FLAG_FREQ_NO_DIST) +/* 0x6871 */ DEFINE_SFX(NA_SE_VO_SK_CRY_1, 0x30, 1, 1, 0, SFX_FLAG_FREQ_NO_DIST) +/* 0x6872 */ DEFINE_SFX(NA_SE_VO_SK_CRASH, 0x30, 1, 1, 0, SFX_FLAG_FREQ_NO_DIST) +/* 0x6873 */ DEFINE_SFX(NA_SE_VO_NA_LISTEN, 0x30, 1, 1, 0, SFX_FLAG_FREQ_NO_DIST) +/* 0x6874 */ DEFINE_SFX(NA_SE_VO_SK_SHOUT, 0x30, 1, 0, 0, SFX_FLAG_FREQ_NO_DIST) +/* 0x6875 */ DEFINE_SFX(NA_SE_VO_Z1_CRY_0, 0x30, 3, 1, 0, SFX_FLAG_FREQ_NO_DIST) +/* 0x6876 */ DEFINE_SFX(NA_SE_VO_Z1_CRY_1, 0x30, 3, 1, 0, SFX_FLAG_FREQ_NO_DIST) +/* 0x6877 */ DEFINE_SFX(NA_SE_VO_Z1_OPENDOOR, 0x30, 3, 1, 0, SFX_FLAG_FREQ_NO_DIST) +/* 0x6878 */ DEFINE_SFX(NA_SE_VO_FR_SMILE_1, 0x30, 1, 1, 0, SFX_FLAG_FREQ_NO_DIST) +/* 0x6879 */ DEFINE_SFX(NA_SE_VO_FR_SMILE_2, 0x30, 1, 1, 0, SFX_FLAG_FREQ_NO_DIST) +/* 0x687A */ DEFINE_SFX(NA_SE_VO_KZ_MOVE, 0x30, 1, 1, 0, SFX_FLAG_FREQ_NO_DIST) +/* 0x687B */ DEFINE_SFX(NA_SE_VO_NB_LAUGH, 0x30, 1, 1, 0, SFX_FLAG_FREQ_NO_DIST) +/* 0x687C */ DEFINE_SFX(NA_SE_VO_IN_JOY0, 0x30, 1, 1, 0, SFX_FLAG_FREQ_NO_DIST) +/* 0x687D */ DEFINE_SFX(NA_SE_VO_IN_JOY1, 0x30, 1, 1, 0, SFX_FLAG_FREQ_NO_DIST) +/* 0x687E */ DEFINE_SFX(NA_SE_VO_IN_JOY2, 0x30, 1, 1, 0, SFX_FLAG_FREQ_NO_DIST) +/* 0x687F */ DEFINE_SFX(NA_SE_VO_DUMMY_127, 0x30, 1, 1, 0, SFX_FLAG_FREQ_NO_DIST) +/* 0x6880 */ DEFINE_SFX(NA_SE_VO_DUMMY_128, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x6881 */ DEFINE_SFX(NA_SE_VO_DUMMY_129, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x6882 */ DEFINE_SFX(NA_SE_VO_DUMMY_130, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x6883 */ DEFINE_SFX(NA_SE_VO_DUMMY_131, 0x20, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x6884 */ DEFINE_SFX(NA_SE_VO_DUMMY_132, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x6885 */ DEFINE_SFX(NA_SE_VO_DUMMY_133, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x6886 */ DEFINE_SFX(NA_SE_VO_DUMMY_134, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x6887 */ DEFINE_SFX(NA_SE_VO_DUMMY_135, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x6888 */ DEFINE_SFX(NA_SE_VO_DUMMY_136, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x6889 */ DEFINE_SFX(NA_SE_VO_DUMMY_137, 0x30, 2, 1, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x688A */ DEFINE_SFX(NA_SE_VO_DUMMY_138, 0x30, 2, 1, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x688B */ DEFINE_SFX(NA_SE_VO_DUMMY_139, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x688C */ DEFINE_SFX(NA_SE_VO_DUMMY_140, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x688D */ DEFINE_SFX(NA_SE_VO_DUMMY_141, 0x50, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x688E */ DEFINE_SFX(NA_SE_VO_DUMMY_142, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x688F */ DEFINE_SFX(NA_SE_VO_DUMMY_143, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x6890 */ DEFINE_SFX(NA_SE_VO_DUMMY_144, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x6891 */ DEFINE_SFX(NA_SE_VO_DUMMY_145, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x6892 */ DEFINE_SFX(NA_SE_VO_DUMMY_146, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x6893 */ DEFINE_SFX(NA_SE_VO_DUMMY_147, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x6894 */ DEFINE_SFX(NA_SE_VO_DUMMY_148, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x6895 */ DEFINE_SFX(NA_SE_VO_DUMMY_149, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x6896 */ DEFINE_SFX(NA_SE_VO_DUMMY_150, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x6897 */ DEFINE_SFX(NA_SE_VO_DUMMY_151, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x6898 */ DEFINE_SFX(NA_SE_VO_DUMMY_152, 0x30, 1, 2, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x6899 */ DEFINE_SFX(NA_SE_VO_DUMMY_153, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x689A */ DEFINE_SFX(NA_SE_VO_DUMMY_154, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x689B */ DEFINE_SFX(NA_SE_VO_DUMMY_155, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x689C */ DEFINE_SFX(NA_SE_VO_DUMMY_156, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x689D */ DEFINE_SFX(NA_SE_VO_DUMMY_157, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x689E */ DEFINE_SFX(NA_SE_VO_DUMMY_158, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x689F */ DEFINE_SFX(NA_SE_VO_DUMMY_159, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x68A0 */ DEFINE_SFX(NA_SE_VO_DUMMY_160, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x68A1 */ DEFINE_SFX(NA_SE_VO_DUMMY_161, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x68A2 */ DEFINE_SFX(NA_SE_VO_DUMMY_162, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x68A3 */ DEFINE_SFX(NA_SE_VO_DUMMY_163, 0x20, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x68A4 */ DEFINE_SFX(NA_SE_VO_DUMMY_164, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x68A5 */ DEFINE_SFX(NA_SE_VO_DUMMY_165, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x68A6 */ DEFINE_SFX(NA_SE_VO_DUMMY_166, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x68A7 */ DEFINE_SFX(NA_SE_VO_DUMMY_167, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x68A8 */ DEFINE_SFX(NA_SE_VO_DUMMY_168, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x68A9 */ DEFINE_SFX(NA_SE_VO_DUMMY_169, 0x30, 2, 1, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x68AA */ DEFINE_SFX(NA_SE_VO_DUMMY_170, 0x30, 2, 1, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x68AB */ DEFINE_SFX(NA_SE_VO_DUMMY_171, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x68AC */ DEFINE_SFX(NA_SE_VO_DUMMY_172, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x68AD */ DEFINE_SFX(NA_SE_VO_DUMMY_173, 0x50, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x68AE */ DEFINE_SFX(NA_SE_VO_DUMMY_174, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x68AF */ DEFINE_SFX(NA_SE_VO_DUMMY_175, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x68B0 */ DEFINE_SFX(NA_SE_VO_DUMMY_176, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x68B1 */ DEFINE_SFX(NA_SE_VO_DUMMY_177, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x68B2 */ DEFINE_SFX(NA_SE_VO_DUMMY_178, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x68B3 */ DEFINE_SFX(NA_SE_VO_DUMMY_179, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x68B4 */ DEFINE_SFX(NA_SE_VO_DUMMY_180, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x68B5 */ DEFINE_SFX(NA_SE_VO_DUMMY_181, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x68B6 */ DEFINE_SFX(NA_SE_VO_DUMMY_182, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x68B7 */ DEFINE_SFX(NA_SE_VO_DUMMY_183, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x68B8 */ DEFINE_SFX(NA_SE_VO_DUMMY_184, 0x30, 2, 2, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x68B9 */ DEFINE_SFX(NA_SE_VO_DUMMY_185, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x68BA */ DEFINE_SFX(NA_SE_VO_DUMMY_186, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x68BB */ DEFINE_SFX(NA_SE_VO_DUMMY_187, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x68BC */ DEFINE_SFX(NA_SE_VO_DUMMY_188, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x68BD */ DEFINE_SFX(NA_SE_VO_DUMMY_189, 0x80, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x68BE */ DEFINE_SFX(NA_SE_VO_DUMMY_190, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x68BF */ DEFINE_SFX(NA_SE_VO_DUMMY_191, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x68C0 */ DEFINE_SFX(NA_SE_VO_DUMMY_192, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x68C1 */ DEFINE_SFX(NA_SE_VO_DUMMY_193, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x68C2 */ DEFINE_SFX(NA_SE_VO_DUMMY_194, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x68C3 */ DEFINE_SFX(NA_SE_VO_DUMMY_195, 0x20, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x68C4 */ DEFINE_SFX(NA_SE_VO_DUMMY_196, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x68C5 */ DEFINE_SFX(NA_SE_VO_DUMMY_197, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x68C6 */ DEFINE_SFX(NA_SE_VO_DUMMY_198, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x68C7 */ DEFINE_SFX(NA_SE_VO_DUMMY_199, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x68C8 */ DEFINE_SFX(NA_SE_VO_DUMMY_200, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x68C9 */ DEFINE_SFX(NA_SE_VO_DUMMY_201, 0x30, 2, 1, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x68CA */ DEFINE_SFX(NA_SE_VO_DUMMY_202, 0x30, 2, 1, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x68CB */ DEFINE_SFX(NA_SE_VO_DUMMY_203, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x68CC */ DEFINE_SFX(NA_SE_VO_DUMMY_204, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x68CD */ DEFINE_SFX(NA_SE_VO_DUMMY_205, 0x50, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x68CE */ DEFINE_SFX(NA_SE_VO_DUMMY_206, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x68CF */ DEFINE_SFX(NA_SE_VO_DUMMY_207, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x68D0 */ DEFINE_SFX(NA_SE_VO_DUMMY_208, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x68D1 */ DEFINE_SFX(NA_SE_VO_DUMMY_209, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x68D2 */ DEFINE_SFX(NA_SE_VO_DUMMY_210, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x68D3 */ DEFINE_SFX(NA_SE_VO_DUMMY_211, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x68D4 */ DEFINE_SFX(NA_SE_VO_DUMMY_212, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x68D5 */ DEFINE_SFX(NA_SE_VO_DUMMY_213, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x68D6 */ DEFINE_SFX(NA_SE_VO_DUMMY_214, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x68D7 */ DEFINE_SFX(NA_SE_VO_DUMMY_215, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x68D8 */ DEFINE_SFX(NA_SE_VO_DUMMY_216, 0x30, 2, 2, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x68D9 */ DEFINE_SFX(NA_SE_VO_DUMMY_217, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x68DA */ DEFINE_SFX(NA_SE_VO_DUMMY_218, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x68DB */ DEFINE_SFX(NA_SE_VO_DUMMY_219, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x68DC */ DEFINE_SFX(NA_SE_VO_DUMMY_220, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x68DD */ DEFINE_SFX(NA_SE_VO_DUMMY_221, 0x80, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x68DE */ DEFINE_SFX(NA_SE_VO_DUMMY_222, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x68DF */ DEFINE_SFX(NA_SE_VO_DUMMY_223, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x68E0 */ DEFINE_SFX(NA_SE_VO_LI_POO_WAIT, 0x30, 2, 1, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x68E1 */ DEFINE_SFX(NA_SE_VO_DUMMY_225, 0x30, 2, 1, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x68E2 */ DEFINE_SFX(NA_SE_VO_DUMMY_226, 0x30, 2, 1, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x68E3 */ DEFINE_SFX(NA_SE_VO_DUMMY_227, 0x20, 2, 1, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x68E4 */ DEFINE_SFX(NA_SE_VO_DUMMY_228, 0x30, 2, 1, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x68E5 */ DEFINE_SFX(NA_SE_VO_DUMMY_229, 0x30, 2, 1, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x68E6 */ DEFINE_SFX(NA_SE_VO_DUMMY_230, 0x30, 2, 1, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x68E7 */ DEFINE_SFX(NA_SE_VO_DUMMY_231, 0x30, 2, 1, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x68E8 */ DEFINE_SFX(NA_SE_VO_DUMMY_232, 0x30, 2, 1, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x68E9 */ DEFINE_SFX(NA_SE_VO_DUMMY_233, 0x30, 2, 1, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x68EA */ DEFINE_SFX(NA_SE_VO_DUMMY_234, 0x30, 2, 1, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x68EB */ DEFINE_SFX(NA_SE_VO_DUMMY_235, 0x30, 2, 1, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x68EC */ DEFINE_SFX(NA_SE_VO_DUMMY_236, 0x30, 2, 1, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x68ED */ DEFINE_SFX(NA_SE_VO_DUMMY_237, 0x50, 2, 1, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x68EE */ DEFINE_SFX(NA_SE_VO_DUMMY_238, 0x30, 2, 1, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x68EF */ DEFINE_SFX(NA_SE_VO_DUMMY_239, 0x30, 2, 1, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x68F0 */ DEFINE_SFX(NA_SE_VO_DUMMY_240, 0x30, 2, 1, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x68F1 */ DEFINE_SFX(NA_SE_VO_DUMMY_241, 0x30, 2, 1, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x68F2 */ DEFINE_SFX(NA_SE_VO_DUMMY_242, 0x30, 2, 1, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x68F3 */ DEFINE_SFX(NA_SE_VO_DUMMY_243, 0x30, 2, 1, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x68F4 */ DEFINE_SFX(NA_SE_VO_DUMMY_244, 0x30, 2, 1, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x68F5 */ DEFINE_SFX(NA_SE_VO_DUMMY_245, 0x30, 2, 1, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x68F6 */ DEFINE_SFX(NA_SE_VO_DUMMY_246, 0x30, 2, 1, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x68F7 */ DEFINE_SFX(NA_SE_VO_DUMMY_247, 0x30, 2, 1, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x68F8 */ DEFINE_SFX(NA_SE_VO_DUMMY_248, 0x30, 2, 2, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x68F9 */ DEFINE_SFX(NA_SE_VO_DUMMY_249, 0x30, 2, 1, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x68FA */ DEFINE_SFX(NA_SE_VO_DUMMY_250, 0x30, 2, 1, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x68FB */ DEFINE_SFX(NA_SE_VO_DUMMY_251, 0x30, 2, 1, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x68FC */ DEFINE_SFX(NA_SE_VO_DUMMY_252, 0x30, 2, 1, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x68FD */ DEFINE_SFX(NA_SE_VO_DUMMY_253, 0x80, 2, 1, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x68FE */ DEFINE_SFX(NA_SE_VO_DUMMY_254, 0x30, 2, 1, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x68FF */ DEFINE_SFX(NA_SE_VO_DUMMY_255, 0x30, 2, 1, SFX_FLAG2_APPLY_LOWPASS_FILTER, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x6900 */ DEFINE_SFX(NA_SE_VO_JMVO02, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x6901 */ DEFINE_SFX(NA_SE_VO_JMVO04, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x6902 */ DEFINE_SFX(NA_SE_VO_CDVO00, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x6903 */ DEFINE_SFX(NA_SE_VO_CDVO01, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x6904 */ DEFINE_SFX(NA_SE_VO_CDVO02, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x6905 */ DEFINE_SFX(NA_SE_VO_CDVO03, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x6906 */ DEFINE_SFX(NA_SE_VO_BBVO00, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x6907 */ DEFINE_SFX(NA_SE_VO_BBVO01, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x6908 */ DEFINE_SFX(NA_SE_VO_BBVO02, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x6909 */ DEFINE_SFX(NA_SE_VO_BBVO03, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x690A */ DEFINE_SFX(NA_SE_VO_BBVO04, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x690B */ DEFINE_SFX(NA_SE_VO_BBVO05, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x690C */ DEFINE_SFX(NA_SE_VO_OBVO01, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x690D */ DEFINE_SFX(NA_SE_VO_ARVO00, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x690E */ DEFINE_SFX(NA_SE_VO_ARVO01, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x690F */ DEFINE_SFX(NA_SE_VO_MMVO00, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x6910 */ DEFINE_SFX(NA_SE_VO_MMVO01, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x6911 */ DEFINE_SFX(NA_SE_VO_MMVO02, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x6912 */ DEFINE_SFX(NA_SE_VO_MMVO03, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x6913 */ DEFINE_SFX(NA_SE_VO_MMVO04, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x6914 */ DEFINE_SFX(NA_SE_VO_MMVO05, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x6915 */ DEFINE_SFX(NA_SE_VO_ABVO00, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x6916 */ DEFINE_SFX(NA_SE_VO_ABVO01, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x6917 */ DEFINE_SFX(NA_SE_VO_NPVO00, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x6918 */ DEFINE_SFX(NA_SE_VO_FPVO00, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x6919 */ DEFINE_SFX(NA_SE_VO_FPVO01, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x691A */ DEFINE_SFX(NA_SE_VO_FPVO02, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x691B */ DEFINE_SFX(NA_SE_VO_FPVO03, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x691C */ DEFINE_SFX(NA_SE_VO_ROVO01, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x691D */ DEFINE_SFX(NA_SE_VO_ROVO02, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x691E */ DEFINE_SFX(NA_SE_VO_RYVO01, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x691F */ DEFINE_SFX(NA_SE_VO_RYVO02, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x6920 */ DEFINE_SFX(NA_SE_VO_RYVO03, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x6921 */ DEFINE_SFX(NA_SE_VO_RYVO04, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x6922 */ DEFINE_SFX(NA_SE_VO_ANVO00, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x6923 */ DEFINE_SFX(NA_SE_VO_ANVO01, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x6924 */ DEFINE_SFX(NA_SE_VO_ANVO02, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x6925 */ DEFINE_SFX(NA_SE_VO_ANVO03, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x6926 */ DEFINE_SFX(NA_SE_VO_CRVO00, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x6927 */ DEFINE_SFX(NA_SE_VO_CRVO01, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x6928 */ DEFINE_SFX(NA_SE_VO_CRVO02, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x6929 */ DEFINE_SFX(NA_SE_VO_CRVO03, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x692A */ DEFINE_SFX(NA_SE_VO_HNVO00, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x692B */ DEFINE_SFX(NA_SE_VO_HNVO01, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x692C */ DEFINE_SFX(NA_SE_VO_HNVO02, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x692D */ DEFINE_SFX(NA_SE_VO_RMVO00, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x692E */ DEFINE_SFX(NA_SE_VO_RMVO01, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x692F */ DEFINE_SFX(NA_SE_VO_RMVO02, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x6930 */ DEFINE_SFX(NA_SE_VO_PMVO01, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x6931 */ DEFINE_SFX(NA_SE_VO_PMVO02, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x6932 */ DEFINE_SFX(NA_SE_VO_PMVO03, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x6933 */ DEFINE_SFX(NA_SE_VO_DHVO00, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x6934 */ DEFINE_SFX(NA_SE_VO_DHVO01, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x6935 */ DEFINE_SFX(NA_SE_VO_DHVO02, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x6936 */ DEFINE_SFX(NA_SE_VO_DHVO03, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x6937 */ DEFINE_SFX(NA_SE_VO_DHVO04, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x6938 */ DEFINE_SFX(NA_SE_VO_TFVO00, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x6939 */ DEFINE_SFX(NA_SE_VO_ANVO04, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x693A */ DEFINE_SFX(NA_SE_VO_ANVO05, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x693B */ DEFINE_SFX(NA_SE_VO_PMVO00, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x693C */ DEFINE_SFX(NA_SE_VO_CHVO03, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x693D */ DEFINE_SFX(NA_SE_VO_CHVO04, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x693E */ DEFINE_SFX(NA_SE_VO_CHVO05, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x693F */ DEFINE_SFX(NA_SE_VO_CHVO06, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x6940 */ DEFINE_SFX(NA_SE_VO_CHVO07, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x6941 */ DEFINE_SFX(NA_SE_VO_CHVO08, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x6942 */ DEFINE_SFX(NA_SE_VO_CHVO09, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x6943 */ DEFINE_SFX(NA_SE_VO_DPVO00, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x6944 */ DEFINE_SFX(NA_SE_VO_DPVO01, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x6945 */ DEFINE_SFX(NA_SE_VO_DPVO02, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x6946 */ DEFINE_SFX(NA_SE_VO_SKVO00, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x6947 */ DEFINE_SFX(NA_SE_VO_SKVO01, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x6948 */ DEFINE_SFX(NA_SE_VO_KHVO00, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x6949 */ DEFINE_SFX(NA_SE_VO_KHVO01, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x694A */ DEFINE_SFX(NA_SE_VO_KHVO02, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x694B */ DEFINE_SFX(NA_SE_VO_SHVO00, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x694C */ DEFINE_SFX(NA_SE_VO_SHVO01, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x694D */ DEFINE_SFX(NA_SE_VO_KAVO02, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x694E */ DEFINE_SFX(NA_SE_VO_KAVO03, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x694F */ DEFINE_SFX(NA_SE_VO_MTVO00, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x6950 */ DEFINE_SFX(NA_SE_VO_TTVO00, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x6951 */ DEFINE_SFX(NA_SE_VO_ITVO00, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x6952 */ DEFINE_SFX(NA_SE_VO_ITVO01, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x6953 */ DEFINE_SFX(NA_SE_VO_ITVO02, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x6954 */ DEFINE_SFX(NA_SE_VO_KMVO00, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x6955 */ DEFINE_SFX(NA_SE_VO_KMVO01, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x6956 */ DEFINE_SFX(NA_SE_VO_JOVO00, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x6957 */ DEFINE_SFX(NA_SE_VO_JYVO00, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x6958 */ DEFINE_SFX(NA_SE_VO_DTVO00, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x6959 */ DEFINE_SFX(NA_SE_VO_GUVO00, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x695A */ DEFINE_SFX(NA_SE_VO_KTVO00, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x695B */ DEFINE_SFX(NA_SE_VO_KTVO01, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x695C */ DEFINE_SFX(NA_SE_VO_KTVO03, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x695D */ DEFINE_SFX(NA_SE_VO_ZBVO00, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x695E */ DEFINE_SFX(NA_SE_VO_ZBVO01, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x695F */ DEFINE_SFX(NA_SE_VO_DAVO01, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x6960 */ DEFINE_SFX(NA_SE_VO_SHVO04, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x6961 */ DEFINE_SFX(NA_SE_VO_GBVO02, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x6962 */ DEFINE_SFX(NA_SE_VO_GBVO03, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x6963 */ DEFINE_SFX(NA_SE_VO_PFVO00, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x6964 */ DEFINE_SFX(NA_SE_VO_PFVO01, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x6965 */ DEFINE_SFX(NA_SE_VO_GAVO00, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x6966 */ DEFINE_SFX(NA_SE_VO_GAVO01, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x6967 */ DEFINE_SFX(NA_SE_VO_DJVO00, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x6968 */ DEFINE_SFX(NA_SE_VO_DJVO01, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x6969 */ DEFINE_SFX(NA_SE_VO_MSVO00, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x696A */ DEFINE_SFX(NA_SE_VO_MSVO01, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x696B */ DEFINE_SFX(NA_SE_VO_JPVO00, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x696C */ DEFINE_SFX(NA_SE_VO_HYVO00, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x696D */ DEFINE_SFX(NA_SE_VO_HYVO01, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x696E */ DEFINE_SFX(NA_SE_VO_BAVO00, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x696F */ DEFINE_SFX(NA_SE_VO_POVO00, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x6970 */ DEFINE_SFX(NA_SE_VO_DAVO00, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x6971 */ DEFINE_SFX(NA_SE_VO_DAVO02, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x6972 */ DEFINE_SFX(NA_SE_VO_MKVO00, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x6973 */ DEFINE_SFX(NA_SE_VO_MKVO01, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x6974 */ DEFINE_SFX(NA_SE_VO_MKVO02, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x6975 */ DEFINE_SFX(NA_SE_VO_MKVO03, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x6976 */ DEFINE_SFX(NA_SE_VO_MKVO04, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x6977 */ DEFINE_SFX(NA_SE_VO_TIVO00, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x6978 */ DEFINE_SFX(NA_SE_VO_TIVO01, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x6979 */ DEFINE_SFX(NA_SE_VO_TIVO02, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x697A */ DEFINE_SFX(NA_SE_VO_TIVO03, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x697B */ DEFINE_SFX(NA_SE_VO_TIVO04, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x697C */ DEFINE_SFX(NA_SE_VO_TIVO05, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x697D */ DEFINE_SFX(NA_SE_VO_OMVO00, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x697E */ DEFINE_SFX(NA_SE_VO_OMVO01, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x697F */ DEFINE_SFX(NA_SE_VO_OMVO02, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x6980 */ DEFINE_SFX(NA_SE_VO_OMVO03, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x6981 */ DEFINE_SFX(NA_SE_VO_OMVO04, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x6982 */ DEFINE_SFX(NA_SE_VO_OMVO05, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x6983 */ DEFINE_SFX(NA_SE_VO_OMVO06, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x6984 */ DEFINE_SFX(NA_SE_VO_DEMO_FALL2, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x6985 */ DEFINE_SFX(NA_SE_VO_DEMO_384, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x6986 */ DEFINE_SFX(NA_SE_VO_DEMO_385, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x6987 */ DEFINE_SFX(NA_SE_VO_DEMO_386, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x6988 */ DEFINE_SFX(NA_SE_VO_DEMO_387, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x6989 */ DEFINE_SFX(NA_SE_VO_DEMO_388, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x698A */ DEFINE_SFX(NA_SE_VO_DEMO_389, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x698B */ DEFINE_SFX(NA_SE_VO_DEMO_390, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x698C */ DEFINE_SFX(NA_SE_VO_DEMO_391, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x698D */ DEFINE_SFX(NA_SE_VO_DEMO_392, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x698E */ DEFINE_SFX(NA_SE_VO_DEMO_393, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) +/* 0x698E */ DEFINE_SFX(NA_SE_VO_DEMO_394, 0x30, 2, 0, 0, SFX_FLAG_BEHIND_SCREEN_Z_INDEX) diff --git a/include/variables.h b/include/variables.h index 0fb0358a3..bde090b70 100644 --- a/include/variables.h +++ b/include/variables.h @@ -1585,10 +1585,10 @@ extern UNK_PTR D_801D6000; // extern UNK_TYPE4 D_801D6190; // extern UNK_TYPE4 D_801D6194; // extern UNK_TYPE1 D_801D6200; -// extern UNK_TYPE1 D_801D6600; -// extern UNK_TYPE1 D_801D6608; -// extern UNK_TYPE1 D_801D6610; -// extern UNK_TYPE1 D_801D662C; +extern u8 gIsLargeSfxBank[7]; +extern u8 D_801D6608[7]; +extern u8 gChannelsPerBank[4][7]; +extern u8 gUsedChannelsPerBank[4][7]; // extern UNK_TYPE1 D_801D6648; // extern UNK_TYPE1 D_801D664C; // extern UNK_TYPE1 D_801D6650; @@ -1710,22 +1710,11 @@ extern UNK_PTR D_801D8B24; // extern UNK_TYPE1 D_801D8E48; // extern UNK_TYPE1 D_801D8E50; // extern UNK_TYPE1 D_801D8F70; -// extern SfxParams sEnemyBankParams[]; -// extern SfxParams sPlayerBankParams[]; -// extern SfxParams sItemBankParams[]; -// extern SfxParams sEnvBankParams[]; -// extern SfxParams sSystemBankParams[]; -// extern SfxParams sOcarinaBankParams[]; -// extern SfxParams sVoiceBankParams[]; extern SfxParams* gSfxParams[7]; -// extern UNK_TYPE1 D_801DB470; -// extern UNK_TYPE1 D_801DB474; -extern UNK_PTR D_801DB478[7]; -// extern UNK_TYPE1 D_801DB494; -// extern UNK_TYPE1 D_801DB49C; -// extern UNK_TYPE2 D_801DB4A0; +extern SfxBankEntry* gSfxBanks[7]; +extern u8 gSfxChannelLayout; extern Vec3f gSfxDefaultPos; -extern f32 D_801DB4B0; +extern f32 gSfxDefaultFreqAndVolScale; extern s8 gSfxDefaultReverb; // extern UNK_TYPE1 D_801DB4C0; // extern UNK_TYPE1 D_801DB4C4; @@ -3465,21 +3454,21 @@ extern s32 D_801FD120; // extern UNK_TYPE1 D_801FD5E8; // extern UNK_TYPE1 D_801FD608; // extern UNK_TYPE1 D_801FD610; -// extern UNK_TYPE1 D_801FD710; -// extern UNK_TYPE1 D_801FD8C0; -// extern UNK_TYPE1 D_801FDB00; -// extern UNK_TYPE1 D_801FE100; -// extern UNK_TYPE1 D_801FE4C0; -// extern UNK_TYPE1 D_801FE640; -// extern UNK_TYPE1 D_801FE6D0; -extern SoundRequest D_801FE7C0[1]; -// extern UNK_TYPE1 D_801FFBC0; -// extern UNK_TYPE1 D_801FFBC8; -// extern UNK_TYPE1 D_801FFBD0; -// extern UNK_TYPE1 D_801FFBD8; -// extern UNK_TYPE1 D_801FFC80; -// extern UNK_TYPE1 D_801FFC84; -// extern UNK_TYPE1 D_801FFC90; +// extern UNK_TYPE1 sSfxPlayerBank; +// extern UNK_TYPE1 sSfxItemBank; +// extern UNK_TYPE1 sSfxEnvironmentBank; +// extern UNK_TYPE1 sSfxEnemyBank; +// extern UNK_TYPE1 sSfxSystemBank; +// extern UNK_TYPE1 sSfxOcarinaBank; +// extern UNK_TYPE1 sSfxVoiceBank; +// extern SfxRequest sSfxRequests[0x100]; +// extern UNK_TYPE1 sSfxBankListEnd; +// extern UNK_TYPE1 sSfxBankFreeListStart; +// extern UNK_TYPE1 sSfxBankUnused; +extern ActiveSfx gActiveSfx[7][3]; +// extern UNK_TYPE1 sCurSfxPlayerChannelIndex; +// extern UNK_TYPE1 gSfxBankMuted; +// extern UNK_TYPE1 sUnusedBankLerp; // extern UNK_TYPE1 D_801FFD00; // extern UNK_TYPE1 D_801FFD34; // extern UNK_TYPE1 D_801FFD40; diff --git a/include/z64.h b/include/z64.h index 06ccc6631..aa588a568 100644 --- a/include/z64.h +++ b/include/z64.h @@ -1218,7 +1218,7 @@ struct PlayState { /* 0x18875 */ s8 transitionTrigger; // "fade_direction" /* 0x18876 */ s16 unk_18876; /* 0x18878 */ s16 bgCoverAlpha; - /* 0x1887A */ u16 nextEntranceIndex; + /* 0x1887A */ u16 nextEntrance; /* 0x1887C */ s8 unk_1887C; // shootingGalleryStatus? /* 0x1887D */ s8 unk_1887D; /* 0x1887E */ s8 unk_1887E; diff --git a/include/z64audio.h b/include/z64audio.h index 3860ff70d..4095251ca 100644 --- a/include/z64audio.h +++ b/include/z64audio.h @@ -28,19 +28,12 @@ #define AIBUF_LEN 0x580 typedef enum { - /* 0 */ AUDIO_FS_STEREO, - /* 1 */ AUDIO_FS_HEADSET, - /* 2 */ AUDIO_FS_SURROUND, - /* 3 */ AUDIO_FS_MONO -} AudioFileSelectOption; - -typedef enum { - /* 0 */ AUDIO_MODE_STEREO, - /* 1 */ AUDIO_MODE_HEADSET, - /* 2 */ AUDIO_MODE_UNK, - /* 3 */ AUDIO_MODE_MONO, - /* 4 */ AUDIO_MODE_SURROUND -} AudioSoundMode; + /* 0 */ SOUNDMODE_STEREO, + /* 1 */ SOUNDMODE_HEADSET, + /* 2 */ SOUNDMODE_SURROUND, + /* 3 */ SOUNDMODE_MONO, + /* 4 */ SOUNDMODE_SURROUND_EXTERNAL, +} SoundMode; typedef enum { /* 0 */ ADSR_STATE_DISABLED, @@ -441,7 +434,7 @@ typedef struct SequenceChannel { /* 0x80 */ AdsrSettings adsr; /* 0x88 */ NotePool notePool; /* 0xC8 */ s8 soundScriptIO[8]; // bridge between sound script and audio lib, "io ports" - /* 0xD0 */ u8* sfxState; + /* 0xD0 */ u8* sfxState; // SfxChannelState /* 0xD4 */ s16* filter; /* 0xD8 */ Stereo stereo; /* 0xDC */ s32 unk_DC; @@ -1080,51 +1073,47 @@ typedef enum { /* 1 */ SFX_STATE_QUEUED, /* 2 */ SFX_STATE_READY, /* 3 */ SFX_STATE_PLAYING_REFRESH, - /* 4 */ SFX_STATE_PLAYING_1, - /* 5 */ SFX_STATE_PLAYING_2 + /* 4 */ SFX_STATE_PLAYING, + /* 5 */ SFX_STATE_PLAYING_ONE_FRAME } SfxState; typedef struct { - /* 0x00 */ f32* posX; - /* 0x04 */ f32* posY; - /* 0x08 */ f32* posZ; - /* 0x0C */ f32* freqScale; - /* 0x10 */ f32* vol; - /* 0x14 */ s8* reverbAdd; - /* 0x18 */ f32 dist; - /* 0x1C */ u32 priority; // lower is more prioritized - /* 0x20 */ u16 sfxParams; - /* 0x22 */ u16 sfxId; - /* 0x25 */ u8 sfxFlags; - /* 0x24 */ u8 sfxImportance; - /* 0x26 */ u8 state; // uses SfxState enum - /* 0x27 */ u8 freshness; - /* 0x28 */ u8 prev; - /* 0x29 */ u8 next; - /* 0x2A */ u8 channelIdx; - /* 0x2B */ u8 unk_2F; - /* 0x2C */ u8 token; + /* 0x00 */ f32* posX; + /* 0x04 */ f32* posY; + /* 0x08 */ f32* posZ; + /* 0x0C */ f32* freqScale; + /* 0x10 */ f32* volume; + /* 0x14 */ s8* reverbAdd; + /* 0x18 */ f32 dist; + /* 0x1C */ u32 priority; // lower is more prioritized + /* 0x20 */ u16 sfxParams; + /* 0x22 */ u16 sfxId; + /* 0x25 */ u8 sfxFlags; + /* 0x24 */ u8 sfxImportance; + /* 0x26 */ u8 state; // uses SfxState enum + /* 0x27 */ u8 freshness; + /* 0x28 */ u8 prev; + /* 0x29 */ u8 next; + /* 0x2A */ u8 channelIndex; + /* 0x2B */ u8 randFreq; + /* 0x2C */ u8 token; } SfxBankEntry; // size = 0x30 /* - * SFX IDs + * SfxId: * - * index 0000000111111111 observed in audio code - * & 200 0000001000000000 single bit - * & 400 0000010000000000 single bit - * & 800 0000100000000000 single bit, what we currently call SFX_FLAG - * & 600 0000011000000000 2 bits - * & A00 0000101000000000 2 bits - * & C00 0000110000000000 2 bits, observed in audio code - * & E00 0000111000000000 all 3 bits - * bank 1111000000000000 observed in audio code + * & 03FF 0000000111111111 index + * & 0400 0000010000000000 unused flag + * & 0800 0000100000000000 SFX_FLAG + * & 0C00 0000110000000000 Flag Mask + * & F000 1111000000000000 observed in audio code */ #define SFX_BANK_SHIFT(sfxId) (((sfxId) >> 12) & 0xFF) #define SFX_BANK_MASK(sfxId) ((sfxId) & 0xF000) -#define SFX_INDEX(sfxId) ((sfxId) & 0x03FF) +#define SFX_INDEX(sfxId) ((sfxId) & 0x3FF) #define SFX_BANK(sfxId) SFX_BANK_SHIFT(SFX_BANK_MASK(sfxId)) typedef struct { @@ -1134,34 +1123,67 @@ typedef struct { // SfxParams bit-packing -#define SFX_PARAM_01_SHIFT 0 -#define SFX_PARAM_01_MASK_UPPER (4 << SFX_PARAM_01_SHIFT) -#define SFX_PARAM_01_MASK (7 << SFX_PARAM_01_SHIFT) // Same as OoT, 8 instead of 4 +// Slows the decay of volume with distance (a 3-bit number ranging from 0-7) +#define SFX_PARAM_DIST_RANGE_SHIFT 0 +#define SFX_PARAM_DIST_RANGE_MASK_UPPER (4 << SFX_PARAM_DIST_RANGE_SHIFT) +#define SFX_PARAM_DIST_RANGE_MASK (7 << SFX_PARAM_DIST_RANGE_SHIFT) -#define SFX_FLAG_3 (1 << 3) // Same as OoT -#define SFX_FLAG_4 (1 << 4) // Same as OoT -#define SFX_FLAG_5 (1 << 5) // Same as OoT +// Lower SEQ_PLAYER_BGM_MAIN and SEQ_PLAYER_BGM_SUB while the sfx is playing +#define SFX_FLAG_LOWER_VOLUME_BGM (1 << 3) -#define SFX_PARAM_67_SHIFT 6 -#define SFX_PARAM_67_MASK (3 << SFX_PARAM_67_SHIFT) +// Sfx priority is not raised with distance (making it more likely to be ejected) +#define SFX_FLAG_PRIORITY_NO_DIST (1 << 4) -#define SFX_FLAG_8 (1 << 8) // New to MM -#define SFX_FLAG_9 (1 << 9) // Same as OoT -#define SFX_FLAG_10_SHIFT 10 // Unused -#define SFX_FLAG_10 (1 << SFX_FLAG_10_SHIFT) -#define SFX_FLAG_11 (1 << 11) // Same as OoT +// If a new sfx is requested at both the same position with the same importance, +// Block that new sfx from replacing the current sfx +// Note: Only 1 sfx can be played at a specific position at once +#define SFX_FLAG_BLOCK_EQUAL_IMPORTANCE (1 << 5) -#define SFX_FLAG_12 (1 << 12) // Same as OoT -#define SFX_FLAG_13 (1 << 13) // Same as OoT -#define SFX_FLAG_14 (1 << 14) // Same as OoT -#define SFX_FLAG_15 (1 << 15) // Same as OoT +// Applies increasingly random offsets to frequency (a 2-bit number ranging from 0-3) +#define SFX_PARAM_RAND_FREQ_RAISE_SHIFT 6 +#define SFX_PARAM_RAND_FREQ_RAISE_MASK (3 << SFX_PARAM_RAND_FREQ_RAISE_SHIFT) -#define SFX_FLAG2_0 (1 << 0) // OoT SFX_FLAG_2 -#define SFX_FLAG2_2 (1 << 2) // Unused -#define SFX_FLAG2_4 (1 << 4) // Unused -#define SFX_FLAG2_5 (1 << 5) // New to MM -#define SFX_FLAG2_6 (1 << 6) // Unused -#define SFX_FLAG2_7 (1 << 7) // New to MM +// Sets a flag to ioPort 5 +#define SFX_FLAG_8 (1 << 8) + +// Use lowpass filter on surround sound +#define SFX_FLAG_SURROUND_LOWPASS_FILTER (1 << 9) + +// Unused remnant of OoT +#define SFX_FLAG_BEHIND_SCREEN_Z_INDEX_SHIFT 10 +#define SFX_FLAG_BEHIND_SCREEN_Z_INDEX (1 << SFX_FLAG_BEHIND_SCREEN_Z_INDEX_SHIFT) + +// Randomly scale base frequency each frame through mutiplicative offset +#define SFX_PARAM_RAND_FREQ_SCALE (1 << 11) + +// Sfx reverb is not raised with distance +#define SFX_FLAG_REVERB_NO_DIST (1 << 12) + +// Sfx volume is not lowered with distance +#define SFX_FLAG_VOLUME_NO_DIST (1 << 13) + +// SFX_FLAG_VIBRATO +// Randomly lower base frequency each frame through additive offset +#define SFX_PARAM_RAND_FREQ_LOWER (1 << 14) + +// Sfx frequency is not raised with distance +#define SFX_FLAG_FREQ_NO_DIST (1 << 15) + +// Force the sfx to reset from the beginning when requested again +#define SFX_FLAG2_FORCE_RESET (1 << 0) + +// Unused +#define SFX_FLAG2_UNUSED2 (1 << 2) +#define SFX_FLAG2_UNUSED4 (1 << 4) + +// Do not use highpass filter on surround sound +#define SFX_FLAG2_SURROUND_NO_HIGHPASS_FILTER (1 << 5) + +// Unused +#define SFX_FLAG2_UNUSED6 (1 << 6) + +// Apply a low-pass filter with a lowPassCutoff of 4 +#define SFX_FLAG2_APPLY_LOWPASS_FILTER (1 << 7) typedef struct { /* 0x0 */ u8 importance; @@ -1169,13 +1191,4 @@ typedef struct { /* 0x2 */ u16 params; } SfxParams; // size = 0x4 -typedef struct { - /* 0x00 */ u16 sfxId; - /* 0x02 */ u8 token; - /* 0x04 */ s8* reverbAdd; - /* 0x08 */ Vec3f* pos; - /* 0x0C */ f32* freqScale; - /* 0x10 */ f32* vol; -} SoundRequest; // size = 0x14 - #endif diff --git a/include/z64cutscene.h b/include/z64cutscene.h index 430cef331..f4cc10802 100644 --- a/include/z64cutscene.h +++ b/include/z64cutscene.h @@ -145,13 +145,12 @@ typedef enum { /* 0x108 */ CS_CMD_UNK_108 = 0x108, /* 0x109 */ CS_CMD_UNK_109, /* 0x12C */ CS_CMD_PLAYSEQ = 0x12C, - /* 0x12D */ CS_CMD_UNK_12D, - /* 0x130 */ CS_CMD_130 = 0x130, + /* 0x12D */ CS_CMD_STOPSEQ, + /* 0x12E */ CS_CMD_PLAYAMBIENCE, + /* 0x12F */ CS_CMD_FADEAMBIENCE, + /* 0x130 */ CS_CMD_130, /* 0x131 */ CS_CMD_131, /* 0x132 */ CS_CMD_132, - /* 0x133 */ CS_CMD_STOPSEQ, - /* 0x134 */ CS_CMD_PLAYAMBIENCE, - /* 0x135 */ CS_CMD_FADEAMBIENCE, /* 0x15E */ CS_CMD_TERMINATOR = 0x15E, /* 0x15F */ CS_CMD_CHOOSE_CREDITS_SCENES, /* 0x190 */ CS_CMD_RUMBLE = 0x190 @@ -166,7 +165,7 @@ typedef union CutsceneData { typedef struct { /* 0x0 */ CutsceneData* segmentedData; - /* 0x4 */ s16 nextEntranceIndex; + /* 0x4 */ s16 nextEntrance; /* 0x6 */ u8 unk6; /* 0x7 */ u8 unk7; // a weekEventReg bitpack? } CutsceneEntry; // size = 0x8 diff --git a/include/z64item.h b/include/z64item.h index 07dbcdb86..49c49a441 100644 --- a/include/z64item.h +++ b/include/z64item.h @@ -219,7 +219,7 @@ typedef enum { /* 0x59 */ ITEM_WALLET_DEFAULT, /* 0x5A */ ITEM_WALLET_ADULT, /* 0x5B */ ITEM_WALLET_GIANT, - /* 0x5C */ ITEM_FISHING_POLE, + /* 0x5C */ ITEM_FISHING_ROD, /* 0x5D */ ITEM_REMAINS_ODOLWA, /* 0x5E */ ITEM_REMAINS_GOHT, /* 0x5F */ ITEM_REMAINS_GYORG, @@ -564,24 +564,4 @@ typedef enum { /* 0x76 */ GID_MAX } GetItemDrawID; -// This enum may not be real, and actionparam is just used directly. -// Keep using it for now. -// TODO: fill -typedef enum { - /* -1 */ EXCH_ITEM_MINUS1 = -1, // Unknown usage or function - /* 0x00 */ EXCH_ITEM_NONE, - /* 0x13 */ EXCH_ITEM_PICTO_BOX = 0x13, - /* 0x1E */ EXCH_ITEM_1E = 0x1E, // BOTTLE_MUSHROOM - /* 0x2A */ EXCH_ITEM_MOON_TEAR = 0x2A, - /* 0x2B */ EXCH_ITEM_DEED_LAND, - /* 0x2C */ EXCH_ITEM_ROOM_KEY, - /* 0x2D */ EXCH_ITEM_LETTER_TO_KAFEI, - /* 0x2E */ EXCH_ITEM_2E, - /* 0x2F */ EXCH_ITEM_DEED_SWAMP, - /* 0x30 */ EXCH_ITEM_DEED_MOUNTAIN, - /* 0x31 */ EXCH_ITEM_DEED_OCEAN, - /* 0x32 */ EXCH_ITEM_32, - /* 0x33 */ EXCH_ITEM_LETTER_MAMA -} ExchangeItemID; - #endif diff --git a/include/z64player.h b/include/z64player.h index 4dd47424e..f49f30688 100644 --- a/include/z64player.h +++ b/include/z64player.h @@ -70,10 +70,11 @@ typedef enum { /* 0x19 */ PLAYER_MASK_MAX } PlayerMask; -typedef enum { +typedef enum PlayerActionParam { + /* -1 */ PLAYER_AP_MINUS1 = -1, /* 0x00 */ PLAYER_AP_NONE, /* 0x01 */ PLAYER_AP_LAST_USED, - /* 0x02 */ PLAYER_AP_FISHING_POLE, + /* 0x02 */ PLAYER_AP_FISHING_ROD, /* 0x03 */ PLAYER_AP_SWORD_KOKIRI, /* 0x04 */ PLAYER_AP_SWORD_RAZOR, /* 0x05 */ PLAYER_AP_SWORD_GILDED, diff --git a/include/z64save.h b/include/z64save.h index 65ee77e6e..b918bd21a 100644 --- a/include/z64save.h +++ b/include/z64save.h @@ -154,7 +154,7 @@ typedef struct RespawnData { /* 0x00 */ Vec3f pos; /* 0x0C */ s16 yaw; /* 0x0E */ s16 playerParams; - /* 0x10 */ u16 entranceIndex; + /* 0x10 */ u16 entrance; /* 0x12 */ u8 roomIndex; /* 0x13 */ s8 data; /* 0x14 */ u32 tempSwitchFlags; @@ -210,7 +210,7 @@ typedef struct SavePlayerData { } SavePlayerData; // size = 0x28 typedef struct Save { - /* 0x0000 */ u32 entranceIndex; // "scene_no" + /* 0x0000 */ u32 entrance; // "scene_no" /* 0x0004 */ u8 equippedMask; // "player_mask" /* 0x0005 */ u8 isFirstCycle; // "opening_flag" /* 0x0006 */ u8 unk_06; diff --git a/include/z64scene.h b/include/z64scene.h index 9eff2f291..6a0808b55 100644 --- a/include/z64scene.h +++ b/include/z64scene.h @@ -648,7 +648,128 @@ typedef enum { /* 0x6F */ SCENE_CLOCKTOWER, /* 0x70 */ SCENE_ALLEY, /* 0x71 */ SCENE_MAX -} SceneID; +} SceneId; + +typedef enum { + /* 0x00 */ ENTR_SCENE_MAYORS_RESIDENCE, + /* 0x01 */ ENTR_SCENE_MAJORAS_LAIR, + /* 0x02 */ ENTR_SCENE_MAGIC_HAGS_POTION_SHOP, + /* 0x03 */ ENTR_SCENE_RANCH_HOUSE, + /* 0x04 */ ENTR_SCENE_HONEY_AND_DARLINGS_SHOP, + /* 0x05 */ ENTR_SCENE_BENEATH_THE_GRAVERYARD, + /* 0x06 */ ENTR_SCENE_SOUTHERN_SWAMP_CLEARED, + /* 0x07 */ ENTR_SCENE_CURIOSITY_SHOP, + /* 0x08 */ ENTR_SCENE_UNSET_08, + /* 0x09 */ ENTR_SCENE_UNSET_09, + /* 0x0A */ ENTR_SCENE_GROTTOS, + /* 0x0B */ ENTR_SCENE_UNSET_0B, + /* 0x0C */ ENTR_SCENE_UNSET_0C, + /* 0x0D */ ENTR_SCENE_UNSET_0D, + /* 0x0E */ ENTR_SCENE_CUTSCENE, + /* 0x0F */ ENTR_SCENE_UNSET_0F, + /* 0x10 */ ENTR_SCENE_IKANA_CANYON, + /* 0x11 */ ENTR_SCENE_PIRATES_FORTRESS, + /* 0x12 */ ENTR_SCENE_MILK_BAR, + /* 0x13 */ ENTR_SCENE_STONE_TOWER_TEMPLE, + /* 0x14 */ ENTR_SCENE_TREASURE_CHEST_SHOP, + /* 0x15 */ ENTR_SCENE_STONE_TOWER_TEMPLE_INVERTED, + /* 0x16 */ ENTR_SCENE_CLOCK_TOWER_ROOFTOP, + /* 0x17 */ ENTR_SCENE_OPENING_DUNGEON, + /* 0x18 */ ENTR_SCENE_WOODFALL_TEMPLE, + /* 0x19 */ ENTR_SCENE_PATH_TO_MOUNTAIN_VILLAGE, + /* 0x1A */ ENTR_SCENE_IKANA_CASTLE, + /* 0x1B */ ENTR_SCENE_DEKU_SCRUB_PLAYGROUND, + /* 0x1C */ ENTR_SCENE_ODOLWAS_LAIR, + /* 0x1D */ ENTR_SCENE_TOWN_SHOOTING_GALLERY, + /* 0x1E */ ENTR_SCENE_SNOWHEAD_TEMPLE, + /* 0x1F */ ENTR_SCENE_MILK_ROAD, + /* 0x20 */ ENTR_SCENE_PIRATES_FORTRESS_INTERIOR, + /* 0x21 */ ENTR_SCENE_SWAMP_SHOOTING_GALLERY, + /* 0x22 */ ENTR_SCENE_PINNACLE_ROCK, + /* 0x23 */ ENTR_SCENE_FAIRY_FOUNTAIN, + /* 0x24 */ ENTR_SCENE_SWAMP_SPIDER_HOUSE, + /* 0x25 */ ENTR_SCENE_OCEANSIDE_SPIDER_HOUSE, + /* 0x26 */ ENTR_SCENE_ASTRAL_OBSERVATORY, + /* 0x27 */ ENTR_SCENE_MOON_DEKU_TRIAL, + /* 0x28 */ ENTR_SCENE_DEKU_PALACE, + /* 0x29 */ ENTR_SCENE_MOUNTAIN_SMITHY, + /* 0x2A */ ENTR_SCENE_TERMINA_FIELD, + /* 0x2B */ ENTR_SCENE_POST_OFFICE, + /* 0x2C */ ENTR_SCENE_MARINE_RESEARCH_LAB, + /* 0x2D */ ENTR_SCENE_DAMPES_HOUSE, + /* 0x2E */ ENTR_SCENE_UNSET_2E, + /* 0x2F */ ENTR_SCENE_GORON_SHRINE, + /* 0x30 */ ENTR_SCENE_ZORA_HALL, + /* 0x31 */ ENTR_SCENE_TRADING_POST, + /* 0x32 */ ENTR_SCENE_ROMANI_RANCH, + /* 0x33 */ ENTR_SCENE_TWINMOLDS_LAIR, + /* 0x34 */ ENTR_SCENE_GREAT_BAY_COAST, + /* 0x35 */ ENTR_SCENE_ZORA_CAPE, + /* 0x36 */ ENTR_SCENE_LOTTERY_SHOP, + /* 0x37 */ ENTR_SCENE_UNSET_37, + /* 0x38 */ ENTR_SCENE_PIRATES_FORTRESS_EXTERIOR, + /* 0x39 */ ENTR_SCENE_FISHERMANS_HUT, + /* 0x3A */ ENTR_SCENE_GORON_SHOP, + /* 0x3B */ ENTR_SCENE_DEKU_KINGS_CHAMBER, + /* 0x3C */ ENTR_SCENE_MOON_GORON_TRIAL, + /* 0x3D */ ENTR_SCENE_ROAD_TO_SOUTHERN_SWAMP, + /* 0x3E */ ENTR_SCENE_DOGGY_RACETRACK, + /* 0x3F */ ENTR_SCENE_CUCCO_SHACK, + /* 0x40 */ ENTR_SCENE_IKANA_GRAVEYARD, + /* 0x41 */ ENTR_SCENE_GOHTS_LAIR, + /* 0x42 */ ENTR_SCENE_SOUTHERN_SWAMP_POISONED, + /* 0x43 */ ENTR_SCENE_WOODFALL, + /* 0x44 */ ENTR_SCENE_MOON_ZORA_TRIAL, + /* 0x45 */ ENTR_SCENE_GORON_VILLAGE_SPRING, + /* 0x46 */ ENTR_SCENE_GREAT_BAY_TEMPLE, + /* 0x47 */ ENTR_SCENE_WATERFALL_RAPIDS, + /* 0x48 */ ENTR_SCENE_BENEATH_THE_WELL, + /* 0x49 */ ENTR_SCENE_ZORA_HALL_ROOMS, + /* 0x4A */ ENTR_SCENE_GORON_VILLAGE_WINTER, + /* 0x4B */ ENTR_SCENE_GORON_GRAVERYARD, + /* 0x4C */ ENTR_SCENE_SAKONS_HIDEOUT, + /* 0x4D */ ENTR_SCENE_MOUNTAIN_VILLAGE_WINTER, + /* 0x4E */ ENTR_SCENE_GHOST_HUT, + /* 0x4F */ ENTR_SCENE_DEKU_SHRINE, + /* 0x50 */ ENTR_SCENE_ROAD_TO_IKANA, + /* 0x51 */ ENTR_SCENE_SWORDMANS_SCHOOL, + /* 0x52 */ ENTR_SCENE_MUSIC_BOX_HOUSE, + /* 0x53 */ ENTR_SCENE_IGOS_DU_IKANAS_LAIR, + /* 0x54 */ ENTR_SCENE_TOURIST_INFORMATION, + /* 0x55 */ ENTR_SCENE_STONE_TOWER, + /* 0x56 */ ENTR_SCENE_STONE_TOWER_INVERTED, + /* 0x57 */ ENTR_SCENE_MOUNTAIN_VILLAGE_SPRING, + /* 0x58 */ ENTR_SCENE_PATH_TO_SNOWHEAD, + /* 0x59 */ ENTR_SCENE_SNOWHEAD, + /* 0x5A */ ENTR_SCENE_PATH_TO_GORON_VILLAGE_WINTER, + /* 0x5B */ ENTR_SCENE_PATH_TO_GORON_VILLAGE_SPRING, + /* 0x5C */ ENTR_SCENE_GYORGS_LAIR, + /* 0x5D */ ENTR_SCENE_SECRET_SHRINE, + /* 0x5E */ ENTR_SCENE_STOCK_POT_INN, + /* 0x5F */ ENTR_SCENE_GREAT_BAY_CUTSCENE, + /* 0x60 */ ENTR_SCENE_CLOCK_TOWER_INTERIOR, + /* 0x61 */ ENTR_SCENE_WOODS_OF_MYSTERY, + /* 0x62 */ ENTR_SCENE_LOST_WOODS, + /* 0x63 */ ENTR_SCENE_MOON_LINK_TRIAL, + /* 0x64 */ ENTR_SCENE_THE_MOON, + /* 0x65 */ ENTR_SCENE_BOMB_SHOP, + /* 0x66 */ ENTR_SCENE_GIANTS_CHAMBER, + /* 0x67 */ ENTR_SCENE_GORMAN_TRACK, + /* 0x68 */ ENTR_SCENE_GORON_RACETRACK, + /* 0x69 */ ENTR_SCENE_EAST_CLOCK_TOWN, + /* 0x6A */ ENTR_SCENE_WEST_CLOCK_TOWN, + /* 0x6B */ ENTR_SCENE_NORTH_CLOCK_TOWN, + /* 0x6C */ ENTR_SCENE_SOUTH_CLOCK_TOWN, + /* 0x6D */ ENTR_SCENE_LAUNDRY_POOL, + /* 0x6E */ ENTR_SCENE_MAX +} EntranceSceneId; + +/* +* 0xFE00: Index into sSceneEntranceTable (Scene) +* 0x01F0: Index into the scenes specific entrance table (Spawn) +* 0x000F: Index into the specific entrance table (Layer), stored seperately in sceneSetupIndex +*/ +#define ENTRANCE(scene, spawn) ((((ENTR_SCENE_##scene) & 0x7F) << 9) | (((spawn) & 0x1F) << 4)) // SceneTableEntry draw configs typedef enum { diff --git a/include/z64subs.h b/include/z64subs.h index ff9404e9d..9f0b5fea3 100644 --- a/include/z64subs.h +++ b/include/z64subs.h @@ -104,7 +104,7 @@ Path* SubS_GetAdditionalPath(struct PlayState* play, u8 pathIndex, s32 max); Actor* SubS_FindNearestActor(Actor* actor, struct PlayState* play, u8 actorCategory, s16 actorId); -s32 SubS_ChangeAnimationByInfoS(SkelAnime* skelAnime, AnimationInfoS* animations, s32 index); +s32 SubS_ChangeAnimationByInfoS(SkelAnime* skelAnime, AnimationInfoS* animationInfo, s32 animIndex); s32 SubS_HasReachedPoint(Actor* actor, Path* path, s32 pointIndex); @@ -151,7 +151,7 @@ s32 SubS_ActorPathing_MoveWithGravity(struct PlayState* play, ActorPathing* acto s32 SubS_ActorPathing_MoveWithoutGravityReverse(struct PlayState* play, ActorPathing* actorPath); s32 SubS_ActorPathing_SetNextPoint(struct PlayState* play, ActorPathing* actorPath); -void SubS_ChangeAnimationBySpeedInfo(SkelAnime* skelAnime, AnimationSpeedInfo* animations, s32 nextIndex, s32* curIndex); +void SubS_ChangeAnimationBySpeedInfo(SkelAnime* skelAnime, AnimationSpeedInfo* animationInfo, s32 nextAnimIndex, s32* curAnimIndex); s32 SubS_StartActorCutscene(Actor* actor, s16 nextCutscene, s16 curCutscene, s32 type); s32 SubS_FillCutscenesList(Actor* actor, s16 cutscenes[], s16 numCutscenes); diff --git a/include/z_en_hy_code.h b/include/z_en_hy_code.h index 724b8c570..d272522c9 100644 --- a/include/z_en_hy_code.h +++ b/include/z_en_hy_code.h @@ -10,28 +10,28 @@ struct EnHy; //! TODO: Better animaion enum names when animations are documented typedef enum { - /* 0 */ ENHY_ANIMATION_AOB_0, - /* 1 */ ENHY_ANIMATION_BOJ_1, - /* 2 */ ENHY_ANIMATION_BOJ_2, - /* 3 */ ENHY_ANIMATION_BOJ_3, - /* 4 */ ENHY_ANIMATION_BOJ_4, - /* 5 */ ENHY_ANIMATION_BOJ_5, - /* 6 */ ENHY_ANIMATION_BBA_6, - /* 7 */ ENHY_ANIMATION_BJI_7, - /* 8 */ ENHY_ANIMATION_BJI_8, - /* 9 */ ENHY_ANIMATION_BJI_9, - /* 10 */ ENHY_ANIMATION_BOJ_10, - /* 11 */ ENHY_ANIMATION_OS_ANIME_11, - /* 12 */ ENHY_ANIMATION_BOJ_12, - /* 13 */ ENHY_ANIMATION_BOJ_13, - /* 14 */ ENHY_ANIMATION_BOJ_14, - /* 15 */ ENHY_ANIMATION_BOJ_15, - /* 16 */ ENHY_ANIMATION_BOJ_16, - /* 17 */ ENHY_ANIMATION_BOJ_17, - /* 18 */ ENHY_ANIMATION_BOJ_18, - /* 19 */ ENHY_ANIMATION_BOJ_19, - /* 20 */ ENHY_ANIMATION_BOJ_20, - /* 21 */ ENHY_ANIMATION_MAX + /* 0 */ ENHY_ANIM_AOB_0, + /* 1 */ ENHY_ANIM_BOJ_1, + /* 2 */ ENHY_ANIM_BOJ_2, + /* 3 */ ENHY_ANIM_BOJ_3, + /* 4 */ ENHY_ANIM_BOJ_4, + /* 5 */ ENHY_ANIM_BOJ_5, + /* 6 */ ENHY_ANIM_BBA_6, + /* 7 */ ENHY_ANIM_BJI_7, + /* 8 */ ENHY_ANIM_BJI_8, + /* 9 */ ENHY_ANIM_BJI_9, + /* 10 */ ENHY_ANIM_BOJ_10, + /* 11 */ ENHY_ANIM_OS_ANIME_11, + /* 12 */ ENHY_ANIM_BOJ_12, + /* 13 */ ENHY_ANIM_BOJ_13, + /* 14 */ ENHY_ANIM_BOJ_14, + /* 15 */ ENHY_ANIM_BOJ_15, + /* 16 */ ENHY_ANIM_BOJ_16, + /* 17 */ ENHY_ANIM_BOJ_17, + /* 18 */ ENHY_ANIM_BOJ_18, + /* 19 */ ENHY_ANIM_BOJ_19, + /* 20 */ ENHY_ANIM_BOJ_20, + /* 21 */ ENHY_ANIM_MAX } EnHyAnimation; typedef void (*EnHyActionFunc)(struct EnHy*, PlayState*); diff --git a/spec b/spec index ecf0be8dc..e17d3af91 100644 --- a/spec +++ b/spec @@ -631,8 +631,6 @@ beginseg pad_text include "build/src/code/audio/audio_sfx_params.o" include "build/src/code/audio/code_801A5BD0.o" - include "build/data/code/code_801A5BD0.data.o" - include "build/data/code/code_801A5BD0.bss.o" include "build/src/code/audio/code_801A7B10.o" include "build/data/code/code_801A7B10.data.o" include "build/data/code/code_801A7B10.bss.o" @@ -815,11 +813,7 @@ beginseg name "ovl_En_Arrow" compress include "build/src/overlays/actors/ovl_En_Arrow/z_en_arrow.o" -#ifdef NON_MATCHING include "build/src/overlays/actors/ovl_En_Arrow/ovl_En_Arrow_reloc.o" -#else - include "build/data/ovl_En_Arrow/ovl_En_Arrow.reloc.o" -#endif endseg beginseg @@ -1943,8 +1937,7 @@ beginseg name "ovl_Effect_Ss_Dead_Dd" compress include "build/src/overlays/effects/ovl_Effect_Ss_Dead_Dd/z_eff_ss_dead_dd.o" - include "build/data/ovl_Effect_Ss_Dead_Dd/ovl_Effect_Ss_Dead_Dd.data.o" - include "build/data/ovl_Effect_Ss_Dead_Dd/ovl_Effect_Ss_Dead_Dd.reloc.o" + include "build/src/overlays/effects/ovl_Effect_Ss_Dead_Dd/ovl_Effect_Ss_Dead_Dd_reloc.o" endseg beginseg @@ -2370,11 +2363,7 @@ beginseg name "ovl_Bg_Spdweb" compress include "build/src/overlays/actors/ovl_Bg_Spdweb/z_bg_spdweb.o" -#ifdef NON_MATCHING include "build/src/overlays/actors/ovl_Bg_Spdweb/ovl_Bg_Spdweb_reloc.o" -#else - include "build/data/ovl_Bg_Spdweb/ovl_Bg_Spdweb.reloc.o" -#endif endseg beginseg @@ -2515,11 +2504,7 @@ beginseg name "ovl_Obj_Spinyroll" compress include "build/src/overlays/actors/ovl_Obj_Spinyroll/z_obj_spinyroll.o" -#ifdef NON_MATCHING include "build/src/overlays/actors/ovl_Obj_Spinyroll/ovl_Obj_Spinyroll_reloc.o" -#else - include "build/data/ovl_Obj_Spinyroll/ovl_Obj_Spinyroll.reloc.o" -#endif endseg beginseg @@ -2864,8 +2849,7 @@ beginseg name "ovl_En_Rat" compress include "build/src/overlays/actors/ovl_En_Rat/z_en_rat.o" - include "build/data/ovl_En_Rat/ovl_En_Rat.data.o" - include "build/data/ovl_En_Rat/ovl_En_Rat.reloc.o" + include "build/src/overlays/actors/ovl_En_Rat/ovl_En_Rat_reloc.o" endseg beginseg @@ -3158,8 +3142,7 @@ beginseg name "ovl_Dm_Char09" compress include "build/src/overlays/actors/ovl_Dm_Char09/z_dm_char09.o" - include "build/data/ovl_Dm_Char09/ovl_Dm_Char09.data.o" - include "build/data/ovl_Dm_Char09/ovl_Dm_Char09.reloc.o" + include "build/src/overlays/actors/ovl_Dm_Char09/ovl_Dm_Char09_reloc.o" endseg beginseg @@ -3804,11 +3787,7 @@ beginseg name "ovl_Obj_Spidertent" compress include "build/src/overlays/actors/ovl_Obj_Spidertent/z_obj_spidertent.o" -#ifdef NON_MATCHING include "build/src/overlays/actors/ovl_Obj_Spidertent/ovl_Obj_Spidertent_reloc.o" -#else - include "build/data/ovl_Obj_Spidertent/ovl_Obj_Spidertent.reloc.o" -#endif endseg beginseg @@ -4363,8 +4342,7 @@ beginseg name "ovl_En_S_Goro" compress include "build/src/overlays/actors/ovl_En_S_Goro/z_en_s_goro.o" - include "build/data/ovl_En_S_Goro/ovl_En_S_Goro.data.o" - include "build/data/ovl_En_S_Goro/ovl_En_S_Goro.reloc.o" + include "build/src/overlays/actors/ovl_En_S_Goro/ovl_En_S_Goro_reloc.o" endseg beginseg @@ -4453,9 +4431,7 @@ beginseg name "ovl_Oceff_Wipe7" compress include "build/src/overlays/actors/ovl_Oceff_Wipe7/z_oceff_wipe7.o" - include "build/data/ovl_Oceff_Wipe7/ovl_Oceff_Wipe7.data.o" - include "build/data/ovl_Oceff_Wipe7/ovl_Oceff_Wipe7.bss.o" - include "build/data/ovl_Oceff_Wipe7/ovl_Oceff_Wipe7.reloc.o" + include "build/src/overlays/actors/ovl_Oceff_Wipe7/ovl_Oceff_Wipe7_reloc.o" endseg beginseg diff --git a/src/code/audio/audio_load.c b/src/code/audio/audio_load.c index b4997a94e..9ebdd1d85 100644 --- a/src/code/audio/audio_load.c +++ b/src/code/audio/audio_load.c @@ -1208,7 +1208,7 @@ void AudioLoad_Init(void* heap, size_t heapSize) { gAudioContext.refreshRate = 60; } - Audio_InitMesgQueues(); + AudioThread_InitMesgQueues(); for (i = 0; i < ARRAY_COUNT(gAudioContext.aiBufLengths); i++) { gAudioContext.aiBufLengths[i] = 0xA0; @@ -1217,7 +1217,7 @@ void AudioLoad_Init(void* heap, size_t heapSize) { gAudioContext.totalTaskCount = 0; gAudioContext.rspTaskIndex = 0; gAudioContext.curAiBuffferIndex = 0; - gAudioContext.soundMode = AUDIO_MODE_STEREO; + gAudioContext.soundMode = SOUNDMODE_STEREO; gAudioContext.curTask = NULL; gAudioContext.rspTask[0].task.t.dataSize = 0; gAudioContext.rspTask[1].task.t.dataSize = 0; diff --git a/src/code/audio/audio_playback.c b/src/code/audio/audio_playback.c index c7789bd36..e7f5153ac 100644 --- a/src/code/audio/audio_playback.c +++ b/src/code/audio/audio_playback.c @@ -34,7 +34,7 @@ void AudioPlayback_InitNoteSub(Note* note, NoteSubEu* sub, NoteSubAttributes* at sub->bitField0.stereoStrongLeft = false; sub->bitField0.stereoHeadsetEffects = stereoData.stereoHeadsetEffects; sub->bitField0.usesHeadsetPanEffects = stereoData.usesHeadsetPanEffects; - if (stereoHeadsetEffects && gAudioContext.soundMode == AUDIO_MODE_HEADSET) { + if (stereoHeadsetEffects && gAudioContext.soundMode == SOUNDMODE_HEADSET) { smallPanIndex = pan >> 1; if (smallPanIndex > 0x3F) { smallPanIndex = 0x3F; @@ -46,7 +46,7 @@ void AudioPlayback_InitNoteSub(Note* note, NoteSubEu* sub, NoteSubAttributes* at volLeft = gHeadsetPanVolume[pan]; volRight = gHeadsetPanVolume[0x7F - pan]; - } else if (stereoHeadsetEffects && gAudioContext.soundMode == AUDIO_MODE_STEREO) { + } else if (stereoHeadsetEffects && gAudioContext.soundMode == SOUNDMODE_STEREO) { strongLeft = strongRight = false; sub->headsetPanRight = 0; sub->headsetPanLeft = 0; @@ -80,7 +80,7 @@ void AudioPlayback_InitNoteSub(Note* note, NoteSubEu* sub, NoteSubAttributes* at break; } - } else if (gAudioContext.soundMode == AUDIO_MODE_MONO) { + } else if (gAudioContext.soundMode == SOUNDMODE_MONO) { sub->bitField0.stereoHeadsetEffects = false; sub->bitField0.usesHeadsetPanEffects = false; volLeft = 0.707f; // approx 1/sqrt(2) diff --git a/src/code/audio/audio_seqplayer.c b/src/code/audio/audio_seqplayer.c index d504f9f3a..ebcc9a8d1 100644 --- a/src/code/audio/audio_seqplayer.c +++ b/src/code/audio/audio_seqplayer.c @@ -1633,7 +1633,7 @@ void AudioSeq_SequenceChannelProcessScript(SequenceChannel* channel) { break; case 0xA8: // channel: random range large (only cmd that differs from OoT) - rand = Audio_NextRandom(); + rand = AudioThread_NextRandom(); channel->unk_22 = (cmdArgs[0] == 0) ? (rand & 0xFFFF) : (rand % cmdArgs[0]); channel->unk_22 += cmdArgs[1]; temp2 = (channel->unk_22 / 0x100) + 0x80; diff --git a/src/code/audio/audio_sfx_params.c b/src/code/audio/audio_sfx_params.c index 94a8f26bc..0066328b1 100644 --- a/src/code/audio/audio_sfx_params.c +++ b/src/code/audio/audio_sfx_params.c @@ -1,9 +1,9 @@ #include "global.h" -#define DEFINE_SFX(_0, importance, distParam, randParam, flags2, flags1) \ - { importance, flags2, \ - ((((distParam) << SFX_PARAM_01_SHIFT) & SFX_PARAM_01_MASK) | \ - (((randParam) << SFX_PARAM_67_SHIFT) & SFX_PARAM_67_MASK) | (flags1)) }, +#define DEFINE_SFX(_0, importance, distParam, randParam, flags2, flags1) \ + { importance, flags2, \ + ((((distParam) << SFX_PARAM_DIST_RANGE_SHIFT) & SFX_PARAM_DIST_RANGE_MASK) | \ + (((randParam) << SFX_PARAM_RAND_FREQ_RAISE_SHIFT) & SFX_PARAM_RAND_FREQ_RAISE_MASK) | (flags1)) }, SfxParams sEnemyBankParams[] = { #include "tables/sfx/enemybank_table.h" diff --git a/src/code/audio/code_80192BE0.c b/src/code/audio/code_80192BE0.c index 20b4239da..e69f678ff 100644 --- a/src/code/audio/code_80192BE0.c +++ b/src/code/audio/code_80192BE0.c @@ -16,13 +16,13 @@ #pragma GLOBAL_ASM("asm/non_matchings/code/code_80192BE0/func_80193858.s") -#pragma GLOBAL_ASM("asm/non_matchings/code/code_80192BE0/func_8019387C.s") +#pragma GLOBAL_ASM("asm/non_matchings/code/code_80192BE0/AudioThread_QueueCmdS32.s") -#pragma GLOBAL_ASM("asm/non_matchings/code/code_80192BE0/Audio_QueueCmdS8.s") +#pragma GLOBAL_ASM("asm/non_matchings/code/code_80192BE0/AudioThread_QueueCmdS8.s") #pragma GLOBAL_ASM("asm/non_matchings/code/code_80192BE0/func_801938D0.s") -#pragma GLOBAL_ASM("asm/non_matchings/code/code_80192BE0/func_80193900.s") +#pragma GLOBAL_ASM("asm/non_matchings/code/code_80192BE0/AudioThread_ScheduleProcessCmds.s") #pragma GLOBAL_ASM("asm/non_matchings/code/code_80192BE0/func_80193990.s") @@ -76,6 +76,6 @@ #pragma GLOBAL_ASM("asm/non_matchings/code/code_80192BE0/func_80194568.s") -#pragma GLOBAL_ASM("asm/non_matchings/code/code_80192BE0/Audio_NextRandom.s") +#pragma GLOBAL_ASM("asm/non_matchings/code/code_80192BE0/AudioThread_NextRandom.s") -#pragma GLOBAL_ASM("asm/non_matchings/code/code_80192BE0/Audio_InitMesgQueues.s") +#pragma GLOBAL_ASM("asm/non_matchings/code/code_80192BE0/AudioThread_InitMesgQueues.s") diff --git a/src/code/audio/code_8019AF00.c b/src/code/audio/code_8019AF00.c index 65c3a6de8..b896facbc 100644 --- a/src/code/audio/code_8019AF00.c +++ b/src/code/audio/code_8019AF00.c @@ -18,15 +18,15 @@ typedef struct { } SfxSettings; // size = 0x9 typedef struct { - /* 0x0 */ f32 vol; + /* 0x0 */ f32 volume; /* 0x4 */ f32 freqScale; /* 0x8 */ s8 reverb; /* 0x9 */ s8 panSigned; /* 0xA */ s8 stereoBits; /* 0xB */ u8 filter; - /* 0xC */ u8 unk_0C; - /* 0xD */ u8 unk_0D; -} SfxPlayerState; // size = 0xE + /* 0xC */ u8 combFilterGain; + /* 0xD */ u8 zVolume; +} SfxChannelState; // size = 0xE typedef enum { /* 0x0 */ SFX_CHANNEL_PLAYER0, // SfxPlayerBank @@ -91,7 +91,7 @@ f32* sSfxVolumeCur; f32 sSfxVolumeTarget; f32 sSfxVolumeRate; u16 sSceneSeqId1; -SfxPlayerState sSfxChannelState[16]; +SfxChannelState sSfxChannelState[16]; // Sequence bss u8 D_801FD3A8; @@ -154,7 +154,8 @@ OcarinaNote sScarecrowsLongSongSecondNote; u16 sCustomSequencePc; // Sfx Data -u8 D_801D6600[] = { +// If the Sfx Bank has more than 255 values (max value of u8) +u8 gIsLargeSfxBank[] = { true, false, true, true, false, false, true, }; u8 D_801D6608[] = { @@ -192,7 +193,7 @@ u8 sEnterGanonsTowerTimer = 0; u16 sSfxVolumeDuration = 0; // System Data -s8 sAudioFileSelectSetting = AUDIO_FS_STEREO; +s8 sSoundMode = SOUNDMODE_STEREO; s8 sAudioIsWindowOpen = false; s8 sAudioCutsceneFlag = false; s8 sSpecReverb = 0; @@ -2495,7 +2496,7 @@ void AudioOcarina_PlayControllerInput(u8 isOcarinaSfxSuppressedWhenCancelled) { // Add vibrato of the ocarina note based on the x control stick sCurOcarinaVibrato = ABS_ALT(sOcarinaInputStickRel.x) >> 2; // Sets vibrato to io port 6 - Audio_QueueCmdS8(0x6 << 24 | SEQ_PLAYER_SFX << 16 | SFX_CHANNEL_OCARINA << 8 | 6, sCurOcarinaVibrato); + AudioThread_QueueCmdS8(0x6 << 24 | SEQ_PLAYER_SFX << 16 | SFX_CHANNEL_OCARINA << 8 | 6, sCurOcarinaVibrato); } else { // no bending or vibrato for recording state OCARINA_RECORD_SCARECROW_SPAWN sCurOcarinaBendIndex = 0; @@ -2507,15 +2508,16 @@ void AudioOcarina_PlayControllerInput(u8 isOcarinaSfxSuppressedWhenCancelled) { if ((sCurOcarinaPitch != OCARINA_PITCH_NONE) && (sPrevOcarinaPitch != sCurOcarinaPitch)) { // Sets ocarina instrument Id to io port 7, which is used // as an index in seq 0 to get the true instrument Id - Audio_QueueCmdS8(0x6 << 24 | SEQ_PLAYER_SFX << 16 | SFX_CHANNEL_OCARINA << 8 | 7, sOcarinaInstrumentId - 1); + AudioThread_QueueCmdS8(0x6 << 24 | SEQ_PLAYER_SFX << 16 | SFX_CHANNEL_OCARINA << 8 | 7, + sOcarinaInstrumentId - 1); // Sets pitch to io port 5 - Audio_QueueCmdS8(0x6 << 24 | SEQ_PLAYER_SFX << 16 | SFX_CHANNEL_OCARINA << 8 | 5, sCurOcarinaPitch); - Audio_PlaySfxGeneral(NA_SE_OC_OCARINA, &gSfxDefaultPos, 4, &sCurOcarinaBendFreq, &sDefaultOcarinaVolume, - &gSfxDefaultReverb); + AudioThread_QueueCmdS8(0x6 << 24 | SEQ_PLAYER_SFX << 16 | SFX_CHANNEL_OCARINA << 8 | 5, sCurOcarinaPitch); + AudioSfx_PlaySfx(NA_SE_OC_OCARINA, &gSfxDefaultPos, 4, &sCurOcarinaBendFreq, &sDefaultOcarinaVolume, + &gSfxDefaultReverb); } else if ((sPrevOcarinaPitch != OCARINA_PITCH_NONE) && (sCurOcarinaPitch == OCARINA_PITCH_NONE) && !isOcarinaSfxSuppressedWhenCancelled) { // Stops ocarina sound when transitioning from playing to not playing a note - Audio_StopSfxById(NA_SE_OC_OCARINA); + AudioSfx_StopById(NA_SE_OC_OCARINA); } } } @@ -2540,10 +2542,10 @@ void AudioOcarina_ResetAndMute(void) { sOcarinaInputButtonStart = 0xFFFF; AudioOcarina_PlayControllerInput(false); - Audio_StopSfxById(NA_SE_OC_OCARINA); + AudioSfx_StopById(NA_SE_OC_OCARINA); if (gAudioSpecId != 12) { - Audio_SetSfxBanksMute(0); + AudioSfx_MuteBanks(0); } sPlaybackState = 0; @@ -2553,7 +2555,7 @@ void AudioOcarina_ResetAndMute(void) { sOcarinaFlags = 0; // return to full volume for both bgm players after ocarina is finished - Audio_ClearFlagForBgmVolumeLow(SFX_CHANNEL_OCARINA); + AudioSfx_RestoreBgmVolume(SFX_CHANNEL_OCARINA); // return to full volume for all sfx channels except system & ocarina banks Audio_SetSfxVolumeExceptSystemAndOcarinaBanks(0x7F); } @@ -2602,7 +2604,7 @@ u32 AudioOcarina_SetInstrument(u8 ocarinaInstrumentId) { // lowers volume of all sfx channels except system & ocarina banks Audio_SetSfxVolumeExceptSystemAndOcarinaBanks(0x40); // lowers volume of bgm players while playing ocarina - Audio_SetFlagForBgmVolumeLow(SFX_CHANNEL_OCARINA); + AudioSfx_LowerBgmVolume(SFX_CHANNEL_OCARINA); } } } @@ -2612,7 +2614,7 @@ void AudioOcarina_SetPlaybackSong(s8 songIndexPlusOne, u8 playbackState) { if (songIndexPlusOne == 0) { sPlaybackState = 0; - Audio_StopSfxById(NA_SE_OC_OCARINA); + AudioSfx_StopById(NA_SE_OC_OCARINA); return; } @@ -2700,7 +2702,7 @@ void AudioOcarina_PlaybackSong(void) { sPlaybackStaffPos = 0; sPlaybackPitch = OCARINA_PITCH_NONE; } else { - Audio_StopSfxById(NA_SE_OC_OCARINA); + AudioSfx_StopById(NA_SE_OC_OCARINA); } return; } else { @@ -2716,7 +2718,7 @@ void AudioOcarina_PlaybackSong(void) { // Update vibrato sNotePlaybackVibrato = sPlaybackSong[sPlaybackNotePos].vibrato; // Sets vibrato to io port 6 - Audio_QueueCmdS8(0x6 << 24 | SEQ_PLAYER_SFX << 16 | SFX_CHANNEL_OCARINA << 8 | 6, sNotePlaybackVibrato); + AudioThread_QueueCmdS8(0x6 << 24 | SEQ_PLAYER_SFX << 16 | SFX_CHANNEL_OCARINA << 8 | 6, sNotePlaybackVibrato); // Update bend if (sNotePlaybackBend != sPlaybackSong[sPlaybackNotePos].bend) { @@ -2746,14 +2748,14 @@ void AudioOcarina_PlaybackSong(void) { sPlaybackStaffPos++; // Sets ocarina instrument Id to io port 7, which is used // as an index in seq 0 to get the true instrument Id - Audio_QueueCmdS8(0x6 << 24 | SEQ_PLAYER_SFX << 16 | SFX_CHANNEL_OCARINA << 8 | 7, - sOcarinaInstrumentId - 1); - Audio_QueueCmdS8(0x6 << 24 | SEQ_PLAYER_SFX << 16 | SFX_CHANNEL_OCARINA << 8 | 5, - sPlaybackPitch & OCARINA_BUTTON_MASK_PITCH); - Audio_PlaySfxGeneral(NA_SE_OC_OCARINA, &gSfxDefaultPos, 4, &sRelativeNotePlaybackBend, - &sRelativeNotePlaybackVolume, &gSfxDefaultReverb); + AudioThread_QueueCmdS8(0x6 << 24 | SEQ_PLAYER_SFX << 16 | SFX_CHANNEL_OCARINA << 8 | 7, + sOcarinaInstrumentId - 1); + AudioThread_QueueCmdS8(0x6 << 24 | SEQ_PLAYER_SFX << 16 | SFX_CHANNEL_OCARINA << 8 | 5, + sPlaybackPitch & OCARINA_BUTTON_MASK_PITCH); + AudioSfx_PlaySfx(NA_SE_OC_OCARINA, &gSfxDefaultPos, 4, &sRelativeNotePlaybackBend, + &sRelativeNotePlaybackVolume, &gSfxDefaultReverb); } else { - Audio_StopSfxById(NA_SE_OC_OCARINA); + AudioSfx_StopById(NA_SE_OC_OCARINA); } } sPlaybackNotePos++; @@ -3073,7 +3075,7 @@ void AudioOcarina_TerminaWallGenerateNotes(void) { j = 0; for (; i < 8; i++) { - randomButtonIndex = Audio_NextRandom() % ARRAY_COUNT(sButtonToPitchMap); + randomButtonIndex = AudioThread_NextRandom() % ARRAY_COUNT(sButtonToPitchMap); sOcarinaSongNotes[OCARINA_SONG_TERMINA_WALL][j].pitch = sButtonToPitchMap[randomButtonIndex]; sOcarinaSongNotes[OCARINA_SONG_TERMINA_WALL][j].length = 19; sOcarinaSongNotes[OCARINA_SONG_TERMINA_WALL][j].volume = 80; @@ -3094,7 +3096,7 @@ void AudioOcarina_TerminaWallGenerateNotes(void) { sOcarinaSongNotes[OCARINA_SONG_TERMINA_WALL][j + 1].length = 0; AudioOcarina_MapSongFromPitchToButton(OCARINA_SONG_TERMINA_WALL, OCARINA_SONG_TERMINA_WALL, 8); } else { - j = Audio_NextRandom() % ARRAY_COUNT(sOoTOcarinaSongNotes); + j = AudioThread_NextRandom() % ARRAY_COUNT(sOoTOcarinaSongNotes); ocarinaNote = sOoTOcarinaSongNotes[j]; for (; ocarinaNote[i].length != 0; i++) { @@ -3140,7 +3142,7 @@ s32 AudioOcarina_MemoryGameNextNote(void) { return true; } - randomButtonIndex = Audio_NextRandom(); + randomButtonIndex = AudioThread_NextRandom(); randomPitch = sButtonToPitchMap[randomButtonIndex % ARRAY_COUNT(sButtonToPitchMap)]; if (sOcarinaSongNotes[OCARINA_SONG_MEMORY_GAME][sOcarinaMemoryGameAppendPos - 1].pitch == randomPitch) { @@ -3234,7 +3236,7 @@ void AudioOcarina_PlayLongScarecrowAfterCredits(void) { break; case 1: - Audio_SetSfxBanksMute(0); + AudioSfx_MuteBanks(0); AudioOcarina_SetInstrument(sScarecrowAfterCreditsIntrumentId); AudioOcarina_SetPlaybackSong(OCARINA_SONG_SCARECROW_LONG + 1, 1); sScarecrowAfterCreditsIntrumentId++; @@ -3475,20 +3477,6 @@ void AudioOcarina_ResetStaffs(void) { D_801D8534 = 0; } -s8 D_801D8B30[] = { - 0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, - 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, - 56, 56, 57, 57, 58, 58, 59, 59, 60, 60, 60, 61, 61, 61, 62, 62, 62, 63, 63, 63, 64, 64, - 64, 65, 65, 65, 66, 66, 66, 67, 67, 67, 68, 68, 69, 69, 70, 70, 71, 71, 72, 73, 74, 75, - 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, - 98, 99, 100, 101, 102, 103, 105, 107, 109, 111, 113, 115, 117, 119, 121, 123, 125, 127, -}; -f32 sBigBellsVolume[8] = { - 1.0f, 0.9f, 0.8f, 0.7f, 0.6f, 0.5f, 0.4f, 0.3f, -}; -u8 sBgmPlayers[2] = { SEQ_PLAYER_BGM_MAIN, SEQ_PLAYER_BGM_SUB }; -f32 sSfxOriginalPos[] = { 0.0f, 0.0f, 0.0f }; - #pragma GLOBAL_ASM("asm/non_matchings/code/code_8019AF00/func_8019DFF8.s") #pragma GLOBAL_ASM("asm/non_matchings/code/code_8019AF00/func_8019E000.s") @@ -3503,23 +3491,447 @@ f32 sSfxOriginalPos[] = { 0.0f, 0.0f, 0.0f }; #pragma GLOBAL_ASM("asm/non_matchings/code/code_8019AF00/func_8019E110.s") -#pragma GLOBAL_ASM("asm/non_matchings/code/code_8019AF00/func_8019E14C.s") +f32 AudioSfx_ComputeVolume(u8 bankId, u8 entryIndex) { + SfxBankEntry* bankEntry = &gSfxBanks[bankId][entryIndex]; + f32 minDist; + f32 phi_f14; + f32 baseDist; + f32 phi_f12; + f32 volume; // Also acts as intermediate volumeSquared + s32 pad[3]; -#pragma GLOBAL_ASM("asm/non_matchings/code/code_8019AF00/func_8019E324.s") + if (bankEntry->sfxParams & SFX_FLAG_VOLUME_NO_DIST) { + return 1.0f; + } -#pragma GLOBAL_ASM("asm/non_matchings/code/code_8019AF00/func_8019E4B0.s") + if (bankEntry->dist > 10000.0f) { + volume = 0.0f; + } else { + if (bankEntry->sfxParams & SFX_PARAM_DIST_RANGE_MASK_UPPER) { + phi_f12 = 0.35f; + phi_f14 = 0.65f; + } else { + phi_f12 = 0.81f; + phi_f14 = 0.19f; + } -#pragma GLOBAL_ASM("asm/non_matchings/code/code_8019AF00/func_8019E634.s") + switch (bankEntry->sfxParams & SFX_PARAM_DIST_RANGE_MASK) { + case 0: + baseDist = 500.0f; + break; -#pragma GLOBAL_ASM("asm/non_matchings/code/code_8019AF00/func_8019E864.s") + case 1: + baseDist = 666.6667f; + break; -#pragma GLOBAL_ASM("asm/non_matchings/code/code_8019AF00/func_8019EA40.s") + case 2: + baseDist = 952.381f; + break; -#pragma GLOBAL_ASM("asm/non_matchings/code/code_8019AF00/func_8019EB2C.s") + case 3: + baseDist = 3846.154f; + break; -#pragma GLOBAL_ASM("asm/non_matchings/code/code_8019AF00/func_8019F024.s") + case 4: + baseDist = 1000.0f; + break; -#pragma GLOBAL_ASM("asm/non_matchings/code/code_8019AF00/func_8019F05C.s") + case 5: + baseDist = 666.6667f; + break; + + case 6: + baseDist = 500.0f; + break; + + case 7: + baseDist = 400.0f; + break; + } + + minDist = baseDist / 5.0f; + + if (bankEntry->dist < minDist) { + volume = 1.0f; + } else if (bankEntry->dist < baseDist) { + volume = + ((((baseDist - minDist) - (bankEntry->dist - minDist)) / (baseDist - minDist)) * phi_f14) + phi_f12; + } else { + volume = (1.0f - ((bankEntry->dist - baseDist) / (10000.0f - baseDist))) * phi_f12; + } + + volume = SQ(volume); + } + + return volume; +} + +s8 AudioSfx_ComputeReverb(u8 bankId, u8 entryIndex, u8 channelIndex) { + s8 distAdd = 0; + s32 scriptAdd = 0; + SfxBankEntry* entry = &gSfxBanks[bankId][entryIndex]; + s32 reverb; + + if (!(entry->sfxParams & SFX_FLAG_REVERB_NO_DIST)) { + if (entry->dist < 2500.0f) { + distAdd = *entry->posZ > 0.0f ? (entry->dist / 2500.0f) * 70.0f : (entry->dist / 2500.0f) * 91.0f; + } else { + distAdd = 70; + } + } + + if (IS_SEQUENCE_CHANNEL_VALID(gAudioContext.seqPlayers[SEQ_PLAYER_SFX].channels[channelIndex])) { + scriptAdd = gAudioContext.seqPlayers[SEQ_PLAYER_SFX].channels[channelIndex]->soundScriptIO[1]; + if (gAudioContext.seqPlayers[SEQ_PLAYER_SFX].channels[channelIndex]->soundScriptIO[1] < 0) { + scriptAdd = 0; + } + } + + reverb = (*entry->reverbAdd & 0x7F) + distAdd; + + if (entry->state != SFX_STATE_READY) { + reverb += scriptAdd; + } + + if ((bankId != BANK_OCARINA) || (SFX_INDEX(entry->sfxId) >= 2)) { + reverb += sAudioEnvReverb + (sAudioCodeReverb & 0x3F) + sSpecReverb; + } + + if (reverb > 0x7F) { + reverb = 0x7F; + } + + return reverb; +} + +s8 AudioSfx_ComputePanSigned(f32 x, f32 z, u8 token) { + f32 absX = ABS_ALT(x); + f32 absZ = ABS_ALT(z); + f32 pan; + + if (absX > 8000.0f) { + absX = 8000.0f; + } + + if (absZ > 8000.0f) { + absZ = 8000.0f; + } + + if ((x == 0.0f) && (z == 0.0f)) { + pan = 0.5f; + } else if (absZ <= absX) { + pan = (16000.0f - absX) / (4.5f * (16000.0f - absZ)); + if (x >= 0.0f) { + pan = 1.0f - pan; + } + } else { + pan = (x / (3.6f * absZ)) + 0.5f; + } + + if ((absZ < 50.0f) && (absX < 50.0f)) { + pan = ((pan - 0.5f) * SQ(absX / 50.0f)) + 0.5f; + } + + return (pan * 127.0f) + 0.5f; +} + +f32 AudioSfx_ComputeFreqScale(u8 bankId, u8 entryIndex) { + s32 applyRandScaling = false; + SfxBankEntry* entry = &gSfxBanks[bankId][entryIndex]; + f32 dist; + f32 freq = 1.0f; + + if (entry->sfxParams & SFX_PARAM_RAND_FREQ_LOWER) { + freq = 1.0f - ((gAudioContext.audioRandom & 0xF) / 192.0f); + } + + switch (bankId) { + case BANK_VOICE: + if (((entry->sfxId & 0xFF) < 0x40) && (sAudioBaseFilter2 != 0)) { + applyRandScaling = true; + } else if (((entry->sfxId & 0xFF) >= 0x40) && (sAudioExtraFilter2 != 0)) { + applyRandScaling = true; + } + break; + + case BANK_PLAYER: + case BANK_ITEM: + if (sAudioBaseFilter2 != 0) { + applyRandScaling = true; + } + break; + + case BANK_ENV: + case BANK_ENEMY: + if (((*entry->reverbAdd & 0x80) != 0) | (sAudioExtraFilter2 != 0)) { + applyRandScaling = true; + } + break; + + case BANK_SYSTEM: + case BANK_OCARINA: + break; + + default: + break; + } + + if ((applyRandScaling == true) && !(entry->sfxParams & SFX_PARAM_RAND_FREQ_SCALE)) { + freq *= 1.0293 - ((gAudioContext.audioRandom & 0xF) / 144.0f); + } + + dist = entry->dist; + if (!(entry->sfxParams & SFX_FLAG_VOLUME_NO_DIST) && !(entry->sfxParams & SFX_FLAG_FREQ_NO_DIST)) { + if (dist >= 10000.0f) { + freq += 0.2f; + } else { + freq += (0.2f * (dist / 10000.0f)); + } + } + + if ((entry->sfxParams & SFX_PARAM_RAND_FREQ_RAISE_MASK) != (0 << SFX_PARAM_RAND_FREQ_RAISE_SHIFT)) { + freq += (entry->randFreq / 192.0f); + } + + return freq; +} + +u8 AudioSfx_ComputeSurroundSoundFilter(f32 behindScreenZ, SfxBankEntry* entry, s8 panSigned) { + u8 lowPassCutoff; + u8 highPassCutoff; + u16* sfxParams; + f32 distParam; + f32 dist; + + // Remnant of OoT + if (*entry->posZ < behindScreenZ) { + lowPassCutoff = 0; + } else { + lowPassCutoff = 0; + } + + sfxParams = &entry->sfxParams; + + if (*sfxParams & SFX_FLAG_SURROUND_LOWPASS_FILTER) { + lowPassCutoff = 0xF; + } + + switch ((*sfxParams & SFX_PARAM_DIST_RANGE_MASK)) { + case 0: + distParam = 15.0f; + break; + + case 1: + distParam = 12.0f; + break; + + case 2: + distParam = 9.0f; + break; + + case 3: + distParam = 6.0f; + break; + + case 4: + distParam = 18.0f; + break; + + case 5: + distParam = 21.0f; + break; + + case 6: + distParam = 24.0f; + break; + + case 7: + distParam = 27.0f; + break; + + default: + break; + } + + if (!(entry->sfxFlags & SFX_FLAG2_SURROUND_NO_HIGHPASS_FILTER)) { + if (entry->dist > 1923.077f) { + dist = 1923.077f; + } else { + dist = entry->dist; + } + + highPassCutoff = (distParam * dist) / (2 * 1923.077f); + } else { + highPassCutoff = 0; + } + + return (lowPassCutoff << 4) + highPassCutoff; +} + +s8 AudioSfx_ComputeCombFilter(f32 posY, u16 sfxParams) { + s8 combFilterGain; + + if (posY < 0.0f) { + if (posY < -625.0f) { + combFilterGain = -32; + } else { + combFilterGain = (s8)(((625.0f + posY) / 625.0f) * 31.0f) + 0xE0; + } + } else if (posY > 1250.0f) { + combFilterGain = 127; + } else { + combFilterGain = (posY / 1250.0f) * 126.0f; + } + + return combFilterGain | 1; +} + +void AudioSfx_SetProperties(u8 bankId, u8 entryIndex, u8 channelIndex) { + static s8 sZVolumes[] = { + 0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, + 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, + 56, 56, 57, 57, 58, 58, 59, 59, 60, 60, 60, 61, 61, 61, 62, 62, 62, 63, 63, 63, 64, 64, + 64, 65, 65, 65, 66, 66, 66, 67, 67, 67, 68, 68, 69, 69, 70, 70, 71, 71, 72, 73, 74, 75, + 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, + 98, 99, 100, 101, 102, 103, 105, 107, 109, 111, 113, 115, 117, 119, 121, 123, 125, 127, + }; + f32 volume = 1.0f; + s8 volumeS8; + s8 reverb = 0; + f32 freqScale = 1.0f; + s8 panSigned = 0x40; + u8 pad; + u8 filter = 0; + s8 combFilterGain = 0; + s8 zVolume = -1; + f32 behindScreenZ; + u8 baseFilter = 0; + SfxBankEntry* entry = &gSfxBanks[bankId][entryIndex]; + s32 pad2; + + switch (bankId) { + case BANK_PLAYER: + case BANK_ITEM: + case BANK_ENV: + case BANK_ENEMY: + case BANK_VOICE: + if (sSoundMode == SOUNDMODE_SURROUND) { + combFilterGain = AudioSfx_ComputeCombFilter(*entry->posY, entry->sfxParams); + } + // fallthrough + case BANK_OCARINA: + entry->dist = sqrtf(entry->dist * 10.0f); + volume = AudioSfx_ComputeVolume(bankId, entryIndex) * *entry->volume; + reverb = AudioSfx_ComputeReverb(bankId, entryIndex, channelIndex); + panSigned = AudioSfx_ComputePanSigned(*entry->posX, *entry->posZ, entry->token); + freqScale = AudioSfx_ComputeFreqScale(bankId, entryIndex) * *entry->freqScale; + + if (sSoundMode == SOUNDMODE_SURROUND) { + if (*entry->posZ >= 0.0f) { + if (*entry->posZ < 200.0f) { + zVolume = 32.0f - ((*entry->posZ / 300.0f) * 32.0f); + } else { + zVolume = 0; + } + } else if (*entry->posZ < 0.0f) { + if (*entry->posZ > -300.0f) { + zVolume = 32.0f - ((*entry->posZ / 300.0f) * 95.0f); + } else { + zVolume = 127; + } + } + zVolume = sZVolumes[zVolume]; + } + + if (sAudioBaseFilter != 0) { + if ((bankId == BANK_PLAYER) || (bankId == BANK_ITEM) || + ((bankId == BANK_VOICE) && (((entry->sfxId & 0xFF) < 0x40) || ((entry->sfxId & 0xFF) >= 0x80)))) { + baseFilter = sAudioBaseFilter; + if (sAudioExtraFilter) { + reverb >>= 2; + } + } + } + + if (((*entry->reverbAdd & 0x80) | baseFilter | sAudioExtraFilter | + (entry->sfxFlags & SFX_FLAG2_APPLY_LOWPASS_FILTER)) != 0) { + filter = ((((*entry->reverbAdd & 0x80) >> 2) | baseFilter | sAudioExtraFilter | + ((entry->sfxFlags & SFX_FLAG2_APPLY_LOWPASS_FILTER) >> 2)) * + 2); + filter &= 0xFF; + } else if ((sSoundMode == SOUNDMODE_SURROUND) && !(entry->sfxParams & SFX_FLAG_VOLUME_NO_DIST)) { + filter = AudioSfx_ComputeSurroundSoundFilter(behindScreenZ, entry, panSigned); + } + break; + + case BANK_SYSTEM: + break; + } + + if (sSfxChannelState[channelIndex].volume != volume) { + volumeS8 = (u8)(volume * 127.0f); + sSfxChannelState[channelIndex].volume = volume; + } else { + volumeS8 = -1; + } + + //! FAKE: + if (1) {} + + // CHAN_UPD_SCRIPT_IO (slot 2, sets volume) + AudioThread_QueueCmdS8((0x6 << 24) | (SEQ_PLAYER_SFX << 16) | (channelIndex << 8) | 2, volumeS8); + + if (sSfxChannelState[channelIndex].reverb != reverb) { + sSfxChannelState[channelIndex].reverb = reverb; + } + if (sSfxChannelState[channelIndex].freqScale != freqScale) { + sSfxChannelState[channelIndex].freqScale = freqScale; + } + if (sSfxChannelState[channelIndex].stereoBits != 0) { + sSfxChannelState[channelIndex].stereoBits = 0; + } + if (sSfxChannelState[channelIndex].filter != filter) { + sSfxChannelState[channelIndex].filter = filter; + } + if (sSfxChannelState[channelIndex].combFilterGain != combFilterGain) { + sSfxChannelState[channelIndex].combFilterGain = combFilterGain; + } + if (sSfxChannelState[channelIndex].zVolume != zVolume) { + sSfxChannelState[channelIndex].zVolume = zVolume; + } + if (sSfxChannelState[channelIndex].panSigned != panSigned) { + sSfxChannelState[channelIndex].panSigned = panSigned; + } +} + +u32 AudioSfx_SetFreqAndStereoBits(u8 seqScriptValIn, SequenceChannel* channel) { + channel->stereo.asByte = sSfxChannelState[seqScriptValIn].stereoBits; + channel->freqScale = sSfxChannelState[seqScriptValIn].freqScale; + channel->changes.s.freqScale = true; + + return seqScriptValIn; +} + +void AudioSfx_ResetSfxChannelState(void) { + SfxChannelState* state; + u8 i; + + for (i = 0; i < ARRAY_COUNT(sSfxChannelState); i++) { + state = &sSfxChannelState[i]; + state->volume = 1.0f; + state->freqScale = 1.0f; + state->reverb = 0; + state->panSigned = 0x40; + state->stereoBits = 0; + state->filter = 0xFF; + state->combFilterGain = 0xFF; + state->zVolume = 0xFF; + } + + sSfxChannelState[SFX_CHANNEL_OCARINA].combFilterGain = 0; + sPrevSeqMode = SEQ_MODE_DEFAULT; + sAudioCodeReverb = 0; +} #pragma GLOBAL_ASM("asm/non_matchings/code/code_8019AF00/play_sound.s") @@ -3533,9 +3945,75 @@ f32 sSfxOriginalPos[] = { 0.0f, 0.0f, 0.0f }; #pragma GLOBAL_ASM("asm/non_matchings/code/code_8019AF00/func_8019F230.s") -#pragma GLOBAL_ASM("asm/non_matchings/code/code_8019AF00/func_8019F258.s") +SfxSettings* AudioSfx_AddSfxSetting(Vec3f* pos) { + SfxSettings* sfxSettings; + u8 i = 0; + u8 sfxSettingIndex = 0xFF; -#pragma GLOBAL_ASM("asm/non_matchings/code/code_8019AF00/func_8019F300.s") + for (; i < ARRAY_COUNT(sSfxSettings); i++) { + sfxSettings = &sSfxSettings[i]; + + if ((sfxSettings->pos == NULL) && (sfxSettingIndex == 0xFF)) { + sfxSettingIndex = i; + } + + if (sfxSettings->pos == pos) { + return sfxSettings; + } + } + + if (sfxSettingIndex != 0xFF) { + sSfxSettingsFlags |= 1 << sfxSettingIndex; + sfxSettings = &sSfxSettings[sfxSettingIndex]; + sfxSettings->pos = pos; + return sfxSettings; + } + + return NULL; +} + +void AudioSfx_ProcessSfxSettings(void) { + SfxBankEntry* entry; + u8 sfxSettingsFlags; + u8 sfxSettingIndex = 0; + u8 bankId; + u8 entryIndex; + s32 found; + + if (sSfxSettingsFlags != 0) { + sfxSettingsFlags = sSfxSettingsFlags; + + while (sfxSettingsFlags != 0) { + bankId = BANK_ENV; + if ((sfxSettingsFlags & (1 << sfxSettingIndex))) { + + found = false; + while ((bankId <= BANK_ENEMY) && !found) { + entryIndex = gSfxBanks[bankId]->next; + + while (entryIndex != 0xFF) { + entry = &gSfxBanks[bankId][entryIndex]; + entryIndex = 0xFF; + if (entry->posX == &sSfxSettings[sfxSettingIndex].pos->x) { + found = true; + } else { + entryIndex = entry->next; + } + } + bankId++; + } + + if (!found) { + sSfxSettingsFlags ^= (1 << sfxSettingIndex); + sSfxSettings[sfxSettingIndex].pos = NULL; + } + + sfxSettingsFlags ^= (1 << sfxSettingIndex); + } + sfxSettingIndex++; + } + } +} #pragma GLOBAL_ASM("asm/non_matchings/code/code_8019AF00/func_8019F420.s") @@ -3543,7 +4021,17 @@ f32 sSfxOriginalPos[] = { 0.0f, 0.0f, 0.0f }; #pragma GLOBAL_ASM("asm/non_matchings/code/code_8019AF00/func_8019F540.s") -#pragma GLOBAL_ASM("asm/non_matchings/code/code_8019AF00/func_8019F570.s") +void AudioSfx_LowerSfxSettingsReverb(Vec3f* pos, s8 isReverbLowered) { + SfxSettings* sfxSettings = AudioSfx_AddSfxSetting(pos); + + if (sfxSettings != NULL) { + if (isReverbLowered) { + sfxSettings->reverbAdd = -0x80; + } else { + sfxSettings->reverbAdd = 0; + } + } +} #pragma GLOBAL_ASM("asm/non_matchings/code/code_8019AF00/func_8019F5AC.s") @@ -3585,15 +4073,15 @@ f32 sSfxOriginalPos[] = { 0.0f, 0.0f, 0.0f }; * Used for EnRiverSound */ void Audio_PlaySfxForRiver(Vec3f* pos, f32 freqScale) { - if (!Audio_IsSfxPlaying(NA_SE_EV_RIVER_STREAM - SFX_FLAG)) { + if (!AudioSfx_IsPlaying(NA_SE_EV_RIVER_STREAM - SFX_FLAG)) { sRiverFreqScaleLerp.value = freqScale; } else if (freqScale != sRiverFreqScaleLerp.value) { sRiverFreqScaleLerp.target = freqScale; sRiverFreqScaleLerp.remainingFrames = 40; sRiverFreqScaleLerp.step = (sRiverFreqScaleLerp.target - sRiverFreqScaleLerp.value) / 40; } - Audio_PlaySfxGeneral(NA_SE_EV_RIVER_STREAM - SFX_FLAG, pos, 4, &sRiverFreqScaleLerp.value, &D_801DB4B0, - &gSfxDefaultReverb); + AudioSfx_PlaySfx(NA_SE_EV_RIVER_STREAM - SFX_FLAG, pos, 4, &sRiverFreqScaleLerp.value, &gSfxDefaultFreqAndVolScale, + &gSfxDefaultReverb); } /** @@ -3601,15 +4089,15 @@ void Audio_PlaySfxForRiver(Vec3f* pos, f32 freqScale) { * Used for Zora's River Waterfall */ void Audio_PlaySfxForWaterfall(Vec3f* pos, f32 freqScale) { - if (!Audio_IsSfxPlaying(NA_SE_EV_WATER_WALL_BIG - SFX_FLAG)) { + if (!AudioSfx_IsPlaying(NA_SE_EV_WATER_WALL_BIG - SFX_FLAG)) { sWaterfallFreqScaleLerp.value = freqScale; } else if (freqScale != sWaterfallFreqScaleLerp.value) { sWaterfallFreqScaleLerp.target = freqScale; sWaterfallFreqScaleLerp.remainingFrames = 40; sWaterfallFreqScaleLerp.step = (sWaterfallFreqScaleLerp.target - sWaterfallFreqScaleLerp.value) / 40; } - Audio_PlaySfxGeneral(NA_SE_EV_WATER_WALL_BIG - SFX_FLAG, pos, 4, &sWaterfallFreqScaleLerp.value, - &sWaterfallFreqScaleLerp.value, &gSfxDefaultReverb); + AudioSfx_PlaySfx(NA_SE_EV_WATER_WALL_BIG - SFX_FLAG, pos, 4, &sWaterfallFreqScaleLerp.value, + &sWaterfallFreqScaleLerp.value, &gSfxDefaultReverb); } /** @@ -3626,6 +4114,9 @@ void Audio_StepFreqLerp(FreqLerp* lerp) { } } +f32 sBigBellsVolume[8] = { + 1.0f, 0.9f, 0.8f, 0.7f, 0.6f, 0.5f, 0.4f, 0.3f, +}; #pragma GLOBAL_ASM("asm/non_matchings/code/code_8019AF00/func_801A0124.s") #pragma GLOBAL_ASM("asm/non_matchings/code/code_8019AF00/func_801A0184.s") @@ -3652,7 +4143,7 @@ void Audio_SetGanonsTowerBgmVolumeLevel(u8 ganonsTowerLevel) { for (channelIndex = 0; channelIndex < 16; channelIndex++) { // CHAN_UPD_PAN_UNSIGNED - Audio_QueueCmdS8(((u8)(u32)channelIndex << 8) | 0x7000000, pan); + AudioThread_QueueCmdS8(((u8)(u32)channelIndex << 8) | 0x7000000, pan); } // Lowest room in Ganon's Tower (Entrance Room) @@ -3710,9 +4201,9 @@ s32 Audio_SetGanonsTowerBgmVolume(u8 targetVolume) { } // CHAN_UPD_REVERB - Audio_QueueCmdS8(_SHIFTL(5, 24, 8) | _SHIFTL(SEQ_PLAYER_BGM_MAIN, 16, 8) | - _SHIFTL(channelIndex, 8, 8), - (u8)reverb); + AudioThread_QueueCmdS8(_SHIFTL(5, 24, 8) | _SHIFTL(SEQ_PLAYER_BGM_MAIN, 16, 8) | + _SHIFTL(channelIndex, 8, 8), + (u8)reverb); } } } @@ -3768,7 +4259,29 @@ void Audio_UpdateRiverSoundVolumes(void) { #pragma GLOBAL_ASM("asm/non_matchings/code/code_8019AF00/func_801A05F0.s") -#pragma GLOBAL_ASM("asm/non_matchings/code/code_8019AF00/func_801A0654.s") +void AudioSfx_SetChannelIO(Vec3f* pos, u16 sfxId, u8 ioData) { + u8 channelIndex = 0; + u8 bankId = SFX_BANK_SHIFT(sfxId); + u8 entryIndex; + u8 i; + + for (i = 0; i < bankId; i++) { + channelIndex += gChannelsPerBank[gSfxChannelLayout][i]; + } + + for (i = 0; i < gChannelsPerBank[gSfxChannelLayout][bankId]; i++) { + entryIndex = gActiveSfx[bankId][i].entryIndex; + + if (entryIndex != 0xFF) { + if ((sfxId == gSfxBanks[bankId][entryIndex].sfxId) && (&pos->x == gSfxBanks[bankId][entryIndex].posX)) { + AudioThread_QueueCmdS8(_SHIFTL(6, 24, 8) | _SHIFTL(SEQ_PLAYER_SFX, 16, 8) | + _SHIFTL(channelIndex, 8, 8) | _SHIFTL(6, 0, 8), + ioData); + } + } + channelIndex++; + } +} #pragma GLOBAL_ASM("asm/non_matchings/code/code_8019AF00/func_801A0810.s") @@ -3814,7 +4327,7 @@ void func_801A09D4(Vec3f* pos, f32 xzDistToPlayer) { if (channelIndex != 9) { Audio_QueueSeqCmd(((u32)(6) << 28) | ((u32)(SEQ_PLAYER_BGM_MAIN) << 24) | ((u32)(2) << 16) | ((u32)(channelIndex) << 8) | ((u8)(127.0f * volumeRel))); - Audio_QueueCmdS8(0x03000000 | ((u8)((u32)channelIndex) << 8), pan); + AudioThread_QueueCmdS8(0x03000000 | ((u8)((u32)channelIndex) << 8), pan); } } } @@ -3837,6 +4350,7 @@ void Audio_ClearSariaBgmAtPos(Vec3f* pos) { } } +u8 sBgmPlayers[2] = { SEQ_PLAYER_BGM_MAIN, SEQ_PLAYER_BGM_SUB }; void Audio_SplitBgmChannels(s8 volumeSplit); #pragma GLOBAL_ASM("asm/non_matchings/code/code_8019AF00/Audio_SplitBgmChannels.s") @@ -4043,6 +4557,7 @@ void Audio_ClearSariaBgm2(void) { #pragma GLOBAL_ASM("asm/non_matchings/code/code_8019AF00/func_801A46F8.s") +f32 sSfxOriginalPos[] = { 0.0f, 0.0f, 0.0f }; #pragma GLOBAL_ASM("asm/non_matchings/code/code_8019AF00/func_801A4748.s") #pragma GLOBAL_ASM("asm/non_matchings/code/code_8019AF00/func_801A479C.s") @@ -4053,11 +4568,27 @@ void Audio_ClearSariaBgm2(void) { #pragma GLOBAL_ASM("asm/non_matchings/code/code_8019AF00/func_801A4A28.s") -#pragma GLOBAL_ASM("asm/non_matchings/code/code_8019AF00/func_801A4B80.s") +u32 Audio_SetNatureAmbienceRandomBend(u8 seqScriptValIn, SequenceChannel* channel); +#pragma GLOBAL_ASM("asm/non_matchings/code/code_8019AF00/Audio_SetNatureAmbienceRandomBend.s") -#pragma GLOBAL_ASM("asm/non_matchings/code/code_8019AF00/func_801A4C30.s") +void Audio_Init(void) { + AudioLoad_Init(NULL, 0); +} -#pragma GLOBAL_ASM("asm/non_matchings/code/code_8019AF00/func_801A4C54.s") +void AudioSfx_Init(u16 fadeTimer) { + u8 channelIndex; + + AudioThread_ScheduleProcessCmds(); + Audio_StartSequence(SEQ_PLAYER_SFX, NA_BGM_GENERAL_SFX, 0x70, fadeTimer); + + for (channelIndex = 0; channelIndex < ARRAY_COUNT(sSfxChannelState); channelIndex++) { + AudioThread_QueueCmdS32(0x10 << 24 | SEQ_PLAYER_SFX << 16 | ((u8)(u32)channelIndex << 8), + &sSfxChannelState[channelIndex]); + } + + AudioThread_QueueCmdS32(0xE4000000, AudioSfx_SetFreqAndStereoBits); + AudioThread_QueueCmdS32(0xE4000001, Audio_SetNatureAmbienceRandomBend); +} #pragma GLOBAL_ASM("asm/non_matchings/code/code_8019AF00/func_801A4D00.s") diff --git a/src/code/audio/code_801A5BD0.c b/src/code/audio/code_801A5BD0.c index 38e4ff187..4cf1147bf 100644 --- a/src/code/audio/code_801A5BD0.c +++ b/src/code/audio/code_801A5BD0.c @@ -1,45 +1,951 @@ #include "global.h" -#pragma GLOBAL_ASM("asm/non_matchings/code/code_801A5BD0/Audio_SetSfxBanksMute.s") +typedef struct { + /* 0x00 */ u16 sfxId; + /* 0x02 */ u8 token; + /* 0x04 */ s8* reverbAdd; + /* 0x08 */ Vec3f* pos; + /* 0x0C */ f32* freqScale; + /* 0x10 */ f32* volume; +} SfxRequest; // size = 0x14 -#pragma GLOBAL_ASM("asm/non_matchings/code/code_801A5BD0/Audio_SetFlagForBgmVolumeLow.s") +typedef struct { + /* 0x0 */ f32 value; + /* 0x4 */ f32 target; + /* 0x8 */ f32 step; + /* 0xC */ u16 remainingFrames; +} SfxBankLerp; // size = 0x10 -#pragma GLOBAL_ASM("asm/non_matchings/code/code_801A5BD0/Audio_ClearFlagForBgmVolumeLow.s") +typedef enum { + /* 0 */ SFX_RM_REQ_BY_BANK, + /* 1 */ SFX_RM_REQ_BY_POS_AND_BANK, + /* 2 */ SFX_RM_REQ_BY_POS, + /* 3 */ SFX_RM_REQ_BY_POS_AND_ID, + /* 4 */ SFX_RM_REQ_BY_TOKEN_AND_ID, + /* 5 */ SFX_RM_REQ_BY_ID +} SfxRemoveRequest; -#pragma GLOBAL_ASM("asm/non_matchings/code/code_801A5BD0/Audio_PlaySfxGeneral.s") +SfxBankEntry sSfxPlayerBank[9]; +SfxBankEntry sSfxItemBank[12]; +SfxBankEntry sSfxEnvironmentBank[32]; +SfxBankEntry sSfxEnemyBank[20]; +SfxBankEntry sSfxSystemBank[8]; +SfxBankEntry sSfxOcarinaBank[3]; +SfxBankEntry sSfxVoiceBank[5]; +SfxRequest sSfxRequests[0x100]; +u8 sSfxBankListEnd[7]; +u8 sSfxBankFreeListStart[7]; +u8 sSfxBankUnused[7]; +ActiveSfx gActiveSfx[7][3]; +u8 sCurSfxPlayerChannelIndex; +u8 gSfxBankMuted[7]; +SfxBankLerp sSfxBankLerp[7]; -#pragma GLOBAL_ASM("asm/non_matchings/code/code_801A5BD0/func_801A5DDC.s") +// sSfxRequests ring buffer endpoints. read index <= write index, wrapping around mod 256. +u8 sSfxRequestWriteIndex = 0; +u8 sSfxRequestReadIndex = 0; -#pragma GLOBAL_ASM("asm/non_matchings/code/code_801A5BD0/func_801A5F7C.s") +/** + * Array of pointers to arrays of SfxBankEntry of sizes: 9, 12, 32, 20, 8, 3, 5 + * + * 0 : Player Bank size 9 + * 1 : Item Bank size 12 + * 2 : Environment Bank size 32 + * 3 : Enemy Bank size 20 + * 4 : System Bank size 8 + * 5 : Ocarina Bank size 3 + * 6 : Voice Bank size 5 + */ +SfxBankEntry* gSfxBanks[7] = { + sSfxPlayerBank, sSfxItemBank, sSfxEnvironmentBank, sSfxEnemyBank, sSfxSystemBank, sSfxOcarinaBank, sSfxVoiceBank, +}; -#pragma GLOBAL_ASM("asm/non_matchings/code/code_801A5BD0/func_801A6430.s") +u8 sSfxBankSizes[ARRAY_COUNT(gSfxBanks)] = { + ARRAY_COUNT(sSfxPlayerBank), ARRAY_COUNT(sSfxItemBank), ARRAY_COUNT(sSfxEnvironmentBank), + ARRAY_COUNT(sSfxEnemyBank), ARRAY_COUNT(sSfxSystemBank), ARRAY_COUNT(sSfxOcarinaBank), + ARRAY_COUNT(sSfxVoiceBank), +}; -#pragma GLOBAL_ASM("asm/non_matchings/code/code_801A5BD0/func_801A65C8.s") +u8 gSfxChannelLayout = 0; +u16 sSfxChannelLowVolumeFlag = 0; -#pragma GLOBAL_ASM("asm/non_matchings/code/code_801A5BD0/func_801A6D0C.s") +// The center of the screen in projected coordinates. +// Gives the impression that the sfx has no specific location +Vec3f gSfxDefaultPos = { 0.0f, 0.0f, 0.0f }; -#pragma GLOBAL_ASM("asm/non_matchings/code/code_801A5BD0/func_801A7084.s") +// Reused as either frequency or volume multiplicative scaling factor +// Does not alter or change frequency or volume +f32 gSfxDefaultFreqAndVolScale = 1.0f; +s32 D_801DB4B4 = 0; // unused -#pragma GLOBAL_ASM("asm/non_matchings/code/code_801A5BD0/func_801A7168.s") +// Adds no reverb to the existing reverb +s8 gSfxDefaultReverb = 0; -#pragma GLOBAL_ASM("asm/non_matchings/code/code_801A5BD0/func_801A7284.s") +void AudioSfx_MuteBanks(u16 muteMask) { + u8 bankId; -#pragma GLOBAL_ASM("asm/non_matchings/code/code_801A5BD0/Audio_StopSfxByPos.s") + for (bankId = 0; bankId < ARRAY_COUNT(gSfxBanks); bankId++) { + if (muteMask & 1) { + gSfxBankMuted[bankId] = true; + } else { + gSfxBankMuted[bankId] = false; + } + muteMask = muteMask >> 1; + } +} -#pragma GLOBAL_ASM("asm/non_matchings/code/code_801A5BD0/func_801A7328.s") +/** + * Lowers volumes of both bgm players so that sfx can be more pronounced. + * Each sfx channel stores its own bit to lower the volume. + * Only a single channel needs to request this to lower the volume. + */ +void AudioSfx_LowerBgmVolume(u8 channelIndex) { + sSfxChannelLowVolumeFlag |= (1 << channelIndex); -#pragma GLOBAL_ASM("asm/non_matchings/code/code_801A5BD0/func_801A7484.s") + Audio_SetVolumeScale(SEQ_PLAYER_BGM_MAIN, 2, 0x40, 0xF); + Audio_SetVolumeScale(SEQ_PLAYER_BGM_SUB, 2, 0x40, 0xF); +} -#pragma GLOBAL_ASM("asm/non_matchings/code/code_801A5BD0/Audio_StopSfxById.s") +/** + * Clears the flag for the specific channel to lower volume. + * If all flags are cleared, then both bgm players return to full volume + */ +void AudioSfx_RestoreBgmVolume(u8 channelIndex) { + sSfxChannelLowVolumeFlag &= ((1 << channelIndex) ^ 0xFFFF); -#pragma GLOBAL_ASM("asm/non_matchings/code/code_801A5BD0/func_801A7720.s") + if (sSfxChannelLowVolumeFlag == 0) { + Audio_SetVolumeScale(SEQ_PLAYER_BGM_MAIN, 2, 0x7F, 0xF); + Audio_SetVolumeScale(SEQ_PLAYER_BGM_SUB, 2, 0x7F, 0xF); + } +} -#pragma GLOBAL_ASM("asm/non_matchings/code/code_801A5BD0/func_801A7794.s") +/** + * The main function to request a sfx. All sfx requests begin here. + */ +void AudioSfx_PlaySfx(u16 sfxId, Vec3f* pos, u8 token, f32* freqScale, f32* volume, s8* reverbAdd) { + u8 i; + SfxRequest* reqWrite; + SfxRequest* reqRead; -#pragma GLOBAL_ASM("asm/non_matchings/code/code_801A5BD0/func_801A7828.s") + if (!gSfxBankMuted[SFX_BANK_SHIFT(sfxId)]) { + reqWrite = &sSfxRequests[sSfxRequestWriteIndex]; -#pragma GLOBAL_ASM("asm/non_matchings/code/code_801A5BD0/func_801A787C.s") + for (i = sSfxRequestReadIndex; sSfxRequestWriteIndex != i; i++) { + reqRead = &sSfxRequests[i]; + if ((reqRead->pos == pos) && (reqRead->sfxId == sfxId)) { + return; + } + } -#pragma GLOBAL_ASM("asm/non_matchings/code/code_801A5BD0/Audio_IsSfxPlaying.s") + reqWrite->sfxId = sfxId; + reqWrite->pos = pos; + reqWrite->token = token; + reqWrite->freqScale = freqScale; + reqWrite->volume = volume; + reqWrite->reverbAdd = reverbAdd; + sSfxRequestWriteIndex++; + } +} -#pragma GLOBAL_ASM("asm/non_matchings/code/code_801A5BD0/func_801A794C.s") +void AudioSfx_RemoveMatchingRequests(u8 aspect, SfxBankEntry* entry) { + SfxRequest* req; + s32 remove; + u8 i = sSfxRequestReadIndex; + + for (; i != sSfxRequestWriteIndex; i++) { + remove = false; + req = &sSfxRequests[i]; + + switch (aspect) { + case SFX_RM_REQ_BY_BANK: + if (SFX_BANK_MASK(req->sfxId) == SFX_BANK_MASK(entry->sfxId)) { + remove = true; + } + break; + + case SFX_RM_REQ_BY_POS_AND_BANK: + if ((SFX_BANK_MASK(req->sfxId) == SFX_BANK_MASK(entry->sfxId)) && (&req->pos->x == entry->posX)) { + remove = true; + } + break; + + case SFX_RM_REQ_BY_POS: + if (&req->pos->x == entry->posX) { + remove = true; + } + break; + + case SFX_RM_REQ_BY_POS_AND_ID: + if ((&req->pos->x == entry->posX) && (req->sfxId == entry->sfxId)) { + remove = true; + } + break; + + case SFX_RM_REQ_BY_TOKEN_AND_ID: + if ((req->token == entry->token) && (req->sfxId == entry->sfxId)) { + remove = true; + } + break; + + case SFX_RM_REQ_BY_ID: + if (req->sfxId == entry->sfxId) { + remove = true; + } + break; + + default: + break; + } + + if (remove) { + req->sfxId = 0; + } + } +} + +void AudioSfx_ProcessRequest(void) { + u16 sfxId; + u8 channelCount; + u8 index; + SfxRequest* req = &sSfxRequests[sSfxRequestReadIndex]; + SfxBankEntry* entry; + SfxParams* sfxParams; + s32 bankId; + u8 evictImportance; + u8 evictIndex = 0x80; + + if (req->sfxId == 0) { + return; + } + + bankId = SFX_BANK(req->sfxId); + channelCount = 0; + index = gSfxBanks[bankId][0].next; + + // Compare the sfx request to all sfx bank entries + while ((index != 0xFF) && (index != 0)) { + + // If an existing sfx from the same source exists in the bank, then we should either: + // renew if it is the same sfx, check if any sfx channels are available for that bank, + // interrupt that sfx and replace it with the new sfx request, or drop the new sfx request. + if (gSfxBanks[bankId][index].posX == &req->pos->x) { + + // If the new sfx has equal importance to the existing sfx, + // drop the request if the existing sfx has the "SFX_FLAG_BLOCK_EQUAL_IMPORTANCE" flag. + // Otherwise, keep processing the new sfx request + if ((gSfxParams[SFX_BANK_SHIFT(req->sfxId)][SFX_INDEX(req->sfxId)].params & + SFX_FLAG_BLOCK_EQUAL_IMPORTANCE) && + (gSfxParams[SFX_BANK_SHIFT(req->sfxId)][SFX_INDEX(req->sfxId)].importance == + gSfxBanks[bankId][index].sfxImportance)) { + // Drop the new request + return; + } + + if (gSfxBanks[bankId][index].sfxId == req->sfxId) { + // The new sfx is the same as the existing sfx + // Set channelCount to max value to reprocess the sfx + channelCount = gUsedChannelsPerBank[gSfxChannelLayout][bankId]; + } else { + // Determine which sfx to evict based on importance if there are no more channels available + if (channelCount == 0) { + // If this is the first sfx at the same source, than store the existing sfx info into evict temps + evictIndex = index; + sfxId = gSfxBanks[bankId][index].sfxId & 0xFFFF; + evictImportance = gSfxParams[SFX_BANK_SHIFT(sfxId)][SFX_INDEX(sfxId)].importance; + } else if (gSfxBanks[bankId][index].sfxImportance < evictImportance) { + // If a different existing sfx is at the same source, than update the evict temps if the next + // existing src has lower importance than the previous existing source + evictIndex = index; + sfxId = gSfxBanks[bankId][index].sfxId & 0xFFFF; + evictImportance = gSfxParams[SFX_BANK_SHIFT(sfxId)][SFX_INDEX(sfxId)].importance; + } + + channelCount++; + + // There are no channels available, evict the lowest importance + if (channelCount == gUsedChannelsPerBank[gSfxChannelLayout][bankId]) { + if (gSfxParams[SFX_BANK_SHIFT(req->sfxId)][SFX_INDEX(req->sfxId)].importance >= evictImportance) { + index = evictIndex; + } else { + index = 0; + } + } + } + + // Process this sfx by refreshing or replacing and existing sfx + if (channelCount == gUsedChannelsPerBank[gSfxChannelLayout][bankId]) { + sfxParams = &gSfxParams[SFX_BANK_SHIFT(req->sfxId)][SFX_INDEX(req->sfxId)]; + + // Interrupt existing sfx and play the new sfx instead. + if ((req->sfxId & SFX_FLAG_MASK) || (sfxParams->flags & SFX_FLAG2_FORCE_RESET) || + (index == evictIndex)) { + + // Restore bgm if the sfx about to be replaced has the right flag + if ((gSfxBanks[bankId][index].sfxParams & SFX_FLAG_LOWER_VOLUME_BGM) && + (gSfxBanks[bankId][index].state != SFX_STATE_QUEUED)) { + AudioSfx_RestoreBgmVolume(gSfxBanks[bankId][index].channelIndex); + } + + gSfxBanks[bankId][index].token = req->token; + gSfxBanks[bankId][index].sfxId = req->sfxId; + gSfxBanks[bankId][index].state = SFX_STATE_QUEUED; + gSfxBanks[bankId][index].freshness = 2; + gSfxBanks[bankId][index].freqScale = req->freqScale; + gSfxBanks[bankId][index].volume = req->volume; + gSfxBanks[bankId][index].reverbAdd = req->reverbAdd; + gSfxBanks[bankId][index].sfxParams = sfxParams->params; + gSfxBanks[bankId][index].sfxFlags = sfxParams->flags; + gSfxBanks[bankId][index].sfxImportance = sfxParams->importance; + } else if (gSfxBanks[bankId][index].state == SFX_STATE_PLAYING_ONE_FRAME) { + // The new sfx is "one-frame" and equals the existing sfx, + // continue playing the "one-frame" sfx by setting "SFX_STATE_PLAYING". + // This will avoid triggering deletion and get "SFX_STATE_REFRESH" + // The state will be set back to "SFX_STATE_PLAYING_ONE_FRAME" at the end of the cycle + gSfxBanks[bankId][index].state = SFX_STATE_PLAYING; + } + // Terminate loop, function is finished (nothing more is processed) + index = 0; + } + } + + if (index != 0) { + index = gSfxBanks[bankId][index].next; + } + } + + if ((gSfxBanks[bankId][sSfxBankFreeListStart[bankId]].next != 0xFF) && (index != 0)) { + // Allocate from free list + index = sSfxBankFreeListStart[bankId]; + + entry = &gSfxBanks[bankId][index]; + entry->posX = &req->pos->x; + entry->posY = &req->pos->y; + entry->posZ = &req->pos->z; + entry->token = req->token; + entry->freqScale = req->freqScale; + entry->volume = req->volume; + entry->reverbAdd = req->reverbAdd; + + sfxParams = &gSfxParams[SFX_BANK_SHIFT(req->sfxId)][SFX_INDEX(req->sfxId)]; + + entry->sfxParams = sfxParams->params; + entry->sfxFlags = sfxParams->flags; + entry->sfxImportance = sfxParams->importance; + entry->sfxId = req->sfxId; + entry->state = SFX_STATE_QUEUED; + entry->freshness = 2; + entry->prev = sSfxBankListEnd[bankId]; + + gSfxBanks[bankId][sSfxBankListEnd[bankId]].next = sSfxBankFreeListStart[bankId]; + sSfxBankListEnd[bankId] = sSfxBankFreeListStart[bankId]; + sSfxBankFreeListStart[bankId] = gSfxBanks[bankId][sSfxBankFreeListStart[bankId]].next; + gSfxBanks[bankId][sSfxBankFreeListStart[bankId]].prev = 0xFF; + + entry->next = 0xFF; + } +} + +void AudioSfx_RemoveBankEntry(u8 bankId, u8 entryIndex) { + SfxBankEntry* entry = &gSfxBanks[bankId][entryIndex]; + u8 i; + + if (entry->sfxParams & SFX_FLAG_LOWER_VOLUME_BGM) { + AudioSfx_RestoreBgmVolume(entry->channelIndex); + } + + if (entryIndex == sSfxBankListEnd[bankId]) { + sSfxBankListEnd[bankId] = entry->prev; + } else { + gSfxBanks[bankId][entry->next].prev = entry->prev; + } + + gSfxBanks[bankId][entry->prev].next = entry->next; + entry->next = sSfxBankFreeListStart[bankId]; + entry->prev = 0xFF; + gSfxBanks[bankId][sSfxBankFreeListStart[bankId]].prev = entryIndex; + sSfxBankFreeListStart[bankId] = entryIndex; + entry->state = SFX_STATE_EMPTY; + + for (i = 0; i < gChannelsPerBank[gSfxChannelLayout][bankId]; i++) { + if (gActiveSfx[bankId][i].entryIndex == entryIndex) { + gActiveSfx[bankId][i].entryIndex = 0xFF; + i = gChannelsPerBank[gSfxChannelLayout][bankId]; + } + } +} + +void AudioSfx_ChooseActiveSfx(u8 bankId) { + u8 numChosenSfx = 0; + u8 numChannels; + u8 entryIndex; + u8 i; + u8 j; + u8 k; + u8 sfxImportance; + u8 needNewSfx; + u8 chosenEntryIndex; + s32 pad; + SfxBankEntry* entry; + ActiveSfx chosenSfx[MAX_CHANNELS_PER_BANK]; + ActiveSfx* activeSfx; + f32 entryPosY; + f32 entryPosX; + + for (i = 0; i < MAX_CHANNELS_PER_BANK; i++) { + chosenSfx[i].priority = 0x7FFFFFFF; + chosenSfx[i].entryIndex = 0xFF; + } + + entryIndex = gSfxBanks[bankId][0].next; + k = 0; + + // Delete stale sfx and prioritize remaining sfx into the gActiveSfx arrays + while (entryIndex != 0xFF) { + + // Update the freshness for an "all-frame" sfx if it is still queued + if ((gSfxBanks[bankId][entryIndex].state == SFX_STATE_QUEUED) && + (gSfxBanks[bankId][entryIndex].sfxId & SFX_FLAG_MASK)) { + gSfxBanks[bankId][entryIndex].freshness--; + + // If a "one-frame" sfx is still in "SFX_STATE_PLAYING_ONE_FRAME", then remove the sfx + } else if (!(gSfxBanks[bankId][entryIndex].sfxId & SFX_FLAG_MASK) && + (gSfxBanks[bankId][entryIndex].state == SFX_STATE_PLAYING_ONE_FRAME)) { + // CHAN_UPD_SCRIPT_IO (ioPort 0, force stop sfx in seq 0) + AudioThread_QueueCmdS8( + (0x6 << 24) | (SEQ_PLAYER_SFX << 16) | (gSfxBanks[bankId][entryIndex].channelIndex << 8), 0); + AudioSfx_RemoveBankEntry(bankId, entryIndex); + } + + // If a "all-frame" sfx goes 2 frames in the "queued" state + // (because it is too low priority), then remove the sfx + if (gSfxBanks[bankId][entryIndex].freshness == 0) { + AudioSfx_RemoveBankEntry(bankId, entryIndex); + } else if (gSfxBanks[bankId][entryIndex].state != SFX_STATE_EMPTY) { + // process the entry + entry = &gSfxBanks[bankId][entryIndex]; + + // Recompute distSq each frame since the sound's position may have changed + // (later converted into dist) + if (&gSfxDefaultPos.x == entry[0].posX) { + entry->dist = 0.0f; + } else { + entryPosY = *entry->posY * 1; + entryPosX = *entry->posX * 0.5f; + entry->dist = (SQ(entryPosX) + SQ(entryPosY) + SQ(*entry->posZ)) / 10.0f; + } + + // Recompute priority, possibly based on sfx position relative to the camera. + // (Note that the priority is the opposite of importance; lower is more preserved) + sfxImportance = entry->sfxImportance; + + if (entry->sfxParams & SFX_FLAG_PRIORITY_NO_DIST) { + // Priority is independent of distance + entry->priority = SQ(0xFF - sfxImportance) * SQ(76); + } else { + // Priority value increases with distance (more likely to eject) + if (entry->dist > 0x7FFFFFD0) { + // max distance + entry->dist = 0x70000008; + } + + entry->priority = (u32)entry->dist + (SQ(0xFF - sfxImportance) * SQ(76)); + if (*entry->posZ < 0.0f) { + entry->priority += (s32)(-*entry->posZ * 6.0f); + } + } + + // Sfx is too far away, do not consider for chosen sfx + if (entry->dist > SQ(1e5f)) { + + // If too far away and also playing, stop playing + if (entry->state == SFX_STATE_PLAYING) { + // CHAN_UPD_SCRIPT_IO (ioPort 0, force stop sfx in seq 0) + AudioThread_QueueCmdS8((0x6 << 24) | (SEQ_PLAYER_SFX << 16) | (entry->channelIndex << 8), 0); + if (entry->sfxId & SFX_FLAG_MASK) { + AudioSfx_RemoveBankEntry(bankId, entryIndex); + entryIndex = k; + } + } + } else { + // Loop through all channels allocated to a specific bank + // Choose which sfx from gSfxBanks to play + // This includes all sfx requests and sfx already playing + // Sort all current sfx entries in gSfxBanks by priority + // This is where the "active" sfx are chosen + numChannels = gChannelsPerBank[gSfxChannelLayout][bankId]; + + for (i = 0; i < numChannels; i++) { + // Sort all sfx entries by priority + if (chosenSfx[i].priority >= entry->priority) { + // Update the number of sfx to attampt to play + if (numChosenSfx < gChannelsPerBank[gSfxChannelLayout][bankId]) { + numChosenSfx++; + } + + for (j = numChannels - 1; j > i; j--) { + chosenSfx[j].priority = chosenSfx[j - 1].priority; + chosenSfx[j].entryIndex = chosenSfx[j - 1].entryIndex; + } + + chosenSfx[i].priority = entry->priority; + chosenSfx[i].entryIndex = entryIndex; + i = numChannels; // make this the last pass through the loop, here equivalent to "break" + } + } + } + + k = entryIndex; + } + + entryIndex = gSfxBanks[bankId][k].next; + } + + // If a sfx is chosen, update its state + for (i = 0; i < numChosenSfx; i++) { + entry = &gSfxBanks[bankId][chosenSfx[i].entryIndex]; + + if (entry->state == SFX_STATE_QUEUED) { + // sfx is a new entry + entry->state = SFX_STATE_READY; + } else if (entry->state == SFX_STATE_PLAYING) { + // sfx is already playing + entry->state = SFX_STATE_PLAYING_REFRESH; + } + } + + // Apply the chosenSfx to the activeSfx in each channel + numChannels = gChannelsPerBank[gSfxChannelLayout][bankId]; + for (i = 0; i < numChannels; i++) { + needNewSfx = false; + activeSfx = &gActiveSfx[bankId][i]; + + // Check if a sfx is already in the channel + if (activeSfx->entryIndex == 0xFF) { + // No sfx playing in the channel + // Available for use + needNewSfx = true; + } else { + // The channel is already playing a sfx + // Get the entry of the sfx playing + entry = &gSfxBanks[bankId][activeSfx[0].entryIndex]; + + // Check the state of the sfx playing + if (entry->state == SFX_STATE_PLAYING) { + if (entry->sfxId & SFX_FLAG_MASK) { + // For "all-frames" sfx, remove the entry + AudioSfx_RemoveBankEntry(bankId, activeSfx->entryIndex); + } else { + // For "one-frame" sfx, reset the state to queued + entry->state = SFX_STATE_QUEUED; + entry->freshness = 0x80; + } + needNewSfx = true; + } else if (entry->state == SFX_STATE_EMPTY) { + // The sfx already in the channel is empty + // Can replace the sfx + activeSfx->entryIndex = 0xFF; + needNewSfx = true; + } else { + // Sfx is already playing as it should, nothing to do. + for (j = 0; j < numChannels; j++) { + if (activeSfx->entryIndex == chosenSfx[j].entryIndex) { + chosenSfx[j].entryIndex = 0xFF; + j = numChannels; + } + } + + numChosenSfx--; + } + } + + // enter the new sfx into the activeSfx + if (needNewSfx == true) { + for (j = 0; j < numChannels; j++) { + chosenEntryIndex = chosenSfx[j].entryIndex; + if ((chosenEntryIndex != 0xFF) && + (gSfxBanks[bankId][chosenEntryIndex].state != SFX_STATE_PLAYING_REFRESH)) { + for (k = 0; k < numChannels; k++) { + if (chosenEntryIndex == gActiveSfx[bankId][k].entryIndex) { + needNewSfx = false; + k = numChannels; // "break; i.e. force for-loop to end" + } + } + + if (needNewSfx == true) { + activeSfx->entryIndex = chosenEntryIndex; + chosenSfx[j].entryIndex = 0xFF; + j = numChannels + 1; + numChosenSfx--; + } + } + } + if (j == numChannels) { + // nothing found + activeSfx->entryIndex = 0xFF; + } + } + } +} + +void AudioSfx_PlayActiveSfx(u8 bankId) { + u8 entryIndex; + SequenceChannel* channel; + SfxBankEntry* entry; + u8 i; + u8 ioPort5Data; + + for (i = 0; i < gChannelsPerBank[gSfxChannelLayout][bankId]; i++) { + entryIndex = gActiveSfx[bankId][i].entryIndex; + // If entry is not empty + if (entryIndex != 0xFF) { + entry = &gSfxBanks[bankId][entryIndex]; + channel = gAudioContext.seqPlayers[SEQ_PLAYER_SFX].channels[sCurSfxPlayerChannelIndex]; + + if (entry->state == SFX_STATE_READY) { + // Initialize a sfx (new sfx request) + entry->channelIndex = sCurSfxPlayerChannelIndex; + if (entry->sfxParams & SFX_FLAG_LOWER_VOLUME_BGM) { + AudioSfx_LowerBgmVolume(sCurSfxPlayerChannelIndex); + } + + // Add noise that will offset the frequency of the sfx + if ((entry->sfxParams & SFX_PARAM_RAND_FREQ_RAISE_MASK) != (0 << SFX_PARAM_RAND_FREQ_RAISE_SHIFT)) { + switch (entry->sfxParams & SFX_PARAM_RAND_FREQ_RAISE_MASK) { + case (1 << SFX_PARAM_RAND_FREQ_RAISE_SHIFT): + entry->randFreq = AudioThread_NextRandom() & 0xF; + break; + + case (2 << SFX_PARAM_RAND_FREQ_RAISE_SHIFT): + entry->randFreq = AudioThread_NextRandom() & 0x1F; + break; + + case (3 << SFX_PARAM_RAND_FREQ_RAISE_SHIFT): + entry->randFreq = AudioThread_NextRandom() & 0x3F; + break; + + default: + entry->randFreq = 0; + break; + } + } + + // Calculate all the properties of sfx + AudioSfx_SetProperties(bankId, entryIndex, sCurSfxPlayerChannelIndex); + + // CHAN_UPD_SCRIPT_IO (ioPort 0, enable the sfx to play in seq 0) + AudioThread_QueueCmdS8((0x6 << 24) | (SEQ_PLAYER_SFX << 16) | ((sCurSfxPlayerChannelIndex & 0xFF) << 8), + 1); + + // CHAN_UPD_SCRIPT_IO (ioPort 4, write the lower bits sfx index to seq 0 so it can find the right code + // to execute) + AudioThread_QueueCmdS8((0x6 << 24) | (SEQ_PLAYER_SFX << 16) | + ((sCurSfxPlayerChannelIndex & 0xFF) << 8) | 4, + entry->sfxId & 0xFF); + + // If the sfx bank has more than 255 entries (greater than a u8 can store), + // then store the Id in upper and lower bits + if (gIsLargeSfxBank[bankId]) { + // Store upper bits + ioPort5Data = ((u8)((entry->sfxId & 0x300) >> 7) + (u8)((entry->sfxId & 0xFF) >> 7)); + } else { + ioPort5Data = 0; + } + + if ((entry->sfxParams & SFX_FLAG_8) && (entry->freshness == 0x80)) { + ioPort5Data += 0x80; + } + + if (D_801D6608[bankId]) { + // CHAN_UPD_SCRIPT_IO (ioPort 5, write the upper bits sfx index and a flag to seq 0, for banks with + // > 0xFF entries) + AudioThread_QueueCmdS8((0x6 << 24) | (SEQ_PLAYER_SFX << 16) | + ((sCurSfxPlayerChannelIndex & 0xFF) << 8) | 5, + ioPort5Data); + } + + // Update playing state + if (entry->sfxId & SFX_FLAG_MASK) { + // "all-frames" sfx + entry->state = SFX_STATE_PLAYING; + } else { + // "one-frame" sfx + entry->state = SFX_STATE_PLAYING_ONE_FRAME; + } + } else if ((u8)channel->soundScriptIO[1] == 0xFF) { + // Signal from seq 0 that the sfx is finished playing. Remove entry + AudioSfx_RemoveBankEntry(bankId, entryIndex); + } else if (entry->state == SFX_STATE_PLAYING_REFRESH) { + // Sfx is playing but a refresh is requested + AudioSfx_SetProperties(bankId, entryIndex, sCurSfxPlayerChannelIndex); + + // Update playing state + if (entry->sfxId & SFX_FLAG_MASK) { + // "all-frames" sfx + entry->state = SFX_STATE_PLAYING; + } else { + // "one-frame" sfx + entry->state = SFX_STATE_PLAYING_ONE_FRAME; + } + } + } + + sCurSfxPlayerChannelIndex++; + } +} + +void AudioSfx_StopByBank(u8 bankId) { + SfxBankEntry* entry; + s32 pad; + SfxBankEntry entryToRemove; + u8 entryIndex = gSfxBanks[bankId][0].next; + + while (entryIndex != 0xFF) { + entry = &gSfxBanks[bankId][entryIndex]; + if (entry->state >= SFX_STATE_PLAYING_REFRESH) { + AudioThread_QueueCmdS8((0x6 << 24) | (SEQ_PLAYER_SFX << 16) | ((entry->channelIndex & 0xFF) << 8), 0); + } + + if (entry->state != SFX_STATE_EMPTY) { + AudioSfx_RemoveBankEntry(bankId, entryIndex); + } + entryIndex = gSfxBanks[bankId][0].next; + } + + entryToRemove.sfxId = bankId << 12; + AudioSfx_RemoveMatchingRequests(SFX_RM_REQ_BY_BANK, &entryToRemove); +} + +void AudioSfx_StopByPosAndBankImpl(u8 bankId, Vec3f* pos) { + SfxBankEntry* entry; + u8 entryIndex = gSfxBanks[bankId][0].next; + u8 prevEntryIndex = 0; + + while (entryIndex != 0xFF) { + entry = &gSfxBanks[bankId][entryIndex]; + if (entry->posX == &pos->x) { + if (entry->state >= SFX_STATE_PLAYING_REFRESH) { + AudioThread_QueueCmdS8((0x6 << 24) | (SEQ_PLAYER_SFX << 16) | ((entry->channelIndex & 0xFF) << 8), 0); + } + + if (entry->state != SFX_STATE_EMPTY) { + AudioSfx_RemoveBankEntry(bankId, entryIndex); + } + } else { + prevEntryIndex = entryIndex; + } + + entryIndex = gSfxBanks[bankId][prevEntryIndex].next; + } +} + +void AudioSfx_StopByPosAndBank(u8 bankId, Vec3f* pos) { + SfxBankEntry entryToRemove; + + AudioSfx_StopByPosAndBankImpl(bankId, pos); + entryToRemove.sfxId = bankId << 12; + entryToRemove.posX = &pos->x; + AudioSfx_RemoveMatchingRequests(SFX_RM_REQ_BY_POS_AND_BANK, &entryToRemove); +} + +void AudioSfx_StopByPos(Vec3f* pos) { + u8 bankId; + SfxBankEntry entryToRemove; + + for (bankId = 0; bankId < ARRAY_COUNT(gSfxBanks); bankId++) { + AudioSfx_StopByPosAndBankImpl(bankId, pos); + } + + entryToRemove.posX = &pos->x; + AudioSfx_RemoveMatchingRequests(SFX_RM_REQ_BY_POS, &entryToRemove); +} + +void AudioSfx_StopByPosAndId(Vec3f* pos, u16 sfxId) { + SfxBankEntry* entry; + u8 entryIndex = gSfxBanks[SFX_BANK(sfxId)][0].next; + u8 prevEntryIndex = 0; + SfxBankEntry entryToRemove; + + while (entryIndex != 0xFF) { + entry = &gSfxBanks[SFX_BANK(sfxId)][entryIndex]; + if ((entry->posX == &pos->x) && (entry->sfxId == sfxId)) { + if (entry->state >= SFX_STATE_PLAYING_REFRESH) { + AudioThread_QueueCmdS8((0x6 << 24) | (SEQ_PLAYER_SFX << 16) | ((entry->channelIndex & 0xFF) << 8), 0); + } + + if (entry->state != SFX_STATE_EMPTY) { + AudioSfx_RemoveBankEntry(SFX_BANK(sfxId), entryIndex); + } + entryIndex = 0xFF; + } else { + prevEntryIndex = entryIndex; + } + + if (entryIndex != 0xFF) { + entryIndex = gSfxBanks[SFX_BANK(sfxId)][prevEntryIndex].next; + } + } + + entryToRemove.posX = &pos->x; + entryToRemove.sfxId = sfxId; + AudioSfx_RemoveMatchingRequests(SFX_RM_REQ_BY_POS_AND_ID, &entryToRemove); +} + +void AudioSfx_StopByTokenAndId(u8 token, u16 sfxId) { + SfxBankEntry* entry; + u8 entryIndex = gSfxBanks[SFX_BANK(sfxId)][0].next; + u8 prevEntryIndex = 0; + SfxBankEntry entryToRemove; + + while (entryIndex != 0xFF) { + entry = &gSfxBanks[SFX_BANK(sfxId)][entryIndex]; + if ((entry->token == token) && (entry->sfxId == sfxId)) { + if (entry->state >= SFX_STATE_PLAYING_REFRESH) { + AudioThread_QueueCmdS8((0x6 << 24) | (SEQ_PLAYER_SFX << 16) | ((entry->channelIndex & 0xFF) << 8), 0); + } + + if (entry->state != SFX_STATE_EMPTY) { + AudioSfx_RemoveBankEntry(SFX_BANK(sfxId), entryIndex); + } + } else { + prevEntryIndex = entryIndex; + } + + if (entryIndex != 0xFF) { + entryIndex = gSfxBanks[SFX_BANK(sfxId)][prevEntryIndex].next; + } + } + + entryToRemove.token = token; + entryToRemove.sfxId = sfxId; + AudioSfx_RemoveMatchingRequests(SFX_RM_REQ_BY_TOKEN_AND_ID, &entryToRemove); +} + +void AudioSfx_StopById(u32 sfxId) { + SfxBankEntry* entry; + u8 entryIndex = gSfxBanks[SFX_BANK(sfxId)][0].next; + u8 prevEntryIndex = 0; + SfxBankEntry entryToRemove; + + while (entryIndex != 0xFF) { + entry = &gSfxBanks[SFX_BANK(sfxId)][entryIndex]; + if (entry->sfxId == sfxId) { + if (entry->state >= SFX_STATE_PLAYING_REFRESH) { + AudioThread_QueueCmdS8((0x6 << 24) | (SEQ_PLAYER_SFX << 16) | ((entry->channelIndex & 0xFF) << 8), 0); + } + if (entry->state != SFX_STATE_EMPTY) { + AudioSfx_RemoveBankEntry(SFX_BANK(sfxId), entryIndex); + } + } else { + prevEntryIndex = entryIndex; + } + + entryIndex = gSfxBanks[SFX_BANK(sfxId)][prevEntryIndex].next; + } + + entryToRemove.sfxId = sfxId; + AudioSfx_RemoveMatchingRequests(SFX_RM_REQ_BY_ID, &entryToRemove); +} + +void AudioSfx_ProcessRequests(void) { + if (gAudioContext.seqPlayers[SEQ_PLAYER_SFX].enabled) { + while (sSfxRequestWriteIndex != sSfxRequestReadIndex) { + AudioSfx_ProcessRequest(); + sSfxRequestReadIndex++; + } + } +} + +/** + * Unused + */ +void AudioSfx_SetBankLerp(u8 bankId, u8 target, u16 delay) { + if (delay == 0) { + delay++; + } + + sSfxBankLerp[bankId].target = target / 127.0f; + sSfxBankLerp[bankId].remainingFrames = delay; + sSfxBankLerp[bankId].step = ((sSfxBankLerp[bankId].value - sSfxBankLerp[bankId].target) / delay); +} + +/** + * Unused + */ +void AudioSfx_StepBankLerp(u8 bankId) { + if (sSfxBankLerp[bankId].remainingFrames != 0) { + sSfxBankLerp[bankId].remainingFrames--; + + if (sSfxBankLerp[bankId].remainingFrames != 0) { + sSfxBankLerp[bankId].value -= sSfxBankLerp[bankId].step; + } else { + sSfxBankLerp[bankId].value = sSfxBankLerp[bankId].target; + } + } +} + +void AudioSfx_ProcessActiveSfx(void) { + u8 bankId; + + if (gAudioContext.seqPlayers[SEQ_PLAYER_SFX].enabled) { + sCurSfxPlayerChannelIndex = 0; + + for (bankId = 0; bankId < ARRAY_COUNT(gSfxBanks); bankId++) { + AudioSfx_ChooseActiveSfx(bankId); + AudioSfx_PlayActiveSfx(bankId); + AudioSfx_StepBankLerp(bankId); + } + } +} + +u8 AudioSfx_IsPlaying(u32 sfxId) { + SfxBankEntry* entry; + u8 entryIndex = gSfxBanks[SFX_BANK(sfxId)][0].next; + + while (entryIndex != 0xFF) { + entry = &gSfxBanks[SFX_BANK(sfxId)][entryIndex]; + if (entry->sfxId == sfxId) { + return true; + } + entryIndex = entry->next; + } + + return false; +} + +void AudioSfx_Reset(void) { + u8 bankId; + u8 i; + u8 entryIndex; + + sSfxRequestWriteIndex = 0; + sSfxRequestReadIndex = 0; + sSfxChannelLowVolumeFlag = 0; + + for (bankId = 0; bankId < ARRAY_COUNT(gSfxBanks); bankId++) { + sSfxBankListEnd[bankId] = 0; + sSfxBankFreeListStart[bankId] = 1; + sSfxBankUnused[bankId] = 0; + gSfxBankMuted[bankId] = false; + sSfxBankLerp[bankId].value = 1.0f; + sSfxBankLerp[bankId].remainingFrames = 0; + } + + for (bankId = 0; bankId < ARRAY_COUNT(gSfxBanks); bankId++) { + for (i = 0; i < MAX_CHANNELS_PER_BANK; i++) { + gActiveSfx[bankId][i].entryIndex = 0xFF; + } + } + + for (bankId = 0; bankId < ARRAY_COUNT(gSfxBanks); bankId++) { + gSfxBanks[bankId][0].prev = 0xFF; + gSfxBanks[bankId][0].next = 0xFF; + + for (i = 1; i < sSfxBankSizes[bankId] - 1; i++) { + gSfxBanks[bankId][i].prev = i - 1; + gSfxBanks[bankId][i].next = i + 1; + } + + gSfxBanks[bankId][i].prev = i - 1; + gSfxBanks[bankId][i].next = 0xFF; + } +} diff --git a/src/code/audio/code_801A7B10.c b/src/code/audio/code_801A7B10.c index 6d3faaeab..f2f37a013 100644 --- a/src/code/audio/code_801A7B10.c +++ b/src/code/audio/code_801A7B10.c @@ -1,6 +1,6 @@ #include "global.h" -#pragma GLOBAL_ASM("asm/non_matchings/code/code_801A7B10/func_801A7B10.s") +#pragma GLOBAL_ASM("asm/non_matchings/code/code_801A7B10/Audio_StartSequence.s") #pragma GLOBAL_ASM("asm/non_matchings/code/code_801A7B10/func_801A7D04.s") diff --git a/src/code/audioMgr.c b/src/code/audioMgr.c index ee6014137..ce21bda37 100644 --- a/src/code/audioMgr.c +++ b/src/code/audioMgr.c @@ -78,7 +78,7 @@ void AudioMgr_ThreadEntry(void* arg) { s16* msg = NULL; s32 exit; - func_801A4C30(); + Audio_Init(); AudioLoad_SetDmaHandler(DmaMgr_DmaHandler); func_801A4D00(); osSendMesg(&audioMgr->lockMsgQ, NULL, OS_MESG_BLOCK); diff --git a/src/code/code_8012EC80.c b/src/code/code_8012EC80.c index 2298a0875..4ff98b3a4 100644 --- a/src/code/code_8012EC80.c +++ b/src/code/code_8012EC80.c @@ -189,7 +189,7 @@ void* gItemIcons[] = { 0x08059000, // ITEM_WALLET_DEFAULT 0x0805A000, // ITEM_WALLET_ADULT 0x0805B000, // ITEM_WALLET_GIANT - 0x0805C000, // ITEM_FISHING_POLE + 0x0805C000, // ITEM_FISHING_ROD 0x0805D000, // ITEM_REMAINS_ODOLWA 0x0805E000, // ITEM_REMAINS_GOHT 0x0805F000, // ITEM_REMAINS_GYORG diff --git a/src/code/code_80172BC0.c b/src/code/code_80172BC0.c index 2ea9e6c67..94b55d4df 100644 --- a/src/code/code_80172BC0.c +++ b/src/code/code_80172BC0.c @@ -9,7 +9,7 @@ void AudioMgr_StopAllSfxExceptSystem(void) { for (bankIdPtr = sSfxBankIds; bankIdPtr < (sSfxBankIds + ARRAY_COUNT(sSfxBankIds)); bankIdPtr++) { if (*bankIdPtr != BANK_SYSTEM) { - func_801A7084(*bankIdPtr); + AudioSfx_StopByBank(*bankIdPtr); } } } diff --git a/src/code/z_actor.c b/src/code/z_actor.c index 0c547001a..f7fdadd89 100644 --- a/src/code/z_actor.c +++ b/src/code/z_actor.c @@ -1850,10 +1850,10 @@ s32 Actor_ProcessTalkRequest(Actor* actor, GameState* gameState) { // Actor_PickUpExchange? Seems to be called with exchangeItemId -1 if the same actor used Actor_PickUp // This function is also used to toggle the "Speak" action on the A button -s32 func_800B8500(Actor* actor, PlayState* play, f32 xzRange, f32 yRange, s32 exchangeItemId) { +s32 func_800B8500(Actor* actor, PlayState* play, f32 xzRange, f32 yRange, PlayerActionParam exchangeItemId) { Player* player = GET_PLAYER(play); - if ((player->actor.flags & ACTOR_FLAG_100) || ((exchangeItemId > EXCH_ITEM_NONE) && Player_InCsMode(play)) || + if ((player->actor.flags & ACTOR_FLAG_100) || ((exchangeItemId > PLAYER_AP_NONE) && Player_InCsMode(play)) || (!actor->isTargeted && ((fabsf(actor->playerHeightRel) > fabsf(yRange)) || ((actor->xzDistToPlayer > player->targetActorDistance)) || (xzRange < actor->xzDistToPlayer)))) { @@ -1868,12 +1868,12 @@ s32 func_800B8500(Actor* actor, PlayState* play, f32 xzRange, f32 yRange, s32 ex return true; } -s32 func_800B85E0(Actor* actor, PlayState* play, f32 radius, s32 exchangeItemId) { +s32 func_800B85E0(Actor* actor, PlayState* play, f32 radius, PlayerActionParam exchangeItemId) { return func_800B8500(actor, play, radius, radius, exchangeItemId); } s32 func_800B8614(Actor* actor, PlayState* play, f32 radius) { - return func_800B85E0(actor, play, radius, EXCH_ITEM_NONE); + return func_800B85E0(actor, play, radius, PLAYER_AP_NONE); } s32 func_800B863C(Actor* actor, PlayState* play) { @@ -2127,7 +2127,8 @@ void func_800B8E58(Player* player, u16 sfxId) { if (player->currentMask == PLAYER_MASK_GIANT) { func_8019F170(&player->actor.projectedPos, sfxId); } else { - Audio_PlaySfxGeneral(sfxId, &player->actor.projectedPos, 4, &D_801DB4B0, &D_801DB4B0, &gSfxDefaultReverb); + AudioSfx_PlaySfx(sfxId, &player->actor.projectedPos, 4, &gSfxDefaultFreqAndVolScale, + &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb); } } @@ -2567,7 +2568,8 @@ void func_800B9D1C(Actor* actor) { if (sfxId != 0) { if (actor->audioFlags & 2) { - Audio_PlaySfxGeneral(sfxId, &actor->projectedPos, 4, &D_801DB4B0, &D_801DB4B0, &gSfxDefaultReverb); + AudioSfx_PlaySfx(sfxId, &actor->projectedPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, + &gSfxDefaultReverb); } else if (actor->audioFlags & 4) { play_sound(sfxId); } else if (actor->audioFlags & 8) { @@ -3339,7 +3341,7 @@ Actor* Actor_Delete(ActorContext* actorCtx, Actor* actor, PlayState* play) { actorCtx->targetContext.bgmEnemy = NULL; } - Audio_StopSfxByPos(&actor->projectedPos); + AudioSfx_StopByPos(&actor->projectedPos); Actor_Destroy(actor, play); newHead = Actor_RemoveFromCategory(play, actorCtx, actor); @@ -4292,18 +4294,18 @@ s16 func_800BDB6C(Actor* actor, PlayState* play, s16 arg2, f32 arg3) { return arg2; } -void Actor_ChangeAnimationByInfo(SkelAnime* skelAnime, AnimationInfo* animation, s32 index) { +void Actor_ChangeAnimationByInfo(SkelAnime* skelAnime, AnimationInfo* animationInfo, s32 animIndex) { f32 frameCount; - animation += index; - if (animation->frameCount > 0.0f) { - frameCount = animation->frameCount; + animationInfo += animIndex; + if (animationInfo->frameCount > 0.0f) { + frameCount = animationInfo->frameCount; } else { - frameCount = Animation_GetLastFrame(&animation->animation->common); + frameCount = Animation_GetLastFrame(&animationInfo->animation->common); } - Animation_Change(skelAnime, animation->animation, animation->playSpeed, animation->startFrame, frameCount, - animation->mode, animation->morphFrames); + Animation_Change(skelAnime, animationInfo->animation, animationInfo->playSpeed, animationInfo->startFrame, + frameCount, animationInfo->mode, animationInfo->morphFrames); } // Unused diff --git a/src/code/z_camera.c b/src/code/z_camera.c index 20420d6ef..027b78a4a 100644 --- a/src/code/z_camera.c +++ b/src/code/z_camera.c @@ -1,42 +1,243 @@ #include "global.h" -#pragma GLOBAL_ASM("asm/non_matchings/code/z_camera/Camera_fabsf.s") +/** + * Returns the absolute value for floats + */ +f32 Camera_fabsf(f32 f) { + return ABS(f); +} -#pragma GLOBAL_ASM("asm/non_matchings/code/z_camera/Camera_LengthVec3f.s") +/** + * Returns the magnitude for 3D float vectors + */ +f32 Camera_Vec3fMagnitude(Vec3f* vec) { + return sqrtf(SQ(vec->x) + SQ(vec->y) + SQ(vec->z)); +} -#pragma GLOBAL_ASM("asm/non_matchings/code/z_camera/func_800CB270.s") +/** + * Interpolates along the curve shown below + * returns value y ranging from 0.0f to 1.0f for -xMax <= x <= xMax + * returns 1.0f otherwise + * + * y = 1.0f ________ _________ + * __ __ + * _ _ + * y axis _ _ + * ___ ___ + * _____ + * y = 0.0f | | | + * -xMax 0 xMax + * + * x axis + */ +f32 Camera_QuadraticAttenuation(f32 xRange, f32 x) { + f32 y; + f32 absX; + f32 percent40 = 0.4f; + f32 percent60; + f32 xQuadratic; + f32 xMaxQuadratic; // Normalizing constant -#pragma GLOBAL_ASM("asm/non_matchings/code/z_camera/Camera_Lerpf.s") + absX = Camera_fabsf(x); -#pragma GLOBAL_ASM("asm/non_matchings/code/z_camera/Camera_Lerps.s") + if (absX > xRange) { + // fixed value outside xMax range + y = 1.0f; + } else { + // inside xMax range + percent60 = 1.0f - percent40; -#pragma GLOBAL_ASM("asm/non_matchings/code/z_camera/func_800CB42C.s") + if (absX < (xRange * percent60)) { + // quadratic curve in the inner 60% of xMax range: +concavity (upward curve) + xQuadratic = SQ(x) * (1.0f - percent40); + xMaxQuadratic = SQ(xRange * percent60); -#pragma GLOBAL_ASM("asm/non_matchings/code/z_camera/Camera_LerpVec3f.s") + y = xQuadratic / xMaxQuadratic; + } else { + // quadratic curve in the outer 40% of xMax range: -concavity (flattening curve) + xQuadratic = SQ(xRange - absX) * percent40; + xMaxQuadratic = SQ(0.4f * xRange); -#pragma GLOBAL_ASM("asm/non_matchings/code/z_camera/func_800CB544.s") + y = 1.0f - (xQuadratic / xMaxQuadratic); + } + } + return y; +} -#pragma GLOBAL_ASM("asm/non_matchings/code/z_camera/func_800CB584.s") +/* + * Performs linear interpoloation between `cur` and `target`. If `cur` is within + * `minDiff` units, the result is rounded up to `target` + */ +f32 Camera_LerpCeilF(f32 target, f32 cur, f32 stepScale, f32 minDiff) { + f32 diff = target - cur; + f32 step = diff * stepScale; -#pragma GLOBAL_ASM("asm/non_matchings/code/z_camera/func_800CB5DC.s") + return (Camera_fabsf(diff) >= minDiff) ? cur + step : target; +} -#pragma GLOBAL_ASM("asm/non_matchings/code/z_camera/func_800CB60C.s") +/* + * Performs linear interpoloation between `cur` and `target`. If `cur` is within + * `minDiff` units, the result is rounded up to `target` + */ +s16 Camera_LerpCeilS(s16 target, s16 cur, f32 stepScale, s16 minDiff) { + s16 diff = target - cur; + s16 step = diff * stepScale + 0.5f; -#pragma GLOBAL_ASM("asm/non_matchings/code/z_camera/func_800CB674.s") + return (ABS(diff) >= minDiff) ? cur + step : target; +} -#pragma GLOBAL_ASM("asm/non_matchings/code/z_camera/func_800CB6C8.s") +/* + * Performs linear interpoloation between `cur` and `target`. If `cur` is within + * `minDiff` units, the result is rounded down to `cur` + */ +s16 Camera_LerpFloorS(s16 target, s16 cur, f32 stepScale, s16 minDiff) { + s16 diff = target - cur; + s16 step = diff * stepScale + 0.5f; -#pragma GLOBAL_ASM("asm/non_matchings/code/z_camera/func_800CB700.s") + return (ABS(diff) >= minDiff) ? cur + step : cur; +} -#pragma GLOBAL_ASM("asm/non_matchings/code/z_camera/func_800CB780.s") +/* + * Performs linear interpoloation between `cur` and `target`. If `cur` is within + * `minDiff` units, the result is rounded up to `target`. Output is written to `cur` + */ +void Camera_LerpCeilVec3f(Vec3f* target, Vec3f* cur, f32 xzStepScale, f32 yStepScale, f32 minDiff) { + cur->x = Camera_LerpCeilF(target->x, cur->x, xzStepScale, minDiff); + cur->y = Camera_LerpCeilF(target->y, cur->y, yStepScale, minDiff); + cur->z = Camera_LerpCeilF(target->z, cur->z, xzStepScale, minDiff); +} -#pragma GLOBAL_ASM("asm/non_matchings/code/z_camera/func_800CB7CC.s") +void Camera_SetUpdateRatesFastPitch(Camera* camera) { + camera->yawUpdateRateInv = 100.0f; + camera->pitchUpdateRateInv = 16.0f; + camera->rUpdateRateInv = 20.0f; + camera->yOffsetUpdateRate = 0.05f; + camera->xzOffsetUpdateRate = 0.05f; + camera->fovUpdateRate = 0.05f; +} -#pragma GLOBAL_ASM("asm/non_matchings/code/z_camera/func_800CB7F8.s") +void Camera_SetUpdateRatesFastYaw(Camera* camera) { + camera->rUpdateRateInv = 50.0f; + camera->pitchUpdateRateInv = 100.0f; + camera->yawUpdateRateInv = 50.0f; + camera->yOffsetUpdateRate = 0.01f; + camera->xzOffsetUpdateRate = 0.1f; + camera->fovUpdateRate = 0.01f; + if (camera->speedRatio > 1.0f) { + camera->speedRatio = 1.0f; + } +} -#pragma GLOBAL_ASM("asm/non_matchings/code/z_camera/func_800CB828.s") +void Camera_SetUpdateRatesSlow(Camera* camera) { + camera->rUpdateRateInv = 1800.0f; + camera->yawUpdateRateInv = 1800.0f; + camera->pitchUpdateRateInv = 1800.0f; + camera->yOffsetUpdateRate = 0.01; + camera->xzOffsetUpdateRate = 0.01; + camera->fovUpdateRate = 0.01; +} -#pragma GLOBAL_ASM("asm/non_matchings/code/z_camera/func_800CB854.s") +/** + * Converts a 3D s16 vector into a 3D f32 vector + */ +Vec3f* Camera_Vec3sToVec3f(Vec3f* dest, Vec3s* src) { + Vec3f copy; + + copy.x = src->x; + copy.y = src->y; + copy.z = src->z; + + *dest = copy; + return dest; +} + +/** + * Returns the difference between two angles and scales the difference up + */ +s16 Camera_AngleDiffAndScale(s16 angle1, s16 angle2, f32 scale) { + return BINANG_SUB(angle1, angle2) * scale; +} + +/** + * Calculates the current offset between the camera's at-coordinates and the centered actor's coordinates + */ +void Camera_UpdateAtActorOffset(Camera* camera, Vec3f* actorOffset) { + camera->atActorOffset.x = camera->at.x - actorOffset->x; + camera->atActorOffset.y = camera->at.y - actorOffset->y; + camera->atActorOffset.z = camera->at.z - actorOffset->z; +} + +f32 Camera_GetFocalActorHeight(Camera* camera) { + PosRot actorFocus; + Actor* focalActor = camera->focalActor; + f32 focalHeight; + + if (focalActor == &GET_PLAYER(camera->play)->actor) { + focalHeight = Player_GetHeight((Player*)focalActor); + } else { + Actor_GetFocus(&actorFocus, focalActor); + focalHeight = actorFocus.pos.y - camera->focalActorPosRot.pos.y; + if (focalHeight == 0.0f) { + focalHeight = 10.0f; + } + } + return focalHeight; +} + +f32 Camera_GetRunSpeedLimit(Camera* camera) { + Actor* focalActor = camera->focalActor; + f32 runSpeedLimit; + + if (focalActor == &GET_PLAYER(camera->play)->actor) { + runSpeedLimit = Player_GetRunSpeedLimit((Player*)focalActor); + } else { + runSpeedLimit = 10.0f; + } + + return runSpeedLimit; +} + +s32 func_800CB7CC(Camera* camera) { + Actor* focalActor = camera->focalActor; + + if (camera->focalActor == &GET_PLAYER(camera->play)->actor) { + return ((Player*)focalActor)->stateFlags3 & PLAYER_STATE3_10; + } else { + return 0; + } +} +s32 Camera_IsMountedOnHorse(Camera* camera) { + Actor* focalActor = camera->focalActor; + + if (camera->focalActor == &GET_PLAYER(camera->play)->actor) { + return ((Player*)focalActor)->stateFlags1 & PLAYER_STATE1_800000; + } else { + return 0; + } +} + +s32 Camera_IsDekuHovering(Camera* camera) { + Actor* focalActor = camera->focalActor; + + if (camera->focalActor == &GET_PLAYER(camera->play)->actor) { + return ((Player*)focalActor)->stateFlags3 & PLAYER_STATE3_2000; + } else { + return 0; + } +} + +/** + * When walking in a cutscene? Used during Postman's minigame. + */ +s32 func_800CB854(Camera* camera) { + Actor* focalActor = camera->focalActor; + + if (camera->focalActor == &GET_PLAYER(camera->play)->actor) { + return ((Player*)focalActor)->stateFlags1 & PLAYER_STATE1_20; + } else { + return 0; + } +} s32 Camera_IsSwimming(Camera* camera) { Actor* focalActor = camera->focalActor; @@ -55,31 +256,184 @@ s32 Camera_IsSwimming(Camera* camera) { } } -#pragma GLOBAL_ASM("asm/non_matchings/code/z_camera/func_800CB8C8.s") +s32 Camera_IsDiving(Camera* camera) { + Actor* focalActor = camera->focalActor; -#pragma GLOBAL_ASM("asm/non_matchings/code/z_camera/func_800CB8F4.s") + if (camera->focalActor == &GET_PLAYER(camera->play)->actor) { + return ((Player*)focalActor)->stateFlags2 & PLAYER_STATE2_800; + } else { + return 0; + } +} -#pragma GLOBAL_ASM("asm/non_matchings/code/z_camera/func_800CB924.s") +s32 Camera_IsPlayerFormZora(Camera* camera) { + Actor* focalActor = camera->focalActor; -#pragma GLOBAL_ASM("asm/non_matchings/code/z_camera/func_800CB950.s") + if (camera->focalActor == &GET_PLAYER(camera->play)->actor) { + return ((Player*)focalActor)->transformation == PLAYER_FORM_ZORA; + } else { + return false; + } +} -#pragma GLOBAL_ASM("asm/non_matchings/code/z_camera/func_800CBA08.s") +s32 func_800CB924(Camera* camera) { + Actor* focalActor = camera->focalActor; -#pragma GLOBAL_ASM("asm/non_matchings/code/z_camera/func_800CBA34.s") + if (camera->focalActor == &GET_PLAYER(camera->play)->actor) { + return ((Player*)focalActor)->stateFlags3 & PLAYER_STATE3_1000; + } else { + return 0; + } +} -#pragma GLOBAL_ASM("asm/non_matchings/code/z_camera/func_800CBA7C.s") +s32 func_800CB950(Camera* camera) { + Player* player; + s32 phi_v0; + s32 ret; + f32 yDiff; -#pragma GLOBAL_ASM("asm/non_matchings/code/z_camera/func_800CBAAC.s") + if (camera->focalActor == &GET_PLAYER(camera->play)->actor) { + yDiff = Camera_fabsf(camera->focalActorPosRot.pos.y - camera->playerFloorHeight); -#pragma GLOBAL_ASM("asm/non_matchings/code/z_camera/func_800CBAD4.s") + phi_v0 = false; + if (yDiff < 11.0f) { + phi_v0 = true; + } -#pragma GLOBAL_ASM("asm/non_matchings/code/z_camera/func_800CBB58.s") + ret = phi_v0; -#pragma GLOBAL_ASM("asm/non_matchings/code/z_camera/func_800CBB88.s") + if (!ret) { -#pragma GLOBAL_ASM("asm/non_matchings/code/z_camera/func_800CBC00.s") + ret = false; -#pragma GLOBAL_ASM("asm/non_matchings/code/z_camera/func_800CBC30.s") + if (camera->focalActor->gravity > -0.1f) { + ret = true; + } + + player = (Player*)camera->focalActor; + if (!ret) { + // Using zora fins + ret = player->stateFlags1 & PLAYER_STATE1_200000; + ret = !!ret; + } + } + return ret; + } else { + return true; + } +} + +s32 Camera_IsClimbingLedge(Camera* camera) { + Actor* focalActor = camera->focalActor; + + if (focalActor == &GET_PLAYER(camera->play)->actor) { + return ((Player*)focalActor)->stateFlags1 & PLAYER_STATE1_4; + } else { + return 0; + } +} + +s32 Camera_IsChargingSwordOrDekuFlowerDive(Camera* camera) { + Actor* focalActor = camera->focalActor; + s32 ret; + + if (focalActor == &GET_PLAYER(camera->play)->actor) { + // Charging Sword + ret = !!(((Player*)focalActor)->stateFlags1 & PLAYER_STATE1_1000); + if (!ret) { + // Deku Flower Dive + ret = !!(((Player*)focalActor)->stateFlags3 & PLAYER_STATE3_100); + } + return ret; + } else { + return false; + } +} + +s32 func_800CBA7C(Camera* camera) { + Actor* focalActor = camera->focalActor; + + if (camera->focalActor == &GET_PLAYER(camera->play)->actor) { + return ((Player*)focalActor)->stateFlags2 & PLAYER_STATE2_800000; + } else { + return 0; + } +} + +s32 func_800CBAAC(Camera* camera) { + Actor* focalActor = camera->focalActor; + + if (camera->focalActor == &GET_PLAYER(camera->play)->actor) { + return ((Player*)focalActor)->meleeWeaponState; + } else { + return 0; + } +} + +s32 Camera_GetFocalActorPos(Vec3f* dst, Camera* camera) { + PosRot focalPosRot; + Actor* focalActor = camera->focalActor; + + if (camera->focalActor == &GET_PLAYER(camera->play)->actor) { + *dst = ((Player*)focalActor)->bodyPartsPos[0]; + return dst; + } else { + Actor_GetWorldPosShapeRot(&focalPosRot, camera->focalActor); + *dst = focalPosRot.pos; + return dst; + } +} + +s32 Camera_IsUnderwaterAsZora(Camera* camera) { + Actor* focalActor = camera->focalActor; + + if (camera->focalActor == &GET_PLAYER(camera->play)->actor) { + return ((Player*)focalActor)->currentBoots == PLAYER_BOOTS_ZORA_UNDERWATER; + } else { + return 0; + } +} + +/** + * Evaluate if player is in one of two sword animations + */ +s32 func_800CBB88(Camera* camera) { + Actor* focalActor = camera->focalActor; + + if (camera->focalActor == &GET_PLAYER(camera->play)->actor) { + if ((((Player*)focalActor)->meleeWeaponState != 0) && + (((Player*)focalActor)->meleeWeaponAnimation == PLAYER_MWA_GORON_PUNCH_BUTT)) { + return 3; + } + + if ((((Player*)focalActor)->stateFlags2 & PLAYER_STATE2_20000) || + ((((Player*)focalActor)->meleeWeaponState != 0) && + (((Player*)focalActor)->meleeWeaponAnimation == PLAYER_MWA_ZORA_PUNCH_KICK))) { + return 1; + } + } + + return 0; +} + +s32 Camera_IsUsingZoraFins(Camera* camera) { + Actor* focalActor = camera->focalActor; + + if (camera->focalActor == &GET_PLAYER(camera->play)->actor) { + return ((Player*)focalActor)->stateFlags1 & PLAYER_STATE1_200000; + } else { + return 0; + } +} + +s32 func_800CBC30(Camera* camera, f32 waterYMax, f32 waterYMin) { + if ((camera->playerFloorHeight != camera->waterYPos) && (camera->waterYPos < waterYMax) && + (camera->waterYPos > waterYMin)) { + return true; + } else { + return false; + } +} #pragma GLOBAL_ASM("asm/non_matchings/code/z_camera/func_800CBC84.s") diff --git a/src/code/z_demo.c b/src/code/z_demo.c index 4e22370db..5c49d1536 100644 --- a/src/code/z_demo.c +++ b/src/code/z_demo.c @@ -290,7 +290,7 @@ void Cutscene_Command_Misc(PlayState* play2, CutsceneContext* csCtx, CsCmdBase* break; case 0x1B: if (isStartFrame) { - play->nextEntranceIndex = 0x1C00; + play->nextEntrance = ENTRANCE(CUTSCENE, 0); gSaveContext.nextCutsceneIndex = 0xFFF8; play->transitionTrigger = TRANS_TRIGGER_START; play->transitionType = TRANS_TYPE_03; @@ -488,6 +488,7 @@ void func_800EADB0(PlayState* play, CutsceneContext* csCtx, CsCmdBase* cmd) { } } #else +void func_800EADB0(PlayState* play, CutsceneContext* csCtx, CsCmdBase* cmd); #pragma GLOBAL_ASM("asm/non_matchings/code/z_demo/func_800EADB0.s") #endif @@ -569,7 +570,7 @@ void Cutscene_TerminatorImpl(PlayState* play, CutsceneContext* csCtx, CsCmdBase* gSaveContext.save.cutscene = 0; if (cmd->base == 1) { - play->nextEntranceIndex = play->csCtx.sceneCsList[play->csCtx.currentCsIndex].nextEntranceIndex; + play->nextEntrance = play->csCtx.sceneCsList[play->csCtx.currentCsIndex].nextEntrance; gSaveContext.nextCutsceneIndex = 0; play->transitionTrigger = TRANS_TRIGGER_START; if (gSaveContext.gameMode != 1) { @@ -582,11 +583,11 @@ void Cutscene_TerminatorImpl(PlayState* play, CutsceneContext* csCtx, CsCmdBase* play->transitionType = TRANS_TYPE_04; } - if ((play->nextEntranceIndex & 0xF) > 0) { - gSaveContext.nextCutsceneIndex = (play->nextEntranceIndex & 0xF) + 0xFFEF; + if ((play->nextEntrance & 0xF) > 0) { + gSaveContext.nextCutsceneIndex = (play->nextEntrance & 0xF) + 0xFFEF; } - play->nextEntranceIndex &= ~0xF; + play->nextEntrance &= ~0xF; } } @@ -603,11 +604,11 @@ void Cutscene_Command_Terminator(PlayState* play, CutsceneContext* csCtx, CsCmdB switch (D_801F4DE2) { case 0x1F: if (gSaveContext.save.weekEventReg[20] & 2) { - play->nextEntranceIndex = 0x3010; + play->nextEntrance = ENTRANCE(WOODFALL_TEMPLE, 1); play->transitionTrigger = TRANS_TRIGGER_START; play->transitionType = TRANS_TYPE_03; } else { - play->nextEntranceIndex = 0x8600; + play->nextEntrance = ENTRANCE(WOODFALL, 0); gSaveContext.nextCutsceneIndex = 0xFFF0; play->transitionTrigger = TRANS_TRIGGER_START; play->transitionType = TRANS_TYPE_03; @@ -616,11 +617,11 @@ void Cutscene_Command_Terminator(PlayState* play, CutsceneContext* csCtx, CsCmdB case 0x44: if (gSaveContext.save.weekEventReg[33] & 0x80) { - play->nextEntranceIndex = 0xAE70; + play->nextEntrance = ENTRANCE(MOUNTAIN_VILLAGE_SPRING, 7); play->transitionTrigger = TRANS_TRIGGER_START; play->transitionType = TRANS_TYPE_03; } else { - play->nextEntranceIndex = 0xAE00; + play->nextEntrance = ENTRANCE(MOUNTAIN_VILLAGE_SPRING, 0); gSaveContext.nextCutsceneIndex = 0xFFF0; play->transitionTrigger = TRANS_TRIGGER_START; play->transitionType = TRANS_TYPE_03; @@ -629,7 +630,7 @@ void Cutscene_Command_Terminator(PlayState* play, CutsceneContext* csCtx, CsCmdB case 0x5F: gSaveContext.save.weekEventReg[55] |= 0x80; - play->nextEntranceIndex = 0x6A80; + play->nextEntrance = ENTRANCE(ZORA_CAPE, 8); gSaveContext.nextCutsceneIndex = 0xFFF0; play->transitionTrigger = TRANS_TRIGGER_START; play->transitionType = TRANS_TYPE_03; @@ -637,7 +638,7 @@ void Cutscene_Command_Terminator(PlayState* play, CutsceneContext* csCtx, CsCmdB case 0x36: gSaveContext.save.weekEventReg[52] |= 0x20; - play->nextEntranceIndex = 0x2000; + play->nextEntrance = ENTRANCE(IKANA_CANYON, 0); gSaveContext.nextCutsceneIndex = 0xFFF1; play->transitionTrigger = TRANS_TRIGGER_START; play->transitionType = TRANS_TYPE_03; @@ -658,12 +659,10 @@ void Cutscene_Command_ChooseCreditsScenes(PlayState* play, CutsceneContext* csCt case 2: if (INV_CONTENT(ITEM_MASK_KAMARO) == ITEM_MASK_KAMARO) { - // Milk bar - play->nextEntranceIndex = 0x2400; + play->nextEntrance = ENTRANCE(MILK_BAR, 0); gSaveContext.nextCutsceneIndex = 0xFFF0; } else { - // SPOT00 - play->nextEntranceIndex = 0x1C00; + play->nextEntrance = ENTRANCE(CUTSCENE, 0); gSaveContext.nextCutsceneIndex = 0xFFF9; } play->transitionTrigger = TRANS_TRIGGER_START; @@ -671,12 +670,10 @@ void Cutscene_Command_ChooseCreditsScenes(PlayState* play, CutsceneContext* csCt case 3: if (INV_CONTENT(ITEM_MASK_GREAT_FAIRY) == ITEM_MASK_GREAT_FAIRY) { - // Fairy's fountain - play->nextEntranceIndex = 0x4600; + play->nextEntrance = ENTRANCE(FAIRY_FOUNTAIN, 0); gSaveContext.nextCutsceneIndex = 0xFFF0; } else { - // SPOT00 - play->nextEntranceIndex = 0x1C10; + play->nextEntrance = ENTRANCE(CUTSCENE, 1); gSaveContext.nextCutsceneIndex = 0xFFF9; } play->transitionTrigger = TRANS_TRIGGER_START; @@ -684,12 +681,10 @@ void Cutscene_Command_ChooseCreditsScenes(PlayState* play, CutsceneContext* csCt case 4: if (INV_CONTENT(ITEM_MASK_ROMANI) == ITEM_MASK_ROMANI) { - // Romani ranch - play->nextEntranceIndex = 0x6400; + play->nextEntrance = ENTRANCE(ROMANI_RANCH, 0); gSaveContext.nextCutsceneIndex = 0xFFF1; } else { - // SPOT00 - play->nextEntranceIndex = 0x1C20; + play->nextEntrance = ENTRANCE(CUTSCENE, 2); gSaveContext.nextCutsceneIndex = 0xFFF9; } play->transitionTrigger = TRANS_TRIGGER_START; @@ -697,12 +692,10 @@ void Cutscene_Command_ChooseCreditsScenes(PlayState* play, CutsceneContext* csCt case 5: if (INV_CONTENT(ITEM_MASK_BLAST) == ITEM_MASK_BLAST) { - // West clock town - play->nextEntranceIndex = 0xD400; + play->nextEntrance = ENTRANCE(WEST_CLOCK_TOWN, 0); gSaveContext.nextCutsceneIndex = 0xFFF0; } else { - // SPOT00 - play->nextEntranceIndex = 0x1C30; + play->nextEntrance = ENTRANCE(CUTSCENE, 3); gSaveContext.nextCutsceneIndex = 0xFFF9; } play->transitionTrigger = TRANS_TRIGGER_START; @@ -710,12 +703,10 @@ void Cutscene_Command_ChooseCreditsScenes(PlayState* play, CutsceneContext* csCt case 6: if (INV_CONTENT(ITEM_MASK_CIRCUS_LEADER) == ITEM_MASK_CIRCUS_LEADER) { - // Milk bar - play->nextEntranceIndex = 0x2400; + play->nextEntrance = ENTRANCE(MILK_BAR, 0); gSaveContext.nextCutsceneIndex = 0xFFF1; } else { - // SPOT00 - play->nextEntranceIndex = 0x1C50; + play->nextEntrance = ENTRANCE(CUTSCENE, 5); gSaveContext.nextCutsceneIndex = 0xFFF9; } play->transitionTrigger = TRANS_TRIGGER_START; @@ -723,32 +714,27 @@ void Cutscene_Command_ChooseCreditsScenes(PlayState* play, CutsceneContext* csCt case 7: if (INV_CONTENT(ITEM_MASK_BREMEN) == ITEM_MASK_BREMEN) { - // Milk bar - play->nextEntranceIndex = 0x2400; + play->nextEntrance = ENTRANCE(MILK_BAR, 0); gSaveContext.nextCutsceneIndex = 0xFFF3; } else { - // SPOT00 - play->nextEntranceIndex = 0x1C60; + play->nextEntrance = ENTRANCE(CUTSCENE, 6); gSaveContext.nextCutsceneIndex = 0xFFF9; } play->transitionTrigger = TRANS_TRIGGER_START; break; case 8: - // Ikana canyon - play->nextEntranceIndex = 0x2000; + play->nextEntrance = ENTRANCE(IKANA_CANYON, 0); gSaveContext.nextCutsceneIndex = 0xFFF3; play->transitionTrigger = TRANS_TRIGGER_START; break; case 9: if (INV_CONTENT(ITEM_MASK_COUPLE) == ITEM_MASK_COUPLE) { - // Termina field - play->nextEntranceIndex = 0x5400; + play->nextEntrance = ENTRANCE(TERMINA_FIELD, 0); gSaveContext.nextCutsceneIndex = 0xFFF8; } else { - // SPOT00 - play->nextEntranceIndex = 0x1C70; + play->nextEntrance = ENTRANCE(CUTSCENE, 7); gSaveContext.nextCutsceneIndex = 0xFFF9; } play->transitionTrigger = TRANS_TRIGGER_START; @@ -756,12 +742,10 @@ void Cutscene_Command_ChooseCreditsScenes(PlayState* play, CutsceneContext* csCt case 10: if (INV_CONTENT(ITEM_MASK_BUNNY) == ITEM_MASK_BUNNY) { - // Cucco shack - play->nextEntranceIndex = 0x7E00; + play->nextEntrance = ENTRANCE(CUCCO_SHACK, 0); gSaveContext.nextCutsceneIndex = 0xFFF0; } else { - // SPOT00 - play->nextEntranceIndex = 0x1C40; + play->nextEntrance = ENTRANCE(CUTSCENE, 4); gSaveContext.nextCutsceneIndex = 0xFFF9; } play->transitionTrigger = TRANS_TRIGGER_START; @@ -769,12 +753,10 @@ void Cutscene_Command_ChooseCreditsScenes(PlayState* play, CutsceneContext* csCt case 11: if (INV_CONTENT(ITEM_MASK_POSTMAN) == ITEM_MASK_POSTMAN) { - // Termina field - play->nextEntranceIndex = 0x5410; + play->nextEntrance = ENTRANCE(TERMINA_FIELD, 1); gSaveContext.nextCutsceneIndex = 0xFFF8; } else { - // SPOT00 - play->nextEntranceIndex = 0x1C80; + play->nextEntrance = ENTRANCE(CUTSCENE, 8); gSaveContext.nextCutsceneIndex = 0xFFF9; } play->transitionTrigger = TRANS_TRIGGER_START; @@ -1130,8 +1112,6 @@ void func_800ECD7C(CutsceneContext* csCtx, u8** cutscenePtr, s16 index) { } } -#ifdef NON_MATCHING -// Some stack issues, and a few instructions in the "wrong" places /** * Loops over the cutscene data itself (`cutscenePtr`), applying the effects of each command instantaneously (for most * commands). @@ -1160,14 +1140,13 @@ void func_800ECD7C(CutsceneContext* csCtx, u8** cutscenePtr, s16 index) { */ void Cutscene_ProcessCommands(PlayState* play, CutsceneContext* csCtx, u8* cutscenePtr) { s32 i; - s16 phi_s0; - s32 totalEntries; s32 j; - u32 cmdType; // sp5C s32 pad; - s32 cmdEntries; // sp58 - s32 cutsceneEndFrame; // sp50 - s16 phi_s0_23; + s32 totalEntries; + u32 cmdType; + s32 cmdEntries; + s32 pad2; + s32 cutsceneEndFrame; CsCmdBase* cmd; // Read the command list count and the ending frame for this cutscene @@ -1196,14 +1175,14 @@ void Cutscene_ProcessCommands(PlayState* play, CutsceneContext* csCtx, u8* cutsc // Check special cases of command types. This are generic ActorActions // Ranges: [0x64, 0x96), 0xC9, [0x1C2, 0x258) if (((cmdType >= 100) && (cmdType < 150)) || (cmdType == 201) || ((cmdType >= 450) && (cmdType < 600))) { - for (phi_s0 = 0; phi_s0 < ARRAY_COUNT(D_801F4DC8); phi_s0++) { - if ((u16)cmdType == D_801F4DC8[phi_s0]) { - func_800ECD7C(csCtx, &cutscenePtr, phi_s0); + for (j = 0; j < ARRAY_COUNT(D_801F4DC8); j = (s16)(j + 1)) { + if (D_801F4DC8[j] == (u16)cmdType) { + func_800ECD7C(csCtx, &cutscenePtr, j); cmdType = -2; break; - } else if (D_801F4DC8[phi_s0] == 0) { - D_801F4DC8[phi_s0] = cmdType; - func_800ECD7C(csCtx, &cutscenePtr, phi_s0); + } else if (D_801F4DC8[j] == 0) { + D_801F4DC8[j] = cmdType; + func_800ECD7C(csCtx, &cutscenePtr, j); cmdType = -2; break; } @@ -1333,15 +1312,15 @@ void Cutscene_ProcessCommands(PlayState* play, CutsceneContext* csCtx, u8* cutsc cutscenePtr += sizeof(s32); for (j = 0; j < cmdEntries; j++) { cmd = (CsCmdBase*)cutscenePtr; - if ((csCtx->frames >= cmd->startFrame) && (csCtx->frames < cmd->endFrame)) { - csCtx->playerAction = (CsCmdActorAction*)cutscenePtr; + if ((cmd->startFrame <= csCtx->frames) && (csCtx->frames < cmd->endFrame)) { + csCtx->playerAction = (CsCmdActorAction*)cmd; } cutscenePtr += sizeof(CsCmdActorAction); } break; case CS_CMD_CAMERA: - cutscenePtr = &cutscenePtr[Cutscene_Command_Camera(play, cutscenePtr)]; + cutscenePtr += Cutscene_Command_Camera(play, cutscenePtr); break; case CS_CMD_TERMINATOR: @@ -1368,7 +1347,7 @@ void Cutscene_ProcessCommands(PlayState* play, CutsceneContext* csCtx, u8* cutsc for (j = 0; j < cmdEntries; j++) { cmd = (CsCmdBase*)cutscenePtr; if (cmd->base != 0xFFFF) { - Cutscene_Command_Textbox(play, csCtx, (CsCmdTextbox*)cutscenePtr); + Cutscene_Command_Textbox(play, csCtx, (CsCmdTextbox*)cmd); } cutscenePtr += sizeof(CsCmdTextbox); } @@ -1414,10 +1393,6 @@ void Cutscene_ProcessCommands(PlayState* play, CutsceneContext* csCtx, u8* cutsc } } } -#else -void Cutscene_ProcessCommands(PlayState* play, CutsceneContext* csCtx, u8* cutscenePtr); -#pragma GLOBAL_ASM("asm/non_matchings/code/z_demo/Cutscene_ProcessCommands.s") -#endif /* End of command handling section */ @@ -1528,7 +1503,7 @@ void func_800EDBE0(PlayState* play) { if ((gSaveContext.respawnFlag == 0) || (gSaveContext.respawnFlag == -2)) { sp24 = play->loadedScene; if ((sp24->titleTextId != 0) && gSaveContext.showTitleCard) { - if ((Entrance_GetTransitionFlags(((void)0, gSaveContext.save.entranceIndex) + + if ((Entrance_GetTransitionFlags(((void)0, gSaveContext.save.entrance) + ((void)0, gSaveContext.sceneSetupIndex)) & 0x4000) != 0) { func_80151A68(play, sp24->titleTextId); diff --git a/src/code/z_effect_soft_sprite.c b/src/code/z_effect_soft_sprite.c index 87f1958bd..ea8a546d6 100644 --- a/src/code/z_effect_soft_sprite.c +++ b/src/code/z_effect_soft_sprite.c @@ -59,11 +59,11 @@ EffectSs* EffectSS_GetTable() { void EffectSS_Delete(EffectSs* effectSs) { if (effectSs->flags & 2) { - Audio_StopSfxByPos(&effectSs->pos); + AudioSfx_StopByPos(&effectSs->pos); } if (effectSs->flags & 4) { - Audio_StopSfxByPos(&effectSs->vec); + AudioSfx_StopByPos(&effectSs->vec); } EffectSS_ResetEntry(effectSs); diff --git a/src/code/z_effect_soft_sprite_old_init.c b/src/code/z_effect_soft_sprite_old_init.c index b28e50364..5258c2ecf 100644 --- a/src/code/z_effect_soft_sprite_old_init.c +++ b/src/code/z_effect_soft_sprite_old_init.c @@ -978,7 +978,7 @@ void EffectSsDeadDd_Spawn(PlayState* play, Vec3f* pos, Vec3f* velocity, Vec3f* a initParams.envColor.r = env->r; initParams.envColor.g = env->g; initParams.envColor.b = env->b; - initParams.type = 0; + initParams.type = DEADDD_TYPE_0; initParams.alphaStep = alphaStep; initParams.life = life; diff --git a/src/code/z_en_hy_code.c b/src/code/z_en_hy_code.c index 6549ed9e1..5e32e5c95 100644 --- a/src/code/z_en_hy_code.c +++ b/src/code/z_en_hy_code.c @@ -11,7 +11,7 @@ #include "objects/object_boj/object_boj.h" #include "objects/object_os_anime/object_os_anime.h" -static AnimationInfoS sAnimations[] = { +static AnimationInfoS sAnimationInfo[] = { { &gMamamuYanUnusedIdleAnim, 1.0f, 0, -1, ANIMMODE_LOOP, 0 }, { &object_boj_Anim_001494, 1.0f, 0, -1, ANIMMODE_LOOP, 0 }, { &object_boj_Anim_001494, 1.0f, 0, -1, ANIMMODE_LOOP, -8 }, @@ -45,15 +45,15 @@ s32 EnHy_ChangeAnim(SkelAnime* skelAnime, s16 animIndex) { s16 frameCount; s32 isChanged = false; - if (animIndex >= ENHY_ANIMATION_AOB_0 && animIndex < ENHY_ANIMATION_MAX) { + if (animIndex >= ENHY_ANIM_AOB_0 && animIndex < ENHY_ANIM_MAX) { isChanged = true; - frameCount = sAnimations[animIndex].frameCount; + frameCount = sAnimationInfo[animIndex].frameCount; if (frameCount < 0) { - frameCount = Animation_GetLastFrame(&sAnimations[animIndex].animation->common); + frameCount = Animation_GetLastFrame(&sAnimationInfo[animIndex].animation->common); } - Animation_Change(skelAnime, sAnimations[animIndex].animation, sAnimations[animIndex].playSpeed, - sAnimations[animIndex].startFrame, frameCount, sAnimations[animIndex].mode, - sAnimations[animIndex].morphFrames); + Animation_Change(skelAnime, sAnimationInfo[animIndex].animation, sAnimationInfo[animIndex].playSpeed, + sAnimationInfo[animIndex].startFrame, frameCount, sAnimationInfo[animIndex].mode, + sAnimationInfo[animIndex].morphFrames); } return isChanged; } diff --git a/src/code/z_message.c b/src/code/z_message.c index 607132514..6be722308 100644 --- a/src/code/z_message.c +++ b/src/code/z_message.c @@ -254,62 +254,39 @@ void func_8014CCB4(PlayState* play, s16* decodedBufPos, s32* offset, f32* arg3) #pragma GLOBAL_ASM("asm/non_matchings/code/z_message/func_8014D304.s") -#ifdef NON_EQUIVALENT -extern u16* D_801D0188; -extern s16* D_801D0250; +extern u16 D_801D0188[][9]; +extern s16 D_801D0250[]; void func_8014D62C(PlayState* play, s32* arg1, f32* arg2, s16* arg3) { - f32 sp3C; - s16 temp_s0; - s16 temp_s1; - s16 temp_s1_2; + MessageContext* msgCtx = &play->msgCtx; + PauseContext* pauseCtx = &play->pauseCtx; s16 temp_s6; - s32 temp_s2; - s32 temp_s2_2; - u16* temp_v0; + s16 temp_s1 = *arg3; + s32 temp_s2 = *arg1; + f32 sp3C = *arg2; s16 phi_v0; s16 phi_s0; - s16 phi_s1; - s32 phi_s2; - s16 phi_s1_2; - s32 phi_s2_2; - temp_s1 = *arg3; - temp_s2 = *arg1; - sp3C = *arg2; if ((func_8010A0A4(play) != 0) || (play->sceneNum == 0x4F)) { phi_v0 = 0xA; } else { - phi_v0 = play->pauseCtx.unk_238[PAUSE_WORLD_MAP]; + phi_v0 = pauseCtx->unk_238[PAUSE_WORLD_MAP]; } - temp_s6 = *(&D_801D0250 + (phi_v0 * 2)); - phi_s0 = 0; - phi_s1_2 = temp_s1; - phi_s2_2 = temp_s2; - if ((s32)temp_s6 > 0) { - phi_s1 = temp_s1; - phi_s2 = temp_s2; - do { - temp_v0 = (phi_v0 * 0x12) + &D_801D0188 + (phi_s0 * 2); - (play + 0x4908 + (phi_s1 * 2))->decodedBuffer = (u16)*temp_v0; - Font_LoadChar(play, *temp_v0, phi_s2); - temp_s0 = phi_s0 + 1; - temp_s1_2 = phi_s1 + 1; - temp_s2_2 = phi_s2 + 0x80; - phi_s0 = temp_s0; - phi_s1 = temp_s1_2; - phi_s2 = temp_s2_2; - phi_s1_2 = temp_s1_2; - phi_s2_2 = temp_s2_2; - } while ((s32)temp_s0 < (s32)temp_s6); + + temp_s6 = D_801D0250[phi_v0]; + + for (phi_s0 = 0; phi_s0 < temp_s6; phi_s0++, temp_s1++, temp_s2 += 0x80) { + msgCtx->decodedBuffer.wchar[temp_s1] = D_801D0188[phi_v0][phi_s0]; + Font_LoadChar(play, D_801D0188[phi_v0][phi_s0], temp_s2); } - *arg3 = phi_s1_2 - 1; - *arg1 = phi_s2_2; - *arg2 = sp3C + ((f32)(temp_s6 - 1) * (16.0f * play->msgCtx.unk12098)); + + temp_s1--; + sp3C += (temp_s6 - 1) * (16.0f * msgCtx->unk12098); + + *arg3 = temp_s1; + *arg1 = temp_s2; + *arg2 = sp3C; } -#else -#pragma GLOBAL_ASM("asm/non_matchings/code/z_message/func_8014D62C.s") -#endif #pragma GLOBAL_ASM("asm/non_matchings/code/z_message/func_8014D7B4.s") diff --git a/src/code/z_parameter.c b/src/code/z_parameter.c index 9bc72e546..2f17832bb 100644 --- a/src/code/z_parameter.c +++ b/src/code/z_parameter.c @@ -2012,7 +2012,8 @@ void func_80111CB4(PlayState* play) { if (play->transitionMode != TRANS_MODE_OFF) { Interface_SetHudVisibility(HUD_VISIBILITY_OFF); - } else if ((gSaveContext.minigameState == 1) && (gSaveContext.save.entranceIndex == 0x6400) && + } else if ((gSaveContext.minigameState == 1) && + (gSaveContext.save.entrance == ENTRANCE(ROMANI_RANCH, 0)) && (Cutscene_GetSceneSetupIndex(play) != 0) && (play->transitionTrigger == TRANS_TRIGGER_OFF)) { Interface_SetHudVisibility(HUD_VISIBILITY_A_B_MINIMAP); @@ -2071,7 +2072,8 @@ void func_80111CB4(PlayState* play) { if (play->transitionMode != TRANS_MODE_OFF) { Interface_SetHudVisibility(HUD_VISIBILITY_OFF); - } else if ((gSaveContext.minigameState == 1) && (gSaveContext.save.entranceIndex == 0x6400) && + } else if ((gSaveContext.minigameState == 1) && + (gSaveContext.save.entrance == ENTRANCE(ROMANI_RANCH, 0)) && (Cutscene_GetSceneSetupIndex(play) != 0) && (play->transitionTrigger == TRANS_TRIGGER_OFF)) { Interface_SetHudVisibility(HUD_VISIBILITY_A_B_MINIMAP); } else if (gSaveContext.minigameState == 1) { @@ -2138,14 +2140,14 @@ void func_80111CB4(PlayState* play) { D_801BF888 = false; } } - } else if ((gSaveContext.minigameState == 1) && (gSaveContext.save.entranceIndex == 0x8E10) && + } else if ((gSaveContext.minigameState == 1) && (gSaveContext.save.entrance == ENTRANCE(WATERFALL_RAPIDS, 1)) && (play->transitionTrigger == TRANS_TRIGGER_OFF) && (play->transitionMode == TRANS_MODE_OFF)) { gSaveContext.buttonStatus[EQUIP_SLOT_C_LEFT] = BTN_DISABLED; gSaveContext.buttonStatus[EQUIP_SLOT_C_DOWN] = BTN_DISABLED; gSaveContext.buttonStatus[EQUIP_SLOT_C_RIGHT] = BTN_DISABLED; Interface_SetHudVisibility(HUD_VISIBILITY_A_B_MINIMAP); - } else if ((gSaveContext.save.entranceIndex == 0xD010) && (play->transitionTrigger == TRANS_TRIGGER_OFF) && - (play->transitionMode == TRANS_MODE_OFF)) { + } else if ((gSaveContext.save.entrance == ENTRANCE(GORON_RACETRACK, 1)) && + (play->transitionTrigger == TRANS_TRIGGER_OFF) && (play->transitionMode == TRANS_MODE_OFF)) { gSaveContext.buttonStatus[EQUIP_SLOT_C_LEFT] = BTN_DISABLED; gSaveContext.buttonStatus[EQUIP_SLOT_C_DOWN] = BTN_DISABLED; gSaveContext.buttonStatus[EQUIP_SLOT_C_RIGHT] = BTN_DISABLED; @@ -2231,12 +2233,12 @@ void func_80112C0C(PlayState* play, u16 flag) { if ((BUTTON_ITEM_EQUIP(CUR_FORM, EQUIP_SLOT_B) == ITEM_BOW) || (BUTTON_ITEM_EQUIP(CUR_FORM, EQUIP_SLOT_B) == ITEM_BOMB) || (BUTTON_ITEM_EQUIP(CUR_FORM, EQUIP_SLOT_B) == ITEM_BOMBCHU) || - (BUTTON_ITEM_EQUIP(CUR_FORM, EQUIP_SLOT_B) == ITEM_FISHING_POLE) || + (BUTTON_ITEM_EQUIP(CUR_FORM, EQUIP_SLOT_B) == ITEM_FISHING_ROD) || (gSaveContext.buttonStatus[EQUIP_SLOT_B] == BTN_DISABLED)) { if ((BUTTON_ITEM_EQUIP(CUR_FORM, EQUIP_SLOT_B) == ITEM_BOW) || (BUTTON_ITEM_EQUIP(CUR_FORM, EQUIP_SLOT_B) == ITEM_BOMB) || (BUTTON_ITEM_EQUIP(CUR_FORM, EQUIP_SLOT_B) == ITEM_BOMBCHU) || - (BUTTON_ITEM_EQUIP(CUR_FORM, EQUIP_SLOT_B) == ITEM_FISHING_POLE)) { + (BUTTON_ITEM_EQUIP(CUR_FORM, EQUIP_SLOT_B) == ITEM_FISHING_ROD)) { BUTTON_ITEM_EQUIP(CUR_FORM, EQUIP_SLOT_B) = gSaveContext.buttonStatus[EQUIP_SLOT_B]; Interface_LoadItemIconImpl(play, EQUIP_SLOT_B); } @@ -3924,7 +3926,8 @@ void func_80118084(PlayState* play) { if ((play->sceneNum != SCENE_SYATEKI_MIZU) && (play->sceneNum != SCENE_SYATEKI_MORI) && (play->sceneNum != SCENE_BOWLING) && - ((gSaveContext.minigameState != 1) || (gSaveContext.save.entranceIndex != 0x6400)) && + ((gSaveContext.minigameState != 1) || + (gSaveContext.save.entrance != ENTRANCE(ROMANI_RANCH, 0))) && ((gSaveContext.minigameState != 1) || !(gSaveContext.eventInf[3] & 0x20)) && (!(gSaveContext.save.weekEventReg[31] & 0x80) || (play->unk_1887C != 0x64))) { Interface_DrawAmmoCount(play, 0, interfaceCtx->bAlpha); @@ -5178,7 +5181,7 @@ void func_8011C808(PlayState* play) { gSaveContext.save.day = 4; gSaveContext.save.daysElapsed = 4; gSaveContext.save.time = 0x400A; - play->nextEntranceIndex = 0x54C0; + play->nextEntrance = ENTRANCE(TERMINA_FIELD, 12); gSaveContext.nextCutsceneIndex = 0; play->transitionTrigger = TRANS_TRIGGER_START; play->transitionType = TRANS_TYPE_03; @@ -5414,7 +5417,7 @@ void Interface_DrawTimers(PlayState* play) { if (sTimerId == TIMER_ID_3) { gSaveContext.save.day = 4; if ((play->sceneNum == SCENE_OKUJOU) && (gSaveContext.sceneSetupIndex == 3)) { - play->nextEntranceIndex = 0x5410; + play->nextEntrance = ENTRANCE(TERMINA_FIELD, 1); gSaveContext.nextCutsceneIndex = 0xFFF0; play->transitionTrigger = TRANS_TRIGGER_START; } else { @@ -5436,7 +5439,8 @@ void Interface_DrawTimers(PlayState* play) { ((void)0, gSaveContext.funcTimer3Value[sTimerId])) * 64 / 3000 / 10000; - if ((gSaveContext.minigameState == 1) && (gSaveContext.save.entranceIndex == 0x6400)) { + if ((gSaveContext.minigameState == 1) && + (gSaveContext.save.entrance == ENTRANCE(ROMANI_RANCH, 0))) { if (gSaveContext.funcTimer2Value[sTimerId] >= 12000) { gSaveContext.funcTimer2Value[sTimerId] = 12000; gSaveContext.eventTimer1Value[sTimerId] = 12000; @@ -5532,7 +5536,7 @@ void Interface_DrawTimers(PlayState* play) { spD0 = 0; } - if ((gSaveContext.minigameState == 1) && (gSaveContext.save.entranceIndex == 0x6400)) { + if ((gSaveContext.minigameState == 1) && (gSaveContext.save.entrance == ENTRANCE(ROMANI_RANCH, 0))) { if (spD0 >= 12000) { spD0 = 12000; } @@ -5544,7 +5548,7 @@ void Interface_DrawTimers(PlayState* play) { func_8011C898(spD0, D_801BFCE8); - if ((gSaveContext.minigameState == 1) && (gSaveContext.save.entranceIndex == 0x6400)) { + if ((gSaveContext.minigameState == 1) && (gSaveContext.save.entrance == ENTRANCE(ROMANI_RANCH, 0))) { if ((gSaveContext.eventTimer1Value[sTimerId] > 11000) && (D_801BFCF8 != D_801BFCE8[4])) { play_sound(NA_SE_SY_WARNING_COUNT_E); D_801BFCF8 = D_801BFCE8[4]; @@ -5580,7 +5584,8 @@ void Interface_DrawTimers(PlayState* play) { } else { gDPSetPrimColor(OVERLAY_DISP++, 0, 0, 255, 255, 255, 255); } - } else if ((gSaveContext.minigameState == 1) && (gSaveContext.save.entranceIndex == 0x6400)) { + } else if ((gSaveContext.minigameState == 1) && + (gSaveContext.save.entrance == ENTRANCE(ROMANI_RANCH, 0))) { if (gSaveContext.eventTimer1Value[sTimerId] >= 11000) { gDPSetPrimColor(OVERLAY_DISP++, 0, 0, 255, 50, 0, 255); } else { @@ -5752,7 +5757,7 @@ void Interface_DrawMinigameIcons(PlayState* play) { sp3C = 0x43; } - if (gSaveContext.save.entranceIndex == 0x8E10) { + if (gSaveContext.save.entrance == ENTRANCE(WATERFALL_RAPIDS, 1)) { gDPSetPrimColor(OVERLAY_DISP++, 0, 0, 255, 255, 255, interfaceCtx->bAlpha); gDPSetEnvColor(OVERLAY_DISP++, 0, 0, 0, 255); gDPLoadTextureBlock(OVERLAY_DISP++, gBeaverRingIconTex, G_IM_FMT_RGBA, G_IM_SIZ_32b, 24, 16, 0, diff --git a/src/code/z_play.c b/src/code/z_play.c index 014fb6279..c24a45b51 100644 --- a/src/code/z_play.c +++ b/src/code/z_play.c @@ -357,11 +357,11 @@ void Play_SaveCycleSceneFlags(GameState* thisx) { cycleSceneFlags->clearedRoom = this->actorCtx.flags.clearedRoom; } -void Play_SetRespawnData(GameState* thisx, s32 respawnMode, u16 entranceIndex, s32 roomIndex, s32 playerParams, - Vec3f* pos, s16 yaw) { +void Play_SetRespawnData(GameState* thisx, s32 respawnMode, u16 entrance, s32 roomIndex, s32 playerParams, Vec3f* pos, + s16 yaw) { PlayState* this = (PlayState*)thisx; - gSaveContext.respawn[respawnMode].entranceIndex = Entrance_CreateIndex(entranceIndex >> 9, 0, entranceIndex & 0xF); + gSaveContext.respawn[respawnMode].entrance = Entrance_Create(entrance >> 9, 0, entrance & 0xF); gSaveContext.respawn[respawnMode].roomIndex = roomIndex; gSaveContext.respawn[respawnMode].pos = *pos; gSaveContext.respawn[respawnMode].yaw = yaw; @@ -376,7 +376,7 @@ void Play_SetupRespawnPoint(GameState* thisx, s32 respawnMode, s32 playerParams) Player* player = GET_PLAYER(this); if (this->sceneNum != SCENE_KAKUSIANA) { // Grottos - Play_SetRespawnData(&this->state, respawnMode, (u16)((void)0, gSaveContext.save.entranceIndex), + Play_SetRespawnData(&this->state, respawnMode, (u16)((void)0, gSaveContext.save.entrance), this->roomCtx.currRoom.num, playerParams, &player->actor.world.pos, player->actor.shape.rot.y); } @@ -385,7 +385,7 @@ void Play_SetupRespawnPoint(GameState* thisx, s32 respawnMode, s32 playerParams) // Override respawn data in Sakon's Hideout void func_80169ECC(PlayState* this) { if (this->sceneNum == SCENE_SECOM) { - this->nextEntranceIndex = 0x2060; + this->nextEntrance = ENTRANCE(IKANA_CANYON, 6); gSaveContext.respawnFlag = -7; } } @@ -398,7 +398,7 @@ void func_80169EFC(GameState* thisx) { gSaveContext.respawn[RESPAWN_MODE_DOWN].tempSwitchFlags = this->actorCtx.flags.switches[2]; gSaveContext.respawn[RESPAWN_MODE_DOWN].unk_18 = this->actorCtx.flags.collectible[1]; gSaveContext.respawn[RESPAWN_MODE_DOWN].tempCollectFlags = this->actorCtx.flags.collectible[2]; - this->nextEntranceIndex = gSaveContext.respawn[RESPAWN_MODE_DOWN].entranceIndex; + this->nextEntrance = gSaveContext.respawn[RESPAWN_MODE_DOWN].entrance; gSaveContext.respawnFlag = 1; func_80169ECC(this); this->transitionTrigger = TRANS_TRIGGER_START; @@ -410,7 +410,7 @@ void func_80169EFC(GameState* thisx) { void func_80169F78(GameState* thisx) { PlayState* this = (PlayState*)thisx; - this->nextEntranceIndex = gSaveContext.respawn[RESPAWN_MODE_TOP].entranceIndex; + this->nextEntrance = gSaveContext.respawn[RESPAWN_MODE_TOP].entrance; gSaveContext.respawnFlag = -1; func_80169ECC(this); this->transitionTrigger = TRANS_TRIGGER_START; diff --git a/src/code/z_player_lib.c b/src/code/z_player_lib.c index 4b2166421..14f0d2fd6 100644 --- a/src/code/z_player_lib.c +++ b/src/code/z_player_lib.c @@ -777,11 +777,11 @@ s32 func_801240DC(Player* player) { } s32 func_80124110(Player* player, s32 actionParam) { - s32 temp_v0 = actionParam - PLAYER_AP_FISHING_POLE; + s32 temp_v0 = actionParam - PLAYER_AP_FISHING_ROD; if (player->transformation != PLAYER_FORM_GORON) { - if (((actionParam - PLAYER_AP_FISHING_POLE) > (PLAYER_AP_FISHING_POLE - PLAYER_AP_FISHING_POLE)) && - ((actionParam - PLAYER_AP_FISHING_POLE) < (PLAYER_AP_SWORD_GREAT_FAIRY - PLAYER_AP_FISHING_POLE))) { + if (((actionParam - PLAYER_AP_FISHING_ROD) > (PLAYER_AP_FISHING_ROD - PLAYER_AP_FISHING_ROD)) && + ((actionParam - PLAYER_AP_FISHING_ROD) < (PLAYER_AP_SWORD_GREAT_FAIRY - PLAYER_AP_FISHING_ROD))) { return temp_v0; } } diff --git a/src/code/z_scene.c b/src/code/z_scene.c index cf40d6049..da05eac2b 100644 --- a/src/code/z_scene.c +++ b/src/code/z_scene.c @@ -454,7 +454,7 @@ void Scene_HeaderCmdAltHeaderList(PlayState* play, SceneCmd* cmd) { SceneCmd** altHeaderList; SceneCmd* altHeader; - if (gSaveContext.sceneSetupIndex) { + if (gSaveContext.sceneSetupIndex != 0) { altHeaderList = Lib_SegmentedToVirtual(cmd->altHeaders.segment); altHeader = altHeaderList[gSaveContext.sceneSetupIndex - 1]; @@ -527,7 +527,7 @@ void Scene_HeaderCmdAnimatedMaterials(PlayState* play, SceneCmd* cmd) { * Sets the exit fade from the next entrance index. */ void Scene_SetExitFade(PlayState* play) { - play->transitionType = Entrance_GetTransitionFlags(play->nextEntranceIndex) & 0x7F; + play->transitionType = Entrance_GetTransitionFlags(play->nextEntrance) & 0x7F; } /** @@ -587,15 +587,15 @@ s32 Scene_ProcessHeader(PlayState* play, SceneCmd* header) { } /** - * Creates an entrance index from the scene index, spawn index, and scene setup. + * Creates an entrance from the scene, spawn, and lyaer. */ -u16 Entrance_CreateIndex(s32 sceneIndex, s32 spawnIndex, s32 sceneSetup) { - return (((sceneIndex << 9) | (spawnIndex << 4)) | sceneSetup) & 0xFFFF; +u16 Entrance_Create(s32 scene, s32 spawn, s32 layer) { + return (scene << 9) | (spawn << 4) | layer; } /** - * Creates an entrance index from the current entrance index with the given spawn index. + * Creates an layer 0 entranace from the current entrance and the given spawn. */ -u16 Entrance_CreateIndexFromSpawn(s32 spawnIndex) { - return Entrance_CreateIndex(gSaveContext.save.entranceIndex >> 9, spawnIndex, 0); +u16 Entrance_CreateFromSpawn(s32 spawn) { + return Entrance_Create(gSaveContext.save.entrance >> 9, spawn, 0); } diff --git a/src/code/z_scene_table.c b/src/code/z_scene_table.c index daf85190a..108689978 100644 --- a/src/code/z_scene_table.c +++ b/src/code/z_scene_table.c @@ -486,22 +486,22 @@ static EntranceTableEntry* sTreasureChestShopEntranceTable[] = { sTreasureChestShopEntrance1, }; -static EntranceTableEntry sStoneTowerTempleReversedEntrance0[] = { +static EntranceTableEntry sStoneTowerTempleInvertedEntrance0[] = { { 0xE8, 0x00, 0xC102 }, }; -static EntranceTableEntry sStoneTowerTempleReversedEntrance1[] = { +static EntranceTableEntry sStoneTowerTempleInvertedEntrance1[] = { { 0xE8, 0x01, 0x8102 }, }; -static EntranceTableEntry sStoneTowerTempleReversedEntrance2[] = { +static EntranceTableEntry sStoneTowerTempleInvertedEntrance2[] = { { 0xE8, 0x02, 0x8102 }, }; -static EntranceTableEntry* sStoneTowerTempleReversedEntranceTable[] = { - sStoneTowerTempleReversedEntrance0, - sStoneTowerTempleReversedEntrance1, - sStoneTowerTempleReversedEntrance2, +static EntranceTableEntry* sStoneTowerTempleInvertedEntranceTable[] = { + sStoneTowerTempleInvertedEntrance0, + sStoneTowerTempleInvertedEntrance1, + sStoneTowerTempleInvertedEntrance2, }; static EntranceTableEntry sClockTowerRooftopEntrance0[] = { @@ -2678,7 +2678,7 @@ static SceneEntranceTableEntry sSceneEntranceTable[] = { /* 0x12 */ SCENE_ENTRANCE(sMilkBarEntranceTable, "Z2_MILK_BAR"), /* 0x13 */ SCENE_ENTRANCE(sStoneTowerTempleEntranceTable, "Z2_INISIE_N"), /* 0x14 */ SCENE_ENTRANCE(sTreasureChestShopEntranceTable, "Z2_TAKARAYA"), - /* 0x15 */ SCENE_ENTRANCE(sStoneTowerTempleReversedEntranceTable, "Z2_INISIE_R"), + /* 0x15 */ SCENE_ENTRANCE(sStoneTowerTempleInvertedEntranceTable, "Z2_INISIE_R"), /* 0x16 */ SCENE_ENTRANCE(sClockTowerRooftopEntranceTable, "Z2_OKUJOU"), /* 0x17 */ SCENE_ENTRANCE(sOpeningDungeonEntranceTable, "Z2_OPENINGDAN"), /* 0x18 */ SCENE_ENTRANCE(sWoodfallTempleEntranceTable, "Z2_MITURIN"), @@ -2772,19 +2772,19 @@ static SceneEntranceTableEntry sSceneEntranceTable[] = { /** * Returns a pointer to an entrance table from a given entrance index. */ -EntranceTableEntry* Entrance_GetTableEntry(u16 entranceIndex) { - u32 entranceIndex2 = entranceIndex; - EntranceTableEntry** tableEntryP = sSceneEntranceTable[entranceIndex2 >> 9].table; - EntranceTableEntry* tableEntry = tableEntryP[(entranceIndex2 >> 4) & 0x1F]; +EntranceTableEntry* Entrance_GetTableEntry(u16 entrance) { + u32 entranceIndex = entrance; + EntranceTableEntry** tableEntryP = sSceneEntranceTable[entranceIndex >> 9].table; + EntranceTableEntry* tableEntry = tableEntryP[(entranceIndex >> 4) & 0x1F]; - return &tableEntry[entranceIndex2 & 0xF]; + return &tableEntry[entranceIndex & 0xF]; } /** * Returns the scene index from a given entrance index. */ -s32 Entrance_GetSceneNum(u16 entranceIndex) { - EntranceTableEntry* tableEntry = Entrance_GetTableEntry(entranceIndex); +s32 Entrance_GetSceneNum(u16 entrance) { + EntranceTableEntry* tableEntry = Entrance_GetTableEntry(entrance); return tableEntry->sceneNum; } @@ -2792,8 +2792,8 @@ s32 Entrance_GetSceneNum(u16 entranceIndex) { /** * Returns the absolute value scene index (since for some reason some of them are negative) from a given entrance index. */ -s32 Entrance_GetSceneNumAbsolute(u16 entranceIndex) { - EntranceTableEntry* tableEntry = Entrance_GetTableEntry(entranceIndex); +s32 Entrance_GetSceneNumAbsolute(u16 entrance) { + EntranceTableEntry* tableEntry = Entrance_GetTableEntry(entrance); return ABS_ALT(tableEntry->sceneNum); } @@ -2801,8 +2801,8 @@ s32 Entrance_GetSceneNumAbsolute(u16 entranceIndex) { /** * Returns the spawn index from a given entrance index. */ -s32 Entrance_GetSpawnNum(u16 entranceIndex) { - EntranceTableEntry* tableEntry = Entrance_GetTableEntry(entranceIndex); +s32 Entrance_GetSpawnNum(u16 entrance) { + EntranceTableEntry* tableEntry = Entrance_GetTableEntry(entrance); return tableEntry->spawnNum; } @@ -2810,8 +2810,8 @@ s32 Entrance_GetSpawnNum(u16 entranceIndex) { /** * Returns the transition effect flags from a given entrance index. */ -s32 Entrance_GetTransitionFlags(u16 entranceIndex) { - EntranceTableEntry* tableEntry = Entrance_GetTableEntry(entranceIndex); +s32 Entrance_GetTransitionFlags(u16 entrance) { + EntranceTableEntry* tableEntry = Entrance_GetTableEntry(entrance); return tableEntry->flags; } diff --git a/src/code/z_skelanime.c b/src/code/z_skelanime.c index a22357624..8321a309e 100644 --- a/src/code/z_skelanime.c +++ b/src/code/z_skelanime.c @@ -924,30 +924,30 @@ s16 Animation_GetLastFrame2(LegacyAnimationHeader* animation) { } /** - * Linearly interpolates the start and tactoret frame tables with the given weight, putting the result in dst + * Linearly interpolates the start and target frame tables with the given weight, putting the result in dst */ -void SkelAnime_InterpFrameTable(s32 limbCount, Vec3s* dst, Vec3s* start, Vec3s* tactoret, f32 weight) { +void SkelAnime_InterpFrameTable(s32 limbCount, Vec3s* dst, Vec3s* start, Vec3s* target, f32 weight) { s32 i; s16 diff; s16 base; if (weight < 1.0f) { - for (i = 0; i < limbCount; i++, dst++, start++, tactoret++) { + for (i = 0; i < limbCount; i++, dst++, start++, target++) { base = start->x; - diff = tactoret->x - base; + diff = target->x - base; dst->x = (s16)(diff * weight) + base; base = start->y; - diff = tactoret->y - base; + diff = target->y - base; dst->y = (s16)(diff * weight) + base; base = start->z; - diff = tactoret->z - base; + diff = target->z - base; dst->z = (s16)(diff * weight) + base; } } else { - for (i = 0; i < limbCount; i++, dst++, tactoret++) { - dst->x = tactoret->x; - dst->y = tactoret->y; - dst->z = tactoret->z; + for (i = 0; i < limbCount; i++, dst++, target++) { + dst->x = target->x; + dst->y = target->y; + dst->z = target->z; } } } diff --git a/src/code/z_sound_source.c b/src/code/z_sound_source.c index 2cdc3ab3a..15ebd018a 100644 --- a/src/code/z_sound_source.c +++ b/src/code/z_sound_source.c @@ -16,7 +16,7 @@ void SoundSource_UpdateAll(PlayState* play) { for (i = 0; i < ARRAY_COUNT(play->soundSources); i++) { if (source->countdown != 0) { if (DECR(source->countdown) == 0) { - Audio_StopSfxByPos(&source->projectedPos); + AudioSfx_StopByPos(&source->projectedPos); } else { SkinMatrix_Vec3fMtxFMultXYZ(&play->viewProjectionMtxF, &source->worldPos, &source->projectedPos); if (source->playSfxEachFrame) { @@ -54,7 +54,7 @@ void SoundSource_Add(PlayState* play, Vec3f* worldPos, u32 duration, u16 sfxId, // If no sound source is available, replace the sound source with the smallest remaining countdown if (i >= ARRAY_COUNT(play->soundSources)) { source = backupSource; - Audio_StopSfxByPos(&source->projectedPos); + AudioSfx_StopByPos(&source->projectedPos); } source->worldPos = *worldPos; diff --git a/src/code/z_sram_NES.c b/src/code/z_sram_NES.c index a92a8bd38..787a654fe 100644 --- a/src/code/z_sram_NES.c +++ b/src/code/z_sram_NES.c @@ -501,7 +501,7 @@ u16 Sram_CalcChecksum(void* data, size_t count) { // Resets `Save` substruct void Sram_ResetSave(void) { - gSaveContext.save.entranceIndex = 0x1C00; + gSaveContext.save.entrance = ENTRANCE(CUTSCENE, 0); gSaveContext.save.equippedMask = 0; gSaveContext.save.isFirstCycle = false; gSaveContext.save.unk_06 = 0; @@ -845,7 +845,7 @@ void Sram_InitDebugSave(void) { gSaveContext.save.horseData.pos.z = -1285; gSaveContext.save.horseData.yaw = -0x7554; - gSaveContext.save.entranceIndex = 0x1C00; + gSaveContext.save.entrance = ENTRANCE(CUTSCENE, 0); gSaveContext.save.isFirstCycle = true; // @@ -910,7 +910,13 @@ void func_80144A94(SramContext* sramCtx) { gSaveContext.jinxTimer = 0; } -u16 D_801C6A58[] = { 0x68B0, 0x6A60, 0xB230, 0x9A80, 0xD890, 0x3E40, 0x8640, 0x84A0, 0x2040, 0xAA30 }; +u16 D_801C6A58[] = { + ENTRANCE(GREAT_BAY_COAST, 11), ENTRANCE(ZORA_CAPE, 6), + ENTRANCE(SNOWHEAD, 3), ENTRANCE(MOUNTAIN_VILLAGE_WINTER, 8), + ENTRANCE(SOUTH_CLOCK_TOWN, 9), ENTRANCE(MILK_ROAD, 4), + ENTRANCE(WOODFALL, 4), ENTRANCE(SOUTHERN_SWAMP_POISONED, 10), + ENTRANCE(IKANA_CANYON, 4), ENTRANCE(STONE_TOWER, 3), +}; void Sram_OpenSave(FileChooseContext* fileChooseCtx, SramContext* sramCtx) { s32 i; @@ -973,22 +979,24 @@ void Sram_OpenSave(FileChooseContext* fileChooseCtx, SramContext* sramCtx) { } if (gSaveContext.save.isFirstCycle) { - gSaveContext.save.entranceIndex = 0xD800; + gSaveContext.save.entrance = ENTRANCE(SOUTH_CLOCK_TOWN, 0); gSaveContext.save.day = 0; gSaveContext.save.time = 0x3FFF; } else { - gSaveContext.save.entranceIndex = 0x1C00; + gSaveContext.save.entrance = ENTRANCE(CUTSCENE, 0); gSaveContext.nextCutsceneIndex = 0; gSaveContext.save.playerForm = PLAYER_FORM_HUMAN; } } else { - gSaveContext.save.entranceIndex = D_801C6A58[(void)0, gSaveContext.save.owlSaveLocation]; - if ((gSaveContext.save.entranceIndex == 0x84A0) && (gSaveContext.save.weekEventReg[20] & 2)) { + gSaveContext.save.entrance = D_801C6A58[(void)0, gSaveContext.save.owlSaveLocation]; + if ((gSaveContext.save.entrance == ENTRANCE(SOUTHERN_SWAMP_POISONED, 10)) && + (gSaveContext.save.weekEventReg[20] & 2)) { // Unconfirmed weekEventReg: "Woodfall Temple Prison Entrance raised / Water cleansed" - gSaveContext.save.entranceIndex = 0xCA0; - } else if ((gSaveContext.save.entranceIndex == 0x9A80) && (gSaveContext.save.weekEventReg[33] & 0x80)) { + gSaveContext.save.entrance = ENTRANCE(SOUTHERN_SWAMP_CLEARED, 10); + } else if ((gSaveContext.save.entrance == ENTRANCE(MOUNTAIN_VILLAGE_WINTER, 8)) && + (gSaveContext.save.weekEventReg[33] & 0x80)) { // Unconfirmed weekEventReg: "Mountain Village Unfrozen" - gSaveContext.save.entranceIndex = 0xAE80; + gSaveContext.save.entrance = ENTRANCE(MOUNTAIN_VILLAGE_SPRING, 8); } for (i = 0; i < ARRAY_COUNT(gSaveContext.cycleSceneFlags); i++) { @@ -1513,7 +1521,7 @@ void func_80146DF8(SramContext* sramCtx) { } void Sram_InitSram(GameState* gameState, SramContext* sramCtx) { - if (gSaveContext.save.entranceIndex) {} // Required to match + if (gSaveContext.save.entrance) {} // Required to match func_801A3D98(gSaveContext.options.audioSetting); } diff --git a/src/code/z_sub_s.c b/src/code/z_sub_s.c index afc7f7168..efc6774a7 100644 --- a/src/code/z_sub_s.c +++ b/src/code/z_sub_s.c @@ -531,24 +531,24 @@ Actor* SubS_FindNearestActor(Actor* actor, PlayState* play, u8 actorCategory, s1 return closestActor; } -s32 SubS_ChangeAnimationByInfoS(SkelAnime* skelAnime, AnimationInfoS* animations, s32 index) { +s32 SubS_ChangeAnimationByInfoS(SkelAnime* skelAnime, AnimationInfoS* animationInfo, s32 animIndex) { s32 endFrame; s32 startFrame; - animations += index; - endFrame = animations->frameCount; - if (animations->frameCount < 0) { - endFrame = Animation_GetLastFrame(&animations->animation->common); + animationInfo += animIndex; + endFrame = animationInfo->frameCount; + if (animationInfo->frameCount < 0) { + endFrame = Animation_GetLastFrame(&animationInfo->animation->common); } - startFrame = animations->startFrame; + startFrame = animationInfo->startFrame; if (startFrame >= endFrame || startFrame < 0) { return false; } - if (animations->playSpeed < 0.0f) { + if (animationInfo->playSpeed < 0.0f) { SWAP(s32, endFrame, startFrame); } - Animation_Change(skelAnime, animations->animation, animations->playSpeed, startFrame, endFrame, animations->mode, - animations->morphFrames); + Animation_Change(skelAnime, animationInfo->animation, animationInfo->playSpeed, startFrame, endFrame, + animationInfo->mode, animationInfo->morphFrames); return true; } @@ -1357,21 +1357,21 @@ s32 SubS_ActorPathing_SetNextPoint(PlayState* play, ActorPathing* actorPath) { return reupdate; } -void SubS_ChangeAnimationBySpeedInfo(SkelAnime* skelAnime, AnimationSpeedInfo* animations, s32 nextIndex, - s32* curIndex) { - AnimationSpeedInfo* animation = &animations[nextIndex]; +void SubS_ChangeAnimationBySpeedInfo(SkelAnime* skelAnime, AnimationSpeedInfo* animationInfo, s32 nextAnimIndex, + s32* curAnimIndex) { + AnimationSpeedInfo* animation = &animationInfo[nextAnimIndex]; f32 startFrame = skelAnime->curFrame; f32 endFrame; f32 morphFrames; - if ((*curIndex < 0) || (nextIndex == *curIndex)) { + if ((*curAnimIndex < 0) || (nextAnimIndex == *curAnimIndex)) { morphFrames = 0.0f; - if (*curIndex < 0) { + if (*curAnimIndex < 0) { startFrame = 0.0f; } } else { morphFrames = animation->morphFrames; - if (nextIndex != *curIndex) { + if (nextAnimIndex != *curAnimIndex) { startFrame = 0.0f; } } @@ -1383,7 +1383,7 @@ void SubS_ChangeAnimationBySpeedInfo(SkelAnime* skelAnime, AnimationSpeedInfo* a } Animation_Change(skelAnime, animation->animation, animation->playSpeed, startFrame, endFrame, animation->mode, morphFrames); - *curIndex = nextIndex; + *curAnimIndex = nextAnimIndex; } s32 SubS_StartActorCutscene(Actor* actor, s16 nextCutscene, s16 curCutscene, s32 type) { diff --git a/src/overlays/actors/ovl_Bg_Dblue_Balance/z_bg_dblue_balance.c b/src/overlays/actors/ovl_Bg_Dblue_Balance/z_bg_dblue_balance.c index 555f92798..d849ab5ed 100644 --- a/src/overlays/actors/ovl_Bg_Dblue_Balance/z_bg_dblue_balance.c +++ b/src/overlays/actors/ovl_Bg_Dblue_Balance/z_bg_dblue_balance.c @@ -467,7 +467,7 @@ void func_80B82DE0(BgDblueBalance* this, PlayState* play) { phi_f2 = this->unk_178; temp2 = this->unk_17A; if ((phi_f2 * temp2) <= 0.0f) { - func_801A7328(&this->dyna.actor.projectedPos, NA_SE_EV_SEESAW_INCLINE - SFX_FLAG); + AudioSfx_StopByPosAndId(&this->dyna.actor.projectedPos, NA_SE_EV_SEESAW_INCLINE - SFX_FLAG); } phi_f2 *= 0.0022222223f; diff --git a/src/overlays/actors/ovl_Bg_Dblue_Movebg/z_bg_dblue_movebg.c b/src/overlays/actors/ovl_Bg_Dblue_Movebg/z_bg_dblue_movebg.c index 2bd5d103a..c42d96c0f 100644 --- a/src/overlays/actors/ovl_Bg_Dblue_Movebg/z_bg_dblue_movebg.c +++ b/src/overlays/actors/ovl_Bg_Dblue_Movebg/z_bg_dblue_movebg.c @@ -289,7 +289,7 @@ void BgDblueMovebg_Destroy(Actor* thisx, PlayState* play) { DynaPoly_DeleteBgActor(play, &play->colCtx.dyna, this->dyna.bgId); if ((this->unk_160 == 9) || (this->unk_160 == 8)) { - Audio_StopSfxByPos(&this->unk_1A8); + AudioSfx_StopByPos(&this->unk_1A8); } } diff --git a/src/overlays/actors/ovl_Bg_Ingate/z_bg_ingate.c b/src/overlays/actors/ovl_Bg_Ingate/z_bg_ingate.c index d3ce48882..8e684cc74 100644 --- a/src/overlays/actors/ovl_Bg_Ingate/z_bg_ingate.c +++ b/src/overlays/actors/ovl_Bg_Ingate/z_bg_ingate.c @@ -245,10 +245,10 @@ void func_809541B8(BgIngate* this, PlayState* play) { void func_809542A0(BgIngate* this, PlayState* play) { if (gSaveContext.eventInf[5] & 1) { - play->nextEntranceIndex = 0xA820; + play->nextEntrance = ENTRANCE(TOURIST_INFORMATION, 2); gSaveContext.eventInf[5] &= (u8)~1; } else { - play->nextEntranceIndex = 0xA810; + play->nextEntrance = ENTRANCE(TOURIST_INFORMATION, 1); } gSaveContext.nextCutsceneIndex = 0; play->transitionTrigger = TRANS_TRIGGER_START; diff --git a/src/overlays/actors/ovl_Bg_Spdweb/z_bg_spdweb.c b/src/overlays/actors/ovl_Bg_Spdweb/z_bg_spdweb.c index 5ee6bfcf5..296f56268 100644 --- a/src/overlays/actors/ovl_Bg_Spdweb/z_bg_spdweb.c +++ b/src/overlays/actors/ovl_Bg_Spdweb/z_bg_spdweb.c @@ -338,7 +338,7 @@ void func_809CE4C8(BgSpdweb* this, PlayState* play) { if (this->unk_164 > 3.0f) { Actor_PlaySfxAtPos(&this->dyna.actor, NA_SE_EV_WEB_VIBRATION); } else { - Audio_StopSfxById(NA_SE_EV_WEB_VIBRATION); + AudioSfx_StopById(NA_SE_EV_WEB_VIBRATION); } } @@ -350,23 +350,20 @@ void func_809CE4C8(BgSpdweb* this, PlayState* play) { CollisionCheck_SetAC(play, &play->colChkCtx, &this->collider.base); } -#ifdef NON_MATCHING void func_809CE830(BgSpdweb* this, PlayState* play) { Vec3f spDC; Vec3f spD0; Vec3f spC4; - f32 spB0; - f32 spA4; - f32 sp9C; - f32 sp94; - f32 sp90; - f32 temp_f20; - f32 temp_f22; - f32 temp_f28; - f32 temp_f30; s32 i; - s16 temp_s0; s16 temp_s3; + s16 temp_s0; + f32 cosF2; + f32 sinF2; + f32 cosQ; + f32 sinQ; + f32 cosF1; + f32 sinF1; + f32 temp_f28; if (this->unk_162 != 0) { this->unk_162--; @@ -382,38 +379,34 @@ void func_809CE830(BgSpdweb* this, PlayState* play) { if ((this->unk_162 % 3) == 0) { temp_s3 = Rand_ZeroOne() * 0x2AAA; - spB0 = Math_CosS(this->dyna.actor.shape.rot.x); - temp_f20 = Math_SinS(this->dyna.actor.shape.rot.x); - temp_f30 = Math_CosS(this->dyna.actor.shape.rot.y); - spA4 = Math_SinS(this->dyna.actor.shape.rot.y); - if (1) {} + cosQ = Math_CosS(this->dyna.actor.shape.rot.x); + sinQ = Math_SinS(this->dyna.actor.shape.rot.x); + cosF1 = Math_CosS(this->dyna.actor.shape.rot.y); + sinF1 = Math_SinS(this->dyna.actor.shape.rot.y); - spC4.x = this->dyna.actor.world.pos.x + ((90.0f * temp_f20) * spA4); - spC4.y = this->dyna.actor.world.pos.y + (90.0f * spB0); - spC4.z = this->dyna.actor.world.pos.z + ((90.0f * temp_f20) * temp_f30); - - sp94 = temp_f20 * spA4; - sp90 = temp_f20 * temp_f30; + spC4.x = this->dyna.actor.world.pos.x + 90.0f * sinQ * sinF1; + spC4.y = this->dyna.actor.world.pos.y + 90.0f * cosQ; + spC4.z = this->dyna.actor.world.pos.z + 90.0f * sinQ * cosF1; for (i = 0; i < 6; i++) { temp_s0 = (s32)randPlusMinusPoint5Scaled(0x2800) + temp_s3; - temp_f20 = Math_SinS(temp_s0); - temp_f22 = Math_CosS(temp_s0); + sinF2 = Math_SinS(temp_s0); + cosF2 = Math_CosS(temp_s0); - spD0.x = spC4.x + (90.0f * ((sp94 * temp_f22) + (temp_f30 * temp_f20))); - spD0.y = spC4.y + ((90.0f * spB0) * temp_f22); - spD0.z = spC4.z + (90.0f * ((sp90 * temp_f22) - (spA4 * temp_f20))); + spD0.x = spC4.x + 90.0f * ((cosF1 * sinF2) + (sinQ * sinF1 * cosF2)); + spD0.y = spC4.y + 90.0f * cosQ * cosF2; + spD0.z = spC4.z + 90.0f * ((sinQ * cosF1 * cosF2) - (sinF1 * sinF2)); temp_f28 = Math_Vec3f_DistXYZ(&this->dyna.actor.home.pos, &spD0) * (1.0f / 90.0f); if (temp_f28 < 0.65f) { temp_f28 = 1.0f - temp_f28; - temp_f20 = Math_SinS(BINANG_ROT180(temp_s0)); - temp_f22 = Math_CosS(BINANG_ROT180(temp_s0)); + sinF2 = Math_SinS(BINANG_ROT180(temp_s0)); + cosF2 = Math_CosS(BINANG_ROT180(temp_s0)); } - spDC.x = (6.5f * temp_f28) * ((temp_f30 * temp_f20) + (temp_f22 * sp94)); - spDC.y = temp_f22 * ((6.5f * temp_f28) * spB0); - spDC.z = (6.5f * temp_f28) * ((temp_f22 * sp90) - (spA4 * temp_f20)); + spDC.x = 6.5f * temp_f28 * ((cosF1 * sinF2) + (sinQ * sinF1 * cosF2)); + spDC.y = 6.5f * temp_f28 * cosQ * cosF2; + spDC.z = 6.5f * temp_f28 * ((sinQ * cosF1 * cosF2) - (sinF1 * sinF2)); EffectSsDeadDb_Spawn(play, &this->dyna.actor.home.pos, &spDC, &gZeroVec3f, &D_809CF208, &D_809CF20C, 0x3C, 8, 0xE); @@ -423,9 +416,6 @@ void func_809CE830(BgSpdweb* this, PlayState* play) { SoundSource_PlaySfxAtFixedWorldPos(play, &this->dyna.actor.home.pos, 11, NA_SE_EN_EXTINCT); } } -#else -#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_Bg_Spdweb/func_809CE830.s") -#endif void func_809CEBC0(BgSpdweb* this, PlayState* play) { Player* player = GET_PLAYER(play); diff --git a/src/overlays/actors/ovl_Boss_03/z_boss_03.c b/src/overlays/actors/ovl_Boss_03/z_boss_03.c index 32258b61d..75378de78 100644 --- a/src/overlays/actors/ovl_Boss_03/z_boss_03.c +++ b/src/overlays/actors/ovl_Boss_03/z_boss_03.c @@ -807,8 +807,8 @@ void Boss03_CatchPlayer(Boss03* this, PlayState* play) { if (this->unk_2B8 > 30.0f) { if ((&this->actor != player->actor.parent) && (play->grabPlayer(play, player) != 0)) { player->actor.parent = &this->actor; - Audio_PlaySfxGeneral(NA_SE_VO_LI_DAMAGE_S, &player->actor.projectedPos, 4, &D_801DB4B0, &D_801DB4B0, - &gSfxDefaultReverb); + AudioSfx_PlaySfx(NA_SE_VO_LI_DAMAGE_S, &player->actor.projectedPos, 4, &gSfxDefaultFreqAndVolScale, + &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb); Boss03_SetupChewPlayer(this, play); } } else { @@ -1615,7 +1615,7 @@ void Boss03_DeathCutscene(Boss03* this, PlayState* play) { this->actor.focus.pos.z, 0, 0, 0, 0); this->csTimer = 0; Actor_SetScale(&this->actor, 0.0f); - Audio_StopSfxByPos(&this->actor.projectedPos); + AudioSfx_StopByPos(&this->actor.projectedPos); } break; diff --git a/src/overlays/actors/ovl_Dm_Al/z_dm_al.c b/src/overlays/actors/ovl_Dm_Al/z_dm_al.c index ce3e18ab2..6c7a1be69 100644 --- a/src/overlays/actors/ovl_Dm_Al/z_dm_al.c +++ b/src/overlays/actors/ovl_Dm_Al/z_dm_al.c @@ -27,16 +27,21 @@ const ActorInit Dm_Al_InitVars = { (ActorFunc)DmAl_Draw, }; -static AnimationInfoS sAnimationInfos[] = { +typedef enum { + /* 0 */ MADAME_AROMA_ANIM_0, + /* 1 */ MADAME_AROMA_ANIM_1 +} DmAlAnimation; + +static AnimationInfoS sAnimationInfo[] = { { &object_al_Anim_00DBE0, 1.0f, 0, -1, ANIMMODE_LOOP, 0 }, }; -s32 DmAl_ChangeAnimation(DmAl* this, s32 animationIndex) { +s32 DmAl_ChangeAnim(DmAl* this, s32 animIndex) { s32 didAnimationChange = false; - if (animationIndex != this->animationIndex) { - this->animationIndex = animationIndex; - didAnimationChange = SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimationInfos, animationIndex); + if (animIndex != this->animIndex) { + this->animIndex = animIndex; + didAnimationChange = SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimationInfo, animIndex); } return didAnimationChange; } @@ -50,20 +55,20 @@ void func_80C1BDD8(DmAl* this, PlayState* play) { if (!this->unk_45C) { this->action = 0xFF; this->unk_45C = true; - this->animationIndex2 = this->animationIndex; + this->animIndex2 = this->animIndex; } if (Cutscene_CheckActorAction(play, 0x232)) { actionIndex = Cutscene_GetActorActionIndex(play, 0x232); csAction = play->csCtx.actorActions[actionIndex]->action; if (this->action != (u8)csAction) { this->action = csAction; - DmAl_ChangeAnimation(this, D_80C1C280[csAction]); + DmAl_ChangeAnim(this, D_80C1C280[csAction]); } Cutscene_ActorTranslateAndYaw(&this->actor, play, actionIndex); } } else if (this->unk_45C) { this->unk_45C = false; - DmAl_ChangeAnimation(this, this->animationIndex2); + DmAl_ChangeAnim(this, this->animIndex2); } } @@ -73,8 +78,8 @@ void DmAl_Init(Actor* thisx, PlayState* play) { ActorShape_Init(&this->actor.shape, 0.0f, NULL, 0.0f); SkelAnime_InitFlex(play, &this->skelAnime, &gMadameAromaSkel, NULL, this->jointTable, this->morphTable, MADAME_AROMA_LIMB_MAX); - this->animationIndex = -1; - DmAl_ChangeAnimation(this, MADAME_AROMA_ANIMATION_0); + this->animIndex = -1; + DmAl_ChangeAnim(this, MADAME_AROMA_ANIM_0); this->actor.flags &= ~ACTOR_FLAG_1; Actor_SetScale(&this->actor, 0.01f); this->actionFunc = func_80C1BDD8; diff --git a/src/overlays/actors/ovl_Dm_Al/z_dm_al.h b/src/overlays/actors/ovl_Dm_Al/z_dm_al.h index f15513177..8f89a4448 100644 --- a/src/overlays/actors/ovl_Dm_Al/z_dm_al.h +++ b/src/overlays/actors/ovl_Dm_Al/z_dm_al.h @@ -16,16 +16,11 @@ typedef struct DmAl { /* 0x30C */ Vec3s jointTable[MADAME_AROMA_LIMB_MAX]; /* 0x3AE */ Vec3s morphTable[MADAME_AROMA_LIMB_MAX]; /* 0x450 */ u8 action; - /* 0x454 */ s32 animationIndex; - /* 0x458 */ s32 animationIndex2; + /* 0x454 */ s32 animIndex; + /* 0x458 */ s32 animIndex2; /* 0x45C */ s32 unk_45C; } DmAl; // size = 0x460 -typedef enum { - /* 0x0 */ MADAME_AROMA_ANIMATION_0, - /* 0x1 */ MADAME_AROMA_ANIMATION_1 -} DmAlAnimations; - extern const ActorInit Dm_Al_InitVars; #endif // Z_DM_AL_H diff --git a/src/overlays/actors/ovl_Dm_An/z_dm_an.c b/src/overlays/actors/ovl_Dm_An/z_dm_an.c index aec59f032..64b6a7a98 100644 --- a/src/overlays/actors/ovl_Dm_An/z_dm_an.c +++ b/src/overlays/actors/ovl_Dm_An/z_dm_an.c @@ -33,7 +33,7 @@ const ActorInit Dm_An_InitVars = { (ActorFunc)NULL, }; -static AnimationInfoS sAnimations[] = { +static AnimationInfoS sAnimationInfo[] = { { &object_an1_Anim_007E08, 1.0f, 0, -1, ANIMMODE_LOOP, 0 }, { &object_an1_Anim_0071E8, 1.0f, 0, -1, ANIMMODE_LOOP, 0 }, { &object_an4_Anim_006CC0, 1.0f, 0, -1, ANIMMODE_LOOP, 0 }, @@ -83,7 +83,7 @@ s32 func_80C1C4D8(DmAn* this, PlayState* play, s32 arg2) { if ((objectIndex2 >= 0) && (arg2 != this->unk_2C8)) { gSegments[6] = VIRTUAL_TO_PHYSICAL(play->objectCtx.status[objectIndex2].segment); this->unk_2C8 = arg2; - ret = SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimations, arg2); + ret = SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimationInfo, arg2); gSegments[6] = VIRTUAL_TO_PHYSICAL(play->objectCtx.status[objectIndex].segment); } return ret; diff --git a/src/overlays/actors/ovl_Dm_Bal/z_dm_bal.c b/src/overlays/actors/ovl_Dm_Bal/z_dm_bal.c index e6864bf3e..04dd13ca4 100644 --- a/src/overlays/actors/ovl_Dm_Bal/z_dm_bal.c +++ b/src/overlays/actors/ovl_Dm_Bal/z_dm_bal.c @@ -30,7 +30,7 @@ const ActorInit Dm_Bal_InitVars = { (ActorFunc)DmBal_Draw, }; -static AnimationInfo D_80C1F170[] = { +static AnimationInfo sAnimationInfo[] = { { &object_bal_Anim_0005FC, 1.0f, 0.0f, 0.0f, ANIMMODE_LOOP, -8.0f }, { &object_bal_Anim_000840, 1.5f, 0.0f, 0.0f, ANIMMODE_LOOP, -8.0f }, { &object_bal_Anim_000840, 1.5f, 0.0f, 0.0f, ANIMMODE_ONCE, -4.0f }, @@ -86,14 +86,14 @@ void func_80C1EAE8(DmBal* this, PlayState* play) { case 1: this->unk_336 = 0; this->eyeIndex = 0; - Actor_ChangeAnimationByInfo(&this->skelAnime, D_80C1F170, 0); + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, 0); break; case 2: this->unk_336 = 1; - Actor_ChangeAnimationByInfo(&this->skelAnime, D_80C1F170, 12); + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, 12); break; case 3: - Actor_ChangeAnimationByInfo(&this->skelAnime, D_80C1F170, 13); + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, 13); break; } } else if (D_80C1F2C0 == 3) { diff --git a/src/overlays/actors/ovl_Dm_Char00/z_dm_char00.c b/src/overlays/actors/ovl_Dm_Char00/z_dm_char00.c index 5efd088ae..177c5784d 100644 --- a/src/overlays/actors/ovl_Dm_Char00/z_dm_char00.c +++ b/src/overlays/actors/ovl_Dm_Char00/z_dm_char00.c @@ -32,7 +32,7 @@ const ActorInit Dm_Char00_InitVars = { (ActorFunc)DmChar00_Draw, }; -static AnimationInfo sAnimations[] = { +static AnimationInfo sAnimationInfo[] = { { &gameplay_keep_Anim_02B2E8, 1.0f, 0.0f, -1.0f, 0, 0.0f }, { &gameplay_keep_Anim_029140, 1.0f, 0.0f, -1.0f, 0, 0.0f }, { &object_delf_Anim_004FF4, 1.0f, 0.0f, -1.0f, 2, 0.0f }, @@ -542,7 +542,7 @@ void DmChar00_Init(Actor* thisx, PlayState* play) { SkelAnime_Init(play, &this->skelAnime, &gameplay_keep_Skel_02AF58.sh, &gameplay_keep_Anim_029140, this->jointTable, this->morphTable, 7); ActorShape_Init(&thisx->shape, 0.0f, NULL, 15.0f); - func_80AA5580(&this->skelAnime, sAnimations, 0); + func_80AA5580(&this->skelAnime, sAnimationInfo, 0); Actor_SetScale(thisx, 0.01f); this->actionFunc = func_80AA67F8; } @@ -783,7 +783,7 @@ void func_80AA62FC(DmChar00* this, PlayState* play) { this->unk_261 = 0; break; } - func_80AA5580(&this->skelAnime, &sAnimations[this->unk_261], 0); + func_80AA5580(&this->skelAnime, &sAnimationInfo[this->unk_261], 0); } } Cutscene_ActorTranslateAndYaw(&this->actor, play, temp_v0); @@ -796,7 +796,7 @@ void func_80AA62FC(DmChar00* this, PlayState* play) { case 0x4: case 0x5: this->unk_261 += 4; - func_80AA5580(&this->skelAnime, &sAnimations[this->unk_261], 0); + func_80AA5580(&this->skelAnime, &sAnimationInfo[this->unk_261], 0); this->skelAnime.curFrame = 37.0f; break; @@ -805,7 +805,7 @@ void func_80AA62FC(DmChar00* this, PlayState* play) { case 0x14: case 0x15: this->unk_261 += 2; - func_80AA5580(&this->skelAnime, &sAnimations[this->unk_261], 0); + func_80AA5580(&this->skelAnime, &sAnimationInfo[this->unk_261], 0); break; case 0xA: @@ -833,18 +833,18 @@ void func_80AA62FC(DmChar00* this, PlayState* play) { case 0x50: case 0x53: this->unk_261 += 1; - func_80AA5580(&this->skelAnime, &sAnimations[this->unk_261], 0); + func_80AA5580(&this->skelAnime, &sAnimationInfo[this->unk_261], 0); break; case 0x2D: this->unk_261 = 19; - func_80AA5580(&this->skelAnime, &sAnimations[this->unk_261], 0); + func_80AA5580(&this->skelAnime, &sAnimationInfo[this->unk_261], 0); break; case 0x46: case 0x4D: this->unk_261 = 0; - func_80AA5580(&this->skelAnime, &sAnimations[this->unk_261], 0); + func_80AA5580(&this->skelAnime, &sAnimationInfo[this->unk_261], 0); break; } } @@ -856,7 +856,7 @@ void func_80AA67F8(DmChar00* this, PlayState* play) { if ((play->csCtx.state == 0) && (gSaveContext.sceneSetupIndex == 0) && (play->csCtx.currentCsIndex == 1)) { if (this->unk_261 != 42) { this->unk_261 = 42; - func_80AA5580(&this->skelAnime, &sAnimations[this->unk_261], 0); + func_80AA5580(&this->skelAnime, &sAnimationInfo[this->unk_261], 0); } Math_SmoothStepToF(&this->actor.world.pos.x, 0.0f, 0.5f, 0.5f, 0.001f); @@ -865,7 +865,7 @@ void func_80AA67F8(DmChar00* this, PlayState* play) { if (player->actor.world.pos.z < -625.0f) { this->unk_261 = 43; - func_80AA5580(&this->skelAnime, &sAnimations[this->unk_261], 0); + func_80AA5580(&this->skelAnime, &sAnimationInfo[this->unk_261], 0); this->actionFunc = func_80AA695C; this->skelAnime.playSpeed = 1.5f; } diff --git a/src/overlays/actors/ovl_Dm_Char02/z_dm_char02.c b/src/overlays/actors/ovl_Dm_Char02/z_dm_char02.c index 1844783ff..5a6695816 100644 --- a/src/overlays/actors/ovl_Dm_Char02/z_dm_char02.c +++ b/src/overlays/actors/ovl_Dm_Char02/z_dm_char02.c @@ -32,32 +32,32 @@ const ActorInit Dm_Char02_InitVars = { }; typedef enum { - /* 0 */ DMCHAR02_ANIMATION_HIT_GROUND, - /* 1 */ DMCHAR02_ANIMATION_TURN_AROUND, - /* 2 */ DMCHAR02_ANIMATION_JUGGLE, - /* 3 */ DMCHAR02_ANIMATION_FALL, -} DmChar02AnimationIndex; + /* 0 */ DMCHAR02_ANIM_HIT_GROUND, + /* 1 */ DMCHAR02_ANIM_TURN_AROUND, + /* 2 */ DMCHAR02_ANIM_JUGGLE, + /* 3 */ DMCHAR02_ANIM_FALL, +} DmChar02Animation; -static AnimationInfo sAnimations[] = { +static AnimationInfo sAnimationInfo[] = { { &gClockTowerOcarinaOfTimeHitGroundAnim, 1.0f, 0.0f, -1.0f, ANIMMODE_ONCE, 0.0f }, { &gClockTowerOcarinaOfTimeTurnAroundAnim, 1.0f, 0.0f, -1.0f, ANIMMODE_ONCE, 0.0f }, { &gClockTowerOcarinaOfTimeJuggleAnim, 1.0f, 0.0f, -1.0f, ANIMMODE_LOOP, 0.0f }, { &gClockTowerOcarinaOfTimeFallAnim, 1.0f, 0.0f, -1.0f, ANIMMODE_ONCE, 0.0f }, }; -void DmChar02_ChangeAnimation(SkelAnime* skelAnime, AnimationInfo* animation, u16 index) { +void DmChar02_ChangeAnim(SkelAnime* skelAnime, AnimationInfo* animationInfo, u16 animIndex) { f32 frameCount; - animation += index; + animationInfo += animIndex; - if (animation->frameCount < 0.0f) { - frameCount = Animation_GetLastFrame(animation->animation); + if (animationInfo->frameCount < 0.0f) { + frameCount = Animation_GetLastFrame(animationInfo->animation); } else { - frameCount = animation->frameCount; + frameCount = animationInfo->frameCount; } - Animation_Change(skelAnime, animation->animation, animation->playSpeed, animation->startFrame, frameCount, - animation->mode, animation->morphFrames); + Animation_Change(skelAnime, animationInfo->animation, animationInfo->playSpeed, animationInfo->startFrame, + frameCount, animationInfo->mode, animationInfo->morphFrames); } void DmChar02_PlaySfxForDroppingOcarinaCutscene(DmChar02* this, PlayState* play) { @@ -84,11 +84,11 @@ void DmChar02_Init(Actor* thisx, PlayState* play) { DmChar02* this = THIS; if (gSaveContext.save.inventory.items[SLOT_OCARINA] == ITEM_NONE) { - this->animIndex = DMCHAR02_ANIMATION_HIT_GROUND; + this->animIndex = DMCHAR02_ANIM_HIT_GROUND; this->actor.targetArrowOffset = 3000.0f; ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 24.0f); SkelAnime_InitFlex(play, &this->skelAnime, &gClockTowerOcarinaOfTimeSkel, NULL, NULL, NULL, 0); - DmChar02_ChangeAnimation(&this->skelAnime, sAnimations, 0); + DmChar02_ChangeAnim(&this->skelAnime, sAnimationInfo, 0); Actor_SetScale(&this->actor, 0.01f); this->actionFunc = DmChar02_PerformCutsceneActions; } else { @@ -108,25 +108,25 @@ void DmChar02_PerformCutsceneActions(DmChar02* this, PlayState* play) { if (play->csCtx.frames == play->csCtx.actorActions[actionIndex]->startFrame) { switch (play->csCtx.actorActions[actionIndex]->action) { default: - this->animIndex = DMCHAR02_ANIMATION_HIT_GROUND; + this->animIndex = DMCHAR02_ANIM_HIT_GROUND; shouldChangeAnimation = false; break; case 1: - this->animIndex = DMCHAR02_ANIMATION_HIT_GROUND; + this->animIndex = DMCHAR02_ANIM_HIT_GROUND; break; case 2: - this->animIndex = DMCHAR02_ANIMATION_TURN_AROUND; + this->animIndex = DMCHAR02_ANIM_TURN_AROUND; break; case 4: - this->animIndex = DMCHAR02_ANIMATION_FALL; + this->animIndex = DMCHAR02_ANIM_FALL; break; } if (shouldChangeAnimation) { - DmChar02_ChangeAnimation(&this->skelAnime, &sAnimations[this->animIndex], 0); + DmChar02_ChangeAnim(&this->skelAnime, &sAnimationInfo[this->animIndex], 0); } } @@ -134,9 +134,9 @@ void DmChar02_PerformCutsceneActions(DmChar02* this, PlayState* play) { } if (Animation_OnFrame(&this->skelAnime, this->skelAnime.endFrame)) { - if (this->animIndex == DMCHAR02_ANIMATION_TURN_AROUND) { + if (this->animIndex == DMCHAR02_ANIM_TURN_AROUND) { this->animIndex++; - DmChar02_ChangeAnimation(&this->skelAnime, &sAnimations[this->animIndex], 0); + DmChar02_ChangeAnim(&this->skelAnime, &sAnimationInfo[this->animIndex], 0); } } } diff --git a/src/overlays/actors/ovl_Dm_Char03/z_dm_char03.c b/src/overlays/actors/ovl_Dm_Char03/z_dm_char03.c index 6c44fb5e6..397fbfa3c 100644 --- a/src/overlays/actors/ovl_Dm_Char03/z_dm_char03.c +++ b/src/overlays/actors/ovl_Dm_Char03/z_dm_char03.c @@ -32,20 +32,20 @@ const ActorInit Dm_Char03_InitVars = { (ActorFunc)DmChar03_Draw, }; -AnimationInfo sAnimations[] = { { &object_osn_Anim_020530, 1.0f, 0.0f, -1.0f, ANIMMODE_ONCE, 0.0f } }; +AnimationInfo sAnimationInfo[] = { { &object_osn_Anim_020530, 1.0f, 0.0f, -1.0f, ANIMMODE_ONCE, 0.0f } }; -void DmChar03_ChangeAnimation(SkelAnime* skelAnime, AnimationInfo* animInfo, u16 index) { +void DmChar03_ChangeAnim(SkelAnime* skelAnime, AnimationInfo* animationInfo, u16 animIndex) { f32 frame; - animInfo += index; + animationInfo += animIndex; - if (animInfo->frameCount < 0.0f) { - frame = Animation_GetLastFrame(animInfo->animation); + if (animationInfo->frameCount < 0.0f) { + frame = Animation_GetLastFrame(animationInfo->animation); } else { - frame = animInfo->frameCount; + frame = animationInfo->frameCount; } - Animation_Change(skelAnime, animInfo->animation, animInfo->playSpeed, animInfo->startFrame, frame, animInfo->mode, - animInfo->morphFrames); + Animation_Change(skelAnime, animationInfo->animation, animationInfo->playSpeed, animationInfo->startFrame, frame, + animationInfo->mode, animationInfo->morphFrames); } void DmChar03_Init(Actor* thisx, PlayState* play) { @@ -56,7 +56,7 @@ void DmChar03_Init(Actor* thisx, PlayState* play) { this->unk_18E = false; ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 24.0f); SkelAnime_InitFlex(play, &this->skelAnime, &gDekuMaskSkel, NULL, NULL, NULL, 0); - DmChar03_ChangeAnimation(&this->skelAnime, sAnimations, 0); + DmChar03_ChangeAnim(&this->skelAnime, sAnimationInfo, 0); Actor_SetScale(&this->actor, 0.01f); this->actionFunc = DmChar03_DoNothing; } @@ -119,7 +119,7 @@ void func_80AAB710(DmChar03* this, PlayState* play) { } if (shouldChangeAnim) { - DmChar03_ChangeAnimation(&this->skelAnime, &sAnimations[this->animIndex], 0); + DmChar03_ChangeAnim(&this->skelAnime, &sAnimationInfo[this->animIndex], 0); } } Cutscene_ActorTranslateAndYaw(&this->actor, play, index); diff --git a/src/overlays/actors/ovl_Dm_Char04/z_dm_char04.c b/src/overlays/actors/ovl_Dm_Char04/z_dm_char04.c index 6c97624a8..f7b4b47e8 100644 --- a/src/overlays/actors/ovl_Dm_Char04/z_dm_char04.c +++ b/src/overlays/actors/ovl_Dm_Char04/z_dm_char04.c @@ -30,10 +30,10 @@ const ActorInit Dm_Char04_InitVars = { (ActorFunc)DmChar04_Draw, }; -void DmChar04_ChangeAnim(SkelAnime* skelAnime, AnimationInfo* animation, u16 index) { +void DmChar04_ChangeAnim(SkelAnime* skelAnime, AnimationInfo* animation, u16 animIndex) { f32 endFrame; - animation += index; + animation += animIndex; if (animation->frameCount < 0.0f) { endFrame = Animation_GetLastFrame(animation->animation); @@ -44,7 +44,7 @@ void DmChar04_ChangeAnim(SkelAnime* skelAnime, AnimationInfo* animation, u16 ind animation->mode, animation->morphFrames); } -static AnimationInfo sAnimations[] = { +static AnimationInfo sAnimationInfo[] = { { &gameplay_keep_Anim_02B2E8, 1.0f, 0.0f, -1.0f, ANIMMODE_LOOP, 0.0f }, { &gameplay_keep_Anim_029140, 1.0f, 0.0f, -1.0f, ANIMMODE_LOOP, 0.0f }, }; @@ -72,7 +72,7 @@ void DmChar04_Init(Actor* thisx, PlayState* play) { SkelAnime_Init(play, &this->skelAnime, &gameplay_keep_Skel_02AF58.sh, &gameplay_keep_Anim_029140, this->jointTable, this->morphTable, 7); ActorShape_Init(&this->actor.shape, 0.0f, NULL, 15.0f); - DmChar04_ChangeAnim(&this->skelAnime, sAnimations, 0); + DmChar04_ChangeAnim(&this->skelAnime, sAnimationInfo, 0); Actor_SetScale(&this->actor, 0.01f); this->actionFunc = func_80AABE34; } @@ -90,11 +90,11 @@ void func_80AABE34(DmChar04* this, PlayState* play) { if (this->csAction != play->csCtx.actorActions[actionIndex]->action) { this->csAction = play->csCtx.actorActions[actionIndex]->action; if (play->csCtx.actorActions[actionIndex]->action == 1) { - this->animationIndex = 0; + this->animIndex = 0; } else { - this->animationIndex = 0; + this->animIndex = 0; } - DmChar04_ChangeAnim(&this->skelAnime, &sAnimations[this->animationIndex], 0); + DmChar04_ChangeAnim(&this->skelAnime, &sAnimationInfo[this->animIndex], 0); } } Cutscene_ActorTranslateAndYaw(&this->actor, play, actionIndex); diff --git a/src/overlays/actors/ovl_Dm_Char04/z_dm_char04.h b/src/overlays/actors/ovl_Dm_Char04/z_dm_char04.h index 91de6d567..42c4a8501 100644 --- a/src/overlays/actors/ovl_Dm_Char04/z_dm_char04.h +++ b/src/overlays/actors/ovl_Dm_Char04/z_dm_char04.h @@ -16,7 +16,7 @@ typedef struct DmChar04 { /* 0x240 */ Color_RGBAf primColors; /* 0x250 */ Color_RGBAf envColors; /* 0x260 */ u8 csAction; - /* 0x261 */ u8 animationIndex; + /* 0x261 */ u8 animIndex; /* 0x262 */ u16 timer; } DmChar04; // size = 0x264 diff --git a/src/overlays/actors/ovl_Dm_Char05/z_dm_char05.c b/src/overlays/actors/ovl_Dm_Char05/z_dm_char05.c index 40807c77c..44e5732ad 100644 --- a/src/overlays/actors/ovl_Dm_Char05/z_dm_char05.c +++ b/src/overlays/actors/ovl_Dm_Char05/z_dm_char05.c @@ -47,7 +47,7 @@ const ActorInit Dm_Char05_InitVars = { (ActorFunc)DmChar05_Draw, }; -static AnimationInfo sAnimations[] = { +static AnimationInfo sAnimationInfo[] = { { &object_dmask_Anim_001090, 1.0f, 0.0f, -1.0f, ANIMMODE_ONCE, 0.0f }, { &object_dmask_Anim_004288, 1.0f, 0.0f, -1.0f, ANIMMODE_ONCE, 0.0f }, { &object_dmask_Anim_0001A8, 1.0f, 0.0f, -1.0f, ANIMMODE_ONCE, 0.0f }, @@ -76,9 +76,9 @@ void func_80AAC63C(Actor* thisx, PlayState* play) { ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 24.0f); SkelAnime_Init(play, &this->skelAnime, &object_dmask_Skel_010B0, NULL, NULL, NULL, 0); if (DMCHAR05_GET(&this->actor) == DMCHAR05_0) { - func_80AAC5A0(&this->skelAnime, &sAnimations[0], 0); + func_80AAC5A0(&this->skelAnime, &sAnimationInfo[0], 0); } else { - func_80AAC5A0(&this->skelAnime, &sAnimations[1], 0); + func_80AAC5A0(&this->skelAnime, &sAnimationInfo[1], 0); } this->actionFunc = func_80AACC48; } @@ -88,7 +88,7 @@ void func_80AAC6E4(Actor* thisx, PlayState* play) { ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 24.0f); SkelAnime_Init(play, &this->skelAnime, &object_dmask_Skel_042B0, NULL, NULL, NULL, 0); - func_80AAC5A0(&this->skelAnime, &sAnimations[1], 0); + func_80AAC5A0(&this->skelAnime, &sAnimationInfo[1], 0); this->actionFunc = func_80AACC48; } @@ -97,7 +97,7 @@ void func_80AAC770(Actor* thisx, PlayState* play) { ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 24.0f); SkelAnime_InitFlex(play, &this->skelAnime, &object_dmask_Skel_001D0, NULL, NULL, NULL, 0); - func_80AAC5A0(&this->skelAnime, &sAnimations[3], 0); + func_80AAC5A0(&this->skelAnime, &sAnimationInfo[3], 0); this->actionFunc = func_80AACC48; } @@ -106,7 +106,7 @@ void func_80AAC7FC(Actor* thisx, PlayState* play) { ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 24.0f); SkelAnime_Init(play, &this->skelAnime, &object_dmask_Skel_013D0, NULL, NULL, NULL, 0); - func_80AAC5A0(&this->skelAnime, &sAnimations[4], 0); + func_80AAC5A0(&this->skelAnime, &sAnimationInfo[4], 0); this->actionFunc = func_80AACC48; } @@ -347,7 +347,7 @@ void func_80AACF04(DmChar05* this, PlayState* play) { } if (sp2F) { - func_80AAC5A0(&this->skelAnime, &sAnimations[this->unk_18C], 0); + func_80AAC5A0(&this->skelAnime, &sAnimationInfo[this->unk_18C], 0); } } @@ -391,7 +391,7 @@ void func_80AACF04(DmChar05* this, PlayState* play) { } if (sp2F) { - func_80AAC5A0(&this->skelAnime, &sAnimations[this->unk_18C], 0); + func_80AAC5A0(&this->skelAnime, &sAnimationInfo[this->unk_18C], 0); } } @@ -434,7 +434,7 @@ void func_80AACF04(DmChar05* this, PlayState* play) { } if (sp2F) { - func_80AAC5A0(&this->skelAnime, &sAnimations[this->unk_18C], 0); + func_80AAC5A0(&this->skelAnime, &sAnimationInfo[this->unk_18C], 0); } } @@ -470,7 +470,7 @@ void func_80AACF04(DmChar05* this, PlayState* play) { } if (sp2F) { - func_80AAC5A0(&this->skelAnime, &sAnimations[this->unk_18C], 0); + func_80AAC5A0(&this->skelAnime, &sAnimationInfo[this->unk_18C], 0); } } @@ -484,7 +484,7 @@ void func_80AACF04(DmChar05* this, PlayState* play) { if (Animation_OnFrame(&this->skelAnime, this->skelAnime.endFrame)) { if (this->unk_18C == 4) { this->unk_18C++; - func_80AAC5A0(&this->skelAnime, &sAnimations[this->unk_18C], 0); + func_80AAC5A0(&this->skelAnime, &sAnimationInfo[this->unk_18C], 0); } } break; diff --git a/src/overlays/actors/ovl_Dm_Char09/z_dm_char09.c b/src/overlays/actors/ovl_Dm_Char09/z_dm_char09.c index b9847da81..8f02a8bb4 100644 --- a/src/overlays/actors/ovl_Dm_Char09/z_dm_char09.c +++ b/src/overlays/actors/ovl_Dm_Char09/z_dm_char09.c @@ -15,11 +15,9 @@ void DmChar09_Destroy(Actor* thisx, PlayState* play); void DmChar09_Update(Actor* thisx, PlayState* play); void DmChar09_Draw(Actor* thisx, PlayState* play); -void func_80AB1FDC(DmChar09* this, PlayState* play); -void func_80AB2258(DmChar09* this, PlayState* play); +void DmChar09_DoNothing(DmChar09* this, PlayState* play); void func_80AB2268(DmChar09* this, PlayState* play); -#if 0 const ActorInit Dm_Char09_InitVars = { ACTOR_DM_CHAR09, ACTORCAT_ITEMACTION, @@ -32,28 +30,197 @@ const ActorInit Dm_Char09_InitVars = { (ActorFunc)DmChar09_Draw, }; -#endif +static AnimationInfo sAnimationInfo[] = { + { &object_bee_Anim_00005C, 1.0f, 0.0f, -1.0f, ANIMMODE_LOOP, 0.0f }, +}; -extern UNK_TYPE D_0600005C; +void DmChar09_ChangeAnim(SkelAnime* skelAnime, AnimationInfo* animationInfo, u16 animIndex) { + f32 frameCount; -#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_Dm_Char09/func_80AB1E10.s") + animationInfo += animIndex; -#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_Dm_Char09/DmChar09_Init.s") + if (animationInfo->frameCount < 0.0f) { + frameCount = Animation_GetLastFrame(animationInfo->animation); + } else { + frameCount = animationInfo->frameCount; + } -#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_Dm_Char09/DmChar09_Destroy.s") + Animation_Change(skelAnime, animationInfo->animation, animationInfo->playSpeed, animationInfo->startFrame, + frameCount, animationInfo->mode, animationInfo->morphFrames); +} -#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_Dm_Char09/func_80AB1FA0.s") +void DmChar09_Init(Actor* thisx, PlayState* play) { + DmChar09* this = THIS; -#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_Dm_Char09/func_80AB1FDC.s") + ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 19.0f); + SkelAnime_Init(play, &this->skelAnime, &object_bee_Skel_001398, &object_bee_Anim_00005C, this->jointTable, + this->morphTable, OBJECT_BEE_LIMB_MAX); + DmChar09_ChangeAnim(&this->skelAnime, sAnimationInfo, 0); + Actor_SetScale(&this->actor, 0.01f); + this->unk_228 = Rand_ZeroOne() * 65535.0f; + this->unk_22A = Rand_ZeroOne() * 65535.0f; + this->actionFunc = DmChar09_DoNothing; +} -#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_Dm_Char09/func_80AB2258.s") +void DmChar09_Destroy(Actor* thisx, PlayState* play) { +} -#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_Dm_Char09/func_80AB2268.s") +void func_80AB1FA0(DmChar09* this, s32 arg1) { + Math_Vec3s_ToVec3f(&this->actor.world.pos, &this->unk_224[arg1]); +} -#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_Dm_Char09/func_80AB24BC.s") +void func_80AB1FDC(DmChar09* this, PlayState* play) { + Actor* thisx = &this->actor; + Vec3f sp58; + f32 sp54; + f32 phi_fa0; + f32 phi_fv0; + Vec3f sp40; + s32 phi_a1; + Vec3s* temp_v1; -#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_Dm_Char09/DmChar09_Update.s") + Math_Vec3f_Copy(&sp40, &thisx->world.pos); + Math_Vec3s_ToVec3f(&sp58, this->unk_224 + this->unk_21C + this->unk_220); + Math_Vec3f_Diff(&sp58, &thisx->world.pos, &thisx->velocity); + sp54 = Math3D_Vec3fMagnitude(&thisx->velocity); + if ((sp54 < (this->speed * 8.0f)) && (this->speed > 2.0f)) { + phi_fv0 = ((this->speed - 2.0f) * 0.1f) + 2.0f; + phi_fa0 = this->speed * 0.03f; + } else { + phi_fv0 = this->speed; + phi_fa0 = this->speed * 0.16f; + } + Math_StepToF(&thisx->speedXZ, phi_fv0, phi_fa0); + if ((thisx->speedXZ + 0.05f) < sp54) { + Math_Vec3f_Scale(&thisx->velocity, thisx->speedXZ / sp54); + thisx->world.pos.x += thisx->velocity.x; + thisx->world.pos.y += thisx->velocity.y; + thisx->world.pos.z += thisx->velocity.z; + } else { + this->unk_21C += this->unk_220; + thisx->speedXZ *= 0.4f; + phi_a1 = true; + if (((this->unk_21C >= this->unk_218) && (this->unk_220 > 0)) || + ((this->unk_21C <= 0) && (this->unk_220 < 0))) { + temp_v1 = this->unk_224 + this->unk_218; + if (((this->unk_224->x == temp_v1->x) && (this->unk_224->y == temp_v1->y)) && + (this->unk_224->z == temp_v1->z)) { + this->unk_21C = 0; + this->unk_220 = 1; + } else { + phi_a1 = false; + this->actionFunc = func_80AB2268; + } + } + if (phi_a1) { + func_80AB1FA0(this, this->unk_21C); + } + } + Math_SmoothStepToS(&thisx->world.rot.y, Math_Vec3f_Yaw(&thisx->world.pos, &sp40) + 0x7FFF, 1, 0x7D0, 0); + thisx->shape.rot.y = thisx->world.rot.y; +} -#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_Dm_Char09/func_80AB25D8.s") +void DmChar09_DoNothing(DmChar09* this, PlayState* play) { +} -#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_Dm_Char09/DmChar09_Draw.s") +void func_80AB2268(DmChar09* this, PlayState* play) { + Path* path; + s32 pad; + s32 i; + s32 actionIndex; + s32 max = 0; + s32 pathnum; + u8 temp = false; + + if (!DMCHAR09_GET_F(&this->actor)) { + if (play->csCtx.currentCsIndex == 1) { + temp = true; + } + } else if (play->csCtx.currentCsIndex == 0) { + temp = true; + } + + if (Cutscene_CheckActorAction(play, 0x1F7) && temp) { + actionIndex = Cutscene_GetActorActionIndex(play, 0x1F7); + if (this->unk_22F != play->csCtx.actorActions[actionIndex]->action) { + this->unk_22F = play->csCtx.actorActions[actionIndex]->action; + switch (play->csCtx.actorActions[actionIndex]->action) { + case 2: + max = 0; + break; + case 3: + max = 1; + break; + case 4: + max = 2; + break; + case 5: + max = 3; + break; + } + + if (play->csCtx.actorActions[actionIndex]->action >= 2) { + pathnum = DMCHAR09_GET_PATH(&this->actor); + path = &play->setupPathList[pathnum]; + + for (i = 0; i < max; i++) { + pathnum = path->unk1; + path = &play->setupPathList[pathnum]; + } + + this->unk_224 = Lib_SegmentedToVirtual(path->points); + this->unk_214 = path->count; + this->unk_21C = 0; + this->unk_218 = path->count - 1; + this->unk_220 = 1; + this->unk_22E = true; + + this->speed = (u16)play->csCtx.actorActions[actionIndex]->rot.z * 0.00390625f; + this->actionFunc = func_80AB1FDC; + } else { + this->unk_22E = false; + this->actionFunc = DmChar09_DoNothing; + } + } + } else { + this->unk_22F = 0x63; + } +} + +void func_80AB24BC(DmChar09* this, PlayState* play) { + this->unk_228 += 0xBB8; + this->unk_22A += 0x1388; + this->unk_204 = Math_SinS(this->unk_228) * 150.0f; + this->unk_208 = Math_SinS(this->unk_22A) * 150.0f; + this->unk_20C = Math_SinS(this->unk_228) * 150.0f; +} + +void DmChar09_Update(Actor* thisx, PlayState* play) { + DmChar09* this = THIS; + + SkelAnime_Update(&this->skelAnime); + this->actionFunc(this, play); + func_80AB2268(this, play); + func_80AB24BC(this, play); + if ((play->csCtx.state != 0) && this->unk_22E && DMCHAR09_GET_100(thisx)) { + Actor_PlaySfxAtPos(&this->actor, NA_SE_EV_POSTMAN_WALK + SFX_FLAG); + } +} + +s32 DmChar09_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx) { + DmChar09* this = THIS; + + Matrix_Translate(this->unk_204, this->unk_208, this->unk_20C, MTXMODE_APPLY); + return false; +} + +void DmChar09_Draw(Actor* thisx, PlayState* play) { + DmChar09* this = THIS; + + if ((play->csCtx.state != 0) && this->unk_22E) { + func_8012C28C(play->state.gfxCtx); + func_8012C2DC(play->state.gfxCtx); + SkelAnime_DrawOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable, DmChar09_OverrideLimbDraw, NULL, + &this->actor); + } +} diff --git a/src/overlays/actors/ovl_Dm_Char09/z_dm_char09.h b/src/overlays/actors/ovl_Dm_Char09/z_dm_char09.h index 770c9358c..ce01f164a 100644 --- a/src/overlays/actors/ovl_Dm_Char09/z_dm_char09.h +++ b/src/overlays/actors/ovl_Dm_Char09/z_dm_char09.h @@ -2,6 +2,11 @@ #define Z_DM_CHAR09_H #include "global.h" +#include "objects/object_bee/object_bee.h" + +#define DMCHAR09_GET_PATH(thisx) (((thisx)->params >> 4) & 0xF) +#define DMCHAR09_GET_100(thisx) ((thisx)->params & 0x100) +#define DMCHAR09_GET_F(thisx) ((thisx)->params & 0xF) struct DmChar09; @@ -9,9 +14,24 @@ typedef void (*DmChar09ActionFunc)(struct DmChar09*, PlayState*); typedef struct DmChar09 { /* 0x000 */ Actor actor; - /* 0x144 */ char unk_144[0xBC]; + /* 0x144 */ SkelAnime skelAnime; + /* 0x188 */ Vec3s jointTable[OBJECT_BEE_LIMB_MAX]; + /* 0x1C4 */ Vec3s morphTable[OBJECT_BEE_LIMB_MAX]; /* 0x200 */ DmChar09ActionFunc actionFunc; - /* 0x204 */ char unk_204[0x2C]; + /* 0x204 */ f32 unk_204; + /* 0x208 */ f32 unk_208; + /* 0x20C */ f32 unk_20C; + /* 0x210 */ f32 speed; + /* 0x214 */ s32 unk_214; + /* 0x218 */ s32 unk_218; + /* 0x21C */ s32 unk_21C; + /* 0x220 */ s32 unk_220; + /* 0x224 */ Vec3s* unk_224; + /* 0x228 */ s16 unk_228; + /* 0x22A */ s16 unk_22A; + /* 0x22C */ UNK_TYPE1 pad22C[2]; + /* 0x22E */ u8 unk_22E; + /* 0x22F */ u8 unk_22F; } DmChar09; // size = 0x230 extern const ActorInit Dm_Char09_InitVars; diff --git a/src/overlays/actors/ovl_Dm_Gm/z_dm_gm.c b/src/overlays/actors/ovl_Dm_Gm/z_dm_gm.c index 823aa7fa2..2b9c62e19 100644 --- a/src/overlays/actors/ovl_Dm_Gm/z_dm_gm.c +++ b/src/overlays/actors/ovl_Dm_Gm/z_dm_gm.c @@ -33,7 +33,7 @@ const ActorInit Dm_Gm_InitVars = { (ActorFunc)NULL, }; -static AnimationInfoS sAnimations[] = { +static AnimationInfoS sAnimationInfo[] = { { &object_an1_Anim_007E08, 1.0f, 0, -1, ANIMMODE_LOOP, 0 }, { &object_an1_Anim_0071E8, 1.0f, 0, -1, ANIMMODE_LOOP, 0 }, { &object_an4_Anim_006CC0, 1.0f, 0, -1, ANIMMODE_LOOP, -4 }, @@ -83,7 +83,7 @@ s32 func_80C24428(DmGm* this, PlayState* play, s32 arg2) { if ((objectIndex2 >= 0) && (arg2 != this->unk_2C8)) { gSegments[6] = VIRTUAL_TO_PHYSICAL(play->objectCtx.status[objectIndex2].segment); this->unk_2C8 = arg2; - ret = SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimations, arg2); + ret = SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimationInfo, arg2); gSegments[6] = VIRTUAL_TO_PHYSICAL(play->objectCtx.status[objectIndex].segment); } return ret; diff --git a/src/overlays/actors/ovl_Dm_Nb/z_dm_nb.c b/src/overlays/actors/ovl_Dm_Nb/z_dm_nb.c index 30cf308b6..3dcde3787 100644 --- a/src/overlays/actors/ovl_Dm_Nb/z_dm_nb.c +++ b/src/overlays/actors/ovl_Dm_Nb/z_dm_nb.c @@ -28,14 +28,14 @@ const ActorInit Dm_Nb_InitVars = { (ActorFunc)DmNb_Draw, }; -static AnimationInfoS D_80C1E200[] = { { &object_nb_Anim_000990, 1.0f, 0, -1, ANIMMODE_LOOP, 0 } }; +static AnimationInfoS sAnimationInfo[] = { { &object_nb_Anim_000990, 1.0f, 0, -1, ANIMMODE_LOOP, 0 } }; s32 func_80C1DED0(DmNb* this, s32 arg1) { s32 ret = false; if (arg1 != this->unk1F0) { this->unk1F0 = arg1; - ret = SubS_ChangeAnimationByInfoS(&this->skelAnime, D_80C1E200, arg1); + ret = SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimationInfo, arg1); } return ret; } diff --git a/src/overlays/actors/ovl_Dm_Sa/z_dm_sa.c b/src/overlays/actors/ovl_Dm_Sa/z_dm_sa.c index aaaeea362..d9f775f6a 100644 --- a/src/overlays/actors/ovl_Dm_Sa/z_dm_sa.c +++ b/src/overlays/actors/ovl_Dm_Sa/z_dm_sa.c @@ -30,7 +30,7 @@ const ActorInit Dm_Sa_InitVars = { (ActorFunc)DmSa_Draw, }; -static AnimationInfo D_80A2ED00[] = { { &gSkullKidTPoseAnim, 1.0f, 0, -1.0f, ANIMMODE_LOOP, 0 } }; +static AnimationInfo sAnimationInfo[] = { { &gSkullKidTPoseAnim, 1.0f, 0, -1.0f, ANIMMODE_LOOP, 0 } }; void func_80A2E960(SkelAnime* arg0, AnimationInfo* animations, u16 index) { f32 frameCount; @@ -53,7 +53,7 @@ void DmSa_Init(Actor* thisx, PlayState* play) { this->actor.targetArrowOffset = 3000.0f; ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 24.0f); SkelAnime_InitFlex(play, &this->skelAnime, &gSkullKidSkel, NULL, NULL, NULL, 0); - func_80A2E960(&this->skelAnime, D_80A2ED00, 0); + func_80A2E960(&this->skelAnime, sAnimationInfo, 0); Actor_SetScale(&this->actor, 0.01f); this->actionFunc = DmSa_DoNothing; } diff --git a/src/overlays/actors/ovl_Dm_Stk/z_dm_stk.c b/src/overlays/actors/ovl_Dm_Stk/z_dm_stk.c index 08a31cb9e..256e0f33a 100644 --- a/src/overlays/actors/ovl_Dm_Stk/z_dm_stk.c +++ b/src/overlays/actors/ovl_Dm_Stk/z_dm_stk.c @@ -37,79 +37,79 @@ void DmStk_ClockTower_IdleWithOcarina(DmStk* this, PlayState* play); void DmStk_ClockTower_Idle(DmStk* this, PlayState* play); typedef enum { - /* 0 */ SK_ANIMATION_SHAKE_HEAD, - /* 1 */ SK_ANIMATION_WALK, - /* 2 */ SK_ANIMATION_LOOK_AROUND, // Not used in the final game - /* 3 */ SK_ANIMATION_IDLE, - /* 4 */ SK_ANIMATION_UNUSED_IDLE, // Unused duplicate of SK_ANIMATION_IDLE - /* 5 */ SK_ANIMATION_BENT_OVER_HEAD_TWITCH, - /* 6 */ SK_ANIMATION_GLITCHY_HORSE_RIDE_START, // Not used in the final game - /* 7 */ SK_ANIMATION_RECLINING_FLOAT, - /* 8 */ SK_ANIMATION_CURSE_START, - /* 9 */ SK_ANIMATION_CURSE_LOOP, - /* 10 */ SK_ANIMATION_LAUGH_START, - /* 11 */ SK_ANIMATION_LAUGH_LOOP, - /* 12 */ SK_ANIMATION_HIDE_OCARINA_START, - /* 13 */ SK_ANIMATION_HIDE_OCARINA_LOOP, - /* 14 */ SK_ANIMATION_PICK_UP_OCARINA_AND_START_PLAYING, - /* 15 */ SK_ANIMATION_PLAY_OCARINA_AND_LAUGH, - /* 16 */ SK_ANIMATION_PICK_UP_OCARINA, // Not used in the final game - /* 17 */ SK_ANIMATION_LOOK_AT_OCARINA, // Not used in the final game - /* 18 */ SK_ANIMATION_KICK_OVER_LINK, - /* 19 */ SK_ANIMATION_SEARCH_LINK, - /* 20 */ SK_ANIMATION_UNUSED_KICK_OVER_LINK, // Unused duplicate of SK_ANIMATION_KICK_OVER_LINK - /* 21 */ SK_ANIMATION_UNUSED_SEARCH_LINK, // Unused duplicate of SK_ANIMATION_SEARCH_LINK - /* 22 */ SK_ANIMATION_HORSE_RIDE_START, - /* 23 */ SK_ANIMATION_HORSE_RIDE_LOOP, - /* 24 */ SK_ANIMATION_RAISE_MASK_START, - /* 25 */ SK_ANIMATION_RAISE_MASK_LOOP, - /* 26 */ SK_ANIMATION_LOWER_MASK, - /* 27 */ SK_ANIMATION_JUMP_WHILE_HIDING_OCARINA, - /* 28 */ SK_ANIMATION_HORSE_RIDE_AND_ROTATE, // Used when Link gets thrown off his horse - /* 29 */ SK_ANIMATION_PLAY_OCARINA_WHILE_FLOATING, - /* 30 */ SK_ANIMATION_FLOATING_TURN_AROUND, - /* 31 */ SK_ANIMATION_OCARINA_JUGGLE, - /* 32 */ SK_ANIMATION_CALL_DOWN_MOON_START, - /* 33 */ SK_ANIMATION_CALL_DOWN_MOON_LOOP, - /* 34 */ SK_ANIMATION_SMACK_FAIRY_START, - /* 35 */ SK_ANIMATION_SMACK_FAIRY_LOOP, - /* 36 */ SK_ANIMATION_HIT_BY_BUBBLE, - /* 37 */ SK_ANIMATION_DROP_OCARINA, - /* 38 */ SK_ANIMATION_FLOATING_ARMS_CROSSED, - /* 39 */ SK_ANIMATION_DEFLECT_ATTACK, - /* 40 */ SK_ANIMATION_TELESCOPE_LOOK_UP_START, - /* 41 */ SK_ANIMATION_TELESCOPE_LOOK_UP_LOOP, - /* 42 */ SK_ANIMATION_SURPRISE_START, - /* 43 */ SK_ANIMATION_SURPRISE_LOOP, - /* 44 */ SK_ANIMATION_LOOK_AROUND_FOR_GIANTS_START, - /* 45 */ SK_ANIMATION_LOOK_AROUND_FOR_GIANTS_LOOP, - /* 46 */ SK_ANIMATION_HOLD_HEAD_AND_SHAKE_START, - /* 47 */ SK_ANIMATION_HOLD_HEAD_AND_SHAKE_LOOP, - /* 48 */ SK_ANIMATION_HOLD_HEAD_AND_SCREAM_START, - /* 49 */ SK_ANIMATION_HOLD_HEAD_AND_SCREAM_LOOP, - /* 50 */ SK_ANIMATION_HUDDLE_WITH_FAIRIES, - /* 51 */ SK_ANIMATION_SEARCH_MASK_SALESMAN, - /* 52 */ SK_ANIMATION_HOLD_UP_MASK_START, - /* 53 */ SK_ANIMATION_HOLD_UP_MASK_LOOP, - /* 54 */ SK_ANIMATION_SHIVER, - /* 55 */ SK_ANIMATION_DRAW, - /* 56 */ SK_ANIMATION_BENT_OVER_LOOK_UP, - /* 57 */ SK_ANIMATION_SPANK, - /* 58 */ SK_ANIMATION_HIP_SHAKE_AND_JUMP, - /* 59 */ SK_ANIMATION_PLAY_FLUTE, - /* 60 */ SK_ANIMATION_CARTWHEEL, - /* 61 */ SK_ANIMATION_LIE_FLAT, - /* 62 */ SK_ANIMATION_DANGLE_FROM_MASK_START, - /* 63 */ SK_ANIMATION_DANGLE_FROM_MASK_LOOP, - /* 64 */ SK_ANIMATION_DROPPED_FROM_MASK, - /* 65 */ SK_ANIMATION_LOOK_UP_AT_GIANTS, - /* 66 */ SK_ANIMATION_ASHAMED_START, - /* 67 */ SK_ANIMATION_ASHAMED_LOOP, - /* 68 */ SK_ANIMATION_LOOK_LEFT_START, - /* 69 */ SK_ANIMATION_LOOK_LEFT_LOOP, - /* 70 */ SK_ANIMATION_SNIFF, - /* 71 */ SK_ANIMATION_LAUGH_AFTER_SNIFF, -} SkullKidAnimationIndex; + /* 0 */ SK_ANIM_SHAKE_HEAD, + /* 1 */ SK_ANIM_WALK, + /* 2 */ SK_ANIM_LOOK_AROUND, // Not used in the final game + /* 3 */ SK_ANIM_IDLE, + /* 4 */ SK_ANIM_UNUSED_IDLE, // Unused duplicate of SK_ANIM_IDLE + /* 5 */ SK_ANIM_BENT_OVER_HEAD_TWITCH, + /* 6 */ SK_ANIM_GLITCHY_HORSE_RIDE_START, // Not used in the final game + /* 7 */ SK_ANIM_RECLINING_FLOAT, + /* 8 */ SK_ANIM_CURSE_START, + /* 9 */ SK_ANIM_CURSE_LOOP, + /* 10 */ SK_ANIM_LAUGH_START, + /* 11 */ SK_ANIM_LAUGH_LOOP, + /* 12 */ SK_ANIM_HIDE_OCARINA_START, + /* 13 */ SK_ANIM_HIDE_OCARINA_LOOP, + /* 14 */ SK_ANIM_PICK_UP_OCARINA_AND_START_PLAYING, + /* 15 */ SK_ANIM_PLAY_OCARINA_AND_LAUGH, + /* 16 */ SK_ANIM_PICK_UP_OCARINA, // Not used in the final game + /* 17 */ SK_ANIM_LOOK_AT_OCARINA, // Not used in the final game + /* 18 */ SK_ANIM_KICK_OVER_LINK, + /* 19 */ SK_ANIM_SEARCH_LINK, + /* 20 */ SK_ANIM_UNUSED_KICK_OVER_LINK, // Unused duplicate of SK_ANIM_KICK_OVER_LINK + /* 21 */ SK_ANIM_UNUSED_SEARCH_LINK, // Unused duplicate of SK_ANIM_SEARCH_LINK + /* 22 */ SK_ANIM_HORSE_RIDE_START, + /* 23 */ SK_ANIM_HORSE_RIDE_LOOP, + /* 24 */ SK_ANIM_RAISE_MASK_START, + /* 25 */ SK_ANIM_RAISE_MASK_LOOP, + /* 26 */ SK_ANIM_LOWER_MASK, + /* 27 */ SK_ANIM_JUMP_WHILE_HIDING_OCARINA, + /* 28 */ SK_ANIM_HORSE_RIDE_AND_ROTATE, // Used when Link gets thrown off his horse + /* 29 */ SK_ANIM_PLAY_OCARINA_WHILE_FLOATING, + /* 30 */ SK_ANIM_FLOATING_TURN_AROUND, + /* 31 */ SK_ANIM_OCARINA_JUGGLE, + /* 32 */ SK_ANIM_CALL_DOWN_MOON_START, + /* 33 */ SK_ANIM_CALL_DOWN_MOON_LOOP, + /* 34 */ SK_ANIM_SMACK_FAIRY_START, + /* 35 */ SK_ANIM_SMACK_FAIRY_LOOP, + /* 36 */ SK_ANIM_HIT_BY_BUBBLE, + /* 37 */ SK_ANIM_DROP_OCARINA, + /* 38 */ SK_ANIM_FLOATING_ARMS_CROSSED, + /* 39 */ SK_ANIM_DEFLECT_ATTACK, + /* 40 */ SK_ANIM_TELESCOPE_LOOK_UP_START, + /* 41 */ SK_ANIM_TELESCOPE_LOOK_UP_LOOP, + /* 42 */ SK_ANIM_SURPRISE_START, + /* 43 */ SK_ANIM_SURPRISE_LOOP, + /* 44 */ SK_ANIM_LOOK_AROUND_FOR_GIANTS_START, + /* 45 */ SK_ANIM_LOOK_AROUND_FOR_GIANTS_LOOP, + /* 46 */ SK_ANIM_HOLD_HEAD_AND_SHAKE_START, + /* 47 */ SK_ANIM_HOLD_HEAD_AND_SHAKE_LOOP, + /* 48 */ SK_ANIM_HOLD_HEAD_AND_SCREAM_START, + /* 49 */ SK_ANIM_HOLD_HEAD_AND_SCREAM_LOOP, + /* 50 */ SK_ANIM_HUDDLE_WITH_FAIRIES, + /* 51 */ SK_ANIM_SEARCH_MASK_SALESMAN, + /* 52 */ SK_ANIM_HOLD_UP_MASK_START, + /* 53 */ SK_ANIM_HOLD_UP_MASK_LOOP, + /* 54 */ SK_ANIM_SHIVER, + /* 55 */ SK_ANIM_DRAW, + /* 56 */ SK_ANIM_BENT_OVER_LOOK_UP, + /* 57 */ SK_ANIM_SPANK, + /* 58 */ SK_ANIM_HIP_SHAKE_AND_JUMP, + /* 59 */ SK_ANIM_PLAY_FLUTE, + /* 60 */ SK_ANIM_CARTWHEEL, + /* 61 */ SK_ANIM_LIE_FLAT, + /* 62 */ SK_ANIM_DANGLE_FROM_MASK_START, + /* 63 */ SK_ANIM_DANGLE_FROM_MASK_LOOP, + /* 64 */ SK_ANIM_DROPPED_FROM_MASK, + /* 65 */ SK_ANIM_LOOK_UP_AT_GIANTS, + /* 66 */ SK_ANIM_ASHAMED_START, + /* 67 */ SK_ANIM_ASHAMED_LOOP, + /* 68 */ SK_ANIM_LOOK_LEFT_START, + /* 69 */ SK_ANIM_LOOK_LEFT_LOOP, + /* 70 */ SK_ANIM_SNIFF, + /* 71 */ SK_ANIM_LAUGH_AFTER_SNIFF, +} SkullKidAnimation; typedef enum { /* 0 */ SK_MASK_TYPE_NO_MASK, @@ -219,7 +219,7 @@ static DamageTable sDamageTable = { /* Powder Keg */ DMG_ENTRY(1, 0xF), }; -static AnimationInfo sAnimations[] = { +static AnimationInfo sAnimationInfo[] = { { &gSkullKidShakeHeadAnim, 1.0f, 0.0f, -1.0f, ANIMMODE_LOOP, 0.0f }, { &gSkullKidWalkAnim, 1.0f, 0.0f, -1.0f, ANIMMODE_LOOP, 0.0f }, { &gSkullKidLookAroundAnim, 1.0f, 0.0f, -1.0f, ANIMMODE_ONCE, 0.0f }, @@ -300,13 +300,11 @@ static AnimationInfo sAnimations[] = { void DmStk_LoadObjectForAnimation(DmStk* this, PlayState* play) { s32 objectIndex; - if (((this->animIndex >= SK_ANIMATION_SHAKE_HEAD) && (this->animIndex <= SK_ANIMATION_BENT_OVER_HEAD_TWITCH)) || - (this->animIndex == SK_ANIMATION_CALL_DOWN_MOON_START) || - (this->animIndex == SK_ANIMATION_CALL_DOWN_MOON_LOOP) || - (this->animIndex == SK_ANIMATION_TELESCOPE_LOOK_UP_START) || - (this->animIndex == SK_ANIMATION_TELESCOPE_LOOK_UP_LOOP)) { + if (((this->animIndex >= SK_ANIM_SHAKE_HEAD) && (this->animIndex <= SK_ANIM_BENT_OVER_HEAD_TWITCH)) || + (this->animIndex == SK_ANIM_CALL_DOWN_MOON_START) || (this->animIndex == SK_ANIM_CALL_DOWN_MOON_LOOP) || + (this->animIndex == SK_ANIM_TELESCOPE_LOOK_UP_START) || (this->animIndex == SK_ANIM_TELESCOPE_LOOK_UP_LOOP)) { objectIndex = this->objectStkObjectIndex; - } else if (this->animIndex >= SK_ANIMATION_LOOK_UP_AT_GIANTS) { + } else if (this->animIndex >= SK_ANIM_LOOK_UP_AT_GIANTS) { objectIndex = this->objectStk3ObjectIndex; } else { objectIndex = this->objectStk2ObjectIndex; @@ -320,16 +318,16 @@ void DmStk_LoadObjectForAnimation(DmStk* this, PlayState* play) { /** * This function is always called with unusedExtraOffset = 0. */ -void DmStk_ChangeAnimation(DmStk* this, PlayState* play, SkelAnime* skelAnime, AnimationInfo* animation, - u16 unusedExtraOffset) { +void DmStk_ChangeAnim(DmStk* this, PlayState* play, SkelAnime* skelAnime, AnimationInfo* animationInfo, + u16 unusedExtraOffset) { DmStk_LoadObjectForAnimation(this, play); - animation += unusedExtraOffset; + animationInfo += unusedExtraOffset; - Animation_Change(skelAnime, animation->animation, animation->playSpeed, animation->startFrame, - (animation->frameCount < 0.0f) ? Animation_GetLastFrame(&animation->animation->common) - : animation->frameCount, - animation->mode, animation->morphFrames); + Animation_Change(skelAnime, animationInfo->animation, animationInfo->playSpeed, animationInfo->startFrame, + (animationInfo->frameCount < 0.0f) ? Animation_GetLastFrame(animationInfo->animation) + : animationInfo->frameCount, + animationInfo->mode, animationInfo->morphFrames); } /** @@ -530,7 +528,7 @@ void DmStk_PlaySfxForCurseCutsceneSecondPart(DmStk* this, PlayState* play) { break; case 365: - func_801A0654(&this->actor.projectedPos, NA_SE_EN_STALKIDS_FLOAT, 0); + AudioSfx_SetChannelIO(&this->actor.projectedPos, NA_SE_EN_STALKIDS_FLOAT, 0); break; case 650: @@ -596,7 +594,7 @@ void DmStk_PlaySfxForClockTowerIntroCutsceneVersion1(DmStk* this, PlayState* pla break; } - if ((this->animIndex == SK_ANIMATION_OCARINA_JUGGLE) && (play->csCtx.frames < 700)) { + if ((this->animIndex == SK_ANIM_OCARINA_JUGGLE) && (play->csCtx.frames < 700)) { if (Animation_OnFrame(&this->skelAnime, 5.0f) || Animation_OnFrame(&this->skelAnime, 25.0f)) { Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_STALKIDS_OTEDAMA1); } else if (Animation_OnFrame(&this->skelAnime, 17.0f) || Animation_OnFrame(&this->skelAnime, 40.0f)) { @@ -730,11 +728,12 @@ void DmStk_PlaySfxForEndingCutsceneSecondPart(DmStk* this, PlayState* play) { break; case 2000: - Audio_SetSfxBanksMute(0x7F); + AudioSfx_MuteBanks((1 << BANK_PLAYER) | (1 << BANK_ITEM) | (1 << BANK_ENV) | (1 << BANK_ENEMY) | + (1 << BANK_SYSTEM) | (1 << BANK_OCARINA) | (1 << BANK_VOICE)); break; } - if (this->animIndex == SK_ANIMATION_SHAKE_HEAD) { + if (this->animIndex == SK_ANIM_SHAKE_HEAD) { if (Animation_OnFrame(&this->skelAnime, 8.0f) || Animation_OnFrame(&this->skelAnime, 17.0f)) { Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_STALKIDS_MASK_OFF); } @@ -742,12 +741,12 @@ void DmStk_PlaySfxForEndingCutsceneSecondPart(DmStk* this, PlayState* play) { if (Animation_OnFrame(&this->skelAnime, 28.0f)) { Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_STALKIDS_RIDE); } - } else if (this->animIndex == SK_ANIMATION_LAUGH_AFTER_SNIFF) { + } else if (this->animIndex == SK_ANIM_LAUGH_AFTER_SNIFF) { if (Animation_OnFrame(&this->skelAnime, 2.0f) || Animation_OnFrame(&this->skelAnime, 6.0f) || Animation_OnFrame(&this->skelAnime, 12.0f) || Animation_OnFrame(&this->skelAnime, 18.0f)) { Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_STALKIDS_MASK_OFF); } - } else if ((this->animIndex == SK_ANIMATION_SNIFF) && + } else if ((this->animIndex == SK_ANIM_SNIFF) && (Animation_OnFrame(&this->skelAnime, 16.0f) || Animation_OnFrame(&this->skelAnime, 23.0f))) { Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_STALKIDS_NOSE); } @@ -983,20 +982,20 @@ void DmStk_PlaySfxForCutscenes(DmStk* this, PlayState* play) { } } - if (this->animIndex == SK_ANIMATION_WALK) { + if (this->animIndex == SK_ANIM_WALK) { if (Animation_OnFrame(&this->skelAnime, 2.0f) || Animation_OnFrame(&this->skelAnime, 6.0f)) { Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_STALKIDS_WALK); } - } else if (this->animIndex == SK_ANIMATION_SEARCH_LINK) { + } else if (this->animIndex == SK_ANIM_SEARCH_LINK) { if (Animation_OnFrame(&this->skelAnime, 0.0f) || Animation_OnFrame(&this->skelAnime, 13.0f) || Animation_OnFrame(&this->skelAnime, 20.0f) || Animation_OnFrame(&this->skelAnime, 27.0f)) { Actor_PlaySfxAtPos(&this->actor, NA_SE_PL_CALM_HIT); } - } else if (this->animIndex == SK_ANIMATION_PICK_UP_OCARINA_AND_START_PLAYING) { + } else if (this->animIndex == SK_ANIM_PICK_UP_OCARINA_AND_START_PLAYING) { if (Animation_OnFrame(&this->skelAnime, 3.0f)) { Actor_PlaySfxAtPos(&this->actor, NA_SE_PL_PUT_OUT_ITEM); } - } else if (this->animIndex == SK_ANIMATION_PLAY_OCARINA_AND_LAUGH) { + } else if (this->animIndex == SK_ANIM_PLAY_OCARINA_AND_LAUGH) { if (Animation_OnFrame(&this->skelAnime, 14.0f)) { Actor_PlaySfxAtPos(&this->actor, NA_SE_EV_UNSKILLFUL_OCARINA); } @@ -1024,7 +1023,7 @@ void DmStk_Init(Actor* thisx, PlayState* play) { this->tatlMessageTimer = 0; this->deflectCount = 0; this->maskType = SK_MASK_TYPE_NORMAL; - this->animIndex = SK_ANIMATION_IDLE; + this->animIndex = SK_ANIM_IDLE; this->fogR = play->lightCtx.unk7; this->fogG = play->lightCtx.unk8; this->fogB = play->lightCtx.unk9; @@ -1044,7 +1043,7 @@ void DmStk_Init(Actor* thisx, PlayState* play) { Collider_InitCylinder(play, &this->collider); - if (gSaveContext.save.entranceIndex == 0x2C00) { + if (gSaveContext.save.entrance == ENTRANCE(CLOCK_TOWER_ROOFTOP, 0)) { if (gSaveContext.sceneSetupIndex == 0) { if (gSaveContext.timerState[TIMER_ID_3] == TIMER_STATE_OFF) { // Starts a 5 minute (300 second) timer until the moon falls. @@ -1062,7 +1061,7 @@ void DmStk_Init(Actor* thisx, PlayState* play) { } } else if (gSaveContext.sceneSetupIndex == 3) { - this->animIndex = SK_ANIMATION_FLOATING_ARMS_CROSSED; + this->animIndex = SK_ANIM_FLOATING_ARMS_CROSSED; if (gSaveContext.timerState[TIMER_ID_3] == TIMER_STATE_OFF) { // This code is called when the Giants fail to stop the moon. // Starts a 1 minute (60 second) timer until the moon falls. @@ -1075,12 +1074,12 @@ void DmStk_Init(Actor* thisx, PlayState* play) { sCylinderInit.base.colType = COLTYPE_WOOD; this->actionFunc = DmStk_ClockTower_Idle; } else { - this->animIndex = SK_ANIMATION_FLOATING_ARMS_CROSSED; + this->animIndex = SK_ANIM_FLOATING_ARMS_CROSSED; this->actionFunc = DmStk_ClockTower_DoNothing; } } else { this->dekuPipesCutsceneState = SK_DEKU_PIPES_CS_STATE_READY; - this->animIndex = SK_ANIMATION_FLOATING_ARMS_CROSSED; + this->animIndex = SK_ANIM_FLOATING_ARMS_CROSSED; this->actor.world.pos.y = 120.0f; sCylinderInit.base.colType = COLTYPE_WOOD; this->actionFunc = DmStk_ClockTower_Idle; @@ -1099,7 +1098,7 @@ void DmStk_Init(Actor* thisx, PlayState* play) { this->fogN = 996; this->fogF = 1000; this->fogScale = 0.7f; - this->animIndex = SK_ANIMATION_BENT_OVER_HEAD_TWITCH; + this->animIndex = SK_ANIM_BENT_OVER_HEAD_TWITCH; this->actionFunc = DmStk_WaitForTelescope; } else { if ((play->sceneNum == SCENE_LOST_WOODS) && !Cutscene_IsPlaying(play)) { @@ -1123,7 +1122,7 @@ void DmStk_Init(Actor* thisx, PlayState* play) { this->csAction = 99; ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 24.0f); SkelAnime_InitFlex(play, &this->skelAnime, &gSkullKidSkel, NULL, NULL, NULL, 0); - DmStk_ChangeAnimation(this, play, &this->skelAnime, &sAnimations[this->animIndex], 0); + DmStk_ChangeAnim(this, play, &this->skelAnime, &sAnimationInfo[this->animIndex], 0); } Actor_SetScale(&this->actor, 0.01f); @@ -1201,9 +1200,9 @@ void DmStk_ClockTower_StartIntroCutsceneVersion1(DmStk* this, PlayState* play) { void DmStk_ClockTower_WaitForIntroCutsceneVersion1ToEnd(DmStk* this, PlayState* play) { if (play->csCtx.state == 0) { - this->animIndex = SK_ANIMATION_CALL_DOWN_MOON_LOOP; + this->animIndex = SK_ANIM_CALL_DOWN_MOON_LOOP; this->handType = SK_HAND_TYPE_HOLDING_OCARINA; - DmStk_ChangeAnimation(this, play, &this->skelAnime, &sAnimations[this->animIndex], 0); + DmStk_ChangeAnim(this, play, &this->skelAnime, &sAnimationInfo[this->animIndex], 0); this->actionFunc = DmStk_ClockTower_IdleWithOcarina; } } @@ -1219,8 +1218,8 @@ void DmStk_ClockTower_StartIntroCutsceneVersion2(DmStk* this, PlayState* play) { void DmStk_ClockTower_WaitForIntroCutsceneVersion2ToEnd(DmStk* this, PlayState* play) { if (play->csCtx.state == 0) { - this->animIndex = SK_ANIMATION_FLOATING_ARMS_CROSSED; - DmStk_ChangeAnimation(this, play, &this->skelAnime, &sAnimations[this->animIndex], 0); + this->animIndex = SK_ANIM_FLOATING_ARMS_CROSSED; + DmStk_ChangeAnim(this, play, &this->skelAnime, &sAnimationInfo[this->animIndex], 0); this->actionFunc = DmStk_ClockTower_Idle; } } @@ -1280,8 +1279,8 @@ void DmStk_ClockTower_DeflectHit(DmStk* this, PlayState* play) { } } - this->animIndex = SK_ANIMATION_DEFLECT_ATTACK; - DmStk_ChangeAnimation(this, play, &this->skelAnime, &sAnimations[this->animIndex], 0); + this->animIndex = SK_ANIM_DEFLECT_ATTACK; + DmStk_ChangeAnim(this, play, &this->skelAnime, &sAnimationInfo[this->animIndex], 0); Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_STALKIDS_DOWN_K); this->actionFunc = DmStk_ClockTower_WaitForDeflectionToEnd; } @@ -1293,8 +1292,8 @@ void DmStk_ClockTower_DeflectHit(DmStk* this, PlayState* play) { void DmStk_ClockTower_WaitForDeflectionToEnd(DmStk* this, PlayState* play) { DmStk_ClockTower_AdjustHeightAndRotation(this, play); if (Animation_OnFrame(&this->skelAnime, this->skelAnime.endFrame)) { - this->animIndex = SK_ANIMATION_FLOATING_ARMS_CROSSED; - DmStk_ChangeAnimation(this, play, &this->skelAnime, &sAnimations[this->animIndex], 0); + this->animIndex = SK_ANIM_FLOATING_ARMS_CROSSED; + DmStk_ChangeAnim(this, play, &this->skelAnime, &sAnimationInfo[this->animIndex], 0); this->actionFunc = DmStk_ClockTower_Idle; } @@ -1326,96 +1325,96 @@ void DmStk_UpdateCutscenes(DmStk* this, PlayState* play) { switch (play->csCtx.actorActions[actorActionIndex]->action) { case 0: case 1: - this->animIndex = SK_ANIMATION_IDLE; + this->animIndex = SK_ANIM_IDLE; break; case 2: - this->animIndex = SK_ANIMATION_WALK; + this->animIndex = SK_ANIM_WALK; break; case 3: - this->animIndex = SK_ANIMATION_UNUSED_KICK_OVER_LINK; + this->animIndex = SK_ANIM_UNUSED_KICK_OVER_LINK; break; case 4: - this->animIndex = SK_ANIMATION_KICK_OVER_LINK; + this->animIndex = SK_ANIM_KICK_OVER_LINK; break; case 6: - this->animIndex = SK_ANIMATION_PICK_UP_OCARINA; + this->animIndex = SK_ANIM_PICK_UP_OCARINA; this->handType = SK_HAND_TYPE_HOLDING_OCARINA; break; case 7: - this->animIndex = SK_ANIMATION_PICK_UP_OCARINA_AND_START_PLAYING; + this->animIndex = SK_ANIM_PICK_UP_OCARINA_AND_START_PLAYING; this->handType = SK_HAND_TYPE_HOLDING_OCARINA; break; case 8: - this->animIndex = SK_ANIMATION_SHAKE_HEAD; + this->animIndex = SK_ANIM_SHAKE_HEAD; break; case 9: - this->animIndex = SK_ANIMATION_IDLE; + this->animIndex = SK_ANIM_IDLE; this->fadeInState = SK_FADE_IN_STATE_START; break; case 12: - this->animIndex = SK_ANIMATION_HIDE_OCARINA_START; + this->animIndex = SK_ANIM_HIDE_OCARINA_START; this->handType = SK_HAND_TYPE_HOLDING_OCARINA; break; case 13: - this->animIndex = SK_ANIMATION_JUMP_WHILE_HIDING_OCARINA; + this->animIndex = SK_ANIM_JUMP_WHILE_HIDING_OCARINA; this->handType = SK_HAND_TYPE_HOLDING_OCARINA; break; case 14: - this->animIndex = SK_ANIMATION_HORSE_RIDE_START; + this->animIndex = SK_ANIM_HORSE_RIDE_START; break; case 15: - this->animIndex = SK_ANIMATION_HORSE_RIDE_LOOP; + this->animIndex = SK_ANIM_HORSE_RIDE_LOOP; break; case 16: - this->animIndex = SK_ANIMATION_HORSE_RIDE_AND_ROTATE; + this->animIndex = SK_ANIM_HORSE_RIDE_AND_ROTATE; break; case 17: - this->animIndex = SK_ANIMATION_RECLINING_FLOAT; + this->animIndex = SK_ANIM_RECLINING_FLOAT; break; case 18: - this->animIndex = SK_ANIMATION_CURSE_START; + this->animIndex = SK_ANIM_CURSE_START; break; case 19: - this->animIndex = SK_ANIMATION_LAUGH_START; + this->animIndex = SK_ANIM_LAUGH_START; break; case 20: - this->animIndex = SK_ANIMATION_RAISE_MASK_START; + this->animIndex = SK_ANIM_RAISE_MASK_START; break; case 21: - this->animIndex = SK_ANIMATION_LOWER_MASK; + this->animIndex = SK_ANIM_LOWER_MASK; break; case 22: - this->animIndex = SK_ANIMATION_PLAY_OCARINA_WHILE_FLOATING; + this->animIndex = SK_ANIM_PLAY_OCARINA_WHILE_FLOATING; if (gSaveContext.save.inventory.items[SLOT_OCARINA] == ITEM_NONE) { this->handType = SK_HAND_TYPE_HOLDING_OCARINA; } break; case 23: - this->animIndex = SK_ANIMATION_FLOATING_TURN_AROUND; + this->animIndex = SK_ANIM_FLOATING_TURN_AROUND; this->handType = SK_HAND_TYPE_JUGGLING_OR_DROPPING_OCARINA; break; case 24: - this->animIndex = SK_ANIMATION_CALL_DOWN_MOON_START; + this->animIndex = SK_ANIM_CALL_DOWN_MOON_START; if (gSaveContext.save.inventory.items[SLOT_OCARINA] == ITEM_NONE) { this->handType = SK_HAND_TYPE_HOLDING_OCARINA; } @@ -1426,148 +1425,148 @@ void DmStk_UpdateCutscenes(DmStk* this, PlayState* play) { break; case 26: - this->animIndex = SK_ANIMATION_SMACK_FAIRY_START; + this->animIndex = SK_ANIM_SMACK_FAIRY_START; if (gSaveContext.save.inventory.items[SLOT_OCARINA] == ITEM_NONE) { this->handType = SK_HAND_TYPE_HOLDING_OCARINA; } break; case 27: - this->animIndex = SK_ANIMATION_HIT_BY_BUBBLE; + this->animIndex = SK_ANIM_HIT_BY_BUBBLE; if (gSaveContext.save.inventory.items[SLOT_OCARINA] == ITEM_NONE) { this->handType = SK_HAND_TYPE_HOLDING_OCARINA; } break; case 28: - this->animIndex = SK_ANIMATION_DROP_OCARINA; + this->animIndex = SK_ANIM_DROP_OCARINA; this->handType = SK_HAND_TYPE_JUGGLING_OR_DROPPING_OCARINA; break; case 30: - this->animIndex = SK_ANIMATION_FLOATING_ARMS_CROSSED; + this->animIndex = SK_ANIM_FLOATING_ARMS_CROSSED; break; case 31: - this->animIndex = SK_ANIMATION_DEFLECT_ATTACK; + this->animIndex = SK_ANIM_DEFLECT_ATTACK; break; case 32: - this->animIndex = SK_ANIMATION_SURPRISE_START; + this->animIndex = SK_ANIM_SURPRISE_START; break; case 33: - this->animIndex = SK_ANIMATION_LOOK_AROUND_FOR_GIANTS_START; + this->animIndex = SK_ANIM_LOOK_AROUND_FOR_GIANTS_START; break; case 34: - this->animIndex = SK_ANIMATION_HOLD_HEAD_AND_SHAKE_START; + this->animIndex = SK_ANIM_HOLD_HEAD_AND_SHAKE_START; break; case 35: - this->animIndex = SK_ANIMATION_HOLD_HEAD_AND_SCREAM_START; + this->animIndex = SK_ANIM_HOLD_HEAD_AND_SCREAM_START; break; case 36: - this->animIndex = SK_ANIMATION_HUDDLE_WITH_FAIRIES; + this->animIndex = SK_ANIM_HUDDLE_WITH_FAIRIES; break; case 37: - this->animIndex = SK_ANIMATION_SEARCH_MASK_SALESMAN; + this->animIndex = SK_ANIM_SEARCH_MASK_SALESMAN; break; case 38: - this->animIndex = SK_ANIMATION_HOLD_UP_MASK_START; + this->animIndex = SK_ANIM_HOLD_UP_MASK_START; break; case 39: - this->animIndex = SK_ANIMATION_SHIVER; + this->animIndex = SK_ANIM_SHIVER; break; case 40: - this->animIndex = SK_ANIMATION_DRAW; + this->animIndex = SK_ANIM_DRAW; break; case 41: - this->animIndex = SK_ANIMATION_TELESCOPE_LOOK_UP_START; + this->animIndex = SK_ANIM_TELESCOPE_LOOK_UP_START; break; case 42: - this->animIndex = SK_ANIMATION_BENT_OVER_HEAD_TWITCH; + this->animIndex = SK_ANIM_BENT_OVER_HEAD_TWITCH; break; case 43: - this->animIndex = SK_ANIMATION_BENT_OVER_LOOK_UP; + this->animIndex = SK_ANIM_BENT_OVER_LOOK_UP; break; case 44: - this->animIndex = SK_ANIMATION_SPANK; + this->animIndex = SK_ANIM_SPANK; break; case 45: - this->animIndex = SK_ANIMATION_HIP_SHAKE_AND_JUMP; + this->animIndex = SK_ANIM_HIP_SHAKE_AND_JUMP; this->fadeOutState = SK_FADE_OUT_STATE_FADING_OUT; break; case 46: this->handType = SK_HAND_TYPE_HOLDING_FLUTE; - this->animIndex = SK_ANIMATION_PLAY_FLUTE; + this->animIndex = SK_ANIM_PLAY_FLUTE; break; case 47: - this->animIndex = SK_ANIMATION_CARTWHEEL; + this->animIndex = SK_ANIM_CARTWHEEL; break; case 48: - this->animIndex = SK_ANIMATION_CARTWHEEL; + this->animIndex = SK_ANIM_CARTWHEEL; break; case 49: - this->animIndex = SK_ANIMATION_LOOK_UP_AT_GIANTS; + this->animIndex = SK_ANIM_LOOK_UP_AT_GIANTS; break; case 50: - this->animIndex = SK_ANIMATION_ASHAMED_START; + this->animIndex = SK_ANIM_ASHAMED_START; break; case 51: - this->animIndex = SK_ANIMATION_LOOK_LEFT_START; + this->animIndex = SK_ANIM_LOOK_LEFT_START; break; case 52: - this->animIndex = SK_ANIMATION_SNIFF; + this->animIndex = SK_ANIM_SNIFF; break; case 53: - this->animIndex = SK_ANIMATION_CARTWHEEL; + this->animIndex = SK_ANIM_CARTWHEEL; break; case 54: - this->animIndex = SK_ANIMATION_LIE_FLAT; + this->animIndex = SK_ANIM_LIE_FLAT; break; case 55: - this->animIndex = SK_ANIMATION_DANGLE_FROM_MASK_START; + this->animIndex = SK_ANIM_DANGLE_FROM_MASK_START; break; case 56: - this->animIndex = SK_ANIMATION_DROPPED_FROM_MASK; + this->animIndex = SK_ANIM_DROPPED_FROM_MASK; break; case 57: - this->animIndex = SK_ANIMATION_LOOK_UP_AT_GIANTS; + this->animIndex = SK_ANIM_LOOK_UP_AT_GIANTS; break; case 58: - this->animIndex = SK_ANIMATION_ASHAMED_START; + this->animIndex = SK_ANIM_ASHAMED_START; break; case 59: - this->animIndex = SK_ANIMATION_LOOK_LEFT_START; + this->animIndex = SK_ANIM_LOOK_LEFT_START; break; case 60: - this->animIndex = SK_ANIMATION_SNIFF; + this->animIndex = SK_ANIM_SNIFF; break; case 5: @@ -1575,11 +1574,11 @@ void DmStk_UpdateCutscenes(DmStk* this, PlayState* play) { break; default: - this->animIndex = SK_ANIMATION_SHAKE_HEAD; + this->animIndex = SK_ANIM_SHAKE_HEAD; break; } - DmStk_ChangeAnimation(this, play, &this->skelAnime, &sAnimations[this->animIndex], 0); + DmStk_ChangeAnim(this, play, &this->skelAnime, &sAnimationInfo[this->animIndex], 0); } } @@ -1644,57 +1643,56 @@ void DmStk_UpdateCutscenes(DmStk* this, PlayState* play) { if (Animation_OnFrame(&this->skelAnime, this->skelAnime.endFrame)) { switch (this->animIndex) { - case SK_ANIMATION_LOOK_AROUND: - case SK_ANIMATION_CURSE_START: - case SK_ANIMATION_LAUGH_START: - case SK_ANIMATION_HIDE_OCARINA_START: - case SK_ANIMATION_PICK_UP_OCARINA_AND_START_PLAYING: - case SK_ANIMATION_PICK_UP_OCARINA: - case SK_ANIMATION_KICK_OVER_LINK: - case SK_ANIMATION_UNUSED_KICK_OVER_LINK: - case SK_ANIMATION_HORSE_RIDE_START: - case SK_ANIMATION_RAISE_MASK_START: - case SK_ANIMATION_FLOATING_TURN_AROUND: - case SK_ANIMATION_CALL_DOWN_MOON_START: - case SK_ANIMATION_SMACK_FAIRY_START: - case SK_ANIMATION_TELESCOPE_LOOK_UP_START: - case SK_ANIMATION_SURPRISE_START: - case SK_ANIMATION_LOOK_AROUND_FOR_GIANTS_START: - case SK_ANIMATION_HOLD_HEAD_AND_SHAKE_START: - case SK_ANIMATION_HOLD_HEAD_AND_SCREAM_START: - case SK_ANIMATION_HOLD_UP_MASK_START: - case SK_ANIMATION_DANGLE_FROM_MASK_START: - case SK_ANIMATION_ASHAMED_START: - case SK_ANIMATION_LOOK_LEFT_START: - case SK_ANIMATION_SNIFF: + case SK_ANIM_LOOK_AROUND: + case SK_ANIM_CURSE_START: + case SK_ANIM_LAUGH_START: + case SK_ANIM_HIDE_OCARINA_START: + case SK_ANIM_PICK_UP_OCARINA_AND_START_PLAYING: + case SK_ANIM_PICK_UP_OCARINA: + case SK_ANIM_KICK_OVER_LINK: + case SK_ANIM_UNUSED_KICK_OVER_LINK: + case SK_ANIM_HORSE_RIDE_START: + case SK_ANIM_RAISE_MASK_START: + case SK_ANIM_FLOATING_TURN_AROUND: + case SK_ANIM_CALL_DOWN_MOON_START: + case SK_ANIM_SMACK_FAIRY_START: + case SK_ANIM_TELESCOPE_LOOK_UP_START: + case SK_ANIM_SURPRISE_START: + case SK_ANIM_LOOK_AROUND_FOR_GIANTS_START: + case SK_ANIM_HOLD_HEAD_AND_SHAKE_START: + case SK_ANIM_HOLD_HEAD_AND_SCREAM_START: + case SK_ANIM_HOLD_UP_MASK_START: + case SK_ANIM_DANGLE_FROM_MASK_START: + case SK_ANIM_ASHAMED_START: + case SK_ANIM_LOOK_LEFT_START: + case SK_ANIM_SNIFF: this->animIndex++; - DmStk_ChangeAnimation(this, play, &this->skelAnime, &sAnimations[this->animIndex], 0); + DmStk_ChangeAnim(this, play, &this->skelAnime, &sAnimationInfo[this->animIndex], 0); break; - case SK_ANIMATION_LOWER_MASK: - this->animIndex = SK_ANIMATION_IDLE; + case SK_ANIM_LOWER_MASK: + this->animIndex = SK_ANIM_IDLE; this->maskType = SK_MASK_TYPE_NORMAL; this->handType = SK_HAND_TYPE_DEFAULT; - DmStk_ChangeAnimation(this, play, &this->skelAnime, &sAnimations[this->animIndex], 0); + DmStk_ChangeAnim(this, play, &this->skelAnime, &sAnimationInfo[this->animIndex], 0); break; } } - if (((this->animIndex == SK_ANIMATION_RAISE_MASK_START) && (this->skelAnime.curFrame >= 16.0f)) || - (this->animIndex == SK_ANIMATION_RAISE_MASK_LOOP) || (this->animIndex == SK_ANIMATION_LOWER_MASK)) { + if (((this->animIndex == SK_ANIM_RAISE_MASK_START) && (this->skelAnime.curFrame >= 16.0f)) || + (this->animIndex == SK_ANIM_RAISE_MASK_LOOP) || (this->animIndex == SK_ANIM_LOWER_MASK)) { this->maskType = SK_MASK_TYPE_RAISED; this->handType = SK_HAND_TYPE_HOLDING_MAJORAS_MASK; - } else if (((this->animIndex >= SK_ANIMATION_HUDDLE_WITH_FAIRIES) && (this->animIndex <= SK_ANIMATION_DRAW)) || - ((this->animIndex >= SK_ANIMATION_PLAY_FLUTE) && (this->animIndex <= SK_ANIMATION_CARTWHEEL)) || + } else if (((this->animIndex >= SK_ANIM_HUDDLE_WITH_FAIRIES) && (this->animIndex <= SK_ANIM_DRAW)) || + ((this->animIndex >= SK_ANIM_PLAY_FLUTE) && (this->animIndex <= SK_ANIM_CARTWHEEL)) || ((play->sceneNum == SCENE_00KEIKOKU) && (gSaveContext.sceneSetupIndex == 7))) { this->maskType = SK_MASK_TYPE_NO_MASK; - if ((this->animIndex == SK_ANIMATION_HOLD_UP_MASK_START) || - (this->animIndex == SK_ANIMATION_HOLD_UP_MASK_LOOP)) { + if ((this->animIndex == SK_ANIM_HOLD_UP_MASK_START) || (this->animIndex == SK_ANIM_HOLD_UP_MASK_LOOP)) { this->handType = SK_HAND_TYPE_HOLDING_MAJORAS_MASK_AND_FLUTE; } } - if (this->animIndex == SK_ANIMATION_DROPPED_FROM_MASK) { + if (this->animIndex == SK_ANIM_DROPPED_FROM_MASK) { this->maskType = SK_MASK_TYPE_NO_MASK; } } @@ -1746,7 +1744,7 @@ void DmStk_ClockTower_Idle(DmStk* this, PlayState* play) { DmStk_ClockTower_AdjustHeightAndRotation(this, play); this->actor.flags |= ACTOR_FLAG_1; - if (this->animIndex == SK_ANIMATION_CALL_DOWN_MOON_LOOP) { + if (this->animIndex == SK_ANIM_CALL_DOWN_MOON_LOOP) { this->actor.targetArrowOffset = 3100.0f; } else { this->actor.targetArrowOffset = 200.0f; @@ -1763,7 +1761,7 @@ void DmStk_Update(Actor* thisx, PlayState* play) { DmStk* this = THIS; if (DM_STK_GET_TYPE(&this->actor) != DM_STK_TYPE_MAJORAS_MASK) { - if (this->animIndex == SK_ANIMATION_CALL_DOWN_MOON_LOOP) { + if (this->animIndex == SK_ANIM_CALL_DOWN_MOON_LOOP) { Actor_SetFocus(&this->actor, 40.0f); } else { Actor_SetFocus(&this->actor, 6.0f); @@ -1771,7 +1769,7 @@ void DmStk_Update(Actor* thisx, PlayState* play) { DmStk_LoadObjectForAnimation(this, play); - if (this->animIndex != SK_ANIMATION_LIE_FLAT) { + if (this->animIndex != SK_ANIM_LIE_FLAT) { SkelAnime_Update(&this->skelAnime); } @@ -1875,8 +1873,8 @@ void DmStk_PostLimbDraw2(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(play->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - if ((this->animIndex == SK_ANIMATION_LOOK_LEFT_LOOP) || (this->animIndex == SK_ANIMATION_LAUGH_LOOP) || - (this->animIndex == SK_ANIMATION_LAUGH_AFTER_SNIFF)) { + if ((this->animIndex == SK_ANIM_LOOK_LEFT_LOOP) || (this->animIndex == SK_ANIM_LAUGH_LOOP) || + (this->animIndex == SK_ANIM_LAUGH_AFTER_SNIFF)) { gSPDisplayList(POLY_OPA_DISP++, gSkullKidLaughingHeadDL); gSPDisplayList(POLY_OPA_DISP++, gSkullKidLaughingEyesDL); } else { diff --git a/src/overlays/actors/ovl_Dm_Zl/z_dm_zl.c b/src/overlays/actors/ovl_Dm_Zl/z_dm_zl.c index 57ef38bf6..47706cb9f 100644 --- a/src/overlays/actors/ovl_Dm_Zl/z_dm_zl.c +++ b/src/overlays/actors/ovl_Dm_Zl/z_dm_zl.c @@ -29,7 +29,7 @@ const ActorInit Dm_Zl_InitVars = { (ActorFunc)DmZl_Draw, }; -static AnimationInfo sAnimations[] = { +static AnimationInfo sAnimationInfo[] = { { &gDmZl4FacingAwayHandsOverEmblemLoop, 1.0f, 0.0f, -1.0f, ANIMMODE_LOOP, -10.0f }, { &gDmZl4TurningAround2Anim, 1.0f, 0.0f, -1.0f, ANIMMODE_ONCE, -10.0f }, { &gDmZl4HandsOverEmblemLoopAnim, 1.0f, 0.0f, -1.0f, ANIMMODE_LOOP, -10.0f }, @@ -48,7 +48,7 @@ typedef enum { /* 5 */ ZELDA_ANIM_PLAYING_OCARINA_START, /* 6 */ ZELDA_ANIM_PLAYING_OCARINA, /* 7 */ ZELDA_ANIM_MAX, -} DmZlAnimations; +} DmZlAnimation; static TexturePtr sMouthTextures[] = { gZl4MouthNeutralTex, @@ -98,27 +98,28 @@ typedef enum { /** * This function is always called with unusedExtraOffset = 0. */ -void DmZl_ChangeAnimation(SkelAnime* skelAnime, AnimationInfo animation[], u16 unusedExtraOffset) { +void DmZl_ChangeAnimation(SkelAnime* skelAnime, AnimationInfo animationInfo[], u16 unusedExtraOffset) { f32 endFrame; - animation += unusedExtraOffset; - endFrame = (animation->frameCount < 0.0f) ? Animation_GetLastFrame(animation->animation) : animation->frameCount; + animationInfo += unusedExtraOffset; + endFrame = (animationInfo->frameCount < 0.0f) ? Animation_GetLastFrame(animationInfo->animation) + : animationInfo->frameCount; - Animation_Change(skelAnime, animation->animation, animation->playSpeed, animation->startFrame, endFrame, - animation->mode, animation->morphFrames); + Animation_Change(skelAnime, animationInfo->animation, animationInfo->playSpeed, animationInfo->startFrame, endFrame, + animationInfo->mode, animationInfo->morphFrames); } void DmZl_Init(Actor* thisx, PlayState* play) { s32 pad; DmZl* this = THIS; - this->animationIndex = ZELDA_ANIM_FACING_AWAY; + this->animIndex = ZELDA_ANIM_FACING_AWAY; this->unk_2BA = 0; this->actor.targetArrowOffset = 1000.0f; ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 24.0f); // these three set to NULL should mean they are dynamically allocated SkelAnime_InitFlex(play, &this->skelAnime, &gZl4Skeleton, NULL, NULL, NULL, 0); - DmZl_ChangeAnimation(&this->skelAnime, &sAnimations[this->animationIndex], 0); + DmZl_ChangeAnimation(&this->skelAnime, &sAnimationInfo[this->animIndex], 0); Actor_SetScale(&this->actor, 0.01f); this->actionFunc = DmZl_DoNothing; } @@ -135,26 +136,26 @@ void DmZl_UpdateCutscene(DmZl* this, PlayState* play) { if (Cutscene_CheckActorAction(play, 0x66)) { actionIndex = Cutscene_GetActorActionIndex(play, 0x66); if (play->csCtx.frames == play->csCtx.actorActions[actionIndex]->startFrame) { - s16 nextAnimationIndex = ZELDA_ANIM_FACING_AWAY; + s16 nextAnimIndex = ZELDA_ANIM_FACING_AWAY; switch (play->csCtx.actorActions[actionIndex]->action) { default: case 1: break; case 2: - nextAnimationIndex = ZELDA_ANIM_TURNING_TOWARD_PLAYER; + nextAnimIndex = ZELDA_ANIM_TURNING_TOWARD_PLAYER; break; case 3: - nextAnimationIndex = ZELDA_ANIM_GIVING_OCARINA_START; + nextAnimIndex = ZELDA_ANIM_GIVING_OCARINA_START; break; case 4: - nextAnimationIndex = ZELDA_ANIM_PLAYING_OCARINA_START; + nextAnimIndex = ZELDA_ANIM_PLAYING_OCARINA_START; break; } - if (nextAnimationIndex != this->animationIndex) { - this->animationIndex = nextAnimationIndex; - DmZl_ChangeAnimation(&this->skelAnime, &sAnimations[this->animationIndex], 0); + if (nextAnimIndex != this->animIndex) { + this->animIndex = nextAnimIndex; + DmZl_ChangeAnimation(&this->skelAnime, &sAnimationInfo[this->animIndex], 0); } } @@ -162,13 +163,13 @@ void DmZl_UpdateCutscene(DmZl* this, PlayState* play) { } if (Animation_OnFrame(&this->skelAnime, this->skelAnime.endFrame)) { - actionIndex = this->animationIndex; + actionIndex = this->animIndex; if ((actionIndex == ZELDA_ANIM_TURNING_TOWARD_PLAYER) || (actionIndex == ZELDA_ANIM_GIVING_OCARINA_START) || (actionIndex == ZELDA_ANIM_PLAYING_OCARINA_START)) { // these animations don't loop at the end, they lead into the next animation - this->animationIndex++; - DmZl_ChangeAnimation(&this->skelAnime, &sAnimations[this->animationIndex], 0); + this->animIndex++; + DmZl_ChangeAnimation(&this->skelAnime, &sAnimationInfo[this->animIndex], 0); } } } @@ -245,7 +246,7 @@ void DmZl_UpdateFace(DmZl* this) { break; } - if (this->animationIndex == ZELDA_ANIM_PLAYING_OCARINA) { + if (this->animIndex == ZELDA_ANIM_PLAYING_OCARINA) { this->eyeTextureIndexLeft = this->eyeTextureIndexRight = ZELDA_EYE_CLOSED; } } @@ -267,8 +268,7 @@ void DmZl_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, DmZl* this = THIS; if (limbIndex == ZL4_LIMB_RIGHT_HAND) { - if ((this->animationIndex >= ZELDA_ANIM_GIVING_OCARINA_START) && - (this->animationIndex <= ZELDA_ANIM_PLAYING_OCARINA)) { + if ((this->animIndex >= ZELDA_ANIM_GIVING_OCARINA_START) && (this->animIndex <= ZELDA_ANIM_PLAYING_OCARINA)) { OPEN_DISPS(play->state.gfxCtx); gSPDisplayList(POLY_OPA_DISP++, gDmZl4OcarinaDL); diff --git a/src/overlays/actors/ovl_Dm_Zl/z_dm_zl.h b/src/overlays/actors/ovl_Dm_Zl/z_dm_zl.h index 1d9a80166..c267d9ae9 100644 --- a/src/overlays/actors/ovl_Dm_Zl/z_dm_zl.h +++ b/src/overlays/actors/ovl_Dm_Zl/z_dm_zl.h @@ -15,7 +15,7 @@ typedef struct DmZl { /* 0x1F4 */ Vec3s morphTable[ZL4_LIMB_MAX]; /* 0x260 */ DmZlActionFunc actionFunc; /* 0x264 */ ColliderCylinder collider; // unused, assumed to be here based on OoT documentation - /* 0x2B0 */ s16 animationIndex; + /* 0x2B0 */ s16 animIndex; /* 0x2B2 */ u8 eyeTextureIndexLeft; /* 0x2B3 */ u8 eyeTextureIndexRight; /* 0x2B4 */ u8 mouthTextureIndex; diff --git a/src/overlays/actors/ovl_Door_Ana/z_door_ana.c b/src/overlays/actors/ovl_Door_Ana/z_door_ana.c index 7edb7af4d..173c3ea52 100644 --- a/src/overlays/actors/ovl_Door_Ana/z_door_ana.c +++ b/src/overlays/actors/ovl_Door_Ana/z_door_ana.c @@ -52,9 +52,10 @@ static ColliderCylinderInit sCylinderInit = { { 50, 10, 0, { 0, 0, 0 } }, }; -static u16 sEntranceIndexes[] = { - 0x1A00, 0x1400, 0x1410, 0x1420, 0x1430, 0x1440, 0x1450, 0x1460, - 0x1470, 0x1480, 0x1490, 0x14A0, 0x14B0, 0x14C0, 0x14D0, +static u16 sEntrances[] = { + ENTRANCE(UNSET_0D, 0), ENTRANCE(GROTTOS, 0), ENTRANCE(GROTTOS, 1), ENTRANCE(GROTTOS, 2), ENTRANCE(GROTTOS, 3), + ENTRANCE(GROTTOS, 4), ENTRANCE(GROTTOS, 5), ENTRANCE(GROTTOS, 6), ENTRANCE(GROTTOS, 7), ENTRANCE(GROTTOS, 8), + ENTRANCE(GROTTOS, 9), ENTRANCE(GROTTOS, 10), ENTRANCE(GROTTOS, 11), ENTRANCE(GROTTOS, 12), ENTRANCE(GROTTOS, 13), }; void DoorAna_SetupAction(DoorAna* this, DoorAnaActionFunc actionFunction) { @@ -135,7 +136,7 @@ void DoorAna_WaitOpen(DoorAna* this, PlayState* play) { if (grottoType == DOORANA_TYPE_VISIBLE_SCENE_EXIT) { s32 exitIndex = DOORANA_GET_EXIT_INDEX(&this->actor); - play->nextEntranceIndex = play->setupExitList[exitIndex]; + play->nextEntrance = play->setupExitList[exitIndex]; } else { s32 destinationIdx = DOORANA_GET_ENTRANCE(&this->actor); @@ -151,7 +152,7 @@ void DoorAna_WaitOpen(DoorAna* this, PlayState* play) { destinationIdx = DOORANA_GET_EX_ENTRANCE(&this->actor); } - play->nextEntranceIndex = sEntranceIndexes[destinationIdx]; + play->nextEntrance = sEntrances[destinationIdx]; } DoorAna_SetupAction(this, DoorAna_GrabLink); diff --git a/src/overlays/actors/ovl_Door_Warp1/z_door_warp1.c b/src/overlays/actors/ovl_Door_Warp1/z_door_warp1.c index 16f89b4d7..4204d444b 100644 --- a/src/overlays/actors/ovl_Door_Warp1/z_door_warp1.c +++ b/src/overlays/actors/ovl_Door_Warp1/z_door_warp1.c @@ -446,8 +446,8 @@ void func_808B977C(DoorWarp1* this, PlayState* play) { if (func_808B866C(this, play) && !Play_InCsMode(play)) { Player* player = GET_PLAYER(play); - Audio_PlaySfxGeneral(NA_SE_EV_LINK_WARP, &player->actor.projectedPos, 4, &D_801DB4B0, &D_801DB4B0, - &gSfxDefaultReverb); + AudioSfx_PlaySfx(NA_SE_EV_LINK_WARP, &player->actor.projectedPos, 4, &gSfxDefaultFreqAndVolScale, + &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb); func_800B7298(play, &this->dyna.actor, 9); player->unk_3A0.x = this->dyna.actor.world.pos.x; player->unk_3A0.z = this->dyna.actor.world.pos.z; @@ -485,7 +485,7 @@ void func_808B98A8(DoorWarp1* this, PlayState* play) { if ((gSaveContext.nextCutsceneIndex == 0xFFEF) && (D_808BC000 < this->unk_1D0) && (gSaveContext.nextCutsceneIndex == 0xFFEF)) { if (DOORWARP1_GET_FF00_1(&this->dyna.actor) != 0xFF) { - play->nextEntranceIndex = play->setupExitList[DOORWARP1_GET_FF00_3(&this->dyna.actor)]; + play->nextEntrance = play->setupExitList[DOORWARP1_GET_FF00_3(&this->dyna.actor)]; Scene_SetExitFade(play); play->transitionTrigger = TRANS_TRIGGER_START; } else { @@ -620,8 +620,8 @@ void func_808B9FD0(DoorWarp1* this, PlayState* play) { ActorCutscene_SetIntentToPlay(play->playerActorCsIds[9]); } else { ActorCutscene_Start(play->playerActorCsIds[9], NULL); - Audio_PlaySfxGeneral(NA_SE_EV_LINK_WARP, &player->actor.projectedPos, 4, &D_801DB4B0, &D_801DB4B0, - &gSfxDefaultReverb); + AudioSfx_PlaySfx(NA_SE_EV_LINK_WARP, &player->actor.projectedPos, 4, &gSfxDefaultFreqAndVolScale, + &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb); Animation_ChangeImpl(&this->skelAnime, &object_warp1_Anim_001374, 1.0f, Animation_GetLastFrame(&object_warp1_Anim_001374.common), Animation_GetLastFrame(&object_warp1_Anim_001374.common), 2, 40.0f, 1); @@ -700,7 +700,7 @@ void func_808BA10C(DoorWarp1* this, PlayState* play) { break; } - play->nextEntranceIndex = 0xCC00; + play->nextEntrance = ENTRANCE(GIANTS_CHAMBER, 0); if (phi_v0_3 < 10) { gSaveContext.nextCutsceneIndex = phi_v0_3 + 0xFFF0; } @@ -713,12 +713,12 @@ void func_808BA10C(DoorWarp1* this, PlayState* play) { case 0: if (gSaveContext.save.weekEventReg[20] & 2) { gSaveContext.save.weekEventReg[7] |= 0x80; - play->nextEntranceIndex = 0x3010; + play->nextEntrance = ENTRANCE(WOODFALL_TEMPLE, 1); play->transitionTrigger = TRANS_TRIGGER_START; play->transitionType = TRANS_TYPE_03; gSaveContext.nextTransitionType = TRANS_TYPE_03; } else { - play->nextEntranceIndex = 0x8600; + play->nextEntrance = ENTRANCE(WOODFALL, 0); gSaveContext.nextCutsceneIndex = 0xFFF0; play->transitionTrigger = TRANS_TRIGGER_START; play->transitionType = TRANS_TYPE_03; @@ -728,7 +728,7 @@ void func_808BA10C(DoorWarp1* this, PlayState* play) { case 1: gSaveContext.save.weekEventReg[33] |= 0x80; - play->nextEntranceIndex = 0xAE70; + play->nextEntrance = ENTRANCE(MOUNTAIN_VILLAGE_SPRING, 7); play->transitionTrigger = TRANS_TRIGGER_START; play->transitionType = TRANS_TYPE_03; gSaveContext.nextTransitionType = TRANS_TYPE_03; @@ -736,14 +736,14 @@ void func_808BA10C(DoorWarp1* this, PlayState* play) { case 3: if (gSaveContext.save.weekEventReg[55] & 0x80) { - play->nextEntranceIndex = 0x6A90; + play->nextEntrance = ENTRANCE(ZORA_CAPE, 9); gSaveContext.nextCutsceneIndex = 0xFFF0; play->transitionTrigger = TRANS_TRIGGER_START; play->transitionType = TRANS_TYPE_03; gSaveContext.nextTransitionType = TRANS_TYPE_03; } else { gSaveContext.save.weekEventReg[55] |= 0x80; - play->nextEntranceIndex = 0x6A80; + play->nextEntrance = ENTRANCE(ZORA_CAPE, 8); gSaveContext.nextCutsceneIndex = 0xFFF0; play->transitionTrigger = TRANS_TRIGGER_START; play->transitionType = TRANS_TYPE_03; @@ -753,7 +753,7 @@ void func_808BA10C(DoorWarp1* this, PlayState* play) { case 2: gSaveContext.save.weekEventReg[52] |= 0x20; - play->nextEntranceIndex = 0x20F0; + play->nextEntrance = ENTRANCE(IKANA_CANYON, 15); gSaveContext.nextCutsceneIndex = 0xFFF2; play->transitionTrigger = TRANS_TRIGGER_START; play->transitionType = TRANS_TYPE_03; @@ -765,7 +765,7 @@ void func_808BA10C(DoorWarp1* this, PlayState* play) { if (DOORWARP1_GET_FF(&this->dyna.actor) == ENDOORWARP1_FF_6) { gSaveContext.respawnFlag = ~1; } - play->nextEntranceIndex = play->setupExitList[DOORWARP1_GET_FF00_3(&this->dyna.actor)]; + play->nextEntrance = play->setupExitList[DOORWARP1_GET_FF00_3(&this->dyna.actor)]; Scene_SetExitFade(play); play->transitionTrigger = TRANS_TRIGGER_START; } else { diff --git a/src/overlays/actors/ovl_En_Ah/z_en_ah.c b/src/overlays/actors/ovl_En_Ah/z_en_ah.c index bfc6d197b..7c0dfa71c 100644 --- a/src/overlays/actors/ovl_En_Ah/z_en_ah.c +++ b/src/overlays/actors/ovl_En_Ah/z_en_ah.c @@ -81,7 +81,7 @@ static ColliderCylinderInit sCylinderInit = { static CollisionCheckInfoInit2 sColChkInfoInit = { 0, 0, 0, 0, MASS_IMMOVABLE }; -static AnimationInfoS sAnimations[] = { +static AnimationInfoS sAnimationInfo[] = { { &object_ah_Anim_001860, 1.0f, 0, -1, ANIMMODE_LOOP, 0 }, { &object_ah_Anim_001860, 1.0f, 0, -1, ANIMMODE_LOOP, -4 }, { &object_ah_Anim_002280, 1.0f, 0, -1, ANIMMODE_ONCE, 0 }, @@ -146,7 +146,7 @@ s32 func_80BD2B0C(EnAh* this, s32 arg1) { if (phi_v1) { this->unk_300 = arg1; - ret = SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimations, arg1); + ret = SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimationInfo, arg1); this->unk_2DC = this->skelAnime.playSpeed; } return ret; @@ -554,7 +554,7 @@ void EnAh_Update(Actor* thisx, PlayState* play) { radius = this->collider.dim.radius + 60; height = this->collider.dim.height + 10; - func_8013C964(&this->actor, play, radius, height, EXCH_ITEM_NONE, this->unk_2D8 & 7); + func_8013C964(&this->actor, play, radius, height, PLAYER_AP_NONE, this->unk_2D8 & 7); if (!(this->unk_2D8 & 0x10)) { Actor_MoveWithGravity(&this->actor); Actor_UpdateBgCheckInfo(play, &this->actor, 30.0f, 12.0f, 0.0f, 4); diff --git a/src/overlays/actors/ovl_En_Akindonuts/z_en_akindonuts.c b/src/overlays/actors/ovl_En_Akindonuts/z_en_akindonuts.c index faf39aece..4e7a51c97 100644 --- a/src/overlays/actors/ovl_En_Akindonuts/z_en_akindonuts.c +++ b/src/overlays/actors/ovl_En_Akindonuts/z_en_akindonuts.c @@ -62,7 +62,7 @@ static ColliderCylinderInitType1 sCylinderInit = { { 27, 32, 0, { 0, 0, 0 } }, }; -static AnimationInfoS sAnimations[] = { +static AnimationInfoS sAnimationInfo[] = { { &object_dnt_Anim_005488, 1.0f, 0, -1, ANIMMODE_LOOP, 0 }, { &object_dnt_Anim_00B0B4, 1.0f, 0, -1, ANIMMODE_LOOP, 0 }, { &object_dnt_Anim_004AA0, 1.0f, 0, -1, ANIMMODE_ONCE, 0 }, @@ -1154,7 +1154,7 @@ void func_80BEE938(EnAkindonuts* this, PlayState* play) { void func_80BEEB20(EnAkindonuts* this, PlayState* play) { s16 sp26 = this->skelAnime.curFrame; - s16 sp24 = Animation_GetLastFrame(&sAnimations[this->unk_338].animation->common); + s16 sp24 = Animation_GetLastFrame(&sAnimationInfo[this->unk_338].animation->common); s16 phi_v0; Math_ApproachS(&this->actor.shape.rot.y, this->actor.yawTowardsPlayer, 2, 0xE38); @@ -1177,7 +1177,7 @@ void func_80BEEB20(EnAkindonuts* this, PlayState* play) { this->actionFunc = func_80BEEDC0; this->unk_338 = 3; this->collider.dim.height = 64; - SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimations, 3); + SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimationInfo, 3); return; } } @@ -1187,19 +1187,19 @@ void func_80BEEB20(EnAkindonuts* this, PlayState* play) { this->unk_338 = 17; this->collider.dim.height = 0; Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_NUTS_DOWN); - SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimations, 17); + SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimationInfo, 17); } else if (this->unk_338 == 2) { this->unk_338 = 16; this->collider.dim.height = 32; Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_NUTS_UP); - SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimations, 16); + SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimationInfo, 16); } else if (this->unk_338 == 17) { phi_v0 = DECR(this->unk_33A); if (phi_v0 == 0) { this->unk_33A = Rand_ZeroOne() * 10.0f; this->unk_338 = 2; this->collider.dim.height = 32; - SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimations, 2); + SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimationInfo, 2); } } else if (this->unk_338 == 16) { phi_v0 = DECR(this->unk_33A); @@ -1207,7 +1207,7 @@ void func_80BEEB20(EnAkindonuts* this, PlayState* play) { this->unk_33A = Rand_S16Offset(40, 40); this->unk_338 = 18; this->collider.dim.height = 32; - SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimations, 18); + SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimationInfo, 18); } } } @@ -1216,7 +1216,7 @@ void func_80BEEB20(EnAkindonuts* this, PlayState* play) { void func_80BEEDC0(EnAkindonuts* this, PlayState* play) { if (this->skelAnime.curFrame == this->skelAnime.endFrame) { this->actionFunc = func_80BEEE10; - SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimations, 0); + SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimationInfo, 0); } } @@ -1234,7 +1234,7 @@ void func_80BEEE10(EnAkindonuts* this, PlayState* play) { } else if (!(((this->actor.playerHeightRel < 50.0f) && (this->actor.playerHeightRel > -50.0f)) ? true : false) || !((this->actor.xzDistToPlayer < 200.0f) ? true : false)) { this->unk_338 = 4; - SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimations, 4); + SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimationInfo, 4); this->actionFunc = func_80BEEB20; } } @@ -1258,7 +1258,7 @@ void func_80BEEFA8(EnAkindonuts* this, PlayState* play) { play->msgCtx.stateTimer = 4; this->unk_338 = 8; this->unk_33C = 0; - SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimations, this->unk_338); + SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimationInfo, this->unk_338); this->actionFunc = func_80BEF518; } else { this->unk_2DC(this, play); @@ -1296,18 +1296,18 @@ void func_80BEF18C(EnAkindonuts* this, PlayState* play) { void func_80BEF20C(EnAkindonuts* this, PlayState* play) { u8 talkState = Message_GetState(&play->msgCtx); s16 sp24 = this->skelAnime.curFrame; - s16 sp22 = Animation_GetLastFrame(&sAnimations[this->unk_338].animation->common); + s16 sp22 = Animation_GetLastFrame(&sAnimationInfo[this->unk_338].animation->common); if (this->unk_356 == 40) { this->unk_338 = 5; - SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimations, 5); + SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimationInfo, 5); } this->unk_356++; if ((sp24 == sp22) && (this->unk_338 == 5)) { this->unk_338 = 6; - SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimations, 6); + SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimationInfo, 6); } if ((talkState == TEXT_STATE_5) && Message_ShouldAdvance(play)) { @@ -1358,7 +1358,7 @@ void func_80BEF4B8(EnAkindonuts* this, PlayState* play) { void func_80BEF518(EnAkindonuts* this, PlayState* play) { s16 sp26 = this->skelAnime.curFrame; - s16 sp24 = Animation_GetLastFrame(&sAnimations[this->unk_338].animation->common); + s16 sp24 = Animation_GetLastFrame(&sAnimationInfo[this->unk_338].animation->common); switch (sp26) { case 10: @@ -1432,7 +1432,7 @@ void func_80BEF518(EnAkindonuts* this, PlayState* play) { if (sp26 == sp24) { this->unk_33E = 3; this->unk_338 = 19; - SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimations, this->unk_338); + SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimationInfo, this->unk_338); Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_NUTS_DOWN); this->unk_32C &= ~2; this->unk_32C |= 0x80; @@ -1465,7 +1465,7 @@ void func_80BEF770(EnAkindonuts* this, PlayState* play) { void func_80BEF83C(EnAkindonuts* this, PlayState* play) { Vec3f sp34; s16 sp32 = this->skelAnime.curFrame; - s16 sp30 = Animation_GetLastFrame(&sAnimations[this->unk_338].animation->common); + s16 sp30 = Animation_GetLastFrame(&sAnimationInfo[this->unk_338].animation->common); if (sp32 == sp30) { Math_SmoothStepToS(&this->unk_362, 0x1C71, 3, 0x100, 0); @@ -1491,7 +1491,7 @@ void func_80BEF83C(EnAkindonuts* this, PlayState* play) { if ((this->actor.home.pos.y + 22.5f) < this->actor.world.pos.y) { this->unk_34C = 0.3f; this->unk_338 = 9; - SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimations, this->unk_338); + SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimationInfo, this->unk_338); Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_AKINDONUTS_HIDE); this->actionFunc = func_80BEF9F0; } @@ -1510,7 +1510,7 @@ void func_80BEF9F0(EnAkindonuts* this, PlayState* play) { if ((this->actor.home.pos.y + 200.0f) < this->actor.world.pos.y) { Math_ApproachF(&this->actor.velocity.y, 0.0f, 0.2f, 1.0f); this->unk_338 = 10; - SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimations, this->unk_338); + SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimationInfo, this->unk_338); if (ENAKINDONUTS_GET_3(&this->actor) == ENAKINDONUTS_3_2) { this->unk_32C |= 0x2; } @@ -1613,7 +1613,7 @@ void EnAkindonuts_Init(Actor* thisx, PlayState* play) { } } - SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimations, 4); + SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimationInfo, 4); this->unk_32C |= 0x2; this->unk_32C |= 0x4; this->unk_338 = 4; diff --git a/src/overlays/actors/ovl_En_Al/z_en_al.c b/src/overlays/actors/ovl_En_Al/z_en_al.c index c3b893a5d..8792f8038 100644 --- a/src/overlays/actors/ovl_En_Al/z_en_al.c +++ b/src/overlays/actors/ovl_En_Al/z_en_al.c @@ -119,7 +119,7 @@ static ColliderCylinderInit sCylinderInit = { static CollisionCheckInfoInit2 sColChkInfoInit = { 0, 0, 0, 0, MASS_IMMOVABLE }; -static AnimationInfoS sAnimations[] = { +static AnimationInfoS sAnimationInfo[] = { { &object_al_Anim_000C54, 1.0f, 0, -1, 0, -4 }, { &object_al_Anim_00DBE0, 1.0f, 0, -1, 0, 0 }, { &object_al_Anim_00DBE0, 1.0f, 0, -1, 0, -4 }, { &object_al_Anim_00ACA0, 1.0f, 0, -1, 2, 0 }, { &object_al_Anim_00ACA0, -1.0f, 0, -1, 2, 0 }, { &object_al_Anim_00CA28, 1.0f, 0, -1, 0, -4 }, @@ -178,7 +178,7 @@ s32 func_80BDE27C(EnAl* this, s32 arg1) { if (phi_v1) { this->unk_4F8 = arg1; - ret = SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimations, arg1); + ret = SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimationInfo, arg1); this->unk_4C8 = this->skelAnime.playSpeed; } @@ -659,7 +659,7 @@ s32 func_80BDF308(EnAl* this, PlayState* play, ScheduleOutput* scheduleOutput) { break; case 2: - this->unk_4F0 = EXCH_ITEM_NONE; + this->unk_4F0 = PLAYER_AP_NONE; this->unk_4EA = 0; func_80BDE27C(this, 2); break; @@ -672,7 +672,7 @@ s32 func_80BDF390(EnAl* this, PlayState* play, ScheduleOutput* scheduleOutput) { this->actor.flags |= ACTOR_FLAG_1; this->actor.targetMode = 0; - this->unk_4F0 = EXCH_ITEM_NONE; + this->unk_4F0 = PLAYER_AP_NONE; this->unk_4C2 = 0; this->unk_4D4 = 40.0f; diff --git a/src/overlays/actors/ovl_En_Aob_01/z_en_aob_01.c b/src/overlays/actors/ovl_En_Aob_01/z_en_aob_01.c index 3b825641c..33f8225d3 100644 --- a/src/overlays/actors/ovl_En_Aob_01/z_en_aob_01.c +++ b/src/overlays/actors/ovl_En_Aob_01/z_en_aob_01.c @@ -44,7 +44,7 @@ const ActorInit En_Aob_01_InitVars = { (ActorFunc)EnAob01_Draw, }; -static AnimationInfo D_809C3790[6] = { +static AnimationInfo sAnimationInfo[] = { { &gMamamuYanIdleAnim, 1.0f, 0.0f, 0.0f, ANIMMODE_LOOP, 0.0f }, { &gMamamuYanLaughStartAnim, 1.0f, 0.0f, 0.0f, ANIMMODE_ONCE, 0.0f }, { &gMamamuYanLaughLoopAnim, 1.0f, 0.0f, 0.0f, ANIMMODE_LOOP, 0.0f }, @@ -144,12 +144,12 @@ void func_809C1304(EnAob01* this, PlayState* play) { s32 func_809C1424(EnAob01* this) { s16 curFrame = this->skelAnime.curFrame; - s16 lastFrame = Animation_GetLastFrame(D_809C3790[this->unk_43C].animation); + s16 lastFrame = Animation_GetLastFrame(sAnimationInfo[this->unk_43C].animation); if (this->unk_43C == 1) { if (curFrame == lastFrame) { this->unk_43C = 2; - Actor_ChangeAnimationByInfo(&this->skelAnime, D_809C3790, 2); + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, 2); return true; } } else if (this->unk_43C == 2) { @@ -160,18 +160,18 @@ s32 func_809C1424(EnAob01* this) { s32 func_809C14D0(EnAob01* this) { s16 curFrame = this->skelAnime.curFrame; - s16 lastFrame = Animation_GetLastFrame(D_809C3790[this->unk_43C].animation); + s16 lastFrame = Animation_GetLastFrame(sAnimationInfo[this->unk_43C].animation); if ((this->unk_43C == 0) || (this->unk_43C == 5)) { if (curFrame == lastFrame) { this->unk_43C = 3; - Actor_ChangeAnimationByInfo(&this->skelAnime, D_809C3790, 3); + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, 3); return true; } } else if (this->unk_43C == 3) { if (curFrame == lastFrame) { this->unk_43C = 4; - Actor_ChangeAnimationByInfo(&this->skelAnime, D_809C3790, 4); + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, 4); return true; } } else if (this->unk_43C == 4) { @@ -182,12 +182,12 @@ s32 func_809C14D0(EnAob01* this) { s32 func_809C15BC(EnAob01* this) { s16 curFrame = this->skelAnime.curFrame; - s16 lastFrame = Animation_GetLastFrame(D_809C3790[this->unk_43C].animation); + s16 lastFrame = Animation_GetLastFrame(sAnimationInfo[this->unk_43C].animation); if ((this->unk_43C != 0) && (this->unk_43C != 5)) { if (curFrame == lastFrame) { this->unk_43C = 5; - Actor_ChangeAnimationByInfo(&this->skelAnime, D_809C3790, 5); + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, 5); return true; } } else { @@ -329,7 +329,7 @@ void func_809C16DC(EnAob01* this, PlayState* play) { this->unk_2D2 |= 0x40; this->unk_2D2 |= 0x10; this->unk_43C = 1; - Actor_ChangeAnimationByInfo(&this->skelAnime, D_809C3790, 1); + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, 1); break; case 0x3525: @@ -344,7 +344,7 @@ void func_809C16DC(EnAob01* this, PlayState* play) { this->unk_2D2 |= 0x40; this->unk_2D2 |= 0x10; this->unk_43C = 1; - Actor_ChangeAnimationByInfo(&this->skelAnime, D_809C3790, 1); + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, 1); break; } @@ -359,7 +359,7 @@ void func_809C16DC(EnAob01* this, PlayState* play) { this->unk_2D2 |= 4; this->unk_2D2 |= 0x10; this->unk_43C = 1; - Actor_ChangeAnimationByInfo(&this->skelAnime, D_809C3790, 1); + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, 1); break; case 0x3527: @@ -371,7 +371,7 @@ void func_809C16DC(EnAob01* this, PlayState* play) { this->unk_210 = 0x3536; this->unk_2D2 |= 0x40; this->unk_43C = 1; - Actor_ChangeAnimationByInfo(&this->skelAnime, D_809C3790, 1); + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, 1); break; } @@ -379,7 +379,7 @@ void func_809C16DC(EnAob01* this, PlayState* play) { this->unk_210 = 0x3537; this->unk_2D2 |= 0x40; this->unk_43C = 1; - Actor_ChangeAnimationByInfo(&this->skelAnime, D_809C3790, 1); + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, 1); break; } @@ -416,7 +416,7 @@ void func_809C1C9C(EnAob01* this, PlayState* play) { gSaveContext.save.weekEventReg[63] &= (u8)~2; this->unk_2D2 |= 0x20; func_800FD750(0x40); - play->nextEntranceIndex = 0x7C10; + play->nextEntrance = ENTRANCE(DOGGY_RACETRACK, 1); play->transitionType = TRANS_TYPE_64; gSaveContext.nextTransitionType = TRANS_TYPE_64; gSaveContext.eventInf[0] = (gSaveContext.eventInf[0] & (u8)~7) | 2; @@ -556,7 +556,7 @@ void func_809C21E0(EnAob01* this, PlayState* play) { this->unk_2D2 |= 0x10; this->unk_2D2 |= 0x40; this->unk_43C = 1; - Actor_ChangeAnimationByInfo(&this->skelAnime, D_809C3790, 1); + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, 1); Message_StartTextbox(play, 0x354B, &this->actor); } this->unk_2D2 &= ~8; @@ -672,7 +672,7 @@ void func_809C2788(EnAob01* this, PlayState* play) { this->unk_2D2 |= 0x20; if (func_809C25E4(this, play)) { if (func_801A8A50(0) != 0x41) { - play->nextEntranceIndex = 0x7C10; + play->nextEntrance = ENTRANCE(DOGGY_RACETRACK, 1); gSaveContext.eventInf[0] = (gSaveContext.eventInf[0] & (u8)~7) | 3; play->transitionType = TRANS_TYPE_64; gSaveContext.nextTransitionType = TRANS_TYPE_03; @@ -734,7 +734,7 @@ void func_809C28B8(EnAob01* this, PlayState* play) { this->unk_210 = 0x352D; this->unk_2D2 |= 0x40; this->unk_43C = 1; - Actor_ChangeAnimationByInfo(&this->skelAnime, D_809C3790, 1); + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, 1); break; } @@ -930,7 +930,7 @@ void EnAob01_Init(Actor* thisx, PlayState* play) { Collider_InitCylinder(play, &this->collider); Collider_SetCylinder(play, &this->collider, &this->actor, &sCylinderInit); this->unk_43C = 0; - Actor_ChangeAnimationByInfo(&this->skelAnime, D_809C3790, 0); + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, 0); Actor_SetScale(&this->actor, 0.01f); switch (gSaveContext.eventInf[0] & 7) { diff --git a/src/overlays/actors/ovl_En_Arrow/z_en_arrow.c b/src/overlays/actors/ovl_En_Arrow/z_en_arrow.c index b720c14d8..4ca78d239 100644 --- a/src/overlays/actors/ovl_En_Arrow/z_en_arrow.c +++ b/src/overlays/actors/ovl_En_Arrow/z_en_arrow.c @@ -315,9 +315,6 @@ void func_8088AA98(EnArrow* this, PlayState* play) { } } -#ifdef NON_MATCHING -// Stack. Scoped variable required to fix code gen at the bottom, likely sp60/54 there, -// but sp50 must be declared below those so maybe not? void func_8088ACE0(EnArrow* this, PlayState* play) { CollisionPoly* spAC; s32 spA8; @@ -329,8 +326,6 @@ void func_8088ACE0(EnArrow* this, PlayState* play) { f32 sp78; f32 sp74; f32 temp_f12_2; - Vec3f sp60; - Vec3f sp54; s32 sp50; if ((DECR(this->unk_260) == 0) || @@ -470,9 +465,8 @@ void func_8088ACE0(EnArrow* this, PlayState* play) { Actor_MoveWithGravity(&this->actor); } - this->unk_262 = BgCheck_ProjectileLineTest(&play->colCtx, &this->actor.prevPos, &this->actor.world.pos, &sp9C, - &this->actor.wallPoly, true, true, true, true, &spA8); - if (this->unk_262 != 0) { + if ((this->unk_262 = BgCheck_ProjectileLineTest(&play->colCtx, &this->actor.prevPos, &this->actor.world.pos, + &sp9C, &this->actor.wallPoly, true, true, true, true, &spA8))) { func_800B90AC(play, &this->actor, this->actor.wallPoly, spA8, &sp9C); Math_Vec3f_Copy(&this->actor.world.pos, &sp9C); this->actor.wallBgId = spA8; @@ -485,7 +479,8 @@ void func_8088ACE0(EnArrow* this, PlayState* play) { if (this->unk_264 != NULL) { if (this->unk_264->update != NULL) { - s32 pad; + Vec3f sp60; + Vec3f sp54; Math_Vec3f_Sum(&this->unk_228, &this->unk_268, &sp60); Math_Vec3f_Sum(&this->actor.world.pos, &this->unk_268, &sp54); @@ -511,9 +506,6 @@ void func_8088ACE0(EnArrow* this, PlayState* play) { } } } -#else -#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Arrow/func_8088ACE0.s") -#endif void func_8088B630(EnArrow* this, PlayState* play) { SkelAnime_Update(&this->arrow.skelAnime); diff --git a/src/overlays/actors/ovl_En_Attack_Niw/z_en_attack_niw.c b/src/overlays/actors/ovl_En_Attack_Niw/z_en_attack_niw.c index 6a7bd87ad..72ca1ba8e 100644 --- a/src/overlays/actors/ovl_En_Attack_Niw/z_en_attack_niw.c +++ b/src/overlays/actors/ovl_En_Attack_Niw/z_en_attack_niw.c @@ -103,12 +103,12 @@ void EnAttackNiw_AnimateWingHead(EnAttackNiw* this, PlayState* play, s16 animati this->unkToggle28A &= 1; switch (animationState) { // only case 2 and 5 are ever called in AttackNiw - case NIW_ANIMATION_STILL: + case NIW_ANIM_STILL: this->targetLeftWingRotZ = 0.0f; this->targetRightWingRotZ = 0.0f; break; - case NIW_ANIMATION_HEAD_PECKING: + case NIW_ANIM_HEAD_PECKING: this->unkTimer250 = 3; this->targetLeftWingRotZ = 7000.0f; this->targetRightWingRotZ = 7000.0f; @@ -118,7 +118,7 @@ void EnAttackNiw_AnimateWingHead(EnAttackNiw* this, PlayState* play, s16 animati } break; - case NIW_ANIMATION_PECKING_AND_WAVING: + case NIW_ANIM_PECKING_AND_WAVING: this->unkTimer250 = 2; this->targetLeftWingRotZ = -10000.0f; this->targetRightWingRotZ = -10000.0f; @@ -132,7 +132,7 @@ void EnAttackNiw_AnimateWingHead(EnAttackNiw* this, PlayState* play, s16 animati } break; - case NIW_ANIMATION_PECKING_AND_FORFLAPPING: + case NIW_ANIM_PECKING_AND_FORFLAPPING: this->unkTimer250 = 2; this->targetRightWingRotY = 10000.0f; this->targetLeftWingRotY = 10000.0f; @@ -142,12 +142,12 @@ void EnAttackNiw_AnimateWingHead(EnAttackNiw* this, PlayState* play, s16 animati } break; - case NIW_ANIMATION_FREEZE: + case NIW_ANIM_FREEZE: this->unusedTimer24E = 5; this->unkTimer24C = this->unusedTimer24E; break; - case NIW_ANIMATION_PECKING_SLOW_FORFLAPPING: + case NIW_ANIM_PECKING_SLOW_FORFLAPPING: this->unkTimer250 = 5; this->targetRightWingRotY = 14000.0f; this->targetLeftWingRotY = 14000.0f; @@ -276,7 +276,7 @@ void EnAttackNiw_EnterViewFromOffscreen(EnAttackNiw* this, PlayState* play) { this->unkTimer24C = 10; this->targetBodyRotY = -10000.0f; this->targetHeadRotZ = -3000.0f; - EnAttackNiw_AnimateWingHead(this, play, NIW_ANIMATION_PECKING_AND_WAVING); + EnAttackNiw_AnimateWingHead(this, play, NIW_ANIM_PECKING_AND_WAVING); } } @@ -325,10 +325,10 @@ void EnAttackNiw_AimAtPlayer(EnAttackNiw* this, PlayState* play) { this->actionFunc = EnAttackNiw_FlyAway; } else if (this->actor.bgCheckFlags & 1) { // touching floor - EnAttackNiw_AnimateWingHead(this, play, NIW_ANIMATION_PECKING_SLOW_FORFLAPPING); + EnAttackNiw_AnimateWingHead(this, play, NIW_ANIM_PECKING_SLOW_FORFLAPPING); } else { - EnAttackNiw_AnimateWingHead(this, play, NIW_ANIMATION_PECKING_AND_WAVING); + EnAttackNiw_AnimateWingHead(this, play, NIW_ANIM_PECKING_AND_WAVING); } } @@ -341,7 +341,7 @@ void EnAttackNiw_FlyAway(EnAttackNiw* this, PlayState* play) { Math_SmoothStepToS(&this->actor.world.rot.x, this->targetRotX, 5, this->rotStep, 0); Math_ApproachF(&this->rotStep, 5000.0f, 1.0f, 100.0f); Math_ApproachF(&this->actor.velocity.y, 5.0f, 0.3f, 1.0f); - EnAttackNiw_AnimateWingHead(this, play, NIW_ANIMATION_PECKING_AND_WAVING); + EnAttackNiw_AnimateWingHead(this, play, NIW_ANIM_PECKING_AND_WAVING); } void EnAttackNiw_Update(Actor* thisx, PlayState* play) { diff --git a/src/overlays/actors/ovl_En_Baba/z_en_baba.c b/src/overlays/actors/ovl_En_Baba/z_en_baba.c index b96fb35c0..4d783942d 100644 --- a/src/overlays/actors/ovl_En_Baba/z_en_baba.c +++ b/src/overlays/actors/ovl_En_Baba/z_en_baba.c @@ -62,7 +62,7 @@ const ActorInit En_Baba_InitVars = { (ActorFunc)EnBaba_Draw, }; -static AnimationInfo sAnimations[] = { +static AnimationInfo sAnimationInfo[] = { { &gBbaIdleHoldingBagAnim, 1.0f, 0.0f, 0.0f, ANIMMODE_LOOP, 0.0f }, { &gBbaIdleAnim, 1.0f, 0.0f, 0.0f, ANIMMODE_LOOP, 0.0f }, { &gBbaWalkingHoldingBagAnim, 1.0f, 0.0f, 0.0f, ANIMMODE_LOOP, 0.0f }, @@ -300,7 +300,7 @@ void EnBaba_HandleConversation(EnBaba* this, PlayState* play) { } void EnBaba_TriggerTransition(PlayState* play, u16 nextEntrance) { - play->nextEntranceIndex = nextEntrance; + play->nextEntrance = nextEntrance; play->transitionType = TRANS_TYPE_64; gSaveContext.nextTransitionType = TRANS_TYPE_64; play->transitionTrigger = TRANS_TRIGGER_START; @@ -488,7 +488,7 @@ void EnBaba_HandleSchedule(EnBaba* this, PlayState* play) { this->actor.speedXZ = 0.0f; Enemy_StartFinishingBlow(play, &this->actor); this->stateFlags |= BOMB_SHOP_LADY_STATE_KNOCKED_OVER; - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, this->animIndex); + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, this->animIndex); this->actionFunc = EnBaba_KnockedOver; break; } @@ -506,11 +506,12 @@ void EnBaba_FinishInit(EnBaba* this, PlayState* play) { if (play->sceneNum == SCENE_BOMYA) { this->stateFlags |= BOMB_SHOP_LADY_STATE_VISIBLE; this->animIndex = BOMB_SHOP_LADY_ANIM_IDLE; - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, this->animIndex); + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, this->animIndex); this->actionFunc = EnBaba_Idle; } else if (play->sceneNum == SCENE_BACKTOWN) { if ((BOMB_SHOP_LADY_GET_TYPE(&this->actor) == BOMB_SHOP_LADY_TYPE_FOLLOW_SCHEDULE) && - (gSaveContext.save.entranceIndex != 0xD670) && (BOMB_SHOP_LADY_GET_PATH_INDEX(&this->actor) != 0x3F)) { + (gSaveContext.save.entrance != ENTRANCE(NORTH_CLOCK_TOWN, 7)) && + (BOMB_SHOP_LADY_GET_PATH_INDEX(&this->actor) != 0x3F)) { if ((gSaveContext.save.weekEventReg[58] & 0x40) || (gSaveContext.save.time >= CLOCK_TIME(0, 20) && (gSaveContext.save.time < CLOCK_TIME(6, 0)))) { Actor_MarkForDeath(&this->actor); @@ -519,10 +520,10 @@ void EnBaba_FinishInit(EnBaba* this, PlayState* play) { this->sakonDeadTimer = 50; this->animIndex = BOMB_SHOP_LADY_ANIM_WALKING_HOLDING_BAG; - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, this->animIndex); + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, this->animIndex); this->actionFunc = EnBaba_FollowSchedule; } else if ((BOMB_SHOP_LADY_GET_TYPE(&this->actor) == BOMB_SHOP_LADY_TYPE_IDLE) && - (gSaveContext.save.entranceIndex == 0xD670)) { + (gSaveContext.save.entrance == ENTRANCE(NORTH_CLOCK_TOWN, 7))) { if (gSaveContext.save.weekEventReg[81] & 2) { Actor_MarkForDeath(&this->actor); return; @@ -535,7 +536,7 @@ void EnBaba_FinishInit(EnBaba* this, PlayState* play) { this->animIndex = BOMB_SHOP_LADY_ANIM_IDLE; } - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, this->animIndex); + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, this->animIndex); this->stateFlags |= BOMB_SHOP_LADY_STATE_AUTOTALK; this->actionFunc = EnBaba_Idle; } else { @@ -547,15 +548,15 @@ void EnBaba_FinishInit(EnBaba* this, PlayState* play) { if (BOMB_SHOP_LADY_GET_TYPE(&this->actor) == BOMB_SHOP_LADY_TYPE_SWAY) { this->actor.flags &= ~ACTOR_FLAG_1; this->animIndex = BOMB_SHOP_LADY_ANIM_SWAY; - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, this->animIndex); + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, this->animIndex); this->actionFunc = EnBaba_DoNothing; } else if (BOMB_SHOP_LADY_GET_PATH_INDEX(&this->actor) != 0x3F) { this->animIndex = BOMB_SHOP_LADY_ANIM_WALKING_HOLDING_BAG; - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, this->animIndex); + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, this->animIndex); this->actionFunc = EnBaba_Walk; } else { this->animIndex = BOMB_SHOP_LADY_ANIM_IDLE_HOLDING_BAG; - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, this->animIndex); + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, this->animIndex); this->actionFunc = EnBaba_FaceForward; } } @@ -603,12 +604,12 @@ void EnBaba_Talk(EnBaba* this, PlayState* play) { if (CHECK_QUEST_ITEM(QUEST_BOMBERS_NOTEBOOK)) { if (play->msgCtx.unk120B1 == 0) { gSaveContext.save.weekEventReg[81] |= 2; - EnBaba_TriggerTransition(play, 0xD670); + EnBaba_TriggerTransition(play, ENTRANCE(NORTH_CLOCK_TOWN, 7)); return; } } else { gSaveContext.save.weekEventReg[81] |= 2; - EnBaba_TriggerTransition(play, 0xD670); + EnBaba_TriggerTransition(play, ENTRANCE(NORTH_CLOCK_TOWN, 7)); } } else { this->textId = 0; @@ -626,7 +627,7 @@ void EnBaba_Talk(EnBaba* this, PlayState* play) { } else if (talkState == TEXT_STATE_DONE) { if (Message_ShouldAdvance(play) && (play->msgCtx.unk120B1 == 0)) { gSaveContext.save.weekEventReg[81] |= 2; - EnBaba_TriggerTransition(play, 0xD670); + EnBaba_TriggerTransition(play, ENTRANCE(NORTH_CLOCK_TOWN, 7)); } } } @@ -646,7 +647,7 @@ void EnBaba_GaveBlastMask(EnBaba* this, PlayState* play) { EnBaba_HandleConversation(this, play); this->actionFunc = EnBaba_Talk; } else { - func_800B85E0(&this->actor, play, 400.0f, EXCH_ITEM_MINUS1); + func_800B85E0(&this->actor, play, 400.0f, PLAYER_AP_MINUS1); } } @@ -682,7 +683,7 @@ void EnBaba_FollowSchedule(EnBaba* this, PlayState* play) { void EnBaba_KnockedOver(EnBaba* this, PlayState* play) { s16 curFrame = this->skelAnime.curFrame; - s16 endFrame = Animation_GetLastFrame(sAnimations[this->animIndex].animation); + s16 endFrame = Animation_GetLastFrame(sAnimationInfo[this->animIndex].animation); this->collider.dim.height = 37; this->collider.dim.radius = 23; @@ -694,12 +695,12 @@ void EnBaba_KnockedOver(EnBaba* this, PlayState* play) { if (curFrame == endFrame) { this->animIndex = BOMB_SHOP_LADY_ANIM_LYING_DOWN; - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, this->animIndex); + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, this->animIndex); } } else { if ((gSaveContext.save.weekEventReg[79] & 0x40) && (DECR(this->sakonDeadTimer) == 0)) { Audio_QueueSeqCmd(0x101400FF); - EnBaba_TriggerTransition(play, 0xD670); + EnBaba_TriggerTransition(play, ENTRANCE(NORTH_CLOCK_TOWN, 7)); } else { Actor_MoveWithGravity(&this->actor); } diff --git a/src/overlays/actors/ovl_En_Baisen/z_en_baisen.c b/src/overlays/actors/ovl_En_Baisen/z_en_baisen.c index e14bc8ce5..3555f0998 100644 --- a/src/overlays/actors/ovl_En_Baisen/z_en_baisen.c +++ b/src/overlays/actors/ovl_En_Baisen/z_en_baisen.c @@ -57,9 +57,9 @@ static ColliderCylinderInit sCylinderInit = { static u16 sTextIds[] = { 0x2ABD, 0x2ABB, 0x2AD5, 0x2AD6, 0x2AD7, 0x2AD8, 0x2AC6 }; -static AnimationHeader* D_80BE8E4C[] = { &object_bai_Anim_0011C0, &object_bai_Anim_0008B4, &object_bai_Anim_008198 }; +static AnimationHeader* sAnimations[] = { &object_bai_Anim_0011C0, &object_bai_Anim_0008B4, &object_bai_Anim_008198 }; -static u8 sAnimModes[] = { ANIMMODE_LOOP, ANIMMODE_LOOP }; +static u8 sAnimationModes[] = { ANIMMODE_LOOP, ANIMMODE_LOOP }; void EnBaisen_Init(Actor* thisx, PlayState* play) { EnBaisen* this = THIS; @@ -100,11 +100,11 @@ void EnBaisen_Destroy(Actor* thisx, PlayState* play) { Collider_DestroyCylinder(play, &this->collider); } -void EnBaisen_ChangeAnimation(EnBaisen* this, s32 animIndex) { +void EnBaisen_ChangeAnim(EnBaisen* this, s32 animIndex) { this->animIndex = animIndex; - this->frameCount = Animation_GetLastFrame(D_80BE8E4C[animIndex]); - Animation_Change(&this->skelAnime, D_80BE8E4C[this->animIndex], 1.0f, 0.0f, this->frameCount, - sAnimModes[this->animIndex], -10.0f); + this->frameCount = Animation_GetLastFrame(sAnimations[animIndex]); + Animation_Change(&this->skelAnime, sAnimations[this->animIndex], 1.0f, 0.0f, this->frameCount, + sAnimationModes[this->animIndex], -10.0f); } void func_80BE871C(EnBaisen* this) { @@ -138,10 +138,10 @@ void func_80BE87B0(EnBaisen* this, PlayState* play) { void func_80BE87FC(EnBaisen* this) { if (this->paramCopy == 0) { this->textIdIndex = 2; - EnBaisen_ChangeAnimation(this, 2); + EnBaisen_ChangeAnim(this, 2); this->unk29E = this->actor.world.rot.y; } else { - EnBaisen_ChangeAnimation(this, 0); + EnBaisen_ChangeAnim(this, 0); } this->actor.textId = sTextIds[this->textIdIndex]; @@ -190,12 +190,12 @@ void func_80BE89D8(EnBaisen* this, PlayState* play) { if (&this->actor == this->unk2A4) { this->unk29E = this->actor.world.rot.y; if (this->animIndex == 0) { - EnBaisen_ChangeAnimation(this, 1); + EnBaisen_ChangeAnim(this, 1); } } else { this->unk29E = Math_Vec3f_Yaw(&this->actor.world.pos, &this->unk2A4->world.pos); if (this->animIndex != 0) { - EnBaisen_ChangeAnimation(this, 0); + EnBaisen_ChangeAnim(this, 0); } } if ((play->msgCtx.currentTextId == 0x2AC6) || (play->msgCtx.currentTextId == 0x2AC7) || @@ -212,14 +212,14 @@ void func_80BE8AAC(EnBaisen* this, PlayState* play) { if ((this->textIdIndex % 2) != 0) { this->unk29E = this->actor.world.rot.y; if (this->animIndex == 0) { - EnBaisen_ChangeAnimation(this, 1); + EnBaisen_ChangeAnim(this, 1); } } else { if (this->unk2A4 != NULL) { this->unk29E = Math_Vec3f_Yaw(&this->actor.world.pos, &this->unk2A4->world.pos); } if (this->animIndex != 0) { - EnBaisen_ChangeAnimation(this, 0); + EnBaisen_ChangeAnim(this, 0); } } if ((Message_GetState(&play->msgCtx) == TEXT_STATE_5) && Message_ShouldAdvance(play)) { diff --git a/src/overlays/actors/ovl_En_Bba_01/z_en_bba_01.c b/src/overlays/actors/ovl_En_Bba_01/z_en_bba_01.c index 7bfbf596c..d141c6514 100644 --- a/src/overlays/actors/ovl_En_Bba_01/z_en_bba_01.c +++ b/src/overlays/actors/ovl_En_Bba_01/z_en_bba_01.c @@ -150,7 +150,7 @@ s32 func_809CC270(EnBba01* this, PlayState* play) { Actor_GetScreenPos(play, &this->enHy.actor, &x, &y); //! @bug: Both x and y conditionals are always true, || should be an && if (!this->enHy.waitingOnInit && ((x >= 0) || (x < SCREEN_WIDTH)) && ((y >= 0) || (y < SCREEN_HEIGHT))) { - func_800B85E0(&this->enHy.actor, play, 30.0f, EXCH_ITEM_2E); + func_800B85E0(&this->enHy.actor, play, 30.0f, PLAYER_AP_MAGIC_BEANS); } return true; } @@ -158,7 +158,7 @@ s32 func_809CC270(EnBba01* this, PlayState* play) { void EnBba01_FinishInit(EnHy* this, PlayState* play) { //! @bug: gBbaSkel does not match EnHy's skeleton assumptions. //! Since gBbaSkel has more limbs than expected, joint and morph tables will overflow - if (EnHy_Init(this, play, &gBbaSkel, ENHY_ANIMATION_BBA_6)) { + if (EnHy_Init(this, play, &gBbaSkel, ENHY_ANIM_BBA_6)) { this->actor.flags |= ACTOR_FLAG_1; this->actor.draw = EnBba01_Draw; this->waitingOnInit = false; diff --git a/src/overlays/actors/ovl_En_Bigslime/z_en_bigslime.c b/src/overlays/actors/ovl_En_Bigslime/z_en_bigslime.c index f953f17ab..12076537e 100644 --- a/src/overlays/actors/ovl_En_Bigslime/z_en_bigslime.c +++ b/src/overlays/actors/ovl_En_Bigslime/z_en_bigslime.c @@ -389,7 +389,7 @@ void EnBigslime_Destroy(Actor* thisx, PlayState* play) { } Collider_DestroyCylinder(play, &this->gekkoCollider); - Audio_StopSfxByPos(&this->gekkoProjectedPos); + AudioSfx_StopByPos(&this->gekkoProjectedPos); } void EnBigslime_DynamicVtxCopyState(EnBigslime* this) { diff --git a/src/overlays/actors/ovl_En_Bji_01/z_en_bji_01.c b/src/overlays/actors/ovl_En_Bji_01/z_en_bji_01.c index a9a156a6f..e49b743b8 100644 --- a/src/overlays/actors/ovl_En_Bji_01/z_en_bji_01.c +++ b/src/overlays/actors/ovl_En_Bji_01/z_en_bji_01.c @@ -62,7 +62,7 @@ static ColliderCylinderInit sCylinderInit = { }; /* Animations struct */ -static AnimationSpeedInfo D_809CDC7C[] = { +static AnimationSpeedInfo sAnimationInfo[] = { { &object_bji_Anim_000FDC, 1.0f, ANIMMODE_LOOP, 0.0f }, /* Looking through telescope */ { &object_bji_Anim_005B58, 1.0f, ANIMMODE_LOOP, 10.0f }, /* Breathing? Unused? */ { &object_bji_Anim_000AB0, 1.0f, ANIMMODE_LOOP, 0.0f }, /* Talking */ @@ -82,7 +82,7 @@ void func_809CCDE0(EnBji01* this, PlayState* play) { } void func_809CCE98(EnBji01* this, PlayState* play) { - SubS_ChangeAnimationBySpeedInfo(&this->skelAnime, D_809CDC7C, 0, &this->animationIndex); + SubS_ChangeAnimationBySpeedInfo(&this->skelAnime, sAnimationInfo, 0, &this->animIndex); this->actor.textId = 0; this->actionFunc = func_809CCEE8; } @@ -109,7 +109,7 @@ void func_809CCEE8(EnBji01* this, PlayState* play) { } else { this->moonsTear = (ObjMoonStone*)SubS_FindActor(play, NULL, ACTORCAT_PROP, ACTOR_OBJ_MOON_STONE); } - func_800B8500(&this->actor, play, 60.0f, 10.0f, EXCH_ITEM_NONE); + func_800B8500(&this->actor, play, 60.0f, 10.0f, PLAYER_AP_NONE); } } @@ -162,7 +162,7 @@ void func_809CD028(EnBji01* this, PlayState* play) { this->textId = 0x5F1; } func_800B8500(&this->actor, play, this->actor.xzDistToPlayer, this->actor.playerHeightRel, - EXCH_ITEM_NONE); + PLAYER_AP_NONE); break; case PLAYER_FORM_HUMAN: this->textId = 0x5F7; @@ -191,7 +191,7 @@ void func_809CD028(EnBji01* this, PlayState* play) { } break; } - SubS_ChangeAnimationBySpeedInfo(&this->skelAnime, D_809CDC7C, 2, &this->animationIndex); + SubS_ChangeAnimationBySpeedInfo(&this->skelAnime, sAnimationInfo, 2, &this->animIndex); this->actionFunc = EnBji01_DialogueHandler; } @@ -237,7 +237,7 @@ void EnBji01_DialogueHandler(EnBji01* this, PlayState* play) { this->actor.flags &= ~ACTOR_FLAG_10000; switch (play->msgCtx.currentTextId) { case 0x5DE: - SubS_ChangeAnimationBySpeedInfo(&this->skelAnime, D_809CDC7C, 3, &this->animationIndex); + SubS_ChangeAnimationBySpeedInfo(&this->skelAnime, sAnimationInfo, 3, &this->animIndex); func_80151938(play, 0x5DF); break; case 0x5E4: @@ -287,16 +287,17 @@ void EnBji01_DialogueHandler(EnBji01* this, PlayState* play) { func_809CCE98(this, play); break; } - if ((this->animationIndex == 3) && (this->skelAnime.curFrame == this->skelAnime.endFrame)) { - SubS_ChangeAnimationBySpeedInfo(&this->skelAnime, D_809CDC7C, 2, &this->animationIndex); + if ((this->animIndex == 3) && (this->skelAnime.curFrame == this->skelAnime.endFrame)) { + SubS_ChangeAnimationBySpeedInfo(&this->skelAnime, sAnimationInfo, 2, &this->animIndex); } } void func_809CD634(EnBji01* this, PlayState* play) { - Audio_SetSfxBanksMute(0x6F); + AudioSfx_MuteBanks((1 << BANK_PLAYER) | (1 << BANK_ITEM) | (1 << BANK_ENV) | (1 << BANK_ENEMY) | + (1 << BANK_OCARINA) | (1 << BANK_VOICE)); Audio_QueueSeqCmd(0xE0000101); - play->nextEntranceIndex = 0x54A0; /* Termina Field from telescope */ - gSaveContext.respawn[RESPAWN_MODE_DOWN].entranceIndex = play->nextEntranceIndex; + play->nextEntrance = ENTRANCE(TERMINA_FIELD, 10); /* Telescope entrance */ + gSaveContext.respawn[RESPAWN_MODE_DOWN].entrance = play->nextEntrance; func_80169EFC(&play->state); /* Load new entrance? */ gSaveContext.respawnFlag = -2; this->actionFunc = EnBji01_DoNothing; @@ -306,7 +307,7 @@ void EnBji01_DoNothing(EnBji01* this, PlayState* play) { } void func_809CD6C0(EnBji01* this, PlayState* play) { - SubS_ChangeAnimationBySpeedInfo(&this->skelAnime, D_809CDC7C, 2, &this->animationIndex); + SubS_ChangeAnimationBySpeedInfo(&this->skelAnime, sAnimationInfo, 2, &this->animIndex); this->actionFunc = func_809CD70C; } @@ -336,21 +337,21 @@ void EnBji01_Init(Actor* thisx, PlayState* play) { this->actor.colChkInfo.mass = MASS_IMMOVABLE; this->actor.targetMode = 0; this->actor.child = NULL; - this->animationIndex = -1; + this->animIndex = -1; Actor_SetScale(&this->actor, 0.01f); SubS_FillCutscenesList(&this->actor, this->cutscenes, ARRAY_COUNT(this->cutscenes)); this->moonsTear = (ObjMoonStone*)SubS_FindActor(play, NULL, ACTORCAT_PROP, ACTOR_OBJ_MOON_STONE); - switch (gSaveContext.save.entranceIndex) { - case 0x4C00: /* Observatory from ECT */ - case 0x4C10: /* Observatory from Termina Field door */ + switch (gSaveContext.save.entrance) { + case ENTRANCE(ASTRAL_OBSERVATORY, 0): /* ECT entrance*/ + case ENTRANCE(ASTRAL_OBSERVATORY, 1): /* TF door entrance */ this->actor.params = SHIKASHI_TYPE_DEFAULT; func_809CCE98(this, play); break; - case 0x4C20: /* Observatory from Termina Field telescope */ + case ENTRANCE(ASTRAL_OBSERVATORY, 2): /* Telescope entrance */ this->actor.flags |= ACTOR_FLAG_10000; - Audio_SetSfxBanksMute(0); + AudioSfx_MuteBanks(0); Audio_QueueSeqCmd(0xE0000100); this->actor.params = SHIKASHI_TYPE_LOOKED_THROUGH_TELESCOPE; func_809CCE98(this, play); diff --git a/src/overlays/actors/ovl_En_Bji_01/z_en_bji_01.h b/src/overlays/actors/ovl_En_Bji_01/z_en_bji_01.h index ac738bc71..8ab601e1b 100644 --- a/src/overlays/actors/ovl_En_Bji_01/z_en_bji_01.h +++ b/src/overlays/actors/ovl_En_Bji_01/z_en_bji_01.h @@ -22,7 +22,7 @@ typedef struct EnBji01 { /* 0x18C */ ColliderCylinder collider; /* 0x1D8 */ Vec3s jointTable[SHIKASHI_LIMB_MAX]; /* 0x238 */ Vec3s morphTable[SHIKASHI_LIMB_MAX]; - /* 0x298 */ s32 animationIndex; + /* 0x298 */ s32 animIndex; /* 0x29C */ s16 eyeTexIndex; /* 0x29E */ s16 blinkSeqIndex; /* 0x2A0 */ s16 blinkTimer; diff --git a/src/overlays/actors/ovl_En_Bjt/z_en_bjt.c b/src/overlays/actors/ovl_En_Bjt/z_en_bjt.c index 91c6d6a4f..788759e3c 100644 --- a/src/overlays/actors/ovl_En_Bjt/z_en_bjt.c +++ b/src/overlays/actors/ovl_En_Bjt/z_en_bjt.c @@ -88,9 +88,9 @@ typedef enum { /* 3 */ TOILET_HAND_ANIM_THUMBS_UP, // Right /* 4 */ TOILET_HAND_ANIM_OPEN_HAND, /* 5 */ TOILET_HAND_ANIM_FIST // i.e. holding the reward -} ToiletHandAnimations; +} ToiletHandAnimation; -static AnimationInfoS sAnimationInfos[] = { +static AnimationInfoS sAnimationInfo[] = { /* 0 */ { &gToiletHandWaitingAnim, 1.0f, 0, -1, ANIMMODE_LOOP, 0 }, /* 1 */ { &gToiletHandWaitingAnim, 1.0f, 0, -1, ANIMMODE_LOOP, -4 }, /* 2 */ { &gToiletHandWaggingFingerAnim, 1.0f, 0, -1, ANIMMODE_LOOP, -4 }, @@ -104,22 +104,21 @@ void EnBjt_UpdateSkelAnime(EnBjt* this) { SkelAnime_Update(&this->skelAnime); } -s32 EnBjt_ChangeAnimation(EnBjt* this, s32 animIndex) { +s32 EnBjt_ChangeAnim(EnBjt* this, s32 animIndex) { s32 changeAnim = false; s32 changed = false; if ((animIndex == TOILET_HAND_ANIM_WAITING) || (animIndex == TOILET_HAND_ANIM_WAITING_MORPH)) { - if (!((this->curAnimIndex == TOILET_HAND_ANIM_WAITING) || - (this->curAnimIndex == TOILET_HAND_ANIM_WAITING_MORPH))) { + if (!((this->animIndex == TOILET_HAND_ANIM_WAITING) || (this->animIndex == TOILET_HAND_ANIM_WAITING_MORPH))) { changeAnim = true; } - } else if (this->curAnimIndex != animIndex) { + } else if (this->animIndex != animIndex) { changeAnim = true; } if (changeAnim) { - this->curAnimIndex = animIndex; - changed = SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimationInfos, animIndex); + this->animIndex = animIndex; + changed = SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimationInfo, animIndex); this->animPlaySpeed = this->skelAnime.playSpeed; } @@ -144,27 +143,27 @@ void EnBjt_UpdateCollision(EnBjt* this, PlayState* play) { s32 EnBjt_TakeItem(s32 exchangeItem) { switch (exchangeItem) { - case EXCH_ITEM_LETTER_TO_KAFEI: + case PLAYER_AP_LETTER_TO_KAFEI: Inventory_DeleteItem(ITEM_LETTER_TO_KAFEI, SLOT(ITEM_LETTER_TO_KAFEI)); break; - case EXCH_ITEM_DEED_SWAMP: + case PLAYER_AP_DEED_SWAMP: Inventory_DeleteItem(ITEM_DEED_SWAMP, SLOT(ITEM_DEED_SWAMP)); break; - case EXCH_ITEM_DEED_MOUNTAIN: + case PLAYER_AP_DEED_MOUNTAIN: Inventory_DeleteItem(ITEM_DEED_MOUNTAIN, SLOT(ITEM_DEED_MOUNTAIN)); break; - case EXCH_ITEM_DEED_OCEAN: + case PLAYER_AP_DEED_OCEAN: Inventory_DeleteItem(ITEM_DEED_OCEAN, SLOT(ITEM_DEED_OCEAN)); break; - case EXCH_ITEM_DEED_LAND: + case PLAYER_AP_DEED_LAND: Inventory_DeleteItem(ITEM_DEED_LAND, SLOT(ITEM_DEED_LAND)); break; - case EXCH_ITEM_LETTER_MAMA: + case PLAYER_AP_LETTER_MAMA: Inventory_DeleteItem(ITEM_LETTER_MAMA, SLOT(ITEM_LETTER_MAMA)); break; @@ -251,10 +250,10 @@ s32 EnBjt_ChooseBehaviour(Actor* thisx, PlayState* play) { // Fallthrough case TEXT_STATE_16: itemAP = func_80123810(play); - if ((itemAP == EXCH_ITEM_DEED_LAND) || (itemAP == EXCH_ITEM_LETTER_TO_KAFEI) || - (itemAP == EXCH_ITEM_DEED_SWAMP) || (itemAP == EXCH_ITEM_DEED_MOUNTAIN) || - (itemAP == EXCH_ITEM_DEED_OCEAN) || (itemAP == EXCH_ITEM_LETTER_MAMA)) { - EnBjt_ChangeAnimation(this, TOILET_HAND_ANIM_WAITING_MORPH); + if ((itemAP == PLAYER_AP_DEED_LAND) || (itemAP == PLAYER_AP_LETTER_TO_KAFEI) || + (itemAP == PLAYER_AP_DEED_SWAMP) || (itemAP == PLAYER_AP_DEED_MOUNTAIN) || + (itemAP == PLAYER_AP_DEED_OCEAN) || (itemAP == PLAYER_AP_LETTER_MAMA)) { + EnBjt_ChangeAnim(this, TOILET_HAND_ANIM_WAITING_MORPH); this->playedSfx = false; this->behaviour++; scriptBranch = 1; // Right item @@ -275,9 +274,9 @@ s32 EnBjt_ChooseBehaviour(Actor* thisx, PlayState* play) { break; case TOILET_HAND_BEHAVIOUR_TAKE_ITEM: - if (player->exchangeItemId != EXCH_ITEM_NONE) { + if (player->exchangeItemId != PLAYER_AP_NONE) { EnBjt_TakeItem(player->exchangeItemId); - player->exchangeItemId = EXCH_ITEM_NONE; + player->exchangeItemId = PLAYER_AP_NONE; } if (EnBjt_Vanish(this)) { this->timer = 60; @@ -288,7 +287,7 @@ s32 EnBjt_ChooseBehaviour(Actor* thisx, PlayState* play) { case TOILET_HAND_BEHAVIOUR_USE_ITEM: if (DECR(this->timer) == 0) { - EnBjt_ChangeAnimation(this, TOILET_HAND_ANIM_FIST); // change while not visible + EnBjt_ChangeAnim(this, TOILET_HAND_ANIM_FIST); // change while not visible this->playedSfx = false; this->behaviour++; } else if (this->timer == 10) { @@ -304,7 +303,7 @@ s32 EnBjt_ChooseBehaviour(Actor* thisx, PlayState* play) { break; case TOILET_HAND_BEHAVIOUR_REWARD_GIVEN: - EnBjt_ChangeAnimation(this, TOILET_HAND_ANIM_OPEN_HAND); + EnBjt_ChangeAnim(this, TOILET_HAND_ANIM_OPEN_HAND); this->behaviour++; scriptBranch = 1; // Right item break; @@ -339,11 +338,11 @@ s32 EnBjt_ChooseAnimation(EnBjt* this, PlayState* play) { if (this->textId != curTextId) { switch (curTextId) { case 0x2949: // Wrong item - EnBjt_ChangeAnimation(this, TOILET_HAND_ANIM_WAGGING_FINGER); + EnBjt_ChangeAnim(this, TOILET_HAND_ANIM_WAGGING_FINGER); break; case 0x294A: // Right item - EnBjt_ChangeAnimation(this, TOILET_HAND_ANIM_THUMBS_UP); + EnBjt_ChangeAnim(this, TOILET_HAND_ANIM_THUMBS_UP); break; default: @@ -353,7 +352,7 @@ s32 EnBjt_ChooseAnimation(EnBjt* this, PlayState* play) { this->textId = curTextId; } else if (this->stateFlags & TOILET_HAND_STATE_TEXTBOX) { this->stateFlags &= ~TOILET_HAND_STATE_TEXTBOX; - EnBjt_ChangeAnimation(this, TOILET_HAND_ANIM_WAITING); + EnBjt_ChangeAnim(this, TOILET_HAND_ANIM_WAITING); } return 0; } @@ -422,8 +421,8 @@ void EnBjt_Init(Actor* thisx, PlayState* play) { SkelAnime_InitFlex(play, &this->skelAnime, &gToiletHandSkel, NULL, this->jointTable, this->morphTable, TOILET_HAND_LIMB_MAX); - this->curAnimIndex = TOILET_HAND_ANIM_NONE; - EnBjt_ChangeAnimation(this, TOILET_HAND_ANIM_WAITING); + this->animIndex = TOILET_HAND_ANIM_NONE; + EnBjt_ChangeAnim(this, TOILET_HAND_ANIM_WAITING); Collider_InitAndSetCylinder(play, &this->collider, &this->actor, &sCylinderInit); CollisionCheck_SetInfo2(&this->actor.colChkInfo, DamageTable_Get(0x16), &sColChkInfoInit); @@ -447,7 +446,7 @@ void EnBjt_Update(Actor* thisx, PlayState* play) { if (this->scheduleResult != TOILET_HAND_SCH_NONE) { EnBjt_UpdateSkelAnime(this); - func_8013C964(&this->actor, play, 60.0f, 10.0f, EXCH_ITEM_NONE, this->stateFlags & 7); + func_8013C964(&this->actor, play, 60.0f, 10.0f, PLAYER_AP_NONE, this->stateFlags & 7); Actor_SetFocus(&this->actor, 26.0f); EnBjt_UpdateCollision(this, play); } diff --git a/src/overlays/actors/ovl_En_Bjt/z_en_bjt.h b/src/overlays/actors/ovl_En_Bjt/z_en_bjt.h index d1aabb999..f26be4d22 100644 --- a/src/overlays/actors/ovl_En_Bjt/z_en_bjt.h +++ b/src/overlays/actors/ovl_En_Bjt/z_en_bjt.h @@ -27,7 +27,7 @@ typedef struct EnBjt { /* 0x244 */ UNK_TYPE1 unk_244[4]; /* 0x248 */ s32 playedSfx; // to only play once /* 0x24C */ MsgEventFunc msgEventCallback; - /* 0x250 */ s32 curAnimIndex; + /* 0x250 */ s32 animIndex; /* 0x254 */ UNK_TYPE1 pad_254[8]; } EnBjt; // size = 0x25C diff --git a/src/overlays/actors/ovl_En_Bom/z_en_bom.c b/src/overlays/actors/ovl_En_Bom/z_en_bom.c index 87f5cf1ba..6b79d6021 100644 --- a/src/overlays/actors/ovl_En_Bom/z_en_bom.c +++ b/src/overlays/actors/ovl_En_Bom/z_en_bom.c @@ -610,7 +610,7 @@ void EnBom_Draw(Actor* thisx, PlayState* play) { Matrix_MultVec3f(&D_80872EE0, &this->actor.home.pos); gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(play->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gSPDisplayList(POLY_OPA_DISP++, gameplay_keep_DL_015FA0); + gSPDisplayList(POLY_OPA_DISP++, gBombCapDL); Matrix_ReplaceRotation(&play->billboardMtxF); Matrix_RotateXS(0x4000, MTXMODE_APPLY); @@ -619,7 +619,7 @@ void EnBom_Draw(Actor* thisx, PlayState* play) { gDPPipeSync(POLY_OPA_DISP++); gDPSetEnvColor(POLY_OPA_DISP++, (s8)this->unk_1F4, 0, 40, 255); gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, (s8)this->unk_1F4, 0, 40, 255); - gSPDisplayList(POLY_OPA_DISP++, gameplay_keep_DL_015DB0); + gSPDisplayList(POLY_OPA_DISP++, gBombBodyDL); } else { Vec3f sp58; Vec3f sp4C; diff --git a/src/overlays/actors/ovl_En_Bom_Bowl_Man/z_en_bom_bowl_man.c b/src/overlays/actors/ovl_En_Bom_Bowl_Man/z_en_bom_bowl_man.c index b87f43b37..aad1aa69c 100644 --- a/src/overlays/actors/ovl_En_Bom_Bowl_Man/z_en_bom_bowl_man.c +++ b/src/overlays/actors/ovl_En_Bom_Bowl_Man/z_en_bom_bowl_man.c @@ -97,7 +97,7 @@ void EnBomBowlMan_Init(Actor* thisx, PlayState* play) { this->path = SubS_GetPathByIndex(play, this->unk_29A, 0x3F); this->unk_2C8 = 80.0f; - if ((gSaveContext.save.entranceIndex == 0xD220) && (gSaveContext.save.weekEventReg[73] & 0x80) && + if ((gSaveContext.save.entrance == ENTRANCE(EAST_CLOCK_TOWN, 2)) && (gSaveContext.save.weekEventReg[73] & 0x80) && !CHECK_QUEST_ITEM(QUEST_BOMBERS_NOTEBOOK)) { this->unk_2D6 = this->actor.cutscene; if (this->unk_2D6 == 0) { @@ -332,7 +332,7 @@ void func_809C51B4(EnBomBowlMan* this, PlayState* play) { if ((play->msgCtx.unk120B1 == 0) && ((play->msgCtx.msgMode == 0) || (Message_GetState(&play->msgCtx) == TEXT_STATE_DONE))) { - play->nextEntranceIndex = Entrance_CreateIndexFromSpawn(6); + play->nextEntrance = Entrance_CreateFromSpawn(6); gSaveContext.nextCutsceneIndex = 0; play->transitionTrigger = TRANS_TRIGGER_START; play->transitionType = TRANS_TYPE_86; diff --git a/src/overlays/actors/ovl_En_Bom_Chu/z_en_bom_chu.c b/src/overlays/actors/ovl_En_Bom_Chu/z_en_bom_chu.c index b2b4ec362..b1b9f8d14 100644 --- a/src/overlays/actors/ovl_En_Bom_Chu/z_en_bom_chu.c +++ b/src/overlays/actors/ovl_En_Bom_Chu/z_en_bom_chu.c @@ -116,7 +116,6 @@ s32 EnBomChu_UpdateFloorPoly(EnBomChu* this, CollisionPoly* floorPoly, PlayState } normDotUp = DOTXYZ(normal, this->axisUp); - if (fabsf(normDotUp) >= 0.999f) { return false; } @@ -129,7 +128,6 @@ s32 EnBomChu_UpdateFloorPoly(EnBomChu* this, CollisionPoly* floorPoly, PlayState Math3D_CrossProduct(&this->axisUp, &normal, &vec); magnitude = Math3D_Vec3fMagnitude(&vec); - if (magnitude < 0.001f) { EnBomChu_Explode(this, play); return false; @@ -357,7 +355,8 @@ void EnBomChu_WaitForDeath(EnBomChu* this, PlayState* play) { } /** - * Transform coordinates from actor coordinate space to world space, according to current orientation. + * Transform coordinates from actor coordinate space (origin at actor's world.pos, z-axis is facing + * angle, i.e. shape.rot.y) to world space, according to current orientation. * `offset` is expected to already be at world scale. */ void EnBomChu_ActorCoordsToWorld(EnBomChu* this, Vec3f* offset, Vec3f* pos) { @@ -497,7 +496,7 @@ void EnBomChu_Update(Actor* thisx, PlayState* play) { if (this->isMoving) { this->visualJitter = - (5.0f + (Rand_ZeroOne() * 3.0f)) * Math_SinS((((s32)(Rand_ZeroOne() * 512.0f) + 0x3000) * this->timer)); + (5.0f + (Rand_ZeroOne() * 3.0f)) * Math_SinS((((s32)(Rand_ZeroOne() * 0x200) + 0x3000) * this->timer)); EnBomChu_ActorCoordsToWorld(this, &sBlureP1Offset, &blureP1); EnBomChu_ActorCoordsToWorld(this, &sBlureP2LeftOffset, &blureP2); diff --git a/src/overlays/actors/ovl_En_Bombers2/z_en_bombers2.c b/src/overlays/actors/ovl_En_Bombers2/z_en_bombers2.c index 265388ff7..9f70629e6 100644 --- a/src/overlays/actors/ovl_En_Bombers2/z_en_bombers2.c +++ b/src/overlays/actors/ovl_En_Bombers2/z_en_bombers2.c @@ -64,7 +64,7 @@ static AnimationHeader* sAnimations[] = { &object_cs_Anim_0060E8, &object_cs_Anim_005DC4, &object_cs_Anim_0026B0, }; -static u8 sAnimModes[] = { +static u8 sAnimationModes[] = { ANIMMODE_LOOP, ANIMMODE_LOOP, ANIMMODE_LOOP, ANIMMODE_ONCE, ANIMMODE_LOOP, ANIMMODE_LOOP, ANIMMODE_ONCE, ANIMMODE_LOOP, }; @@ -94,7 +94,7 @@ void EnBombers2_Init(Actor* thisx, PlayState* play) { this->jointTable, OBJECT_CS_LIMB_MAX); this->actor.targetMode = 6; Collider_InitAndSetCylinder(play, &this->collider, &this->actor, &sCylinderInit); - if ((gSaveContext.save.weekEventReg[73] & 0x80) || (gSaveContext.save.entranceIndex == 0xD220)) { + if ((gSaveContext.save.weekEventReg[73] & 0x80) || (gSaveContext.save.entrance == ENTRANCE(EAST_CLOCK_TOWN, 2))) { this->actor.world.pos.x += Math_SinS(this->actor.home.rot.y + 0xC100) * 50.0f; cos = Math_CosS(this->actor.home.rot.y + 0xC100) * 50.0f; this->unk_2AC = 1; @@ -120,7 +120,7 @@ void EnBombers2_ChangeAnim(EnBombers2* this, s32 animIndex, f32 playSpeed) { lastFrame = Animation_GetLastFrame(sAnimations[this->animIndex]); this->lastAnimFrame = lastFrame; Animation_Change(&this->skelAnime, sAnimations[this->animIndex], playSpeed, 0.0f, lastFrame, - sAnimModes[this->animIndex], -10.0f); + sAnimationModes[this->animIndex], -10.0f); } void func_80C04B40(EnBombers2* this) { diff --git a/src/overlays/actors/ovl_En_Bomjima/z_en_bomjima.c b/src/overlays/actors/ovl_En_Bomjima/z_en_bomjima.c index 75ad8576d..6c5a6f235 100644 --- a/src/overlays/actors/ovl_En_Bomjima/z_en_bomjima.c +++ b/src/overlays/actors/ovl_En_Bomjima/z_en_bomjima.c @@ -757,7 +757,7 @@ void func_80BFFBC4(EnBomjima* this, PlayState* play) { if (D_80C009F0 >= 104) { D_80C009F0 = 0; func_801477B4(play); - play->nextEntranceIndex = Entrance_CreateIndexFromSpawn(6); + play->nextEntrance = Entrance_CreateFromSpawn(6); gSaveContext.nextCutsceneIndex = 0; play->transitionTrigger = TRANS_TRIGGER_START; play->transitionType = TRANS_TYPE_86; diff --git a/src/overlays/actors/ovl_En_Bomjimb/z_en_bomjimb.c b/src/overlays/actors/ovl_En_Bomjimb/z_en_bomjimb.c index 078988d9d..87d6f186c 100644 --- a/src/overlays/actors/ovl_En_Bomjimb/z_en_bomjimb.c +++ b/src/overlays/actors/ovl_En_Bomjimb/z_en_bomjimb.c @@ -81,7 +81,7 @@ static AnimationHeader* sAnimations[] = { &object_cs_Anim_0031C4, &object_cs_Anim_010B68, }; -static u8 sAnimModes[] = { +static u8 sAnimationModes[] = { ANIMMODE_LOOP, ANIMMODE_LOOP, ANIMMODE_LOOP, ANIMMODE_LOOP, ANIMMODE_LOOP, ANIMMODE_LOOP, ANIMMODE_ONCE, ANIMMODE_ONCE, ANIMMODE_LOOP, ANIMMODE_LOOP, ANIMMODE_LOOP, ANIMMODE_LOOP, ANIMMODE_ONCE, ANIMMODE_LOOP, ANIMMODE_LOOP, ANIMMODE_LOOP, ANIMMODE_ONCE, ANIMMODE_LOOP, @@ -177,8 +177,8 @@ void EnBomjimb_Destroy(Actor* thisx, PlayState* play) { void func_80C0113C(EnBomjimb* this, s32 arg1, f32 arg2) { this->unk_2DC = arg1; this->unk_2B8 = Animation_GetLastFrame(sAnimations[arg1]); - Animation_Change(&this->skelAnime, sAnimations[this->unk_2DC], arg2, 0.0f, this->unk_2B8, sAnimModes[this->unk_2DC], - -4.0f); + Animation_Change(&this->skelAnime, sAnimations[this->unk_2DC], arg2, 0.0f, this->unk_2B8, + sAnimationModes[this->unk_2DC], -4.0f); } void func_80C011CC(EnBomjimb* this) { @@ -790,12 +790,12 @@ void func_80C02BCC(EnBomjimb* this, PlayState* play) { void func_80C02CA4(EnBomjimb* this, PlayState* play) { if (BREG(13) == 0) { - play->nextEntranceIndex = play->setupExitList[this->unk_2B2]; + play->nextEntrance = play->setupExitList[this->unk_2B2]; gSaveContext.nextCutsceneIndex = 0; Scene_SetExitFade(play); play->transitionTrigger = TRANS_TRIGGER_START; } else { - play->nextEntranceIndex = Entrance_CreateIndexFromSpawn(5); + play->nextEntrance = Entrance_CreateFromSpawn(5); gSaveContext.nextCutsceneIndex = 0; play->transitionTrigger = TRANS_TRIGGER_START; play->transitionType = TRANS_TYPE_86; diff --git a/src/overlays/actors/ovl_En_Cne_01/z_en_cne_01.c b/src/overlays/actors/ovl_En_Cne_01/z_en_cne_01.c index a9aa59c7b..889055ee8 100644 --- a/src/overlays/actors/ovl_En_Cne_01/z_en_cne_01.c +++ b/src/overlays/actors/ovl_En_Cne_01/z_en_cne_01.c @@ -142,13 +142,13 @@ s32 func_809CB4A0(EnCne01* this, PlayState* play) { Actor_GetScreenPos(play, &this->enHy.actor, &x, &y); //! @bug: Both x and y conditionals are always true, || should be an && if (!this->enHy.waitingOnInit && ((x >= 0) || (x < SCREEN_WIDTH)) && ((y >= 0) || (y < SCREEN_HEIGHT))) { - func_800B85E0(&this->enHy.actor, play, 30.0f, EXCH_ITEM_2E); + func_800B85E0(&this->enHy.actor, play, 30.0f, PLAYER_AP_MAGIC_BEANS); } return true; } void EnCne01_FinishInit(EnHy* this, PlayState* play) { - if (EnHy_Init(this, play, &gCneSkel, ENHY_ANIMATION_OS_ANIME_11)) { + if (EnHy_Init(this, play, &gCneSkel, ENHY_ANIM_OS_ANIME_11)) { this->actor.flags |= ACTOR_FLAG_1; this->actor.draw = EnCne01_Draw; this->waitingOnInit = false; diff --git a/src/overlays/actors/ovl_En_Dai/z_en_dai.c b/src/overlays/actors/ovl_En_Dai/z_en_dai.c index 61eefbe1e..4f8d5eaaa 100644 --- a/src/overlays/actors/ovl_En_Dai/z_en_dai.c +++ b/src/overlays/actors/ovl_En_Dai/z_en_dai.c @@ -128,7 +128,7 @@ s32 func_80B3E5B4(EnDai* this, PlayState* play) { } s32 func_80B3E5DC(EnDai* this, s32 arg1) { - static AnimationInfoS D_80B3FBFC[] = { + static AnimationInfoS sAnimationInfo[] = { { &object_dai_Anim_0079E4, 1.0f, 0, -1, ANIMMODE_LOOP, 0 }, { &object_dai_Anim_0079E4, 1.0f, 0, -1, ANIMMODE_LOOP, -4 }, { &object_dai_Anim_007354, 1.0f, 0, -1, ANIMMODE_ONCE, -4 }, @@ -167,7 +167,7 @@ s32 func_80B3E5DC(EnDai* this, s32 arg1) { if (phi_v1) { this->unk_A70 = arg1; - ret = SubS_ChangeAnimationByInfoS(&this->skelAnime, D_80B3FBFC, arg1); + ret = SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimationInfo, arg1); } return ret; @@ -561,7 +561,7 @@ void EnDai_Update(Actor* thisx, PlayState* play) { SkelAnime_Update(&this->skelAnime); func_80B3E834(this); if (!(this->unk_1CE & 0x200)) { - func_8013C964(&this->actor, play, 0.0f, 0.0f, EXCH_ITEM_NONE, this->unk_1CE & 7); + func_8013C964(&this->actor, play, 0.0f, 0.0f, PLAYER_AP_NONE, this->unk_1CE & 7); } func_80B3E460(this); } diff --git a/src/overlays/actors/ovl_En_Daiku/z_en_daiku.c b/src/overlays/actors/ovl_En_Daiku/z_en_daiku.c index 2e7442fa4..45777c681 100644 --- a/src/overlays/actors/ovl_En_Daiku/z_en_daiku.c +++ b/src/overlays/actors/ovl_En_Daiku/z_en_daiku.c @@ -63,7 +63,7 @@ static AnimationHeader* sAnimations[] = { &object_daiku_Anim_001114, &object_daiku_Anim_00B690, &object_daiku_Anim_00BEAC, }; -static u8 sAnimModes[] = { +static u8 sAnimationModes[] = { ANIMMODE_LOOP, ANIMMODE_LOOP, ANIMMODE_LOOP, ANIMMODE_LOOP, ANIMMODE_ONCE, ANIMMODE_LOOP, ANIMMODE_LOOP, ANIMMODE_ONCE, ANIMMODE_ONCE, }; @@ -131,7 +131,7 @@ void EnDaiku_Destroy(Actor* thisx, PlayState* play) { void func_8094373C(EnDaiku* this, s32 arg1) { this->unk_284 = Animation_GetLastFrame(sAnimations[arg1]); - Animation_Change(&this->skelAnime, sAnimations[arg1], 1.0f, 0.0f, this->unk_284, sAnimModes[arg1], -4.0f); + Animation_Change(&this->skelAnime, sAnimations[arg1], 1.0f, 0.0f, this->unk_284, sAnimationModes[arg1], -4.0f); } void func_809437C8(EnDaiku* this) { diff --git a/src/overlays/actors/ovl_En_Demo_heishi/z_en_demo_heishi.c b/src/overlays/actors/ovl_En_Demo_heishi/z_en_demo_heishi.c index 4b6eae5bb..47e11a2e8 100644 --- a/src/overlays/actors/ovl_En_Demo_heishi/z_en_demo_heishi.c +++ b/src/overlays/actors/ovl_En_Demo_heishi/z_en_demo_heishi.c @@ -15,7 +15,7 @@ void EnDemoheishi_Destroy(Actor* thisx, PlayState* play); void EnDemoheishi_Update(Actor* thisx, PlayState* play); void EnDemoheishi_Draw(Actor* thisx, PlayState* play); -void EnDemoheishi_ChangeAnimation(EnDemoheishi* this, s32 animIndex); +void EnDemoheishi_ChangeAnim(EnDemoheishi* this, s32 animIndex); void EnDemoheishi_SetupIdle(EnDemoheishi* this); void EnDemoheishi_Idle(EnDemoheishi* this, PlayState* play); void EnDemoheishi_SetupTalk(EnDemoheishi* this); @@ -23,12 +23,12 @@ void EnDemoheishi_Talk(EnDemoheishi* this, PlayState* play); s32 EnDemoheishi_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx); typedef enum { - /* 0 */ DEMOHEISHI_ANIMATION_STAND_HAND_ON_HIP, - /* 1 */ DEMOHEISHI_ANIMATION_CHEER_WITH_SPEAR, - /* 2 */ DEMOHEISHI_ANIMATION_WAVE, - /* 3 */ DEMOHEISHI_ANIMATION_SIT_AND_REACH, - /* 4 */ DEMOHEISHI_ANIMATION_STAND_UP -} EnDemoheishiAnimationIndex; + /* 0 */ DEMOHEISHI_ANIM_STAND_HAND_ON_HIP, + /* 1 */ DEMOHEISHI_ANIM_CHEER_WITH_SPEAR, + /* 2 */ DEMOHEISHI_ANIM_WAVE, + /* 3 */ DEMOHEISHI_ANIM_SIT_AND_REACH, + /* 4 */ DEMOHEISHI_ANIM_STAND_UP +} EnDemoheishiAnimation; const ActorInit En_Demo_heishi_InitVars = { ACTOR_EN_DEMO_HEISHI, @@ -83,19 +83,19 @@ void EnDemoheishi_Destroy(Actor* thisx, PlayState* play) { Collider_DestroyCylinder(play, &this->colliderCylinder); } -void EnDemoheishi_ChangeAnimation(EnDemoheishi* this, s32 animIndex) { +void EnDemoheishi_ChangeAnim(EnDemoheishi* this, s32 animIndex) { static AnimationHeader* sAnimations[] = { &gSoldierStandHandOnHip, &gSoldierCheerWithSpear, &gSoldierWave, &gSoldierSitAndReach, &gSoldierStandUp, }; - static u8 sAnimModes[] = { + static u8 sAnimationModes[] = { ANIMMODE_LOOP, ANIMMODE_LOOP, ANIMMODE_LOOP, ANIMMODE_LOOP, ANIMMODE_ONCE, ANIMMODE_LOOP, - ANIMMODE_LOOP, ANIMMODE_LOOP, ANIMMODE_LOOP, ANIMMODE_LOOP, ANIMMODE_LOOP, ANIMMODE_LOOP + ANIMMODE_LOOP, ANIMMODE_LOOP, ANIMMODE_LOOP, ANIMMODE_LOOP, ANIMMODE_LOOP, ANIMMODE_LOOP, }; this->animIndex = animIndex; this->frameCount = Animation_GetLastFrame(sAnimations[animIndex]); Animation_Change(&this->skelAnime, sAnimations[this->animIndex], 1.0f, 0.0f, this->frameCount, - sAnimModes[this->animIndex], -10.0f); + sAnimationModes[this->animIndex], -10.0f); } void EnDemoheishi_SetHeadRotation(EnDemoheishi* this) { @@ -114,7 +114,7 @@ void EnDemoheishi_SetHeadRotation(EnDemoheishi* this) { } void EnDemoheishi_SetupIdle(EnDemoheishi* this) { - EnDemoheishi_ChangeAnimation(this, DEMOHEISHI_ANIMATION_STAND_HAND_ON_HIP); + EnDemoheishi_ChangeAnim(this, DEMOHEISHI_ANIM_STAND_HAND_ON_HIP); this->textIdIndex = 0; this->actor.textId = sTextIds[this->textIdIndex]; this->isTalking = false; diff --git a/src/overlays/actors/ovl_En_Dg/z_en_dg.c b/src/overlays/actors/ovl_En_Dg/z_en_dg.c index 8b9d67e64..ef93a501a 100644 --- a/src/overlays/actors/ovl_En_Dg/z_en_dg.c +++ b/src/overlays/actors/ovl_En_Dg/z_en_dg.c @@ -165,26 +165,26 @@ static DamageTable sDamageTable = { }; typedef enum { - /* 0 */ DOG_ANIMATION_WALK_AFTER_TALKING, - /* 1 */ DOG_ANIMATION_WALK, - /* 2 */ DOG_ANIMATION_RUN, - /* 3 */ DOG_ANIMATION_BARK, - /* 4 */ DOG_ANIMATION_SIT_DOWN_ONCE, // unused - /* 5 */ DOG_ANIMATION_SIT_DOWN, - /* 6 */ DOG_ANIMATION_LYING_DOWN_START_1, // unused - /* 7 */ DOG_ANIMATION_LYING_DOWN_LOOP, // unused - /* 8 */ DOG_ANIMATION_LYING_DOWN_START_2, // unused - /* 9 */ DOG_ANIMATION_LYING_DOWN_START_3, // unused - /* 10 */ DOG_ANIMATION_LYING_DOWN_START_4, // unused - /* 11 */ DOG_ANIMATION_WALK_BACKWARDS, - /* 12 */ DOG_ANIMATION_JUMP, - /* 13 */ DOG_ANIMATION_LONG_JUMP, // unused - /* 14 */ DOG_ANIMATION_JUMP_ATTACK, - /* 15 */ DOG_ANIMATION_SWIM, - /* 16 */ DOG_ANIMATION_MAX -} DogAnimationIndex; + /* 0 */ DOG_ANIM_WALK_AFTER_TALKING, + /* 1 */ DOG_ANIM_WALK, + /* 2 */ DOG_ANIM_RUN, + /* 3 */ DOG_ANIM_BARK, + /* 4 */ DOG_ANIM_SIT_DOWN_ONCE, // unused + /* 5 */ DOG_ANIM_SIT_DOWN, + /* 6 */ DOG_ANIM_LYING_DOWN_START_1, // unused + /* 7 */ DOG_ANIM_LYING_DOWN_LOOP, // unused + /* 8 */ DOG_ANIM_LYING_DOWN_START_2, // unused + /* 9 */ DOG_ANIM_LYING_DOWN_START_3, // unused + /* 10 */ DOG_ANIM_LYING_DOWN_START_4, // unused + /* 11 */ DOG_ANIM_WALK_BACKWARDS, + /* 12 */ DOG_ANIM_JUMP, + /* 13 */ DOG_ANIM_LONG_JUMP, // unused + /* 14 */ DOG_ANIM_JUMP_ATTACK, + /* 15 */ DOG_ANIM_SWIM, + /* 16 */ DOG_ANIM_MAX +} DogAnimation; -static AnimationInfoS sAnimations[] = { +static AnimationInfoS sAnimationInfo[] = { { &gDogWalkAnim, 1.0f, 0, -1, ANIMMODE_LOOP, 0 }, { &gDogWalkAnim, 1.0f, 0, -1, ANIMMODE_LOOP, -6 }, { &gDogRunAnim, 1.0f, 0, -1, ANIMMODE_LOOP, 0 }, { &gDogBarkAnim, 1.0f, 0, -1, ANIMMODE_LOOP, -6 }, { &gDogSitAnim, 1.0f, 0, -1, ANIMMODE_ONCE, -6 }, { &gDogSitAnim, 1.0f, 0, -1, ANIMMODE_LOOP_PARTIAL, -6 }, @@ -199,10 +199,10 @@ static InitChainEntry sInitChain[] = { ICHAIN_F32(uncullZoneForward, 1000, ICHAIN_STOP), }; -void EnDg_ChangeAnimation(SkelAnime* skelAnime, AnimationInfoS* animationInfo, s32 index) { +void EnDg_ChangeAnim(SkelAnime* skelAnime, AnimationInfoS* animationInfo, s32 animIndex) { f32 frameCount; - animationInfo += index; + animationInfo += animIndex; if (animationInfo->frameCount < 0) { frameCount = Animation_GetLastFrame(animationInfo->animation); } else { @@ -398,15 +398,15 @@ void EnDg_SetupIdleMove(EnDg* this, PlayState* play) { if (!(this->actor.bgCheckFlags & 0x20)) { if ((this->index == ENDG_INDEX_SWAMP_SPIDER_HOUSE) || ((this->index == ENDG_INDEX_ROMANI_RANCH) && (play->sceneNum == SCENE_OMOYA))) { - EnDg_ChangeAnimation(&this->skelAnime, sAnimations, DOG_ANIMATION_WALK); + EnDg_ChangeAnim(&this->skelAnime, sAnimationInfo, DOG_ANIM_WALK); } else if (this->index == ENDG_INDEX_ROMANI_RANCH) { - EnDg_ChangeAnimation(&this->skelAnime, sAnimations, DOG_ANIMATION_RUN); + EnDg_ChangeAnim(&this->skelAnime, sAnimationInfo, DOG_ANIM_RUN); } else if (play->sceneNum == SCENE_CLOCKTOWER) { - EnDg_ChangeAnimation(&this->skelAnime, sAnimations, DOG_ANIMATION_RUN); + EnDg_ChangeAnim(&this->skelAnime, sAnimationInfo, DOG_ANIM_RUN); } else if (sRacetrackDogInfo[this->index].textId & 0x11) { - EnDg_ChangeAnimation(&this->skelAnime, sAnimations, DOG_ANIMATION_WALK); + EnDg_ChangeAnim(&this->skelAnime, sAnimationInfo, DOG_ANIM_WALK); } else { - EnDg_ChangeAnimation(&this->skelAnime, sAnimations, DOG_ANIMATION_RUN); + EnDg_ChangeAnim(&this->skelAnime, sAnimationInfo, DOG_ANIM_RUN); } this->actionFunc = EnDg_IdleMove; @@ -488,7 +488,7 @@ void EnDg_TryPickUp(EnDg* this, PlayState* play) { this->dogFlags |= DOG_FLAG_HELD; } - EnDg_ChangeAnimation(&this->skelAnime, sAnimations, DOG_ANIMATION_SIT_DOWN); + EnDg_ChangeAnim(&this->skelAnime, sAnimationInfo, DOG_ANIM_SIT_DOWN); this->actor.flags &= ~ACTOR_FLAG_1; this->actor.speedXZ = 0.0f; if (Player_GetMask(play) == PLAYER_MASK_TRUTH) { @@ -555,7 +555,7 @@ void EnDg_CheckForBremenMaskMarch(EnDg* this, PlayState* play) { if (this->index == sBremenMaskFollowerIndex) { if (!(this->dogFlags & DOG_FLAG_FOLLOWING_BREMEN_MASK)) { this->dogFlags |= DOG_FLAG_FOLLOWING_BREMEN_MASK; - EnDg_ChangeAnimation(&this->skelAnime, sAnimations, DOG_ANIMATION_WALK); + EnDg_ChangeAnim(&this->skelAnime, sAnimationInfo, DOG_ANIM_WALK); this->actionFunc = EnDg_SetupBremenMaskApproachPlayer; } else if ((this->actionFunc == EnDg_ApproachPlayer) || (this->actionFunc == EnDg_SitNextToPlayer)) { if (DECR(this->bremenBarkTimer) == 0) { @@ -620,7 +620,7 @@ void EnDg_ChooseActionForForm(EnDg* this, PlayState* play) { this->dogFlags &= ~DOG_FLAG_JUMP_ATTACKING; if ((this->behavior != DOG_BEHAVIOR_ZORA) && (player->actor.speedXZ > 1.0f)) { this->behavior = DOG_BEHAVIOR_ZORA; - EnDg_ChangeAnimation(&this->skelAnime, sAnimations, DOG_ANIMATION_RUN); + EnDg_ChangeAnim(&this->skelAnime, sAnimationInfo, DOG_ANIM_RUN); this->actionFunc = EnDg_ApproachPlayer; } @@ -634,7 +634,7 @@ void EnDg_ChooseActionForForm(EnDg* this, PlayState* play) { this->dogFlags &= ~DOG_FLAG_JUMP_ATTACKING; if ((this->behavior != DOG_BEHAVIOR_GORON) && (player->actor.speedXZ > 1.0f)) { this->behavior = DOG_BEHAVIOR_GORON; - EnDg_ChangeAnimation(&this->skelAnime, sAnimations, DOG_ANIMATION_WALK_BACKWARDS); + EnDg_ChangeAnim(&this->skelAnime, sAnimationInfo, DOG_ANIM_WALK_BACKWARDS); this->timer = 50; this->actionFunc = EnDg_BackAwayFromGoron; } @@ -649,7 +649,7 @@ void EnDg_ChooseActionForForm(EnDg* this, PlayState* play) { this->dogFlags &= ~DOG_FLAG_JUMP_ATTACKING; if ((this->behavior != DOG_BEHAVIOR_DEKU) && (player->actor.speedXZ > 1.0f)) { this->behavior = DOG_BEHAVIOR_DEKU; - EnDg_ChangeAnimation(&this->skelAnime, sAnimations, DOG_ANIMATION_RUN); + EnDg_ChangeAnim(&this->skelAnime, sAnimationInfo, DOG_ANIM_RUN); this->actionFunc = EnDg_ApproachPlayerToAttack; } @@ -684,7 +684,7 @@ void EnDg_IdleMove(EnDg* this, PlayState* play) { if (DECR(this->timer) == 0) { this->timer = Rand_S16Offset(20, 20); - EnDg_ChangeAnimation(&this->skelAnime, sAnimations, DOG_ANIMATION_BARK); + EnDg_ChangeAnim(&this->skelAnime, sAnimationInfo, DOG_ANIM_BARK); this->actionFunc = EnDg_IdleBark; } } @@ -722,7 +722,7 @@ void EnDg_BackAwayFromGoron(EnDg* this, PlayState* play) { if (DECR(this->timer) == 0) { this->timer = 50; - EnDg_ChangeAnimation(&this->skelAnime, sAnimations, DOG_ANIMATION_RUN); + EnDg_ChangeAnim(&this->skelAnime, sAnimationInfo, DOG_ANIM_RUN); this->actionFunc = EnDg_RunAwayFromGoron; } else { Math_SmoothStepToS(&this->actor.shape.rot.y, this->actor.yawTowardsPlayer, 4, 0x3E8, 1); @@ -764,7 +764,7 @@ void EnDg_RunAwayFromGoron(EnDg* this, PlayState* play) { Math_ApproachF(&this->actor.speedXZ, 3.5f, 0.2f, 1.0f); } } else { - EnDg_ChangeAnimation(&this->skelAnime, sAnimations, DOG_ANIMATION_BARK); + EnDg_ChangeAnim(&this->skelAnime, sAnimationInfo, DOG_ANIM_BARK); this->actionFunc = EnDg_BarkAtGoron; } @@ -789,7 +789,7 @@ void EnDg_BarkAtGoron(EnDg* this, PlayState* play) { Math_ApproachS(&this->actor.shape.rot.y, this->actor.yawTowardsPlayer, 4, 0xC00); this->actor.world.rot.y = this->actor.shape.rot.y; if (this->actor.xzDistToPlayer < 250.0f) { - EnDg_ChangeAnimation(&this->skelAnime, sAnimations, DOG_ANIMATION_WALK_BACKWARDS); + EnDg_ChangeAnim(&this->skelAnime, sAnimationInfo, DOG_ANIM_WALK_BACKWARDS); this->timer = 50; this->actionFunc = EnDg_BackAwayFromGoron; } @@ -815,11 +815,11 @@ void EnDg_ApproachPlayerToAttack(EnDg* this, PlayState* play) { this->attackTimer = 20; if (yawDiff < 0x4000) { - EnDg_ChangeAnimation(&this->skelAnime, sAnimations, DOG_ANIMATION_JUMP_ATTACK); + EnDg_ChangeAnim(&this->skelAnime, sAnimationInfo, DOG_ANIM_JUMP_ATTACK); this->actionFunc = EnDg_JumpAttack; } else { - EnDg_ChangeAnimation(&this->skelAnime, sAnimations, DOG_ANIMATION_WALK_BACKWARDS); - sAnimations[DOG_ANIMATION_WALK_BACKWARDS].playSpeed = -1.0f; + EnDg_ChangeAnim(&this->skelAnime, sAnimationInfo, DOG_ANIM_WALK_BACKWARDS); + sAnimationInfo[DOG_ANIM_WALK_BACKWARDS].playSpeed = -1.0f; this->actionFunc = EnDg_SlowlyBackUpBeforeAttacking; } } @@ -866,9 +866,9 @@ void EnDg_SitNextToPlayer(EnDg* this, PlayState* play) { this->actor.world.rot.y = this->actor.shape.rot.y; } else { if (player->stateFlags3 & 0x20000000) { // bremen mask march - EnDg_ChangeAnimation(&this->skelAnime, sAnimations, DOG_ANIMATION_WALK); + EnDg_ChangeAnim(&this->skelAnime, sAnimationInfo, DOG_ANIM_WALK); } else { - EnDg_ChangeAnimation(&this->skelAnime, sAnimations, DOG_ANIMATION_RUN); + EnDg_ChangeAnim(&this->skelAnime, sAnimationInfo, DOG_ANIM_RUN); } this->actionFunc = EnDg_ApproachPlayer; @@ -892,7 +892,7 @@ void EnDg_JumpAttack(EnDg* this, PlayState* play) { this->dogFlags |= DOG_FLAG_BOUNCED; this->collider.base.atFlags &= ~AT_BOUNCED; this->actor.speedXZ *= -1.0f; - EnDg_ChangeAnimation(&this->skelAnime, sAnimations, DOG_ANIMATION_RUN); + EnDg_ChangeAnim(&this->skelAnime, sAnimationInfo, DOG_ANIM_RUN); this->actionFunc = EnDg_RunAfterAttacking; return; } @@ -900,13 +900,13 @@ void EnDg_JumpAttack(EnDg* this, PlayState* play) { if (DECR(this->attackTimer) == 0) { this->attackTimer = 60; this->dogFlags &= ~DOG_FLAG_JUMP_ATTACKING; - EnDg_ChangeAnimation(&this->skelAnime, sAnimations, DOG_ANIMATION_RUN); + EnDg_ChangeAnim(&this->skelAnime, sAnimationInfo, DOG_ANIM_RUN); this->actionFunc = EnDg_RunAfterAttacking; } if (curFrame < 9) { if (Animation_OnFrame(&this->skelAnime, 0.0f)) { - sAnimations[DOG_ANIMATION_JUMP_ATTACK].playSpeed = randPlusMinusPoint5Scaled(1.0f) + 3.0f; + sAnimationInfo[DOG_ANIM_JUMP_ATTACK].playSpeed = randPlusMinusPoint5Scaled(1.0f) + 3.0f; } EnDg_SpawnFloorDustRing(this, play); @@ -915,7 +915,7 @@ void EnDg_JumpAttack(EnDg* this, PlayState* play) { if (Animation_OnFrame(&this->skelAnime, 9.0f)) { f32 rand = randPlusMinusPoint5Scaled(1.5f); - sAnimations[DOG_ANIMATION_JUMP_ATTACK].playSpeed = 1.2f; + sAnimationInfo[DOG_ANIM_JUMP_ATTACK].playSpeed = 1.2f; this->actor.velocity.y = 2.0f * rand + 3.0f; this->actor.speedXZ = 8.0f + rand; } else if (curFrame > 20) { @@ -939,10 +939,10 @@ void EnDg_JumpAttack(EnDg* this, PlayState* play) { */ void EnDg_WalkToPlayer(EnDg* this, PlayState* play) { if (this->actor.xzDistToPlayer < 150.0f) { - EnDg_ChangeAnimation(&this->skelAnime, sAnimations, DOG_ANIMATION_WALK_BACKWARDS); + EnDg_ChangeAnim(&this->skelAnime, sAnimationInfo, DOG_ANIM_WALK_BACKWARDS); this->actionFunc = EnDg_BackAwayFromPlayer; } else if (this->actor.xzDistToPlayer < 200.0f) { - EnDg_ChangeAnimation(&this->skelAnime, sAnimations, DOG_ANIMATION_BARK); + EnDg_ChangeAnim(&this->skelAnime, sAnimationInfo, DOG_ANIM_BARK); this->actionFunc = EnDg_BarkAtPlayer; } else { Math_ApproachS(&this->actor.shape.rot.y, this->actor.yawTowardsPlayer, 4, 0xC00); @@ -965,7 +965,7 @@ void EnDg_SetupBremenMaskApproachPlayer(EnDg* this, PlayState* play) { void EnDg_Fall(EnDg* this, PlayState* play) { if (this->actor.bgCheckFlags & 1) { - EnDg_ChangeAnimation(&this->skelAnime, sAnimations, DOG_ANIMATION_RUN); + EnDg_ChangeAnim(&this->skelAnime, sAnimationInfo, DOG_ANIM_RUN); this->actionFunc = EnDg_IdleMove; } @@ -990,7 +990,7 @@ void EnDg_ApproachPlayer(EnDg* this, PlayState* play) { this->actor.world.rot.y = this->actor.shape.rot.y; if (this->actor.xzDistToPlayer < 40.0f) { - EnDg_ChangeAnimation(&this->skelAnime, sAnimations, DOG_ANIMATION_SIT_DOWN); + EnDg_ChangeAnim(&this->skelAnime, sAnimationInfo, DOG_ANIM_SIT_DOWN); this->actionFunc = EnDg_SitNextToPlayer; } else if (player->stateFlags3 & 0x20000000) { // bremen mask march if ((this->actor.xzDistToPlayer > 40.0f) && (player->linearVelocity == 0.0f)) { @@ -1019,14 +1019,14 @@ void EnDg_ApproachPlayer(EnDg* this, PlayState* play) { */ void EnDg_SlowlyBackUpBeforeAttacking(EnDg* this, PlayState* play) { if (this->actor.xzDistToPlayer > 72.0f) { - EnDg_ChangeAnimation(&this->skelAnime, sAnimations, DOG_ANIMATION_JUMP_ATTACK); + EnDg_ChangeAnim(&this->skelAnime, sAnimationInfo, DOG_ANIM_JUMP_ATTACK); this->actionFunc = EnDg_JumpAttack; } Math_SmoothStepToS(&this->actor.shape.rot.y, this->actor.yawTowardsPlayer, 4, 0x3E8, 1); if (this->actor.bgCheckFlags & 8) { this->actor.shape.rot.y = this->actor.wallYaw; - EnDg_ChangeAnimation(&this->skelAnime, sAnimations, DOG_ANIMATION_JUMP_ATTACK); + EnDg_ChangeAnim(&this->skelAnime, sAnimationInfo, DOG_ANIM_JUMP_ATTACK); this->actionFunc = EnDg_JumpAttack; } @@ -1045,10 +1045,10 @@ void EnDg_SlowlyBackUpBeforeAttacking(EnDg* this, PlayState* play) { */ void EnDg_BackAwayFromPlayer(EnDg* this, PlayState* play) { if (this->actor.xzDistToPlayer > 200.0f) { - EnDg_ChangeAnimation(&this->skelAnime, sAnimations, DOG_ANIMATION_WALK); + EnDg_ChangeAnim(&this->skelAnime, sAnimationInfo, DOG_ANIM_WALK); this->actionFunc = EnDg_WalkToPlayer; } else if (this->actor.xzDistToPlayer > 150.0f) { - EnDg_ChangeAnimation(&this->skelAnime, sAnimations, DOG_ANIMATION_BARK); + EnDg_ChangeAnim(&this->skelAnime, sAnimationInfo, DOG_ANIM_BARK); this->actionFunc = EnDg_BarkAtPlayer; } else { Math_SmoothStepToS(&this->actor.shape.rot.y, this->actor.yawTowardsPlayer, 4, 0x3E8, 1); @@ -1073,10 +1073,10 @@ void EnDg_BackAwayFromPlayer(EnDg* this, PlayState* play) { */ void EnDg_BarkAtPlayer(EnDg* this, PlayState* play) { if (this->actor.xzDistToPlayer < 150.0f) { - EnDg_ChangeAnimation(&this->skelAnime, sAnimations, DOG_ANIMATION_WALK_BACKWARDS); + EnDg_ChangeAnim(&this->skelAnime, sAnimationInfo, DOG_ANIM_WALK_BACKWARDS); this->actionFunc = EnDg_BackAwayFromPlayer; } else if (this->actor.xzDistToPlayer > 200.0f) { - EnDg_ChangeAnimation(&this->skelAnime, sAnimations, DOG_ANIMATION_WALK); + EnDg_ChangeAnim(&this->skelAnime, sAnimationInfo, DOG_ANIM_WALK); this->actionFunc = EnDg_WalkToPlayer; } @@ -1180,7 +1180,7 @@ void EnDg_Swim(EnDg* this, PlayState* play) { this->behavior = DOG_BEHAVIOR_DEFAULT; this->timer = Rand_S16Offset(60, 60); Actor_PlaySfxAtPos(&this->actor, NA_SE_EV_OUT_OF_WATER); - EnDg_ChangeAnimation(&this->skelAnime, sAnimations, DOG_ANIMATION_RUN); + EnDg_ChangeAnim(&this->skelAnime, sAnimationInfo, DOG_ANIM_RUN); Math_ApproachF(&this->actor.speedXZ, 3.5f, 0.2f, 1.0f); this->actionFunc = EnDg_IdleMove; } @@ -1226,7 +1226,7 @@ void EnDg_JumpOutOfWater(EnDg* this, PlayState* play) { this->actor.gravity = -3.0f; this->timer = Rand_S16Offset(60, 60); Actor_PlaySfxAtPos(&this->actor, NA_SE_EV_OUT_OF_WATER); - EnDg_ChangeAnimation(&this->skelAnime, sAnimations, DOG_ANIMATION_RUN); + EnDg_ChangeAnim(&this->skelAnime, sAnimationInfo, DOG_ANIM_RUN); this->actionFunc = EnDg_IdleMove; Math_ApproachF(&this->actor.speedXZ, 3.5f, 0.2f, 1.0f); } else { @@ -1292,7 +1292,7 @@ void EnDg_SetupTalk(EnDg* this, PlayState* play) { void EnDg_Talk(EnDg* this, PlayState* play) { if (Message_GetState(&play->msgCtx) == TEXT_STATE_CLOSING) { - EnDg_ChangeAnimation(&this->skelAnime, sAnimations, DOG_ANIMATION_WALK_AFTER_TALKING); + EnDg_ChangeAnim(&this->skelAnime, sAnimationInfo, DOG_ANIM_WALK_AFTER_TALKING); this->actionFunc = EnDg_Held; } } @@ -1349,7 +1349,7 @@ void EnDg_Update(Actor* thisx, PlayState* play) { } if ((this->actor.bgCheckFlags & 0x40) && Actor_HasNoParent(&this->actor, play)) { - EnDg_ChangeAnimation(&this->skelAnime, sAnimations, DOG_ANIMATION_SWIM); + EnDg_ChangeAnim(&this->skelAnime, sAnimationInfo, DOG_ANIM_SWIM); this->actionFunc = EnDg_SetupSwim; } diff --git a/src/overlays/actors/ovl_En_Dnk/z_en_dnk.c b/src/overlays/actors/ovl_En_Dnk/z_en_dnk.c index 7a2f1cf80..7afd4e224 100644 --- a/src/overlays/actors/ovl_En_Dnk/z_en_dnk.c +++ b/src/overlays/actors/ovl_En_Dnk/z_en_dnk.c @@ -93,7 +93,7 @@ static DamageTable sDamageTable = { /* Powder Keg */ DMG_ENTRY(1, 0x0), }; -static AnimationInfoS sAnimations[] = { +static AnimationInfoS sAnimationInfo[] = { { &gDekuPalaceGuardStartAnim, 1.0f, 0, -1, ANIMMODE_ONCE, 0 }, { &gDekuPalaceGuardStartAnim, 1.0f, 0, -1, ANIMMODE_ONCE, -4 }, { &gDekuPalaceGuardWaitAnim, 1.0f, 0, -1, ANIMMODE_LOOP, -4 }, @@ -138,18 +138,18 @@ s32 func_80A514F0(SkelAnime* skelAnime, s16 animIndex) { s32 sp30 = false; if (animIndex >= 0) { - if (animIndex < ARRAY_COUNT(sAnimations)) { + if (animIndex < ARRAY_COUNT(sAnimationInfo)) { sp30 = true; - frameCount = sAnimations[animIndex].frameCount; + frameCount = sAnimationInfo[animIndex].frameCount; if (frameCount < 0) { - frameCount = Animation_GetLastFrame(sAnimations[animIndex].animation); + frameCount = Animation_GetLastFrame(sAnimationInfo[animIndex].animation); } - frame = sAnimations[animIndex].startFrame; + frame = sAnimationInfo[animIndex].startFrame; if (frame < 0) { frame = frameCount; } - Animation_Change(skelAnime, sAnimations[animIndex].animation, sAnimations[animIndex].playSpeed, frame, - frameCount, sAnimations[animIndex].mode, sAnimations[animIndex].morphFrames); + Animation_Change(skelAnime, sAnimationInfo[animIndex].animation, sAnimationInfo[animIndex].playSpeed, frame, + frameCount, sAnimationInfo[animIndex].mode, sAnimationInfo[animIndex].morphFrames); } } return sp30; diff --git a/src/overlays/actors/ovl_En_Dno/z_en_dno.c b/src/overlays/actors/ovl_En_Dno/z_en_dno.c index 178ac23c2..3c872c0e8 100644 --- a/src/overlays/actors/ovl_En_Dno/z_en_dno.c +++ b/src/overlays/actors/ovl_En_Dno/z_en_dno.c @@ -517,7 +517,7 @@ void func_80A724B8(EnDno* this, PlayState* play) { } void func_80A7256C(EnDno* this, PlayState* play) { - func_800B8500(&this->actor, play, this->actor.xzDistToPlayer, this->actor.playerHeightRel, EXCH_ITEM_MINUS1); + func_800B8500(&this->actor, play, this->actor.xzDistToPlayer, this->actor.playerHeightRel, PLAYER_AP_MINUS1); } void func_80A72598(EnDno* this, PlayState* play) { diff --git a/src/overlays/actors/ovl_En_Dnp/z_en_dnp.c b/src/overlays/actors/ovl_En_Dnp/z_en_dnp.c index 3d084d849..604453640 100644 --- a/src/overlays/actors/ovl_En_Dnp/z_en_dnp.c +++ b/src/overlays/actors/ovl_En_Dnp/z_en_dnp.c @@ -56,7 +56,7 @@ static ColliderCylinderInit sCylinderInit = { static CollisionCheckInfoInit2 sColChkInfoInit = { 0, 0, 0, 0, MASS_IMMOVABLE }; -static AnimationInfoS sAnimations[] = { +static AnimationInfoS sAnimationInfo[] = { { &object_dnp_Anim_0007D8, 1.0f, 0, -1, ANIMMODE_ONCE, -4 }, { &object_dnp_Anim_0021DC, 1.0f, 0, -1, ANIMMODE_LOOP, 0 }, { &object_dnp_Anim_0021DC, 1.0f, 0, -1, ANIMMODE_LOOP, -4 }, @@ -135,7 +135,7 @@ s32 func_80B3CC38(EnDnp* this, s32 arg1) { if (arg1 != this->unk_340) { this->unk_340 = arg1; - ret = SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimations, arg1); + ret = SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimationInfo, arg1); } return ret; @@ -304,7 +304,7 @@ void func_80B3D338(EnDnp* this, PlayState* play) { } else { this->actor.textId = 0x971; player->actor.textId = this->actor.textId; - func_800B8500(&this->actor, play, 9999.9f, 9999.9f, EXCH_ITEM_MINUS1); + func_800B8500(&this->actor, play, 9999.9f, 9999.9f, PLAYER_AP_MINUS1); } } } @@ -409,7 +409,7 @@ void EnDnp_Update(Actor* thisx, PlayState* play) { if ((this->unk_322 & 0x400) && !(gSaveContext.save.weekEventReg[23] & 0x20)) { Actor_PickUp(&this->actor, play, GI_MAX, sp2C, sp28); } - func_8013C964(&this->actor, play, sp2C, sp28, EXCH_ITEM_NONE, this->unk_322 & 7); + func_8013C964(&this->actor, play, sp2C, sp28, PLAYER_AP_NONE, this->unk_322 & 7); Actor_SetFocus(&this->actor, 30.0f); func_80B3CC80(this, play); } diff --git a/src/overlays/actors/ovl_En_Dnq/z_en_dnq.c b/src/overlays/actors/ovl_En_Dnq/z_en_dnq.c index 218b41cb6..6b21d3fc1 100644 --- a/src/overlays/actors/ovl_En_Dnq/z_en_dnq.c +++ b/src/overlays/actors/ovl_En_Dnq/z_en_dnq.c @@ -57,7 +57,7 @@ static ColliderCylinderInit sCylinderInit = { static CollisionCheckInfoInit2 sColChkInfoInit = { 1, 0, 0, 0, MASS_IMMOVABLE }; -static AnimationInfoS D_80A5349C[] = { +static AnimationInfoS sAnimationInfo[] = { { &object_dnq_Anim_008328, 1.0f, 0, -1, ANIMMODE_LOOP, 0 }, { &object_dnq_Anim_008328, 1.0f, 0, -1, ANIMMODE_LOOP, -4 }, { &object_dnq_Anim_007528, 1.0f, 0, -1, ANIMMODE_ONCE, -4 }, @@ -105,7 +105,7 @@ s32 func_80A5257C(EnDnq* this, s32 arg1) { if (phi_v1) { this->unk_398 = arg1; - ret = SubS_ChangeAnimationByInfoS(&this->skelAnime, D_80A5349C, arg1); + ret = SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimationInfo, arg1); } return ret; @@ -456,7 +456,7 @@ void EnDnq_Update(Actor* thisx, PlayState* play) { this->unk_394 = this->picto.actor.xzDistToPlayer; func_80A52C6C(this, play); func_8013C964(&this->picto.actor, play, this->unk_390, fabsf(this->picto.actor.playerHeightRel) + 1.0f, - EXCH_ITEM_NONE, this->unk_37C & 7); + PLAYER_AP_NONE, this->unk_37C & 7); this->picto.actor.xzDistToPlayer = this->unk_394; Actor_SetFocus(&this->picto.actor, 46.0f); func_80A52604(this, play); diff --git a/src/overlays/actors/ovl_En_Dns/z_en_dns.c b/src/overlays/actors/ovl_En_Dns/z_en_dns.c index 92dbc1126..f8588614f 100644 --- a/src/overlays/actors/ovl_En_Dns/z_en_dns.c +++ b/src/overlays/actors/ovl_En_Dns/z_en_dns.c @@ -20,18 +20,18 @@ void EnDns_DoNothing(EnDns* this, PlayState* play); void func_8092D4D8(EnDns* this, PlayState* play); typedef enum { - /* 0 */ EN_DNS_ANIMATION_IDLE_1, - /* 1 */ EN_DNS_ANIMATION_IDLE_2, - /* 2 */ EN_DNS_ANIMATION_WALK_1, - /* 3 */ EN_DNS_ANIMATION_WALK_2, - /* 4 */ EN_DNS_ANIMATION_SURPRISE_START, - /* 5 */ EN_DNS_ANIMATION_SURPRISE_LOOP, - /* 6 */ EN_DNS_ANIMATION_RUN_START, - /* 7 */ EN_DNS_ANIMATION_RUN_LOOP, - /* 8 */ EN_DNS_ANIMATION_DANCE, - /* 9 */ EN_DNS_ANIMATION_FLIP, - /* 10 */ EN_DNS_ANIMATION_MAX, -} EnDnsAnimationIndex; + /* 0 */ EN_DNS_ANIM_IDLE_1, + /* 1 */ EN_DNS_ANIM_IDLE_2, + /* 2 */ EN_DNS_ANIM_WALK_1, + /* 3 */ EN_DNS_ANIM_WALK_2, + /* 4 */ EN_DNS_ANIM_SURPRISE_START, + /* 5 */ EN_DNS_ANIM_SURPRISE_LOOP, + /* 6 */ EN_DNS_ANIM_RUN_START, + /* 7 */ EN_DNS_ANIM_RUN_LOOP, + /* 8 */ EN_DNS_ANIM_DANCE, + /* 9 */ EN_DNS_ANIM_FLIP, + /* 10 */ EN_DNS_ANIM_MAX, +} EnDnsAnimation; static s32 D_8092DCB0[] = { 0x00172000, 0x050E082F, 0x0C100E08, 0x200C1000, 0x00172000, 0x050E0830, 0x0C100E08, 0x210C1000, @@ -73,7 +73,7 @@ static ColliderCylinderInit sCylinderInit = { static CollisionCheckInfoInit2 sColChkInfoInit = { 1, 0, 0, 0, MASS_IMMOVABLE }; -static AnimationInfoS sAnimations[] = { +static AnimationInfoS sAnimationInfo[] = { { &gKingsChamberDekuGuardIdleAnim, 1.0f, 0, -1, ANIMMODE_LOOP, 0 }, { &gKingsChamberDekuGuardIdleAnim, 1.0f, 0, -1, ANIMMODE_LOOP, -4 }, { &gKingsChamberDekuGuardWalkAnim, 1.0f, 0, -1, ANIMMODE_LOOP, 0 }, @@ -89,8 +89,8 @@ static AnimationInfoS sAnimations[] = { void func_8092C5C0(EnDns* this) { s32 pad; - if (((this->animationIndex == EN_DNS_ANIMATION_WALK_1) || (this->animationIndex == EN_DNS_ANIMATION_WALK_2) || - (this->animationIndex == EN_DNS_ANIMATION_RUN_START) || (this->animationIndex == EN_DNS_ANIMATION_RUN_LOOP)) && + if (((this->animIndex == EN_DNS_ANIM_WALK_1) || (this->animIndex == EN_DNS_ANIM_WALK_2) || + (this->animIndex == EN_DNS_ANIM_RUN_START) || (this->animIndex == EN_DNS_ANIM_RUN_LOOP)) && (Animation_OnFrame(&this->skelAnime, 0.0f) || Animation_OnFrame(&this->skelAnime, 3.0f))) { Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_NUTS_WALK); } @@ -101,31 +101,29 @@ s32 func_8092C63C(EnDns* this, s32 arg1) { s32 ret = false; switch (arg1) { - case EN_DNS_ANIMATION_IDLE_1: - case EN_DNS_ANIMATION_IDLE_2: - if ((this->animationIndex != EN_DNS_ANIMATION_IDLE_1) && - (this->animationIndex != EN_DNS_ANIMATION_IDLE_2)) { + case EN_DNS_ANIM_IDLE_1: + case EN_DNS_ANIM_IDLE_2: + if ((this->animIndex != EN_DNS_ANIM_IDLE_1) && (this->animIndex != EN_DNS_ANIM_IDLE_2)) { phi_v1 = true; } break; - case EN_DNS_ANIMATION_WALK_1: - case EN_DNS_ANIMATION_WALK_2: - if ((this->animationIndex != EN_DNS_ANIMATION_WALK_1) && - (this->animationIndex != EN_DNS_ANIMATION_WALK_2)) { + case EN_DNS_ANIM_WALK_1: + case EN_DNS_ANIM_WALK_2: + if ((this->animIndex != EN_DNS_ANIM_WALK_1) && (this->animIndex != EN_DNS_ANIM_WALK_2)) { phi_v1 = true; } break; default: - if (this->animationIndex != arg1) { + if (this->animIndex != arg1) { phi_v1 = true; } } if (phi_v1) { - this->animationIndex = arg1; - ret = SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimations, arg1); + this->animIndex = arg1; + ret = SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimationInfo, arg1); } return ret; @@ -236,7 +234,7 @@ s32 func_8092CAD0(EnDns* this, PlayState* play) { this->unk_2F0 = 0.0f; if (this->unk_2D2 != 0) { this->unk_2F0 = this->skelAnime.curFrame; - func_8092C63C(this, EN_DNS_ANIMATION_WALK_1); + func_8092C63C(this, EN_DNS_ANIM_WALK_1); } this->unk_2DA = this->actor.world.rot.y; } @@ -306,7 +304,7 @@ s32 func_8092CCEC(EnDns* this, PlayState* play) { } s32 func_8092CE38(EnDns* this) { - static s32 D_8092DE00[] = { EN_DNS_ANIMATION_DANCE, EN_DNS_ANIMATION_DANCE, EN_DNS_ANIMATION_FLIP }; + static s32 D_8092DE00[] = { EN_DNS_ANIM_DANCE, EN_DNS_ANIM_DANCE, EN_DNS_ANIM_FLIP }; s16 frame; s32 pad; Vec3f sp2C; @@ -406,11 +404,11 @@ void func_8092D1B8(EnDns* this, PlayState* play) { play_sound(NA_SE_SY_FOUND); gSaveContext.eventInf[1] |= 0x20; this->unk_2F4 = func_8092CCEC; - func_8092C63C(this, EN_DNS_ANIMATION_WALK_1); + func_8092C63C(this, EN_DNS_ANIM_WALK_1); this->actionFunc = EnDns_DoNothing; } else if (gSaveContext.eventInf[1] & 0x40) { func_8092CCEC(this, play); - func_8092C63C(this, EN_DNS_ANIMATION_WALK_1); + func_8092C63C(this, EN_DNS_ANIM_WALK_1); this->actionFunc = func_8092D330; } Math_ApproachS(&this->actor.shape.rot.y, sp22, 3, 0x2AA8); @@ -439,7 +437,7 @@ void func_8092D330(EnDns* this, PlayState* play) { } if ((this->unk_2C6 & 0x100) && (DECR(this->unk_2D0) == 0)) { this->unk_2C6 &= ~0x100; - play->nextEntranceIndex = 0x5010; + play->nextEntrance = ENTRANCE(DEKU_PALACE, 1); gSaveContext.nextCutsceneIndex = 0; play->transitionTrigger = TRANS_TRIGGER_START; play->transitionType = TRANS_TYPE_03; @@ -452,7 +450,7 @@ void func_8092D4D8(EnDns* this, PlayState* play) { if (ENDNS_GET_4000(&this->actor) && (this->unk_2D2 == 0)) { if (func_8092CE38(this)) { - func_8092C63C(this, EN_DNS_ANIMATION_WALK_1); + func_8092C63C(this, EN_DNS_ANIM_WALK_1); } } else if (func_8010BF58(&this->actor, play, this->unk_1E0, this->unk_2F4, &this->unk_1DC)) { SubS_UpdateFlags(&this->unk_2C6, 3, 7); @@ -461,7 +459,7 @@ void func_8092D4D8(EnDns* this, PlayState* play) { if (!(gSaveContext.eventInf[1] & 0x20)) { this->skelAnime.curFrame = this->unk_2F0; this->actor.world.rot.y = this->unk_2DA; - func_8092C63C(this, EN_DNS_ANIMATION_DANCE); + func_8092C63C(this, EN_DNS_ANIM_DANCE); } this->unk_2CC = 0; this->unk_2CE = 0; @@ -475,10 +473,10 @@ void func_8092D4D8(EnDns* this, PlayState* play) { void func_8092D5E8(EnDns* this, PlayState* play) { static s32 D_8092DE0C[] = { - EN_DNS_ANIMATION_IDLE_1, - EN_DNS_ANIMATION_IDLE_1, - EN_DNS_ANIMATION_SURPRISE_START, - EN_DNS_ANIMATION_RUN_START, + EN_DNS_ANIM_IDLE_1, + EN_DNS_ANIM_IDLE_1, + EN_DNS_ANIM_SURPRISE_START, + EN_DNS_ANIM_RUN_START, }; s32 temp_v0; u32 temp_v1; @@ -491,10 +489,9 @@ void func_8092D5E8(EnDns* this, PlayState* play) { this->unk_1D8 = temp_v1; } - if (((this->animationIndex == EN_DNS_ANIMATION_SURPRISE_START) || - (this->animationIndex == EN_DNS_ANIMATION_RUN_START)) && + if (((this->animIndex == EN_DNS_ANIM_SURPRISE_START) || (this->animIndex == EN_DNS_ANIM_RUN_START)) && Animation_OnFrame(&this->skelAnime, this->skelAnime.endFrame)) { - func_8092C63C(this, this->animationIndex + 1); + func_8092C63C(this, this->animIndex + 1); } Cutscene_ActorTranslateAndYaw(&this->actor, play, temp_v0); @@ -512,8 +509,8 @@ void EnDns_Init(Actor* thisx, PlayState* play) { ActorShape_Init(&this->actor.shape, 0.0f, NULL, 18.0f); SkelAnime_Init(play, &this->skelAnime, &gKingsChamberDekuGuardSkel, NULL, this->jointTable, this->morphTable, KINGS_CHAMBER_DEKU_GUARD_LIMB_MAX); - this->animationIndex = -1; - func_8092C63C(this, EN_DNS_ANIMATION_WALK_1); + this->animIndex = -1; + func_8092C63C(this, EN_DNS_ANIM_WALK_1); Collider_InitAndSetCylinder(play, &this->collider, &this->actor, &sCylinderInit); CollisionCheck_SetInfo2(&this->actor.colChkInfo, DamageTable_Get(0x16), &sColChkInfoInit); Actor_SetScale(&this->actor, 0.01f); @@ -553,7 +550,7 @@ void EnDns_Update(Actor* thisx, PlayState* play) { func_8092C934(this); func_8092C86C(this, play); Actor_UpdateBgCheckInfo(play, &this->actor, 30.0f, 12.0f, 0.0f, 4); - func_8013C964(&this->actor, play, 80.0f, 40.0f, EXCH_ITEM_NONE, this->unk_2C6 & 7); + func_8013C964(&this->actor, play, 80.0f, 40.0f, PLAYER_AP_NONE, this->unk_2C6 & 7); Actor_SetFocus(&this->actor, 34.0f); func_8092C6FC(this, play); func_8092C5C0(this); diff --git a/src/overlays/actors/ovl_En_Dns/z_en_dns.h b/src/overlays/actors/ovl_En_Dns/z_en_dns.h index 3a252b1ec..3a382c192 100644 --- a/src/overlays/actors/ovl_En_Dns/z_en_dns.h +++ b/src/overlays/actors/ovl_En_Dns/z_en_dns.h @@ -53,7 +53,7 @@ typedef struct EnDns { /* 0x2EC */ f32 unk_2EC; /* 0x2F0 */ f32 unk_2F0; /* 0x2F4 */ EnDnsFunc unk_2F4; - /* 0x2F8 */ s32 animationIndex; + /* 0x2F8 */ s32 animIndex; /* 0x2FC */ s32 unk_2FC; } EnDns; // size = 0x300 diff --git a/src/overlays/actors/ovl_En_Dragon/z_en_dragon.c b/src/overlays/actors/ovl_En_Dragon/z_en_dragon.c index 76c2e0897..901efc0d2 100644 --- a/src/overlays/actors/ovl_En_Dragon/z_en_dragon.c +++ b/src/overlays/actors/ovl_En_Dragon/z_en_dragon.c @@ -25,11 +25,11 @@ void EnDragon_Attack(EnDragon* this, PlayState* play); void EnDragon_Dead(EnDragon* this, PlayState* play); typedef enum { - /* 0 */ DEEP_PYTHON_ANIMATION_SMALL_SIDE_SWAY, - /* 1 */ DEEP_PYTHON_ANIMATION_LARGE_SIDE_SWAY, - /* 2 */ DEEP_PYTHON_ANIMATION_VERTICAL_SWAY, - /* 3 */ DEEP_PYTHON_ANIMATION_IDLE -} DeepPythonAnimationIndex; + /* 0 */ DEEP_PYTHON_ANIM_SMALL_SIDE_SWAY, + /* 1 */ DEEP_PYTHON_ANIM_LARGE_SIDE_SWAY, + /* 2 */ DEEP_PYTHON_ANIM_VERTICAL_SWAY, + /* 3 */ DEEP_PYTHON_ANIM_IDLE +} DeepPythonAnimation; typedef enum { /* 0 */ DEEP_PYTHON_EXTEND_STATE_NOT_FULLY_EXTENDED, @@ -264,18 +264,18 @@ static AnimationHeader* sAnimations[] = { static u8 sAnimationModes[] = { ANIMMODE_LOOP, ANIMMODE_LOOP, ANIMMODE_ONCE, ANIMMODE_ONCE }; -void EnDragon_ChangeAnimation(EnDragon* this, s32 animationIndex) { +void EnDragon_ChangeAnim(EnDragon* this, s32 animIndex) { f32 startFrame; - this->animationIndex = animationIndex; - this->endFrame = Animation_GetLastFrame(sAnimations[animationIndex]); + this->animIndex = animIndex; + this->endFrame = Animation_GetLastFrame(sAnimations[animIndex]); startFrame = 0.0f; - if (this->animationIndex == DEEP_PYTHON_ANIMATION_IDLE) { + if (this->animIndex == DEEP_PYTHON_ANIM_IDLE) { startFrame = this->endFrame; } - Animation_Change(&this->skelAnime, sAnimations[animationIndex], 1.0f, startFrame, this->endFrame, - sAnimationModes[this->animationIndex], -4.0f); + Animation_Change(&this->skelAnime, sAnimations[animIndex], 1.0f, startFrame, this->endFrame, + sAnimationModes[this->animIndex], -4.0f); } static Color_RGBA8 sBubblePrimColors[] = { @@ -329,7 +329,7 @@ void EnDragon_RetreatOnceTimerEnds(EnDragon* this, PlayState* play) { } void EnDragon_SetupRetreatOrIdle(EnDragon* this) { - EnDragon_ChangeAnimation(this, DEEP_PYTHON_ANIMATION_IDLE); + EnDragon_ChangeAnim(this, DEEP_PYTHON_ANIM_IDLE); this->state = 0; this->unk_2CC = 0; this->hasGrabbedPlayer = false; @@ -397,8 +397,8 @@ void EnDragon_Extend(EnDragon* this, PlayState* play) { Math_ApproachF(&this->actor.world.pos.z, extendedPos.z, 0.3f, 50.0f); if ((fabsf(this->actor.world.pos.x - extendedPos.x) < 4.0f) && (fabsf(this->actor.world.pos.z - extendedPos.z) < 4.0f)) { - if (this->animationIndex != DEEP_PYTHON_ANIMATION_LARGE_SIDE_SWAY) { - EnDragon_ChangeAnimation(this, DEEP_PYTHON_ANIMATION_LARGE_SIDE_SWAY); + if (this->animIndex != DEEP_PYTHON_ANIM_LARGE_SIDE_SWAY) { + EnDragon_ChangeAnim(this, DEEP_PYTHON_ANIM_LARGE_SIDE_SWAY); } this->state = DEEP_PYTHON_EXTEND_STATE_FULLY_EXTENDED; @@ -419,8 +419,8 @@ void EnDragon_Extend(EnDragon* this, PlayState* play) { if (yaw < 0x5000) { // Player is in front of the jaw if ((this->endFrame <= currentFrame) && (this->largeSwayWaitTimer == 0)) { - if (this->animationIndex != DEEP_PYTHON_ANIMATION_LARGE_SIDE_SWAY) { - EnDragon_ChangeAnimation(this, DEEP_PYTHON_ANIMATION_LARGE_SIDE_SWAY); + if (this->animIndex != DEEP_PYTHON_ANIM_LARGE_SIDE_SWAY) { + EnDragon_ChangeAnim(this, DEEP_PYTHON_ANIM_LARGE_SIDE_SWAY); } this->state = DEEP_PYTHON_EXTEND_STATE_REPEAT_LARGE_SWAY; @@ -430,7 +430,7 @@ void EnDragon_Extend(EnDragon* this, PlayState* play) { } else { // Player is in behind the jaw if (this->state == DEEP_PYTHON_EXTEND_STATE_REPEAT_LARGE_SWAY) { - EnDragon_ChangeAnimation(this, DEEP_PYTHON_ANIMATION_SMALL_SIDE_SWAY); + EnDragon_ChangeAnim(this, DEEP_PYTHON_ANIM_SMALL_SIDE_SWAY); this->largeSwayWaitTimer = Rand_ZeroFloat(20.0f) + this->endFrame; this->state = DEEP_PYTHON_EXTEND_STATE_REPEAT_SMALL_SWAY; } @@ -471,7 +471,7 @@ void EnDragon_SetupGrab(EnDragon* this, PlayState* play) { this->state = DEEP_PYTHON_GRAB_STATE_START; this->grabTimer = 0; this->hasGrabbedPlayer = false; - EnDragon_ChangeAnimation(this, DEEP_PYTHON_ANIMATION_IDLE); + EnDragon_ChangeAnim(this, DEEP_PYTHON_ANIM_IDLE); this->actionFunc = EnDragon_Grab; } } @@ -548,8 +548,8 @@ void EnDragon_Grab(EnDragon* this, PlayState* play) { } void EnDragon_SetupAttack(EnDragon* this) { - if (this->animationIndex != DEEP_PYTHON_ANIMATION_LARGE_SIDE_SWAY) { - EnDragon_ChangeAnimation(this, DEEP_PYTHON_ANIMATION_LARGE_SIDE_SWAY); + if (this->animIndex != DEEP_PYTHON_ANIM_LARGE_SIDE_SWAY) { + EnDragon_ChangeAnim(this, DEEP_PYTHON_ANIM_LARGE_SIDE_SWAY); } this->behindJawRetreatTimer = 0; @@ -603,8 +603,8 @@ void EnDragon_Attack(EnDragon* this, PlayState* play) { if ((this->state <= DEEP_PYTHON_ATTACK_STATE_START) && (this->endFrame <= currentFrame)) { Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_UTSUBO_BITE); - if (this->animationIndex != DEEP_PYTHON_ANIMATION_LARGE_SIDE_SWAY) { - EnDragon_ChangeAnimation(this, DEEP_PYTHON_ANIMATION_LARGE_SIDE_SWAY); + if (this->animIndex != DEEP_PYTHON_ANIM_LARGE_SIDE_SWAY) { + EnDragon_ChangeAnim(this, DEEP_PYTHON_ANIM_LARGE_SIDE_SWAY); } this->state++; diff --git a/src/overlays/actors/ovl_En_Dragon/z_en_dragon.h b/src/overlays/actors/ovl_En_Dragon/z_en_dragon.h index b12c63dd0..321d0ad95 100644 --- a/src/overlays/actors/ovl_En_Dragon/z_en_dragon.h +++ b/src/overlays/actors/ovl_En_Dragon/z_en_dragon.h @@ -26,7 +26,7 @@ typedef struct EnDragon { /* 0x188 */ Vec3s jointTable[DEEP_PYTHON_LIMB_MAX]; /* 0x1E8 */ Vec3s morphTable[DEEP_PYTHON_LIMB_MAX]; /* 0x248 */ EnDragonActionFunc actionFunc; - /* 0x24C */ s32 animationIndex; + /* 0x24C */ s32 animIndex; /* 0x250 */ s32 pythonIndex; /* 0x254 */ Vec3f jawPos; /* 0x260 */ Vec3f burrowEntrancePos; // Vertically and horizontally centered on the burrow opening. Set by Bg_Sinkai_Kabe diff --git a/src/overlays/actors/ovl_En_Drs/z_en_drs.c b/src/overlays/actors/ovl_En_Drs/z_en_drs.c index eecd6be2d..5ecab4fd4 100644 --- a/src/overlays/actors/ovl_En_Drs/z_en_drs.c +++ b/src/overlays/actors/ovl_En_Drs/z_en_drs.c @@ -51,7 +51,7 @@ static ColliderCylinderInit sCylinderInit = { static CollisionCheckInfoInit2 sColChkInfoInit = { 0, 0, 0, 0, MASS_IMMOVABLE }; -static AnimationInfoS sAnimations = { &gWeddingDressMannequinIdleAnim, 1.0f, 0, -1, ANIMMODE_LOOP, 0 }; +static AnimationInfoS sAnimationInfo = { &gWeddingDressMannequinIdleAnim, 1.0f, 0, -1, ANIMMODE_LOOP, 0 }; void EnDrs_CollisionUpdate(EnDrs* this, PlayState* play) { Collider_UpdateCylinder(&this->actor, &this->collider); @@ -65,7 +65,7 @@ void EnDrs_Setup(EnDrs* this, PlayState* play) { ActorShape_Init(&this->actor.shape, 0.0f, NULL, 0.0f); SkelAnime_InitFlex(play, &this->skelAnime, &gWeddingDressMannequinSkel, NULL, this->jointTable, this->morphTable, WEDDING_DRESS_MANNEQUIN_LIMB_MAX); - SubS_ChangeAnimationByInfoS(&this->skelAnime, &sAnimations, 0); + SubS_ChangeAnimationByInfoS(&this->skelAnime, &sAnimationInfo, 0); Collider_InitAndSetCylinder(play, &this->collider, &this->actor, &sCylinderInit); CollisionCheck_SetInfo2(&this->actor.colChkInfo, DamageTable_Get(0x16), &sColChkInfoInit); Actor_SetScale(&this->actor, 0.01f); diff --git a/src/overlays/actors/ovl_En_Ds2n/z_en_ds2n.c b/src/overlays/actors/ovl_En_Ds2n/z_en_ds2n.c index 0d274c0e4..7e517ce09 100644 --- a/src/overlays/actors/ovl_En_Ds2n/z_en_ds2n.c +++ b/src/overlays/actors/ovl_En_Ds2n/z_en_ds2n.c @@ -32,7 +32,7 @@ const ActorInit En_Ds2n_InitVars = { (ActorFunc)EnDs2n_Draw, }; -static AnimationInfo sAnimations[] = { +static AnimationInfo sAnimationInfo[] = { { &gDs2nIdleAnim, 1.0f, 0.0f, 0.0f, ANIMMODE_LOOP, 0.0f }, }; @@ -43,7 +43,7 @@ static TexturePtr sEyeTextures[] = { gDs2nEyeOpenTex, gDs2nEyeHalfTex, gDs2nEyeC void EnDs2n_SetupIdle(EnDs2n* this) { this->blinkTimer = 20; this->blinkState = 0; - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, 0); + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, 0); this->actionFunc = EnDs2n_Idle; } diff --git a/src/overlays/actors/ovl_En_Fall/z_en_fall.c b/src/overlays/actors/ovl_En_Fall/z_en_fall.c index 646d8b08c..7e3a93fa8 100644 --- a/src/overlays/actors/ovl_En_Fall/z_en_fall.c +++ b/src/overlays/actors/ovl_En_Fall/z_en_fall.c @@ -341,7 +341,7 @@ void EnFall_CrashingMoon_HandleGiantsCutscene(EnFall* this, PlayState* play) { ActorCutscene_SetIntentToPlay(0xB); } } else if (play->csCtx.frames > 1600) { - play->nextEntranceIndex = 0x2C00; + play->nextEntrance = ENTRANCE(CLOCK_TOWER_ROOFTOP, 0); gSaveContext.nextCutsceneIndex = 0xFFF2; play->transitionTrigger = TRANS_TRIGGER_START; play->transitionType = TRANS_TYPE_02; diff --git a/src/overlays/actors/ovl_En_Fg/z_en_fg.c b/src/overlays/actors/ovl_En_Fg/z_en_fg.c index 065f2c370..8ad22ff53 100644 --- a/src/overlays/actors/ovl_En_Fg/z_en_fg.c +++ b/src/overlays/actors/ovl_En_Fg/z_en_fg.c @@ -95,27 +95,27 @@ static DamageTable sDamageTable = { /* Powder Keg */ DMG_ENTRY(0, 0x0), }; -static AnimationInfoS sAnimations[] = { +static AnimationInfoS sAnimationInfo[] = { { &object_fr_Anim_001534, 1.0f, 0, -1, ANIMMODE_LOOP, 0 }, { &object_fr_Anim_001534, 1.0f, 0, -1, ANIMMODE_LOOP, -4 }, { &object_fr_Anim_0011C0, 1.0f, 0, -1, ANIMMODE_LOOP, -4 }, { &object_fr_Anim_0007BC, 1.0f, 0, -1, ANIMMODE_ONCE, -4 }, }; -s32 EnFg_UpdateAnimation(SkelAnime* skelAnime, s16 animIndex) { +s32 EnFg_ChangeAnim(SkelAnime* skelAnime, s16 animIndex) { s16 frameCount; s32 ret; ret = false; if (animIndex >= 0 && animIndex < 4) { ret = true; - frameCount = sAnimations[animIndex].frameCount; + frameCount = sAnimationInfo[animIndex].frameCount; if (frameCount < 0) { - frameCount = Animation_GetLastFrame(sAnimations[animIndex].animation); + frameCount = Animation_GetLastFrame(sAnimationInfo[animIndex].animation); } - Animation_Change(skelAnime, sAnimations[animIndex].animation, sAnimations[animIndex].playSpeed, - sAnimations[animIndex].startFrame, frameCount, sAnimations[animIndex].mode, - sAnimations[animIndex].morphFrames); + Animation_Change(skelAnime, sAnimationInfo[animIndex].animation, sAnimationInfo[animIndex].playSpeed, + sAnimationInfo[animIndex].startFrame, frameCount, sAnimationInfo[animIndex].mode, + sAnimationInfo[animIndex].morphFrames); } return ret; } @@ -221,7 +221,7 @@ void EnFg_Idle(EnFg* this, PlayState* play) { default: if (DECR(this->timer) == 0) { Actor_PlaySfxAtPos(&this->actor, NA_SE_EV_FROG_JUMP); - EnFg_UpdateAnimation(&this->skelAnime, 3); + EnFg_ChangeAnim(&this->skelAnime, 3); this->actor.velocity.y = 10.0f; this->timer = Rand_S16Offset(30, 30); this->actionFunc = EnFg_Jump; @@ -256,7 +256,7 @@ void EnFg_Jump(EnFg* this, PlayState* play) { case FG_DMGEFFECT_EXPLOSION: this->actor.flags &= ~ACTOR_FLAG_1; Actor_PlaySfxAtPos(&this->actor, NA_SE_EV_FROG_CRY_0); - EnFg_UpdateAnimation(&this->skelAnime, 0); + EnFg_ChangeAnim(&this->skelAnime, 0); this->actor.params = FG_BLACK; this->skelAnime.playSpeed = 0.0f; ac = this->collider.base.ac; @@ -276,7 +276,7 @@ void EnFg_Jump(EnFg* this, PlayState* play) { } if ((this->actor.velocity.y <= 0.0f) && (this->actor.bgCheckFlags & 1)) { - EnFg_UpdateAnimation(&this->skelAnime, 0); + EnFg_ChangeAnim(&this->skelAnime, 0); this->actionFunc = EnFg_Idle; this->actor.velocity.y = 0.0f; } else { @@ -316,7 +316,7 @@ void EnFg_Init(Actor* thisx, PlayState* play) { ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 10.0f); SkelAnime_InitFlex(play, &this->skelAnime, &object_fr_Skel_00B538, NULL, this->jointTable, this->morphTable, 24); - EnFg_UpdateAnimation(&this->skelAnime, 0); + EnFg_ChangeAnim(&this->skelAnime, 0); Collider_InitCylinder(play, &this->collider); Collider_SetCylinder(play, &this->collider, &this->actor, &sCylinderInit); CollisionCheck_SetInfo2(&this->actor.colChkInfo, &sDamageTable, &sColChkInfoInit2); diff --git a/src/overlays/actors/ovl_En_Fsn/z_en_fsn.c b/src/overlays/actors/ovl_En_Fsn/z_en_fsn.c index 96aebb8cf..50ec744ba 100644 --- a/src/overlays/actors/ovl_En_Fsn/z_en_fsn.c +++ b/src/overlays/actors/ovl_En_Fsn/z_en_fsn.c @@ -81,7 +81,7 @@ const ActorInit En_Fsn_InitVars = { (ActorFunc)EnFsn_Draw, }; -static AnimationInfoS sAnimations[] = { +static AnimationInfoS sAnimationInfo[] = { { &gFsnIdleAnim, 1.0f, 0, -1, ANIMMODE_LOOP, 0 }, { &gFsnScratchBackAnim, 1.0f, 0, -1, ANIMMODE_LOOP, 0 }, { &gFsnTurnAroundAnim, 1.0f, 0, -1, ANIMMODE_ONCE, 0 }, @@ -212,7 +212,7 @@ void EnFsn_HandleSetupResumeInteraction(EnFsn* this, PlayState* play) { if ((Message_GetState(&play->msgCtx) == TEXT_STATE_DONE) && Message_ShouldAdvance(play) && this->cutsceneState == ENFSN_CUTSCENESTATE_STOPPED) { Actor_ProcessTalkRequest(&this->actor, &play->state); - func_800B85E0(&this->actor, play, 400.0f, EXCH_ITEM_MINUS1); + func_800B85E0(&this->actor, play, 400.0f, PLAYER_AP_MINUS1); if (ENFSN_IS_SHOP(&this->actor)) { this->actor.textId = 0; } @@ -711,21 +711,21 @@ void EnFsn_InitShop(EnFsn* this, PlayState* play) { this->stickAnimTween = this->arrowAnimTween = 0.0f; } this->blinkTimer = 20; - this->animationIndex = FSN_ANIM_HANDS_ON_COUNTER_START; + this->animIndex = FSN_ANIM_HANDS_ON_COUNTER_START; this->eyeTextureIdx = 0; - SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimations, this->animationIndex); + SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimationInfo, this->animIndex); this->actionFunc = EnFsn_Idle; } void EnFsn_Idle(EnFsn* this, PlayState* play) { Player* player = GET_PLAYER(play); - if (this->animationIndex == FSN_ANIM_HANDS_ON_COUNTER_START) { + if (this->animIndex == FSN_ANIM_HANDS_ON_COUNTER_START) { s16 curFrame = this->skelAnime.curFrame; - s16 frameCount = Animation_GetLastFrame(sAnimations[this->animationIndex].animation); + s16 frameCount = Animation_GetLastFrame(sAnimationInfo[this->animIndex].animation); if (curFrame == frameCount) { - this->animationIndex = FSN_ANIM_HANDS_ON_COUNTER_LOOP; - SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimations, this->animationIndex); + this->animIndex = FSN_ANIM_HANDS_ON_COUNTER_LOOP; + SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimationInfo, this->animIndex); } return; } @@ -758,29 +758,29 @@ void EnFsn_Idle(EnFsn* this, PlayState* play) { void EnFsn_Haggle(EnFsn* this, PlayState* play) { s16 curFrame = this->skelAnime.curFrame; - s16 frameCount = Animation_GetLastFrame(sAnimations[this->animationIndex].animation); + s16 frameCount = Animation_GetLastFrame(sAnimationInfo[this->animIndex].animation); if (this->flags & ENFSN_ANGRY) { this->flags &= ~ENFSN_ANGRY; - this->animationIndex = FSN_ANIM_SLAM_COUNTER_LOOP; - SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimations, this->animationIndex); + this->animIndex = FSN_ANIM_SLAM_COUNTER_LOOP; + SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimationInfo, this->animIndex); } else { - if (this->animationIndex == FSN_ANIM_SLAM_COUNTER_LOOP && Animation_OnFrame(&this->skelAnime, 18.0f)) { + if (this->animIndex == 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_ANIM_HANDS_ON_COUNTER_LOOP; - SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimations, this->animationIndex); + this->animIndex = FSN_ANIM_HANDS_ON_COUNTER_LOOP; + SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimationInfo, this->animIndex); } else if (this->flags & ENFSN_OFFER_FINAL_PRICE) { this->flags &= ~ENFSN_OFFER_FINAL_PRICE; - this->animationIndex = FSN_ANIM_MAKE_OFFER; - SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimations, this->animationIndex); + this->animIndex = FSN_ANIM_MAKE_OFFER; + SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimationInfo, this->animIndex); } else { - if (this->animationIndex == FSN_ANIM_MAKE_OFFER) { + if (this->animIndex == FSN_ANIM_MAKE_OFFER) { if (curFrame == frameCount) { - this->animationIndex = FSN_ANIM_HANDS_ON_COUNTER_LOOP; - SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimations, this->animationIndex); + this->animIndex = FSN_ANIM_HANDS_ON_COUNTER_LOOP; + SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimationInfo, this->animIndex); } else { if (Animation_OnFrame(&this->skelAnime, 28.0f)) { Actor_PlaySfxAtPos(&this->actor, NA_SE_EV_HANKO); @@ -839,7 +839,7 @@ void EnFsn_StartBuying(EnFsn* this, PlayState* play) { this->actionFunc = EnFsn_DeterminePrice; break; case 0x29CF: - player->exchangeItemId = EXCH_ITEM_NONE; + player->exchangeItemId = PLAYER_AP_NONE; this->actionFunc = EnFsn_SetupDeterminePrice; break; } @@ -986,7 +986,7 @@ void EnFsn_MakeOffer(EnFsn* this, PlayState* play) { break; case 1: func_8019F230(); - player->exchangeItemId = EXCH_ITEM_NONE; + player->exchangeItemId = PLAYER_AP_NONE; this->actionFunc = EnFsn_SetupDeterminePrice; break; } @@ -1042,7 +1042,7 @@ void EnFsn_ResumeInteraction(EnFsn* this, PlayState* play) { this->actionFunc = EnFsn_ConverseBackroom; } } else { - func_800B85E0(&this->actor, play, 400.0f, EXCH_ITEM_MINUS1); + func_800B85E0(&this->actor, play, 400.0f, PLAYER_AP_MINUS1); } } @@ -1430,8 +1430,8 @@ void EnFsn_Init(Actor* thisx, PlayState* play) { this->eyeTextureIdx = 0; this->actor.flags |= ACTOR_FLAG_1; this->actor.targetMode = 0; - this->animationIndex = FSN_ANIM_IDLE; - SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimations, this->animationIndex); + this->animIndex = FSN_ANIM_IDLE; + SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimationInfo, this->animIndex); this->actionFunc = EnFsn_IdleBackroom; } } diff --git a/src/overlays/actors/ovl_En_Fsn/z_en_fsn.h b/src/overlays/actors/ovl_En_Fsn/z_en_fsn.h index f003a7921..9479e982e 100644 --- a/src/overlays/actors/ovl_En_Fsn/z_en_fsn.h +++ b/src/overlays/actors/ovl_En_Fsn/z_en_fsn.h @@ -64,7 +64,7 @@ typedef struct EnFsn { /* 0x444 */ u8 arrowAnimState; /* 0x445 */ u8 stickAnimState; /* 0x448 */ f32 shopItemSelectedTween; - /* 0x44C */ s16 animationIndex; + /* 0x44C */ s16 animIndex; /* 0x44E */ u16 flags; } EnFsn; // size = 0x450 diff --git a/src/overlays/actors/ovl_En_Fu/z_en_fu.c b/src/overlays/actors/ovl_En_Fu/z_en_fu.c index 93550ef4d..1b5f8e085 100644 --- a/src/overlays/actors/ovl_En_Fu/z_en_fu.c +++ b/src/overlays/actors/ovl_En_Fu/z_en_fu.c @@ -73,7 +73,7 @@ static Vec3f D_80964B0C = { 0.0f, 60.0f, -8.0f }; static Vec3f D_80964B18 = { 0.0f, 55.0f, 12.0f }; static Vec3f D_80964B24 = { 0.0f, 60.0f, 0.0f }; -static AnimationInfo sAnimations[] = { +static AnimationInfo sAnimationInfo[] = { { &object_mu_Anim_0053E0, 1.0f, 0.0f, 0.0f, ANIMMODE_LOOP, -4.0f }, { &object_mu_Anim_001F74, 1.0f, 0.0f, 0.0f, ANIMMODE_LOOP, -4.0f }, { &object_mu_Anim_002F64, 1.0f, 0.0f, 0.0f, ANIMMODE_LOOP, -4.0f }, @@ -371,7 +371,7 @@ void func_8096209C(EnFu* this, PlayState* play) { } void func_809622FC(EnFu* this) { - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, 1); + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, 1); this->actionFunc = func_80962340; } @@ -536,7 +536,7 @@ void func_80962660(EnFu* this, PlayState* play) { func_801477B4(play); player->stateFlags1 |= 0x20; this->unk_53C = 0; - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, 3); + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, 3); func_801A2BB8(NA_BGM_MINI_GAME_2); if (this->unk_542 == 0) { if (this->unk_546 == 1) { @@ -935,7 +935,7 @@ void func_80963630(EnFu* this, PlayState* play) { player->stateFlags1 &= ~0x20; } else { this->actor.child->freezeTimer = 10; - func_800B85E0(&this->actor, play, 500.0f, EXCH_ITEM_MINUS1); + func_800B85E0(&this->actor, play, 500.0f, PLAYER_AP_MINUS1); } } @@ -1214,7 +1214,7 @@ void func_80964190(EnFu* this, PlayState* play) { case 0x2842: case 0x2844: case 0x2848: - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, 1); + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, 1); break; case 0x2840: @@ -1240,21 +1240,21 @@ void func_80964190(EnFu* this, PlayState* play) { case 0x286B: case 0x286D: case 0x2871: - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, 4); + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, 4); break; case 0x2860: - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, 5); + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, 5); break; case 0x285F: - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, 6); + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, 6); break; case 0x287E: case 0x2880: case 0x2883: - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, 2); + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, 2); break; } } diff --git a/src/overlays/actors/ovl_En_Gb2/z_en_gb2.c b/src/overlays/actors/ovl_En_Gb2/z_en_gb2.c index 6940e0ce7..a945011a8 100644 --- a/src/overlays/actors/ovl_En_Gb2/z_en_gb2.c +++ b/src/overlays/actors/ovl_En_Gb2/z_en_gb2.c @@ -356,14 +356,14 @@ void func_80B0FD8C(EnGb2* this, PlayState* play) { void func_80B0FE18(PlayState* play) { func_800FD750(0x38); - play->nextEntranceIndex = 0x9C10; + play->nextEntrance = ENTRANCE(GHOST_HUT, 1); play->transitionType = TRANS_TYPE_64; gSaveContext.nextTransitionType = TRANS_TYPE_64; play->transitionTrigger = TRANS_TRIGGER_START; } void func_80B0FE7C(PlayState* play) { - play->nextEntranceIndex = 0x9C20; + play->nextEntrance = ENTRANCE(GHOST_HUT, 2); play->transitionType = TRANS_TYPE_64; gSaveContext.nextTransitionType = TRANS_TYPE_64; play->transitionTrigger = TRANS_TRIGGER_START; @@ -890,7 +890,7 @@ void EnGb2_Init(Actor* thisx, PlayState* play) { Actor_MarkForDeath(&this->actor); } - if (gSaveContext.save.entranceIndex == 0x9C10) { + if (gSaveContext.save.entrance == ENTRANCE(GHOST_HUT, 1)) { func_800FE484(); this->actionFunc = func_80B10240; break; diff --git a/src/overlays/actors/ovl_En_Ge1/z_en_ge1.c b/src/overlays/actors/ovl_En_Ge1/z_en_ge1.c index a222a1905..ad0d3de24 100644 --- a/src/overlays/actors/ovl_En_Ge1/z_en_ge1.c +++ b/src/overlays/actors/ovl_En_Ge1/z_en_ge1.c @@ -72,7 +72,7 @@ typedef enum { /* 9 */ GERUDO_WHITE_ANIM_BLOWN_AWAY, } GerudoWhiteAnimations; -void EnGe1_SetAnimation(EnGe1* this, s16 index, u8 mode, f32 morphFrames); +void EnGe1_ChangeAnim(EnGe1* this, s16 animIndex, u8 mode, f32 morphFrames); void EnGe1_ShadowDraw(Actor* actor, Lights* lights, PlayState* play); void EnGe1_Wait(EnGe1* this, PlayState* play); void EnGe1_PerformCutsceneActions(EnGe1* this, PlayState* play); @@ -88,9 +88,9 @@ void EnGe1_Init(Actor* thisx, PlayState* play) { this->picto.actor.colChkInfo.mass = MASS_IMMOVABLE; this->picto.actor.targetMode = 6; Actor_SetScale(&this->picto.actor, 0.01f); - this->curAnim = this->csAction = -1; // GERUDO_WHITE_ANIM_NONE + this->animIndex = this->csAction = -1; // GERUDO_WHITE_ANIM_NONE this->stateFlags = 0; - EnGe1_SetAnimation(this, GERUDO_WHITE_ANIM_ARMS_FOLDED, ANIMMODE_LOOP, 0.0f); + EnGe1_ChangeAnim(this, GERUDO_WHITE_ANIM_ARMS_FOLDED, ANIMMODE_LOOP, 0.0f); this->actionFunc = EnGe1_Wait; this->picto.validationFunc = EnGe1_ValidatePictograph; @@ -127,7 +127,7 @@ void EnGe1_Destroy(Actor* thisx, PlayState* play) { Collider_DestroyCylinder(play, &this->collider); } -void EnGe1_SetAnimation(EnGe1* this, s16 index, u8 mode, f32 morphFrames) { +void EnGe1_ChangeAnim(EnGe1* this, s16 animIndex, u8 mode, f32 morphFrames) { static AnimationHeader* sAnimations[] = { &gGerudoWhiteArmsFoldedAnim, // GERUDO_WHITE_ANIM_ARMS_FOLDED, &gGerudoWhiteUnfoldingArmsAnim, // GERUDO_WHITE_ANIM_UNFOLDING_ARMS @@ -143,22 +143,22 @@ void EnGe1_SetAnimation(EnGe1* this, s16 index, u8 mode, f32 morphFrames) { // The GERUDO_WHITE_ANIM_LEADING_BOAT / GERUDO_WHITE_ANIM_BLOWN_AWAY cases are single frames of an "animation" used // as static poses. - switch (index) { + switch (animIndex) { case GERUDO_WHITE_ANIM_LEADING_BOAT: - Animation_Change(&this->skelAnime, sAnimations[index], 0.0f, 0.0f, 0.0f, ANIMMODE_ONCE, 0.0f); + Animation_Change(&this->skelAnime, sAnimations[animIndex], 0.0f, 0.0f, 0.0f, ANIMMODE_ONCE, 0.0f); break; case GERUDO_WHITE_ANIM_BLOWN_AWAY: - Animation_Change(&this->skelAnime, sAnimations[index], 0.0f, 1.0f, 1.0f, ANIMMODE_ONCE, 0.0f); + Animation_Change(&this->skelAnime, sAnimations[animIndex], 0.0f, 1.0f, 1.0f, ANIMMODE_ONCE, 0.0f); break; default: - Animation_Change(&this->skelAnime, sAnimations[index], 1.0f, 0.0f, - Animation_GetLastFrame(sAnimations[index]), mode, morphFrames); + Animation_Change(&this->skelAnime, sAnimations[animIndex], 1.0f, 0.0f, + Animation_GetLastFrame(sAnimations[animIndex]), mode, morphFrames); break; } - this->curAnim = index; + this->animIndex = animIndex; } void EnGe1_LookAtPlayer(EnGe1* this, PlayState* play) { @@ -257,7 +257,7 @@ void EnGe1_PerformCutsceneActions(EnGe1* this, PlayState* play) { s16 csAction; if (SkelAnime_Update(&this->skelAnime) && (this->csAction == 3)) { - EnGe1_SetAnimation(this, GERUDO_WHITE_ANIM_STIFF_SHIVERING, ANIMMODE_LOOP, 0.0f); + EnGe1_ChangeAnim(this, GERUDO_WHITE_ANIM_STIFF_SHIVERING, ANIMMODE_LOOP, 0.0f); } if (Cutscene_CheckActorAction(play, 0x79)) { @@ -284,27 +284,27 @@ void EnGe1_PerformCutsceneActions(EnGe1* this, PlayState* play) { switch (this->csAction) { // Aveil cutscene case 1: - EnGe1_SetAnimation(this, GERUDO_WHITE_ANIM_ARMS_FOLDED, ANIMMODE_LOOP, 0.0f); + EnGe1_ChangeAnim(this, GERUDO_WHITE_ANIM_ARMS_FOLDED, ANIMMODE_LOOP, 0.0f); break; case 2: - EnGe1_SetAnimation(this, GERUDO_WHITE_ANIM_STANDING_HEAD_BOWED, ANIMMODE_LOOP, 0.0f); + EnGe1_ChangeAnim(this, GERUDO_WHITE_ANIM_STANDING_HEAD_BOWED, ANIMMODE_LOOP, 0.0f); break; case 3: - EnGe1_SetAnimation(this, GERUDO_WHITE_ANIM_STIFFENING, ANIMMODE_ONCE, 0.0f); + EnGe1_ChangeAnim(this, GERUDO_WHITE_ANIM_STIFFENING, ANIMMODE_ONCE, 0.0f); break; case 4: - EnGe1_SetAnimation(this, GERUDO_WHITE_ANIM_TRUDGING_OFF, ANIMMODE_ONCE, 0.0f); + EnGe1_ChangeAnim(this, GERUDO_WHITE_ANIM_TRUDGING_OFF, ANIMMODE_ONCE, 0.0f); break; case 5: - EnGe1_SetAnimation(this, GERUDO_WHITE_ANIM_EXCITED_CLAPPING, ANIMMODE_LOOP, 0.0f); + EnGe1_ChangeAnim(this, GERUDO_WHITE_ANIM_EXCITED_CLAPPING, ANIMMODE_LOOP, 0.0f); break; case 6: - EnGe1_SetAnimation(this, GERUDO_WHITE_ANIM_SALUTE, ANIMMODE_ONCE, 0.0f); + EnGe1_ChangeAnim(this, GERUDO_WHITE_ANIM_SALUTE, ANIMMODE_ONCE, 0.0f); break; case 7: @@ -313,11 +313,11 @@ void EnGe1_PerformCutsceneActions(EnGe1* this, PlayState* play) { // Twister cutscene case 8: - EnGe1_SetAnimation(this, GERUDO_WHITE_ANIM_LEADING_BOAT, ANIMMODE_ONCE, 0.0f); + EnGe1_ChangeAnim(this, GERUDO_WHITE_ANIM_LEADING_BOAT, ANIMMODE_ONCE, 0.0f); break; case 9: - EnGe1_SetAnimation(this, GERUDO_WHITE_ANIM_BLOWN_AWAY, ANIMMODE_ONCE, 0.0f); + EnGe1_ChangeAnim(this, GERUDO_WHITE_ANIM_BLOWN_AWAY, ANIMMODE_ONCE, 0.0f); EnGe1_SetupPath(this, play); this->stateFlags |= GERUDO_WHITE_STATE_DISABLE_MOVEMENT; this->screamTimer = (s32)(Rand_ZeroFloat(10.0f) + 20.0f); @@ -327,12 +327,12 @@ void EnGe1_PerformCutsceneActions(EnGe1* this, PlayState* play) { SkelAnime_Update(&this->skelAnime); } - if ((this->curAnim == GERUDO_WHITE_ANIM_TRUDGING_OFF) && + if ((this->animIndex == GERUDO_WHITE_ANIM_TRUDGING_OFF) && (Animation_OnFrame(&this->skelAnime, 12.0f) || Animation_OnFrame(&this->skelAnime, 25.0f))) { Actor_PlaySfxAtPos(&this->picto.actor, NA_SE_EV_PIRATE_WALK); } - if ((this->curAnim == GERUDO_WHITE_ANIM_SALUTE) && Animation_OnFrame(&this->skelAnime, 14.0f)) { + if ((this->animIndex == GERUDO_WHITE_ANIM_SALUTE) && Animation_OnFrame(&this->skelAnime, 14.0f)) { Actor_PlaySfxAtPos(&this->picto.actor, NA_SE_EV_PIRATE_WALK); } } else { @@ -401,7 +401,7 @@ s32 EnGe1_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* p rot->x += this->headRot.y; rot->z += this->headRot.x; } - if (this->curAnim == GERUDO_WHITE_ANIM_ARMS_FOLDED) { + if (this->animIndex == GERUDO_WHITE_ANIM_ARMS_FOLDED) { // Make small fidgeting movements if in standing animation. if ((limbIndex == GERUDO_WHITE_LIMB_TORSO) || (limbIndex == GERUDO_WHITE_LIMB_LEFT_FOREARM) || (limbIndex == GERUDO_WHITE_LIMB_RIGHT_FOREARM)) { diff --git a/src/overlays/actors/ovl_En_Ge1/z_en_ge1.h b/src/overlays/actors/ovl_En_Ge1/z_en_ge1.h index b27a3c3de..ae6cc601e 100644 --- a/src/overlays/actors/ovl_En_Ge1/z_en_ge1.h +++ b/src/overlays/actors/ovl_En_Ge1/z_en_ge1.h @@ -33,7 +33,7 @@ typedef struct EnGe1 { /* 0x2B8 */ s16 eyeIndex; /* 0x2BA */ s16 blinkTimer; /* 0x2BC */ u16 stateFlags; - /* 0x2BE */ s16 curAnim; // Index + /* 0x2BE */ s16 animIndex; /* 0x2C0 */ s16 csAction; /* 0x2C2 */ s16 screamTimer; /* 0x2C4 */ u8 hairstyle; diff --git a/src/overlays/actors/ovl_En_Geg/z_en_geg.c b/src/overlays/actors/ovl_En_Geg/z_en_geg.c index b3e98dde3..1766b8e32 100644 --- a/src/overlays/actors/ovl_En_Geg/z_en_geg.c +++ b/src/overlays/actors/ovl_En_Geg/z_en_geg.c @@ -126,7 +126,7 @@ static DamageTable sDamageTable = { /* Powder Keg */ DMG_ENTRY(1, 0x0), }; -static AnimationInfoS sAnimations[] = { +static AnimationInfoS sAnimationInfo[] = { { &gGoronLyingDownIdleAnim, 1.0f, 0, -1, ANIMMODE_LOOP, 0 }, { &gGoronLyingDownIdleAnim, 1.0f, 0, -1, ANIMMODE_LOOP, -4 }, { &gGoronUnrollAnim, 2.0f, 0, -1, ANIMMODE_ONCE, 0 }, @@ -379,7 +379,7 @@ void func_80BB1FCC(EnGeg* this, PlayState* play) { void func_80BB2020(EnGeg* this, PlayState* play) { gSegments[6] = VIRTUAL_TO_PHYSICAL(play->objectCtx.status[this->unk_248].segment); - SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimations, this->unk_4AC); + SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimationInfo, this->unk_4AC); } s32 func_80BB2088(EnGeg* this, PlayState* play) { @@ -609,7 +609,7 @@ void func_80BB27D4(EnGeg* this, PlayState* play) { void func_80BB2944(EnGeg* this, PlayState* play) { u8 talkState = Message_GetState(&play->msgCtx); s16 curFrame = this->skelAnime.curFrame; - s16 lastFrame = Animation_GetLastFrame(sAnimations[this->unk_4AC].animation); + s16 lastFrame = Animation_GetLastFrame(sAnimationInfo[this->unk_4AC].animation); if (this->unk_4AC == 19) { if (curFrame == lastFrame) { @@ -699,13 +699,13 @@ void func_80BB2B1C(EnGeg* this, PlayState* play) { } this->unk_4E0--; } - func_8019F570(&this->actor.projectedPos, 1); + AudioSfx_LowerSfxSettingsReverb(&this->actor.projectedPos, true); func_8019F4AC(&this->actor.projectedPos, NA_SE_EN_GOLON_SIRLOIN_EAT - SFX_FLAG); } void func_80BB2E00(EnGeg* this, PlayState* play) { s16 sp2E = this->skelAnime.curFrame; - s16 sp2C = Animation_GetLastFrame(sAnimations[this->unk_4AC].animation); + s16 sp2C = Animation_GetLastFrame(sAnimationInfo[this->unk_4AC].animation); if (this->unk_4AC == 2) { Math_SmoothStepToS(&this->actor.shape.rot.y, this->actor.yawTowardsPlayer, 5, 0x1000, 0x100); diff --git a/src/overlays/actors/ovl_En_Gg/z_en_gg.c b/src/overlays/actors/ovl_En_Gg/z_en_gg.c index ad5b8c14a..7da568226 100644 --- a/src/overlays/actors/ovl_En_Gg/z_en_gg.c +++ b/src/overlays/actors/ovl_En_Gg/z_en_gg.c @@ -95,7 +95,7 @@ static DamageTable sDamageTable = { /* Powder Keg */ DMG_ENTRY(0, 0x0), }; -static AnimationInfo sAnimations[] = { +static AnimationInfo sAnimationInfo[] = { { &object_gg_Anim_00F578, 1.0f, 0.0f, 0.0f, 0, -10.0f }, { &object_gg_Anim_00D528, 1.0f, 0.0f, 0.0f, 2, -10.0f }, { &object_gg_Anim_00D174, 1.0f, 0.0f, 0.0f, 2, -10.0f }, { &object_gg_Anim_00ECC0, 1.0f, 0.0f, 0.0f, 2, -10.0f }, { &object_gg_Anim_00BAF0, 1.0f, 0.0f, 0.0f, 0, -10.0f }, { &object_gg_Anim_00AF40, 1.0f, 0.0f, 0.0f, 0, -10.0f }, @@ -170,46 +170,46 @@ void func_80B35250(EnGg* this) { this->unk_2E4 = 20; this->unk_2E2 = 0; this->unk_2E6 = 0; - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, 0); + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, 0); this->actionFunc = func_80B35450; } void func_80B352A4(EnGg* this, PlayState* play) { s16 sp26 = this->skelAnime.curFrame; - s16 lastFrame = Animation_GetLastFrame(sAnimations[this->unk_2E6].animation); + s16 lastFrame = Animation_GetLastFrame(sAnimationInfo[this->unk_2E6].animation); if (sp26 == lastFrame) { switch (this->actor.textId) { case 0xCE5: this->unk_2E6 = 1; - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, 1); + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, 1); break; case 0xCE6: case 0xCEC: this->unk_2E6 = 0; - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, 0); + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, 0); break; case 0xCE8: this->unk_2E6 = 2; - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, 2); + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, 2); break; case 0xCE9: this->unk_2E6 = 3; - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, 3); + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, 3); break; case 0xCED: case 0xCEE: this->unk_2E6 = 4; - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, 4); + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, 4); break; default: this->unk_2E6 = 0; - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, 0); + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, 0); break; } gSaveContext.save.weekEventReg[19] |= 0x80; @@ -219,7 +219,7 @@ void func_80B352A4(EnGg* this, PlayState* play) { this->skelAnime.playSpeed = 2.0f; } else { this->unk_2E6 = 4; - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, 4); + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, 4); } } } @@ -326,7 +326,7 @@ void func_80B35634(EnGg* this, PlayState* play) { this->unk_2DA = 0; break; } - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, this->unk_2DA); + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, this->unk_2DA); } if (this->unk_2DA == 14) { @@ -366,11 +366,11 @@ void func_80B3584C(EnGg* this) { void func_80B358D8(EnGg* this, PlayState* play) { s16 sp1E = this->skelAnime.curFrame; - s16 lastFrame = Animation_GetLastFrame(sAnimations[this->unk_2DA].animation); + s16 lastFrame = Animation_GetLastFrame(sAnimationInfo[this->unk_2DA].animation); if ((this->unk_2E6 == 14) && (sp1E == lastFrame)) { this->unk_2E6 = 15; - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, 15); + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, 15); } } diff --git a/src/overlays/actors/ovl_En_Giant/z_en_giant.c b/src/overlays/actors/ovl_En_Giant/z_en_giant.c index 61eac74f8..7021b0e0c 100644 --- a/src/overlays/actors/ovl_En_Giant/z_en_giant.c +++ b/src/overlays/actors/ovl_En_Giant/z_en_giant.c @@ -32,23 +32,23 @@ void EnGiant_PerformCutsceneActions(EnGiant* this, PlayState* play); * These values are used to index into sAnimations to pick the appropriate animation. */ typedef enum { - /* 0 */ GIANT_ANIMATION_LOOK_UP_START, - /* 1 */ GIANT_ANIMATION_LOOK_UP_LOOP, - /* 2 */ GIANT_ANIMATION_FALLING_OVER, - /* 3 */ GIANT_ANIMATION_RAISED_ARMS_START, - /* 4 */ GIANT_ANIMATION_RAISED_ARMS_LOOP, - /* 5 */ GIANT_ANIMATION_STRUGGLE_START, - /* 6 */ GIANT_ANIMATION_STRUGGLE_LOOP, - /* 7 */ GIANT_ANIMATION_IDLE_LOOP, - /* 8 */ GIANT_ANIMATION_WALKING_LOOP, - /* 9 */ GIANT_ANIMATION_BIG_CALL_START, - /* 10 */ GIANT_ANIMATION_BIG_CALL_LOOP, - /* 11 */ GIANT_ANIMATION_BIG_CALL_END, - /* 12 */ GIANT_ANIMATION_SMALL_CALL_START, - /* 13 */ GIANT_ANIMATION_SMALL_CALL_LOOP, - /* 14 */ GIANT_ANIMATION_SMALL_CALL_END, - /* 15 */ GIANT_ANIMATION_MAX -} GiantAnimationIndex; + /* 0 */ GIANT_ANIM_LOOK_UP_START, + /* 1 */ GIANT_ANIM_LOOK_UP_LOOP, + /* 2 */ GIANT_ANIM_FALLING_OVER, + /* 3 */ GIANT_ANIM_RAISED_ARMS_START, + /* 4 */ GIANT_ANIM_RAISED_ARMS_LOOP, + /* 5 */ GIANT_ANIM_STRUGGLE_START, + /* 6 */ GIANT_ANIM_STRUGGLE_LOOP, + /* 7 */ GIANT_ANIM_IDLE_LOOP, + /* 8 */ GIANT_ANIM_WALKING_LOOP, + /* 9 */ GIANT_ANIM_BIG_CALL_START, + /* 10 */ GIANT_ANIM_BIG_CALL_LOOP, + /* 11 */ GIANT_ANIM_BIG_CALL_END, + /* 12 */ GIANT_ANIM_SMALL_CALL_START, + /* 13 */ GIANT_ANIM_SMALL_CALL_LOOP, + /* 14 */ GIANT_ANIM_SMALL_CALL_END, + /* 15 */ GIANT_ANIM_MAX +} GiantAnimation; /** * Used as values for csAction. The UNKNOWN ones are never used in-game. @@ -91,16 +91,16 @@ static AnimationHeader* sAnimations[] = { &gGiantSmallCallStartAnim, &gGiantSmallCallLoopAnim, &gGiantSmallCallEndAnim, }; -void EnGiant_ChangeAnimation(EnGiant* this, s16 newAnimationId) { - if (newAnimationId >= GIANT_ANIMATION_LOOK_UP_START && newAnimationId < GIANT_ANIMATION_MAX) { - if ((this->animationId == GIANT_ANIMATION_WALKING_LOOP && newAnimationId != GIANT_ANIMATION_WALKING_LOOP) || - (newAnimationId == GIANT_ANIMATION_WALKING_LOOP && this->animationId != GIANT_ANIMATION_WALKING_LOOP)) { - Animation_Change(&this->skelAnime, sAnimations[newAnimationId], 1.0f, 0.0f, - Animation_GetLastFrame(&sAnimations[newAnimationId]->common), ANIMMODE_ONCE, 10.0f); +void EnGiant_ChangeAnim(EnGiant* this, s16 animIndex) { + if (animIndex >= GIANT_ANIM_LOOK_UP_START && animIndex < GIANT_ANIM_MAX) { + if (((this->animIndex == GIANT_ANIM_WALKING_LOOP) && (animIndex != GIANT_ANIM_WALKING_LOOP)) || + ((animIndex == GIANT_ANIM_WALKING_LOOP) && (this->animIndex != GIANT_ANIM_WALKING_LOOP))) { + Animation_Change(&this->skelAnime, sAnimations[animIndex], 1.0f, 0.0f, + Animation_GetLastFrame(&sAnimations[animIndex]->common), ANIMMODE_ONCE, 10.0f); } else { - Animation_PlayOnce(&this->skelAnime, sAnimations[newAnimationId]); + Animation_PlayOnce(&this->skelAnime, sAnimations[animIndex]); } - this->animationId = newAnimationId; + this->animIndex = animIndex; } } @@ -153,7 +153,7 @@ void EnGiant_Init(Actor* thisx, PlayState* play) { Actor_SetScale(&this->actor, 0.32f); SkelAnime_InitFlex(play, &this->skelAnime, &gGiantSkel, &gGiantLargeStrideAnim, this->jointTable, this->morphTable, GIANT_LIMB_MAX); - EnGiant_ChangeAnimation(this, GIANT_ANIMATION_IDLE_LOOP); + EnGiant_ChangeAnim(this, GIANT_ANIM_IDLE_LOOP); this->csAction = GIANT_CS_ACTION_NONE; this->actionFunc = EnGiant_PerformCutsceneActions; this->actor.draw = NULL; @@ -246,14 +246,14 @@ void EnGiant_Destroy(Actor* thisx, PlayState* play) { * this function is to play the requested start animation if it has not been * played yet and play the respetive looping animation otherwise. */ -void EnGiant_ChangeToStartOrLoopAnimation(EnGiant* this, s16 requestedAnimationId) { - s16 nextAnimationId = requestedAnimationId + 1; +void EnGiant_ChangeToStartOrLoopAnimation(EnGiant* this, s16 requestedAnimIndex) { + s16 nextAnimIndex = requestedAnimIndex + 1; - if (this->animationId != nextAnimationId) { - if (this->animationId != requestedAnimationId) { - EnGiant_ChangeAnimation(this, requestedAnimationId); + if (this->animIndex != nextAnimIndex) { + if (this->animIndex != requestedAnimIndex) { + EnGiant_ChangeAnim(this, requestedAnimIndex); } else { - EnGiant_ChangeAnimation(this, nextAnimationId); + EnGiant_ChangeAnim(this, nextAnimIndex); } } } @@ -261,45 +261,45 @@ void EnGiant_ChangeToStartOrLoopAnimation(EnGiant* this, s16 requestedAnimationI /** * Immediately switches to the specified animation for this cutscene action. */ -void EnGiant_ChangeAnimationBasedOnCsAction(EnGiant* this) { +void EnGiant_ChangeAnimBasedOnCsAction(EnGiant* this) { switch (this->csAction) { case GIANT_CS_ACTION_IDLE: - EnGiant_ChangeAnimation(this, GIANT_ANIMATION_IDLE_LOOP); + EnGiant_ChangeAnim(this, GIANT_ANIM_IDLE_LOOP); break; case GIANT_CS_ACTION_WALKING: - EnGiant_ChangeAnimation(this, GIANT_ANIMATION_WALKING_LOOP); + EnGiant_ChangeAnim(this, GIANT_ANIM_WALKING_LOOP); break; case GIANT_CS_ACTION_STRUGGLING: - EnGiant_ChangeAnimation(this, GIANT_ANIMATION_STRUGGLE_START); + EnGiant_ChangeAnim(this, GIANT_ANIM_STRUGGLE_START); break; case GIANT_CS_ACTION_FALLING_OVER: - EnGiant_ChangeAnimation(this, GIANT_ANIMATION_FALLING_OVER); + EnGiant_ChangeAnim(this, GIANT_ANIM_FALLING_OVER); break; case GIANT_CS_ACTION_IDLE_FADE_IN: - EnGiant_ChangeAnimation(this, GIANT_ANIMATION_IDLE_LOOP); + EnGiant_ChangeAnim(this, GIANT_ANIM_IDLE_LOOP); this->alpha = 0; break; case GIANT_CS_ACTION_TALKING: - EnGiant_ChangeAnimation(this, GIANT_ANIMATION_BIG_CALL_START); + EnGiant_ChangeAnim(this, GIANT_ANIM_BIG_CALL_START); break; case GIANT_CS_ACTION_DONE_TALKING: - EnGiant_ChangeAnimation(this, GIANT_ANIMATION_BIG_CALL_END); + EnGiant_ChangeAnim(this, GIANT_ANIM_BIG_CALL_END); break; case GIANT_CS_ACTION_TEACHING_OATH_TO_ORDER: - EnGiant_ChangeAnimation(this, GIANT_ANIMATION_SMALL_CALL_START); + EnGiant_ChangeAnim(this, GIANT_ANIM_SMALL_CALL_START); break; case GIANT_CS_ACTION_PLAYER_LEARNED_OATH_TO_ORDER: - EnGiant_ChangeAnimation(this, GIANT_ANIMATION_SMALL_CALL_END); + EnGiant_ChangeAnim(this, GIANT_ANIM_SMALL_CALL_END); break; case GIANT_CS_ACTION_UNKNOWN_12: - EnGiant_ChangeAnimation(this, GIANT_ANIMATION_IDLE_LOOP); + EnGiant_ChangeAnim(this, GIANT_ANIM_IDLE_LOOP); break; case GIANT_CS_ACTION_UNKNOWN_13: - EnGiant_ChangeAnimation(this, GIANT_ANIMATION_WALKING_LOOP); + EnGiant_ChangeAnim(this, GIANT_ANIM_WALKING_LOOP); break; case GIANT_CS_ACTION_UNKNOWN_14: - if (this->animationId != GIANT_ANIMATION_WALKING_LOOP) { - EnGiant_ChangeAnimation(this, GIANT_ANIMATION_WALKING_LOOP); + if (this->animIndex != GIANT_ANIM_WALKING_LOOP) { + EnGiant_ChangeAnim(this, GIANT_ANIM_WALKING_LOOP); } break; case GIANT_CS_ACTION_HOLDING_UP_MOON_IN_CLOCK_TOWER: @@ -336,31 +336,31 @@ void EnGiant_UpdateAlpha(EnGiant* this) { */ void EnGiant_PlayAndUpdateAnimation(EnGiant* this) { if (SkelAnime_Update(&this->skelAnime) && - (this->animationId != GIANT_ANIMATION_FALLING_OVER || this->csAction != GIANT_CS_ACTION_FALLING_OVER)) { - EnGiant_ChangeAnimation(this, this->animationId); + (this->animIndex != GIANT_ANIM_FALLING_OVER || this->csAction != GIANT_CS_ACTION_FALLING_OVER)) { + EnGiant_ChangeAnim(this, this->animIndex); switch (this->csAction) { case GIANT_CS_ACTION_LOOKING_UP: - EnGiant_ChangeToStartOrLoopAnimation(this, GIANT_ANIMATION_LOOK_UP_START); + EnGiant_ChangeToStartOrLoopAnimation(this, GIANT_ANIM_LOOK_UP_START); break; case GIANT_CS_ACTION_RAISING_ARMS: - EnGiant_ChangeToStartOrLoopAnimation(this, GIANT_ANIMATION_RAISED_ARMS_START); + EnGiant_ChangeToStartOrLoopAnimation(this, GIANT_ANIM_RAISED_ARMS_START); break; case GIANT_CS_ACTION_STRUGGLING: - EnGiant_ChangeToStartOrLoopAnimation(this, GIANT_ANIMATION_STRUGGLE_START); + EnGiant_ChangeToStartOrLoopAnimation(this, GIANT_ANIM_STRUGGLE_START); break; case GIANT_CS_ACTION_FALLING_OVER: // Unused - EnGiant_ChangeToStartOrLoopAnimation(this, GIANT_ANIMATION_FALLING_OVER); + EnGiant_ChangeToStartOrLoopAnimation(this, GIANT_ANIM_FALLING_OVER); break; case GIANT_CS_ACTION_TALKING: - EnGiant_ChangeAnimation(this, GIANT_ANIMATION_BIG_CALL_LOOP); + EnGiant_ChangeAnim(this, GIANT_ANIM_BIG_CALL_LOOP); break; case GIANT_CS_ACTION_DONE_TALKING: case GIANT_CS_ACTION_PLAYER_LEARNED_OATH_TO_ORDER: - EnGiant_ChangeAnimation(this, GIANT_ANIMATION_IDLE_LOOP); + EnGiant_ChangeAnim(this, GIANT_ANIM_IDLE_LOOP); break; case GIANT_CS_ACTION_TEACHING_OATH_TO_ORDER: - EnGiant_ChangeAnimation(this, GIANT_ANIMATION_SMALL_CALL_LOOP); + EnGiant_ChangeAnim(this, GIANT_ANIM_SMALL_CALL_LOOP); break; } SkelAnime_Update(&this->skelAnime); @@ -369,20 +369,20 @@ void EnGiant_PlayAndUpdateAnimation(EnGiant* this) { void EnGiant_PlaySound(EnGiant* this) { if (this->actor.draw != NULL && this->alpha > 0) { - if (this->animationId == GIANT_ANIMATION_WALKING_LOOP && + if (this->animIndex == GIANT_ANIM_WALKING_LOOP && (Animation_OnFrame(&this->skelAnime, 40.0f) || Animation_OnFrame(&this->skelAnime, 100.0f))) { Actor_PlaySfxAtPos(&this->actor, NA_SE_EV_KYOJIN_WALK); } - if (this->animationId == GIANT_ANIMATION_FALLING_OVER && Animation_OnFrame(&this->skelAnime, 40.0f)) { + if (this->animIndex == GIANT_ANIM_FALLING_OVER && Animation_OnFrame(&this->skelAnime, 40.0f)) { Actor_PlaySfxAtPos(&this->actor, NA_SE_EV_KYOJIN_VOICE_FAIL); } if (this->sfxId != 0xFFFF && - ((this->animationId == GIANT_ANIMATION_BIG_CALL_START && this->skelAnime.curFrame >= 18.0f) || - this->animationId == GIANT_ANIMATION_BIG_CALL_LOOP)) { + ((this->animIndex == GIANT_ANIM_BIG_CALL_START && this->skelAnime.curFrame >= 18.0f) || + this->animIndex == GIANT_ANIM_BIG_CALL_LOOP)) { func_800B9010(&this->actor, this->sfxId); } - if ((this->animationId == GIANT_ANIMATION_SMALL_CALL_START && this->skelAnime.curFrame >= 18.0f) || - this->animationId == GIANT_ANIMATION_SMALL_CALL_LOOP) { + if ((this->animIndex == GIANT_ANIM_SMALL_CALL_START && this->skelAnime.curFrame >= 18.0f) || + this->animIndex == GIANT_ANIM_SMALL_CALL_LOOP) { func_800B9010(&this->actor, NA_SE_EV_KYOJIN_SIGN - SFX_FLAG); } } @@ -405,7 +405,7 @@ void EnGiant_PerformClockTowerSuccessActions(EnGiant* this, PlayState* play) { play->csCtx.actorActions[Cutscene_GetActorActionIndex(play, this->actorActionCommand)]->action) { this->csAction = play->csCtx.actorActions[Cutscene_GetActorActionIndex(play, this->actorActionCommand)]->action; - EnGiant_ChangeAnimationBasedOnCsAction(this); + EnGiant_ChangeAnimBasedOnCsAction(this); } EnGiant_UpdateAlpha(this); } @@ -430,7 +430,7 @@ void EnGiant_PerformCutsceneActions(EnGiant* this, PlayState* play) { play->csCtx.actorActions[Cutscene_GetActorActionIndex(play, this->actorActionCommand)]->action) { this->csAction = play->csCtx.actorActions[Cutscene_GetActorActionIndex(play, this->actorActionCommand)]->action; - EnGiant_ChangeAnimationBasedOnCsAction(this); + EnGiant_ChangeAnimBasedOnCsAction(this); } EnGiant_UpdateAlpha(this); } diff --git a/src/overlays/actors/ovl_En_Giant/z_en_giant.h b/src/overlays/actors/ovl_En_Giant/z_en_giant.h index ff4a79485..3b2cac192 100644 --- a/src/overlays/actors/ovl_En_Giant/z_en_giant.h +++ b/src/overlays/actors/ovl_En_Giant/z_en_giant.h @@ -47,7 +47,7 @@ typedef struct EnGiant { /* 0x144 */ SkelAnime skelAnime; /* 0x188 */ Vec3s jointTable[GIANT_LIMB_MAX]; /* 0x1E8 */ Vec3s morphTable[GIANT_LIMB_MAX]; - /* 0x248 */ s16 animationId; + /* 0x248 */ s16 animIndex; /* 0x24A */ u16 actorActionCommand; /* 0x24C */ u16 csAction; /* 0x24E */ s16 alpha; diff --git a/src/overlays/actors/ovl_En_Ginko_Man/z_en_ginko_man.c b/src/overlays/actors/ovl_En_Ginko_Man/z_en_ginko_man.c index 585f5df17..758d3eae0 100644 --- a/src/overlays/actors/ovl_En_Ginko_Man/z_en_ginko_man.c +++ b/src/overlays/actors/ovl_En_Ginko_Man/z_en_ginko_man.c @@ -42,7 +42,15 @@ const ActorInit En_Ginko_Man_InitVars = { (ActorFunc)EnGinkoMan_Draw, }; -static AnimationInfo sAnimations[] = { +typedef enum { + /* 0 */ GINKO_ANIM_LEGSMACKING, + /* 1 */ GINKO_ANIM_SITTING, + /* 2 */ GINKO_ANIM_REACHING, + /* 3 */ GINKO_ANIM_AMAZED, + /* 4 */ GINKO_ANIM_ADVERTISING, +} GinkoAnimation; + +static AnimationInfo sAnimationInfo[] = { { &object_boj_Anim_0008C0, 1.0f, 0.0f, 0.0f, ANIMMODE_LOOP, -4.0f }, { &object_boj_Anim_0043F0, 1.0f, 0.0f, 0.0f, ANIMMODE_LOOP, -4.0f }, { &object_boj_Anim_004F40, 1.0f, 0.0f, 0.0f, ANIMMODE_ONCE, -4.0f }, @@ -72,7 +80,7 @@ void EnGinkoMan_Destroy(Actor* thisx, PlayState* play) { void EnGinkoMan_SetupIdle(EnGinkoMan* this) { this->actor.flags |= ACTOR_FLAG_1; // targetable - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, GINKO_SITTING); + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, GINKO_ANIM_SITTING); this->actionFunc = EnGinkoMan_Idle; } @@ -82,11 +90,11 @@ void EnGinkoMan_Idle(EnGinkoMan* this, PlayState* play) { EnGinkoMan_SwitchAnimation(this, play); if (Actor_ProcessTalkRequest(&this->actor, &play->state)) { if ((gSaveContext.save.bankRupees & 0xFFFF) == 0) { - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, GINKO_FLOORSMACKING); + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, GINKO_ANIM_LEGSMACKING); Message_StartTextbox(play, 0x44C, &this->actor); this->curTextId = 0x44C; // would you like to make an account } else { - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, GINKO_SITTING); + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, GINKO_ANIM_SITTING); if ((CURRENT_DAY == 3) && (gSaveContext.save.isNight == true)) { Message_StartTextbox(play, 0x467, &this->actor); this->curTextId = 0x467; // "What's this? You need somethin' on a day like this? @@ -109,7 +117,7 @@ void EnGinkoMan_DepositDialogue(EnGinkoMan* this, PlayState* play) { switch (this->curTextId) { case 0x44C: // "Hey there, little guy! Won't you deposit some Rupees? (first dialogue) - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, GINKO_SITTING); + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, GINKO_ANIM_SITTING); if (gSaveContext.save.weekEventReg[10] & 8) { Message_StartTextbox(play, 0x44E, &this->actor); this->curTextId = 0x44E; //" ...So, what'll it be? Deposit Rupees Don't deposit Rupees" @@ -124,7 +132,7 @@ void EnGinkoMan_DepositDialogue(EnGinkoMan* this, PlayState* play) { this->curTextId = 0x44E; //" ...So, what'll it be? Deposit Rupees Don't deposit Rupees" break; case 0x44F: // "...So, what'll it be? Deposit Rupees Don't deposit Rupees" - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, GINKO_FLOORSMACKING); + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, GINKO_ANIM_LEGSMACKING); Message_StartTextbox(play, 0x450, &this->actor); this->curTextId = 0x450; // "How much? How much? [rupee prompt] break; @@ -135,14 +143,14 @@ void EnGinkoMan_DepositDialogue(EnGinkoMan* this, PlayState* play) { if (this->isNewAccount == true) { this->isNewAccount = false; if (this->curTextId != 0x453) { // "That's it? That ain't nothing at all, big spender! - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, GINKO_SITTING); + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, GINKO_ANIM_SITTING); } Message_StartTextbox(play, 0x461, &this->actor); this->curTextId = 0x461; // So, little guy, what's your name? } else { if (this->curTextId == 0x453) { // "That's it? That ain't nothing at all, big spender! - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, GINKO_FLOORSMACKING); + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, GINKO_ANIM_LEGSMACKING); } play->msgCtx.bankRupees = gSaveContext.save.bankRupees & 0xFFFF; @@ -172,17 +180,17 @@ void EnGinkoMan_DepositDialogue(EnGinkoMan* this, PlayState* play) { Message_StartTextbox(play, 0x45D, &this->actor); this->curTextId = 0x45D; // "What's this? You've already saved up 5000 Rupees?! } else if (this->previousBankValue < (s16)(gSaveContext.save.bankRupees & 0xFFFF)) { - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, GINKO_SITTING); + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, GINKO_ANIM_SITTING); Message_StartTextbox(play, 0x45E, &this->actor); this->curTextId = 0x45E; // "...Hang on there, little guy. I can't take any more deposits. Sorry..." } else { - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, GINKO_FLOORSMACKING); + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, GINKO_ANIM_LEGSMACKING); Message_StartTextbox(play, 0x460, &this->actor); this->curTextId = 0x460; // "Come back and deposit some after you save up a bunch!" } } else { - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, GINKO_FLOORSMACKING); + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, GINKO_ANIM_LEGSMACKING); Message_StartTextbox(play, 0x460, &this->actor); this->curTextId = 0x460; // "Come back and deposit some after you save up a bunch!" } @@ -212,7 +220,7 @@ void EnGinkoMan_DepositDialogue(EnGinkoMan* this, PlayState* play) { EnGinkoMan_SetupStamp(this); // stamp player break; case 0x465: // "There! Now I'll know you when I see you!" - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, GINKO_FLOORSMACKING); + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, GINKO_ANIM_LEGSMACKING); play->msgCtx.bankRupees = gSaveContext.save.bankRupees & 0xFFFF; Message_StartTextbox(play, 0x45A, &this->actor); this->curTextId = 0x45A; // "All right, little guy, now I've got a total of [rupees] from you!" @@ -269,7 +277,7 @@ void EnGinkoMan_DepositDialogue(EnGinkoMan* this, PlayState* play) { break; case 0x476: // "...You haven't deposited that many Rupees, so that much isn't available for withdrawal. Do the // math! - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, GINKO_SITTING); + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, GINKO_ANIM_SITTING); case 0x475: // "What's this? Look, little guy, you can't hold this many rupees! You got that?" case 0x47C: // "Is that so? Think it over, little guy! So what are you gonna do?" case 0x47D: // duplicate of 48 @@ -336,7 +344,7 @@ void EnGinkoMan_WaitForDialogueInput(EnGinkoMan* this, PlayState* play) { if (play->msgCtx.choiceIndex == GINKOMAN_CHOICE_YES) { if (gSaveContext.save.playerData.rupees < play->msgCtx.bankRupeesSelected) { play_sound(NA_SE_SY_ERROR); - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, GINKO_SITTING); + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, GINKO_ANIM_SITTING); Message_StartTextbox(play, 0x459, &this->actor); this->curTextId = 0x459; // HEY you dont have that much } else { @@ -348,7 +356,7 @@ void EnGinkoMan_WaitForDialogueInput(EnGinkoMan* this, PlayState* play) { Message_StartTextbox(play, 0x454, &this->actor); this->curTextId = 0x454; // Seriously? that's a lot. A lot! } else { - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, GINKO_SITTING); + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, GINKO_ANIM_SITTING); Message_StartTextbox(play, 0x453, &this->actor); this->curTextId = 0x453; // That's it? That aint nothing at all } @@ -365,7 +373,7 @@ void EnGinkoMan_WaitForDialogueInput(EnGinkoMan* this, PlayState* play) { } } else { // GINKOMAN_CHOICE_NO func_8019F230(); - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, GINKO_SITTING); + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, GINKO_ANIM_SITTING); if ((gSaveContext.save.bankRupees & 0xFFFF) == 0) { Message_StartTextbox(play, 0x456, &this->actor); this->curTextId = 0x456; // Is that so? think about it @@ -398,7 +406,7 @@ void EnGinkoMan_WaitForDialogueInput(EnGinkoMan* this, PlayState* play) { if ((s32)((gSaveContext.save.bankRupees & 0xFFFF)) < ((s32)(play->msgCtx.bankRupeesSelected + this->serviceFee))) { play_sound(NA_SE_SY_ERROR); - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, GINKO_FLOORSMACKING); + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, GINKO_ANIM_LEGSMACKING); Message_StartTextbox(play, 0x476, &this->actor); this->curTextId = 0x476; // you dont have enough deposited to withdrawl } else if (CUR_CAPACITY(UPG_WALLET) < @@ -441,7 +449,7 @@ void EnGinkoMan_WaitForRupeeCount(EnGinkoMan* this, PlayState* play) { switch (this->curTextId) { case 0x450: // "How much? How much?" [rupee prompt] Set the amount with [Control Stick] and if (play->msgCtx.bankRupeesSelected == 0) { - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, GINKO_SITTING); + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, GINKO_ANIM_SITTING); Message_StartTextbox(play, 0x457, &this->actor); this->curTextId = 0x457; // Zero Rupees? Cruel joke! } else { @@ -545,7 +553,7 @@ void EnGinkoMan_BankAward2(EnGinkoMan* this, PlayState* play) { Message_StartTextbox(play, 0x47A, &this->actor); this->curTextId = 0x47A; // Message after receiving reward for depositing 200 rupees. } else { - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, GINKO_SITTING); + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, GINKO_ANIM_SITTING); Message_StartTextbox(play, 0x47B, &this->actor); this->curTextId = 0x47B; // Message after receiving reward for depositing 1000 rupees. } @@ -559,12 +567,12 @@ void EnGinkoMan_BankAward2(EnGinkoMan* this, PlayState* play) { EnGinkoMan_SetupIdle(this); } } else { - func_800B85E0(&this->actor, play, 500.0f, EXCH_ITEM_MINUS1); + func_800B85E0(&this->actor, play, 500.0f, PLAYER_AP_MINUS1); } } void EnGinkoMan_SetupStamp(EnGinkoMan* this) { - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, GINKO_REACHING); + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, GINKO_ANIM_REACHING); this->actionFunc = EnGinkoMan_Stamp; } @@ -577,12 +585,12 @@ void EnGinkoMan_Stamp(EnGinkoMan* this, PlayState* play) { if (Animation_OnFrame(&this->skelAnime, this->skelAnime.endFrame)) { switch (this->curTextId) { case 0x464: // "Hey, relax! It doesn't leave any marks, and it's not gonna hurt." - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, GINKO_SITTING); + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, GINKO_ANIM_SITTING); Message_StartTextbox(play, 0x465, &this->actor); this->curTextId = 0x465; // "There! Now I'll know you when I see you!" break; case 0x469: // "Excuse me, but let me take a look at you..." - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, GINKO_SITTING); + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, GINKO_ANIM_SITTING); play->msgCtx.bankRupees = (gSaveContext.save.bankRupees & 0xFFFF); if ((CURRENT_DAY == 3) && (gSaveContext.save.isNight == true)) { Message_StartTextbox(play, 0x46C, &this->actor); @@ -603,12 +611,12 @@ void EnGinkoMan_SwitchAnimation(EnGinkoMan* this, PlayState* play) { if (this->animTimer == 0) { if (this->skelAnime.animation != &object_boj_Anim_004A7C) { this->animTimer = 40; - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, GINKO_ADVERTISING); + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, GINKO_ANIM_ADVERTISING); } } } else if ((this->animTimer == 0) && (this->skelAnime.animation != &object_boj_Anim_000AC4)) { this->animTimer = 40; - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, GINKO_AMAZED); + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, GINKO_ANIM_AMAZED); } DECR(this->animTimer); diff --git a/src/overlays/actors/ovl_En_Ginko_Man/z_en_ginko_man.h b/src/overlays/actors/ovl_En_Ginko_Man/z_en_ginko_man.h index 3ed6bc89b..808ea7c2f 100644 --- a/src/overlays/actors/ovl_En_Ginko_Man/z_en_ginko_man.h +++ b/src/overlays/actors/ovl_En_Ginko_Man/z_en_ginko_man.h @@ -34,12 +34,4 @@ extern const ActorInit En_Ginko_Man_InitVars; #define GINKOMAN_CHOICE_YES 0 #define GINKOMAN_CHOICE_NO 1 -typedef enum { - /* 0 */ GINKO_FLOORSMACKING, - /* 1 */ GINKO_SITTING, - /* 2 */ GINKO_REACHING, - /* 3 */ GINKO_AMAZED, - /* 4 */ GINKO_ADVERTISING, -} GinkoAnimationIndex; - #endif // Z_EN_GINKO_MAN_H diff --git a/src/overlays/actors/ovl_En_Gk/z_en_gk.c b/src/overlays/actors/ovl_En_Gk/z_en_gk.c index 1441133ee..fc716fd71 100644 --- a/src/overlays/actors/ovl_En_Gk/z_en_gk.c +++ b/src/overlays/actors/ovl_En_Gk/z_en_gk.c @@ -102,7 +102,7 @@ static DamageTable sDamageTable = { /* Powder Keg */ DMG_ENTRY(0, 0x0), }; -static AnimationInfo sAnimations[] = { +static AnimationInfo sAnimationInfo[] = { { &object_gk_Anim_00787C, 1.0f, 0.0f, 0.0f, 0, 0.0f }, { &object_gk_Anim_007DC4, 1.0f, 0.0f, 0.0f, 2, 0.0f }, { &object_gk_Anim_0092C0, 1.0f, 0.0f, 0.0f, 0, 0.0f }, { &object_gk_Anim_005EDC, 1.0f, 0.0f, 0.0f, 0, 0.0f }, { &object_gk_Anim_009638, 1.0f, 0.0f, 0.0f, 0, 0.0f }, { &object_gk_Anim_008774, 1.0f, 0.0f, 0.0f, 0, 0.0f }, @@ -259,7 +259,7 @@ s32 func_80B50854(EnGk* this, PlayState* play) { (play->msgCtx.lastPlayedSong == OCARINA_SONG_GORON_LULLABY)) { Flags_SetSwitch(play, ENGK_GET_3F00(&this->actor)); this->unk_2E4 = 3; - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, 3); + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, 3); this->actionFunc = func_80B521E8; return true; } @@ -483,21 +483,21 @@ s32 func_80B5123C(EnGk* this, PlayState* play) { void func_80B51308(EnGk* this, PlayState* play) { s16 sp1E = this->skelAnime.curFrame; - s16 lastFrame = Animation_GetLastFrame(sAnimations[this->unk_31A].animation); + s16 lastFrame = Animation_GetLastFrame(sAnimationInfo[this->unk_31A].animation); if ((this->unk_2E4 == 7) && (sp1E == lastFrame)) { this->unk_2E4 = 8; - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, 8); + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, 8); } } void func_80B51398(EnGk* this, PlayState* play) { s16 sp1E = this->skelAnime.curFrame; - s16 lastFrame = Animation_GetLastFrame(sAnimations[9].animation); + s16 lastFrame = Animation_GetLastFrame(sAnimationInfo[9].animation); if ((this->unk_2E4 == 9) && (sp1E == lastFrame)) { this->unk_2E4 = 10; - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, 10); + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, 10); } } @@ -577,7 +577,7 @@ void func_80B51510(EnGk* this, PlayState* play) { Flags_SetSwitch(play, ENGK_GET_3F00(&this->actor)); break; } - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, this->unk_31A); + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, this->unk_31A); } if (this->unk_31A == 7) { @@ -593,19 +593,19 @@ void func_80B51510(EnGk* this, PlayState* play) { void func_80B51698(EnGk* this, PlayState* play) { s16 sp26 = this->skelAnime.curFrame; - s16 lastFrame = Animation_GetLastFrame(sAnimations[this->unk_2E4].animation); + s16 lastFrame = Animation_GetLastFrame(sAnimationInfo[this->unk_2E4].animation); if (sp26 == lastFrame) { switch (this->unk_2E4) { case 0: this->unk_2E4 = 2; - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, 2); + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, 2); this->actionFunc = func_80B5216C; break; case 2: this->unk_2E4 = 0; - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, 0); + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, 0); this->actionFunc = func_80B5202C; break; } @@ -617,16 +617,16 @@ void func_80B51760(EnGk* this, PlayState* play) { s16 lastFrame; if (this->unk_2E4 == 11) { - lastFrame = Animation_GetLastFrame(sAnimations[this->unk_2E4].animation); + lastFrame = Animation_GetLastFrame(sAnimationInfo[this->unk_2E4].animation); if (sp2E == lastFrame) { this->unk_2E4 = 5; - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, this->unk_2E4); + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, this->unk_2E4); } } else if (this->unk_2E4 == 10) { - lastFrame = Animation_GetLastFrame(sAnimations[this->unk_2E4].animation); + lastFrame = Animation_GetLastFrame(sAnimationInfo[this->unk_2E4].animation); if (sp2E == lastFrame) { this->unk_2E4 = 11; - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, this->unk_2E4); + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, this->unk_2E4); } } else { if (Flags_GetSwitch(play, ENGK_GET_3F00(&this->actor))) { @@ -645,7 +645,7 @@ void func_80B51760(EnGk* this, PlayState* play) { this->unk_1E4 |= 2; } } else if (((this->actor.xzDistToPlayer < 100.0f) || this->actor.isTargeted) && - (gSaveContext.save.entranceIndex != 0xD010)) { + (gSaveContext.save.entrance != ENTRANCE(GORON_RACETRACK, 1))) { func_800B863C(&this->actor, play); } @@ -692,7 +692,7 @@ void func_80B51970(EnGk* this, PlayState* play) { if (this->unk_2E4 != 10) { if (this->unk_2E4 != 9) { this->unk_2E4 = 9; - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, 9); + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, 9); } else { func_80B51398(this, play); } @@ -720,7 +720,7 @@ void func_80B51B40(EnGk* this, PlayState* play) { } if (this->unk_31C == 0xE8F) { - play->nextEntranceIndex = 0xD010; + play->nextEntrance = ENTRANCE(GORON_RACETRACK, 1); play->transitionTrigger = TRANS_TRIGGER_START; play->transitionType = TRANS_TYPE_03; gSaveContext.nextTransitionType = TRANS_TYPE_03; @@ -759,7 +759,7 @@ void func_80B51B40(EnGk* this, PlayState* play) { if (this->unk_2E4 != 10) { if (this->unk_2E4 != 9) { this->unk_2E4 = 9; - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, 9); + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, 9); } else { func_80B51398(this, play); } @@ -778,7 +778,7 @@ void func_80B51D9C(EnGk* this, PlayState* play) { if (this->unk_1E4 & 4) { this->unk_1E4 &= ~4; this->unk_2E4 = 6; - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, 6); + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, 6); this->actionFunc = func_80B51EA4; } else { this->unk_1E4 |= 4; @@ -879,18 +879,18 @@ void func_80B5216C(EnGk* this, PlayState* play) { void func_80B521E8(EnGk* this, PlayState* play) { s16 sp1E = this->skelAnime.curFrame; - s16 lastFrame = Animation_GetLastFrame(sAnimations[this->unk_2E4].animation); + s16 lastFrame = Animation_GetLastFrame(sAnimationInfo[this->unk_2E4].animation); if (sp1E == lastFrame) { this->unk_2E4 = 1; - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, 1); + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, 1); this->actionFunc = func_80B5227C; } } void func_80B5227C(EnGk* this, PlayState* play) { s16 sp26 = this->skelAnime.curFrame; - s16 lastFrame = Animation_GetLastFrame(sAnimations[this->unk_2E4].animation); + s16 lastFrame = Animation_GetLastFrame(sAnimationInfo[this->unk_2E4].animation); if ((sp26 + 1) == lastFrame) { func_800B14D4(play, 20.0f, &this->actor.home.pos); @@ -1018,7 +1018,7 @@ void EnGk_Init(Actor* thisx, PlayState* play) { if (ENGK_GET_F(&this->actor) == ENGK_F_1) { this->unk_2E4 = 5; - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, 5); + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, 5); if (play->sceneNum == SCENE_17SETUGEN2) { if (Flags_GetSwitch(play, ENGK_GET_3F00(&this->actor))) { Actor_MarkForDeath(&this->actor); @@ -1029,9 +1029,9 @@ void EnGk_Init(Actor* thisx, PlayState* play) { } } else if (play->sceneNum == SCENE_GORONRACE) { if (gSaveContext.save.weekEventReg[33] & 0x80) { - if (gSaveContext.save.entranceIndex == 0xD010) { + if (gSaveContext.save.entrance == ENTRANCE(GORON_RACETRACK, 1)) { this->actionFunc = func_80B51760; - } else if (gSaveContext.save.entranceIndex == 0xD020) { + } else if (gSaveContext.save.entrance == ENTRANCE(GORON_RACETRACK, 2)) { this->actionFunc = func_80B52340; } else { this->actionFunc = func_80B51760; @@ -1056,7 +1056,7 @@ void EnGk_Init(Actor* thisx, PlayState* play) { this->unk_318 = this->actor.cutscene; this->actor.flags |= ACTOR_FLAG_10; this->actor.flags |= ACTOR_FLAG_2000000; - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, 0); + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, 0); this->actionFunc = func_80B5202C; } else { this->actionFunc = func_80B52654; diff --git a/src/overlays/actors/ovl_En_Gm/z_en_gm.c b/src/overlays/actors/ovl_En_Gm/z_en_gm.c index 0a49db1d1..3ad077fec 100644 --- a/src/overlays/actors/ovl_En_Gm/z_en_gm.c +++ b/src/overlays/actors/ovl_En_Gm/z_en_gm.c @@ -209,7 +209,7 @@ static ColliderSphereInit sSphereInit = { static CollisionCheckInfoInit2 sColChkInfoInit = { 0, 0, 0, 0, MASS_IMMOVABLE }; -static AnimationInfoS D_80951CC0[] = { +static AnimationInfoS sAnimationInfo[] = { { &object_in2_Anim_009CDC, 1.0f, 0, -1, ANIMMODE_LOOP, 0 }, { &object_in2_Anim_009CDC, 1.0f, 0, -1, ANIMMODE_LOOP, -4 }, { &object_in2_Anim_00A5E0, 1.0f, 0, -1, ANIMMODE_LOOP, 0 }, @@ -317,7 +317,7 @@ s32 func_8094E054(EnGm* this, PlayState* play, s32 arg2) { if (phi_v1) { if (tmp >= 0) { this->unk_3E8 = arg2; - ret = SubS_ChangeAnimationByInfoS(&this->skelAnime, D_80951CC0, arg2); + ret = SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimationInfo, arg2); this->unk_3A8 = this->skelAnime.playSpeed; } } @@ -1710,7 +1710,7 @@ void EnGm_Update(Actor* thisx, PlayState* play) { func_8094DFF8(this, play); func_8094E2D0(this); func_8094F2E8(this); - func_8013C964(&this->actor, play, this->unk_3B4, 30.0f, EXCH_ITEM_NONE, this->unk_3A4 & 7); + func_8013C964(&this->actor, play, this->unk_3B4, 30.0f, PLAYER_AP_NONE, this->unk_3A4 & 7); if ((this->unk_258 != 3) && (this->unk_258 != 5) && (this->unk_258 != 8)) { Actor_MoveWithGravity(&this->actor); Actor_UpdateBgCheckInfo(play, &this->actor, 30.0f, 12.0f, 0.0f, 4); diff --git a/src/overlays/actors/ovl_En_Go/z_en_go.c b/src/overlays/actors/ovl_En_Go/z_en_go.c index 395302b48..491e1c95e 100644 --- a/src/overlays/actors/ovl_En_Go/z_en_go.c +++ b/src/overlays/actors/ovl_En_Go/z_en_go.c @@ -186,7 +186,7 @@ static DamageTable sDamageTable = { /* Powder Keg */ DMG_ENTRY(1, 0x0), }; -static AnimationInfoS sAnimations[] = { +static AnimationInfoS sAnimationInfo[] = { { &gGoronLyingDownIdleAnim, 1.0f, 0, -1, ANIMMODE_LOOP, 0 }, { &gGoronLyingDownIdleAnim, 1.0f, 0, -1, ANIMMODE_LOOP, -4 }, { &gGoronUnrollAnim, 2.0f, 0, -1, ANIMMODE_ONCE, 0 }, @@ -793,7 +793,7 @@ s32 func_80A12C48(EnGo* this, PlayState* play, s32 arg2) { if (objIdx2 >= 0) { gSegments[6] = VIRTUAL_TO_PHYSICAL(play->objectCtx.status[objIdx2].segment); this->unk_3DC = arg2; - ret = SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimations, arg2); + ret = SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimationInfo, arg2); this->unk_398 = this->skelAnime.playSpeed; gSegments[6] = VIRTUAL_TO_PHYSICAL(play->objectCtx.status[objIdx].segment); } @@ -1373,7 +1373,8 @@ void func_80A143A8(EnGo* this, PlayState* play) { } void func_80A14430(EnGo* this, PlayState* play) { - if (((gSaveContext.save.entranceIndex == 0xD000) || (gSaveContext.save.entranceIndex == 0xD020)) && + if (((gSaveContext.save.entrance == ENTRANCE(GORON_RACETRACK, 0)) || + (gSaveContext.save.entrance == ENTRANCE(GORON_RACETRACK, 2))) && (gSaveContext.save.weekEventReg[33] & 0x80)) { func_80A14018(this, play); this->actionFunc = func_80A149B0; @@ -1383,7 +1384,8 @@ void func_80A14430(EnGo* this, PlayState* play) { } void func_80A1449C(EnGo* this, PlayState* play) { - if ((gSaveContext.save.entranceIndex == 0xD010) || (gSaveContext.save.entranceIndex == 0x1C00)) { + if ((gSaveContext.save.entrance == ENTRANCE(GORON_RACETRACK, 1)) || + (gSaveContext.save.entrance == ENTRANCE(CUTSCENE, 0))) { func_80A14104(this, play); this->actionFunc = func_80A149B0; } else { @@ -1511,7 +1513,7 @@ void func_80A14798(EnGo* this, PlayState* play) { void func_80A149B0(EnGo* this, PlayState* play) { s16 sp26 = this->actor.world.rot.y; - if ((ENGO_GET_F(&this->actor) == ENGO_F_2) && (gSaveContext.save.entranceIndex == 0xD010)) { + if ((ENGO_GET_F(&this->actor) == ENGO_F_2) && (gSaveContext.save.entrance == ENTRANCE(GORON_RACETRACK, 1))) { Actor_PlaySfxAtPos(&this->actor, NA_SE_EV_GORON_CHEER - SFX_FLAG); } else if (ENGO_GET_F(&this->actor) != ENGO_F_8) { if (func_80A1222C(this, play)) { @@ -1926,10 +1928,10 @@ void EnGo_Update(Actor* thisx, PlayState* play) { } else { phi_f0 = this->colliderCylinder.dim.radius + 40; } - func_8013C964(&this->actor, play, phi_f0, 20.0f, EXCH_ITEM_NONE, this->unk_390 & 7); + func_8013C964(&this->actor, play, phi_f0, 20.0f, PLAYER_AP_NONE, this->unk_390 & 7); } else if ((this->unk_390 & 0x200) && (this->unk_3EC != 0)) { phi_f0 = this->colliderCylinder.dim.radius + 40; - func_8013C964(&this->actor, play, phi_f0, 20.0f, EXCH_ITEM_NONE, this->unk_390 & 7); + func_8013C964(&this->actor, play, phi_f0, 20.0f, PLAYER_AP_NONE, this->unk_390 & 7); } if ((ENGO_GET_F(&this->actor) != ENGO_F_8) && (ENGO_GET_F(&this->actor) != ENGO_F_2) && diff --git a/src/overlays/actors/ovl_En_Gs/z_en_gs.c b/src/overlays/actors/ovl_En_Gs/z_en_gs.c index 6ad13b371..e831328f6 100644 --- a/src/overlays/actors/ovl_En_Gs/z_en_gs.c +++ b/src/overlays/actors/ovl_En_Gs/z_en_gs.c @@ -184,7 +184,7 @@ void func_80997D38(EnGs* this, PlayState* play) { if (Message_GetState(&play->msgCtx) == TEXT_STATE_NONE) { if (this->actor.xzDistToPlayer <= D_8099A408[this->actor.params]) { func_8013E8F8(&this->actor, play, D_8099A408[this->actor.params], D_8099A408[this->actor.params], - EXCH_ITEM_NONE, 0x2000, 0x2000); + PLAYER_AP_NONE, 0x2000, 0x2000); } } diff --git a/src/overlays/actors/ovl_En_Guard_Nuts/z_en_guard_nuts.c b/src/overlays/actors/ovl_En_Guard_Nuts/z_en_guard_nuts.c index 843657b60..a08d0835f 100644 --- a/src/overlays/actors/ovl_En_Guard_Nuts/z_en_guard_nuts.c +++ b/src/overlays/actors/ovl_En_Guard_Nuts/z_en_guard_nuts.c @@ -16,7 +16,7 @@ void EnGuardNuts_Destroy(Actor* thisx, PlayState* play); void EnGuardNuts_Update(Actor* thisx, PlayState* play); void EnGuardNuts_Draw(Actor* thisx, PlayState* play); -void EnGuardNuts_ChangeAnim(EnGuardNuts* this, s32 index); +void EnGuardNuts_ChangeAnim(EnGuardNuts* this, s32 animIndex); void EnGuardNuts_SetupWait(EnGuardNuts* this); void EnGuardNuts_Wait(EnGuardNuts* this, PlayState* play); void func_80ABB540(EnGuardNuts* this); @@ -72,7 +72,7 @@ static AnimationHeader* sAnimations[] = { &gDekuPalaceGuardWalkAnim, }; -static u8 sAnimModes[] = { ANIMMODE_LOOP, ANIMMODE_LOOP, ANIMMODE_ONCE, ANIMMODE_ONCE }; +static u8 sAnimationModes[] = { ANIMMODE_LOOP, ANIMMODE_LOOP, ANIMMODE_ONCE, ANIMMODE_ONCE }; static TexturePtr sEyeTextures[] = { gDekuPalaceGuardEyeOpenTex, @@ -126,13 +126,13 @@ void EnGuardNuts_Destroy(Actor* thisx, PlayState* play) { * @brief Changes the animation to the provided index. Updates animIndex and animFrameCount for the animation. * * @param this - * @param index the index of sAnimations to change to + * @param animIndex the index of sAnimations to change to */ -void EnGuardNuts_ChangeAnim(EnGuardNuts* this, s32 index) { - this->animIndex = index; +void EnGuardNuts_ChangeAnim(EnGuardNuts* this, s32 animIndex) { + this->animIndex = animIndex; this->animFrameCount = Animation_GetLastFrame(sAnimations[this->animIndex]); Animation_Change(&this->skelAnime, sAnimations[this->animIndex], 1.0f, 0.0f, this->animFrameCount, - sAnimModes[this->animIndex], -2.0f); + sAnimationModes[this->animIndex], -2.0f); } void EnGuardNuts_SetupWait(EnGuardNuts* this) { diff --git a/src/overlays/actors/ovl_En_Guruguru/z_en_guruguru.c b/src/overlays/actors/ovl_En_Guruguru/z_en_guruguru.c index 8fe8d58f7..a57effdcc 100644 --- a/src/overlays/actors/ovl_En_Guruguru/z_en_guruguru.c +++ b/src/overlays/actors/ovl_En_Guruguru/z_en_guruguru.c @@ -62,9 +62,9 @@ static ColliderCylinderInit sCylinderInit = { { 15, 20, 0, { 0, 0, 0 } }, }; -static AnimationHeader* D_80BC79CC[] = { &object_fu_Anim_000B04, &object_fu_Anim_00057C }; -static u8 D_80BC79D4[] = { ANIMMODE_LOOP, ANIMMODE_LOOP }; -static f32 D_80BC79D8[] = { 1.0f, 1.0f }; +static AnimationHeader* sAnimations[] = { &object_fu_Anim_000B04, &object_fu_Anim_00057C }; +static u8 sAnimationModes[] = { ANIMMODE_LOOP, ANIMMODE_LOOP }; +static f32 sPlaySpeeds[] = { 1.0f, 1.0f }; static TexturePtr sEyeTextures[] = { object_fu_Tex_005F20, object_fu_Tex_006320 }; static TexturePtr sMouthTextures[] = { object_fu_Tex_006720, object_fu_Tex_006920 }; @@ -105,17 +105,17 @@ void EnGuruguru_Destroy(Actor* thisx, PlayState* play) { } } -void EnGuruguru_ChangeAnimation(EnGuruguru* this, s32 arg1) { - this->frameCount = Animation_GetLastFrame(D_80BC79CC[arg1]); - Animation_Change(&this->skelAnime, D_80BC79CC[arg1], D_80BC79D8[arg1], 0.0f, this->frameCount, D_80BC79D4[arg1], - -4.0f); +void EnGuruguru_ChangeAnim(EnGuruguru* this, s32 animIndex) { + this->frameCount = Animation_GetLastFrame(sAnimations[animIndex]); + Animation_Change(&this->skelAnime, sAnimations[animIndex], sPlaySpeeds[animIndex], 0.0f, this->frameCount, + sAnimationModes[animIndex], -4.0f); } void EnGuruguru_DoNothing(EnGuruguru* this, PlayState* play) { } void func_80BC6E10(EnGuruguru* this) { - EnGuruguru_ChangeAnimation(this, 0); + EnGuruguru_ChangeAnim(this, 0); this->textIdIndex = 0; this->unk270 = 0; if (this->actor.params == 0) { @@ -295,7 +295,7 @@ void func_80BC7440(EnGuruguru* this, PlayState* play) { this->textIdIndex++; this->actor.textId = textIDs[this->textIdIndex]; func_801A3B48(1); - func_800B8500(&this->actor, play, 400.0f, 400.0f, EXCH_ITEM_MINUS1); + func_800B8500(&this->actor, play, 400.0f, 400.0f, PLAYER_AP_MINUS1); this->unk268 = 0; gSaveContext.save.weekEventReg[38] |= 0x40; this->actionFunc = func_80BC7520; @@ -309,7 +309,7 @@ void func_80BC7520(EnGuruguru* this, PlayState* play) { if (Actor_ProcessTalkRequest(&this->actor, &play->state)) { this->actionFunc = func_80BC7068; } else { - func_800B8500(&this->actor, play, 400.0f, 400.0f, EXCH_ITEM_MINUS1); + func_800B8500(&this->actor, play, 400.0f, 400.0f, PLAYER_AP_MINUS1); } } diff --git a/src/overlays/actors/ovl_En_Hanabi/z_en_hanabi.c b/src/overlays/actors/ovl_En_Hanabi/z_en_hanabi.c index 38f86041b..de0880e96 100644 --- a/src/overlays/actors/ovl_En_Hanabi/z_en_hanabi.c +++ b/src/overlays/actors/ovl_En_Hanabi/z_en_hanabi.c @@ -323,7 +323,7 @@ void func_80B23910(EnHanabi* this, PlayState* play) { } void func_80B23934(EnHanabi* this, PlayState* play) { - if ((gSaveContext.save.entranceIndex == 0x5410) && (gSaveContext.sceneSetupIndex == 7)) { + if ((gSaveContext.save.entrance == ENTRANCE(TERMINA_FIELD, 1)) && (gSaveContext.sceneSetupIndex == 7)) { if (play->csCtx.frames > 1650) { func_80B236C8(this, play); func_800B8FE8(&this->actor, NA_SE_EV_FIREWORKS_LAUNCH - SFX_FLAG); diff --git a/src/overlays/actors/ovl_En_Heishi/z_en_heishi.c b/src/overlays/actors/ovl_En_Heishi/z_en_heishi.c index aba6b4f90..b69429d1a 100644 --- a/src/overlays/actors/ovl_En_Heishi/z_en_heishi.c +++ b/src/overlays/actors/ovl_En_Heishi/z_en_heishi.c @@ -15,18 +15,18 @@ void EnHeishi_Destroy(Actor* thisx, PlayState* play); void EnHeishi_Update(Actor* thisx, PlayState* play); void EnHeishi_Draw(Actor* thisx, PlayState* play); -void EnHeishi_ChangeAnimation(EnHeishi* this, s32 animIndex); +void EnHeishi_ChangeAnim(EnHeishi* this, s32 animIndex); void EnHeishi_SetHeadRotation(EnHeishi* this); void EnHeishi_SetupIdle(EnHeishi* this); void EnHeishi_Idle(EnHeishi* this, PlayState* play); typedef enum { - /* 0 */ HEISHI_ANIMATION_STAND_HAND_ON_HIP, - /* 1 */ HEISHI_ANIMATION_CHEER_WITH_SPEAR, - /* 2 */ HEISHI_ANIMATION_WAVE, - /* 3 */ HEISHI_ANIMATION_SIT_AND_REACH, - /* 4 */ HEISHI_ANIMATION_STAND_UP -} EnHeishiAnimationIndex; + /* 0 */ HEISHI_ANIM_STAND_HAND_ON_HIP, + /* 1 */ HEISHI_ANIM_CHEER_WITH_SPEAR, + /* 2 */ HEISHI_ANIM_WAVE, + /* 3 */ HEISHI_ANIM_SIT_AND_REACH, + /* 4 */ HEISHI_ANIM_STAND_UP +} EnHeishiAnimation; const ActorInit En_Heishi_InitVars = { ACTOR_EN_HEISHI, @@ -99,11 +99,11 @@ void EnHeishi_Destroy(Actor* thisx, PlayState* play) { Collider_DestroyCylinder(play, &this->colliderCylinder); } -void EnHeishi_ChangeAnimation(EnHeishi* this, s32 animIndex) { +void EnHeishi_ChangeAnim(EnHeishi* this, s32 animIndex) { static AnimationHeader* sAnimations[] = { &gSoldierStandHandOnHip, &gSoldierCheerWithSpear, &gSoldierWave, &gSoldierSitAndReach, &gSoldierStandUp, }; - static u8 sAnimModes[] = { + static u8 sAnimationModes[] = { ANIMMODE_LOOP, ANIMMODE_LOOP, ANIMMODE_LOOP, ANIMMODE_LOOP, ANIMMODE_ONCE, ANIMMODE_LOOP, ANIMMODE_LOOP, ANIMMODE_LOOP, ANIMMODE_LOOP, ANIMMODE_LOOP, ANIMMODE_LOOP, ANIMMODE_LOOP, ANIMMODE_LOOP, ANIMMODE_LOOP, ANIMMODE_LOOP, ANIMMODE_LOOP, @@ -112,7 +112,7 @@ void EnHeishi_ChangeAnimation(EnHeishi* this, s32 animIndex) { this->animIndex = animIndex; this->frameCount = Animation_GetLastFrame(sAnimations[this->animIndex]); Animation_Change(&this->skelAnime, sAnimations[this->animIndex], 1.0f, 0.0f, this->frameCount, - sAnimModes[this->animIndex], -10.0f); + sAnimationModes[this->animIndex], -10.0f); } void EnHeishi_SetHeadRotation(EnHeishi* this) { @@ -131,9 +131,9 @@ void EnHeishi_SetHeadRotation(EnHeishi* this) { } void EnHeishi_SetupIdle(EnHeishi* this) { - s8 animIndex = HEISHI_ANIMATION_STAND_HAND_ON_HIP; + s8 animIndex = HEISHI_ANIM_STAND_HAND_ON_HIP; - EnHeishi_ChangeAnimation(this, animIndex); + EnHeishi_ChangeAnim(this, animIndex); this->unk278 = animIndex; this->actionFunc = EnHeishi_Idle; } diff --git a/src/overlays/actors/ovl_En_Hg/z_en_hg.c b/src/overlays/actors/ovl_En_Hg/z_en_hg.c index 8c0be4adf..83e0935f5 100644 --- a/src/overlays/actors/ovl_En_Hg/z_en_hg.c +++ b/src/overlays/actors/ovl_En_Hg/z_en_hg.c @@ -101,7 +101,7 @@ static CollisionCheckInfoInit2 sColChkInfoInit2 = { 0, 0, 0, 0, 0x80, }; -static AnimationInfo sAnimations[] = { +static AnimationInfo sAnimationInfo[] = { { &object_harfgibud_Anim_00260C, 1.0f, 0.0f, 0.0f, ANIMMODE_LOOP, -4.0f }, { &object_harfgibud_Anim_009D44, 1.0f, 0.0f, 0.0f, ANIMMODE_LOOP, -4.0f }, { &object_harfgibud_Anim_00A164, 1.0f, 0.0f, 0.0f, ANIMMODE_LOOP, -4.0f }, @@ -148,7 +148,7 @@ void EnHg_Destroy(Actor* thisx, PlayState* play) { } void func_80BCF354(EnHg* this) { - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, 0); + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, 0); this->actionFunc = func_80BCF398; } @@ -166,7 +166,7 @@ void func_80BCF398(EnHg* this, PlayState* play) { } void func_80BCF468(EnHg* this) { - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, 1); + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, 1); this->actionFunc = func_80BCF4AC; } @@ -190,7 +190,7 @@ void func_80BCF4AC(EnHg* this, PlayState* play) { } void func_80BCF5F0(EnHg* this) { - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, 0); + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, 0); this->actionFunc = func_80BCF634; } @@ -203,7 +203,7 @@ void func_80BCF634(EnHg* this, PlayState* play) { } void func_80BCF68C(EnHg* this) { - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, 2); + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, 2); this->actionFunc = func_80BCF6D0; } @@ -277,30 +277,30 @@ void func_80BCF95C(EnHg* this, PlayState* play) { this->cutscenes[3] = play->csCtx.actorActions[actionIndex]->action; switch (play->csCtx.actorActions[actionIndex]->action) { case 1: - this->currentAnimation = 0; - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, 0); + this->animIndex = 0; + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, 0); break; case 2: this->cutscenes[2] = 0; - this->currentAnimation = 3; - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, 3); + this->animIndex = 3; + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, 3); break; case 3: this->cutscenes[2] = 0; - this->currentAnimation = 5; - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, 5); + this->animIndex = 5; + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, 5); break; case 4: this->cutscenes[2] = 0; - this->currentAnimation = 7; + this->animIndex = 7; if ((this->unk218 == 1) || (this->unk218 == 3)) { func_8019F128(NA_SE_EN_HALF_REDEAD_TRANS); } - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, 7); + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, 7); break; case 5: - this->currentAnimation = 1; - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, 1); + this->animIndex = 1; + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, 1); break; case 6: gSaveContext.save.weekEventReg[75] |= 0x20; @@ -309,19 +309,19 @@ void func_80BCF95C(EnHg* this, PlayState* play) { } } else { if (Animation_OnFrame(&this->skelAnime, this->skelAnime.endFrame)) { - switch (this->currentAnimation) { + switch (this->animIndex) { case 3: - this->currentAnimation = 4; - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, 4); + this->animIndex = 4; + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, 4); break; case 5: - this->currentAnimation = 6; - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, 6); + this->animIndex = 6; + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, 6); break; } } } - switch (this->currentAnimation) { + switch (this->animIndex) { case 3: case 4: func_800B9010(&this->actor, NA_SE_EN_HALF_REDEAD_LOOP - SFX_FLAG); diff --git a/src/overlays/actors/ovl_En_Hg/z_en_hg.h b/src/overlays/actors/ovl_En_Hg/z_en_hg.h index 288314379..c81d61d49 100644 --- a/src/overlays/actors/ovl_En_Hg/z_en_hg.h +++ b/src/overlays/actors/ovl_En_Hg/z_en_hg.h @@ -16,7 +16,7 @@ typedef struct EnHg { /* 0x1D4 */ EnHgActionFunc actionFunc; /* 0x1D8 */ MtxF unk1D8; /* 0x218 */ s32 unk218; - /* 0x21C */ s32 currentAnimation; + /* 0x21C */ s32 animIndex; /* 0x220 */ Vec3s jointTable[HARFGIBUD_GIBDO_LIMB_MAX]; /* 0x292 */ Vec3s morphTable[HARFGIBUD_GIBDO_LIMB_MAX]; /* 0x304 */ UNK_TYPE1 pad304[0xC]; diff --git a/src/overlays/actors/ovl_En_Hgo/z_en_hgo.c b/src/overlays/actors/ovl_En_Hgo/z_en_hgo.c index c8de1f210..83fbe5988 100644 --- a/src/overlays/actors/ovl_En_Hgo/z_en_hgo.c +++ b/src/overlays/actors/ovl_En_Hgo/z_en_hgo.c @@ -39,7 +39,7 @@ const ActorInit En_Hgo_InitVars = { (ActorFunc)EnHgo_Draw, }; -static AnimationInfo sAnimations[] = { +static AnimationInfo sAnimationInfo[] = { { &object_harfgibud_Anim_00B644, 1.0f, 0.0f, 0.0f, ANIMMODE_LOOP, -4.0f }, { &object_harfgibud_Anim_013684, 1.0f, 0.0f, 0.0f, ANIMMODE_LOOP, 0.0f }, { &object_harfgibud_Anim_0152EC, 1.0f, 0.0f, 0.0f, ANIMMODE_ONCE, 0.0f }, @@ -127,7 +127,7 @@ void func_80BD0434(EnHgo* this, PlayState* play) { } void func_80BD049C(EnHgo* this) { - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, 0); + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, 0); this->actionFunc = func_80BD04E0; } @@ -258,28 +258,28 @@ s32 func_80BD0898(EnHgo* this, PlayState* play) { switch (play->csCtx.actorActions[actionIndex]->action) { case 1: this->unk_218 = 0; - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, 0); + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, 0); break; case 2: this->actor.draw = EnHgo_Draw; this->unk_218 = 1; - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, 1); + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, 1); break; case 3: this->unk_218 = 2; - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, 2); + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, 2); break; case 4: this->unk_218 = 3; - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, 3); + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, 3); break; case 5: this->unk_218 = 4; - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, 4); + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, 4); break; case 6: this->unk_218 = 5; - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, 5); + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, 5); break; } } else if (Animation_OnFrame(&this->skelAnime, this->skelAnime.endFrame)) { @@ -295,11 +295,11 @@ s32 func_80BD0898(EnHgo* this, PlayState* play) { break; case 2: this->unk_218 = 3; - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, 3); + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, 3); break; case 5: this->unk_218 = 6; - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, 6); + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, 6); } } diff --git a/src/overlays/actors/ovl_En_Hint_Skb/z_en_hint_skb.c b/src/overlays/actors/ovl_En_Hint_Skb/z_en_hint_skb.c index ee337e9a9..3664fcede 100644 --- a/src/overlays/actors/ovl_En_Hint_Skb/z_en_hint_skb.c +++ b/src/overlays/actors/ovl_En_Hint_Skb/z_en_hint_skb.c @@ -126,7 +126,7 @@ static DamageTable sDamageTable = { /* Powder Keg */ DMG_ENTRY(1, 0xF), }; -static AnimationInfo sAnimations[] = { +static AnimationInfo sAnimationInfo[] = { { &object_skb_Anim_0064E0, 0.96f, 0.0f, 0.0f, ANIMMODE_LOOP, -4.0f }, { &object_skb_Anim_003584, 1.0f, 0.0f, 0.0f, ANIMMODE_ONCE, -1.0f }, { &object_skb_Anim_002190, 0.6f, 0.0f, 0.0f, ANIMMODE_ONCE_INTERP, 4.0f }, @@ -181,7 +181,7 @@ void func_80C1FE20(EnHintSkb* this, PlayState* play) { } void func_80C1FE30(EnHintSkb* this) { - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, 0); + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, 0); this->actor.speedXZ = 1.6f; this->actionFunc = func_80C1FE80; } @@ -200,7 +200,7 @@ void func_80C1FE80(EnHintSkb* this, PlayState* play) { void func_80C1FF30(EnHintSkb* this) { this->collider.base.atFlags &= ~AT_BOUNCED; this->actor.speedXZ = 0.0f; - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, 2); + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, 2); this->actionFunc = func_80C1FF88; } @@ -274,12 +274,12 @@ void func_80C2016C(EnHintSkb* this, PlayState* play) { void func_80C20274(EnHintSkb* this) { if (this->skelAnime.animation == &object_skb_Anim_00697C) { this->actor.world.rot.y = this->actor.yawTowardsPlayer; - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, 8); + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, 8); this->actor.gravity = -1.0f; this->actor.speedXZ = 1.0f; } else { this->actor.world.rot.y = this->actor.yawTowardsPlayer; - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, 3); + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, 3); if (this->actor.bgCheckFlags & 1) { this->actor.speedXZ = -4.0f; } @@ -316,7 +316,7 @@ void func_80C20334(EnHintSkb* this, PlayState* play) { } void func_80C20484(EnHintSkb* this) { - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, 4); + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, 4); this->unk_3E8 |= 4; if (this->actor.bgCheckFlags & 1) { this->actor.speedXZ = -6.0f; @@ -348,7 +348,7 @@ void func_80C20590(EnHintSkb* this, PlayState* play) { this->drawDmgEffAlpha = 0.0f; if (this->actor.colChkInfo.health != 0) { Actor_SetColorFilter(&this->actor, 0x4000, 255, 0, 8); - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, 3); + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, 3); Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_STALKID_DAMAGE); this->unk_3E8 |= 1; func_80C20274(this); @@ -375,7 +375,7 @@ void func_80C2069C(EnHintSkb* this, PlayState* play) { this->drawDmgEffAlpha = 0.0f; if (this->actor.colChkInfo.health != 0) { Actor_SetColorFilter(&this->actor, 0x4000, 255, 0, 8); - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, 3); + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, 3); Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_STALKID_DAMAGE); this->unk_3E8 |= 1; func_80C20274(this); @@ -404,10 +404,10 @@ void func_80C2077C(EnHintSkb* this, PlayState* play) { this->actor.speedXZ = 2.4f; this->actor.gravity = -1.0f; this->actor.velocity.y = 3.0f; - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, 8); + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, 8); } } else { - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, 11); + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, 11); Message_StartTextbox(play, 0x1148, &this->actor); this->unk_3E6 = 0x1148; } @@ -466,7 +466,7 @@ void func_80C208D0(EnHintSkb* this, PlayState* play) { Animation_OnFrame(&this->skelAnime, this->skelAnime.endFrame)) { Message_StartTextbox(play, 0x1147, &this->actor); this->unk_3E6 = 0x1147; - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, 0); + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, 0); } } @@ -541,7 +541,7 @@ void func_80C20C24(EnHintSkb* this, PlayState* play) { case 0x1147: Message_StartTextbox(play, 0x1148, &this->actor); this->unk_3E6 = 0x1148; - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, 11); + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, 11); break; case 0x1148: @@ -590,7 +590,7 @@ void func_80C20D64(EnHintSkb* this, PlayState* play) { this->actor.hintId = 255; this->actor.textId = 0; if (this->actionFunc == func_80C1FE80) { - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, 12); + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, 12); } func_80C2075C(this); } @@ -700,7 +700,7 @@ void func_80C20E90(EnHintSkb* this, PlayState* play) { this->drawDmgEffScale = 0.5f; Actor_SetColorFilter(&this->actor, 0x4000, 255, 0, 8); Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_STALKID_DAMAGE); - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, 3); + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, 3); func_80C2066C(this); break; @@ -719,7 +719,7 @@ void func_80C20E90(EnHintSkb* this, PlayState* play) { case 13: Actor_SetColorFilter(&this->actor, 0x4000, 255, 0, 8); Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_STALKID_DAMAGE); - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, 3); + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, 3); func_80C20274(this); break; diff --git a/src/overlays/actors/ovl_En_Holl/z_en_holl.c b/src/overlays/actors/ovl_En_Holl/z_en_holl.c index 0e85e7dc5..3579f23cc 100644 --- a/src/overlays/actors/ovl_En_Holl/z_en_holl.c +++ b/src/overlays/actors/ovl_En_Holl/z_en_holl.c @@ -188,7 +188,7 @@ void EnHoll_VisibleIdle(EnHoll* this, PlayState* play) { func_8012EBF8(play, &play->roomCtx); } } else if (this->type == EN_HOLL_TYPE_SCENE_CHANGER) { - play->nextEntranceIndex = play->setupExitList[EN_HOLL_GET_EXIT_LIST_INDEX(&this->actor)]; + play->nextEntrance = play->setupExitList[EN_HOLL_GET_EXIT_LIST_INDEX(&this->actor)]; gSaveContext.unk_3DBB = 1; Scene_SetExitFade(play); play->transitionTrigger = TRANS_TRIGGER_START; diff --git a/src/overlays/actors/ovl_En_Horse/z_en_horse.c b/src/overlays/actors/ovl_En_Horse/z_en_horse.c index 9e528cf3b..b2b67b106 100644 --- a/src/overlays/actors/ovl_En_Horse/z_en_horse.c +++ b/src/overlays/actors/ovl_En_Horse/z_en_horse.c @@ -25,7 +25,7 @@ void EnHorse_StartMountedIdleResetAnim(EnHorse* this); void EnHorse_StartMountedIdle(EnHorse* this); void EnHorse_MountedIdle(EnHorse* this, PlayState* play); void EnHorse_MountedIdleAnim(EnHorse* this); -void EnHorse_MountedIdleWhinney(EnHorse* this); +void EnHorse_MountedIdleWhinny(EnHorse* this); void EnHorse_StartTurning(EnHorse* this); void EnHorse_StartWalkingFromIdle(EnHorse* this); void EnHorse_StartWalkingInterruptable(EnHorse* this); @@ -108,20 +108,32 @@ typedef struct { RaceWaypoint* waypoints; } RaceInfo; -static AnimationHeader* sEponaAnimHeaders[] = { +typedef enum { + /* 0 */ ENHORSE_ANIM_IDLE, + /* 1 */ ENHORSE_ANIM_WHINNY, + /* 2 */ ENHORSE_ANIM_STOPPING, + /* 3 */ ENHORSE_ANIM_REARING, + /* 4 */ ENHORSE_ANIM_WALK, + /* 5 */ ENHORSE_ANIM_TROT, + /* 6 */ ENHORSE_ANIM_GALLOP, + /* 7 */ ENHORSE_ANIM_LOW_JUMP, + /* 8 */ ENHORSE_ANIM_HIGH_JUMP +} EnHorseAnimation; + +static AnimationHeader* sEponaAnimations[] = { &object_horse_link_child_Anim_006D44, &object_horse_link_child_Anim_007468, &object_horse_link_child_Anim_005F64, &object_horse_link_child_Anim_004DE8, &object_horse_link_child_Anim_007D50, &object_horse_link_child_Anim_0043AC, &object_horse_link_child_Anim_002F98, &object_horse_link_child_Anim_0035B0, &object_horse_link_child_Anim_003D38, }; -static AnimationHeader* sHniAnimHeaders[] = { +static AnimationHeader* sHniAnimations[] = { &object_ha_Anim_00C850, &object_ha_Anim_00CE70, &object_ha_Anim_00B9C8, &object_ha_Anim_00B00C, &object_ha_Anim_00D648, &object_ha_Anim_00A650, &object_ha_Anim_009208, &object_ha_Anim_009858, &object_ha_Anim_00A05C, }; static AnimationHeader** sAnimationHeaders[] = { - NULL, NULL, sEponaAnimHeaders, sHniAnimHeaders, sHniAnimHeaders, + NULL, NULL, sEponaAnimations, sHniAnimations, sHniAnimations, }; static f32 sPlaybackSpeeds[] = { @@ -228,11 +240,15 @@ static u8 sResetNoInput[] = { true, true, true, false, false, false, false, false, false, false, false, false, }; -static s32 sIdleAnimIds[] = { - 1, 3, 0, 3, 1, 0, +static s32 sIdleAnimIndices[] = { + ENHORSE_ANIM_WHINNY, ENHORSE_ANIM_REARING, ENHORSE_ANIM_IDLE, + ENHORSE_ANIM_REARING, ENHORSE_ANIM_WHINNY, ENHORSE_ANIM_IDLE, }; -static s16 sIngoAnimations[] = { 7, 6, 2, 2, 1, 1, 0, 0, 0, 0 }; +static s16 sIngoAnimIndices[] = { + ENIN_ANIM_7, ENIN_ANIM_6, ENIN_ANIM_2, ENIN_ANIM_2, ENIN_ANIM_1, + ENIN_ANIM_1, ENIN_ANIM_0, ENIN_ANIM_0, ENIN_ANIM_0, ENIN_ANIM_0, +}; static EnHorseCsFunc sCutsceneInitFuncs[] = { NULL, @@ -549,7 +565,7 @@ s32 func_8087C38C(PlayState* play, EnHorse* this, Vec3f* arg2) { } void EnHorse_IdleAnimSounds(EnHorse* this, PlayState* play) { - if ((this->animationIdx == ENHORSE_ANIM_IDLE) && + if ((this->animIndex == ENHORSE_ANIM_IDLE) && (((this->curFrame > 35.0f) && (this->type == HORSE_TYPE_EPONA)) || ((this->curFrame > 28.0f) && (this->type == HORSE_TYPE_HNI)) || ((this->curFrame > 25.0f) && (this->type == HORSE_TYPE_2))) && @@ -560,7 +576,7 @@ void EnHorse_IdleAnimSounds(EnHorse* this, PlayState* play) { } else { Audio_PlaySfxAtPos(&this->actor.projectedPos, NA_SE_EV_KID_HORSE_SANDDUST); } - } else if ((this->animationIdx == 3) && (this->curFrame > 25.0f) && !(this->stateFlags & ENHORSE_LAND2_SOUND)) { + } else if ((this->animIndex == 3) && (this->curFrame > 25.0f) && !(this->stateFlags & ENHORSE_LAND2_SOUND)) { this->stateFlags |= ENHORSE_LAND2_SOUND; if (this->type == HORSE_TYPE_2) { Audio_PlaySfxAtPos(&this->actor.projectedPos, NA_SE_EV_KID_HORSE_LAND2); @@ -653,10 +669,12 @@ void EnHorse_ResetRace(EnHorse* this, PlayState* play) { s32 EnHorse_PlayerCanMove(EnHorse* this, PlayState* play) { Player* player = GET_PLAYER(play); - if ((player->stateFlags1 & 1) || (func_800B7128(GET_PLAYER(play)) == true) || (player->stateFlags1 & 0x100000) || + if ((player->stateFlags1 & PLAYER_STATE1_1) || (func_800B7128(GET_PLAYER(play)) == true) || + (player->stateFlags1 & PLAYER_STATE1_100000) || (((this->stateFlags & ENHORSE_FLAG_19) || (this->stateFlags & ENHORSE_FLAG_29)) && !this->inRace) || - (this->action == 19) || (player->actor.flags & ACTOR_FLAG_100) || (play->csCtx.state != 0) || - (ActorCutscene_GetCurrentIndex() != -1) || (player->stateFlags1 & 0x20) || (player->csMode != 0)) { + (this->action == ENHORSE_ACTION_HBA) || (player->actor.flags & ACTOR_FLAG_100) || + (play->csCtx.state != CS_STATE_0) || (ActorCutscene_GetCurrentIndex() != -1) || + (player->stateFlags1 & PLAYER_STATE1_20) || (player->csMode != 0)) { return false; } return true; @@ -716,7 +734,7 @@ void EnHorse_Init(Actor* thisx, PlayState* play2) { thisx->objBankIndex = Object_Spawn(&play->objectCtx, OBJECT_HORSE_LINK_CHILD); Actor_SetObjectDependency(play, &this->actor); Skin_Init(&play->state, &this->skin, sSkeletonHeaders[this->type], sAnimationHeaders[this->type][0]); - Animation_PlayOnce(&this->skin.skelAnime, sAnimationHeaders[this->type][this->animationIdx]); + Animation_PlayOnce(&this->skin.skelAnime, sAnimationHeaders[this->type][this->animIndex]); this->unk_1EC |= 0x200; } else { thisx->update = func_8087D540; @@ -775,13 +793,13 @@ void EnHorse_Init(Actor* thisx, PlayState* play2) { } if (((play->sceneNum == SCENE_KOEPONARACE) && (GET_RACE_FLAGS == 1)) || - ((gSaveContext.save.entranceIndex == 0x6400) && Cutscene_GetSceneSetupIndex(play))) { + ((gSaveContext.save.entrance == ENTRANCE(ROMANI_RANCH, 0)) && Cutscene_GetSceneSetupIndex(play))) { this->stateFlags |= ENHORSE_FLAG_25; } thisx->gravity = -3.5f; ActorShape_Init(&thisx->shape, 0.0f, ActorShadow_DrawHorse, 20.0f); - this->action = ENHORSE_ACT_IDLE; + this->action = ENHORSE_ACTION_IDLE; thisx->speedXZ = 0.0f; if (this->type == HORSE_TYPE_2) { @@ -823,7 +841,7 @@ void EnHorse_Init(Actor* thisx, PlayState* play2) { Skin_Init(&play->state, &this->skin, sSkeletonHeaders[this->type], sAnimationHeaders[this->type][0]); } - this->animationIdx = 0; + this->animIndex = 0; this->numBoosts = 6; this->boostRegenTime = 0; this->postDrawFunc = NULL; @@ -926,7 +944,7 @@ void func_8087D540(Actor* thisx, PlayState* play) { } else { Skin_Init(&play->state, &this->skin, sSkeletonHeaders[this->type], sAnimationHeaders[this->type][0]); } - Animation_PlayOnce(&this->skin.skelAnime, sAnimationHeaders[this->type][this->animationIdx]); + Animation_PlayOnce(&this->skin.skelAnime, sAnimationHeaders[this->type][this->animIndex]); } } @@ -934,7 +952,7 @@ void EnHorse_Destroy(Actor* thisx, PlayState* play) { EnHorse* this = THIS; if (this->stateFlags & ENHORSE_DRAW) { - Audio_StopSfxByPos(&this->unk_218); + AudioSfx_StopByPos(&this->unk_218); } Skin_Free(&play->state, &this->skin); Collider_DestroyCylinder(play, &this->colliderCylinder1); @@ -951,8 +969,8 @@ void EnHorse_RotateToPlayer(EnHorse* this, PlayState* play) { } void EnHorse_Freeze(EnHorse* this, PlayState* play) { - if ((this->action != ENHORSE_ACT_HBA) && (this->action != ENHORSE_ACT_21) && - (this->action != ENHORSE_ACT_FLEE_PLAYER)) { + if ((this->action != ENHORSE_ACTION_CS_UPDATE) && (this->action != ENHORSE_ACTION_21) && + (this->action != ENHORSE_ACTION_HBA)) { if (sResetNoInput[this->actor.params] && (this->actor.params != ENHORSE_6)) { Player* player = GET_PLAYER(play); @@ -962,11 +980,11 @@ void EnHorse_Freeze(EnHorse* this, PlayState* play) { player->actor.world.pos.y += 70.0f; } this->prevAction = this->action; - this->action = ENHORSE_ACT_FROZEN; + this->action = ENHORSE_ACTION_FROZEN; this->colliderCylinder1.base.ocFlags1 &= ~OC1_ON; this->colliderCylinder2.base.ocFlags1 &= ~OC1_ON; this->colliderJntSph.base.ocFlags1 &= ~OC1_ON; - this->animationIdx = ENHORSE_ANIM_IDLE; + this->animIndex = ENHORSE_ANIM_IDLE; } } @@ -983,13 +1001,13 @@ void EnHorse_Frozen(EnHorse* this, PlayState* play) { EnHorse_StartMountedIdleResetAnim(this); } else if (this->actor.params == ENHORSE_11) { this->actor.params = ENHORSE_7; - if (play->csCtx.state != 0) { + if (play->csCtx.state != CS_STATE_0) { EnHorse_StartMountedIdle(this); } else { this->actor.speedXZ = 8.0f; EnHorse_StartGalloping(this); } - } else if (this->prevAction == ENHORSE_ACT_IDLE) { + } else if (this->prevAction == ENHORSE_ACTION_IDLE) { EnHorse_StartMountedIdle(this); } else { EnHorse_StartMountedIdleResetAnim(this); @@ -998,9 +1016,9 @@ void EnHorse_Frozen(EnHorse* this, PlayState* play) { if (this->actor.params != ENHORSE_0) { this->actor.params = ENHORSE_0; } - } else if (this->prevAction == ENHORSE_ACT_MOUNTED_TURN) { + } else if (this->prevAction == ENHORSE_ACTION_MOUNTED_IDLE) { EnHorse_ChangeIdleAnimation(this, 0, 0.0f); - } else if (this->prevAction == ENHORSE_ACT_MOUNTED_WALK) { + } else if (this->prevAction == ENHORSE_ACTION_MOUNTED_IDLE_WHINNYING) { EnHorse_ChangeIdleAnimation(this, 0, 0.0f); } else { EnHorse_ChangeIdleAnimation(this, 0, 0.0f); @@ -1099,8 +1117,8 @@ void EnHorse_StartMountedIdleResetAnim(EnHorse* this) { void EnHorse_StartMountedIdle(EnHorse* this) { f32 curFrame; - this->action = ENHORSE_ACT_MOUNTED_TURN; - this->animationIdx = ENHORSE_ANIM_IDLE; + this->action = ENHORSE_ACTION_MOUNTED_IDLE; + this->animIndex = ENHORSE_ANIM_IDLE; if (((this->curFrame > 35.0f) && (this->type == HORSE_TYPE_EPONA)) || ((this->curFrame > 28.0f) && (this->type == HORSE_TYPE_HNI))) { @@ -1114,8 +1132,8 @@ void EnHorse_StartMountedIdle(EnHorse* this) { } } curFrame = this->skin.skelAnime.curFrame; - Animation_Change(&this->skin.skelAnime, sAnimationHeaders[this->type][this->animationIdx], 1.0f, curFrame, - Animation_GetLastFrame(sAnimationHeaders[this->type][this->animationIdx]), ANIMMODE_ONCE, -3.0f); + Animation_Change(&this->skin.skelAnime, sAnimationHeaders[this->type][this->animIndex], 1.0f, curFrame, + Animation_GetLastFrame(sAnimationHeaders[this->type][this->animIndex]), ANIMMODE_ONCE, -3.0f); } void EnHorse_MountedIdle(EnHorse* this, PlayState* play) { @@ -1145,16 +1163,16 @@ void EnHorse_MountedIdle(EnHorse* this, PlayState* play) { void EnHorse_MountedIdleAnim(EnHorse* this) { this->skin.skelAnime.curFrame = 0.0f; - EnHorse_MountedIdleWhinney(this); + EnHorse_MountedIdleWhinny(this); } -void EnHorse_MountedIdleWhinney(EnHorse* this) { +void EnHorse_MountedIdleWhinny(EnHorse* this) { f32 curFrame; - this->action = ENHORSE_ACT_MOUNTED_WALK; - this->animationIdx = ENHORSE_ANIM_WHINNEY; + this->action = ENHORSE_ACTION_MOUNTED_IDLE_WHINNYING; + this->animIndex = ENHORSE_ANIM_WHINNY; curFrame = this->skin.skelAnime.curFrame; - Animation_Change(&this->skin.skelAnime, sAnimationHeaders[this->type][this->animationIdx], 1.0f, curFrame, + Animation_Change(&this->skin.skelAnime, sAnimationHeaders[this->type][this->animIndex], 1.0f, curFrame, Animation_GetLastFrame(sAnimationHeaders[this->type][1]), ANIMMODE_ONCE, -3.0f); if (this->stateFlags & ENHORSE_DRAW) { if (this->type == HORSE_TYPE_2) { @@ -1165,7 +1183,7 @@ void EnHorse_MountedIdleWhinney(EnHorse* this) { } } -void EnHorse_MountedIdleWhinneying(EnHorse* this, PlayState* play) { +void EnHorse_MountedIdleWhinnying(EnHorse* this, PlayState* play) { f32 stickMag; s16 stickAngle = 0; @@ -1191,10 +1209,10 @@ void EnHorse_MountedIdleWhinneying(EnHorse* this, PlayState* play) { } void EnHorse_StartTurning(EnHorse* this) { - this->action = ENHORSE_ACT_MOUNTED_TROT; + this->action = ENHORSE_ACTION_MOUNTED_TURN; this->soundTimer = 0; - this->animationIdx = ENHORSE_ANIM_WALK; - Animation_Change(&this->skin.skelAnime, sAnimationHeaders[this->type][this->animationIdx], 1.0f, 0.0f, + this->animIndex = ENHORSE_ANIM_WALK; + Animation_Change(&this->skin.skelAnime, sAnimationHeaders[this->type][this->animIndex], 1.0f, 0.0f, Animation_GetLastFrame(sAnimationHeaders[this->type][4]), ANIMMODE_ONCE, -3.0f); } @@ -1254,20 +1272,20 @@ void EnHorse_StartWalkingInterruptable(EnHorse* this) { } void EnHorse_StartWalking(EnHorse* this) { - this->action = ENHORSE_ACT_MOUNTED_GALLOP; + this->action = ENHORSE_ACTION_MOUNTED_WALK; this->soundTimer = 0; - this->animationIdx = ENHORSE_ANIM_WALK; + this->animIndex = ENHORSE_ANIM_WALK; this->waitTimer = 0; - Animation_Change(&this->skin.skelAnime, sAnimationHeaders[this->type][this->animationIdx], 1.0f, 0.0f, + Animation_Change(&this->skin.skelAnime, sAnimationHeaders[this->type][this->animIndex], 1.0f, 0.0f, Animation_GetLastFrame(sAnimationHeaders[this->type][4]), ANIMMODE_ONCE, -3.0f); } void EnHorse_MountedWalkingReset(EnHorse* this) { - this->action = ENHORSE_ACT_MOUNTED_GALLOP; + this->action = ENHORSE_ACTION_MOUNTED_WALK; this->soundTimer = 0; - this->animationIdx = ENHORSE_ANIM_WALK; + this->animIndex = ENHORSE_ANIM_WALK; this->waitTimer = 0; - Animation_PlayOnce(&this->skin.skelAnime, sAnimationHeaders[this->type][this->animationIdx]); + Animation_PlayOnce(&this->skin.skelAnime, sAnimationHeaders[this->type][this->animIndex]); } void EnHorse_MountedWalk(EnHorse* this, PlayState* play) { @@ -1326,16 +1344,16 @@ void EnHorse_MountedWalk(EnHorse* this, PlayState* play) { } void EnHorse_StartTrotting(EnHorse* this) { - this->action = ENHORSE_ACT_MOUNTED_REARING; - this->animationIdx = ENHORSE_ANIM_TROT; - Animation_Change(&this->skin.skelAnime, sAnimationHeaders[this->type][this->animationIdx], 1.0f, 0.0f, - Animation_GetLastFrame(sAnimationHeaders[this->type][this->animationIdx]), ANIMMODE_ONCE, -3.0f); + this->action = ENHORSE_ACTION_MOUNTED_TROT; + this->animIndex = ENHORSE_ANIM_TROT; + Animation_Change(&this->skin.skelAnime, sAnimationHeaders[this->type][this->animIndex], 1.0f, 0.0f, + Animation_GetLastFrame(sAnimationHeaders[this->type][this->animIndex]), ANIMMODE_ONCE, -3.0f); } void EnHorse_MountedTrotReset(EnHorse* this) { - this->action = ENHORSE_ACT_MOUNTED_REARING; - this->animationIdx = ENHORSE_ANIM_TROT; - Animation_PlayOnce(&this->skin.skelAnime, sAnimationHeaders[this->type][this->animationIdx]); + this->action = ENHORSE_ACTION_MOUNTED_TROT; + this->animIndex = ENHORSE_ANIM_TROT; + Animation_PlayOnce(&this->skin.skelAnime, sAnimationHeaders[this->type][this->animIndex]); } void EnHorse_MountedTrot(EnHorse* this, PlayState* play) { @@ -1370,29 +1388,29 @@ void EnHorse_StartGallopingInterruptable(EnHorse* this) { } void EnHorse_StartGalloping(EnHorse* this) { - this->action = ENHORSE_ACT_STOPPING; - this->animationIdx = ENHORSE_ANIM_GALLOP; + this->action = ENHORSE_ACTION_MOUNTED_GALLOP; + this->animIndex = ENHORSE_ANIM_GALLOP; this->unk_230 = 0; - Animation_Change(&this->skin.skelAnime, sAnimationHeaders[this->type][this->animationIdx], 1.0f, 0.0f, - Animation_GetLastFrame(sAnimationHeaders[this->type][this->animationIdx]), ANIMMODE_ONCE, -3.0f); + Animation_Change(&this->skin.skelAnime, sAnimationHeaders[this->type][this->animIndex], 1.0f, 0.0f, + Animation_GetLastFrame(sAnimationHeaders[this->type][this->animIndex]), ANIMMODE_ONCE, -3.0f); } void EnHorse_MountedGallopReset(EnHorse* this) { this->noInputTimer = 0; this->noInputTimerMax = 0; - this->action = ENHORSE_ACT_STOPPING; - this->animationIdx = ENHORSE_ANIM_GALLOP; + this->action = ENHORSE_ACTION_MOUNTED_GALLOP; + this->animIndex = ENHORSE_ANIM_GALLOP; this->unk_230 = 0; - Animation_PlayOnce(&this->skin.skelAnime, sAnimationHeaders[this->type][this->animationIdx]); + Animation_PlayOnce(&this->skin.skelAnime, sAnimationHeaders[this->type][this->animIndex]); } void EnHorse_JumpLanding(EnHorse* this, PlayState* play) { Vec3s* jointTable; f32 y; - this->action = ENHORSE_ACT_STOPPING; - this->animationIdx = ENHORSE_ANIM_GALLOP; - Animation_PlayOnce(&this->skin.skelAnime, sAnimationHeaders[this->type][this->animationIdx]); + this->action = ENHORSE_ACTION_MOUNTED_GALLOP; + this->animIndex = ENHORSE_ANIM_GALLOP; + Animation_PlayOnce(&this->skin.skelAnime, sAnimationHeaders[this->type][this->animIndex]); jointTable = this->skin.skelAnime.jointTable; y = jointTable->y; this->riderPos.y += y * 0.01f * this->unk_528 * 0.01f; @@ -1436,10 +1454,10 @@ void EnHorse_MountedGallop(EnHorse* this, PlayState* play) { } void EnHorse_StartRearing(EnHorse* this) { - this->action = ENHORSE_ACT_REVERSE; - this->animationIdx = ENHORSE_ANIM_REARING; + this->action = ENHORSE_ACTION_MOUNTED_REARING; + this->animIndex = ENHORSE_ANIM_REARING; - if (sAnimationHeaders[this->type][this->animationIdx] == NULL) { + if (sAnimationHeaders[this->type][this->animIndex] == NULL) { if (Rand_ZeroOne() > 0.5f) { if (this->stateFlags & ENHORSE_DRAW) { if (this->type == HORSE_TYPE_2) { @@ -1464,8 +1482,8 @@ void EnHorse_StartRearing(EnHorse* this) { } Rumble_Request(0.0f, 180, 20, 100); - Animation_Change(&this->skin.skelAnime, sAnimationHeaders[this->type][this->animationIdx], 1.0f, 0.0f, - Animation_GetLastFrame(sAnimationHeaders[this->type][this->animationIdx]), ANIMMODE_ONCE, -3.0f); + Animation_Change(&this->skin.skelAnime, sAnimationHeaders[this->type][this->animIndex], 1.0f, 0.0f, + Animation_GetLastFrame(sAnimationHeaders[this->type][this->animIndex]), ANIMMODE_ONCE, -3.0f); } void EnHorse_MountedRearing(EnHorse* this, PlayState* play) { @@ -1511,9 +1529,9 @@ void EnHorse_MountedRearing(EnHorse* this, PlayState* play) { } void EnHorse_StartBraking(EnHorse* this, PlayState* play) { - this->action = ENHORSE_ACT_LOW_JUMP; - this->animationIdx = ENHORSE_ANIM_STOPPING; - if (sAnimationHeaders[this->type][this->animationIdx] == NULL) { + this->action = ENHORSE_ACTION_STOPPING; + this->animIndex = ENHORSE_ANIM_STOPPING; + if (sAnimationHeaders[this->type][this->animIndex] == NULL) { if (Rand_ZeroOne() > 0.5f) { if (this->stateFlags & ENHORSE_DRAW) { if (this->type == HORSE_TYPE_2) { @@ -1534,8 +1552,8 @@ void EnHorse_StartBraking(EnHorse* this, PlayState* play) { Audio_PlaySfxAtPos(&this->actor.projectedPos, NA_SE_EV_HORSE_SLIP); } - Animation_Change(&this->skin.skelAnime, sAnimationHeaders[this->type][this->animationIdx], 1.5f, 0.0f, - Animation_GetLastFrame(sAnimationHeaders[this->type][this->animationIdx]), ANIMMODE_ONCE, -3.0f); + Animation_Change(&this->skin.skelAnime, sAnimationHeaders[this->type][this->animIndex], 1.5f, 0.0f, + Animation_GetLastFrame(sAnimationHeaders[this->type][this->animIndex]), ANIMMODE_ONCE, -3.0f); this->stateFlags |= ENHORSE_STOPPING_NEIGH_SOUND; this->stateFlags &= ~ENHORSE_BOOST; } @@ -1551,7 +1569,7 @@ void EnHorse_Stopping(EnHorse* this, PlayState* play) { if ((this->stateFlags & ENHORSE_STOPPING_NEIGH_SOUND) && (this->skin.skelAnime.curFrame > 29.0f)) { this->actor.speedXZ = 0.0f; if ((Rand_ZeroOne() > 0.5f) && - ((gSaveContext.save.entranceIndex != 0x6400) || !Cutscene_GetSceneSetupIndex(play))) { + ((gSaveContext.save.entrance != ENTRANCE(ROMANI_RANCH, 0)) || !Cutscene_GetSceneSetupIndex(play))) { if (this->stateFlags & ENHORSE_DRAW) { if (this->type == HORSE_TYPE_2) { Audio_PlaySfxAtPos(&this->unk_218, NA_SE_EV_KID_HORSE_NEIGH); @@ -1591,11 +1609,11 @@ void EnHorse_StartReversingInterruptable(EnHorse* this) { } void EnHorse_StartReversing(EnHorse* this) { - this->action = ENHORSE_ACT_HIGH_JUMP; - this->animationIdx = ENHORSE_ANIM_WALK; + this->action = ENHORSE_ACTION_REVERSE; + this->animIndex = ENHORSE_ANIM_WALK; this->soundTimer = 0; - Animation_Change(&this->skin.skelAnime, sAnimationHeaders[this->type][this->animationIdx], 1.0f, 0.0f, - Animation_GetLastFrame(sAnimationHeaders[this->type][this->animationIdx]), ANIMMODE_LOOP, -3.0f); + Animation_Change(&this->skin.skelAnime, sAnimationHeaders[this->type][this->animIndex], 1.0f, 0.0f, + Animation_GetLastFrame(sAnimationHeaders[this->type][this->animIndex]), ANIMMODE_LOOP, -3.0f); } void EnHorse_Reverse(EnHorse* this, PlayState* play) { @@ -1624,8 +1642,8 @@ void EnHorse_Reverse(EnHorse* this, PlayState* play) { } else if (stickMag < 10.0f) { stickAngle = -0x7FFF; } - } else if ((player->actor.flags & ACTOR_FLAG_100) || (play->csCtx.state != 0) || - (ActorCutscene_GetCurrentIndex() != -1) || (player->stateFlags1 & 0x20)) { + } else if ((player->actor.flags & ACTOR_FLAG_100) || (play->csCtx.state != CS_STATE_0) || + (ActorCutscene_GetCurrentIndex() != -1) || (player->stateFlags1 & PLAYER_STATE1_20)) { EnHorse_StartMountedIdleResetAnim(this); this->actor.speedXZ = 0.0f; return; @@ -1672,11 +1690,11 @@ void EnHorse_StartLowJump(EnHorse* this, PlayState* play) { Vec3s* jointTable; f32 y; - this->action = ENHORSE_ACT_BRIDGE_JUMP; - this->animationIdx = ENHORSE_ANIM_LOW_JUMP; + this->action = ENHORSE_ACTION_LOW_JUMP; + this->animIndex = ENHORSE_ANIM_LOW_JUMP; curFrame = this->skin.skelAnime.curFrame; - Animation_Change(&this->skin.skelAnime, sAnimationHeaders[this->type][this->animationIdx], 1.5f, curFrame, - Animation_GetLastFrame(sAnimationHeaders[this->type][this->animationIdx]), ANIMMODE_ONCE, -3.0f); + Animation_Change(&this->skin.skelAnime, sAnimationHeaders[this->type][this->animIndex], 1.5f, curFrame, + Animation_GetLastFrame(sAnimationHeaders[this->type][this->animIndex]), ANIMMODE_ONCE, -3.0f); this->postDrawFunc = NULL; this->jumpStartY = this->actor.world.pos.y; this->actor.gravity = 0.0f; @@ -1768,11 +1786,11 @@ void EnHorse_StartHighJump(EnHorse* this, PlayState* play) { Vec3s* jointTable; f32 y; - this->action = ENHORSE_ACT_CS_UPDATE; - this->animationIdx = ENHORSE_ANIM_HIGH_JUMP; + this->action = ENHORSE_ACTION_HIGH_JUMP; + this->animIndex = ENHORSE_ANIM_HIGH_JUMP; curFrame = this->skin.skelAnime.curFrame; - Animation_Change(&this->skin.skelAnime, sAnimationHeaders[this->type][this->animationIdx], 1.5f, curFrame, - Animation_GetLastFrame(sAnimationHeaders[this->type][this->animationIdx]), ANIMMODE_ONCE, -3.0f); + Animation_Change(&this->skin.skelAnime, sAnimationHeaders[this->type][this->animIndex], 1.5f, curFrame, + Animation_GetLastFrame(sAnimationHeaders[this->type][this->animIndex]), ANIMMODE_ONCE, -3.0f); this->postDrawFunc = NULL; this->jumpStartY = this->actor.world.pos.y; @@ -1860,8 +1878,8 @@ void EnHorse_InitInactive(EnHorse* this) { this->colliderCylinder1.base.ocFlags1 &= ~OC1_ON; this->colliderCylinder2.base.ocFlags1 &= ~OC1_ON; this->colliderJntSph.base.ocFlags1 &= ~OC1_ON; - this->action = ENHORSE_ACT_INACTIVE; - this->animationIdx = ENHORSE_ANIM_WALK; + this->action = ENHORSE_ACTION_INACTIVE; + this->animIndex = ENHORSE_ANIM_WALK; this->stateFlags |= ENHORSE_INACTIVE; this->followTimer = 0; } @@ -1888,10 +1906,10 @@ void EnHorse_Inactive(EnHorse* this, PlayState* play) { } void EnHorse_PlayIdleAnimation(EnHorse* this, s32 anim, f32 morphFrames, f32 startFrames) { - this->action = ENHORSE_ACT_IDLE; + this->action = ENHORSE_ACTION_IDLE; this->actor.speedXZ = 0.0f; - if ((anim != ENHORSE_ANIM_IDLE) && (anim != ENHORSE_ANIM_WHINNEY) && (anim != ENHORSE_ANIM_REARING)) { + if ((anim != ENHORSE_ANIM_IDLE) && (anim != ENHORSE_ANIM_WHINNY) && (anim != ENHORSE_ANIM_REARING)) { anim = ENHORSE_ANIM_IDLE; } @@ -1899,12 +1917,12 @@ void EnHorse_PlayIdleAnimation(EnHorse* this, s32 anim, f32 morphFrames, f32 sta anim = ENHORSE_ANIM_IDLE; } - if (anim != this->animationIdx) { - this->animationIdx = anim; + if (anim != this->animIndex) { + this->animIndex = anim; if (anim == ENHORSE_ANIM_IDLE) { this->stateFlags &= ~ENHORSE_SANDDUST_SOUND; } else { - if (this->animationIdx == ENHORSE_ANIM_WHINNEY) { + if (this->animIndex == ENHORSE_ANIM_WHINNY) { if (this->stateFlags & ENHORSE_DRAW) { if (this->type == HORSE_TYPE_2) { Audio_PlaySfxAtPos(&this->unk_218, NA_SE_EV_KID_HORSE_GROAN); @@ -1912,7 +1930,7 @@ void EnHorse_PlayIdleAnimation(EnHorse* this, s32 anim, f32 morphFrames, f32 sta Audio_PlaySfxAtPos(&this->unk_218, NA_SE_EV_HORSE_GROAN); } } - } else if (this->animationIdx == ENHORSE_ANIM_REARING) { + } else if (this->animIndex == ENHORSE_ANIM_REARING) { if (this->stateFlags & ENHORSE_DRAW) { if (this->type == HORSE_TYPE_2) { Audio_PlaySfxAtPos(&this->unk_218, NA_SE_EV_KID_HORSE_NEIGH); @@ -1923,8 +1941,8 @@ void EnHorse_PlayIdleAnimation(EnHorse* this, s32 anim, f32 morphFrames, f32 sta this->stateFlags &= ~ENHORSE_LAND2_SOUND; } } - Animation_Change(&this->skin.skelAnime, sAnimationHeaders[this->type][this->animationIdx], 1.0f, startFrames, - Animation_GetLastFrame(sAnimationHeaders[this->type][this->animationIdx]), ANIMMODE_ONCE, + Animation_Change(&this->skin.skelAnime, sAnimationHeaders[this->type][this->animIndex], 1.0f, startFrames, + Animation_GetLastFrame(sAnimationHeaders[this->type][this->animIndex]), ANIMMODE_ONCE, morphFrames); } } @@ -1934,8 +1952,8 @@ void EnHorse_ChangeIdleAnimation(EnHorse* this, s32 anim, f32 morphFrames) { } void EnHorse_ResetIdleAnimation(EnHorse* this) { - this->animationIdx = ENHORSE_ANIM_WALK; - EnHorse_PlayIdleAnimation(this, this->animationIdx, 0.0f, 0.0f); + this->animIndex = ENHORSE_ANIM_WALK; + EnHorse_PlayIdleAnimation(this, this->animIndex, 0.0f, 0.0f); } void EnHorse_StartIdleRidable(EnHorse* this) { @@ -1971,37 +1989,37 @@ void EnHorse_Idle(EnHorse* this, PlayState* play) { } if (SkelAnime_Update(&this->skin.skelAnime)) { - s32 idleAnimIdx = 0; + s32 idleAnimIndex = 0; - if (this->animationIdx != 0) { - if (this->animationIdx == 1) { - idleAnimIdx = 1; - } else if (this->animationIdx == 3) { - idleAnimIdx = 2; + if (this->animIndex != ENHORSE_ANIM_IDLE) { + if (this->animIndex == ENHORSE_ANIM_WHINNY) { + idleAnimIndex = 1; + } else if (this->animIndex == ENHORSE_ANIM_REARING) { + idleAnimIndex = 2; } } // Play one of the two other idle animations - EnHorse_PlayIdleAnimation(this, sIdleAnimIds[((Rand_ZeroOne() > 0.5f) ? 0 : 1) + idleAnimIdx * 2], 0.0f, 0.0f); + EnHorse_PlayIdleAnimation(this, sIdleAnimIndices[((Rand_ZeroOne() > 0.5f) ? 0 : 1) + idleAnimIndex * 2], 0.0f, + 0.0f); } } void EnHorse_StartMovingAnimation(EnHorse* this, s32 anim, f32 morphFrames, f32 startFrames) { - this->action = ENHORSE_ACT_FOLLOW_PLAYER; + this->action = ENHORSE_ACTION_FOLLOW_PLAYER; this->stateFlags &= ~ENHORSE_TURNING_TO_PLAYER; if ((anim != ENHORSE_ANIM_TROT) && (anim != ENHORSE_ANIM_GALLOP) && (anim != ENHORSE_ANIM_WALK)) { anim = ENHORSE_ANIM_WALK; } - if (anim != this->animationIdx) { - this->animationIdx = anim; - Animation_Change(&this->skin.skelAnime, sAnimationHeaders[this->type][this->animationIdx], 1.0f, startFrames, - Animation_GetLastFrame(sAnimationHeaders[this->type][this->animationIdx]), ANIMMODE_ONCE, + if (anim != this->animIndex) { + this->animIndex = anim; + Animation_Change(&this->skin.skelAnime, sAnimationHeaders[this->type][this->animIndex], 1.0f, startFrames, + Animation_GetLastFrame(sAnimationHeaders[this->type][this->animIndex]), ANIMMODE_ONCE, morphFrames); } else { - Animation_Change(&this->skin.skelAnime, sAnimationHeaders[this->type][this->animationIdx], 1.0f, startFrames, - Animation_GetLastFrame(sAnimationHeaders[this->type][this->animationIdx]), ANIMMODE_ONCE, - 0.0f); + Animation_Change(&this->skin.skelAnime, sAnimationHeaders[this->type][this->animIndex], 1.0f, startFrames, + Animation_GetLastFrame(sAnimationHeaders[this->type][this->animIndex]), ANIMMODE_ONCE, 0.0f); } } @@ -2015,13 +2033,13 @@ void EnHorse_SetFollowAnimation(EnHorse* this, PlayState* play) { anim = ENHORSE_ANIM_TROT; } - if (this->animationIdx == ENHORSE_ANIM_GALLOP) { + if (this->animIndex == ENHORSE_ANIM_GALLOP) { if (distToPlayer > 400.0f) { anim = ENHORSE_ANIM_GALLOP; } else { anim = ENHORSE_ANIM_TROT; } - } else if (this->animationIdx == ENHORSE_ANIM_TROT) { + } else if (this->animIndex == ENHORSE_ANIM_TROT) { if (distToPlayer > 400.0f) { anim = ENHORSE_ANIM_GALLOP; } else if (distToPlayer < 300.0f) { @@ -2029,7 +2047,7 @@ void EnHorse_SetFollowAnimation(EnHorse* this, PlayState* play) { } else { anim = ENHORSE_ANIM_TROT; } - } else if (this->animationIdx == ENHORSE_ANIM_WALK) { + } else if (this->animIndex == ENHORSE_ANIM_WALK) { if (distToPlayer > 300.0f) { anim = ENHORSE_ANIM_TROT; } else { @@ -2050,7 +2068,7 @@ void EnHorse_FollowPlayer(EnHorse* this, PlayState* play) { !(this->stateFlags & ENHORSE_TURNING_TO_PLAYER)) { f32 angleDiff; - this->animationIdx = ENHORSE_ANIM_REARING; + this->animIndex = ENHORSE_ANIM_REARING; this->stateFlags |= ENHORSE_TURNING_TO_PLAYER; this->angleToPlayer = Actor_YawBetweenActors(&this->actor, &GET_PLAYER(play)->actor); @@ -2062,9 +2080,9 @@ void EnHorse_FollowPlayer(EnHorse* this, PlayState* play) { } this->followPlayerTurnSpeed = - angleDiff / Animation_GetLastFrame(sAnimationHeaders[this->type][this->animationIdx]); + angleDiff / Animation_GetLastFrame(sAnimationHeaders[this->type][this->animIndex]); - Animation_PlayOnce(&this->skin.skelAnime, sAnimationHeaders[this->type][this->animationIdx]); + Animation_PlayOnce(&this->skin.skelAnime, sAnimationHeaders[this->type][this->animIndex]); this->skin.skelAnime.playSpeed = 1.0f; this->stateFlags &= ~ENHORSE_LAND2_SOUND; } else if (this->stateFlags & ENHORSE_TURNING_TO_PLAYER) { @@ -2082,14 +2100,14 @@ void EnHorse_FollowPlayer(EnHorse* this, PlayState* play) { EnHorse_RotateToPlayer(this, play); } - if (this->animationIdx == ENHORSE_ANIM_GALLOP) { + if (this->animIndex == ENHORSE_ANIM_GALLOP) { this->actor.speedXZ = 8.0f; this->skin.skelAnime.playSpeed = this->actor.speedXZ * 0.3f; } else { - if (this->animationIdx == ENHORSE_ANIM_TROT) { + if (this->animIndex == ENHORSE_ANIM_TROT) { this->actor.speedXZ = 6.0f; this->skin.skelAnime.playSpeed = this->actor.speedXZ * 0.375f; - } else if (this->animationIdx == ENHORSE_ANIM_WALK) { + } else if (this->animIndex == ENHORSE_ANIM_WALK) { this->actor.speedXZ = 3.0f; EnHorse_PlayWalkingSound(this); this->skin.skelAnime.playSpeed = this->actor.speedXZ * 0.75f; @@ -2114,9 +2132,9 @@ void EnHorse_FollowPlayer(EnHorse* this, PlayState* play) { } if (SkelAnime_Update(&this->skin.skelAnime)) { - if (this->animationIdx == ENHORSE_ANIM_GALLOP) { + if (this->animIndex == ENHORSE_ANIM_GALLOP) { func_8087C1C0(this); - } else if (this->animationIdx == ENHORSE_ANIM_TROT) { + } else if (this->animIndex == ENHORSE_ANIM_TROT) { func_8087C178(this); } @@ -2140,13 +2158,13 @@ void EnHorse_InitIngoHorse(EnHorse* this) { } } -void EnHorse_SetIngoAnimation(s32 anim, f32 curFrame, s32 arg2, s16* animIdxOut) { - *animIdxOut = sIngoAnimations[anim]; - if (arg2 == 1) { - if (anim == 5) { - *animIdxOut = 4; - } else if (anim == 6) { - *animIdxOut = 3; +void EnHorse_SetIngoAnimation(s32 animIndex, f32 curFrame, s32 arg2, s16* animIndexOut) { + *animIndexOut = sIngoAnimIndices[animIndex]; + if (arg2 == ENIN_ANIM_1) { + if (animIndex == ENHORSE_ANIM_TROT) { + *animIndexOut = ENIN_ANIM_4; + } else if (animIndex == ENHORSE_ANIM_GALLOP) { + *animIndexOut = ENIN_ANIM_3; } } } @@ -2155,41 +2173,41 @@ void EnHorse_UpdateIngoHorseAnim(EnHorse* this) { s32 animChanged = false; f32 animSpeed; - this->action = ENHORSE_ACT_INGO_RACE; + this->action = ENHORSE_ACTION_INGO_RACE; this->stateFlags &= ~ENHORSE_SANDDUST_SOUND; if (this->actor.speedXZ == 0.0f) { - if (this->animationIdx != ENHORSE_ANIM_IDLE) { + if (this->animIndex != ENHORSE_ANIM_IDLE) { animChanged = true; } - this->animationIdx = ENHORSE_ANIM_IDLE; + this->animIndex = ENHORSE_ANIM_IDLE; } else if (this->actor.speedXZ <= 3.0f) { - if (this->animationIdx != ENHORSE_ANIM_WALK) { + if (this->animIndex != ENHORSE_ANIM_WALK) { animChanged = true; } - this->animationIdx = ENHORSE_ANIM_WALK; + this->animIndex = ENHORSE_ANIM_WALK; } else if (this->actor.speedXZ <= 6.0f) { - if (this->animationIdx != ENHORSE_ANIM_TROT) { + if (this->animIndex != ENHORSE_ANIM_TROT) { animChanged = true; } - this->animationIdx = ENHORSE_ANIM_TROT; + this->animIndex = ENHORSE_ANIM_TROT; } else { - if (this->animationIdx != ENHORSE_ANIM_GALLOP) { + if (this->animIndex != ENHORSE_ANIM_GALLOP) { animChanged = true; } - this->animationIdx = ENHORSE_ANIM_GALLOP; + this->animIndex = ENHORSE_ANIM_GALLOP; } - if (this->animationIdx == ENHORSE_ANIM_WALK) { + if (this->animIndex == ENHORSE_ANIM_WALK) { animSpeed = this->actor.speedXZ * 0.5f; - } else if (this->animationIdx == ENHORSE_ANIM_TROT) { + } else if (this->animIndex == ENHORSE_ANIM_TROT) { animSpeed = this->actor.speedXZ * 0.25f; if (this->type == HORSE_TYPE_2) { Audio_PlaySfxAtPos(&this->actor.projectedPos, NA_SE_EV_KID_HORSE_RUN); } else { Audio_PlaySfxAtPos(&this->actor.projectedPos, NA_SE_EV_HORSE_RUN); } - } else if (this->animationIdx == ENHORSE_ANIM_GALLOP) { + } else if (this->animIndex == ENHORSE_ANIM_GALLOP) { animSpeed = this->actor.speedXZ * 0.2f; if (this->type == HORSE_TYPE_2) { Audio_PlaySfxAtPos(&this->actor.projectedPos, NA_SE_EV_KID_HORSE_RUN); @@ -2201,40 +2219,38 @@ void EnHorse_UpdateIngoHorseAnim(EnHorse* this) { } if (animChanged == true) { - Animation_Change(&this->skin.skelAnime, sAnimationHeaders[this->type][this->animationIdx], - sPlaybackSpeeds[this->animationIdx] * animSpeed * 1.5f, 0.0f, - Animation_GetLastFrame(sAnimationHeaders[this->type][this->animationIdx]), ANIMMODE_ONCE, - -3.0f); + Animation_Change(&this->skin.skelAnime, sAnimationHeaders[this->type][this->animIndex], + sPlaybackSpeeds[this->animIndex] * animSpeed * 1.5f, 0.0f, + Animation_GetLastFrame(sAnimationHeaders[this->type][this->animIndex]), ANIMMODE_ONCE, -3.0f); } else { - Animation_Change(&this->skin.skelAnime, sAnimationHeaders[this->type][this->animationIdx], - sPlaybackSpeeds[this->animationIdx] * animSpeed * 1.5f, 0.0f, - Animation_GetLastFrame(sAnimationHeaders[this->type][this->animationIdx]), ANIMMODE_ONCE, - 0.0f); + Animation_Change(&this->skin.skelAnime, sAnimationHeaders[this->type][this->animIndex], + sPlaybackSpeeds[this->animIndex] * animSpeed * 1.5f, 0.0f, + Animation_GetLastFrame(sAnimationHeaders[this->type][this->animIndex]), ANIMMODE_ONCE, 0.0f); } } void EnHorse_UpdateIngoRace(EnHorse* this, PlayState* play) { f32 playSpeed; - if ((this->animationIdx == ENHORSE_ANIM_IDLE) || (this->animationIdx == ENHORSE_ANIM_WHINNEY)) { + if ((this->animIndex == ENHORSE_ANIM_IDLE) || (this->animIndex == ENHORSE_ANIM_WHINNY)) { EnHorse_IdleAnimSounds(this, play); - } else if (this->animationIdx == ENHORSE_ANIM_WALK) { + } else if (this->animIndex == ENHORSE_ANIM_WALK) { EnHorse_PlayWalkingSound(this); } if (!this->inRace) { this->actor.speedXZ = 0.0f; this->rider->actor.speedXZ = 0.0f; - if (this->animationIdx != ENHORSE_ANIM_IDLE) { + if (this->animIndex != ENHORSE_ANIM_IDLE) { EnHorse_UpdateIngoHorseAnim(this); } } - if (this->animationIdx == ENHORSE_ANIM_WALK) { + if (this->animIndex == ENHORSE_ANIM_WALK) { playSpeed = this->actor.speedXZ * 0.5f; - } else if (this->animationIdx == 5) { + } else if (this->animIndex == ENHORSE_ANIM_TROT) { playSpeed = this->actor.speedXZ * 0.25f; - } else if (this->animationIdx == 6) { + } else if (this->animIndex == ENHORSE_ANIM_GALLOP) { playSpeed = this->actor.speedXZ * 0.2f; } else { playSpeed = 1.0f; @@ -2242,7 +2258,7 @@ void EnHorse_UpdateIngoRace(EnHorse* this, PlayState* play) { this->skin.skelAnime.playSpeed = playSpeed; if (SkelAnime_Update(&this->skin.skelAnime) || - ((this->animationIdx == ENHORSE_ANIM_IDLE) && (this->actor.speedXZ != 0.0f))) { + ((this->animIndex == ENHORSE_ANIM_IDLE) && (this->actor.speedXZ != 0.0f))) { EnHorse_UpdateIngoHorseAnim(this); } } @@ -2255,11 +2271,11 @@ void func_8088126C(EnHorse* this, PlayState* play) { void func_80881290(EnHorse* this, PlayState* play) { f32 curFrame; - this->action = ENHORSE_ACT_MOUNTED_IDLE_WHINNEYING; - this->animationIdx = ENHORSE_ANIM_HIGH_JUMP; + this->action = ENHORSE_ACTION_6; + this->animIndex = ENHORSE_ANIM_HIGH_JUMP; curFrame = this->skin.skelAnime.curFrame; - Animation_Change(&this->skin.skelAnime, sAnimationHeaders[this->type][this->animationIdx], 1.5f, curFrame, - Animation_GetLastFrame(sAnimationHeaders[this->type][this->animationIdx]), ANIMMODE_ONCE, -3.0f); + Animation_Change(&this->skin.skelAnime, sAnimationHeaders[this->type][this->animIndex], 1.5f, curFrame, + Animation_GetLastFrame(sAnimationHeaders[this->type][this->animIndex]), ANIMMODE_ONCE, -3.0f); this->postDrawFunc = NULL; this->actor.gravity = 0.0f; this->actor.velocity.y = 0.0f; @@ -2323,9 +2339,9 @@ void func_8088159C(EnHorse* this, PlayState* play) { Vec3s* jointTable; f32 y; - this->action = ENHORSE_ACT_MOUNTED_IDLE; - this->animationIdx = ENHORSE_ANIM_GALLOP; - Animation_PlayOnce(&this->skin.skelAnime, sAnimationHeaders[this->type][this->animationIdx]); + this->action = ENHORSE_ACTION_5; + this->animIndex = ENHORSE_ANIM_GALLOP; + Animation_PlayOnce(&this->skin.skelAnime, sAnimationHeaders[this->type][this->animIndex]); jointTable = this->skin.skelAnime.jointTable; y = jointTable->y; this->riderPos.y += y * 0.01f * this->unk_528 * 0.01f; @@ -2347,41 +2363,41 @@ void func_8088168C(EnHorse* this) { f32 animSpeed; f32 finalAnimSpeed; - this->action = ENHORSE_ACT_MOUNTED_IDLE; + this->action = ENHORSE_ACTION_5; this->stateFlags &= ~ENHORSE_SANDDUST_SOUND; if (this->actor.speedXZ == 0.0f) { - if (this->animationIdx != ENHORSE_ANIM_IDLE) { + if (this->animIndex != ENHORSE_ANIM_IDLE) { animChanged = true; } - this->animationIdx = ENHORSE_ANIM_IDLE; + this->animIndex = ENHORSE_ANIM_IDLE; } else if (this->actor.speedXZ <= 3.0f) { - if (this->animationIdx != ENHORSE_ANIM_WALK) { + if (this->animIndex != ENHORSE_ANIM_WALK) { animChanged = true; } - this->animationIdx = ENHORSE_ANIM_WALK; + this->animIndex = ENHORSE_ANIM_WALK; } else if (this->actor.speedXZ <= 6.0f) { - if (this->animationIdx != ENHORSE_ANIM_TROT) { + if (this->animIndex != ENHORSE_ANIM_TROT) { animChanged = true; } - this->animationIdx = ENHORSE_ANIM_TROT; + this->animIndex = ENHORSE_ANIM_TROT; } else { - if (this->animationIdx != ENHORSE_ANIM_GALLOP) { + if (this->animIndex != ENHORSE_ANIM_GALLOP) { animChanged = true; } - this->animationIdx = ENHORSE_ANIM_GALLOP; + this->animIndex = ENHORSE_ANIM_GALLOP; } - if (this->animationIdx == ENHORSE_ANIM_WALK) { + if (this->animIndex == ENHORSE_ANIM_WALK) { animSpeed = this->actor.speedXZ * 0.5f; - } else if (this->animationIdx == ENHORSE_ANIM_TROT) { + } else if (this->animIndex == ENHORSE_ANIM_TROT) { animSpeed = this->actor.speedXZ * 0.25f; if (this->type == HORSE_TYPE_2) { Audio_PlaySfxAtPos(&this->actor.projectedPos, NA_SE_EV_KID_HORSE_RUN); } else { Audio_PlaySfxAtPos(&this->actor.projectedPos, NA_SE_EV_HORSE_RUN); } - } else if (this->animationIdx == ENHORSE_ANIM_GALLOP) { + } else if (this->animIndex == ENHORSE_ANIM_GALLOP) { animSpeed = this->actor.speedXZ * 0.2f; if (this->type == HORSE_TYPE_2) { Audio_PlaySfxAtPos(&this->actor.projectedPos, NA_SE_EV_KID_HORSE_RUN); @@ -2392,19 +2408,17 @@ void func_8088168C(EnHorse* this) { animSpeed = 1.0f; } - finalAnimSpeed = sPlaybackSpeeds[this->animationIdx] * animSpeed * 1.5f; + finalAnimSpeed = sPlaybackSpeeds[this->animIndex] * animSpeed * 1.5f; if (finalAnimSpeed < 1.0f) { finalAnimSpeed = 1.0f; } if (animChanged == true) { - Animation_Change(&this->skin.skelAnime, sAnimationHeaders[this->type][this->animationIdx], finalAnimSpeed, 0.0f, - Animation_GetLastFrame(sAnimationHeaders[this->type][this->animationIdx]), ANIMMODE_ONCE, - -3.0f); + Animation_Change(&this->skin.skelAnime, sAnimationHeaders[this->type][this->animIndex], finalAnimSpeed, 0.0f, + Animation_GetLastFrame(sAnimationHeaders[this->type][this->animIndex]), ANIMMODE_ONCE, -3.0f); } else { - Animation_Change(&this->skin.skelAnime, sAnimationHeaders[this->type][this->animationIdx], finalAnimSpeed, 0.0f, - Animation_GetLastFrame(sAnimationHeaders[this->type][this->animationIdx]), ANIMMODE_ONCE, - 0.0f); + Animation_Change(&this->skin.skelAnime, sAnimationHeaders[this->type][this->animIndex], finalAnimSpeed, 0.0f, + Animation_GetLastFrame(sAnimationHeaders[this->type][this->animIndex]), ANIMMODE_ONCE, 0.0f); } } @@ -2412,16 +2426,16 @@ void func_808819D8(EnHorse* this, PlayState* play) { Path* path; f32 animSpeed; - if ((this->animationIdx == ENHORSE_ANIM_IDLE) || (this->animationIdx == ENHORSE_ANIM_WHINNEY)) { + if ((this->animIndex == ENHORSE_ANIM_IDLE) || (this->animIndex == ENHORSE_ANIM_WHINNY)) { EnHorse_IdleAnimSounds(this, play); - } else if (this->animationIdx == ENHORSE_ANIM_WALK) { + } else if (this->animIndex == ENHORSE_ANIM_WALK) { EnHorse_PlayWalkingSound(this); } if (!this->inRace) { this->actor.speedXZ = 0.0f; this->rider->actor.speedXZ = 0.0f; - if (this->animationIdx != ENHORSE_ANIM_IDLE) { + if (this->animIndex != ENHORSE_ANIM_IDLE) { EnHorse_UpdateIngoHorseAnim(this); } } @@ -2436,16 +2450,16 @@ void func_808819D8(EnHorse* this, PlayState* play) { if (!this->inRace) { this->actor.speedXZ = 0.0f; - if (this->animationIdx != ENHORSE_ANIM_IDLE) { + if (this->animIndex != ENHORSE_ANIM_IDLE) { func_8088168C(this); } } - if (this->animationIdx == ENHORSE_ANIM_WALK) { + if (this->animIndex == ENHORSE_ANIM_WALK) { animSpeed = this->actor.speedXZ * 0.5f; - } else if (this->animationIdx == ENHORSE_ANIM_TROT) { + } else if (this->animIndex == ENHORSE_ANIM_TROT) { animSpeed = this->actor.speedXZ * 0.25f; - } else if (this->animationIdx == ENHORSE_ANIM_GALLOP) { + } else if (this->animIndex == ENHORSE_ANIM_GALLOP) { animSpeed = this->actor.speedXZ * 0.2f; } else { animSpeed = 1.0f; @@ -2453,22 +2467,22 @@ void func_808819D8(EnHorse* this, PlayState* play) { this->skin.skelAnime.playSpeed = animSpeed; if (SkelAnime_Update(&this->skin.skelAnime) || - ((this->animationIdx == ENHORSE_ANIM_IDLE) && (this->actor.speedXZ != 0.0f))) { + ((this->animIndex == ENHORSE_ANIM_IDLE) && (this->actor.speedXZ != 0.0f))) { func_8088168C(this); } if (GET_RACE_FLAGS == 3) { this->rider->unk488 = 7; } else { - EnHorse_SetIngoAnimation(this->animationIdx, this->skin.skelAnime.curFrame, this->unk_394 & 1, + EnHorse_SetIngoAnimation(this->animIndex, this->skin.skelAnime.curFrame, this->unk_394 & 1, &this->rider->unk488); } } void EnHorse_CsMoveInit(EnHorse* this, PlayState* play, CsCmdActorAction* action) { - this->animationIdx = ENHORSE_ANIM_GALLOP; + this->animIndex = ENHORSE_ANIM_GALLOP; this->cutsceneAction = 1; - Animation_PlayOnceSetSpeed(&this->skin.skelAnime, sAnimationHeaders[this->type][this->animationIdx], + Animation_PlayOnceSetSpeed(&this->skin.skelAnime, sAnimationHeaders[this->type][this->animIndex], this->actor.speedXZ * 0.2f * 1.5f); } @@ -2492,7 +2506,7 @@ void EnHorse_CsMoveToPoint(EnHorse* this, PlayState* play, CsCmdActorAction* act if (SkelAnime_Update(&this->skin.skelAnime)) { func_8087C1C0(this); Rumble_Request(0.0f, 120, 8, 255); - Animation_PlayOnceSetSpeed(&this->skin.skelAnime, sAnimationHeaders[this->type][this->animationIdx], + Animation_PlayOnceSetSpeed(&this->skin.skelAnime, sAnimationHeaders[this->type][this->animIndex], this->actor.speedXZ * 0.3f); } } @@ -2507,10 +2521,10 @@ void EnHorse_CsPlayHighJumpAnim(EnHorse* this, PlayState* play) { f32 y; Vec3s* jointTable; - this->animationIdx = ENHORSE_ANIM_HIGH_JUMP; + this->animIndex = ENHORSE_ANIM_HIGH_JUMP; curFrame = this->skin.skelAnime.curFrame; - Animation_Change(&this->skin.skelAnime, sAnimationHeaders[this->type][this->animationIdx], 1.5f, curFrame, - Animation_GetLastFrame(sAnimationHeaders[this->type][this->animationIdx]), ANIMMODE_ONCE, -3.0f); + Animation_Change(&this->skin.skelAnime, sAnimationHeaders[this->type][this->animIndex], 1.5f, curFrame, + Animation_GetLastFrame(sAnimationHeaders[this->type][this->animIndex]), ANIMMODE_ONCE, -3.0f); this->postDrawFunc = NULL; this->jumpStartY = this->actor.world.pos.y; this->actor.gravity = 0.0f; @@ -2582,8 +2596,8 @@ void EnHorse_CsJump(EnHorse* this, PlayState* play, CsCmdActorAction* action) { this->actor.velocity.y = 0.0f; this->actor.world.pos.y = this->actor.floorHeight; func_800B1598(play, 25.0f, &this->actor.world.pos); - this->animationIdx = ENHORSE_ANIM_GALLOP; - Animation_PlayOnceSetSpeed(&this->skin.skelAnime, sAnimationHeaders[this->type][this->animationIdx], + this->animIndex = ENHORSE_ANIM_GALLOP; + Animation_PlayOnceSetSpeed(&this->skin.skelAnime, sAnimationHeaders[this->type][this->animIndex], sPlaybackSpeeds[6]); jointTable = this->skin.skelAnime.jointTable; @@ -2595,7 +2609,7 @@ void EnHorse_CsJump(EnHorse* this, PlayState* play, CsCmdActorAction* action) { } void EnHorse_CsRearingInit(EnHorse* this, PlayState* play, CsCmdActorAction* action) { - this->animationIdx = ENHORSE_ANIM_REARING; + this->animIndex = ENHORSE_ANIM_REARING; this->cutsceneAction = 3; this->cutsceneFlags &= ~4; this->stateFlags &= ~ENHORSE_LAND2_SOUND; @@ -2606,8 +2620,8 @@ void EnHorse_CsRearingInit(EnHorse* this, PlayState* play, CsCmdActorAction* act Audio_PlaySfxAtPos(&this->unk_218, NA_SE_EV_HORSE_NEIGH); } } - Animation_Change(&this->skin.skelAnime, sAnimationHeaders[this->type][this->animationIdx], 1.0f, 0.0f, - Animation_GetLastFrame(sAnimationHeaders[this->type][this->animationIdx]), ANIMMODE_ONCE, -3.0f); + Animation_Change(&this->skin.skelAnime, sAnimationHeaders[this->type][this->animIndex], 1.0f, 0.0f, + Animation_GetLastFrame(sAnimationHeaders[this->type][this->animIndex]), ANIMMODE_ONCE, -3.0f); } void EnHorse_CsRearing(EnHorse* this, PlayState* play, CsCmdActorAction* action) { @@ -2624,15 +2638,15 @@ void EnHorse_CsRearing(EnHorse* this, PlayState* play, CsCmdActorAction* action) } if (SkelAnime_Update(&this->skin.skelAnime)) { - this->animationIdx = ENHORSE_ANIM_IDLE; + this->animIndex = ENHORSE_ANIM_IDLE; if (!(this->cutsceneFlags & 4)) { this->cutsceneFlags |= 4; - Animation_Change(&this->skin.skelAnime, sAnimationHeaders[this->type][this->animationIdx], 1.0f, 0.0f, - Animation_GetLastFrame(sAnimationHeaders[this->type][this->animationIdx]), ANIMMODE_ONCE, + Animation_Change(&this->skin.skelAnime, sAnimationHeaders[this->type][this->animIndex], 1.0f, 0.0f, + Animation_GetLastFrame(sAnimationHeaders[this->type][this->animIndex]), ANIMMODE_ONCE, -3.0f); } else { - Animation_Change(&this->skin.skelAnime, sAnimationHeaders[this->type][this->animationIdx], 1.0f, 0.0f, - Animation_GetLastFrame(sAnimationHeaders[this->type][this->animationIdx]), ANIMMODE_LOOP, + Animation_Change(&this->skin.skelAnime, sAnimationHeaders[this->type][this->animIndex], 1.0f, 0.0f, + Animation_GetLastFrame(sAnimationHeaders[this->type][this->animIndex]), ANIMMODE_LOOP, 0.0f); } } @@ -2647,9 +2661,9 @@ void EnHorse_WarpMoveInit(EnHorse* this, PlayState* play, CsCmdActorAction* acti this->actor.world.rot.y = action->urot.y; this->actor.shape.rot = this->actor.world.rot; - this->animationIdx = ENHORSE_ANIM_GALLOP; + this->animIndex = ENHORSE_ANIM_GALLOP; this->cutsceneAction = 4; - Animation_PlayOnceSetSpeed(&this->skin.skelAnime, sAnimationHeaders[this->type][this->animationIdx], + Animation_PlayOnceSetSpeed(&this->skin.skelAnime, sAnimationHeaders[this->type][this->animIndex], this->actor.speedXZ * 0.3f); } @@ -2673,7 +2687,7 @@ void EnHorse_CsWarpMoveToPoint(EnHorse* this, PlayState* play, CsCmdActorAction* if (SkelAnime_Update(&this->skin.skelAnime)) { func_8087C1C0(this); Rumble_Request(0.0f, 120, 8, 255); - Animation_PlayOnceSetSpeed(&this->skin.skelAnime, sAnimationHeaders[this->type][this->animationIdx], + Animation_PlayOnceSetSpeed(&this->skin.skelAnime, sAnimationHeaders[this->type][this->animIndex], this->actor.speedXZ * 0.3f); } } @@ -2687,7 +2701,7 @@ void EnHorse_CsWarpRearingInit(EnHorse* this, PlayState* play, CsCmdActorAction* this->actor.world.rot.y = action->urot.y; this->actor.shape.rot = this->actor.world.rot; - this->animationIdx = ENHORSE_ANIM_REARING; + this->animIndex = ENHORSE_ANIM_REARING; this->cutsceneAction = 5; this->cutsceneFlags &= ~4; this->stateFlags &= ~ENHORSE_LAND2_SOUND; @@ -2699,8 +2713,8 @@ void EnHorse_CsWarpRearingInit(EnHorse* this, PlayState* play, CsCmdActorAction* Audio_PlaySfxAtPos(&this->unk_218, NA_SE_EV_HORSE_NEIGH); } } - Animation_Change(&this->skin.skelAnime, sAnimationHeaders[this->type][this->animationIdx], 1.0f, 0.0f, - Animation_GetLastFrame(sAnimationHeaders[this->type][this->animationIdx]), ANIMMODE_ONCE, -3.0f); + Animation_Change(&this->skin.skelAnime, sAnimationHeaders[this->type][this->animIndex], 1.0f, 0.0f, + Animation_GetLastFrame(sAnimationHeaders[this->type][this->animIndex]), ANIMMODE_ONCE, -3.0f); } void EnHorse_CsWarpRearing(EnHorse* this, PlayState* play, CsCmdActorAction* action) { @@ -2717,15 +2731,15 @@ void EnHorse_CsWarpRearing(EnHorse* this, PlayState* play, CsCmdActorAction* act } if (SkelAnime_Update(&this->skin.skelAnime)) { - this->animationIdx = ENHORSE_ANIM_IDLE; + this->animIndex = ENHORSE_ANIM_IDLE; if (!(this->cutsceneFlags & 4)) { this->cutsceneFlags |= 4; - Animation_Change(&this->skin.skelAnime, sAnimationHeaders[this->type][this->animationIdx], 1.0f, 0.0f, - Animation_GetLastFrame(sAnimationHeaders[this->type][this->animationIdx]), ANIMMODE_ONCE, + Animation_Change(&this->skin.skelAnime, sAnimationHeaders[this->type][this->animIndex], 1.0f, 0.0f, + Animation_GetLastFrame(sAnimationHeaders[this->type][this->animIndex]), ANIMMODE_ONCE, -3.0f); } else { - Animation_Change(&this->skin.skelAnime, sAnimationHeaders[this->type][this->animationIdx], 1.0f, 0.0f, - Animation_GetLastFrame(sAnimationHeaders[this->type][this->animationIdx]), ANIMMODE_LOOP, + Animation_Change(&this->skin.skelAnime, sAnimationHeaders[this->type][this->animIndex], 1.0f, 0.0f, + Animation_GetLastFrame(sAnimationHeaders[this->type][this->animIndex]), ANIMMODE_LOOP, 0.0f); } } @@ -2733,7 +2747,7 @@ void EnHorse_CsWarpRearing(EnHorse* this, PlayState* play, CsCmdActorAction* act void EnHorse_InitCutscene(EnHorse* this, PlayState* play) { this->playerControlled = false; - this->action = ENHORSE_ACT_HBA; + this->action = ENHORSE_ACTION_CS_UPDATE; this->cutsceneAction = 0; this->actor.speedXZ = 0.0f; } @@ -2758,10 +2772,10 @@ void EnHorse_CutsceneUpdate(EnHorse* this, PlayState* play) { s32 csFunctionIdx; CsCmdActorAction* playerAction = play->csCtx.playerAction; - if (play->csCtx.state == 3) { + if (play->csCtx.state == CS_STATE_3) { this->playerControlled = true; this->actor.params = ENHORSE_12; - this->action = ENHORSE_ACT_IDLE; + this->action = ENHORSE_ACTION_IDLE; EnHorse_Freeze(this, play); return; } @@ -2838,32 +2852,32 @@ void EnHorse_UpdateHbaAnim(EnHorse* this) { s32 animChanged = false; f32 animSpeed; - this->action = ENHORSE_ACT_FLEE_PLAYER; + this->action = ENHORSE_ACTION_HBA; if (this->actor.speedXZ == 0.0f) { - if (this->animationIdx != ENHORSE_ANIM_IDLE) { + if (this->animIndex != ENHORSE_ANIM_IDLE) { animChanged = true; } - this->animationIdx = ENHORSE_ANIM_IDLE; + this->animIndex = ENHORSE_ANIM_IDLE; } else if (this->actor.speedXZ <= 3.0f) { - if (this->animationIdx != ENHORSE_ANIM_WALK) { + if (this->animIndex != ENHORSE_ANIM_WALK) { animChanged = true; } - this->animationIdx = ENHORSE_ANIM_WALK; + this->animIndex = ENHORSE_ANIM_WALK; } else if (this->actor.speedXZ <= 6.0f) { - if (this->animationIdx != ENHORSE_ANIM_TROT) { + if (this->animIndex != ENHORSE_ANIM_TROT) { animChanged = true; } - this->animationIdx = ENHORSE_ANIM_TROT; + this->animIndex = ENHORSE_ANIM_TROT; } else { - if (this->animationIdx != ENHORSE_ANIM_GALLOP) { + if (this->animIndex != ENHORSE_ANIM_GALLOP) { animChanged = true; } - this->animationIdx = ENHORSE_ANIM_GALLOP; + this->animIndex = ENHORSE_ANIM_GALLOP; } - if (this->animationIdx == ENHORSE_ANIM_WALK) { + if (this->animIndex == ENHORSE_ANIM_WALK) { animSpeed = this->actor.speedXZ * 0.5f; - } else if (this->animationIdx == ENHORSE_ANIM_TROT) { + } else if (this->animIndex == ENHORSE_ANIM_TROT) { animSpeed = this->actor.speedXZ * 0.25f; if (this->type == HORSE_TYPE_2) { Audio_PlaySfxAtPos(&this->actor.projectedPos, NA_SE_EV_KID_HORSE_RUN); @@ -2871,7 +2885,7 @@ void EnHorse_UpdateHbaAnim(EnHorse* this) { Audio_PlaySfxAtPos(&this->actor.projectedPos, NA_SE_EV_HORSE_RUN); } Rumble_Request(0.0f, 60, 8, 255); - } else if (this->animationIdx == ENHORSE_ANIM_GALLOP) { + } else if (this->animIndex == ENHORSE_ANIM_GALLOP) { animSpeed = this->actor.speedXZ * 0.2f; if (this->type == HORSE_TYPE_2) { Audio_PlaySfxAtPos(&this->actor.projectedPos, NA_SE_EV_KID_HORSE_RUN); @@ -2884,15 +2898,13 @@ void EnHorse_UpdateHbaAnim(EnHorse* this) { } if (animChanged == true) { - Animation_Change(&this->skin.skelAnime, sAnimationHeaders[this->type][this->animationIdx], - sPlaybackSpeeds[this->animationIdx] * animSpeed * 1.5f, 0.0f, - Animation_GetLastFrame(sAnimationHeaders[this->type][this->animationIdx]), ANIMMODE_ONCE, - -3.0f); + Animation_Change(&this->skin.skelAnime, sAnimationHeaders[this->type][this->animIndex], + sPlaybackSpeeds[this->animIndex] * animSpeed * 1.5f, 0.0f, + Animation_GetLastFrame(sAnimationHeaders[this->type][this->animIndex]), ANIMMODE_ONCE, -3.0f); } else { - Animation_Change(&this->skin.skelAnime, sAnimationHeaders[this->type][this->animationIdx], - sPlaybackSpeeds[this->animationIdx] * animSpeed * 1.5f, 0.0f, - Animation_GetLastFrame(sAnimationHeaders[this->type][this->animationIdx]), ANIMMODE_ONCE, - 0.0f); + Animation_Change(&this->skin.skelAnime, sAnimationHeaders[this->type][this->animIndex], + sPlaybackSpeeds[this->animIndex] * animSpeed * 1.5f, 0.0f, + Animation_GetLastFrame(sAnimationHeaders[this->type][this->animIndex]), ANIMMODE_ONCE, 0.0f); } } @@ -2900,7 +2912,7 @@ void EnHorse_UpdateHorsebackArchery(EnHorse* this, PlayState* play) { f32 playSpeed; s32 sp28; - if (this->animationIdx == ENHORSE_ANIM_WALK) { + if (this->animIndex == ENHORSE_ANIM_WALK) { EnHorse_PlayWalkingSound(this); } @@ -2926,16 +2938,16 @@ void EnHorse_UpdateHorsebackArchery(EnHorse* this, PlayState* play) { if (this->hbaStarted == 0) { this->actor.speedXZ = 0.0f; - if (this->animationIdx != ENHORSE_ANIM_IDLE) { + if (this->animIndex != ENHORSE_ANIM_IDLE) { EnHorse_UpdateHbaAnim(this); } } - if (this->animationIdx == ENHORSE_ANIM_WALK) { + if (this->animIndex == ENHORSE_ANIM_WALK) { playSpeed = this->actor.speedXZ * 0.5f; - } else if (this->animationIdx == ENHORSE_ANIM_TROT) { + } else if (this->animIndex == ENHORSE_ANIM_TROT) { playSpeed = this->actor.speedXZ * 0.25f; - } else if (this->animationIdx == ENHORSE_ANIM_GALLOP) { + } else if (this->animIndex == ENHORSE_ANIM_GALLOP) { playSpeed = this->actor.speedXZ * 0.2f; } else { playSpeed = 1.0f; @@ -2943,7 +2955,7 @@ void EnHorse_UpdateHorsebackArchery(EnHorse* this, PlayState* play) { this->skin.skelAnime.playSpeed = playSpeed; if (SkelAnime_Update(&this->skin.skelAnime) || - ((this->animationIdx == ENHORSE_ANIM_IDLE) && (this->actor.speedXZ != 0.0f))) { + ((this->animIndex == ENHORSE_ANIM_IDLE) && (this->actor.speedXZ != 0.0f))) { EnHorse_UpdateHbaAnim(this); } } @@ -2953,7 +2965,7 @@ void EnHorse_FleePlayer(EnHorse* this, PlayState* play) { f32 distToHome; f32 playerDistToHome; f32 distToPlayer; - s32 nextAnim = this->animationIdx; + s32 nextAnimIndex = this->animIndex; s32 animFinished; s16 yaw; @@ -2996,25 +3008,26 @@ void EnHorse_FleePlayer(EnHorse* this, PlayState* play) { if (this->actor.speedXZ >= 6.0f) { this->skin.skelAnime.playSpeed = this->actor.speedXZ * 0.3f; - nextAnim = ENHORSE_ANIM_GALLOP; + nextAnimIndex = ENHORSE_ANIM_GALLOP; } else if (this->actor.speedXZ >= 3.0f) { this->skin.skelAnime.playSpeed = this->actor.speedXZ * 0.375f; - nextAnim = ENHORSE_ANIM_TROT; + nextAnimIndex = ENHORSE_ANIM_TROT; } else if (this->actor.speedXZ > 0.1f) { this->skin.skelAnime.playSpeed = this->actor.speedXZ * 0.75f; - nextAnim = ENHORSE_ANIM_WALK; + nextAnimIndex = ENHORSE_ANIM_WALK; EnHorse_PlayWalkingSound(this); } else { if (Rand_ZeroOne() > 0.5f) { - nextAnim = ENHORSE_ANIM_WHINNEY; + nextAnimIndex = ENHORSE_ANIM_WHINNY; } else { - nextAnim = ENHORSE_ANIM_IDLE; + nextAnimIndex = ENHORSE_ANIM_IDLE; } EnHorse_IdleAnimSounds(this, play); this->skin.skelAnime.playSpeed = 1.0f; } - if ((nextAnim == ENHORSE_ANIM_GALLOP) || (nextAnim == ENHORSE_ANIM_TROT) || (nextAnim == ENHORSE_ANIM_WALK)) { + if ((nextAnimIndex == ENHORSE_ANIM_GALLOP) || (nextAnimIndex == ENHORSE_ANIM_TROT) || + (nextAnimIndex == ENHORSE_ANIM_WALK)) { if (playerDistToHome < 300.0f) { yaw = player->actor.shape.rot.y; yaw += ((Actor_YawBetweenActors(&this->actor, &player->actor) > 0) ? 1 : -1) * 0x3FFF; @@ -3034,35 +3047,36 @@ void EnHorse_FleePlayer(EnHorse* this, PlayState* play) { animFinished = SkelAnime_Update(&this->skin.skelAnime); - if (((this->animationIdx == ENHORSE_ANIM_IDLE) || (this->animationIdx == ENHORSE_ANIM_WHINNEY)) && - ((nextAnim == ENHORSE_ANIM_GALLOP) || (nextAnim == ENHORSE_ANIM_TROT) || (nextAnim == ENHORSE_ANIM_WALK))) { - this->animationIdx = nextAnim; - Animation_Change(&this->skin.skelAnime, sAnimationHeaders[this->type][this->animationIdx], 1.0f, 0.0f, - Animation_GetLastFrame(sAnimationHeaders[this->type][nextAnim]), ANIMMODE_ONCE, -3.0f); - if (this->animationIdx == ENHORSE_ANIM_GALLOP) { + if (((this->animIndex == ENHORSE_ANIM_IDLE) || (this->animIndex == ENHORSE_ANIM_WHINNY)) && + ((nextAnimIndex == ENHORSE_ANIM_GALLOP) || (nextAnimIndex == ENHORSE_ANIM_TROT) || + (nextAnimIndex == ENHORSE_ANIM_WALK))) { + this->animIndex = nextAnimIndex; + Animation_Change(&this->skin.skelAnime, sAnimationHeaders[this->type][this->animIndex], 1.0f, 0.0f, + Animation_GetLastFrame(sAnimationHeaders[this->type][nextAnimIndex]), ANIMMODE_ONCE, -3.0f); + if (this->animIndex == ENHORSE_ANIM_GALLOP) { func_8087C1C0(this); - } else if (this->animationIdx == ENHORSE_ANIM_TROT) { + } else if (this->animIndex == ENHORSE_ANIM_TROT) { func_8087C178(this); } } else if (animFinished) { - if (nextAnim == ENHORSE_ANIM_GALLOP) { + if (nextAnimIndex == ENHORSE_ANIM_GALLOP) { func_8087C1C0(this); - } else if (nextAnim == ENHORSE_ANIM_TROT) { + } else if (nextAnimIndex == ENHORSE_ANIM_TROT) { func_8087C178(this); } - if ((this->animationIdx == ENHORSE_ANIM_IDLE) || (this->animationIdx == ENHORSE_ANIM_WHINNEY)) { - if (nextAnim != this->animationIdx) { - this->animationIdx = nextAnim; - Animation_Change(&this->skin.skelAnime, sAnimationHeaders[this->type][this->animationIdx], 1.0f, 0.0f, - Animation_GetLastFrame(sAnimationHeaders[this->type][this->animationIdx]), - ANIMMODE_ONCE, -3.0f); + if ((this->animIndex == ENHORSE_ANIM_IDLE) || (this->animIndex == ENHORSE_ANIM_WHINNY)) { + if (nextAnimIndex != this->animIndex) { + this->animIndex = nextAnimIndex; + Animation_Change(&this->skin.skelAnime, sAnimationHeaders[this->type][this->animIndex], 1.0f, 0.0f, + Animation_GetLastFrame(sAnimationHeaders[this->type][this->animIndex]), ANIMMODE_ONCE, + -3.0f); } else { if (Rand_ZeroOne() > 0.5f) { - this->animationIdx = ENHORSE_ANIM_IDLE; + this->animIndex = ENHORSE_ANIM_IDLE; this->stateFlags &= ~ENHORSE_SANDDUST_SOUND; } else { - this->animationIdx = ENHORSE_ANIM_WHINNEY; + this->animIndex = ENHORSE_ANIM_WHINNY; if (this->stateFlags & ENHORSE_DRAW) { if (this->type == HORSE_TYPE_2) { Audio_PlaySfxAtPos(&this->unk_218, NA_SE_EV_KID_HORSE_GROAN); @@ -3071,26 +3085,25 @@ void EnHorse_FleePlayer(EnHorse* this, PlayState* play) { } } } - Animation_Change(&this->skin.skelAnime, sAnimationHeaders[this->type][this->animationIdx], 1.0f, 0.0f, - Animation_GetLastFrame(sAnimationHeaders[this->type][this->animationIdx]), - ANIMMODE_ONCE, -3.0f); + Animation_Change(&this->skin.skelAnime, sAnimationHeaders[this->type][this->animIndex], 1.0f, 0.0f, + Animation_GetLastFrame(sAnimationHeaders[this->type][this->animIndex]), ANIMMODE_ONCE, + -3.0f); } - } else if (nextAnim != this->animationIdx) { - this->animationIdx = nextAnim; - Animation_Change(&this->skin.skelAnime, sAnimationHeaders[this->type][this->animationIdx], 1.0f, 0.0f, - Animation_GetLastFrame(sAnimationHeaders[this->type][this->animationIdx]), ANIMMODE_ONCE, + } else if (nextAnimIndex != this->animIndex) { + this->animIndex = nextAnimIndex; + Animation_Change(&this->skin.skelAnime, sAnimationHeaders[this->type][this->animIndex], 1.0f, 0.0f, + Animation_GetLastFrame(sAnimationHeaders[this->type][this->animIndex]), ANIMMODE_ONCE, -3.0f); } else { - Animation_Change(&this->skin.skelAnime, sAnimationHeaders[this->type][this->animationIdx], 1.0f, 0.0f, - Animation_GetLastFrame(sAnimationHeaders[this->type][this->animationIdx]), ANIMMODE_ONCE, + Animation_Change(&this->skin.skelAnime, sAnimationHeaders[this->type][this->animIndex], 1.0f, 0.0f, + Animation_GetLastFrame(sAnimationHeaders[this->type][this->animIndex]), ANIMMODE_ONCE, 0.0f); } - } else if ((this->animationIdx == ENHORSE_ANIM_WALK) && - ((nextAnim == ENHORSE_ANIM_IDLE) || (nextAnim == ENHORSE_ANIM_WHINNEY))) { - this->animationIdx = nextAnim; - Animation_Change(&this->skin.skelAnime, sAnimationHeaders[this->type][this->animationIdx], 1.0f, 0.0f, - Animation_GetLastFrame(sAnimationHeaders[this->type][this->animationIdx]), ANIMMODE_ONCE, - -3.0f); + } else if ((this->animIndex == ENHORSE_ANIM_WALK) && + ((nextAnimIndex == ENHORSE_ANIM_IDLE) || (nextAnimIndex == ENHORSE_ANIM_WHINNY))) { + this->animIndex = nextAnimIndex; + Animation_Change(&this->skin.skelAnime, sAnimationHeaders[this->type][this->animIndex], 1.0f, 0.0f, + Animation_GetLastFrame(sAnimationHeaders[this->type][this->animIndex]), ANIMMODE_ONCE, -3.0f); } } @@ -3107,21 +3120,20 @@ void func_80883B70(EnHorse* this, CsCmdActorAction* action) { void func_80883BEC(EnHorse* this, PlayState* play, CsCmdActorAction* action) { func_80883B70(this, action); - this->animationIdx = ENHORSE_ANIM_IDLE; + this->animIndex = ENHORSE_ANIM_IDLE; this->unk_3E0 = 1; this->stateFlags &= ~ENHORSE_SANDDUST_SOUND; - Animation_Change(&this->skin.skelAnime, sAnimationHeaders[this->type][this->animationIdx], 1.0f, 0.0f, - Animation_GetLastFrame(sAnimationHeaders[this->type][this->animationIdx]), ANIMMODE_ONCE, 0.0f); + Animation_Change(&this->skin.skelAnime, sAnimationHeaders[this->type][this->animIndex], 1.0f, 0.0f, + Animation_GetLastFrame(sAnimationHeaders[this->type][this->animIndex]), ANIMMODE_ONCE, 0.0f); this->stateFlags |= ENHORSE_SANDDUST_SOUND; } void func_80883CB0(EnHorse* this, PlayState* play, CsCmdActorAction* action) { EnHorse_IdleAnimSounds(this, play); if (SkelAnime_Update(&this->skin.skelAnime)) { - this->animationIdx = ENHORSE_ANIM_IDLE; - Animation_Change(&this->skin.skelAnime, sAnimationHeaders[this->type][this->animationIdx], 1.0f, 0.0f, - Animation_GetLastFrame(sAnimationHeaders[this->type][this->animationIdx]), ANIMMODE_ONCE, - 0.0f); + this->animIndex = ENHORSE_ANIM_IDLE; + Animation_Change(&this->skin.skelAnime, sAnimationHeaders[this->type][this->animIndex], 1.0f, 0.0f, + Animation_GetLastFrame(sAnimationHeaders[this->type][this->animIndex]), ANIMMODE_ONCE, 0.0f); } } @@ -3168,36 +3180,34 @@ void func_80883F98(EnHorse* this, PlayState* play, CsCmdActorAction* action) { void func_80884010(EnHorse* this, PlayState* play, CsCmdActorAction* action) { func_80883B70(this, action); this->unk_3E0 = 5; - this->animationIdx = ENHORSE_ANIM_WALK; - Animation_Change(&this->skin.skelAnime, sAnimationHeaders[this->type][this->animationIdx], 1.0f, 0.0f, - Animation_GetLastFrame(sAnimationHeaders[this->type][this->animationIdx]), ANIMMODE_ONCE, -3.0f); + this->animIndex = ENHORSE_ANIM_WALK; + Animation_Change(&this->skin.skelAnime, sAnimationHeaders[this->type][this->animIndex], 1.0f, 0.0f, + Animation_GetLastFrame(sAnimationHeaders[this->type][this->animIndex]), ANIMMODE_ONCE, -3.0f); } void func_808840C4(EnHorse* this, PlayState* play, CsCmdActorAction* action) { EnHorse_PlayWalkingSound(this); Cutscene_ActorTranslateAndYaw(&this->actor, play, this->unk_530); if (SkelAnime_Update(&this->skin.skelAnime)) { - Animation_Change(&this->skin.skelAnime, sAnimationHeaders[this->type][this->animationIdx], 1.0f, 0.0f, - Animation_GetLastFrame(sAnimationHeaders[this->type][this->animationIdx]), ANIMMODE_ONCE, - 0.0f); + Animation_Change(&this->skin.skelAnime, sAnimationHeaders[this->type][this->animIndex], 1.0f, 0.0f, + Animation_GetLastFrame(sAnimationHeaders[this->type][this->animIndex]), ANIMMODE_ONCE, 0.0f); } } void func_80884194(EnHorse* this, PlayState* play, CsCmdActorAction* action) { func_80883B70(this, action); this->unk_3E0 = 6; - this->animationIdx = ENHORSE_ANIM_GALLOP; - Animation_Change(&this->skin.skelAnime, sAnimationHeaders[this->type][this->animationIdx], 1.0f, 0.0f, - Animation_GetLastFrame(sAnimationHeaders[this->type][this->animationIdx]), ANIMMODE_ONCE, -3.0f); + this->animIndex = ENHORSE_ANIM_GALLOP; + Animation_Change(&this->skin.skelAnime, sAnimationHeaders[this->type][this->animIndex], 1.0f, 0.0f, + Animation_GetLastFrame(sAnimationHeaders[this->type][this->animIndex]), ANIMMODE_ONCE, -3.0f); func_8087C1C0(this); } void func_8088424C(EnHorse* this, PlayState* play, CsCmdActorAction* action) { Cutscene_ActorTranslateAndYaw(&this->actor, play, this->unk_530); if (SkelAnime_Update(&this->skin.skelAnime)) { - Animation_Change(&this->skin.skelAnime, sAnimationHeaders[this->type][this->animationIdx], 1.0f, 0.0f, - Animation_GetLastFrame(sAnimationHeaders[this->type][this->animationIdx]), ANIMMODE_ONCE, - 0.0f); + Animation_Change(&this->skin.skelAnime, sAnimationHeaders[this->type][this->animIndex], 1.0f, 0.0f, + Animation_GetLastFrame(sAnimationHeaders[this->type][this->animIndex]), ANIMMODE_ONCE, 0.0f); func_8087C1C0(this); } } @@ -3269,7 +3279,7 @@ void func_808846DC(EnHorse* this, PlayState* play, CsCmdActorAction* action) { void func_808846F0(EnHorse* this, PlayState* play) { this->playerControlled = false; - this->action = ENHORSE_ACT_21; + this->action = ENHORSE_ACTION_21; this->unk_3E0 = -1; this->actor.speedXZ = 0.0f; } @@ -3307,9 +3317,9 @@ void func_80884718(EnHorse* this, PlayState* play) { } void func_80884868(EnHorse* this) { - this->action = ENHORSE_ACT_23; - this->animationIdx = ENHORSE_ANIM_WALK; - Animation_PlayLoop(&this->skin.skelAnime, sAnimationHeaders[this->type][this->animationIdx]); + this->action = ENHORSE_ACTION_23; + this->animIndex = ENHORSE_ANIM_WALK; + Animation_PlayLoop(&this->skin.skelAnime, sAnimationHeaders[this->type][this->animIndex]); this->stateFlags |= ENHORSE_UNRIDEABLE; } @@ -3329,10 +3339,10 @@ void func_808848C8(EnHorse* this, PlayState* play) { void func_80884994(EnHorse* this) { this->unk_534 = -1; - this->animationIdx = ENHORSE_ANIM_TROT; - this->action = ENHORSE_ACT_24; - Animation_Change(&this->skin.skelAnime, sAnimationHeaders[this->type][this->animationIdx], 2.0f, 0.0f, - Animation_GetLastFrame(sAnimationHeaders[this->type][this->animationIdx]), ANIMMODE_ONCE, -3.0f); + this->animIndex = ENHORSE_ANIM_TROT; + this->action = ENHORSE_ACTION_24; + Animation_Change(&this->skin.skelAnime, sAnimationHeaders[this->type][this->animIndex], 2.0f, 0.0f, + Animation_GetLastFrame(sAnimationHeaders[this->type][this->animIndex]), ANIMMODE_ONCE, -3.0f); } void func_80884A40(EnHorse* this, PlayState* play) { @@ -3340,43 +3350,42 @@ void func_80884A40(EnHorse* this, PlayState* play) { s32 sp40; s32 temp_v0; - if (this->animationIdx == ENHORSE_ANIM_WHINNEY) { + if (this->animIndex == ENHORSE_ANIM_WHINNY) { temp_v0 = ENHORSE_ANIM_IDLE; } else { - temp_v0 = this->animationIdx; + temp_v0 = this->animIndex; } sp40 = sp44[this->unk_538] != temp_v0; if (SkelAnime_Update(&this->skin.skelAnime) || sp40) { - this->animationIdx = sp44[this->unk_538]; - if ((this->animationIdx == ENHORSE_ANIM_IDLE) && (Rand_ZeroOne() < 0.5f)) { - this->animationIdx = ENHORSE_ANIM_WHINNEY; + this->animIndex = sp44[this->unk_538]; + if ((this->animIndex == ENHORSE_ANIM_IDLE) && (Rand_ZeroOne() < 0.5f)) { + this->animIndex = ENHORSE_ANIM_WHINNY; } if (sp40) { - if (this->animationIdx == ENHORSE_ANIM_IDLE) { - Animation_MorphToPlayOnce(&this->skin.skelAnime, sAnimationHeaders[this->type][this->animationIdx], - -3.0f); + if (this->animIndex == ENHORSE_ANIM_IDLE) { + Animation_MorphToPlayOnce(&this->skin.skelAnime, sAnimationHeaders[this->type][this->animIndex], -3.0f); } else { - Animation_Change(&this->skin.skelAnime, sAnimationHeaders[this->type][this->animationIdx], 2.0f, 0.0f, - Animation_GetLastFrame(sAnimationHeaders[this->type][this->animationIdx]), - ANIMMODE_ONCE, -3.0f); + Animation_Change(&this->skin.skelAnime, sAnimationHeaders[this->type][this->animIndex], 2.0f, 0.0f, + Animation_GetLastFrame(sAnimationHeaders[this->type][this->animIndex]), ANIMMODE_ONCE, + -3.0f); } - } else if (this->animationIdx == ENHORSE_ANIM_IDLE) { - Animation_PlayOnce(&this->skin.skelAnime, sAnimationHeaders[this->type][this->animationIdx]); + } else if (this->animIndex == ENHORSE_ANIM_IDLE) { + Animation_PlayOnce(&this->skin.skelAnime, sAnimationHeaders[this->type][this->animIndex]); } else { - Animation_Change(&this->skin.skelAnime, sAnimationHeaders[this->type][this->animationIdx], 2.0f, 0.0f, - Animation_GetLastFrame(sAnimationHeaders[this->type][this->animationIdx]), ANIMMODE_ONCE, + Animation_Change(&this->skin.skelAnime, sAnimationHeaders[this->type][this->animIndex], 2.0f, 0.0f, + Animation_GetLastFrame(sAnimationHeaders[this->type][this->animIndex]), ANIMMODE_ONCE, 0.0f); } if ((this->unk_538 == OBJ_UM_ANIM_TROT) || (this->unk_538 == OBJ_UM_ANIM_GALLOP)) { Actor_PlaySfxAtPos(&this->actor, NA_SE_EV_HORSE_RUN); } else if (this->unk_538 == OBJ_UM_ANIM_IDLE) { - if (this->animationIdx == ENHORSE_ANIM_IDLE) { + if (this->animIndex == ENHORSE_ANIM_IDLE) { EnHorse_IdleAnimSounds(this, play); - } else if (this->animationIdx == ENHORSE_ANIM_WHINNEY) { + } else if (this->animIndex == ENHORSE_ANIM_WHINNY) { Actor_PlaySfxAtPos(&this->actor, NA_SE_EV_HORSE_GROAN); } } @@ -3387,14 +3396,14 @@ void func_80884D04(EnHorse* this, PlayState* play) { f32 playSpeed; this->actor.speedXZ = 10.0f; - this->action = ENHORSE_ACT_25; + this->action = ENHORSE_ACTION_25; this->unk_540 = this->actor.world.pos; Actor_PlaySfxAtPos(&this->actor, NA_SE_IT_INGO_HORSE_NEIGH); - this->animationIdx = ENHORSE_ANIM_GALLOP; + this->animIndex = ENHORSE_ANIM_GALLOP; playSpeed = this->actor.speedXZ * 0.2f; - Animation_Change(&this->skin.skelAnime, sAnimationHeaders[this->type][this->animationIdx], - sPlaybackSpeeds[this->animationIdx] * playSpeed * 2.5f, 0.0f, - Animation_GetLastFrame(sAnimationHeaders[this->type][this->animationIdx]), ANIMMODE_ONCE, 0.0f); + Animation_Change(&this->skin.skelAnime, sAnimationHeaders[this->type][this->animIndex], + sPlaybackSpeeds[this->animIndex] * playSpeed * 2.5f, 0.0f, + Animation_GetLastFrame(sAnimationHeaders[this->type][this->animIndex]), ANIMMODE_ONCE, 0.0f); } // Action func: EnHorse_UpdateBandit? @@ -3406,10 +3415,9 @@ void func_80884E0C(EnHorse* this, PlayState* play) { this->skin.skelAnime.playSpeed = playSpeed; if (SkelAnime_Update(&this->skin.skelAnime)) { - Animation_Change(&this->skin.skelAnime, sAnimationHeaders[this->type][this->animationIdx], - sPlaybackSpeeds[this->animationIdx] * playSpeed * 2.5f, 0.0f, - Animation_GetLastFrame(sAnimationHeaders[this->type][this->animationIdx]), ANIMMODE_ONCE, - 0.0f); + Animation_Change(&this->skin.skelAnime, sAnimationHeaders[this->type][this->animIndex], + sPlaybackSpeeds[this->animIndex] * playSpeed * 2.5f, 0.0f, + Animation_GetLastFrame(sAnimationHeaders[this->type][this->animIndex]), ANIMMODE_ONCE, 0.0f); Audio_PlaySfxAtPos(&this->actor.projectedPos, NA_SE_EV_HORSE_RUN); } @@ -3421,7 +3429,7 @@ void func_80884E0C(EnHorse* this, PlayState* play) { if (((this->unk_550 == 5) || (this->unk_550 == 7)) && (Player_GetMask(play) != PLAYER_MASK_CIRCUS_LEADER)) { this->rider->unk488 = 7; } else { - EnHorse_SetIngoAnimation(this->animationIdx, this->skin.skelAnime.curFrame, this->unk_394 & 1, + EnHorse_SetIngoAnimation(this->animIndex, this->skin.skelAnime.curFrame, this->unk_394 & 1, &this->rider->unk488); } @@ -3479,14 +3487,14 @@ s32 EnHorse_CalcFloorHeight(EnHorse* this, PlayState* play, Vec3f* pos, Collisio * 5: Obstructed behind */ void EnHorse_ObstructMovement(EnHorse* this, PlayState* play, s32 obstacleType, s32 galloping) { - if (this->action != ENHORSE_ACT_HBA) { - if ((this->action == ENHORSE_ACT_MOUNTED_IDLE) || (this->action == ENHORSE_ACT_MOUNTED_IDLE_WHINNEYING)) { + if (this->action != ENHORSE_ACTION_CS_UPDATE) { + if ((this->action == ENHORSE_ACTION_5) || (this->action == ENHORSE_ACTION_6)) { this->actor.world.pos = this->actor.prevPos; this->actor.world.rot.y -= 0x640; this->actor.speedXZ = 0.0f; this->actor.shape.rot.y = this->actor.world.rot.y; this->unk_1EC |= 4; - } else if (this->action == ENHORSE_ACT_25) { + } else if (this->action == ENHORSE_ACTION_25) { this->unk_1EC |= 0x80; this->actor.world.pos = this->actor.prevPos; this->actor.speedXZ = 0.0f; @@ -3495,8 +3503,8 @@ void EnHorse_ObstructMovement(EnHorse* this, PlayState* play, s32 obstacleType, this->actor.world.pos = this->lastPos; this->stateFlags |= ENHORSE_OBSTACLE; if (this->playerControlled == 0) { - if (this->animationIdx != 3) {} - } else if (this->action != ENHORSE_ACT_REVERSE) { + if (this->animIndex != 3) {} + } else if (this->action != ENHORSE_ACTION_MOUNTED_REARING) { if (this->stateFlags & ENHORSE_JUMPING) { this->stateFlags &= ~ENHORSE_JUMPING; this->actor.gravity = -3.5f; @@ -3768,7 +3776,7 @@ void EnHorse_UpdateBgCheckInfo(EnHorse* this, PlayState* play) { } if ((this->stateFlags & ENHORSE_JUMPING) || (this->stateFlags & ENHORSE_FLAG_28) || (this->actor.speedXZ < 0.0f) || - (this->action == ENHORSE_ACT_LOW_JUMP) || (this->action == ENHORSE_ACT_REVERSE)) { + (this->action == ENHORSE_ACTION_STOPPING) || (this->action == ENHORSE_ACTION_MOUNTED_REARING)) { return; } @@ -3867,7 +3875,7 @@ void EnHorse_UpdateBgCheckInfo(EnHorse* this, PlayState* play) { (Math3D_DistPlaneToPos(COLPOLY_GET_NORMAL(obstacleFloor->normal.x), COLPOLY_GET_NORMAL(obstacleFloor->normal.y), COLPOLY_GET_NORMAL(obstacleFloor->normal.z), obstacleFloor->dist, &this->actor.world.pos) > 40.0f)) { - if ((movingFast == true) && (this->playerControlled == true) && (this->action != ENHORSE_ACT_LOW_JUMP) && + if ((movingFast == true) && (this->playerControlled == true) && (this->action != ENHORSE_ACTION_STOPPING) && (play->sceneNum != SCENE_KOEPONARACE)) { this->stateFlags |= ENHORSE_FORCE_REVERSING; EnHorse_StartBraking(this, play); @@ -3880,7 +3888,7 @@ void EnHorse_UpdateBgCheckInfo(EnHorse* this, PlayState* play) { if ((temp_f0 < 0.81915206f) || SurfaceType_IsHorseBlocked(&play->colCtx, obstacleFloor, bgId) || (func_800C99D4(&play->colCtx, obstacleFloor, bgId) == 7)) { if ((Math_CosS(sp7E) < 0.9f) && (movingFast == true) && (this->playerControlled == true) && - (this->action != ENHORSE_ACT_LOW_JUMP) && (play->sceneNum != SCENE_KOEPONARACE)) { + (this->action != ENHORSE_ACTION_STOPPING) && (play->sceneNum != SCENE_KOEPONARACE)) { this->stateFlags |= ENHORSE_FORCE_REVERSING; EnHorse_StartBraking(this, play); } @@ -3898,11 +3906,11 @@ void EnHorse_UpdateBgCheckInfo(EnHorse* this, PlayState* play) { if (((obstacleTop.y < intersect.y) && ((horseGameCheck == NULL) || (horseGameCheck->actor.id != ACTOR_EN_HORSE_GAME_CHECK) || ((horseGameCheck->actor.params & 0xFF) != 5))) || - ((this->stateFlags & ENHORSE_CANT_JUMP) && (this->action != ENHORSE_ACT_MOUNTED_IDLE))) { + ((this->stateFlags & ENHORSE_CANT_JUMP) && (this->action != ENHORSE_ACTION_5))) { return; } - if ((this->action == ENHORSE_ACT_MOUNTED_IDLE) && !(this->stateFlags & ENHORSE_FLAG_30)) { + if ((this->action == ENHORSE_ACTION_5) && !(this->stateFlags & ENHORSE_FLAG_30)) { horseGameCheck = DynaPoly_GetActor(&play->colCtx, bgId); if ((horseGameCheck != NULL) && (horseGameCheck->actor.id == ACTOR_EN_HORSE_GAME_CHECK) && ((horseGameCheck->actor.params & 0xFF) == 5)) { @@ -3942,13 +3950,13 @@ void EnHorse_UpdateBgCheckInfo(EnHorse* this, PlayState* play) { temp_f0 = COLPOLY_GET_NORMAL(obstacleFloor->normal.y); if ((temp_f0 < 0.81915206f) || SurfaceType_IsHorseBlocked(&play->colCtx, obstacleFloor, bgId) || (func_800C99D4(&play->colCtx, obstacleFloor, bgId) == 7)) { - if ((movingFast == true) && (this->playerControlled == true) && (this->action != ENHORSE_ACT_LOW_JUMP) && + if ((movingFast == true) && (this->playerControlled == true) && (this->action != ENHORSE_ACTION_STOPPING) && (play->sceneNum != SCENE_KOEPONARACE)) { this->stateFlags |= ENHORSE_FORCE_REVERSING; EnHorse_StartBraking(this, play); } } else if (behindObstacleHeight < -70.0f) { - if ((movingFast == true) && (this->playerControlled == true) && (this->action != ENHORSE_ACT_LOW_JUMP) && + if ((movingFast == true) && (this->playerControlled == true) && (this->action != ENHORSE_ACTION_STOPPING) && (play->sceneNum != SCENE_KOEPONARACE)) { this->stateFlags |= ENHORSE_FORCE_REVERSING; EnHorse_StartBraking(this, play); @@ -3982,8 +3990,8 @@ void EnHorse_UpdateBgCheckInfo(EnHorse* this, PlayState* play) { void func_80886C00(EnHorse* this, PlayState* play) { Input* input = &play->state.input[this->unk_52C]; - if (((this->action == ENHORSE_ACT_MOUNTED_GALLOP) || (this->action == ENHORSE_ACT_MOUNTED_REARING) || - (this->action == ENHORSE_ACT_STOPPING)) && + if (((this->action == ENHORSE_ACTION_MOUNTED_WALK) || (this->action == ENHORSE_ACTION_MOUNTED_TROT) || + (this->action == ENHORSE_ACTION_MOUNTED_GALLOP)) && (CHECK_BTN_ALL(input->press.button, BTN_A) || (func_801A5100() == 5)) && (play->interfaceCtx.unk_212 == 8) && !(this->stateFlags & ENHORSE_BOOST) && !(this->stateFlags & ENHORSE_FLAG_8) && !(this->stateFlags & ENHORSE_FLAG_9)) { @@ -4017,22 +4025,13 @@ void func_80886C00(EnHorse* this, PlayState* play) { } void EnHorse_RegenBoost(EnHorse* this, PlayState* play) { - s32 playSfx; - if ((this->numBoosts < 6) && (this->numBoosts > 0)) { this->boostRegenTime--; this->boostTimer++; if (this->boostRegenTime <= 0) { this->numBoosts++; - if (((this->action == ENHORSE_ACT_MOUNTED_TURN) || (this->action == ENHORSE_ACT_FROZEN) || - (this->action == ENHORSE_ACT_MOUNTED_WALK)) && - !(this->stateFlags & ENHORSE_FLAG_19) && !(this->stateFlags & ENHORSE_FLAG_25)) { - playSfx = true; - } else { - playSfx = false; - } - if (!playSfx) { + if (!EN_HORSE_CHECK_4(this)) { play_sound(NA_SE_SY_CARROT_RECOVER); } @@ -4046,15 +4045,8 @@ void EnHorse_RegenBoost(EnHorse* this, PlayState* play) { if (this->boostRegenTime <= 0) { this->boostRegenTime = 0; this->numBoosts = 6; - if (((this->action == ENHORSE_ACT_MOUNTED_TURN) || (this->action == ENHORSE_ACT_FROZEN) || - (this->action == ENHORSE_ACT_MOUNTED_WALK)) && - !(this->stateFlags & ENHORSE_FLAG_19) && !(this->stateFlags & ENHORSE_FLAG_25)) { - playSfx = true; - } else { - playSfx = false; - } - if (!playSfx) { + if (!EN_HORSE_CHECK_4(this)) { play_sound(NA_SE_SY_CARROT_RECOVER); } } @@ -4147,32 +4139,32 @@ s32 EnHorse_RandInt(f32 arg0) { } static EnHorseActionFunc sActionFuncs[] = { - EnHorse_Frozen, - EnHorse_Inactive, - EnHorse_Idle, - EnHorse_FollowPlayer, - EnHorse_UpdateIngoRace, - func_808819D8, - func_80881398, - EnHorse_MountedIdle, - EnHorse_MountedIdleWhinneying, - EnHorse_MountedTurn, - EnHorse_MountedWalk, - EnHorse_MountedTrot, - EnHorse_MountedGallop, - EnHorse_MountedRearing, - EnHorse_Stopping, - EnHorse_Reverse, - EnHorse_LowJump, - EnHorse_HighJump, - EnHorse_CutsceneUpdate, - EnHorse_UpdateHorsebackArchery, - EnHorse_FleePlayer, - func_80884718, - func_8087CA04, - func_808848C8, - func_80884A40, - func_80884E0C, + EnHorse_Frozen, // ENHORSE_ACTION_FROZEN + EnHorse_Inactive, // ENHORSE_ACTION_INACTIVE + EnHorse_Idle, // ENHORSE_ACTION_IDLE + EnHorse_FollowPlayer, // ENHORSE_ACTION_FOLLOW_PLAYER + EnHorse_UpdateIngoRace, // ENHORSE_ACTION_INGO_RACE + func_808819D8, // ENHORSE_ACTION_5 + func_80881398, // ENHORSE_ACTION_6 + EnHorse_MountedIdle, // ENHORSE_ACTION_MOUNTED_IDLE + EnHorse_MountedIdleWhinnying, // ENHORSE_ACTION_MOUNTED_IDLE_WHINNYING + EnHorse_MountedTurn, // ENHORSE_ACTION_MOUNTED_TURN + EnHorse_MountedWalk, // ENHORSE_ACTION_MOUNTED_WALK + EnHorse_MountedTrot, // ENHORSE_ACTION_MOUNTED_TROT + EnHorse_MountedGallop, // ENHORSE_ACTION_MOUNTED_GALLOP + EnHorse_MountedRearing, // ENHORSE_ACTION_MOUNTED_REARING + EnHorse_Stopping, // ENHORSE_ACTION_STOPPING + EnHorse_Reverse, // ENHORSE_ACTION_REVERSE + EnHorse_LowJump, // ENHORSE_ACTION_LOW_JUMP + EnHorse_HighJump, // ENHORSE_ACTION_HIGH_JUMP + EnHorse_CutsceneUpdate, // ENHORSE_ACTION_CS_UPDATE + EnHorse_UpdateHorsebackArchery, // ENHORSE_ACTION_HBA + EnHorse_FleePlayer, // ENHORSE_ACTION_FLEE_PLAYER + func_80884718, // ENHORSE_ACTION_21 + func_8087CA04, // ENHORSE_ACTION_22 + func_808848C8, // ENHORSE_ACTION_23 + func_80884A40, // ENHORSE_ACTION_24 + func_80884E0C, // ENHORSE_ACTION_25 }; void EnHorse_Update(Actor* thisx, PlayState* play2) { PlayState* play = play2; @@ -4202,7 +4194,7 @@ void EnHorse_Update(Actor* thisx, PlayState* play2) { this->stateFlags &= ~ENHORSE_FLAG_20; EnHorse_StartRearing(this); } else if (!(this->stateFlags & ENHORSE_FLAG_20) && (this->stateFlags & ENHORSE_FLAG_21) && - (this->action != ENHORSE_ACT_REVERSE) && (this->inRace == true)) { + (this->action != ENHORSE_ACTION_MOUNTED_REARING) && (this->inRace == true)) { this->stateFlags &= ~ENHORSE_FLAG_21; EnHorse_StartRearing(this); } @@ -4212,7 +4204,7 @@ void EnHorse_Update(Actor* thisx, PlayState* play2) { this->stateFlags &= ~ENHORSE_OBSTACLE; this->unk_3EC = thisx->world.rot.y; - if ((this->animationIdx == ENHORSE_ANIM_STOPPING) || (this->animationIdx == ENHORSE_ANIM_REARING)) { + if ((this->animIndex == ENHORSE_ANIM_STOPPING) || (this->animIndex == ENHORSE_ANIM_REARING)) { this->skin.skelAnime.jointTable[0].y += 0x154; } @@ -4220,8 +4212,8 @@ void EnHorse_Update(Actor* thisx, PlayState* play2) { this->lastPos = thisx->world.pos; if (!(this->stateFlags & ENHORSE_INACTIVE)) { - if ((this->action == ENHORSE_ACT_STOPPING) || (this->action == ENHORSE_ACT_MOUNTED_REARING) || - (this->action == ENHORSE_ACT_MOUNTED_GALLOP)) { + if ((this->action == ENHORSE_ACTION_MOUNTED_GALLOP) || (this->action == ENHORSE_ACTION_MOUNTED_TROT) || + (this->action == ENHORSE_ACTION_MOUNTED_WALK)) { func_80886C00(this, play); } @@ -4233,19 +4225,19 @@ void EnHorse_Update(Actor* thisx, PlayState* play2) { thisx->speedXZ = 0.0f; } - if (this->action != ENHORSE_ACT_25) { + if (this->action != ENHORSE_ACTION_25) { Actor_MoveWithGravity(&this->actor); } if (this->rider != NULL) { - if ((this->action == ENHORSE_ACT_INGO_RACE) || (this->action == ENHORSE_ACT_MOUNTED_IDLE) || - (this->action == ENHORSE_ACT_25)) { + if ((this->action == ENHORSE_ACTION_INGO_RACE) || (this->action == ENHORSE_ACTION_5) || + (this->action == ENHORSE_ACTION_25)) { this->rider->actor.world.pos.x = thisx->world.pos.x; this->rider->actor.world.pos.y = thisx->world.pos.y + 10.0f; this->rider->actor.world.pos.z = thisx->world.pos.z; this->rider->actor.shape.rot.x = thisx->shape.rot.x; this->rider->actor.shape.rot.y = thisx->shape.rot.y; - } else if (this->action == ENHORSE_ACT_MOUNTED_IDLE_WHINNEYING) { + } else if (this->action == ENHORSE_ACTION_6) { EnIn* in = this->rider; s16 jnt = in->jointTable[0].y; @@ -4271,8 +4263,8 @@ void EnHorse_Update(Actor* thisx, PlayState* play2) { } } - if ((this->action != ENHORSE_ACT_INGO_RACE) && (this->action != ENHORSE_ACT_MOUNTED_IDLE) && - (this->action != ENHORSE_ACT_MOUNTED_IDLE_WHINNEYING)) { + if ((this->action != ENHORSE_ACTION_INGO_RACE) && (this->action != ENHORSE_ACTION_5) && + (this->action != ENHORSE_ACTION_6)) { EnHorse_TiltBody(this, play); } @@ -4329,7 +4321,7 @@ void EnHorse_Update(Actor* thisx, PlayState* play2) { CollisionCheck_SetAC(play, &play->colChkCtx, &this->colliderCylinder2.base); } - if ((player->stateFlags1 & ENHORSE_BOOST) && (player->rideActor != NULL)) { + if ((player->stateFlags1 & PLAYER_STATE1_1) && (player->rideActor != NULL)) { EnHorse_UpdateConveyors(this, play); } @@ -4431,11 +4423,11 @@ s32 EnHorse_MountSideCheck(EnHorse* this, PlayState* play, Player* player) { } s32 EnHorse_GetMountSide(EnHorse* this, PlayState* play) { - if (this->action != ENHORSE_ACT_IDLE) { + if (this->action != ENHORSE_ACTION_IDLE) { return 0; } - if ((this->animationIdx != ENHORSE_ANIM_IDLE) && (this->animationIdx != ENHORSE_ANIM_WHINNEY)) { + if ((this->animIndex != ENHORSE_ANIM_IDLE) && (this->animIndex != ENHORSE_ANIM_WHINNY)) { return 0; } @@ -4485,7 +4477,7 @@ void EnHorse_PostDraw(Actor* thisx, PlayState* play, Skin* skin) { SkinMatrix_Vec3fMtxFMultXYZW(&play->viewProjectionMtxF, &sp38, &this->unk_218, &sp34); - if ((this->animationIdx == ENHORSE_ANIM_IDLE) && (this->action != ENHORSE_ACT_FROZEN) && + if ((this->animIndex == ENHORSE_ANIM_IDLE) && (this->action != ENHORSE_ACTION_FROZEN) && (((curFrame > 40.0f) && (curFrame < 45.0f) && (this->type == 0)) || ((curFrame > 28.0f) && (curFrame < 33.0f) && (this->type == 1)))) { if (Rand_ZeroOne() < 0.02f) { @@ -4494,7 +4486,7 @@ void EnHorse_PostDraw(Actor* thisx, PlayState* play, Skin* skin) { this->frontRightHoof.y -= 5.0f; } } else { - if (this->action == ENHORSE_ACT_LOW_JUMP) { + if (this->action == ENHORSE_ACTION_STOPPING) { if (((curFrame > 10.0f) && (curFrame < 13.0f)) || ((curFrame > 25.0f) && (curFrame < 33.0f))) { if (Rand_ZeroOne() < 0.02f) { this->dustFlags |= 2; @@ -4539,7 +4531,7 @@ void EnHorse_PostDraw(Actor* thisx, PlayState* play, Skin* skin) { } EnHorse_RandomOffset(&sp64, 10.0f, &this->backRightHoof); } - } else if (this->animationIdx == ENHORSE_ANIM_GALLOP) { + } else if (this->animIndex == ENHORSE_ANIM_GALLOP) { if ((curFrame > 14.0f) && (curFrame < 16.0f) && (Rand_ZeroOne() < 0.02f)) { this->dustFlags |= 1; if (this->type == HORSE_TYPE_2) { @@ -4573,7 +4565,7 @@ void EnHorse_PostDraw(Actor* thisx, PlayState* play, Skin* skin) { } EnHorse_RandomOffset(&sp64, 10.0f, &this->backLeftHoof); } - } else if ((this->action == ENHORSE_ACT_BRIDGE_JUMP) && (curFrame > 6.0f) && + } else if ((this->action == ENHORSE_ACTION_LOW_JUMP) && (curFrame > 6.0f) && (Rand_ZeroOne() < (1.0f - ((curFrame - 6.0f) * (1.0f / 17.0f))))) { if (Rand_ZeroOne() < 0.05f) { this->dustFlags |= 8; @@ -4593,7 +4585,7 @@ void EnHorse_PostDraw(Actor* thisx, PlayState* play, Skin* skin) { } EnHorse_RandomOffset(&sp64, 10.0f, &this->backRightHoof); } - } else if ((this->action == ENHORSE_ACT_CS_UPDATE) && (curFrame > 5.0f)) { + } else if ((this->action == ENHORSE_ACTION_HIGH_JUMP) && (curFrame > 5.0f)) { if (Rand_ZeroOne() < (1.0f - ((curFrame - 5.0f) * 0.04f))) { if (Rand_ZeroOne() < 0.05f) { this->dustFlags |= 8; diff --git a/src/overlays/actors/ovl_En_Horse/z_en_horse.h b/src/overlays/actors/ovl_En_Horse/z_en_horse.h index 9f32331c6..97ab2c898 100644 --- a/src/overlays/actors/ovl_En_Horse/z_en_horse.h +++ b/src/overlays/actors/ovl_En_Horse/z_en_horse.h @@ -46,33 +46,33 @@ typedef void (*EnHorseCsFunc)(struct EnHorse*, PlayState*, CsCmdActorAction*); #define ENHORSE_FLAG_30 (1 << 30) /* 0x40000000 */ #define ENHORSE_FLAG_31 (1 << 31) /* 0x80000000 */ -typedef enum { - /* 0 */ ENHORSE_ACT_FROZEN, - /* 1 */ ENHORSE_ACT_INACTIVE, - /* 2 */ ENHORSE_ACT_IDLE, - /* 3 */ ENHORSE_ACT_FOLLOW_PLAYER, - /* 4 */ ENHORSE_ACT_INGO_RACE, - /* 5 */ ENHORSE_ACT_MOUNTED_IDLE, - /* 6 */ ENHORSE_ACT_MOUNTED_IDLE_WHINNEYING, - /* 7 */ ENHORSE_ACT_MOUNTED_TURN, - /* 8 */ ENHORSE_ACT_MOUNTED_WALK, - /* 9 */ ENHORSE_ACT_MOUNTED_TROT, - /* 10 */ ENHORSE_ACT_MOUNTED_GALLOP, - /* 11 */ ENHORSE_ACT_MOUNTED_REARING, - /* 12 */ ENHORSE_ACT_STOPPING, - /* 13 */ ENHORSE_ACT_REVERSE, - /* 14 */ ENHORSE_ACT_LOW_JUMP, - /* 15 */ ENHORSE_ACT_HIGH_JUMP, - /* 16 */ ENHORSE_ACT_BRIDGE_JUMP, - /* 17 */ ENHORSE_ACT_CS_UPDATE, - /* 18 */ ENHORSE_ACT_HBA, - /* 19 */ ENHORSE_ACT_FLEE_PLAYER, - /* 20 */ ENHORSE_ACT_20, - /* 21 */ ENHORSE_ACT_21, - /* 22 */ ENHORSE_ACT_22, - /* 23 */ ENHORSE_ACT_23, - /* 24 */ ENHORSE_ACT_24, - /* 25 */ ENHORSE_ACT_25, +typedef enum EnHorseAction { + /* 0 */ ENHORSE_ACTION_FROZEN, + /* 1 */ ENHORSE_ACTION_INACTIVE, + /* 2 */ ENHORSE_ACTION_IDLE, + /* 3 */ ENHORSE_ACTION_FOLLOW_PLAYER, + /* 4 */ ENHORSE_ACTION_INGO_RACE, + /* 5 */ ENHORSE_ACTION_5, + /* 6 */ ENHORSE_ACTION_6, + /* 7 */ ENHORSE_ACTION_MOUNTED_IDLE, + /* 8 */ ENHORSE_ACTION_MOUNTED_IDLE_WHINNYING, + /* 9 */ ENHORSE_ACTION_MOUNTED_TURN, + /* 10 */ ENHORSE_ACTION_MOUNTED_WALK, + /* 11 */ ENHORSE_ACTION_MOUNTED_TROT, + /* 12 */ ENHORSE_ACTION_MOUNTED_GALLOP, + /* 13 */ ENHORSE_ACTION_MOUNTED_REARING, + /* 14 */ ENHORSE_ACTION_STOPPING, + /* 15 */ ENHORSE_ACTION_REVERSE, + /* 16 */ ENHORSE_ACTION_LOW_JUMP, + /* 17 */ ENHORSE_ACTION_HIGH_JUMP, + /* 18 */ ENHORSE_ACTION_CS_UPDATE, + /* 19 */ ENHORSE_ACTION_HBA, + /* 20 */ ENHORSE_ACTION_FLEE_PLAYER, + /* 21 */ ENHORSE_ACTION_21, + /* 22 */ ENHORSE_ACTION_22, + /* 23 */ ENHORSE_ACTION_23, + /* 24 */ ENHORSE_ACTION_24, + /* 25 */ ENHORSE_ACTION_25 } EnHorseAction; typedef enum { @@ -84,18 +84,6 @@ typedef enum { /* 5 */ PLAYER_DIR_SIDE_L } EnHorsePlayerDir; -typedef enum { - /* 0 */ ENHORSE_ANIM_IDLE, - /* 1 */ ENHORSE_ANIM_WHINNEY, - /* 2 */ ENHORSE_ANIM_STOPPING, - /* 3 */ ENHORSE_ANIM_REARING, - /* 4 */ ENHORSE_ANIM_WALK, - /* 5 */ ENHORSE_ANIM_TROT, - /* 6 */ ENHORSE_ANIM_GALLOP, - /* 7 */ ENHORSE_ANIM_LOW_JUMP, - /* 8 */ ENHORSE_ANIM_HIGH_JUMP -} EnHorseAnimationIndex; - typedef enum { /* 0 */ HORSE_TYPE_EPONA, /* 1 */ HORSE_TYPE_HNI, @@ -144,7 +132,7 @@ typedef enum { typedef struct EnHorse { /* 0x000 */ Actor actor; - /* 0x144 */ s32 action; + /* 0x144 */ EnHorseAction action; /* 0x148 */ s32 noInputTimer; /* 0x14C */ s32 noInputTimerMax; /* 0x150 */ s32 type; @@ -157,7 +145,7 @@ typedef struct EnHorse { /* 0x200 */ s32 curRaceWaypoint; /* 0x204 */ s32 boostSpeed; /* 0x208 */ s32 playerControlled; - /* 0x20C */ s32 animationIdx; + /* 0x20C */ s32 animIndex; /* 0x210 */ f32 curFrame; /* 0x214 */ s32 soundTimer; /* 0x218 */ Vec3f unk_218; @@ -232,6 +220,19 @@ typedef struct EnHorse { /* 0x590 */ s32 unk_590; } EnHorse; // size = 0x594 -extern const ActorInit En_Horse_InitVars; +#define EN_HORSE_CHECK_1(horseActor) (((horseActor)->stateFlags & ENHORSE_FLAG_6) ? true : false) + +#define EN_HORSE_CHECK_2(horseActor) (((horseActor)->stateFlags & ENHORSE_FLAG_8) ? true : false) + +#define EN_HORSE_CHECK_3(horseActor) (((horseActor)->stateFlags & ENHORSE_FLAG_9) ? true : false) + +#define EN_HORSE_CHECK_4(horseActor) \ + (((((horseActor)->action == ENHORSE_ACTION_MOUNTED_IDLE) || ((horseActor)->action == ENHORSE_ACTION_FROZEN) || \ + ((horseActor)->action == ENHORSE_ACTION_MOUNTED_IDLE_WHINNYING)) && \ + !((horseActor)->stateFlags & ENHORSE_FLAG_19) && !((horseActor)->stateFlags & ENHORSE_FLAG_25)) \ + ? true \ + : false) + +#define EN_HORSE_CHECK_JUMPING(horseActor) (((horseActor)->stateFlags & ENHORSE_JUMPING) ? true : false) #endif // Z_EN_HORSE_H diff --git a/src/overlays/actors/ovl_En_Horse_Game_Check/z_en_horse_game_check.c b/src/overlays/actors/ovl_En_Horse_Game_Check/z_en_horse_game_check.c index 83cf73e9e..de5a68613 100644 --- a/src/overlays/actors/ovl_En_Horse_Game_Check/z_en_horse_game_check.c +++ b/src/overlays/actors/ovl_En_Horse_Game_Check/z_en_horse_game_check.c @@ -152,7 +152,7 @@ s32 func_808F8E94(EnHorseGameCheck* this, PlayState* play) { s32 func_808F8EB0(EnHorseGameCheck* this, PlayState* play) { Player* player = GET_PLAYER(play); - if (play->nextEntranceIndex == 0xCE20) { + if (play->nextEntrance == ENTRANCE(GORMAN_TRACK, 2)) { return false; } @@ -172,7 +172,7 @@ s32 func_808F8EB0(EnHorseGameCheck* this, PlayState* play) { if (player->stateFlags1 & 0x800000) { D_801BDAA0 = 1; } - play->nextEntranceIndex = 0xCE20; + play->nextEntrance = ENTRANCE(GORMAN_TRACK, 2); play->transitionTrigger = TRANS_TRIGGER_START; return false; } diff --git a/src/overlays/actors/ovl_En_Hs/z_en_hs.c b/src/overlays/actors/ovl_En_Hs/z_en_hs.c index 15a735128..00bfd2cd5 100644 --- a/src/overlays/actors/ovl_En_Hs/z_en_hs.c +++ b/src/overlays/actors/ovl_En_Hs/z_en_hs.c @@ -216,7 +216,7 @@ void EnHs_DoNothing(EnHs* this, PlayState* play) { void EnHs_SceneTransitToBunnyHoodDialogue(EnHs* this, PlayState* play) { if (DECR(this->stateTimer) == 0) { - play->nextEntranceIndex = play->setupExitList[HS_GET_EXIT_INDEX(&this->actor)]; + play->nextEntrance = play->setupExitList[HS_GET_EXIT_INDEX(&this->actor)]; play->transitionTrigger = TRANS_TRIGGER_START; gSaveContext.save.weekEventReg[25] |= 8; this->actionFunc = EnHs_DoNothing; diff --git a/src/overlays/actors/ovl_En_Ig/z_en_ig.c b/src/overlays/actors/ovl_En_Ig/z_en_ig.c index cf24adfd0..bc1ca559b 100644 --- a/src/overlays/actors/ovl_En_Ig/z_en_ig.c +++ b/src/overlays/actors/ovl_En_Ig/z_en_ig.c @@ -143,7 +143,7 @@ static ColliderSphereInit sSphereInit = { static CollisionCheckInfoInit2 sColChkInfoInit = { 0, 0, 0, 0, MASS_IMMOVABLE }; -static AnimationInfoS sAnimations[] = { +static AnimationInfoS sAnimationInfo[] = { { &object_dai_Anim_0048B4, 1.0f, 0, -1, ANIMMODE_LOOP, 0 }, { &object_dai_Anim_0048B4, 1.0f, 0, -1, ANIMMODE_LOOP, -4 }, { &object_dai_Anim_005100, 1.0f, 0, -1, ANIMMODE_LOOP, 0 }, @@ -237,7 +237,7 @@ s32 func_80BF1284(EnIg* this, s32 arg1) { if (phi_v1) { this->unk_3FC = arg1; - ret = SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimations, arg1); + ret = SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimationInfo, arg1); this->unk_3D4 = this->skelAnime.playSpeed; } @@ -950,7 +950,7 @@ void EnIg_Update(Actor* thisx, PlayState* play) { func_80BF1258(this); func_80BF13E4(this); func_80BF15EC(this); - func_8013C964(&this->actor, play, 60.0f, 30.0f, EXCH_ITEM_NONE, this->unk_3D0 & 7); + func_8013C964(&this->actor, play, 60.0f, 30.0f, PLAYER_AP_NONE, this->unk_3D0 & 7); Actor_MoveWithGravity(&this->actor); Actor_UpdateBgCheckInfo(play, &this->actor, 30.0f, 12.0f, 0.0f, 4); func_80BF1354(this, play); diff --git a/src/overlays/actors/ovl_En_In/z_en_in.c b/src/overlays/actors/ovl_En_In/z_en_in.c index da51baa4c..e5f56d857 100644 --- a/src/overlays/actors/ovl_En_In/z_en_in.c +++ b/src/overlays/actors/ovl_En_In/z_en_in.c @@ -118,7 +118,7 @@ static DamageTable sDamageTable = { /* Powder Keg */ DMG_ENTRY(0, 0x0), }; -static AnimationInfoS sAnimations[] = { +static AnimationInfoS sAnimationInfo[] = { { &object_in_Anim_001D10, 1.0f, 0, -1, ANIMMODE_LOOP, 0 }, { &object_in_Anim_001D10, 1.0f, 0, -1, ANIMMODE_LOOP, -4 }, { &object_in_Anim_014F8C, 1.0f, 0, -1, ANIMMODE_LOOP, 0 }, @@ -146,19 +146,19 @@ static TrackOptionsSet sTrackOptions = { { 0x1770, 4, 1, 6 }, }; -s32 func_808F30B0(SkelAnime* skelAnime, s16 animIndex) { +s32 EnIn_ChangeAnim(SkelAnime* skelAnime, s16 animIndex) { s16 frameCount; s32 ret = false; if (animIndex >= 0 && animIndex < 18) { ret = true; - frameCount = sAnimations[animIndex].frameCount; + frameCount = sAnimationInfo[animIndex].frameCount; if (frameCount < 0) { - frameCount = Animation_GetLastFrame(sAnimations[animIndex].animation); + frameCount = Animation_GetLastFrame(sAnimationInfo[animIndex].animation); } - Animation_Change(skelAnime, sAnimations[animIndex].animation, sAnimations[animIndex].playSpeed, - sAnimations[animIndex].startFrame, frameCount, sAnimations[animIndex].mode, - sAnimations[animIndex].morphFrames); + Animation_Change(skelAnime, sAnimationInfo[animIndex].animation, sAnimationInfo[animIndex].playSpeed, + sAnimationInfo[animIndex].startFrame, frameCount, sAnimationInfo[animIndex].mode, + sAnimationInfo[animIndex].morphFrames); } return ret; } @@ -274,7 +274,7 @@ void EnIn_DoNothing(EnIn* this, PlayState* play) { void func_808F3618(EnIn* this, PlayState* play) { if (ENIN_GET_PATH(&this->actor) != 0x3F) { - func_808F30B0(&this->skelAnime, 9); + EnIn_ChangeAnim(&this->skelAnime, ENIN_ANIM_9); } if (ENIN_GET_PATH(&this->actor) != 0x3F) { this->actionFunc = func_808F3690; @@ -388,7 +388,7 @@ void func_808F3AD4(EnIn* this, PlayState* play) { this->unk48C = 1; this->actionFunc = func_808F5A94; } else { - func_800B85E0(&this->actor, play, 200.0f, EXCH_ITEM_MINUS1); + func_800B85E0(&this->actor, play, 200.0f, PLAYER_AP_MINUS1); } } @@ -412,7 +412,7 @@ void func_808F3BD4(EnIn* this, PlayState* play) { this->unk48C = 1; this->actionFunc = func_808F5A94; } else { - func_800B85E0(&this->actor, play, 200.0f, EXCH_ITEM_MINUS1); + func_800B85E0(&this->actor, play, 200.0f, PLAYER_AP_MINUS1); } } @@ -436,7 +436,7 @@ void func_808F3CD4(EnIn* this, PlayState* play) { this->unk48C = 1; this->actionFunc = func_808F5A94; } else { - func_800B85E0(&this->actor, play, 200.0f, EXCH_ITEM_MINUS1); + func_800B85E0(&this->actor, play, 200.0f, PLAYER_AP_MINUS1); } } @@ -819,7 +819,7 @@ s32 func_808F4414(PlayState* play, EnIn* this, s32 arg2) { case 0x3475: SET_RACE_FLAGS(RACE_FLAG_START); func_800FD750(NA_BGM_HORSE); - play->nextEntranceIndex = 0xCE50; + play->nextEntrance = ENTRANCE(GORMAN_TRACK, 5); play->transitionType = TRANS_TYPE_05; play->transitionTrigger = TRANS_TRIGGER_START; gSaveContext.save.weekEventReg[57] |= 1; @@ -871,8 +871,8 @@ s32 func_808F4414(PlayState* play, EnIn* this, s32 arg2) { break; case 0x3476: Actor_ContinueText(play, &this->actor, 0x3477); - func_808F30B0(&this->skelAnime, 1); - func_808F30B0(&this->unk4A4->skelAnime, 7); + EnIn_ChangeAnim(&this->skelAnime, ENIN_ANIM_1); + EnIn_ChangeAnim(&this->unk4A4->skelAnime, ENIN_ANIM_7); ret = false; break; case 0x3477: @@ -881,8 +881,8 @@ s32 func_808F4414(PlayState* play, EnIn* this, s32 arg2) { ret = false; break; case 0x347A: - func_808F30B0(&this->skelAnime, 1); - func_808F30B0(&this->unk4A4->skelAnime, 7); + EnIn_ChangeAnim(&this->skelAnime, ENIN_ANIM_1); + EnIn_ChangeAnim(&this->unk4A4->skelAnime, ENIN_ANIM_7); if (INV_CONTENT(ITEM_MASK_GARO) == ITEM_MASK_GARO) { Actor_ContinueText(play, &this->actor, 0x347E); ret = false; @@ -1066,14 +1066,14 @@ s32 func_808F4414(PlayState* play, EnIn* this, s32 arg2) { case 0x3475: SET_RACE_FLAGS(RACE_FLAG_START); func_800FD750(NA_BGM_HORSE); - play->nextEntranceIndex = 0xCE50; + play->nextEntrance = ENTRANCE(GORMAN_TRACK, 5); play->transitionType = TRANS_TYPE_05; play->transitionTrigger = TRANS_TRIGGER_START; gSaveContext.save.weekEventReg[57] |= 1; break; case 0x349D: - func_808F30B0(&this->skelAnime, 1); - func_808F30B0(&this->unk4A4->skelAnime, 7); + EnIn_ChangeAnim(&this->skelAnime, ENIN_ANIM_1); + EnIn_ChangeAnim(&this->unk4A4->skelAnime, ENIN_ANIM_7); if (INV_CONTENT(ITEM_MASK_GARO) == ITEM_MASK_GARO) { Actor_ContinueText(play, &this->actor, 0x34A1); ret = false; @@ -1118,8 +1118,8 @@ s32 func_808F4414(PlayState* play, EnIn* this, s32 arg2) { break; case 0x3499: Actor_ContinueText(play, &this->actor, 0x349A); - func_808F30B0(&this->skelAnime, 1); - func_808F30B0(&this->unk4A4->skelAnime, 7); + EnIn_ChangeAnim(&this->skelAnime, ENIN_ANIM_1); + EnIn_ChangeAnim(&this->unk4A4->skelAnime, ENIN_ANIM_7); ret = false; break; case 0x349A: @@ -1358,7 +1358,7 @@ void EnIn_Init(Actor* thisx, PlayState* play) { Actor_ProcessInitChain(&this->actor, sInitChain); ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 30.0f); SkelAnime_InitFlex(play, &this->skelAnime, &object_in_Skel_014EA8, NULL, this->jointTable, this->morphTable, 20); - func_808F30B0(&this->skelAnime, 0); + EnIn_ChangeAnim(&this->skelAnime, ENIN_ANIM_0); Collider_InitCylinder(play, &this->colliderCylinder); Collider_SetCylinder(play, &this->colliderCylinder, &this->actor, &sCylinderInit); CollisionCheck_SetInfo2(&this->actor.colChkInfo, &sDamageTable, &sColChkInfoInit2); @@ -1395,9 +1395,9 @@ void EnIn_Init(Actor* thisx, PlayState* play) { this->unk23C = 0; D_801BDAA0 = 0; if (GET_RACE_FLAGS == RACE_FLAG_2) { - func_808F30B0(&this->skelAnime, 6); + EnIn_ChangeAnim(&this->skelAnime, ENIN_ANIM_6); } else { - func_808F30B0(&this->skelAnime, 4); + EnIn_ChangeAnim(&this->skelAnime, ENIN_ANIM_4); } if (GET_RACE_FLAGS == RACE_FLAG_2) { this->skelAnime.curFrame = ((Rand_ZeroOne() * 0.6f) + 0.2f) * this->skelAnime.endFrame; @@ -1414,7 +1414,7 @@ void EnIn_Init(Actor* thisx, PlayState* play) { this->unk4AC |= 2; if (type == ENIN_BLUE_SHIRT) { if (func_808F33B8()) { - func_808F30B0(&this->skelAnime, 0); + EnIn_ChangeAnim(&this->skelAnime, ENIN_ANIM_0); this->actionFunc = func_808F5A94; } else { if (gSaveContext.save.weekEventReg[52] & 1) { @@ -1423,7 +1423,7 @@ void EnIn_Init(Actor* thisx, PlayState* play) { this->actor.shape.rot.y, this->actor.shape.rot.z, 0xF); Actor_MarkForDeath(&this->actor); } else { - func_808F30B0(&this->skelAnime, 0); + EnIn_ChangeAnim(&this->skelAnime, ENIN_ANIM_0); this->actionFunc = func_808F5A94; } } @@ -1431,7 +1431,7 @@ void EnIn_Init(Actor* thisx, PlayState* play) { if (gSaveContext.save.weekEventReg[52] & 1) { Actor_MarkForDeath(&this->actor); } else { - func_808F30B0(&this->skelAnime, 7); + EnIn_ChangeAnim(&this->skelAnime, ENIN_ANIM_7); this->actionFunc = func_808F5B58; } } diff --git a/src/overlays/actors/ovl_En_In/z_en_in.h b/src/overlays/actors/ovl_En_In/z_en_in.h index 6c6a2f3dd..1fb9694f6 100644 --- a/src/overlays/actors/ovl_En_In/z_en_in.h +++ b/src/overlays/actors/ovl_En_In/z_en_in.h @@ -15,6 +15,27 @@ typedef enum { /* 4 */ ENIN_BLUE_SHIRT } EnInType; +typedef enum { + /* 0 */ ENIN_ANIM_0, + /* 1 */ ENIN_ANIM_1, + /* 2 */ ENIN_ANIM_2, + /* 3 */ ENIN_ANIM_3, + /* 4 */ ENIN_ANIM_4, + /* 5 */ ENIN_ANIM_5, + /* 6 */ ENIN_ANIM_6, + /* 7 */ ENIN_ANIM_7, + /* 8 */ ENIN_ANIM_8, + /* 9 */ ENIN_ANIM_9, + /* 10 */ ENIN_ANIM_10, + /* 11 */ ENIN_ANIM_11, + /* 12 */ ENIN_ANIM_12, + /* 13 */ ENIN_ANIM_13, + /* 14 */ ENIN_ANIM_14, + /* 15 */ ENIN_ANIM_15, + /* 16 */ ENIN_ANIM_16, + /* 17 */ ENIN_ANIM_17, +} EnInAnimation; + #define ENIN_GET_TYPE(thisx) ((thisx)->params & 0x1FF) #define ENIN_GET_PATH(thisx) (((thisx)->params & 0x7E00) >> 9) // Only used with ENIN_UNK_TYPE diff --git a/src/overlays/actors/ovl_En_Invadepoh/z_en_invadepoh.c b/src/overlays/actors/ovl_En_Invadepoh/z_en_invadepoh.c index 56bf0e0f0..c351f83c6 100644 --- a/src/overlays/actors/ovl_En_Invadepoh/z_en_invadepoh.c +++ b/src/overlays/actors/ovl_En_Invadepoh/z_en_invadepoh.c @@ -1658,10 +1658,10 @@ void func_80B4627C(EnInvadepoh* this, PlayState* play) { func_80B46F88(this); } } else if (D_80B4E940 == 3) { - if (gSaveContext.save.entranceIndex == 0x6460) { + if (gSaveContext.save.entrance == ENTRANCE(ROMANI_RANCH, 6)) { func_80B471C0(this); - } else if (gSaveContext.save.entranceIndex == 0x6470) { + } else if (gSaveContext.save.entrance == ENTRANCE(ROMANI_RANCH, 7)) { func_80B47248(this); } else { func_80B47248(this); @@ -1758,7 +1758,7 @@ void EnInvadepoh_InitRomani(EnInvadepoh* this, PlayState* play) { } } else if (temp != 8) { if (temp == 9) { - if (gSaveContext.save.entranceIndex != 0x6460) { + if (gSaveContext.save.entrance != ENTRANCE(ROMANI_RANCH, 6)) { Actor_MarkForDeath(&this->actor); return; } @@ -1994,7 +1994,7 @@ void func_80B47108(EnInvadepoh* this, PlayState* play) { } this->actionTimer--; if (this->actionTimer <= 0) { - play->nextEntranceIndex = 0x6460; + play->nextEntrance = ENTRANCE(ROMANI_RANCH, 6); gSaveContext.nextCutsceneIndex = 0; play->transitionTrigger = TRANS_TRIGGER_START; play->transitionType = TRANS_TYPE_73; @@ -2012,7 +2012,7 @@ void func_80B471C0(EnInvadepoh* this) { void func_80B471E0(EnInvadepoh* this, PlayState* play) { if (D_80B4E998) { - play->nextEntranceIndex = 0x6470; + play->nextEntrance = ENTRANCE(ROMANI_RANCH, 7); gSaveContext.nextCutsceneIndex = 0; play->transitionTrigger = TRANS_TRIGGER_START; play->transitionType = TRANS_TYPE_72; @@ -2035,7 +2035,7 @@ void func_80B47278(EnInvadepoh* this) { } void func_80B47298(EnInvadepoh* this, PlayState* play) { - play->nextEntranceIndex = 0x6400; + play->nextEntrance = ENTRANCE(ROMANI_RANCH, 0); gSaveContext.nextCutsceneIndex = 0xFFF3; play->transitionTrigger = TRANS_TRIGGER_START; play->transitionType = TRANS_TYPE_72; @@ -3454,7 +3454,7 @@ void func_80B4AF94(EnInvadepoh* this, PlayState* play) { func_80151BB4(play, 5); func_80B4ADB8(this); } else { - func_800B85E0(&this->actor, play, 2000.0f, EXCH_ITEM_MINUS1); + func_800B85E0(&this->actor, play, 2000.0f, PLAYER_AP_MINUS1); } } diff --git a/src/overlays/actors/ovl_En_Ja/z_en_ja.c b/src/overlays/actors/ovl_En_Ja/z_en_ja.c index aa2dce882..f615c05fe 100644 --- a/src/overlays/actors/ovl_En_Ja/z_en_ja.c +++ b/src/overlays/actors/ovl_En_Ja/z_en_ja.c @@ -89,7 +89,7 @@ static ColliderCylinderInit sCylinderInit = { static CollisionCheckInfoInit2 sColChkInfoInit = { 0, 0, 0, 0, MASS_IMMOVABLE }; -static AnimationInfoS sAnimations[] = { +static AnimationInfoS sAnimationInfo[] = { { &object_boj_Anim_002734, 1.0f, 0, -1, 0, 0 }, { &object_boj_Anim_0033B0, 1.0f, 0, -1, 0, 0 }, { &object_boj_Anim_002734, 1.0f, 0, -1, 0, -4 }, { &object_boj_Anim_0033B0, 1.0f, 0, -1, 0, -4 }, { &object_boj_Anim_004078, 1.0f, 0, -1, 0, 0 }, { &object_boj_Anim_005CE4, 1.0f, 0, -1, 0, 0 }, @@ -105,7 +105,7 @@ s32 func_80BC192C(EnJa* this, s32 arg1) { if (arg1 != this->unk_36C) { this->unk_36C = arg1; - ret = SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimations, arg1); + ret = SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimationInfo, arg1); this->unk_344 = this->skelAnime.playSpeed; } @@ -385,7 +385,7 @@ void EnJa_Update(Actor* thisx, PlayState* play) { radius = this->collider.dim.radius + 30; height = this->collider.dim.height + 10; - func_8013C964(&this->actor, play, radius, height, EXCH_ITEM_NONE, this->unk_340 & 7); + func_8013C964(&this->actor, play, radius, height, PLAYER_AP_NONE, this->unk_340 & 7); if (this->unk_1D8.unk_00 != 2) { Actor_MoveWithGravity(&this->actor); diff --git a/src/overlays/actors/ovl_En_Jg/z_en_jg.c b/src/overlays/actors/ovl_En_Jg/z_en_jg.c index add52b0e4..bb5ec72ee 100644 --- a/src/overlays/actors/ovl_En_Jg/z_en_jg.c +++ b/src/overlays/actors/ovl_En_Jg/z_en_jg.c @@ -35,27 +35,27 @@ s32 EnJg_GetStartingConversationTextId(EnJg* this, PlayState* play); void EnJg_CheckIfTalkingToPlayerAndHandleFreezeTimer(EnJg* this, PlayState* play); typedef enum { - /* 0 */ EN_JG_ANIMATION_IDLE, - /* 1 */ EN_JG_ANIMATION_WALK, - /* 2 */ EN_JG_ANIMATION_WAVING, - /* 3 */ EN_JG_ANIMATION_SHAKING_HEAD, - /* 4 */ EN_JG_ANIMATION_SURPRISE_START, - /* 5 */ EN_JG_ANIMATION_SURPRISE_LOOP, - /* 6 */ EN_JG_ANIMATION_ANGRY, - /* 7 */ EN_JG_ANIMATION_FROZEN_START, - /* 8 */ EN_JG_ANIMATION_FROZEN_LOOP, - /* 9 */ EN_JG_ANIMATION_WALK_2, - /* 10 */ EN_JG_ANIMATION_TAKING_OUT_DRUM, - /* 11 */ EN_JG_ANIMATION_DRUM_IDLE, - /* 12 */ EN_JG_ANIMATION_PLAYING_DRUM, - /* 13 */ EN_JG_ANIMATION_THINKING, - /* 14 */ EN_JG_ANIMATION_REMEMBERING, - /* 15 */ EN_JG_ANIMATION_STRONG_REMEMBERING, - /* 16 */ EN_JG_ANIMATION_DEPRESSED, - /* 17 */ EN_JG_ANIMATION_CUTSCENE_IDLE, - /* 18 */ EN_JG_ANIMATION_CRADLE, - /* 19 */ EN_JG_ANIMATION_MAX, -} EnJgAnimationIndex; + /* 0 */ EN_JG_ANIM_IDLE, + /* 1 */ EN_JG_ANIM_WALK, + /* 2 */ EN_JG_ANIM_WAVING, + /* 3 */ EN_JG_ANIM_SHAKING_HEAD, + /* 4 */ EN_JG_ANIM_SURPRISE_START, + /* 5 */ EN_JG_ANIM_SURPRISE_LOOP, + /* 6 */ EN_JG_ANIM_ANGRY, + /* 7 */ EN_JG_ANIM_FROZEN_START, + /* 8 */ EN_JG_ANIM_FROZEN_LOOP, + /* 9 */ EN_JG_ANIM_WALK_2, + /* 10 */ EN_JG_ANIM_TAKING_OUT_DRUM, + /* 11 */ EN_JG_ANIM_DRUM_IDLE, + /* 12 */ EN_JG_ANIM_PLAYING_DRUM, + /* 13 */ EN_JG_ANIM_THINKING, + /* 14 */ EN_JG_ANIM_REMEMBERING, + /* 15 */ EN_JG_ANIM_STRONG_REMEMBERING, + /* 16 */ EN_JG_ANIM_DEPRESSED, + /* 17 */ EN_JG_ANIM_CUTSCENE_IDLE, + /* 18 */ EN_JG_ANIM_CRADLE, + /* 19 */ EN_JG_ANIM_MAX, +} EnJgAnimation; typedef enum { /* 0x0 */ EN_JG_ACTION_FIRST_THAW, @@ -133,7 +133,7 @@ static DamageTable sDamageTable = { /* Powder Keg */ DMG_ENTRY(0, 0x0), }; -static AnimationInfoS sAnimations[] = { +static AnimationInfoS sAnimationInfo[] = { { &gGoronElderIdleAnim, 1.0f, 0, -1, ANIMMODE_LOOP, -10 }, { &gGoronElderWalkAnim, 1.0f, 0, -1, ANIMMODE_LOOP, -10 }, { &gGoronElderWavingAnim, 1.0f, 0, -1, ANIMMODE_LOOP, -10 }, @@ -177,7 +177,7 @@ Actor* EnJg_GetShrineGoronToFocusOn(PlayState* play, u8 focusedShrineGoronParam) while (actorIterator != NULL) { if ((actorIterator->id == ACTOR_EN_S_GORO) && - (EN_S_GORO_GET_PARAM_F(actorIterator) == focusedShrineGoronParam)) { + (EN_S_GORO_GET_MAIN_TYPE(actorIterator) == focusedShrineGoronParam)) { return actorIterator; } @@ -296,20 +296,20 @@ void EnJg_SetupGoronShrineCheer(EnJg* this) { void EnJg_SetupTalk(EnJg* this, PlayState* play) { switch (this->textId) { case 0xDAC: // What was I doing? - this->animationIndex = EN_JG_ANIMATION_SHAKING_HEAD; - SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimations, this->animationIndex); + this->animIndex = EN_JG_ANIM_SHAKING_HEAD; + SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimationInfo, this->animIndex); this->actionFunc = EnJg_Talk; break; case 0xDAD: // I must hurry! - this->animationIndex = EN_JG_ANIMATION_SURPRISE_START; - SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimations, this->animationIndex); + this->animIndex = EN_JG_ANIM_SURPRISE_START; + SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimationInfo, this->animIndex); this->actionFunc = EnJg_AlternateTalkOrWalkInPlace; break; case 0xDB7: // You're Darmani! - this->animationIndex = EN_JG_ANIMATION_SURPRISE_START; - SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimations, this->animationIndex); + this->animIndex = EN_JG_ANIM_SURPRISE_START; + SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimationInfo, this->animIndex); this->actionFunc = EnJg_Talk; break; @@ -319,8 +319,8 @@ void EnJg_SetupTalk(EnJg* this, PlayState* play) { case 0xDBA: // I've been made a fool of! case 0xDBD: // "...What?" case 0xDC4: // It's so cold I can't play - this->animationIndex = EN_JG_ANIMATION_IDLE; - SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimations, this->animationIndex); + this->animIndex = EN_JG_ANIM_IDLE; + SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimationInfo, this->animIndex); this->actionFunc = EnJg_Talk; break; @@ -328,15 +328,15 @@ void EnJg_SetupTalk(EnJg* this, PlayState* play) { case 0xDBB: // If I can see past the illusion, you'll vanish case 0xDBC: // Following me won't do you any good case 0xDC6: // I am counting on you - this->animationIndex = EN_JG_ANIMATION_ANGRY; - SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimations, this->animationIndex); + this->animIndex = EN_JG_ANIM_ANGRY; + SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimationInfo, this->animIndex); this->actionFunc = EnJg_Talk; break; case 0xDB4: // This is our problem (first) case 0xDB5: // This is our problem (repeat) - this->animationIndex = EN_JG_ANIMATION_WAVING; - SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimations, this->animationIndex); + this->animIndex = EN_JG_ANIM_WAVING; + SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimationInfo, this->animIndex); this->actionFunc = EnJg_Talk; break; } @@ -417,23 +417,23 @@ void EnJg_GoronShrineCheer(EnJg* this, PlayState* play) { void EnJg_AlternateTalkOrWalkInPlace(EnJg* this, PlayState* play) { u8 talkState = Message_GetState(&play->msgCtx); s16 currentFrame = this->skelAnime.curFrame; - s16 lastFrame = Animation_GetLastFrame(sAnimations[this->animationIndex].animation); + s16 lastFrame = Animation_GetLastFrame(sAnimationInfo[this->animIndex].animation); - if (this->animationIndex == EN_JG_ANIMATION_SURPRISE_START) { + if (this->animIndex == EN_JG_ANIM_SURPRISE_START) { if (currentFrame == lastFrame) { - this->animationIndex = EN_JG_ANIMATION_SURPRISE_LOOP; - SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimations, this->animationIndex); + this->animIndex = EN_JG_ANIM_SURPRISE_LOOP; + SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimationInfo, this->animIndex); } - } else if (this->animationIndex == EN_JG_ANIMATION_SURPRISE_LOOP) { + } else if (this->animIndex == EN_JG_ANIM_SURPRISE_LOOP) { if ((talkState == TEXT_STATE_5) && Message_ShouldAdvance(play)) { play->msgCtx.msgMode = 0x43; play->msgCtx.stateTimer = 4; this->flags &= ~FLAG_LOOKING_AT_PLAYER; - this->animationIndex = EN_JG_ANIMATION_WALK; - SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimations, this->animationIndex); + this->animIndex = EN_JG_ANIM_WALK; + SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimationInfo, this->animIndex); this->actionFunc = EnJg_Walk; } - } else if (this->animationIndex == EN_JG_ANIMATION_WALK) { + } else if (this->animIndex == EN_JG_ANIM_WALK) { Math_ApproachF(&this->actor.speedXZ, 0.0f, 0.2f, 1.0f); EnJg_CheckIfTalkingToPlayerAndHandleFreezeTimer(this, play); } @@ -455,7 +455,7 @@ void EnJg_Walk(EnJg* this, PlayState* play) { if (EnJg_ReachedPoint(this, this->path, this->currentPoint)) { if (this->currentPoint >= (this->path->count - 1)) { // Force the elder to walk in place - this->animationIndex = EN_JG_ANIMATION_WALK; + this->animIndex = EN_JG_ANIM_WALK; this->actionFunc = EnJg_AlternateTalkOrWalkInPlace; } else { this->currentPoint++; @@ -472,12 +472,12 @@ void EnJg_Walk(EnJg* this, PlayState* play) { void EnJg_Talk(EnJg* this, PlayState* play) { u8 talkState = Message_GetState(&play->msgCtx); s16 currentFrame = this->skelAnime.curFrame; - s16 lastFrame = Animation_GetLastFrame(sAnimations[this->animationIndex].animation); + s16 lastFrame = Animation_GetLastFrame(sAnimationInfo[this->animIndex].animation); u16 temp; - if ((this->animationIndex == EN_JG_ANIMATION_SURPRISE_START) && (currentFrame == lastFrame)) { - this->animationIndex = EN_JG_ANIMATION_SURPRISE_LOOP; - SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimations, this->animationIndex); + if ((this->animIndex == EN_JG_ANIM_SURPRISE_START) && (currentFrame == lastFrame)) { + this->animIndex = EN_JG_ANIM_SURPRISE_LOOP; + SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimationInfo, this->animIndex); } if ((talkState == TEXT_STATE_5) && Message_ShouldAdvance(play)) { @@ -529,10 +529,10 @@ void EnJg_Talk(EnJg* this, PlayState* play) { } void EnJg_SetupWalk(EnJg* this, PlayState* play) { - if (this->animationIndex != EN_JG_ANIMATION_WALK) { - this->animationIndex = EN_JG_ANIMATION_WALK; + if (this->animIndex != EN_JG_ANIM_WALK) { + this->animIndex = EN_JG_ANIM_WALK; this->freezeTimer = 1000; - SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimations, this->animationIndex); + SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimationInfo, this->animIndex); this->actionFunc = EnJg_Walk; } else { this->freezeTimer = 1000; @@ -542,7 +542,7 @@ void EnJg_SetupWalk(EnJg* this, PlayState* play) { void EnJg_Freeze(EnJg* this, PlayState* play) { s16 currentFrame = this->skelAnime.curFrame; - s16 lastFrame = Animation_GetLastFrame(sAnimations[this->animationIndex].animation); + s16 lastFrame = Animation_GetLastFrame(sAnimationInfo[this->animIndex].animation); if (this->action == EN_JG_ACTION_SPAWNING) { this->action = EN_JG_ACTION_FROZEN_OR_NON_FIRST_THAW; @@ -551,18 +551,18 @@ void EnJg_Freeze(EnJg* this, PlayState* play) { this->icePoly = Actor_Spawn(&play->actorCtx, play, ACTOR_OBJ_ICE_POLY, this->actor.world.pos.x, this->actor.world.pos.y, this->actor.world.pos.z, this->actor.world.rot.x, this->actor.world.rot.y, this->actor.world.rot.z, 0xFF50); - this->animationIndex = EN_JG_ANIMATION_FROZEN_LOOP; - SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimations, this->animationIndex); + this->animIndex = EN_JG_ANIM_FROZEN_LOOP; + SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimationInfo, this->animIndex); this->actionFunc = EnJg_FrozenIdle; - } else if (this->animationIndex == EN_JG_ANIMATION_FROZEN_START) { + } else if (this->animIndex == EN_JG_ANIM_FROZEN_START) { this->action = EN_JG_ACTION_FROZEN_OR_NON_FIRST_THAW; if (currentFrame == lastFrame) { this->freezeTimer = 1000; this->icePoly = Actor_Spawn(&play->actorCtx, play, ACTOR_OBJ_ICE_POLY, this->actor.world.pos.x, this->actor.world.pos.y, this->actor.world.pos.z, this->actor.world.rot.x, this->actor.world.rot.y, this->actor.world.rot.z, 0xFF50); - this->animationIndex = EN_JG_ANIMATION_FROZEN_LOOP; - SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimations, this->animationIndex); + this->animIndex = EN_JG_ANIM_FROZEN_LOOP; + SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimationInfo, this->animIndex); this->actionFunc = EnJg_FrozenIdle; } } @@ -571,20 +571,20 @@ void EnJg_Freeze(EnJg* this, PlayState* play) { void EnJg_FrozenIdle(EnJg* this, PlayState* play) { if (this->icePoly->update == NULL) { this->icePoly = NULL; - if (this->animationIndex == EN_JG_ANIMATION_FROZEN_LOOP) { + if (this->animIndex == EN_JG_ANIM_FROZEN_LOOP) { if (Animation_OnFrame(&this->skelAnime, 0.0f)) { - this->animationIndex = EN_JG_ANIMATION_IDLE; + this->animIndex = EN_JG_ANIM_IDLE; // If you've never talked to the elder before, he stands // around idle until you've talked to him at least once. // Otherwise, he immediately begins walking after being // thawed out. if (this->textId == 0xDAC) { - SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimations, this->animationIndex); + SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimationInfo, this->animIndex); this->actionFunc = EnJg_Idle; } else { this->freezeTimer = 1000; - SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimations, this->animationIndex); + SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimationInfo, this->animIndex); this->actionFunc = EnJg_Walk; } } @@ -630,7 +630,7 @@ void EnJg_LullabyIntroCutsceneAction(EnJg* this, PlayState* play) { switch (play->csCtx.actorActions[actionIndex]->action) { case 1: - this->cutsceneAnimationIndex = EN_JG_ANIMATION_CUTSCENE_IDLE; + this->cutsceneAnimIndex = EN_JG_ANIM_CUTSCENE_IDLE; if (this->drum != NULL) { Actor_MarkForDeath(this->drum); this->drum = NULL; @@ -638,50 +638,50 @@ void EnJg_LullabyIntroCutsceneAction(EnJg* this, PlayState* play) { break; case 2: - this->cutsceneAnimationIndex = EN_JG_ANIMATION_TAKING_OUT_DRUM; + this->cutsceneAnimIndex = EN_JG_ANIM_TAKING_OUT_DRUM; break; case 3: - this->cutsceneAnimationIndex = EN_JG_ANIMATION_DRUM_IDLE; + this->cutsceneAnimIndex = EN_JG_ANIM_DRUM_IDLE; break; case 4: - this->cutsceneAnimationIndex = EN_JG_ANIMATION_PLAYING_DRUM; + this->cutsceneAnimIndex = EN_JG_ANIM_PLAYING_DRUM; break; case 5: - this->cutsceneAnimationIndex = EN_JG_ANIMATION_THINKING; + this->cutsceneAnimIndex = EN_JG_ANIM_THINKING; break; case 6: - this->cutsceneAnimationIndex = EN_JG_ANIMATION_REMEMBERING; + this->cutsceneAnimIndex = EN_JG_ANIM_REMEMBERING; break; case 7: - this->cutsceneAnimationIndex = EN_JG_ANIMATION_STRONG_REMEMBERING; + this->cutsceneAnimIndex = EN_JG_ANIM_STRONG_REMEMBERING; break; case 8: - this->cutsceneAnimationIndex = EN_JG_ANIMATION_DEPRESSED; + this->cutsceneAnimIndex = EN_JG_ANIM_DEPRESSED; break; case 9: - this->cutsceneAnimationIndex = EN_JG_ANIMATION_CRADLE; + this->cutsceneAnimIndex = EN_JG_ANIM_CRADLE; break; default: - this->cutsceneAnimationIndex = EN_JG_ANIMATION_IDLE; + this->cutsceneAnimIndex = EN_JG_ANIM_IDLE; break; } - SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimations, this->cutsceneAnimationIndex); + SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimationInfo, this->cutsceneAnimIndex); } if ((!(this->flags & FLAG_DRUM_SPAWNED)) && - (((this->cutsceneAnimationIndex == EN_JG_ANIMATION_TAKING_OUT_DRUM) && - (Animation_OnFrame(&this->skelAnime, 14.0f)) && (this->action != EN_JG_ACTION_LULLABY_INTRO_CS)) || - (((this->cutsceneAnimationIndex == EN_JG_ANIMATION_DRUM_IDLE) || - (this->cutsceneAnimationIndex == EN_JG_ANIMATION_PLAYING_DRUM)) && + (((this->cutsceneAnimIndex == EN_JG_ANIM_TAKING_OUT_DRUM) && (Animation_OnFrame(&this->skelAnime, 14.0f)) && + (this->action != EN_JG_ACTION_LULLABY_INTRO_CS)) || + (((this->cutsceneAnimIndex == EN_JG_ANIM_DRUM_IDLE) || + (this->cutsceneAnimIndex == EN_JG_ANIM_PLAYING_DRUM)) && (this->action == EN_JG_ACTION_LULLABY_INTRO_CS)))) { this->flags |= FLAG_DRUM_SPAWNED; this->drum = Actor_SpawnAsChildAndCutscene( @@ -690,7 +690,7 @@ void EnJg_LullabyIntroCutsceneAction(EnJg* this, PlayState* play) { this->actor.params, this->actor.cutscene, this->actor.unk20, NULL); } - if (this->cutsceneAnimationIndex == EN_JG_ANIMATION_TAKING_OUT_DRUM) { + if (this->cutsceneAnimIndex == EN_JG_ANIM_TAKING_OUT_DRUM) { if (Animation_OnFrame(&this->skelAnime, 23.0f)) { Audio_PlaySfxAtPos(&sSfxPos, NA_SE_EV_WOOD_BOUND_S); } else if (Animation_OnFrame(&this->skelAnime, 38.0f)) { @@ -899,7 +899,7 @@ void EnJg_SpawnBreath(EnJg* this, PlayState* play) { */ void EnJg_CheckIfTalkingToPlayerAndHandleFreezeTimer(EnJg* this, PlayState* play) { s16 currentFrame = this->skelAnime.curFrame; - s16 lastFrame = Animation_GetLastFrame(sAnimations[this->animationIndex].animation); + s16 lastFrame = Animation_GetLastFrame(sAnimationInfo[this->animIndex].animation); if (Actor_ProcessTalkRequest(&this->actor, &play->state)) { this->flags |= FLAG_LOOKING_AT_PLAYER; @@ -925,8 +925,8 @@ void EnJg_CheckIfTalkingToPlayerAndHandleFreezeTimer(EnJg* this, PlayState* play this->freezeTimer--; if ((this->freezeTimer <= 0) && (currentFrame == lastFrame)) { - this->animationIndex = EN_JG_ANIMATION_FROZEN_START; - SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimations, this->animationIndex); + this->animIndex = EN_JG_ANIM_FROZEN_START; + SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimationInfo, this->animIndex); Audio_PlaySfxAtPos(&sSfxPos, NA_SE_EV_FREEZE_S); this->actionFunc = EnJg_Freeze; } @@ -951,25 +951,25 @@ void EnJg_Init(Actor* thisx, PlayState* play) { if ((play->sceneNum == SCENE_SPOT00) && (gSaveContext.sceneSetupIndex == 7) && (play->csCtx.currentCsIndex == 0)) { // This is the elder that appears in the cutscene for learning the full Goron Lullaby. - this->animationIndex = EN_JG_ANIMATION_IDLE; + this->animIndex = EN_JG_ANIM_IDLE; this->action = EN_JG_ACTION_LULLABY_INTRO_CS; - SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimations, this->animationIndex); + SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimationInfo, this->animIndex); this->actionFunc = EnJg_LullabyIntroCutsceneAction; } else { // This is the elder that appears in Mountain Village or the Path to Goron Village in winter. this->path = SubS_GetPathByIndex(play, EN_JG_GET_PATH(thisx), 0x3F); - this->animationIndex = EN_JG_ANIMATION_SURPRISE_START; + this->animIndex = EN_JG_ANIM_SURPRISE_START; this->action = EN_JG_ACTION_SPAWNING; this->freezeTimer = 1000; this->textId = 0xDAC; // What was I doing? - SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimations, this->animationIndex); + SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimationInfo, this->animIndex); this->actionFunc = EnJg_Freeze; } } else { // This is the elder that appears in Goron Shrine in spring. - this->animationIndex = EN_JG_ANIMATION_IDLE; + this->animIndex = EN_JG_ANIM_IDLE; this->cutscene = this->actor.cutscene; - SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimations, this->animationIndex); + SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimationInfo, this->animIndex); this->actionFunc = EnJg_GoronShrineIdle; } } diff --git a/src/overlays/actors/ovl_En_Jg/z_en_jg.h b/src/overlays/actors/ovl_En_Jg/z_en_jg.h index f225b51f7..8564f8ad1 100644 --- a/src/overlays/actors/ovl_En_Jg/z_en_jg.h +++ b/src/overlays/actors/ovl_En_Jg/z_en_jg.h @@ -26,14 +26,14 @@ typedef struct EnJg { /* 0x1F8 */ Vec3s jointTable[GORON_ELDER_LIMB_MAX]; /* 0x2CA */ Vec3s morphTable[GORON_ELDER_LIMB_MAX]; /* 0x39C */ s16 rootRotationWhenTalking; - /* 0x39E */ s16 animationIndex; + /* 0x39E */ s16 animIndex; /* 0x3A0 */ s16 action; /* 0x3A2 */ s16 freezeTimer; /* 0x3A4 */ Vec3f breathPos; /* 0x3B0 */ Vec3f breathVelocity; /* 0x3BC */ Vec3f breathAccel; /* 0x3C8 */ s16 cutscene; - /* 0x3CA */ u8 cutsceneAnimationIndex; + /* 0x3CA */ u8 cutsceneAnimIndex; /* 0x3CB */ u8 csAction; /* 0x3CC */ u16 flags; /* 0x3CE */ u16 textId; diff --git a/src/overlays/actors/ovl_En_Jgame_Tsn/z_en_jgame_tsn.c b/src/overlays/actors/ovl_En_Jgame_Tsn/z_en_jgame_tsn.c index 24f9e202f..206e9e5e5 100644 --- a/src/overlays/actors/ovl_En_Jgame_Tsn/z_en_jgame_tsn.c +++ b/src/overlays/actors/ovl_En_Jgame_Tsn/z_en_jgame_tsn.c @@ -48,7 +48,7 @@ const ActorInit En_Jgame_Tsn_InitVars = { (ActorFunc)EnJgameTsn_Draw, }; -static AnimationInfo sAnimations[] = { +static AnimationInfo sAnimationInfo[] = { { &object_tsn_Anim_0092FC, 1.0f, 0.0f, 0.0f, ANIMMODE_LOOP, -6.0f }, { &object_tsn_Anim_000964, 1.0f, 0.0f, 0.0f, ANIMMODE_LOOP, -6.0f }, { &object_tsn_Anim_001198, 1.0f, 0.0f, 0.0f, ANIMMODE_LOOP, -6.0f }, @@ -94,7 +94,7 @@ void EnJgameTsn_Init(Actor* thisx, PlayState* play) { this->actor.colChkInfo.mass = MASS_IMMOVABLE; this->actor.velocity.y = 0.0f; - if (gSaveContext.save.entranceIndex == 0x68D0) { + if (gSaveContext.save.entrance == ENTRANCE(GREAT_BAY_COAST, 13)) { this->actor.flags |= ACTOR_FLAG_10000; } @@ -145,7 +145,7 @@ void EnJgameTsn_Destroy(Actor* thisx, PlayState* play) { } void func_80C13B74(EnJgameTsn* this) { - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, 0); + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, 0); this->actionFunc = func_80C13BB8; } @@ -156,15 +156,15 @@ void func_80C13BB8(EnJgameTsn* this, PlayState* play) { if (this->actor.flags & ACTOR_FLAG_10000) { this->actor.flags &= ~ACTOR_FLAG_10000; if (gSaveContext.eventTimer1Value[TIMER_ID_4] > 0) { - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, 1); + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, 1); Message_StartTextbox(play, 0x10A2, &this->actor); this->unk_300 = 0x10A2; } else if (gSaveContext.minigameScore < 20) { - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, 1); + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, 1); Message_StartTextbox(play, 0x10A2, &this->actor); this->unk_300 = 0x10A2; } else { - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, 2); + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, 2); Message_StartTextbox(play, 0x10A3, &this->actor); this->unk_300 = 0x10A3; } @@ -174,11 +174,11 @@ void func_80C13BB8(EnJgameTsn* this, PlayState* play) { this->unk_300 = 0x1094; } else if (this->unk_2F8 == 0) { this->unk_2F8 = 1; - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, 1); + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, 1); Message_StartTextbox(play, 0x1095, &this->actor); this->unk_300 = 0x1095; } else { - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, 1); + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, 1); Message_StartTextbox(play, 0x1096, &this->actor); this->unk_300 = 0x1096; } @@ -211,11 +211,11 @@ void func_80C13E90(EnJgameTsn* this, PlayState* play) { this->actor.flags &= ~ACTOR_FLAG_10000; if (((gSaveContext.save.time > CLOCK_TIME(4, 0)) && (gSaveContext.save.time < CLOCK_TIME(7, 0))) || ((gSaveContext.save.time > CLOCK_TIME(16, 0)) && (gSaveContext.save.time < CLOCK_TIME(19, 0)))) { - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, 2); + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, 2); Message_StartTextbox(play, 0x1094, &this->actor); this->unk_300 = 0x1094; } else { - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, 1); + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, 1); Message_StartTextbox(play, 0x1098, &this->actor); this->unk_300 = 0x1098; } @@ -335,7 +335,7 @@ void func_80C14230(EnJgameTsn* this, PlayState* play) { this->unk_2FC++; if ((player->actor.bgCheckFlags & 2) && func_80C149B0(play, &this->unk_200)) { - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, 2); + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, 2); Message_StartTextbox(play, 0x109F, &this->actor); this->unk_300 = 0x109F; player->stateFlags1 |= 0x20; @@ -343,7 +343,7 @@ void func_80C14230(EnJgameTsn* this, PlayState* play) { func_801A2C20(); func_80C14030(this); } else if ((player->actor.bgCheckFlags & 0x40) || (player->actor.bgCheckFlags & 0x20)) { - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, 2); + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, 2); Message_StartTextbox(play, 0x10A0, &this->actor); this->unk_300 = 0x10A0; player->stateFlags1 |= 0x20; @@ -367,7 +367,7 @@ void func_80C144E4(EnJgameTsn* this) { } void func_80C144F8(EnJgameTsn* this, PlayState* play) { - play->nextEntranceIndex = 0x68D0; + play->nextEntrance = ENTRANCE(GREAT_BAY_COAST, 13); play->transitionTrigger = TRANS_TRIGGER_START; play->transitionType = TRANS_TYPE_80; gSaveContext.nextTransitionType = TRANS_TYPE_03; @@ -412,12 +412,12 @@ void func_80C14684(EnJgameTsn* this, PlayState* play) { this->unk_300 = 0x109E; Rupees_ChangeBy(-20); } else { - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, 2); + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, 2); Message_StartTextbox(play, 0x109D, &this->actor); this->unk_300 = 0x109D; } } else { - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, 2); + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, 2); Message_StartTextbox(play, 0x109C, &this->actor); this->unk_300 = 0x109C; } @@ -460,7 +460,7 @@ void func_80C147B4(EnJgameTsn* this, PlayState* play) { break; case 0x109A: - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, 0); + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, 0); Message_StartTextbox(play, 0x109B, &this->actor); this->unk_300 = 0x109B; break; diff --git a/src/overlays/actors/ovl_En_Kakasi/z_en_kakasi.c b/src/overlays/actors/ovl_En_Kakasi/z_en_kakasi.c index 119131d48..72eafa283 100644 --- a/src/overlays/actors/ovl_En_Kakasi/z_en_kakasi.c +++ b/src/overlays/actors/ovl_En_Kakasi/z_en_kakasi.c @@ -122,15 +122,15 @@ typedef enum { /* 0x6 */ ENKAKASI_ANIM_WAVE, // "wave" short sideways shake, stops early, partial? unused? /* 0x7 */ ENKAKASI_ANIM_SLOWROLL, // partial bounch, ends looking left, OFFER anim takes over /* 0x8 */ ENKAKASI_ANIM_IDLE, // slow stretching wiggle, ends in regular position -} EnKakasi_Animations; +} EnKakasiAnimation; -static AnimationHeader* kakasiAnimations[] = { +static AnimationHeader* sAnimations[] = { &object_ka_Anim_007444, &object_ka_Anim_00686C, &object_ka_Anim_0081A4, &object_ka_Anim_007B90, &object_ka_Anim_0071EC, &object_ka_Anim_007444, &object_ka_Anim_00686C, &object_ka_Anim_0081A4, &object_ka_Anim_000214, }; -static u8 sAnimModes[] = { +static u8 sAnimationModes[] = { ANIMMODE_LOOP, ANIMMODE_LOOP, ANIMMODE_LOOP, ANIMMODE_ONCE, ANIMMODE_ONCE, ANIMMODE_ONCE, ANIMMODE_ONCE, ANIMMODE_ONCE, ANIMMODE_ONCE, }; @@ -195,12 +195,12 @@ void EnKakasi_Init(Actor* thisx, PlayState* play) { } } -void EnKakasi_SetAnimation(EnKakasi* this, s32 index) { - this->animIndex = index; - this->animeFrameCount = Animation_GetLastFrame(&kakasiAnimations[this->animIndex]->common); +void EnKakasi_ChangeAnim(EnKakasi* this, s32 animIndex) { + this->animIndex = animIndex; + this->animeFrameCount = Animation_GetLastFrame(&sAnimations[this->animIndex]->common); // 1: regular playback speed, 0: starting frame - Animation_Change(&this->skelanime, kakasiAnimations[this->animIndex], 1.0f, 0.0f, this->animeFrameCount, - sAnimModes[this->animIndex], -4.0f); + Animation_Change(&this->skelanime, sAnimations[this->animIndex], 1.0f, 0.0f, this->animeFrameCount, + sAnimationModes[this->animIndex], -4.0f); } s32 EnKakasi_ValidatePictograph(PlayState* play, Actor* thisx) { @@ -280,7 +280,7 @@ void func_8096FBB8(EnKakasi* this, PlayState* play) { this->unk190++; } if (this->unk190 != 0 && this->animIndex != ENKAKASI_ANIM_SIDEWAYS_SHAKING) { - EnKakasi_SetAnimation(this, ENKAKASI_ANIM_SIDEWAYS_SHAKING); + EnKakasi_ChangeAnim(this, ENKAKASI_ANIM_SIDEWAYS_SHAKING); } if (this->unk190 > 8) { this->unk190 = 8; @@ -292,7 +292,7 @@ void func_8096FBB8(EnKakasi* this, PlayState* play) { } void EnKakasi_InitTimeSkipDialogue(EnKakasi* this) { - EnKakasi_SetAnimation(this, ENKAKASI_ANIM_SLOWROLL); + EnKakasi_ChangeAnim(this, ENKAKASI_ANIM_SLOWROLL); this->actionFunc = EnKakasi_TimeSkipDialogue; } @@ -351,21 +351,21 @@ void EnKakasi_IdleStanding(EnKakasi* this, PlayState* play) { if (this->picto.actor.projectedPos.z > -20.0f && x > 0 && x < SCREEN_WIDTH && y > 0 && y < SCREEN_HEIGHT && this->animIndex != ENKAKASI_ANIM_SIDEWAYS_SHAKING) { // faster shaking - EnKakasi_SetAnimation(this, ENKAKASI_ANIM_SIDEWAYS_SHAKING); + EnKakasi_ChangeAnim(this, ENKAKASI_ANIM_SIDEWAYS_SHAKING); this->skelanime.playSpeed = 2.0f; } } else if (Player_GetMask(play) == PLAYER_MASK_KAMARO) { if (this->animIndex != ENKAKASI_ANIM_SIDEWAYS_SHAKING) { - EnKakasi_SetAnimation(this, ENKAKASI_ANIM_SIDEWAYS_SHAKING); + EnKakasi_ChangeAnim(this, ENKAKASI_ANIM_SIDEWAYS_SHAKING); this->skelanime.playSpeed = 2.0f; } } else if (saveContextDay == 3 && gSaveContext.save.isNight) { this->skelanime.playSpeed = 1.0f; if (this->animIndex != ENKAKASI_ANIM_SIDEWAYS_SHAKING) { - EnKakasi_SetAnimation(this, 1); + EnKakasi_ChangeAnim(this, 1); } } else if (this->animIndex != ENKAKASI_ANIM_IDLE) { - EnKakasi_SetAnimation(this, ENKAKASI_ANIM_IDLE); + EnKakasi_ChangeAnim(this, ENKAKASI_ANIM_IDLE); } if (this->picto.actor.xzDistToPlayer < 120.0f) { func_800B8614(&this->picto.actor, play, 100.0f); @@ -376,12 +376,12 @@ void EnKakasi_IdleStanding(EnKakasi* this, PlayState* play) { void EnKakasi_SetupDialogue(EnKakasi* this) { // bug? starts one animation then changes it a few lines down? if (this->animIndex != ENKAKASI_ANIM_SIDEWAYS_SHAKING) { - EnKakasi_SetAnimation(this, ENKAKASI_ANIM_SIDEWAYS_SHAKING); + EnKakasi_ChangeAnim(this, ENKAKASI_ANIM_SIDEWAYS_SHAKING); } this->talkState = TEXT_STATE_5; this->unkState196 = 1; - EnKakasi_SetAnimation(this, ENKAKASI_ANIM_SPIN_REACH_OFFER); + EnKakasi_ChangeAnim(this, ENKAKASI_ANIM_SPIN_REACH_OFFER); this->actionFunc = EnKakasi_RegularDialogue; } @@ -394,7 +394,7 @@ void EnKakasi_RegularDialogue(EnKakasi* this, PlayState* play) { if (this->picto.actor.textId != 0x1644 && this->animeFrameCount <= currentAnimeFrame && this->animIndex == ENKAKASI_ANIM_SLOWROLL) { - EnKakasi_SetAnimation(this, ENKAKASI_ANIM_SPIN_REACH_OFFER); + EnKakasi_ChangeAnim(this, ENKAKASI_ANIM_SPIN_REACH_OFFER); this->unkCounter1A4 = 0; } @@ -403,7 +403,7 @@ void EnKakasi_RegularDialogue(EnKakasi* this, PlayState* play) { if (this->animeFrameCount <= currentAnimeFrame && this->animIndex != ENKAKASI_ANIM_SPIN_REACH_OFFER) { if (++this->unkCounter1A4 >= 2) { this->unkCounter1A4 = 0; - EnKakasi_SetAnimation(this, ENKAKASI_ANIM_SPIN_REACH_OFFER); + EnKakasi_ChangeAnim(this, ENKAKASI_ANIM_SPIN_REACH_OFFER); } } } @@ -426,7 +426,7 @@ void EnKakasi_RegularDialogue(EnKakasi* this, PlayState* play) { u32 saveContextDay2 = gSaveContext.save.day; if (this->animIndex != ENKAKASI_ANIM_SIDEWAYS_SHAKING) { - EnKakasi_SetAnimation(this, ENKAKASI_ANIM_SIDEWAYS_SHAKING); + EnKakasi_ChangeAnim(this, ENKAKASI_ANIM_SIDEWAYS_SHAKING); } if (saveContextDay2 == 3 && gSaveContext.save.isNight) { @@ -465,13 +465,13 @@ void EnKakasi_RegularDialogue(EnKakasi* this, PlayState* play) { } else if (this->picto.actor.textId == 0x1645 || this->picto.actor.textId == 0x164E) { this->picto.actor.textId = 0x1650; // "Shall we dance? No Yes" if (this->animIndex != ENKAKASI_ANIM_SIDEWAYS_SHAKING) { - EnKakasi_SetAnimation(this, ENKAKASI_ANIM_SIDEWAYS_SHAKING); + EnKakasi_ChangeAnim(this, ENKAKASI_ANIM_SIDEWAYS_SHAKING); } this->talkState = TEXT_STATE_CHOICE; } else if (this->picto.actor.textId == 0x1644) { if (this->animIndex != ENKAKASI_ANIM_SIDEWAYS_SHAKING) { - EnKakasi_SetAnimation(this, ENKAKASI_ANIM_SIDEWAYS_SHAKING); + EnKakasi_ChangeAnim(this, ENKAKASI_ANIM_SIDEWAYS_SHAKING); } if (gSaveContext.save.isNight) { this->picto.actor.textId = 0x164E; @@ -481,12 +481,12 @@ void EnKakasi_RegularDialogue(EnKakasi* this, PlayState* play) { } else if (this->picto.actor.textId == 0x164F) { if (this->animIndex != ENKAKASI_ANIM_SIDEWAYS_SHAKING) { - EnKakasi_SetAnimation(this, ENKAKASI_ANIM_SIDEWAYS_SHAKING); + EnKakasi_ChangeAnim(this, ENKAKASI_ANIM_SIDEWAYS_SHAKING); } this->picto.actor.textId = 0x165A; } else if (this->picto.actor.textId == 0x1651) { if (this->animIndex != ENKAKASI_ANIM_SIDEWAYS_SHAKING) { - EnKakasi_SetAnimation(this, ENKAKASI_ANIM_SIDEWAYS_SHAKING); + EnKakasi_ChangeAnim(this, ENKAKASI_ANIM_SIDEWAYS_SHAKING); } this->picto.actor.textId = 0x1654; } else if (this->picto.actor.textId == 0x1654) { @@ -522,7 +522,7 @@ void EnKakasi_RegularDialogue(EnKakasi* this, PlayState* play) { } else { this->picto.actor.textId = 0x1652; } - EnKakasi_SetAnimation(this, ENKAKASI_ANIM_HOPPING_REGULAR); + EnKakasi_ChangeAnim(this, ENKAKASI_ANIM_HOPPING_REGULAR); } else { func_8019F230(); if (this->picto.actor.textId == 0x1656) { // would you like to learn a song? yes/no @@ -534,7 +534,7 @@ void EnKakasi_RegularDialogue(EnKakasi* this, PlayState* play) { } this->unkCounter1A4 = 0; if (this->animIndex != ENKAKASI_ANIM_ARMS_CROSSED_ROCKING) { - EnKakasi_SetAnimation(this, ENKAKASI_ANIM_ARMS_CROSSED_ROCKING); + EnKakasi_ChangeAnim(this, ENKAKASI_ANIM_ARMS_CROSSED_ROCKING); } } } @@ -548,7 +548,7 @@ void EnKakasi_SetupSongTeach(EnKakasi* this, PlayState* play) { this->subCamId = SUB_CAM_ID_DONE; this->subCamFov = 0.0f; this->subCamFovNext = 60.0f; - EnKakasi_SetAnimation(this, ENKAKASI_ANIM_TWIRL); + EnKakasi_ChangeAnim(this, ENKAKASI_ANIM_TWIRL); this->unkState196 = 2; this->actionFunc = EnKakasi_OcarinaRemark; } @@ -627,13 +627,13 @@ void EnKakasi_TeachingSong(EnKakasi* this, PlayState* play) { this->picto.actor.textId = 0x1647; this->unkState1A8 = 2; this->talkState = TEXT_STATE_5; - EnKakasi_SetAnimation(this, ENKAKASI_ANIM_ARMS_CROSSED_ROCKING); + EnKakasi_ChangeAnim(this, ENKAKASI_ANIM_ARMS_CROSSED_ROCKING); this->actionFunc = EnKakasi_RegularDialogue; } else if (play->msgCtx.ocarinaMode == 3) { // song success this->postTeachTimer = 30; this->skelanime.playSpeed = 2.0f; - EnKakasi_SetAnimation(this, ENKAKASI_ANIM_HOPPING_REGULAR); + EnKakasi_ChangeAnim(this, ENKAKASI_ANIM_HOPPING_REGULAR); this->actionFunc = EnKakasi_PostSongLearnTwirl; } } @@ -643,7 +643,7 @@ void EnKakasi_PostSongLearnTwirl(EnKakasi* this, PlayState* play) { f32 animeFrame = this->skelanime.curFrame; if (this->postTeachTimer == 0 && this->animIndex != ENKAKASI_ANIM_TWIRL) { - EnKakasi_SetAnimation(this, ENKAKASI_ANIM_TWIRL); + EnKakasi_ChangeAnim(this, ENKAKASI_ANIM_TWIRL); this->skelanime.playSpeed = 2.0f; } if (this->postTeachTimer == 0 && this->animIndex == ENKAKASI_ANIM_TWIRL && this->animeFrameCount <= animeFrame) { @@ -656,7 +656,7 @@ void EnKakasi_SetupPostSongLearnDialogue(EnKakasi* this, PlayState* play) { play->msgCtx.ocarinaMode = 4; this->unk190 = 0; this->unkCounter1A4 = 0; - EnKakasi_SetAnimation(this, ENKAKASI_ANIM_HOPPING_REGULAR); + EnKakasi_ChangeAnim(this, ENKAKASI_ANIM_HOPPING_REGULAR); this->subCamId = SUB_CAM_ID_DONE; this->talkState = TEXT_STATE_5; this->unkState1A8 = 1; @@ -686,7 +686,7 @@ void EnKakasi_PostSongLearnDialogue(EnKakasi* this, PlayState* play) { this->animeFrameCount <= tempAnimFrame) { this->unkCounter1A4++; if (this->unkCounter1A4 >= 2) { - EnKakasi_SetAnimation(this, ENKAKASI_ANIM_ARMS_CROSSED_ROCKING); + EnKakasi_ChangeAnim(this, ENKAKASI_ANIM_ARMS_CROSSED_ROCKING); } } @@ -694,7 +694,7 @@ void EnKakasi_PostSongLearnDialogue(EnKakasi* this, PlayState* play) { this->animeFrameCount <= tempAnimFrame) { this->unkCounter1A4++; if (this->unkCounter1A4 >= 2) { - EnKakasi_SetAnimation(this, ENKAKASI_ANIM_SPIN_REACH_OFFER); + EnKakasi_ChangeAnim(this, ENKAKASI_ANIM_SPIN_REACH_OFFER); } } @@ -747,7 +747,7 @@ void EnKakasi_PostSongLearnDialogue(EnKakasi* this, PlayState* play) { func_800B7298(play, &this->picto.actor, 7); this->picto.actor.textId = 0x1649; if (this->animIndex != ENKAKASI_ANIM_ARMS_CROSSED_ROCKING) { - EnKakasi_SetAnimation(this, ENKAKASI_ANIM_ARMS_CROSSED_ROCKING); + EnKakasi_ChangeAnim(this, ENKAKASI_ANIM_ARMS_CROSSED_ROCKING); } } else if (this->picto.actor.textId == 0x1649) { @@ -759,7 +759,7 @@ void EnKakasi_PostSongLearnDialogue(EnKakasi* this, PlayState* play) { } else if (this->picto.actor.textId == 0x164B) { this->picto.actor.textId = 0x164C; - EnKakasi_SetAnimation(this, ENKAKASI_ANIM_TWIRL); + EnKakasi_ChangeAnim(this, ENKAKASI_ANIM_TWIRL); } else { if (this->picto.actor.textId == 0x164C || this->picto.actor.textId == 0x1661) { @@ -771,10 +771,10 @@ void EnKakasi_PostSongLearnDialogue(EnKakasi* this, PlayState* play) { } else { this->talkState = TEXT_STATE_5; if (play->msgCtx.choiceIndex == 1) { - func_8019F208(); // play 0x4808 sfx (decide) and calls Audio_StopSfxById + func_8019F208(); // play 0x4808 sfx (decide) and calls AudioSfx_StopById this->picto.actor.textId = 0x164A; } else { - func_8019F230(); // play 0x480A sfx (cancel) and calls Audio_StopSfxById + func_8019F230(); // play 0x480A sfx (cancel) and calls AudioSfx_StopById this->picto.actor.textId = 0x1661; } } @@ -811,7 +811,7 @@ void EnKakasi_SetupDanceNightAway(EnKakasi* this) { this->unkCounter1A4 = 0; this->subCamFov = 0.0f; this->subCamFovNext = 60.0f; - EnKakasi_SetAnimation(this, ENKAKASI_ANIM_TWIRL); + EnKakasi_ChangeAnim(this, ENKAKASI_ANIM_TWIRL); Math_Vec3f_Copy(&this->unk22C, &this->picto.actor.home.pos); func_8016566C(0xB4); this->actionFunc = EnKakasi_DancingNightAway; @@ -859,7 +859,7 @@ void EnKakasi_DancingNightAway(EnKakasi* this, PlayState* play) { if (this->unk204 == 0 && this->animeFrameCount <= currentFrame) { this->unk204 = 0x14; this->unk190++; - EnKakasi_SetAnimation(this, ENKAKASI_ANIM_SIDEWAYS_SHAKING); + EnKakasi_ChangeAnim(this, ENKAKASI_ANIM_SIDEWAYS_SHAKING); } return; case 2: @@ -929,7 +929,7 @@ void EnKakasi_DancingNightAway(EnKakasi* this, PlayState* play) { if (this->unk204 == 0) { player = GET_PLAYER(play); - Play_SetRespawnData(&play->state, RESPAWN_MODE_DOWN, Entrance_CreateIndexFromSpawn(0), player->unk_3CE, + Play_SetRespawnData(&play->state, RESPAWN_MODE_DOWN, Entrance_CreateFromSpawn(0), player->unk_3CE, 0xBFF, &player->unk_3C0, player->unk_3CC); func_80169EFC(&play->state); @@ -954,7 +954,7 @@ void EnKakasi_DoNothing(EnKakasi* this, PlayState* play) { void EnKakasi_SetupDigAway(EnKakasi* this) { if (this->animIndex != ENKAKASI_ANIM_SIDEWAYS_SHAKING) { - EnKakasi_SetAnimation(this, ENKAKASI_ANIM_SIDEWAYS_SHAKING); + EnKakasi_ChangeAnim(this, ENKAKASI_ANIM_SIDEWAYS_SHAKING); } this->unk190 = 0; this->unkCounter1A4 = 0; @@ -1065,7 +1065,7 @@ void EnKakasi_RisingOutOfGround(EnKakasi* this, PlayState* play) { this->picto.actor.shape.rot.y += 0x3000; if (this->animIndex != ENKAKASI_ANIM_SIDEWAYS_SHAKING) { - EnKakasi_SetAnimation(this, ENKAKASI_ANIM_SIDEWAYS_SHAKING); + EnKakasi_ChangeAnim(this, ENKAKASI_ANIM_SIDEWAYS_SHAKING); } if (this->picto.actor.shape.yOffset < -10.0f) { if ((play->gameplayFrames % 8) == 0) { diff --git a/src/overlays/actors/ovl_En_Kendo_Js/z_en_kendo_js.c b/src/overlays/actors/ovl_En_Kendo_Js/z_en_kendo_js.c index 5ac9e5211..ab2bf49cc 100644 --- a/src/overlays/actors/ovl_En_Kendo_Js/z_en_kendo_js.c +++ b/src/overlays/actors/ovl_En_Kendo_Js/z_en_kendo_js.c @@ -71,10 +71,12 @@ static ColliderCylinderInit sCylinderInit = { static CollisionCheckInfoInit2 sColChkInfoInit = { 0, 0, 0, 0, MASS_IMMOVABLE }; -static AnimationInfo sAnimations[] = { - { &object_js_Anim_000C7C, 1.0f, 0.0f, 0.0f, 0, -8.0f }, { &object_js_Anim_000F4C, 1.0f, 0.0f, 0.0f, 0, -8.0f }, - { &object_js_Anim_00016C, 1.0f, 0.0f, 0.0f, 0, -8.0f }, { &object_js_Anim_0003DC, 1.0f, 0.0f, 0.0f, 2, -8.0f }, - { &object_js_Anim_000AD4, 1.0f, 0.0f, 0.0f, 0, -8.0f }, +static AnimationInfo sAnimationInfo[] = { + { &object_js_Anim_000C7C, 1.0f, 0.0f, 0.0f, ANIMMODE_LOOP, -8.0f }, + { &object_js_Anim_000F4C, 1.0f, 0.0f, 0.0f, ANIMMODE_LOOP, -8.0f }, + { &object_js_Anim_00016C, 1.0f, 0.0f, 0.0f, ANIMMODE_LOOP, -8.0f }, + { &object_js_Anim_0003DC, 1.0f, 0.0f, 0.0f, ANIMMODE_ONCE, -8.0f }, + { &object_js_Anim_000AD4, 1.0f, 0.0f, 0.0f, ANIMMODE_LOOP, -8.0f }, }; s16 D_80B27CE0[][3] = { @@ -117,7 +119,7 @@ void EnKendoJs_Init(Actor* thisx, PlayState* play) { this->actor.home.rot.z, 0x10); Actor_MarkForDeath(&this->actor); } else { - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, 4); + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, 4); } } else if (ENKENDOJS_GET_FF(&this->actor) == ENKENDOJS_FF_1) { Actor_MarkForDeath(&this->actor); @@ -220,7 +222,7 @@ void func_80B26758(EnKendoJs* this, PlayState* play) { play_sound(NA_SE_SY_ERROR); Message_StartTextbox(play, 0x272C, &this->actor); this->unk_288 = 0x272C; - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, 2); + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, 2); } else if (gSaveContext.save.playerData.rupees < play->msgCtx.unk1206C) { play_sound(NA_SE_SY_ERROR); Message_StartTextbox(play, 0x2718, &this->actor); @@ -238,7 +240,7 @@ void func_80B26758(EnKendoJs* this, PlayState* play) { play_sound(NA_SE_SY_ERROR); Message_StartTextbox(play, 0x272C, &this->actor); this->unk_288 = 0x272C; - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, 2); + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, 2); } else if (gSaveContext.save.playerData.rupees < play->msgCtx.unk12070) { play_sound(NA_SE_SY_ERROR); Message_StartTextbox(play, 0x2718, &this->actor); @@ -328,7 +330,7 @@ void func_80B26AFC(EnKendoJs* this, PlayState* play) { case TEXT_STATE_DONE: if (Message_ShouldAdvance(play)) { if (this->unk_288 == 0x272C) { - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, 3); + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, 3); } if ((this->unk_288 == 0x272E) || (this->unk_288 == 0x272F) || (this->unk_288 == 0x2730)) { @@ -514,7 +516,7 @@ void func_80B27188(EnKendoJs* this, PlayState* play) { func_80B26F14(this, play); } else if (!func_80B26F6C(this, play)) { if (this->skelAnime.animation == &object_js_Anim_00016C) { - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, 3); + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, 3); } this->unk_286 = 2; func_801477B4(play); @@ -539,7 +541,7 @@ void func_80B27188(EnKendoJs* this, PlayState* play) { player->stateFlags1 |= 0x20; Message_StartTextbox(play, 0x2729, &this->actor); this->unk_288 = 0x2729; - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, 2); + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, 2); break; default: @@ -555,7 +557,7 @@ void func_80B27188(EnKendoJs* this, PlayState* play) { if ((this->skelAnime.animation == &object_js_Anim_0003DC) && Animation_OnFrame(&this->skelAnime, this->skelAnime.endFrame)) { - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, 1); + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, 1); } if (this->unk_284 == 7) { diff --git a/src/overlays/actors/ovl_En_Kgy/z_en_kgy.c b/src/overlays/actors/ovl_En_Kgy/z_en_kgy.c index 8b6b66208..de2d1c207 100644 --- a/src/overlays/actors/ovl_En_Kgy/z_en_kgy.c +++ b/src/overlays/actors/ovl_En_Kgy/z_en_kgy.c @@ -17,7 +17,7 @@ void EnKgy_Destroy(Actor* thisx, PlayState* play); void EnKgy_Update(Actor* thisx, PlayState* play); void EnKgy_Draw(Actor* thisx, PlayState* play); -void EnKgy_ChangeAnim(EnKgy* this, s16 arg1, u8 arg2, f32 arg3); +void EnKgy_ChangeAnim(EnKgy* this, s16 animIndex, u8 mode, f32 morphFrames); EnKbt* EnKgy_FindZubora(PlayState* play); ObjIcePoly* EnKgy_FindIceBlock(PlayState* play); void func_80B40D30(PlayState* play); @@ -108,7 +108,7 @@ void EnKgy_Destroy(Actor* thisx, PlayState* play) { LightContext_RemoveLight(play, &play->lightCtx, this->lightNode); } -void EnKgy_ChangeAnim(EnKgy* this, s16 animIndex, u8 mode, f32 transitionRate) { +void EnKgy_ChangeAnim(EnKgy* this, s16 animIndex, u8 mode, f32 morphFrames) { static AnimationHeader* sAnimations[] = { &object_kgy_Anim_004B98, &object_kgy_Anim_0008FC, &object_kgy_Anim_00292C, &object_kgy_Anim_0042E4, &object_kgy_Anim_0101F0, &object_kgy_Anim_001764, &object_kgy_Anim_003334, &object_kgy_Anim_010B84, @@ -116,7 +116,7 @@ void EnKgy_ChangeAnim(EnKgy* this, s16 animIndex, u8 mode, f32 transitionRate) { }; Animation_Change(&this->skelAnime, sAnimations[animIndex], 1.0f, 0.0f, - Animation_GetLastFrame(sAnimations[animIndex]), mode, transitionRate); + Animation_GetLastFrame(sAnimations[animIndex]), mode, morphFrames); this->unk_2D2 = animIndex; } @@ -512,7 +512,7 @@ void func_80B41A48(EnKgy* this, PlayState* play) { if (this->unk_2E4 > 0) { this->unk_2E4--; } else { - play->nextEntranceIndex = play->setupExitList[ENKGY_GET_1F(&this->actor)]; + play->nextEntrance = play->setupExitList[ENKGY_GET_1F(&this->actor)]; play->transitionTrigger = TRANS_TRIGGER_START; } } @@ -586,7 +586,7 @@ void func_80B41CBC(EnKgy* this, PlayState* play) { this->actionFunc = func_80B41E18; func_80B411DC(this, play, 4); } else { - func_800B8500(&this->actor, play, 1000.0f, 1000.0f, EXCH_ITEM_MINUS1); + func_800B8500(&this->actor, play, 1000.0f, 1000.0f, PLAYER_AP_MINUS1); } } @@ -595,7 +595,7 @@ void func_80B41D64(EnKgy* this, PlayState* play) { if (Actor_HasParent(&this->actor, play)) { this->actionFunc = func_80B41CBC; this->actor.flags |= ACTOR_FLAG_10000; - func_800B8500(&this->actor, play, 1000.0f, 1000.0f, EXCH_ITEM_MINUS1); + func_800B8500(&this->actor, play, 1000.0f, 1000.0f, PLAYER_AP_MINUS1); } else { Actor_PickUp(&this->actor, play, this->unk_2EA, 2000.0f, 1000.0f); } @@ -744,7 +744,7 @@ void func_80B41E18(EnKgy* this, PlayState* play) { case 0xC46: case 0xC55: func_80123D50(play, GET_PLAYER(play), ITEM_BOTTLE, PLAYER_AP_BOTTLE); - player->exchangeItemId = EXCH_ITEM_NONE; + player->exchangeItemId = PLAYER_AP_NONE; this->unk_29C &= ~0x8; play->msgCtx.msgLength = 0; func_80B41368(this, play, 4); @@ -759,7 +759,7 @@ void func_80B41E18(EnKgy* this, PlayState* play) { case 0xC47: func_80B40BC0(this, 1); if (this->unk_29C & 8) { - player->exchangeItemId = EXCH_ITEM_NONE; + player->exchangeItemId = PLAYER_AP_NONE; this->unk_29C &= ~8; } func_80B40EBC(this, play, textId); @@ -948,7 +948,7 @@ void func_80B4296C(EnKgy* this, PlayState* play) { this->actor.flags &= ~ACTOR_FLAG_10000; } else { this->actor.flags |= ACTOR_FLAG_10000; - func_800B8500(&this->actor, play, 1000.0f, 1000.0f, EXCH_ITEM_NONE); + func_800B8500(&this->actor, play, 1000.0f, 1000.0f, PLAYER_AP_NONE); } } diff --git a/src/overlays/actors/ovl_En_Look_Nuts/z_en_look_nuts.c b/src/overlays/actors/ovl_En_Look_Nuts/z_en_look_nuts.c index 7441a14fd..de053c46a 100644 --- a/src/overlays/actors/ovl_En_Look_Nuts/z_en_look_nuts.c +++ b/src/overlays/actors/ovl_En_Look_Nuts/z_en_look_nuts.c @@ -295,7 +295,7 @@ void EnLookNuts_SendPlayerToSpawn(EnLookNuts* this, PlayState* play) { Math_SmoothStepToS(&this->actor.world.rot.y, this->actor.yawTowardsPlayer, 1, 0xBB8, 0); if ((Message_GetState(&play->msgCtx) == TEXT_STATE_5) && Message_ShouldAdvance(play)) { func_801477B4(play); - play->nextEntranceIndex = Entrance_CreateIndexFromSpawn(this->spawnIndex); + play->nextEntrance = Entrance_CreateFromSpawn(this->spawnIndex); gSaveContext.nextCutsceneIndex = 0; Scene_SetExitFade(play); play->transitionTrigger = TRANS_TRIGGER_START; diff --git a/src/overlays/actors/ovl_En_Ma4/z_en_ma4.c b/src/overlays/actors/ovl_En_Ma4/z_en_ma4.c index eb0300a0a..17fd7d32d 100644 --- a/src/overlays/actors/ovl_En_Ma4/z_en_ma4.c +++ b/src/overlays/actors/ovl_En_Ma4/z_en_ma4.c @@ -134,10 +134,10 @@ static AnimationSpeedInfo sAnimationInfo[] = { { &gRomaniSittingLookDownAnim, 1.0f, ANIMMODE_LOOP, -6.0f }, }; -void EnMa4_ChangeAnim(EnMa4* this, s32 index) { - Animation_Change(&this->skelAnime, sAnimationInfo[index].animation, 1.0f, 0.0f, - Animation_GetLastFrame(sAnimationInfo[index].animation), sAnimationInfo[index].mode, - sAnimationInfo[index].morphFrames); +void EnMa4_ChangeAnim(EnMa4* this, s32 animIndex) { + Animation_Change(&this->skelAnime, sAnimationInfo[animIndex].animation, 1.0f, 0.0f, + Animation_GetLastFrame(sAnimationInfo[animIndex].animation), sAnimationInfo[animIndex].mode, + sAnimationInfo[animIndex].morphFrames); } void func_80ABDD9C(EnMa4* this, PlayState* play) { @@ -214,10 +214,10 @@ void EnMa4_Init(Actor* thisx, PlayState* play) { } else { EnMa4_InitPath(this, play); - if (gSaveContext.save.entranceIndex == 0x6410) { + if (gSaveContext.save.entrance == ENTRANCE(ROMANI_RANCH, 1)) { EnMa4_ChangeAnim(this, 0); this->state = MA4_STATE_AFTERHORSEBACKGAME; - } else if (gSaveContext.save.entranceIndex == 0x64A0) { + } else if (gSaveContext.save.entrance == ENTRANCE(ROMANI_RANCH, 10)) { EnMa4_ChangeAnim(this, 0); this->state = MA4_STATE_AFTERDESCRIBETHEMCS; } else { @@ -243,30 +243,30 @@ void EnMa4_Destroy(Actor* thisx, PlayState* play) { // Running in circles in the ranch void EnMa4_RunInCircles(EnMa4* this, PlayState* play) { - static s32 sCurrentAnim = 9; + static s32 sAnimIndex = 9; static s32 D_80AC0250 = 0; static s16 D_80AC0254 = 10; Vec3f sp34; s32 pad; s16 sp2E; - if (sCurrentAnim != 9 && Animation_OnFrame(&this->skelAnime, this->skelAnime.endFrame)) { - if (sCurrentAnim == 3) { + if (sAnimIndex != 9 && Animation_OnFrame(&this->skelAnime, this->skelAnime.endFrame)) { + if (sAnimIndex == 3) { if (D_80AC0250 < 3) { D_80AC0250++; } else { D_80AC0250 = 0; EnMa4_ChangeAnim(this, 13); - sCurrentAnim = 13; + sAnimIndex = 13; } } else { this->actor.speedXZ = 2.7f; EnMa4_ChangeAnim(this, 9); - sCurrentAnim = 9; + sAnimIndex = 9; } } - if (sCurrentAnim == 13 && Animation_OnFrame(&this->skelAnime, 37.0f)) { + if (sAnimIndex == 13 && Animation_OnFrame(&this->skelAnime, 37.0f)) { Actor_PlaySfxAtPos(&this->actor, NA_SE_EV_ROMANI_BOW_FLICK); } @@ -282,7 +282,7 @@ void EnMa4_RunInCircles(EnMa4* this, PlayState* play) { this->actor.speedXZ = 0.0f; D_80AC0254 = 2; EnMa4_ChangeAnim(this, 3); - sCurrentAnim = 3; + sAnimIndex = 3; } else { if (D_80AC0254 > 0) { D_80AC0254--; @@ -662,7 +662,7 @@ void EnMa4_SetupBeginHorsebackGame(EnMa4* this) { } void EnMa4_BeginHorsebackGame(EnMa4* this, PlayState* play) { - play->nextEntranceIndex = 0x6400; + play->nextEntrance = ENTRANCE(ROMANI_RANCH, 0); gSaveContext.nextCutsceneIndex = 0xFFF0; play->transitionTrigger = TRANS_TRIGGER_START; play->transitionType = TRANS_TYPE_80; @@ -753,7 +753,7 @@ void EnMa4_HorsebackGameEnd(EnMa4* this, PlayState* play) { } } else if (sFrameCounter == 50) { play->actorCtx.unk268 = 0; - play->nextEntranceIndex = 0x6410; + play->nextEntrance = ENTRANCE(ROMANI_RANCH, 1); gSaveContext.nextCutsceneIndex = 0; sFrameCounter = 0; play->transitionTrigger = TRANS_TRIGGER_START; @@ -828,7 +828,7 @@ void EnMa4_EponasSongCs(EnMa4* this, PlayState* play) { Player* player = GET_PLAYER(play); player->stateFlags1 |= 0x20; - func_800B85E0(&this->actor, play, 200.0f, EXCH_ITEM_MINUS1); + func_800B85E0(&this->actor, play, 200.0f, PLAYER_AP_MINUS1); D_80AC0260 = 99; this->hasBow = true; EnMa4_SetupEndEponasSongCs(this); @@ -850,7 +850,7 @@ void EnMa4_EndEponasSongCs(EnMa4* this, PlayState* play) { this->actor.flags &= ~ACTOR_FLAG_10000; EnMa4_SetupDialogueHandler(this); } else { - func_800B85E0(&this->actor, play, 200.0f, EXCH_ITEM_MINUS1); + func_800B85E0(&this->actor, play, 200.0f, PLAYER_AP_MINUS1); } } @@ -859,7 +859,7 @@ void EnMa4_SetupBeginDescribeThemCs(EnMa4* this) { } void EnMa4_BeginDescribeThemCs(EnMa4* this, PlayState* play) { - play->nextEntranceIndex = 0x6400; + play->nextEntrance = ENTRANCE(ROMANI_RANCH, 0); gSaveContext.nextCutsceneIndex = 0xFFF5; play->transitionTrigger = TRANS_TRIGGER_START; play->transitionType = TRANS_TYPE_64; diff --git a/src/overlays/actors/ovl_En_Ma_Yto/z_en_ma_yto.c b/src/overlays/actors/ovl_En_Ma_Yto/z_en_ma_yto.c index 48817003a..4f74a46d6 100644 --- a/src/overlays/actors/ovl_En_Ma_Yto/z_en_ma_yto.c +++ b/src/overlays/actors/ovl_En_Ma_Yto/z_en_ma_yto.c @@ -59,7 +59,7 @@ void EnMaYto_PostMilkRunEnd(EnMaYto* this, PlayState* play); void EnMaYto_DefaultStartDialogue(EnMaYto* this, PlayState* play); void EnMaYto_DinnerStartDialogue(EnMaYto* this, PlayState* play); void EnMaYto_BarnStartDialogue(EnMaYto* this, PlayState* play); -void EnMaYto_ChangeAnim(EnMaYto* this, s32 index); +void EnMaYto_ChangeAnim(EnMaYto* this, s32 animIndex); void EnMaYto_UpdateEyes(EnMaYto* this); void func_80B90E50(EnMaYto* this, s16); void EnMaYto_SetRomaniFaceExpression(EnMaYto* this, s16 overrideEyeTexIndex, s16 mouthTexIndex); @@ -380,10 +380,10 @@ void EnMaYto_KeepLookingForRomani(EnMaYto* this, PlayState* play) { void EnMaYto_SetupDefaultWait(EnMaYto* this) { if (this->actor.shape.rot.y == this->actor.home.rot.y) { - this->currentAnim = 11; + this->animIndex = 11; EnMaYto_ChangeAnim(this, 11); } else { - this->currentAnim = 1; + this->animIndex = 1; EnMaYto_ChangeAnim(this, 1); } @@ -398,8 +398,8 @@ void EnMaYto_DefaultWait(EnMaYto* this, PlayState* play) { direction = rotY - this->actor.yawTowardsPlayer; if (Math_SmoothStepToS(&this->actor.shape.rot.y, this->actor.home.rot.y, 5, 0x3000, 0x100) == 0 && - this->currentAnim == 1) { - this->currentAnim = 11; + this->animIndex == 1) { + this->animIndex = 11; EnMaYto_ChangeAnim(this, 11); } @@ -1002,7 +1002,7 @@ void EnMaYto_PostMilkRunExplainReward(EnMaYto* this, PlayState* play) { EnMaYto_SetupPostMilkRunWaitDialogueEnd(this); } } else { - func_800B85E0(&this->actor, play, 200.0f, EXCH_ITEM_MINUS1); + func_800B85E0(&this->actor, play, 200.0f, PLAYER_AP_MINUS1); } } @@ -1091,11 +1091,9 @@ void EnMaYto_SetupPostMilkRunEnd(EnMaYto* this) { void EnMaYto_PostMilkRunEnd(EnMaYto* this, PlayState* play) { if (this->unk310 == 3) { - // Termina Field - play->nextEntranceIndex = 0x54D0; + play->nextEntrance = ENTRANCE(TERMINA_FIELD, 13); } else { - // Romani Ranch - play->nextEntranceIndex = 0x6480; + play->nextEntrance = ENTRANCE(ROMANI_RANCH, 8); } gSaveContext.nextCutsceneIndex = 0; play->transitionTrigger = TRANS_TRIGGER_START; @@ -1270,10 +1268,10 @@ void EnMaYto_BarnStartDialogue(EnMaYto* this, PlayState* play) { } } -void EnMaYto_ChangeAnim(EnMaYto* this, s32 index) { - Animation_Change(&this->skelAnime, sAnimationInfo[index].animation, 1.0f, 0.0f, - Animation_GetLastFrame(sAnimationInfo[index].animation), sAnimationInfo[index].mode, - sAnimationInfo[index].morphFrames); +void EnMaYto_ChangeAnim(EnMaYto* this, s32 animIndex) { + Animation_Change(&this->skelAnime, sAnimationInfo[animIndex].animation, 1.0f, 0.0f, + Animation_GetLastFrame(sAnimationInfo[animIndex].animation), sAnimationInfo[animIndex].mode, + sAnimationInfo[animIndex].morphFrames); } void func_80B90C78(EnMaYto* this, PlayState* play) { diff --git a/src/overlays/actors/ovl_En_Ma_Yto/z_en_ma_yto.h b/src/overlays/actors/ovl_En_Ma_Yto/z_en_ma_yto.h index 7f2c50fb3..cc69a029d 100644 --- a/src/overlays/actors/ovl_En_Ma_Yto/z_en_ma_yto.h +++ b/src/overlays/actors/ovl_En_Ma_Yto/z_en_ma_yto.h @@ -20,7 +20,7 @@ typedef struct EnMaYto { /* 0x28C */ Vec3s morphTable[CREMIA_LIMB_MAX]; /* 0x310 */ s16 unk310; // state? /* 0x312 */ UNK_TYPE1 unk_312[0x2]; - /* 0x314 */ s16 currentAnim; // Used only in DefaultWait + /* 0x314 */ s16 animIndex; // Used only in DefaultWait /* 0x316 */ s16 overrideEyeTexIndex; // If non-zero, then this index will be used instead of eyeTexIndex /* 0x318 */ s16 mouthTexIndex; /* 0x31A */ s16 eyeTexIndex; diff --git a/src/overlays/actors/ovl_En_Ma_Yts/z_en_ma_yts.c b/src/overlays/actors/ovl_En_Ma_Yts/z_en_ma_yts.c index 72357758a..f5456f7a2 100644 --- a/src/overlays/actors/ovl_En_Ma_Yts/z_en_ma_yts.c +++ b/src/overlays/actors/ovl_En_Ma_Yts/z_en_ma_yts.c @@ -113,10 +113,10 @@ static TexturePtr sEyeTextures[] = { gRomaniEyeOpenTex, gRomaniEyeHalfTex, gRomaniEyeClosedTex, gRomaniEyeHappyTex, gRomaniEyeSadTex, }; -void EnMaYts_ChangeAnim(EnMaYts* this, s32 index) { - Animation_Change(&this->skelAnime, sAnimationInfo[index].animation, 1.0f, 0.0f, - Animation_GetLastFrame(sAnimationInfo[index].animation), sAnimationInfo[index].mode, - sAnimationInfo[index].morphFrames); +void EnMaYts_ChangeAnim(EnMaYts* this, s32 animIndex) { + Animation_Change(&this->skelAnime, sAnimationInfo[animIndex].animation, 1.0f, 0.0f, + Animation_GetLastFrame(sAnimationInfo[animIndex].animation), sAnimationInfo[animIndex].mode, + sAnimationInfo[animIndex].morphFrames); } void func_80B8D12C(EnMaYts* this, PlayState* play) { diff --git a/src/overlays/actors/ovl_En_Mag/z_en_mag.c b/src/overlays/actors/ovl_En_Mag/z_en_mag.c index cee1132a4..da72fc308 100644 --- a/src/overlays/actors/ovl_En_Mag/z_en_mag.c +++ b/src/overlays/actors/ovl_En_Mag/z_en_mag.c @@ -391,7 +391,7 @@ void EnMag_Update(Actor* thisx, PlayState* play) { gSaveContext.gameMode = 2; // Go to FileChoose play->transitionTrigger = TRANS_TRIGGER_START; play->transitionType = TRANS_TYPE_02; - play->nextEntranceIndex = 0x1C00; + play->nextEntrance = ENTRANCE(CUTSCENE, 0); gSaveContext.save.cutscene = 0; gSaveContext.sceneSetupIndex = 0; } diff --git a/src/overlays/actors/ovl_En_Minifrog/z_en_minifrog.c b/src/overlays/actors/ovl_En_Minifrog/z_en_minifrog.c index ad8bd2468..1e92e1f77 100644 --- a/src/overlays/actors/ovl_En_Minifrog/z_en_minifrog.c +++ b/src/overlays/actors/ovl_En_Minifrog/z_en_minifrog.c @@ -475,7 +475,7 @@ void EnMinifrog_EndChoir(EnMinifrog* this, PlayState* play) { Message_StartTextbox(play, 0xD7E, &this->actor); // "Let us do it again sometime." this->actionFunc = EnMinifrog_YellowFrogDialog; } else { - func_800B8500(&this->actor, play, 1000.0f, 1000.0f, EXCH_ITEM_MINUS1); + func_800B8500(&this->actor, play, 1000.0f, 1000.0f, PLAYER_AP_MINUS1); } } @@ -486,7 +486,7 @@ void EnMinifrog_GetFrogHP(EnMinifrog* this, PlayState* play) { this->actor.parent = NULL; this->actionFunc = EnMinifrog_EndChoir; this->actor.flags |= ACTOR_FLAG_10000; - func_800B8500(&this->actor, play, 1000.0f, 1000.0f, EXCH_ITEM_NONE); + func_800B8500(&this->actor, play, 1000.0f, 1000.0f, PLAYER_AP_NONE); } else { Actor_PickUp(&this->actor, play, GI_HEART_PIECE, 10000.0f, 50.0f); } diff --git a/src/overlays/actors/ovl_En_Mm3/z_en_mm3.c b/src/overlays/actors/ovl_En_Mm3/z_en_mm3.c index 257d6ce0a..994adef6f 100644 --- a/src/overlays/actors/ovl_En_Mm3/z_en_mm3.c +++ b/src/overlays/actors/ovl_En_Mm3/z_en_mm3.c @@ -63,11 +63,15 @@ static ColliderCylinderInit sCylinderInit = { static CollisionCheckInfoInit2 sColChkInfoInit = { 0, 0, 0, 0, MASS_IMMOVABLE }; -static AnimationInfo sAnimations[] = { - { &object_mm_Anim_002238, 1.0f, 0.0f, 0.0f, 0, -7.0f }, { &object_mm_Anim_00A4E0, -1.0f, 0.0f, 0.0f, 2, -7.0f }, - { &object_mm_Anim_00C640, 1.0f, 0.0f, 0.0f, 0, -7.0f }, { &object_mm_Anim_00A4E0, 1.0f, 0.0f, 0.0f, 2, -7.0f }, - { &object_mm_Anim_000468, 1.0f, 0.0f, 0.0f, 0, -7.0f }, { &object_mm_Anim_00CD90, 1.0f, 0.0f, 0.0f, 0, -12.0f }, - { &object_mm_Anim_00DA50, 1.0f, 0.0f, 0.0f, 0, -12.0f }, { &object_mm_Anim_00DA50, 1.0f, 0.0f, 10.0f, 2, -10.0f }, +static AnimationInfo sAnimationInfo[] = { + { &object_mm_Anim_002238, 1.0f, 0.0f, 0.0f, ANIMMODE_LOOP, -7.0f }, + { &object_mm_Anim_00A4E0, -1.0f, 0.0f, 0.0f, ANIMMODE_ONCE, -7.0f }, + { &object_mm_Anim_00C640, 1.0f, 0.0f, 0.0f, ANIMMODE_LOOP, -7.0f }, + { &object_mm_Anim_00A4E0, 1.0f, 0.0f, 0.0f, ANIMMODE_ONCE, -7.0f }, + { &object_mm_Anim_000468, 1.0f, 0.0f, 0.0f, ANIMMODE_LOOP, -7.0f }, + { &object_mm_Anim_00CD90, 1.0f, 0.0f, 0.0f, ANIMMODE_LOOP, -12.0f }, + { &object_mm_Anim_00DA50, 1.0f, 0.0f, 0.0f, ANIMMODE_LOOP, -12.0f }, + { &object_mm_Anim_00DA50, 1.0f, 0.0f, 10.0f, ANIMMODE_ONCE, -10.0f }, }; #include "overlays/ovl_En_Mm3/ovl_En_Mm3.c" @@ -119,7 +123,7 @@ s32 func_80A6F22C(EnMm3* this) { void func_80A6F270(EnMm3* this) { this->unk_1DC = 1; this->unk_2B0 &= ~1; - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, 5); + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, 5); this->actionFunc = func_80A6F2C8; } @@ -211,7 +215,7 @@ void func_80A6F5E4(EnMm3* this, PlayState* play) { } this->unk_1DC = 0; this->unk_2B0 |= 1; - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, 7); + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, 7); break; case 0x278B: @@ -356,7 +360,7 @@ void func_80A6F9DC(EnMm3* this, PlayState* play) { } if ((this->skelAnime.mode == 2) && Animation_OnFrame(&this->skelAnime, this->skelAnime.endFrame)) { - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, 2); + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, 2); } if (((this->unk_2B4 == 0x279D) || (this->unk_2B4 == 0x27A0) || (this->unk_2B4 == 0x278B)) && @@ -367,7 +371,8 @@ void func_80A6F9DC(EnMm3* this, PlayState* play) { } void func_80A6FBA0(EnMm3* this) { - Audio_SetSfxBanksMute(0x6F); + AudioSfx_MuteBanks((1 << BANK_PLAYER) | (1 << BANK_ITEM) | (1 << BANK_ENV) | (1 << BANK_ENEMY) | + (1 << BANK_OCARINA) | (1 << BANK_VOICE)); func_801A0238(0, 5); gSaveContext.save.weekEventReg[63] |= 1; gSaveContext.save.weekEventReg[63] &= (u8)~2; @@ -392,7 +397,7 @@ void func_80A6FBFC(EnMm3* this, PlayState* play) { } if (Actor_ProcessTalkRequest(&this->actor, &play->state)) { - Audio_SetSfxBanksMute(0); + AudioSfx_MuteBanks(0); func_801A0238(0x7F, 5); Message_StartTextbox(play, 0x2791, &this->actor); this->unk_2B4 = 0x2791; diff --git a/src/overlays/actors/ovl_En_Mt_tag/z_en_mt_tag.c b/src/overlays/actors/ovl_En_Mt_tag/z_en_mt_tag.c index 454f7e963..4db6992f7 100644 --- a/src/overlays/actors/ovl_En_Mt_tag/z_en_mt_tag.c +++ b/src/overlays/actors/ovl_En_Mt_tag/z_en_mt_tag.c @@ -233,7 +233,7 @@ s32 EnMttag_UpdateCheckpoints(EnMttag* this, PlayState* play) { */ s32 EnMttag_ExitRace(PlayState* play, s32 transitionType, s32 nextTransitionType) { CUR_FORM_EQUIP(EQUIP_SLOT_B) = ITEM_SWORD_KOKIRI; - play->nextEntranceIndex = 0xD020; + play->nextEntrance = ENTRANCE(GORON_RACETRACK, 2); if (gSaveContext.save.weekEventReg[33] & 0x80) { // Spring gSaveContext.nextCutsceneIndex = 0xFFF0; @@ -418,7 +418,7 @@ void EnMttag_PotentiallyRestartRace(EnMttag* this, PlayState* play) { if (((talkState == TEXT_STATE_5 && Message_ShouldAdvance(play)) || talkState == TEXT_STATE_CLOSING)) { if (this->shouldRestartRace) { - play->nextEntranceIndex = 0xD010; + play->nextEntrance = ENTRANCE(GORON_RACETRACK, 1); if (gSaveContext.save.weekEventReg[33] & 0x80) { // Spring @@ -478,7 +478,7 @@ void EnMttag_Init(Actor* thisx, PlayState* play) { Player* player; EnMttag* this = THIS; - if (gSaveContext.save.entranceIndex == 0xD010) { + if (gSaveContext.save.entrance == ENTRANCE(GORON_RACETRACK, 1)) { player = GET_PLAYER(play); player->stateFlags1 |= 0x20; this->raceInitialized = false; diff --git a/src/overlays/actors/ovl_En_Muto/z_en_muto.c b/src/overlays/actors/ovl_En_Muto/z_en_muto.c index 7011b264d..513c13109 100644 --- a/src/overlays/actors/ovl_En_Muto/z_en_muto.c +++ b/src/overlays/actors/ovl_En_Muto/z_en_muto.c @@ -16,7 +16,7 @@ void EnMuto_Destroy(Actor* thisx, PlayState* play); void EnMuto_Update(Actor* thisx, PlayState* play); void EnMuto_Draw(Actor* thisx, PlayState* play); -void EnMuto_ChangeAnim(EnMuto* this, s32 arg1); +void EnMuto_ChangeAnim(EnMuto* this, s32 animIndex); void EnMuto_SetHeadRotation(EnMuto* this); void EnMuto_SetupIdle(EnMuto* this); void EnMuto_Idle(EnMuto* this, PlayState* play); diff --git a/src/overlays/actors/ovl_En_Niw/z_en_niw.c b/src/overlays/actors/ovl_En_Niw/z_en_niw.c index 0f392dcfd..112871c90 100644 --- a/src/overlays/actors/ovl_En_Niw/z_en_niw.c +++ b/src/overlays/actors/ovl_En_Niw/z_en_niw.c @@ -187,7 +187,7 @@ void EnNiw_AnimateWingHead(EnNiw* this, PlayState* play, s16 animationState) { if (this->unkTimer24C == 0) { // targetLimbRots[0] is bodyRotY - if (animationState == NIW_ANIMATION_STILL) { + if (animationState == NIW_ANIM_STILL) { this->targetLimbRots[0] = 0.0f; } else { this->targetLimbRots[0] = -10000.0f * tempOne; @@ -197,7 +197,7 @@ void EnNiw_AnimateWingHead(EnNiw* this, PlayState* play, s16 animationState) { this->unkTimer24C = 3; if ((this->unk292 % 2) == 0) { this->targetLimbRots[0] = 0.0f; - if (animationState == NIW_ANIMATION_STILL) { + if (animationState == NIW_ANIM_STILL) { this->unkTimer24C = Rand_ZeroFloat(30.0f); } } @@ -208,11 +208,11 @@ void EnNiw_AnimateWingHead(EnNiw* this, PlayState* play, s16 animationState) { this->unkToggle296 &= 1; switch (animationState) { - case NIW_ANIMATION_STILL: + case NIW_ANIM_STILL: this->targetLimbRots[2] = 0.0f; // both wingRotZ this->targetLimbRots[1] = 0.0f; break; - case NIW_ANIMATION_HEAD_PECKING: + case NIW_ANIM_HEAD_PECKING: this->unkTimer24E = 3; this->targetLimbRots[2] = 7000.0f * tempOne; // both wingRotZ this->targetLimbRots[1] = 7000.0f * tempOne; @@ -222,7 +222,7 @@ void EnNiw_AnimateWingHead(EnNiw* this, PlayState* play, s16 animationState) { } break; - case NIW_ANIMATION_PECKING_AND_WAVING: + case NIW_ANIM_PECKING_AND_WAVING: this->unkTimer24E = 2; this->targetLimbRots[2] = -10000.0f; // both wingRotZ this->targetLimbRots[1] = -10000.0f; @@ -236,7 +236,7 @@ void EnNiw_AnimateWingHead(EnNiw* this, PlayState* play, s16 animationState) { } break; - case NIW_ANIMATION_PECKING_AND_FORFLAPPING: + case NIW_ANIM_PECKING_AND_FORFLAPPING: this->unkTimer24E = 2; this->targetLimbRots[5] = 10000.0f; // both wingRotY this->targetLimbRots[7] = 10000.0f; @@ -246,11 +246,11 @@ void EnNiw_AnimateWingHead(EnNiw* this, PlayState* play, s16 animationState) { } break; - case NIW_ANIMATION_FREEZE: + case NIW_ANIM_FREEZE: this->unkTimer24C = 5; break; - case NIW_ANIMATION_PECKING_SLOW_FORFLAPPING: + case NIW_ANIM_PECKING_SLOW_FORFLAPPING: this->unkTimer24E = 5; this->targetLimbRots[5] = 14000.0f; // both wingRotY this->targetLimbRots[7] = 14000.0f; @@ -348,7 +348,7 @@ void EnNiw_UpdateRunning(EnNiw* this, PlayState* play, s32 isStormCucco) { targetRotY = this->yawTowardsPlayer + runningDirection; Math_SmoothStepToS(&this->actor.world.rot.y, targetRotY, 3, this->unk300, 0); Math_ApproachF(&this->unk300, 3000.0f, 1.0f, 500.0f); - EnNiw_AnimateWingHead(this, play, NIW_ANIMATION_PECKING_SLOW_FORFLAPPING); + EnNiw_AnimateWingHead(this, play, NIW_ANIM_PECKING_SLOW_FORFLAPPING); } void EnNiw_SetupIdle(EnNiw* this) { @@ -363,7 +363,7 @@ void EnNiw_Idle(EnNiw* this, PlayState* play) { f32 posZ2; f32 posX1 = randPlusMinusPoint5Scaled(100.0f); f32 posZ1 = randPlusMinusPoint5Scaled(100.0f); - s16 nextAnimation; + s16 nextAnimIndex; if (this->niwType == NIW_TYPE_REGULAR) { if (Actor_HasParent(&this->actor, play)) { // picked up @@ -382,7 +382,7 @@ void EnNiw_Idle(EnNiw* this, PlayState* play) { this->unkIdleTimer2 = 10; } - nextAnimation = NIW_ANIMATION_STILL; // probably a scoped variable here, where their scope was different + nextAnimIndex = NIW_ANIM_STILL; // probably a scoped variable here, where their scope was different if (this->unkIdleTimer2 != 0) { if (Rand_ZeroFloat(3.99f) < 1.0f) { this->headRotationToggle++; @@ -423,7 +423,7 @@ void EnNiw_Idle(EnNiw* this, PlayState* play) { if (this->unkIdleTimer != 0) { Math_ApproachZeroF(&this->targetLimbRots[9], 0.5f, 4000.0f); // head rot - nextAnimation = NIW_ANIMATION_HEAD_PECKING; + nextAnimIndex = NIW_ANIM_HEAD_PECKING; Math_ApproachF(&this->actor.world.pos.x, this->unk2B0.x, 1.0f, this->unk300); Math_ApproachF(&this->actor.world.pos.z, this->unk2B0.z, 1.0f, this->unk300); Math_ApproachF(&this->unk300, 3.0f, 1.0f, 0.3f); @@ -447,7 +447,7 @@ void EnNiw_Idle(EnNiw* this, PlayState* play) { Math_ApproachF(&this->unk304, 10000.0f, 1.0f, 1000.0f); } - EnNiw_AnimateWingHead(this, play, nextAnimation); + EnNiw_AnimateWingHead(this, play, nextAnimIndex); } void EnNiw_Held(EnNiw* this, PlayState* play) { @@ -489,7 +489,7 @@ void EnNiw_Held(EnNiw* this, PlayState* play) { this->actionFunc = EnNiw_Thrown; } - EnNiw_AnimateWingHead(this, play, NIW_ANIMATION_PECKING_AND_WAVING); + EnNiw_AnimateWingHead(this, play, NIW_ANIM_PECKING_AND_WAVING); } void EnNiw_Thrown(EnNiw* this, PlayState* play) { @@ -531,7 +531,7 @@ void EnNiw_Thrown(EnNiw* this, PlayState* play) { if (this->hoppingTimer > 5) { Actor_LiftActor(&this->actor, play); } - EnNiw_AnimateWingHead(this, play, NIW_ANIMATION_PECKING_AND_WAVING); + EnNiw_AnimateWingHead(this, play, NIW_ANIM_PECKING_AND_WAVING); } } @@ -585,7 +585,7 @@ void EnNiw_Swimming(EnNiw* this, PlayState* play) { } } - EnNiw_AnimateWingHead(this, play, NIW_ANIMATION_PECKING_AND_WAVING); + EnNiw_AnimateWingHead(this, play, NIW_ANIM_PECKING_AND_WAVING); } void EnNiw_Trigger(EnNiw* this, PlayState* play) { @@ -597,7 +597,7 @@ void EnNiw_Trigger(EnNiw* this, PlayState* play) { } this->cuccoStormTimer = 10; - this->niwState = this->nextAnimation = state; // NIW_ANIMATION_HEAD_PECKING + this->niwState = this->nextAnimIndex = state; // NIW_ANIM_HEAD_PECKING this->actionFunc = EnNiw_Upset; } @@ -607,12 +607,12 @@ void EnNiw_Upset(EnNiw* this, PlayState* play) { if (this->cuccoStormTimer == 0) { this->cuccoStormTimer = 60; this->unkTimer24C = 10; - this->nextAnimation = NIW_ANIMATION_FREEZE; + this->nextAnimIndex = NIW_ANIM_FREEZE; this->niwState = NIW_STATE_ANGRY2; this->actionFunc = EnNiw_SetupCuccoStorm; } - EnNiw_AnimateWingHead(this, play, this->nextAnimation); + EnNiw_AnimateWingHead(this, play, this->nextAnimIndex); } // the long crow with head back before they descend @@ -640,7 +640,7 @@ void EnNiw_SetupCuccoStorm(EnNiw* this, PlayState* play) { this->actionFunc = EnNiw_CuccoStorm; } - EnNiw_AnimateWingHead(this, play, this->nextAnimation); + EnNiw_AnimateWingHead(this, play, this->nextAnimIndex); } void EnNiw_CuccoStorm(EnNiw* this, PlayState* play) { @@ -697,7 +697,7 @@ void EnNiw_RunAway(EnNiw* this, PlayState* play) { } this->yawTowardsPlayer = Math_Atan2S(dX, dZ); EnNiw_UpdateRunning(this, play, false); - EnNiw_AnimateWingHead(this, play, NIW_ANIMATION_PECKING_AND_WAVING); + EnNiw_AnimateWingHead(this, play, NIW_ANIM_PECKING_AND_WAVING); } } @@ -877,7 +877,7 @@ void EnNiw_Update(Actor* thisx, PlayState* play) { this->headRotY = 0.0f; // clang-format off - this->isStormActive = this->unusedCounter28C = this->unk292 = this->unk29E = this->unk298 = this->isRunningRight = this->nextAnimation = 0; + this->isStormActive = this->unusedCounter28C = this->unk292 = this->unk29E = this->unk298 = this->isRunningRight = this->nextAnimIndex = 0; // clang-format on for (i = 0; i < 10; i++) { diff --git a/src/overlays/actors/ovl_En_Niw/z_en_niw.h b/src/overlays/actors/ovl_En_Niw/z_en_niw.h index 2be60884e..c1cec3b88 100644 --- a/src/overlays/actors/ovl_En_Niw/z_en_niw.h +++ b/src/overlays/actors/ovl_En_Niw/z_en_niw.h @@ -61,7 +61,7 @@ typedef struct EnNiw { /* 0x296 */ s16 unkToggle296; /* 0x298 */ s16 unk298; /* 0x29C */ s16 isRunningRight; // toggle (direction cucco is turning while running) - /* 0x29C */ u16 nextAnimation; + /* 0x29C */ u16 nextAnimIndex; /* 0x29E */ s16 unk29E; // three states 0/1/2 /* 0x2A0 */ s16 isStormActive; // we have a data value shared between all cucco, this shouldn't need to exist /* 0x2A2 */ s16 niwType; @@ -100,13 +100,12 @@ typedef struct EnNiw { // the attacking cuccos are not here, they are a different actor: [ ovl_En_Attack_Niw ] typedef enum { - /* 0 */ NIW_ANIMATION_STILL, - /* 1 */ NIW_ANIMATION_HEAD_PECKING, // forward and backward, feeding - /* 2 */ NIW_ANIMATION_PECKING_AND_WAVING, // wings move along their axis, like human hand waving - /* 3 */ NIW_ANIMATION_PECKING_AND_FORFLAPPING, // (unused) low (yaw based) flapping, forward and back - /* 4 */ NIW_ANIMATION_FREEZE, // used during Cucco Storm - /* 5 */ NIW_ANIMATION_PECKING_SLOW_FORFLAPPING, // wing speed half that of 3 - + /* 0 */ NIW_ANIM_STILL, + /* 1 */ NIW_ANIM_HEAD_PECKING, // forward and backward, feeding + /* 2 */ NIW_ANIM_PECKING_AND_WAVING, // wings move along their axis, like human hand waving + /* 3 */ NIW_ANIM_PECKING_AND_FORFLAPPING, // (unused) low (yaw based) flapping, forward and back + /* 4 */ NIW_ANIM_FREEZE, // used during Cucco Storm + /* 5 */ NIW_ANIM_PECKING_SLOW_FORFLAPPING, // wing speed half that of 3 } EnNiwHeadAndWingAnimationState; diff --git a/src/overlays/actors/ovl_En_Osn/z_en_osn.c b/src/overlays/actors/ovl_En_Osn/z_en_osn.c index 445787abe..b2fee9d8d 100644 --- a/src/overlays/actors/ovl_En_Osn/z_en_osn.c +++ b/src/overlays/actors/ovl_En_Osn/z_en_osn.c @@ -28,7 +28,7 @@ const ActorInit En_Osn_InitVars = { (ActorFunc)EnOsn_Draw, }; -static AnimationInfo sAnimations[] = { +static AnimationInfo sAnimationInfo[] = { { &object_osn_Anim_0201BC, 1.0f, 0.0f, 0.0f, ANIMMODE_LOOP, 0.0f }, { &object_osn_Anim_002F74, 1.0f, 0.0f, 0.0f, ANIMMODE_LOOP, 0.0f }, { &object_osn_Anim_0037C4, 1.0f, 0.0f, 0.0f, ANIMMODE_LOOP, 0.0f }, @@ -179,27 +179,27 @@ s32 func_80AD08B0(PlayState* play) { void func_80AD0998(EnOsn* this) { s16 curFrame = this->skelAnime.curFrame; - s16 lastFrame = Animation_GetLastFrame(sAnimations[this->unk_1EC].animation); + s16 lastFrame = Animation_GetLastFrame(sAnimationInfo[this->unk_1EC].animation); if (this->unk_1EC == 0x12 && curFrame == lastFrame) { this->unk_1EC = 0x13; - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, 0x13); + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, 0x13); } } void func_80AD0A24(EnOsn* this) { s16 curFrame = this->skelAnime.curFrame; - s16 lastFrame = Animation_GetLastFrame(sAnimations[this->unk_1EC].animation); + s16 lastFrame = Animation_GetLastFrame(sAnimationInfo[this->unk_1EC].animation); if (this->unk_1EC == 0x15 && curFrame == lastFrame) { this->unk_1EC = 0x16; - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, 0x16); + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, 0x16); } } void func_80AD0AB0(EnOsn* this) { s16 curFrame = this->skelAnime.curFrame; - s16 lastFrame = Animation_GetLastFrame(sAnimations[this->unk_1EC].animation); + s16 lastFrame = Animation_GetLastFrame(sAnimationInfo[this->unk_1EC].animation); if (curFrame == lastFrame) { this->unk_1FA -= 8; @@ -608,7 +608,7 @@ void func_80AD144C(EnOsn* this, PlayState* play) { u32 sp1C = Flags_GetSwitch(play, 0); this->cutscene = this->actor.cutscene; - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, 0); + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, 0); if (sp1C == 0) { this->actionFunc = func_80AD16A8; } else { @@ -728,7 +728,7 @@ void func_80AD16A8(EnOsn* this, PlayState* play) { this->unk_1EC = 0; break; } - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, this->unk_1EC); + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, this->unk_1EC); } if ((this->unk_1EC == 5) && (play->sceneNum == SCENE_SPOT00) && (gSaveContext.sceneSetupIndex == 0xB) && @@ -789,17 +789,19 @@ void EnOsn_Init(Actor* thisx, PlayState* play) { this->unk_1FA = 255; switch (ENOSN_GET_3(&this->actor)) { case 0: - if (((gSaveContext.save.entranceIndex == 0xC020) || (gSaveContext.save.entranceIndex == 0xC030)) || - (gSaveContext.save.entranceIndex == 0xC060)) { + if (((gSaveContext.save.entrance == ENTRANCE(CLOCK_TOWER_INTERIOR, 2)) || + (gSaveContext.save.entrance == ENTRANCE(CLOCK_TOWER_INTERIOR, 3))) || + (gSaveContext.save.entrance == ENTRANCE(CLOCK_TOWER_INTERIOR, 6))) { this->unk_1EA |= 1; } this->unk_1F0 = 1; if (play->sceneNum == SCENE_INSIDETOWER) { - if ((gSaveContext.save.entranceIndex == 0xC020) || (gSaveContext.save.entranceIndex == 0xC060)) { + if ((gSaveContext.save.entrance == ENTRANCE(CLOCK_TOWER_INTERIOR, 2)) || + (gSaveContext.save.entrance == ENTRANCE(CLOCK_TOWER_INTERIOR, 6))) { this->actionFunc = func_80AD16A8; return; } - if (gSaveContext.save.entranceIndex == 0xC030) { + if (gSaveContext.save.entrance == ENTRANCE(CLOCK_TOWER_INTERIOR, 3)) { func_80AD1398(this); this->actionFunc = func_80AD1634; return; @@ -812,13 +814,13 @@ void EnOsn_Init(Actor* thisx, PlayState* play) { case 1: this->unk_1EC = 0xF; - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, this->unk_1EC); + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, this->unk_1EC); this->actionFunc = EnOsn_Idle; break; case 2: this->unk_1EC = 0x10; - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, this->unk_1EC); + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, this->unk_1EC); this->actionFunc = EnOsn_Idle; break; diff --git a/src/overlays/actors/ovl_En_Ossan/z_en_ossan.c b/src/overlays/actors/ovl_En_Ossan/z_en_ossan.c index d704630ce..8b5a5e2e5 100644 --- a/src/overlays/actors/ovl_En_Ossan/z_en_ossan.c +++ b/src/overlays/actors/ovl_En_Ossan/z_en_ossan.c @@ -60,36 +60,36 @@ typedef enum { } EnOssanCutsceneState; 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; typedef enum { - /* 00 */ ANI_ANIMATION_STANDING_NORMAL_LOOP_1, - /* 01 */ ANI_ANIMATION_STANDING_NORMAL_LOOP_2, - /* 02 */ ANI_ANIMATION_STANDING_NORMAL_ONCE_FORWARD_1, - /* 03 */ ANI_ANIMATION_STANDING_NORMAL_ONCE_REVERSE, - /* 04 */ ANI_ANIMATION_STANDING_NORMAL_ONCE_FORWARD_2, - /* 05 */ ANI_ANIMATION_STANDING_NORMAL_LOOP_3, - /* 06 */ ANI_ANIMATION_STANDING_NORMAL_ONCE_FORWARD_3, - /* 07 */ ANI_ANIMATION_STANDING_NORMAL_LOOP_4, - /* 08 */ ANI_ANIMATION_APOLOGY_START, - /* 09 */ ANI_ANIMATION_APOLOGY_LOOP, - /* 10 */ ANI_ANIMATION_STANDING_NORMAL_ONCE_FORWARD_4, - /* 11 */ ANI_ANIMATION_STANDING_NORMAL_LOOP_5, - /* 12 */ ANI_ANIMATION_MAX + /* 0 */ ANI_ANIM_STANDING_NORMAL_LOOP_1, + /* 1 */ ANI_ANIM_STANDING_NORMAL_LOOP_2, + /* 2 */ ANI_ANIM_STANDING_NORMAL_ONCE_FORWARD_1, + /* 3 */ ANI_ANIM_STANDING_NORMAL_ONCE_REVERSE, + /* 4 */ ANI_ANIM_STANDING_NORMAL_ONCE_FORWARD_2, + /* 5 */ ANI_ANIM_STANDING_NORMAL_LOOP_3, + /* 6 */ ANI_ANIM_STANDING_NORMAL_ONCE_FORWARD_3, + /* 7 */ ANI_ANIM_STANDING_NORMAL_LOOP_4, + /* 8 */ ANI_ANIM_APOLOGY_START, + /* 9 */ ANI_ANIM_APOLOGY_LOOP, + /* 10 */ ANI_ANIM_STANDING_NORMAL_ONCE_FORWARD_4, + /* 11 */ ANI_ANIM_STANDING_NORMAL_LOOP_5, + /* 12 */ ANI_ANIM_MAX } AniAnimation; const ActorInit En_Ossan_InitVars = { @@ -104,7 +104,7 @@ const ActorInit En_Ossan_InitVars = { (ActorFunc)NULL, }; -static AnimationInfoS sCuriosityShopManAnimations[] = { +static AnimationInfoS sCuriosityShopManAnimationInfo[] = { { &gFsnIdleAnim, 1.0f, 0, -1, ANIMMODE_LOOP, 0 }, { &gFsnScratchBackAnim, 1.0f, 0, -1, ANIMMODE_LOOP, 0 }, { &gFsnTurnAroundAnim, 1.0f, 0, -1, ANIMMODE_ONCE, 0 }, @@ -120,7 +120,7 @@ static AnimationInfoS sCuriosityShopManAnimations[] = { { &gFsnMakeOfferAnim, 1.0f, 0, -1, ANIMMODE_ONCE, 0 }, }; -static AnimationInfoS sPartTimerAnimations[] = { +static AnimationInfoS sPartTimerAnimationInfo[] = { { &gAniStandingNormalAnim, 1.0f, 0, -1, ANIMMODE_LOOP, -10 }, { &gAniStandingNormalAnim, 1.0f, 0, -1, ANIMMODE_LOOP, -10 }, { &gAniStandingNormalAnim, 1.0f, 0, -1, ANIMMODE_ONCE, 0 }, @@ -137,7 +137,7 @@ static AnimationInfoS sPartTimerAnimations[] = { static s16 sObjectIds[] = { OBJECT_FSN, OBJECT_ANI }; -static AnimationInfoS* sAnimations[] = { sCuriosityShopManAnimations, sPartTimerAnimations }; +static AnimationInfoS* sAnimationInfo[] = { sCuriosityShopManAnimationInfo, sPartTimerAnimationInfo }; static f32 sActorScales[] = { 0.01f, 0.01f }; @@ -389,11 +389,11 @@ void EnOssan_Idle(EnOssan* this, PlayState* play) { } void EnOssan_BeginInteraction(EnOssan* this, PlayState* play) { - AnimationInfoS* animations = sAnimations[this->actor.params]; + AnimationInfoS* animationInfo = sAnimationInfo[this->actor.params]; s16 curFrame = this->skelAnime.curFrame; - s16 frameCount = Animation_GetLastFrame(animations[this->animationIndex].animation); + s16 frameCount = Animation_GetLastFrame(animationInfo[this->animIndex].animation); - if (this->animationIndex == FSN_ANIMATION_TURN_AROUND_REVERSE) { + if (this->animIndex == FSN_ANIM_TURN_AROUND_REVERSE) { frameCount = 0; } if (this->cutsceneState == ENOSSAN_CUTSCENESTATE_WAITING) { @@ -406,40 +406,40 @@ void EnOssan_BeginInteraction(EnOssan* this, PlayState* play) { } if (this->actor.params == ENOSSAN_CURIOSITY_SHOP_MAN) { if (curFrame == frameCount) { - switch (this->animationIndex) { - case FSN_ANIMATION_SCRATCH_BACK: - this->animationIndex = FSN_ANIMATION_TURN_AROUND_FORWARD; - SubS_ChangeAnimationByInfoS(&this->skelAnime, animations, FSN_ANIMATION_TURN_AROUND_FORWARD); + switch (this->animIndex) { + case FSN_ANIM_SCRATCH_BACK: + this->animIndex = FSN_ANIM_TURN_AROUND_FORWARD; + SubS_ChangeAnimationByInfoS(&this->skelAnime, animationInfo, FSN_ANIM_TURN_AROUND_FORWARD); break; - case FSN_ANIMATION_TURN_AROUND_FORWARD: + case FSN_ANIM_TURN_AROUND_FORWARD: EnOssan_SetHaveMet(this); this->textId = EnOssan_CuriosityShopMan_GetWelcome(this, play); - SubS_ChangeAnimationByInfoS(&this->skelAnime, animations, this->animationIndex); + SubS_ChangeAnimationByInfoS(&this->skelAnime, animationInfo, this->animIndex); break; - case FSN_ANIMATION_HANDS_ON_COUNTER_START: - case FSN_ANIMATION_HAND_ON_FACE_START: - case FSN_ANIMATION_LEAN_FORWARD_START: - case FSN_ANIMATION_SLAM_COUNTER_START: - this->animationIndex++; - SubS_ChangeAnimationByInfoS(&this->skelAnime, animations, this->animationIndex); + case FSN_ANIM_HANDS_ON_COUNTER_START: + case FSN_ANIM_HAND_ON_FACE_START: + case FSN_ANIM_LEAN_FORWARD_START: + case FSN_ANIM_SLAM_COUNTER_START: + this->animIndex++; + SubS_ChangeAnimationByInfoS(&this->skelAnime, animationInfo, this->animIndex); Message_StartTextbox(play, this->textId, &this->actor); EnOssan_SetupStartShopping(play, this, false); break; - case FSN_ANIMATION_HANDS_ON_COUNTER_LOOP: - case FSN_ANIMATION_HAND_ON_FACE_LOOP: - case FSN_ANIMATION_LEAN_FORWARD_LOOP: - case FSN_ANIMATION_SLAM_COUNTER_LOOP: - this->animationIndex = FSN_ANIMATION_TURN_AROUND_REVERSE; - SubS_ChangeAnimationByInfoS(&this->skelAnime, animations, FSN_ANIMATION_TURN_AROUND_REVERSE); + case FSN_ANIM_HANDS_ON_COUNTER_LOOP: + case FSN_ANIM_HAND_ON_FACE_LOOP: + case FSN_ANIM_LEAN_FORWARD_LOOP: + case FSN_ANIM_SLAM_COUNTER_LOOP: + this->animIndex = FSN_ANIM_TURN_AROUND_REVERSE; + SubS_ChangeAnimationByInfoS(&this->skelAnime, animationInfo, FSN_ANIM_TURN_AROUND_REVERSE); break; - case FSN_ANIMATION_TURN_AROUND_REVERSE: - this->animationIndex = FSN_ANIMATION_SCRATCH_BACK; - SubS_ChangeAnimationByInfoS(&this->skelAnime, animations, FSN_ANIMATION_SCRATCH_BACK); + case FSN_ANIM_TURN_AROUND_REVERSE: + this->animIndex = FSN_ANIM_SCRATCH_BACK; + SubS_ChangeAnimationByInfoS(&this->skelAnime, animationInfo, FSN_ANIM_SCRATCH_BACK); EnOssan_SetupAction(this, EnOssan_Idle); break; default: - this->animationIndex = FSN_ANIMATION_SCRATCH_BACK; - SubS_ChangeAnimationByInfoS(&this->skelAnime, animations, FSN_ANIMATION_SCRATCH_BACK); + this->animIndex = FSN_ANIM_SCRATCH_BACK; + SubS_ChangeAnimationByInfoS(&this->skelAnime, animationInfo, FSN_ANIM_SCRATCH_BACK); EnOssan_SetupAction(this, EnOssan_Idle); break; } @@ -557,16 +557,16 @@ u8 EnOssan_CursorLeft(EnOssan* this, u8 cursorIdx, u8 shelfSlotMax) { } void EnOssan_Hello(EnOssan* this, PlayState* play) { - AnimationInfoS* animations = sAnimations[this->actor.params]; + AnimationInfoS* animationInfo = sAnimationInfo[this->actor.params]; u8 talkState = Message_GetState(&play->msgCtx); s32 pad; Player* player = GET_PLAYER(play); EnOssan_RotateHead(this, play); if ((talkState == TEXT_STATE_5) && Message_ShouldAdvance(play)) { - if ((this->animationIndex == ANI_ANIMATION_APOLOGY_LOOP) && (this->actor.params == ENOSSAN_PART_TIME_WORKER)) { - this->animationIndex = ANI_ANIMATION_STANDING_NORMAL_LOOP_2; - SubS_ChangeAnimationByInfoS(&this->skelAnime, animations, 1); + if ((this->animIndex == ANI_ANIM_APOLOGY_LOOP) && (this->actor.params == ENOSSAN_PART_TIME_WORKER)) { + this->animIndex = ANI_ANIM_STANDING_NORMAL_LOOP_2; + SubS_ChangeAnimationByInfoS(&this->skelAnime, animationInfo, 1); } this->flags &= ~LOOKED_AT_PLAYER; if (player->transformation == PLAYER_FORM_DEKU) { @@ -582,24 +582,24 @@ void EnOssan_Hello(EnOssan* this, PlayState* play) { } if ((talkState == TEXT_STATE_10) && (this->actor.params == ENOSSAN_PART_TIME_WORKER) && (player->transformation == PLAYER_FORM_ZORA) && Message_ShouldAdvance(play)) { - this->animationIndex = ANI_ANIMATION_APOLOGY_LOOP; - SubS_ChangeAnimationByInfoS(&this->skelAnime, animations, ANI_ANIMATION_APOLOGY_LOOP); + this->animIndex = ANI_ANIM_APOLOGY_LOOP; + SubS_ChangeAnimationByInfoS(&this->skelAnime, animationInfo, ANI_ANIM_APOLOGY_LOOP); } - if ((this->animationIndex == FSN_ANIMATION_SLAM_COUNTER_LOOP) && Animation_OnFrame(&this->skelAnime, 18.0f)) { + if ((this->animIndex == FSN_ANIM_SLAM_COUNTER_LOOP) && Animation_OnFrame(&this->skelAnime, 18.0f)) { Actor_PlaySfxAtPos(&this->actor, NA_SE_EV_HANKO); } } s32 EnOssan_FacingShopkeeperDialogResult(EnOssan* this, PlayState* play) { - AnimationInfoS* animations = sAnimations[this->actor.params]; + AnimationInfoS* animationInfo = sAnimationInfo[this->actor.params]; Player* player = GET_PLAYER(play); switch (play->msgCtx.choiceIndex) { case 0: func_8019F208(); if ((this->actor.params == ENOSSAN_PART_TIME_WORKER) && (player->transformation == PLAYER_FORM_ZORA)) { - this->animationIndex = ANI_ANIMATION_APOLOGY_LOOP; - SubS_ChangeAnimationByInfoS(&this->skelAnime, animations, 9); + this->animIndex = ANI_ANIM_APOLOGY_LOOP; + SubS_ChangeAnimationByInfoS(&this->skelAnime, animationInfo, 9); } EnOssan_SetupAction(this, EnOssan_TalkToShopkeeper); func_80151938(play, sTalkOptionTextIds[this->actor.params]); @@ -663,12 +663,12 @@ void EnOssan_FaceShopkeeper(EnOssan* this, PlayState* play) { } void EnOssan_TalkToShopkeeper(EnOssan* this, PlayState* play) { - AnimationInfoS* animations = sAnimations[this->actor.params]; + AnimationInfoS* animationInfo = sAnimationInfo[this->actor.params]; if ((Message_GetState(&play->msgCtx) == TEXT_STATE_5) && Message_ShouldAdvance(play)) { - if ((this->animationIndex == ANI_ANIMATION_APOLOGY_LOOP) && (this->actor.params == ENOSSAN_PART_TIME_WORKER)) { - this->animationIndex = ANI_ANIMATION_STANDING_NORMAL_LOOP_2; - SubS_ChangeAnimationByInfoS(&this->skelAnime, animations, 1); + if ((this->animIndex == ANI_ANIM_APOLOGY_LOOP) && (this->actor.params == ENOSSAN_PART_TIME_WORKER)) { + this->animIndex = ANI_ANIM_STANDING_NORMAL_LOOP_2; + SubS_ChangeAnimationByInfoS(&this->skelAnime, animationInfo, 1); } EnOssan_StartShopping(play, this); } @@ -1109,7 +1109,7 @@ void EnOssan_SetupItemPurchased(EnOssan* this, PlayState* play) { this->cutscene = this->lookToShopkeeperCutscene; ActorCutscene_SetIntentToPlay(this->cutscene); } - func_800B85E0(&this->actor, play, 400.0f, EXCH_ITEM_MINUS1); + func_800B85E0(&this->actor, play, 400.0f, PLAYER_AP_MINUS1); } } @@ -1132,7 +1132,7 @@ void EnOssan_ContinueShopping(EnOssan* this, PlayState* play) { player->stateFlags2 |= 0x20000000; Message_StartTextbox(play, this->textId, &this->actor); EnOssan_SetupStartShopping(play, this, true); - func_800B85E0(&this->actor, play, 100.0f, EXCH_ITEM_MINUS1); + func_800B85E0(&this->actor, play, 100.0f, PLAYER_AP_MINUS1); break; case 1: default: @@ -1150,7 +1150,7 @@ void EnOssan_ContinueShopping(EnOssan* this, PlayState* play) { player->stateFlags2 |= 0x20000000; Message_StartTextbox(play, this->textId, &this->actor); EnOssan_SetupStartShopping(play, this, true); - func_800B85E0(&this->actor, play, 100.0f, EXCH_ITEM_MINUS1); + func_800B85E0(&this->actor, play, 100.0f, PLAYER_AP_MINUS1); } } @@ -1174,7 +1174,7 @@ void EnOssan_ItemPurchased(EnOssan* this, PlayState* play) { if (Actor_ProcessTalkRequest(&this->actor, &play->state)) { func_80151938(play, 0x642); } else { - func_800B85E0(&this->actor, play, 400.0f, EXCH_ITEM_MINUS1); + func_800B85E0(&this->actor, play, 400.0f, PLAYER_AP_MINUS1); } } @@ -1379,31 +1379,31 @@ u16 EnOssan_CuriosityShopMan_GetWelcome(EnOssan* this, PlayState* play) { u16 textId = Text_GetFaceReaction(play, 0x2F); if (textId != 0) { - this->animationIndex = FSN_ANIMATION_HANDS_ON_COUNTER_START; + this->animIndex = FSN_ANIM_HANDS_ON_COUNTER_START; this->flags |= END_INTERACTION; return textId; } switch (player->transformation) { case PLAYER_FORM_DEKU: - this->animationIndex = FSN_ANIMATION_SLAM_COUNTER_START; + this->animIndex = FSN_ANIM_SLAM_COUNTER_START; if (gSaveContext.save.weekEventReg[18] & 0x10) { return sWelcomeDekuTextIds[ENOSSAN_CURIOSITY_SHOP_MAN]; } return sWelcomeDekuFirstTimeTextIds[ENOSSAN_CURIOSITY_SHOP_MAN]; case PLAYER_FORM_ZORA: - this->animationIndex = FSN_ANIMATION_LEAN_FORWARD_START; + this->animIndex = FSN_ANIM_LEAN_FORWARD_START; if (gSaveContext.save.weekEventReg[18] & 8) { return sWelcomeZoraTextIds[ENOSSAN_CURIOSITY_SHOP_MAN]; } return sWelcomeZoraFirstTimeTextIds[ENOSSAN_CURIOSITY_SHOP_MAN]; case PLAYER_FORM_GORON: - this->animationIndex = FSN_ANIMATION_HAND_ON_FACE_START; + this->animIndex = FSN_ANIM_HAND_ON_FACE_START; if (gSaveContext.save.weekEventReg[18] & 4) { return sWelcomeGoronTextIds[ENOSSAN_CURIOSITY_SHOP_MAN]; } return sWelcomeGoronFirstTimeTextIds[ENOSSAN_CURIOSITY_SHOP_MAN]; } - this->animationIndex = FSN_ANIMATION_HANDS_ON_COUNTER_START; + this->animIndex = FSN_ANIM_HANDS_ON_COUNTER_START; return sWelcomeHumanTextIds[ENOSSAN_CURIOSITY_SHOP_MAN]; } @@ -1526,8 +1526,8 @@ void EnOssan_InitShop(EnOssan* this, PlayState* play) { this->shopItemSelectedTween = 0.0f; Actor_SetScale(&this->actor, sActorScales[this->actor.params]); - this->animationIndex = 1; // FSN_ANIMATION_SCRATCH_BACK and ANI_ANIMATION_STANDING_NORMAL_LOOP_2 - SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimations[this->actor.params], 1); + this->animIndex = 1; // FSN_ANIM_SCRATCH_BACK and ANI_ANIM_STANDING_NORMAL_LOOP_2 + SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimationInfo[this->actor.params], 1); EnOssan_SpawnShopItems(this, play, shopItems); this->blinkTimer = 20; this->eyeTexIndex = 0; diff --git a/src/overlays/actors/ovl_En_Ossan/z_en_ossan.h b/src/overlays/actors/ovl_En_Ossan/z_en_ossan.h index 32c6fc288..539906ea8 100644 --- a/src/overlays/actors/ovl_En_Ossan/z_en_ossan.h +++ b/src/overlays/actors/ovl_En_Ossan/z_en_ossan.h @@ -56,7 +56,7 @@ typedef struct EnOssan { /* 0x2F8 */ s16 limbRotTableZ[19]; /* 0x31E */ Vec3s jointTable[ENOSSAN_LIMB_MAX]; /* 0x390 */ Vec3s morphTable[ENOSSAN_LIMB_MAX]; - /* 0x402 */ s16 animationIndex; + /* 0x402 */ s16 animIndex; /* 0x404 */ Vec3s partTimerHeadRot; /* 0x40A */ u16 flags; } EnOssan; // size = 0x40C diff --git a/src/overlays/actors/ovl_En_Ot/z_en_ot.c b/src/overlays/actors/ovl_En_Ot/z_en_ot.c index ad10226ed..8c2465585 100644 --- a/src/overlays/actors/ovl_En_Ot/z_en_ot.c +++ b/src/overlays/actors/ovl_En_Ot/z_en_ot.c @@ -163,7 +163,7 @@ void EnOt_Init(Actor* thisx, PlayState* play) { this->actor.colChkInfo.mass = MASS_IMMOVABLE; this->actor.gravity = 0.0f; SubS_FillCutscenesList(&this->actor, this->cutscenes, ARRAY_COUNT(this->cutscenes)); - SubS_ChangeAnimationBySpeedInfo(&this->skelAnime, sAnimations, 0, &this->animIdx); + SubS_ChangeAnimationBySpeedInfo(&this->skelAnime, sAnimations, 0, &this->animIndex); this->skelAnime.curFrame = Rand_ZeroOne() * this->skelAnime.endFrame; this->lightNode = LightContext_InsertLight(play, &play->lightCtx, &this->lightInfo); this->unk_744.r = 255; @@ -300,7 +300,7 @@ void func_80B5BB38(Color_RGB8* arg0, Color_RGB8* arg1, f32 arg2) { } void func_80B5BDA8(EnOt* this, PlayState* play) { - SubS_ChangeAnimationBySpeedInfo(&this->skelAnime, sAnimations, 1, &this->animIdx); + SubS_ChangeAnimationBySpeedInfo(&this->skelAnime, sAnimations, 1, &this->animIndex); SubS_FillCutscenesList(&this->actor, this->cutscenes, ARRAY_COUNT(this->cutscenes)); this->actionFunc = func_80B5BE04; } @@ -322,7 +322,7 @@ void func_80B5BE04(EnOt* this, PlayState* play) { } void func_80B5BE88(EnOt* this, PlayState* play) { - SubS_ChangeAnimationBySpeedInfo(&this->skelAnime, sAnimations, 1, &this->animIdx); + SubS_ChangeAnimationBySpeedInfo(&this->skelAnime, sAnimations, 1, &this->animIndex); this->actionFunc = func_80B5BED4; } @@ -337,7 +337,7 @@ void func_80B5BED4(EnOt* this, PlayState* play) { void func_80B5BF60(EnOt* this, PlayState* play) { this->unk_32C |= 0x40; - SubS_ChangeAnimationBySpeedInfo(&this->skelAnime, sAnimations, 0, &this->animIdx); + SubS_ChangeAnimationBySpeedInfo(&this->skelAnime, sAnimations, 0, &this->animIndex); this->actionFunc = func_80B5BFB8; } @@ -410,8 +410,8 @@ void func_80B5C25C(EnOt* this, PlayState* play) { if ((this->unk_33C == 2) && (this->unk_32C & 0x80) && (this->unk_360->unk_32C & 0x80)) { this->unk_32C |= 0x100; this->unk_360->unk_32C |= 0x100; - SubS_ChangeAnimationBySpeedInfo(&this->skelAnime, sAnimations, 2, &this->animIdx); - SubS_ChangeAnimationBySpeedInfo(&this->unk_360->skelAnime, sAnimations, 2, &this->unk_360->animIdx); + SubS_ChangeAnimationBySpeedInfo(&this->skelAnime, sAnimations, 2, &this->animIndex); + SubS_ChangeAnimationBySpeedInfo(&this->unk_360->skelAnime, sAnimations, 2, &this->unk_360->animIndex); this->actor.flags |= ACTOR_FLAG_8000000; this->actor.flags &= ~(ACTOR_FLAG_1 | ACTOR_FLAG_8); this->unk_360->actor.flags |= ACTOR_FLAG_8000000; @@ -489,7 +489,7 @@ void func_80B5C64C(EnOt* this, PlayState* play) { void func_80B5C684(EnOt* this, PlayState* play) { this->actor.speedXZ = 0.0f; - SubS_ChangeAnimationBySpeedInfo(&this->skelAnime, sAnimations, 0, &this->animIdx); + SubS_ChangeAnimationBySpeedInfo(&this->skelAnime, sAnimations, 0, &this->animIndex); this->actionFunc = func_80B5C6DC; } @@ -635,7 +635,7 @@ void func_80B5CCA0(EnOt* this, PlayState* play) { } void func_80B5CCF4(EnOt* this, PlayState* play) { - SubS_ChangeAnimationBySpeedInfo(&this->skelAnime, sAnimations, 0, &this->animIdx); + SubS_ChangeAnimationBySpeedInfo(&this->skelAnime, sAnimations, 0, &this->animIndex); this->actionFunc = func_80B5CD40; } @@ -676,7 +676,7 @@ void func_80B5CD40(EnOt* this, PlayState* play) { void func_80B5CE6C(EnOt* this, PlayState* play) { this->unk_384 = 0; this->unk_32C |= 0x20; - SubS_ChangeAnimationBySpeedInfo(&this->skelAnime, sAnimations, 0, &this->animIdx); + SubS_ChangeAnimationBySpeedInfo(&this->skelAnime, sAnimations, 0, &this->animIndex); this->actionFunc = func_80B5CEC8; } @@ -731,7 +731,7 @@ void func_80B5CEC8(EnOt* this, PlayState* play) { } void func_80B5D114(EnOt* this, PlayState* play) { - SubS_ChangeAnimationBySpeedInfo(&this->skelAnime, sAnimations, 0, &this->animIdx); + SubS_ChangeAnimationBySpeedInfo(&this->skelAnime, sAnimations, 0, &this->animIndex); this->actionFunc = func_80B5D160; } @@ -886,7 +886,7 @@ void func_80B5D648(EnOt* this, PlayState* play) { this->actorPath.pointOffset.z = 0.0f; this->actor.gravity = 0.0f; this->actor.speedXZ = 0.0f; - SubS_ChangeAnimationBySpeedInfo(&this->skelAnime, sAnimations, 1, &this->animIdx); + SubS_ChangeAnimationBySpeedInfo(&this->skelAnime, sAnimations, 1, &this->animIndex); this->actor.flags |= ACTOR_FLAG_8000000; this->actor.flags &= ~(ACTOR_FLAG_1 | ACTOR_FLAG_8); Flags_SetSwitch(play, ENOT_GET_3F80(&this->actor)); @@ -929,7 +929,7 @@ void EnOt_Update(Actor* thisx, PlayState* play) { s32 pad; EnOt* this = THIS; - if ((this->animIdx == 1) && Animation_OnFrame(&this->skelAnime, this->skelAnime.endFrame)) { + if ((this->animIndex == 1) && Animation_OnFrame(&this->skelAnime, this->skelAnime.endFrame)) { Actor_PlaySfxAtPos(&this->actor, NA_SE_EV_SEAHORSE_SWIM); } diff --git a/src/overlays/actors/ovl_En_Ot/z_en_ot.h b/src/overlays/actors/ovl_En_Ot/z_en_ot.h index e123b8871..5399e2278 100644 --- a/src/overlays/actors/ovl_En_Ot/z_en_ot.h +++ b/src/overlays/actors/ovl_En_Ot/z_en_ot.h @@ -35,7 +35,7 @@ typedef struct EnOt { /* 0x18C */ ColliderCylinder collider; /* 0x1D8 */ Vec3s jointTable[19]; /* 0x24A */ Vec3s morphTable[19]; - /* 0x2BC */ s32 animIdx; + /* 0x2BC */ s32 animIndex; /* 0x2C0 */ ActorPathing actorPath; /* 0x32C */ u16 unk_32C; /* 0x330 */ Vec3f unk_330; diff --git a/src/overlays/actors/ovl_En_Owl/z_en_owl.c b/src/overlays/actors/ovl_En_Owl/z_en_owl.c index 6b9bce5ab..f1bfcd57f 100644 --- a/src/overlays/actors/ovl_En_Owl/z_en_owl.c +++ b/src/overlays/actors/ovl_En_Owl/z_en_owl.c @@ -229,7 +229,7 @@ s32 func_8095A978(EnOwl* this, PlayState* play, u16 textId, f32 targetDist, f32 this->actor.textId = textId; if (this->actor.xzDistToPlayer < targetDist) { this->actor.flags |= ACTOR_FLAG_10000; - func_800B8500(&this->actor, play, targetDist, arg4, EXCH_ITEM_NONE); + func_800B8500(&this->actor, play, targetDist, arg4, PLAYER_AP_NONE); } return false; @@ -242,7 +242,7 @@ s32 func_8095A9FC(EnOwl* this, PlayState* play, u16 textId) { this->actor.textId = textId; if (this->actor.xzDistToPlayer < 120.0f) { - func_800B8500(&this->actor, play, 350.0f, 1000.0f, EXCH_ITEM_NONE); + func_800B8500(&this->actor, play, 350.0f, 1000.0f, PLAYER_AP_NONE); } return false; @@ -505,7 +505,7 @@ void func_8095B574(EnOwl* this, PlayState* play) { this->unk_406 = 2; } else if (this->actor.xzDistToPlayer < 200.0f) { this->actor.flags |= ACTOR_FLAG_10000; - func_800B8500(&this->actor, play, 200.0f, 400.0f, EXCH_ITEM_NONE); + func_800B8500(&this->actor, play, 200.0f, 400.0f, PLAYER_AP_NONE); } else { this->actor.flags &= ~ACTOR_FLAG_10000; } @@ -718,11 +718,11 @@ void func_8095BE0C(EnOwl* this, PlayState* play) { this->actionFlags |= 0x40; } else if (this->actor.textId == 0xBF0) { if (this->actor.isTargeted) { - func_800B8500(&this->actor, play, 200.0f, 200.0f, EXCH_ITEM_NONE); + func_800B8500(&this->actor, play, 200.0f, 200.0f, PLAYER_AP_NONE); } } else if (this->actor.xzDistToPlayer < 200.0f) { this->actor.flags |= ACTOR_FLAG_10000; - func_800B8500(&this->actor, play, 200.0f, 200.0f, EXCH_ITEM_NONE); + func_800B8500(&this->actor, play, 200.0f, 200.0f, PLAYER_AP_NONE); } else { this->actor.flags &= ~ACTOR_FLAG_10000; } diff --git a/src/overlays/actors/ovl_En_Pamera/z_en_pamera.c b/src/overlays/actors/ovl_En_Pamera/z_en_pamera.c index 603d08fb5..075ced540 100644 --- a/src/overlays/actors/ovl_En_Pamera/z_en_pamera.c +++ b/src/overlays/actors/ovl_En_Pamera/z_en_pamera.c @@ -105,7 +105,7 @@ static CollisionCheckInfoInit2 sColChkInfoInit2 = { 0, 0, 0, 0, MASS_IMMOVABLE, }; -static AnimationInfo sAnimations[] = { +static AnimationInfo sAnimationInfo[] = { { &object_pamera_Anim_0005BC, 1.0f, 0, 0.0f, ANIMMODE_LOOP, -4.0f }, { &object_pamera_Anim_008AE0, 1.0f, 0, 0.0f, ANIMMODE_LOOP, -4.0f }, { &object_pamera_Anim_008E38, 1.0f, 0, 0.0f, ANIMMODE_LOOP, -4.0f }, @@ -155,12 +155,14 @@ void EnPamera_Init(Actor* thisx, PlayState* play) { func_80BD8658(this); if (1) {} if (!(gSaveContext.save.weekEventReg[14] & 4) || (gSaveContext.save.weekEventReg[52] & 0x20) || - (gSaveContext.save.weekEventReg[75] & 0x20) || (gSaveContext.save.entranceIndex == 0x2090)) { + (gSaveContext.save.weekEventReg[75] & 0x20) || (gSaveContext.save.entrance == ENTRANCE(IKANA_CANYON, 9))) { Actor_MarkForDeath(&this->actor); } if (gSaveContext.save.weekEventReg[61] & 4) { - if (!(gSaveContext.save.weekEventReg[59] & 1) || (gSaveContext.save.entranceIndex != 0x2020)) { - if ((gSaveContext.save.entranceIndex != 0x2020) && (gSaveContext.save.weekEventReg[59] & 1)) { + if (!(gSaveContext.save.weekEventReg[59] & 1) || + (gSaveContext.save.entrance != ENTRANCE(IKANA_CANYON, 2))) { + if ((gSaveContext.save.entrance != ENTRANCE(IKANA_CANYON, 2)) && + (gSaveContext.save.weekEventReg[59] & 1)) { gSaveContext.save.weekEventReg[59] &= (u8)~1; } func_80BD8700(this); @@ -232,7 +234,7 @@ void EnPamera_Destroy(Actor* thisx, PlayState* play) { void func_80BD8700(EnPamera* this) { this->hideInisdeTimer = 0; this->actor.flags &= ~ACTOR_FLAG_1; - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, 0); + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, 0); this->actionFunc = func_80BD8758; } @@ -243,7 +245,7 @@ void func_80BD8758(EnPamera* this, PlayState* play) { Camera_SetToTrackActor(Play_GetCamera(play, ActorCutscene_GetCurrentSubCamId(this->cutscenes[0])), &this->actor); this->actor.speedXZ = 1.5f; - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, 1); + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, 1); this->actor.shape.rot.y = this->actor.home.rot.y; this->actor.world.rot.y = this->actor.home.rot.y; func_80BD9338(this, play); @@ -252,7 +254,7 @@ void func_80BD8758(EnPamera* this, PlayState* play) { ActorCutscene_SetIntentToPlay(this->cutscenes[0]); } else { this->actor.speedXZ = 1.5f; - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, 1); + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, 1); this->actor.shape.rot.y = this->actor.home.rot.y; this->actor.world.rot.y = this->actor.home.rot.y; func_80BD9338(this, play); @@ -274,7 +276,7 @@ void func_80BD8758(EnPamera* this, PlayState* play) { void func_80BD8908(EnPamera* this) { this->actor.draw = EnPamera_Draw; this->actor.flags |= ACTOR_FLAG_1; - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, 1); + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, 1); this->actionFunc = func_80BD8964; } @@ -287,14 +289,14 @@ void func_80BD8964(EnPamera* this, PlayState* play) { if (Math_Vec3f_StepTo(&this->actor.world.pos, &vec, 1.0f) < 5.0f) { this->actor.speedXZ = 1.5f; - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, 1); + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, 1); gSaveContext.save.weekEventReg[59] |= 1; func_80BD8B50(this); } } void func_80BD8A38(EnPamera* this) { - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, 1); + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, 1); this->actionFunc = func_80BD8A7C; } @@ -341,14 +343,14 @@ void func_80BD8B70(EnPamera* this, PlayState* play) { void func_80BD8CCC(EnPamera* this) { this->hideInisdeTimer = 0; this->actor.speedXZ = 0.0f; - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, 3); + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, 3); this->actionFunc = func_80BD8D1C; } void func_80BD8D1C(EnPamera* this, PlayState* play) { if (this->hideInisdeTimer++ > 200) { this->actor.speedXZ = 1.5f; - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, 1); + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, 1); func_80BD8D80(this); } } @@ -384,14 +386,14 @@ void func_80BD8DB0(EnPamera* this, PlayState* play) { void EnPamera_LookDownWell(EnPamera* this) { func_80BD93CC(this, 1, 1); - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, 4); + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, 4); this->actionFunc = func_80BD8F60; } void func_80BD8F60(EnPamera* this, PlayState* play) { Math_SmoothStepToS(&this->actor.shape.rot.y, this->actor.yawTowardsPlayer, 0xA, 0x3000, 0x1000); if (Animation_OnFrame(&this->skelAnime, this->skelAnime.endFrame)) { - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, 2); + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, 2); this->actor.speedXZ = 3.0f; func_80BD93CC(this, 0, 0); func_80BD8D80(this); @@ -408,7 +410,7 @@ void func_80BD8FF0(EnPamera* this) { pameraYaw = Math_Vec3f_Yaw(&pameraPos, &this->actor.world.pos); this->actor.shape.rot.y = pameraYaw; this->actor.world.rot.y = pameraYaw; - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, 3); + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, 3); this->actionFunc = func_80BD909C; } @@ -684,7 +686,7 @@ void func_80BD9B4C(EnPamera* this, PlayState* play) { } void func_80BD9C70(EnPamera* this, PlayState* play) { - play->nextEntranceIndex = 0x2020; + play->nextEntrance = ENTRANCE(IKANA_CANYON, 2); play->transitionTrigger = TRANS_TRIGGER_START; play->transitionType = TRANS_TYPE_70; gSaveContext.nextTransitionType = TRANS_TYPE_02; @@ -747,7 +749,7 @@ void func_80BD9E78(EnPamera* this, PlayState* play) { } void func_80BD9E88(EnPamera* this) { - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, 0); + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, 0); this->unk_31E = 0; this->setupFunc = func_80BD9ED0; } @@ -756,7 +758,7 @@ void func_80BD9ED0(EnPamera* this, PlayState* play) { } void func_80BD9EE0(EnPamera* this) { - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, 5); + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, 5); func_80BD93CC(this, 1, 0); this->unk_31E = 1; this->setupFunc = func_80BD9F3C; @@ -773,14 +775,14 @@ void func_80BD9F3C(EnPamera* this, PlayState* play) { if (Animation_OnFrame(&this->skelAnime, this->skelAnime.endFrame)) { this->unk_31E = 0; func_80BD93CC(this, 0, 0); - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, 6); + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, 6); } } } void func_80BDA038(EnPamera* this) { func_80BD93CC(this, 0, 1); - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, 7); + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, 7); this->unk_31E = 0; this->setupFunc = func_80BDA090; } @@ -790,7 +792,7 @@ void func_80BDA090(EnPamera* this, PlayState* play) { void func_80BDA0A0(EnPamera* this) { func_80BD93CC(this, 0, 1); - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, 8); + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, 8); this->unk_31E = 1; this->setupFunc = func_80BDA0FC; } @@ -800,7 +802,7 @@ void func_80BDA0FC(EnPamera* this, PlayState* play) { if (Animation_OnFrame(&this->skelAnime, this->skelAnime.endFrame)) { this->unk_31E = 0; func_80BD93CC(this, 0, 0); - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, 6); + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, 6); } } } @@ -808,7 +810,7 @@ void func_80BDA0FC(EnPamera* this, PlayState* play) { void func_80BDA170(EnPamera* this) { this->unk_31E = 1; func_80BD93CC(this, 0, 1); - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, 9); + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, 9); this->setupFunc = func_80BDA1C8; } @@ -821,7 +823,7 @@ void func_80BDA1C8(EnPamera* this, PlayState* play) { if (Animation_OnFrame(&this->skelAnime, this->skelAnime.endFrame)) { this->unk_31E = 0; func_80BD93CC(this, 0, 0); - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, 10); + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, 10); } } } @@ -829,7 +831,7 @@ void func_80BDA1C8(EnPamera* this, PlayState* play) { void func_80BDA288(EnPamera* this) { this->unk_31E = 1; func_80BD93CC(this, 0, 0); - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, 11); + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, 11); this->setupFunc = func_80BDA2E0; } @@ -837,7 +839,7 @@ void func_80BDA2E0(EnPamera* this, PlayState* play) { if (this->unk_31E == 1) { if (Animation_OnFrame(&this->skelAnime, this->skelAnime.endFrame)) { this->unk_31E = 0; - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, 12); + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, 12); } } } diff --git a/src/overlays/actors/ovl_En_Pm/z_en_pm.c b/src/overlays/actors/ovl_En_Pm/z_en_pm.c index e1eadb5cf..3995207e9 100644 --- a/src/overlays/actors/ovl_En_Pm/z_en_pm.c +++ b/src/overlays/actors/ovl_En_Pm/z_en_pm.c @@ -526,7 +526,7 @@ static ColliderSphereInit sSphereInit = { static CollisionCheckInfoInit2 sColChkInfoInit = { 0, 0, 0, 0, MASS_IMMOVABLE }; -static AnimationInfoS sAnimations[] = { +static AnimationInfoS sAnimationInfo[] = { { &object_mm_Anim_002238, 1.0f, 0, -1, ANIMMODE_LOOP, 0 }, { &object_mm_Anim_002238, 1.0f, 0, -1, ANIMMODE_LOOP, -4 }, { &object_mm_Anim_00A4E0, 1.0f, 0, -1, ANIMMODE_ONCE, 0 }, @@ -718,7 +718,7 @@ s32 func_80AF7E98(EnPm* this, s32 arg1) { if (phi_v1) { this->unk_384 = arg1; - ret = SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimations, arg1); + ret = SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimationInfo, arg1); this->unk_35C = this->skelAnime.playSpeed; } @@ -1380,7 +1380,7 @@ s32 func_80AF94AC(EnPm* this, PlayState* play, ScheduleOutput* scheduleOutput) { if (scheduleOutput->result == 24) { Flags_UnsetSwitch(play, 0); Flags_UnsetSwitch(play, 1); - this->unk_394 = EXCH_ITEM_NONE; + this->unk_394 = PLAYER_AP_NONE; this->unk_368 = 60.0f; func_80AF7E98(this, 9); } @@ -1568,7 +1568,7 @@ s32 func_80AF9BF8(EnPm* this, PlayState* play, ScheduleOutput* scheduleOutput) { this->actor.flags |= ACTOR_FLAG_1; this->actor.targetMode = 0; - this->unk_394 = EXCH_ITEM_NONE; + this->unk_394 = PLAYER_AP_NONE; this->unk_356 = 0; this->unk_368 = 40.0f; diff --git a/src/overlays/actors/ovl_En_Poh/z_en_poh.c b/src/overlays/actors/ovl_En_Poh/z_en_poh.c index d165c12d5..9d1dca75e 100644 --- a/src/overlays/actors/ovl_En_Poh/z_en_poh.c +++ b/src/overlays/actors/ovl_En_Poh/z_en_poh.c @@ -679,7 +679,7 @@ void func_80B2E230(EnPoh* this, PlayState* play) { } void func_80B2E3B0(EnPoh* this) { - func_801A7328(&this->actor.projectedPos, NA_SE_EN_PO_BIG_CRY - SFX_FLAG); + AudioSfx_StopByPosAndId(&this->actor.projectedPos, NA_SE_EN_PO_BIG_CRY - SFX_FLAG); Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_PO_LAUGH); this->actionFunc = func_80B2E3F8; } diff --git a/src/overlays/actors/ovl_En_Pst/z_en_pst.c b/src/overlays/actors/ovl_En_Pst/z_en_pst.c index 37ab66ee7..78458e062 100644 --- a/src/overlays/actors/ovl_En_Pst/z_en_pst.c +++ b/src/overlays/actors/ovl_En_Pst/z_en_pst.c @@ -224,7 +224,7 @@ s32 EnPst_ChooseBehaviour(Actor* thisx, PlayState* play) { } break; case POSTBOX_BEHAVIOUR_TAKE_ITEM: - if (this->exchangeItemId == EXCH_ITEM_LETTER_TO_KAFEI) { + if (this->exchangeItemId == PLAYER_AP_LETTER_TO_KAFEI) { scriptBranch = 1; } break; @@ -253,7 +253,7 @@ s32* EnPst_GetMsgEventScript(EnPst* this, PlayState* play) { return NULL; } } else if (this->stateFlags & 0x20) { - if (this->exchangeItemId == EXCH_ITEM_LETTER_MAMA) { + if (this->exchangeItemId == PLAYER_AP_LETTER_MAMA) { return D_80B2C488; } else { return D_80B2C490; @@ -284,10 +284,10 @@ s32 EnPst_CheckTalk(EnPst* this, PlayState* play) { if (this->stateFlags & 7) { if (Actor_ProcessTalkRequest(&this->actor, &play->state)) { this->stateFlags &= ~0x30; - if (player->exchangeItemId == EXCH_ITEM_LETTER_TO_KAFEI) { + if (player->exchangeItemId == PLAYER_AP_LETTER_TO_KAFEI) { this->stateFlags |= 0x10; this->exchangeItemId = player->exchangeItemId; - } else if (player->exchangeItemId != EXCH_ITEM_NONE) { + } else if (player->exchangeItemId != PLAYER_AP_NONE) { this->stateFlags |= 0x20; this->exchangeItemId = player->exchangeItemId; } diff --git a/src/overlays/actors/ovl_En_Racedog/z_en_racedog.c b/src/overlays/actors/ovl_En_Racedog/z_en_racedog.c index 529ac9f4e..66b2a0a1e 100644 --- a/src/overlays/actors/ovl_En_Racedog/z_en_racedog.c +++ b/src/overlays/actors/ovl_En_Racedog/z_en_racedog.c @@ -204,26 +204,26 @@ static DamageTable sDamageTable = { }; typedef enum { - /* 0 */ RACEDOG_ANIMATION_IDLE, - /* 1 */ RACEDOG_ANIMATION_WALK_1, // unused - /* 2 */ RACEDOG_ANIMATION_RUN, - /* 3 */ RACEDOG_ANIMATION_BARK, // unused - /* 4 */ RACEDOG_ANIMATION_SIT_DOWN_ONCE, // unused - /* 5 */ RACEDOG_ANIMATION_SIT_DOWN, // unused - /* 6 */ RACEDOG_ANIMATION_LYING_DOWN_START_1, // unused - /* 7 */ RACEDOG_ANIMATION_LYING_DOWN_LOOP, // unused - /* 8 */ RACEDOG_ANIMATION_LYING_DOWN_START_2, // unused - /* 9 */ RACEDOG_ANIMATION_LYING_DOWN_START_3, // unused - /* 10 */ RACEDOG_ANIMATION_LYING_DOWN_START_4, // unused - /* 11 */ RACEDOG_ANIMATION_WALK_BACKWARDS, // unused - /* 12 */ RACEDOG_ANIMATION_JUMP, - /* 13 */ RACEDOG_ANIMATION_LONG_JUMP, // unused - /* 14 */ RACEDOG_ANIMATION_JUMP_ATTACK, // unused - /* 15 */ RACEDOG_ANIMATION_SWIM, // unused - /* 16 */ RACEDOG_ANIMATION_MAX -} RacedogAnimationIndex; + /* 0 */ RACEDOG_ANIM_IDLE, + /* 1 */ RACEDOG_ANIM_WALK_1, // unused + /* 2 */ RACEDOG_ANIM_RUN, + /* 3 */ RACEDOG_ANIM_BARK, // unused + /* 4 */ RACEDOG_ANIM_SIT_DOWN_ONCE, // unused + /* 5 */ RACEDOG_ANIM_SIT_DOWN, // unused + /* 6 */ RACEDOG_ANIM_LYING_DOWN_START_1, // unused + /* 7 */ RACEDOG_ANIM_LYING_DOWN_LOOP, // unused + /* 8 */ RACEDOG_ANIM_LYING_DOWN_START_2, // unused + /* 9 */ RACEDOG_ANIM_LYING_DOWN_START_3, // unused + /* 10 */ RACEDOG_ANIM_LYING_DOWN_START_4, // unused + /* 11 */ RACEDOG_ANIM_WALK_BACKWARDS, // unused + /* 12 */ RACEDOG_ANIM_JUMP, + /* 13 */ RACEDOG_ANIM_LONG_JUMP, // unused + /* 14 */ RACEDOG_ANIM_JUMP_ATTACK, // unused + /* 15 */ RACEDOG_ANIM_SWIM, // unused + /* 16 */ RACEDOG_ANIM_MAX +} RacedogAnimation; -static AnimationInfoS sAnimations[] = { +static AnimationInfoS sAnimationInfo[] = { { &gDogWalkAnim, 1.0f, 0, -1, ANIMMODE_LOOP, 0 }, { &gDogWalkAnim, 1.0f, 0, -1, ANIMMODE_LOOP, -6 }, { &gDogRunAnim, 1.0f, 0, -1, ANIMMODE_LOOP, 0 }, { &gDogBarkAnim, 1.0f, 0, -1, ANIMMODE_LOOP, -6 }, { &gDogSitAnim, 1.0f, 0, -1, ANIMMODE_ONCE, -6 }, { &gDogSitAnim, 1.0f, 0, -1, ANIMMODE_LOOP_PARTIAL, -6 }, @@ -238,10 +238,10 @@ static InitChainEntry sInitChain[] = { ICHAIN_F32(uncullZoneForward, 1000, ICHAIN_STOP), }; -void EnRacedog_ChangeAnimation(SkelAnime* skelAnime, AnimationInfoS* animationInfo, s32 index) { +void EnRacedog_ChangeAnim(SkelAnime* skelAnime, AnimationInfoS* animationInfo, s32 animIndex) { f32 frameCount; - animationInfo += index; + animationInfo += animIndex; if (animationInfo->frameCount < 0) { frameCount = Animation_GetLastFrame(animationInfo->animation); } else { @@ -354,8 +354,8 @@ void EnRacedog_Init(Actor* thisx, PlayState* play) { sSelectedDogInfo = sDogInfo[(s16)((gSaveContext.eventInf[0] & 0xF8) >> 3)]; this->selectedDogIndex = sSelectedDogInfo.index; - EnRacedog_ChangeAnimation(&this->skelAnime, sAnimations, RACEDOG_ANIMATION_IDLE); - sAnimations[RACEDOG_ANIMATION_IDLE].playSpeed = Rand_ZeroFloat(0.5f) + 1.0f; + EnRacedog_ChangeAnim(&this->skelAnime, sAnimationInfo, RACEDOG_ANIM_IDLE); + sAnimationInfo[RACEDOG_ANIM_IDLE].playSpeed = Rand_ZeroFloat(0.5f) + 1.0f; this->actionFunc = EnRacedog_RaceStart; } @@ -376,7 +376,7 @@ void EnRacedog_RaceStart(EnRacedog* this, PlayState* play) { play_sound(NA_SE_SY_START_SHOT); } - EnRacedog_ChangeAnimation(&this->skelAnime, sAnimations, RACEDOG_ANIMATION_RUN); + EnRacedog_ChangeAnim(&this->skelAnime, sAnimationInfo, RACEDOG_ANIM_RUN); this->actionFunc = EnRacedog_Race; } } @@ -601,9 +601,9 @@ void EnRacedog_CheckForFinish(EnRacedog* this) { */ void EnRacedog_UpdateRunAnimationPlaySpeed(EnRacedog* this) { if (this->actor.speedXZ < 3.0f) { - sAnimations[RACEDOG_ANIMATION_RUN].playSpeed = 0.9f; + sAnimationInfo[RACEDOG_ANIM_RUN].playSpeed = 0.9f; } else { - sAnimations[RACEDOG_ANIMATION_RUN].playSpeed = 1.0f; + sAnimationInfo[RACEDOG_ANIM_RUN].playSpeed = 1.0f; } } diff --git a/src/overlays/actors/ovl_En_Raf/z_en_raf.c b/src/overlays/actors/ovl_En_Raf/z_en_raf.c index edd407921..a3d91bba9 100644 --- a/src/overlays/actors/ovl_En_Raf/z_en_raf.c +++ b/src/overlays/actors/ovl_En_Raf/z_en_raf.c @@ -35,13 +35,13 @@ void EnRaf_UpdateEffects(EnRaf* this, PlayState* play); void EnRaf_DrawEffects(EnRaf* this, PlayState* play); typedef enum { - /* 0 */ EN_RAF_ANIMATION_IDLE, - /* 1 */ EN_RAF_ANIMATION_CLOSE, - /* 2 */ EN_RAF_ANIMATION_CHEW, - /* 3 */ EN_RAF_ANIMATION_SPIT, - /* 4 */ EN_RAF_ANIMATION_CONVULSE, - /* 5 */ EN_RAF_ANIMATION_DEATH, -} EnRafAnimationIndex; + /* 0 */ EN_RAF_ANIM_IDLE, + /* 1 */ EN_RAF_ANIM_CLOSE, + /* 2 */ EN_RAF_ANIM_CHEW, + /* 3 */ EN_RAF_ANIM_SPIT, + /* 4 */ EN_RAF_ANIM_CONVULSE, + /* 5 */ EN_RAF_ANIM_DEATH, +} EnRafAnimation; typedef enum { /* 0 */ EN_RAF_ACTION_IDLE, @@ -260,7 +260,7 @@ void EnRaf_Destroy(Actor* thisx, PlayState* play) { Collider_DestroyCylinder(play, &this->collider); } -void EnRaf_ChangeAnimation(EnRaf* this, s32 index) { +void EnRaf_ChangeAnim(EnRaf* this, s32 animIndex) { static AnimationHeader* sAnimations[] = { &gCarnivorousLilyPadSpitAnim, &gCarnivorousLilyPadCloseAnim, &gCarnivorousLilyPadChewAnim, &gCarnivorousLilyPadSpitAnim, &gCarnivorousLilyPadConvulseAnim, &gCarnivorousLilyPadDeathAnim, @@ -271,22 +271,22 @@ void EnRaf_ChangeAnimation(EnRaf* this, s32 index) { f32 startFrame = 0.0f; f32 playSpeed = 1.0f; - this->endFrame = Animation_GetLastFrame(sAnimations[index]); - if (index == EN_RAF_ANIMATION_IDLE) { + this->endFrame = Animation_GetLastFrame(sAnimations[animIndex]); + if (animIndex == EN_RAF_ANIM_IDLE) { startFrame = this->endFrame; - } else if (index == EN_RAF_ANIMATION_CLOSE) { + } else if (animIndex == EN_RAF_ANIM_CLOSE) { playSpeed = 2.0f; } - Animation_Change(&this->skelAnime, sAnimations[index], playSpeed, startFrame, this->endFrame, - sAnimationModes[index], -4.0f); + Animation_Change(&this->skelAnime, sAnimations[animIndex], playSpeed, startFrame, this->endFrame, + sAnimationModes[animIndex], -4.0f); } void EnRaf_SetupIdle(EnRaf* this) { Vec3f targetLimbScale = { 1.0f, 1.0f, 1.0f }; s32 i; - EnRaf_ChangeAnimation(this, EN_RAF_ANIMATION_IDLE); + EnRaf_ChangeAnim(this, EN_RAF_ANIM_IDLE); for (i = CARNIVOROUS_LILY_PAD_LIMB_TRAP_1_LOWER_SEGMENT; i <= CARNIVOROUS_LILY_PAD_LIMB_TRAP_3_UPPER_SEGMENT; i++) { Math_Vec3f_Copy(&this->targetLimbScale[i], &targetLimbScale); @@ -358,7 +358,7 @@ void EnRaf_Idle(EnRaf* this, PlayState* play) { } void EnRaf_SetupGrab(EnRaf* this) { - EnRaf_ChangeAnimation(this, EN_RAF_ANIMATION_CLOSE); + EnRaf_ChangeAnim(this, EN_RAF_ANIM_CLOSE); this->petalScaleType = EN_RAF_PETAL_SCALE_TYPE_GRAB; Actor_PlaySfxAtPos(&this->dyna.actor, NA_SE_EN_SUISEN_DRINK); this->action = EN_RAF_ACTION_GRAB; @@ -387,7 +387,7 @@ void EnRaf_Grab(EnRaf* this, PlayState* play) { void EnRaf_SetupChew(EnRaf* this) { s32 i; - EnRaf_ChangeAnimation(this, EN_RAF_ANIMATION_CHEW); + EnRaf_ChangeAnim(this, EN_RAF_ANIM_CHEW); this->chewCount = 0; for (i = 0; i < ARRAY_COUNT(this->chewLimbRot); i++) { this->chewLimbRot[i].x = Rand_S16Offset(8, 8) << 8; @@ -461,7 +461,7 @@ void EnRaf_Chew(EnRaf* this, PlayState* play) { void EnRaf_SetupThrow(EnRaf* this, PlayState* play) { Player* player = GET_PLAYER(play); - EnRaf_ChangeAnimation(this, EN_RAF_ANIMATION_SPIT); + EnRaf_ChangeAnim(this, EN_RAF_ANIM_SPIT); player->actor.freezeTimer = 10; this->petalScaleType = EN_RAF_PETAL_SCALE_TYPE_IDLE_OR_THROW; this->action = EN_RAF_ACTION_THROW; @@ -557,7 +557,7 @@ void EnRaf_PostDetonation(EnRaf* this, PlayState* play) { } void EnRaf_SetupConvulse(EnRaf* this) { - EnRaf_ChangeAnimation(this, EN_RAF_ANIMATION_CONVULSE); + EnRaf_ChangeAnim(this, EN_RAF_ANIM_CONVULSE); this->chewCount = 0; this->action = EN_RAF_ACTION_CONVULSE; this->actionFunc = EnRaf_Convulse; @@ -584,7 +584,7 @@ void EnRaf_Convulse(EnRaf* this, PlayState* play) { } void EnRaf_SetupDissolve(EnRaf* this) { - EnRaf_ChangeAnimation(this, EN_RAF_ANIMATION_DEATH); + EnRaf_ChangeAnim(this, EN_RAF_ANIM_DEATH); this->action = EN_RAF_ACTION_DISSOLVE; this->dissolveTimer = 0; this->actionFunc = EnRaf_Dissolve; @@ -671,7 +671,7 @@ void EnRaf_Dormant(EnRaf* this, PlayState* play) { DECR(this->reviveTimer); if (this->reviveTimer == 0) { - EnRaf_ChangeAnimation(this, EN_RAF_ANIMATION_SPIT); + EnRaf_ChangeAnim(this, EN_RAF_ANIM_SPIT); for (i = CARNIVOROUS_LILY_PAD_LIMB_TRAP_1_LOWER_SEGMENT; i <= CARNIVOROUS_LILY_PAD_LIMB_TRAP_3_UPPER_SEGMENT; i++) { diff --git a/src/overlays/actors/ovl_En_Rail_Skb/z_en_rail_skb.c b/src/overlays/actors/ovl_En_Rail_Skb/z_en_rail_skb.c index 1c8756148..095ee3fec 100644 --- a/src/overlays/actors/ovl_En_Rail_Skb/z_en_rail_skb.c +++ b/src/overlays/actors/ovl_En_Rail_Skb/z_en_rail_skb.c @@ -62,7 +62,7 @@ const ActorInit En_Rail_Skb_InitVars = { (ActorFunc)EnRailSkb_Draw, }; -static AnimationInfo sAnimations[] = { +static AnimationInfo sAnimationInfo[] = { { &object_skb_Anim_0064E0, 0.96f, 0.0f, 0.0f, ANIMMODE_LOOP, -4.0f }, { &object_skb_Anim_003584, 1.0f, 0.0f, 0.0f, ANIMMODE_ONCE, -1.0f }, { &object_skb_Anim_002190, 0.6f, 0.0f, 0.0f, ANIMMODE_ONCE_INTERP, 4.0f }, @@ -312,7 +312,7 @@ void EnRailSkb_Destroy(Actor* thisx, PlayState* play) { void func_80B70FA0(EnRailSkb* this) { this->unk_3F2 = 0; if (this->actionFunc != func_80B716A8) { - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, 0); + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, 0); } this->actionFunc = func_80B70FF8; } @@ -356,7 +356,7 @@ void func_80B7114C(EnRailSkb* this, PlayState* play) { this->drawDmgEffAlpha = 0.0f; if (this->actor.colChkInfo.health != 0) { Actor_SetColorFilter(&this->actor, 0x4000, 255, 0, 8); - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, 3); + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, 3); Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_STALKID_DAMAGE); this->unk_402 |= 1; func_80B712FC(this); @@ -380,7 +380,7 @@ void func_80B7123C(EnRailSkb* this, PlayState* play) { this->drawDmgEffAlpha = 0.0f; if (this->actor.colChkInfo.health != 0) { Actor_SetColorFilter(&this->actor, 0x4000, 255, 0, 8); - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, 3); + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, 3); Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_STALKID_DAMAGE); this->unk_402 |= 1; func_80B712FC(this); @@ -406,7 +406,7 @@ void func_80B71314(EnRailSkb* this, PlayState* play) { void func_80B71354(EnRailSkb* this) { Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_STALKID_ATTACK); - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, 2); + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, 2); this->actionFunc = func_80B713A4; } @@ -415,7 +415,7 @@ void func_80B713A4(EnRailSkb* this, PlayState* play) { if ((this->actor.xzDistToPlayer > 65.0f) || (Player_GetMask(play) == PLAYER_MASK_CAPTAIN)) { func_80B70FA0(this); } else { - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, 2); + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, 2); } } @@ -456,7 +456,7 @@ void func_80B7151C(EnRailSkb* this) { this->actor.draw = EnRailSkb_Draw; this->actor.shape.shadowAlpha = 0; this->actor.shape.rot.y = this->actor.world.rot.y; - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, 1); + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, 1); this->actionFunc = func_80B715AC; } @@ -479,7 +479,7 @@ void func_80B715AC(EnRailSkb* this, PlayState* play) { void func_80B71650(EnRailSkb* this) { this->unk_3FE = 0; if (this->actionFunc != func_80B70FF8) { - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, 0); + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, 0); } this->actionFunc = func_80B716A8; } @@ -496,7 +496,7 @@ void func_80B716A8(EnRailSkb* this, PlayState* play) { Message_StartTextbox(play, 0x13F5, &this->actor); this->unk_400 = 0x13F5; } - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, 12); + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, 12); func_80B717C8(this); } else if ((this->actor.xzDistToPlayer < 100.0f) && !(this->collider.base.acFlags & AC_HIT)) { func_800B8614(&this->actor, play, 100.0f); @@ -558,7 +558,7 @@ void func_80B718C4(EnRailSkb* this, PlayState* play) { } void func_80B71910(EnRailSkb* this) { - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, 0); + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, 0); this->actionFunc = func_80B71954; } @@ -576,7 +576,7 @@ void func_80B71954(EnRailSkb* this, PlayState* play) { void func_80B71A08(EnRailSkb* this) { Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_STALKID_ATTACK); - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, 2); + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, 2); this->actionFunc = func_80B71A58; } @@ -585,7 +585,7 @@ void func_80B71A58(EnRailSkb* this, PlayState* play) { if (Animation_OnFrame(&this->skelAnime, this->skelAnime.endFrame)) { Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_STALKID_ATTACK); - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, 2); + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, 2); if (this->unk_2E8 < this->unk_22C->dyna.actor.colChkInfo.health) { this->unk_22C->dyna.actor.colChkInfo.health--; } else { @@ -608,7 +608,7 @@ void func_80B71A58(EnRailSkb* this, PlayState* play) { void func_80B71B6C(EnRailSkb* this) { this->unk_3F2 = 10; - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, 0); + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, 0); this->actionFunc = func_80B71BB8; } @@ -641,7 +641,7 @@ void func_80B71BB8(EnRailSkb* this, PlayState* play) { if ((sp34 < 50.0f) && (this->actor.bgCheckFlags & 1)) { Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_STALKID_ATTACK); - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, 9); + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, 9); this->actor.velocity.y = 10.0f; for (i = 0; i < 4; i++) { @@ -674,7 +674,7 @@ void func_80B71DF0(EnRailSkb* this) { this->drawDmgEffTimer = 0; } - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, 11); + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, 11); this->actionFunc = func_80B71EA8; } @@ -1000,7 +1000,7 @@ void func_80B72970(EnRailSkb* this, PlayState* play) { this->drawDmgEffScale = 0.0f; Actor_SetColorFilter(&this->actor, 0x4000, 255, 0, 8); Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_STALKID_DAMAGE); - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, 3); + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, 3); this->unk_402 |= 1; func_80B712FC(this); break; @@ -1026,7 +1026,7 @@ void func_80B72970(EnRailSkb* this, PlayState* play) { this->drawDmgEffScale = 0.5f; Actor_SetColorFilter(&this->actor, 0x4000, 255, 0, 8); Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_STALKID_DAMAGE); - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, 3); + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, 3); func_80B71228(this); break; @@ -1045,7 +1045,7 @@ void func_80B72970(EnRailSkb* this, PlayState* play) { case 13: Actor_SetColorFilter(&this->actor, 0x4000, 255, 0, 8); Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_STALKID_DAMAGE); - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, 3); + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, 3); func_80B712FC(this); break; diff --git a/src/overlays/actors/ovl_En_Railgibud/z_en_railgibud.c b/src/overlays/actors/ovl_En_Railgibud/z_en_railgibud.c index 1a197d6b5..10bbf2f83 100644 --- a/src/overlays/actors/ovl_En_Railgibud/z_en_railgibud.c +++ b/src/overlays/actors/ovl_En_Railgibud/z_en_railgibud.c @@ -50,27 +50,27 @@ void EnRailgibud_SinkIntoGround(EnRailgibud* this, PlayState* play); void EnRailgibud_Cutscene_Update(Actor* thisx, PlayState* play); typedef enum { - /* 0 */ EN_RAILGIBUD_ANIMATION_GRAB_ATTACK, - /* 1 */ EN_RAILGIBUD_ANIMATION_GRAB_END, - /* 2 */ EN_RAILGIBUD_ANIMATION_GRAB_START, - /* 3 */ EN_RAILGIBUD_ANIMATION_LOOK_BACK, - /* 4 */ EN_RAILGIBUD_ANIMATION_CROUCH_WIPING_TEARS, - /* 5 */ EN_RAILGIBUD_ANIMATION_CROUCH_CRYING, - /* 6 */ EN_RAILGIBUD_ANIMATION_DEATH, - /* 7 */ EN_RAILGIBUD_ANIMATION_DAMAGE, - /* 8 */ EN_RAILGIBUD_ANIMATION_CROUCH_END, - /* 9 */ EN_RAILGIBUD_ANIMATION_IDLE, - /* 10 */ EN_RAILGIBUD_ANIMATION_WALK, - /* 11 */ EN_RAILGIBUD_ANIMATION_DANCE_SQUAT, - /* 12 */ EN_RAILGIBUD_ANIMATION_DANCE_PIROUETTE, - /* 13 */ EN_RAILGIBUD_ANIMATION_DANCE_CLAP, - /* 14 */ EN_RAILGIBUD_ANIMATION_CROUCH_END_2, - /* 15 */ EN_RAILGIBUD_ANIMATION_SLUMP_START, - /* 16 */ EN_RAILGIBUD_ANIMATION_SLUMP_LOOP, - /* 17 */ EN_RAILGIBUD_ANIMATION_CONVULSION, - /* 18 */ EN_RAILGIBUD_ANIMATION_ARMS_UP_START, - /* 19 */ EN_RAILGIBUD_ANIMATION_ARMS_UP_LOOP, -} EnRailgibudAnimations; + /* 0 */ EN_RAILGIBUD_ANIM_GRAB_ATTACK, + /* 1 */ EN_RAILGIBUD_ANIM_GRAB_END, + /* 2 */ EN_RAILGIBUD_ANIM_GRAB_START, + /* 3 */ EN_RAILGIBUD_ANIM_LOOK_BACK, + /* 4 */ EN_RAILGIBUD_ANIM_CROUCH_WIPING_TEARS, + /* 5 */ EN_RAILGIBUD_ANIM_CROUCH_CRYING, + /* 6 */ EN_RAILGIBUD_ANIM_DEATH, + /* 7 */ EN_RAILGIBUD_ANIM_DAMAGE, + /* 8 */ EN_RAILGIBUD_ANIM_CROUCH_END, + /* 9 */ EN_RAILGIBUD_ANIM_IDLE, + /* 10 */ EN_RAILGIBUD_ANIM_WALK, + /* 11 */ EN_RAILGIBUD_ANIM_DANCE_SQUAT, + /* 12 */ EN_RAILGIBUD_ANIM_DANCE_PIROUETTE, + /* 13 */ EN_RAILGIBUD_ANIM_DANCE_CLAP, + /* 14 */ EN_RAILGIBUD_ANIM_CROUCH_END_2, + /* 15 */ EN_RAILGIBUD_ANIM_SLUMP_START, + /* 16 */ EN_RAILGIBUD_ANIM_SLUMP_LOOP, + /* 17 */ EN_RAILGIBUD_ANIM_CONVULSION, + /* 18 */ EN_RAILGIBUD_ANIM_ARMS_UP_START, + /* 19 */ EN_RAILGIBUD_ANIM_ARMS_UP_LOOP, +} EnRailgibudAnimation; typedef enum { /* 0 */ EN_RAILGIBUD_TYPE_GIBDO, @@ -95,7 +95,7 @@ const ActorInit En_Railgibud_InitVars = { (ActorFunc)EnRailgibud_Draw, }; -static AnimationInfo sAnimations[] = { +static AnimationInfo sAnimationInfo[] = { { &gGibdoRedeadGrabAttackAnim, 1.0f, 0.0f, 0.0f, ANIMMODE_LOOP, -8.0f }, { &gGibdoRedeadGrabEndAnim, 0.5f, 0.0f, 0.0f, ANIMMODE_ONCE_INTERP, 0.0f }, { &gGibdoRedeadGrabStartAnim, 1.0f, 0.0f, 0.0f, ANIMMODE_ONCE, -8.0f }, @@ -286,7 +286,7 @@ void EnRailgibud_Destroy(Actor* thisx, PlayState* play) { void EnRailgibud_SetupWalkInCircles(EnRailgibud* this) { this->actor.speedXZ = 0.6f; - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, EN_RAILGIBUD_ANIMATION_WALK); + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, EN_RAILGIBUD_ANIM_WALK); this->actionFunc = EnRailgibud_WalkInCircles; } @@ -336,7 +336,7 @@ void EnRailgibud_WalkInCircles(EnRailgibud* this, PlayState* play) { } void EnRailgibud_SetupAttemptPlayerFreeze(EnRailgibud* this) { - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, EN_RAILGIBUD_ANIMATION_IDLE); + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, EN_RAILGIBUD_ANIM_IDLE); this->actionFunc = EnRailgibud_AttemptPlayerFreeze; } @@ -357,7 +357,7 @@ void EnRailgibud_AttemptPlayerFreeze(EnRailgibud* this, PlayState* play) { } void EnRailgibud_SetupWalkToPlayer(EnRailgibud* this) { - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, EN_RAILGIBUD_ANIMATION_WALK); + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, EN_RAILGIBUD_ANIM_WALK); this->actor.speedXZ = 0.4f; if (this->actionFunc == EnRailgibud_AttemptPlayerFreeze) { @@ -418,7 +418,7 @@ void EnRailgibud_WalkToPlayer(EnRailgibud* this, PlayState* play) { } void EnRailgibud_SetupGrab(EnRailgibud* this) { - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, EN_RAILGIBUD_ANIMATION_GRAB_START); + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, EN_RAILGIBUD_ANIM_GRAB_START); this->grabDamageTimer = 0; this->actor.flags &= ~ACTOR_FLAG_1; this->grabState = EN_RAILGIBUD_GRAB_START; @@ -436,9 +436,9 @@ void EnRailgibud_Grab(EnRailgibud* this, PlayState* play) { inPositionToAttack = EnRailgibud_MoveToIdealGrabPositionAndRotation(this, play); if (Animation_OnFrame(&this->skelAnime, this->skelAnime.endFrame) && (inPositionToAttack == true)) { this->grabState = EN_RAILGIBUD_GRAB_ATTACK; - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, EN_RAILGIBUD_ANIMATION_GRAB_ATTACK); + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, EN_RAILGIBUD_ANIM_GRAB_ATTACK); } else if (!(player->stateFlags2 & 0x80)) { - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, EN_RAILGIBUD_ANIMATION_GRAB_END); + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, EN_RAILGIBUD_ANIM_GRAB_END); this->actor.flags |= ACTOR_FLAG_1; this->grabState = EN_RAILGIBUD_GRAB_RELEASE; this->grabDamageTimer = 0; @@ -468,7 +468,7 @@ void EnRailgibud_Grab(EnRailgibud* this, PlayState* play) { player->unk_AE8 = 100; } - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, EN_RAILGIBUD_ANIMATION_GRAB_END); + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, EN_RAILGIBUD_ANIM_GRAB_END); this->actor.flags |= ACTOR_FLAG_1; this->grabState = EN_RAILGIBUD_GRAB_RELEASE; this->grabDamageTimer = 0; @@ -488,7 +488,7 @@ void EnRailgibud_Grab(EnRailgibud* this, PlayState* play) { } void EnRailgibud_SetupGrabFail(EnRailgibud* this) { - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, EN_RAILGIBUD_ANIMATION_DAMAGE); + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, EN_RAILGIBUD_ANIM_DAMAGE); Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_REDEAD_DAMAGE); this->actor.speedXZ = -2.0f; this->actionFunc = EnRailgibud_GrabFail; @@ -510,7 +510,7 @@ void EnRailgibud_GrabFail(EnRailgibud* this, PlayState* play) { void EnRailgibud_SetupTurnAwayAndShakeHead(EnRailgibud* this) { this->headShakeTimer = 0; - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, EN_RAILGIBUD_ANIMATION_WALK); + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, EN_RAILGIBUD_ANIM_WALK); this->actionFunc = EnRailgibud_TurnAwayAndShakeHead; } @@ -528,7 +528,7 @@ void EnRailgibud_TurnAwayAndShakeHead(EnRailgibud* this, PlayState* play) { } void EnRailgibud_SetupWalkToHome(EnRailgibud* this) { - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, EN_RAILGIBUD_ANIMATION_WALK); + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, EN_RAILGIBUD_ANIM_WALK); this->actor.speedXZ = 0.4f; this->actionFunc = EnRailgibud_WalkToHome; } @@ -561,7 +561,7 @@ void EnRailgibud_WalkToHome(EnRailgibud* this, PlayState* play) { } void EnRailgibud_SetupDamage(EnRailgibud* this) { - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, EN_RAILGIBUD_ANIMATION_DAMAGE); + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, EN_RAILGIBUD_ANIM_DAMAGE); Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_REDEAD_DAMAGE); this->stunTimer = 0; this->grabWaitTimer = 0; @@ -618,7 +618,7 @@ void EnRailgibud_Stunned(EnRailgibud* this, PlayState* play) { } void EnRailgibud_SetupDead(EnRailgibud* this) { - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, EN_RAILGIBUD_ANIMATION_DEATH); + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, EN_RAILGIBUD_ANIM_DEATH); this->actor.flags &= ~ACTOR_FLAG_1; Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_REDEAD_DEAD); this->deathTimer = 0; @@ -1113,7 +1113,7 @@ void EnRailgibud_InitCutsceneGibdo(EnRailgibud* this, PlayState* play) { Collider_SetCylinder(play, &this->collider, &this->actor, &sCylinderInit); CollisionCheck_SetInfo2(&this->actor.colChkInfo, &sDamageTable, &sColChkInfoInit); - if (gSaveContext.save.entranceIndex != 0x2090) { // NOT Cutscene: Music Box House Opens + if (gSaveContext.save.entrance != ENTRANCE(IKANA_CANYON, 9)) { // NOT Cutscene: Music Box House Opens Actor_MarkForDeath(&this->actor); } @@ -1180,38 +1180,38 @@ s32 EnRailgibud_PerformCutsceneActions(EnRailgibud* this, PlayState* play) { this->csAction = play->csCtx.actorActions[actionIndex]->action; switch (play->csCtx.actorActions[actionIndex]->action) { case 1: - this->cutsceneAnimationIndex = EN_RAILGIBUD_ANIMATION_IDLE; - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, EN_RAILGIBUD_ANIMATION_IDLE); + this->cutsceneAnimIndex = EN_RAILGIBUD_ANIM_IDLE; + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, EN_RAILGIBUD_ANIM_IDLE); break; case 2: - this->cutsceneAnimationIndex = EN_RAILGIBUD_ANIMATION_SLUMP_START; + this->cutsceneAnimIndex = EN_RAILGIBUD_ANIM_SLUMP_START; Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_REDEAD_WEAKENED2); - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, EN_RAILGIBUD_ANIMATION_SLUMP_START); + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, EN_RAILGIBUD_ANIM_SLUMP_START); break; case 3: - this->cutsceneAnimationIndex = EN_RAILGIBUD_ANIMATION_CONVULSION; - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, EN_RAILGIBUD_ANIMATION_CONVULSION); + this->cutsceneAnimIndex = EN_RAILGIBUD_ANIM_CONVULSION; + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, EN_RAILGIBUD_ANIM_CONVULSION); break; case 4: - this->cutsceneAnimationIndex = EN_RAILGIBUD_ANIMATION_ARMS_UP_START; - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, EN_RAILGIBUD_ANIMATION_ARMS_UP_START); + this->cutsceneAnimIndex = EN_RAILGIBUD_ANIM_ARMS_UP_START; + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, EN_RAILGIBUD_ANIM_ARMS_UP_START); break; case 5: - this->cutsceneAnimationIndex = EN_RAILGIBUD_ANIMATION_WALK; - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, EN_RAILGIBUD_ANIMATION_WALK); + this->cutsceneAnimIndex = EN_RAILGIBUD_ANIM_WALK; + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, EN_RAILGIBUD_ANIM_WALK); break; } } else if (Animation_OnFrame(&this->skelAnime, this->skelAnime.endFrame)) { - if (this->cutsceneAnimationIndex == EN_RAILGIBUD_ANIMATION_SLUMP_START) { - this->cutsceneAnimationIndex = EN_RAILGIBUD_ANIMATION_SLUMP_LOOP; - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, EN_RAILGIBUD_ANIMATION_SLUMP_LOOP); - } else if (this->cutsceneAnimationIndex == EN_RAILGIBUD_ANIMATION_ARMS_UP_START) { - this->cutsceneAnimationIndex = EN_RAILGIBUD_ANIMATION_ARMS_UP_LOOP; - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, EN_RAILGIBUD_ANIMATION_ARMS_UP_LOOP); + if (this->cutsceneAnimIndex == EN_RAILGIBUD_ANIM_SLUMP_START) { + this->cutsceneAnimIndex = EN_RAILGIBUD_ANIM_SLUMP_LOOP; + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, EN_RAILGIBUD_ANIM_SLUMP_LOOP); + } else if (this->cutsceneAnimIndex == EN_RAILGIBUD_ANIM_ARMS_UP_START) { + this->cutsceneAnimIndex = EN_RAILGIBUD_ANIM_ARMS_UP_LOOP; + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, EN_RAILGIBUD_ANIM_ARMS_UP_LOOP); EnRailgibud_SetupSinkIntoGround(this); } } diff --git a/src/overlays/actors/ovl_En_Railgibud/z_en_railgibud.h b/src/overlays/actors/ovl_En_Railgibud/z_en_railgibud.h index 65e8e9736..78655f870 100644 --- a/src/overlays/actors/ovl_En_Railgibud/z_en_railgibud.h +++ b/src/overlays/actors/ovl_En_Railgibud/z_en_railgibud.h @@ -33,7 +33,7 @@ typedef struct EnRailgibud { /* 0x3EE */ s16 shouldWalkForwardNextFrame; // Only used by the "main" Gibdo /* 0x3F0 */ union { s16 grabState; - s16 cutsceneAnimationIndex; + s16 cutsceneAnimIndex; }; /* 0x3F2 */ union { s16 playerStunWaitTimer; // Cannot stun the player if this is non-zero diff --git a/src/overlays/actors/ovl_En_Rat/z_en_rat.c b/src/overlays/actors/ovl_En_Rat/z_en_rat.c index 207cf7323..1054876aa 100644 --- a/src/overlays/actors/ovl_En_Rat/z_en_rat.c +++ b/src/overlays/actors/ovl_En_Rat/z_en_rat.c @@ -5,6 +5,8 @@ */ #include "z_en_rat.h" +#include "objects/gameplay_keep/gameplay_keep.h" +#include "overlays/actors/ovl_En_Bom/z_en_bom.h" #define FLAGS (ACTOR_FLAG_1 | ACTOR_FLAG_4 | ACTOR_FLAG_200) @@ -15,7 +17,24 @@ void EnRat_Destroy(Actor* thisx, PlayState* play); void EnRat_Update(Actor* thisx, PlayState* play); void EnRat_Draw(Actor* thisx, PlayState* play); -#if 0 +void EnRat_InitializeAxes(EnRat* this); +void EnRat_UpdateRotation(EnRat* this); +void EnRat_Revive(EnRat* this, PlayState* play); +void EnRat_SetupIdle(EnRat* this); +void EnRat_Idle(EnRat* this, PlayState* play); +void EnRat_SetupSpottedPlayer(EnRat* this); +void EnRat_SpottedPlayer(EnRat* this, PlayState* play); +void EnRat_SetupChasePlayer(EnRat* this); +void EnRat_ChasePlayer(EnRat* this, PlayState* play); +void EnRat_Bounced(EnRat* this, PlayState* play); +void EnRat_Explode(EnRat* this, PlayState* play); +void EnRat_PostDetonation(EnRat* this, PlayState* play); + +typedef enum { + /* -2 */ EN_RAT_HOOK_STARTED = -2, + /* -1 */ EN_RAT_HOOKED, +} EnRatHookedState; + const ActorInit En_Rat_InitVars = { ACTOR_EN_RAT, ACTORCAT_ENEMY, @@ -28,123 +47,920 @@ const ActorInit En_Rat_InitVars = { (ActorFunc)EnRat_Draw, }; -// static ColliderSphereInit sSphereInit = { -static ColliderSphereInit D_80A58400 = { - { COLTYPE_NONE, AT_ON | AT_TYPE_ENEMY, AC_ON | AC_TYPE_PLAYER, OC1_ON | OC1_TYPE_ALL, OC2_TYPE_1, COLSHAPE_SPHERE, }, - { ELEMTYPE_UNK0, { 0xF7CFFFFF, 0x00, 0x08 }, { 0xF7CFFFFF, 0x00, 0x00 }, TOUCH_ON | TOUCH_SFX_HARD, BUMP_ON | BUMP_HOOKABLE, OCELEM_ON, }, +static ColliderSphereInit sSphereInit = { + { + COLTYPE_NONE, + AT_ON | AT_TYPE_ENEMY, + AC_ON | AC_TYPE_PLAYER, + OC1_ON | OC1_TYPE_ALL, + OC2_TYPE_1, + COLSHAPE_SPHERE, + }, + { + ELEMTYPE_UNK0, + { 0xF7CFFFFF, 0x00, 0x08 }, + { 0xF7CFFFFF, 0x00, 0x00 }, + TOUCH_ON | TOUCH_SFX_HARD, + BUMP_ON | BUMP_HOOKABLE, + OCELEM_ON, + }, { 1, { { 0, 0, 0 }, 23 }, 100 }, }; -// static DamageTable sDamageTable = { -static DamageTable D_80A5842C = { - /* Deku Nut */ DMG_ENTRY(0, 0x1), - /* Deku Stick */ DMG_ENTRY(1, 0x0), - /* Horse trample */ DMG_ENTRY(1, 0x0), - /* Explosives */ DMG_ENTRY(1, 0x0), - /* Zora boomerang */ DMG_ENTRY(1, 0x0), - /* Normal arrow */ DMG_ENTRY(1, 0x0), - /* UNK_DMG_0x06 */ DMG_ENTRY(0, 0x0), - /* Hookshot */ DMG_ENTRY(0, 0xF), - /* Goron punch */ DMG_ENTRY(1, 0x0), - /* Sword */ DMG_ENTRY(1, 0x0), - /* Goron pound */ DMG_ENTRY(1, 0x0), - /* Fire arrow */ DMG_ENTRY(2, 0x0), - /* Ice arrow */ DMG_ENTRY(2, 0x0), - /* Light arrow */ DMG_ENTRY(2, 0x0), - /* Goron spikes */ DMG_ENTRY(1, 0x0), - /* Deku spin */ DMG_ENTRY(1, 0x0), - /* Deku bubble */ DMG_ENTRY(1, 0x0), - /* Deku launch */ DMG_ENTRY(2, 0x0), - /* UNK_DMG_0x12 */ DMG_ENTRY(0, 0x1), - /* Zora barrier */ DMG_ENTRY(1, 0x0), - /* Normal shield */ DMG_ENTRY(0, 0x0), - /* Light ray */ DMG_ENTRY(0, 0x0), - /* Thrown object */ DMG_ENTRY(1, 0x0), - /* Zora punch */ DMG_ENTRY(1, 0x0), - /* Spin attack */ DMG_ENTRY(1, 0x0), - /* Sword beam */ DMG_ENTRY(0, 0x0), - /* Normal Roll */ DMG_ENTRY(0, 0x0), - /* UNK_DMG_0x1B */ DMG_ENTRY(0, 0x0), - /* UNK_DMG_0x1C */ DMG_ENTRY(0, 0x0), - /* Unblockable */ DMG_ENTRY(0, 0x0), - /* UNK_DMG_0x1E */ DMG_ENTRY(0, 0x0), - /* Powder Keg */ DMG_ENTRY(1, 0x0), +typedef enum { + /* 0x0 */ EN_RAT_DMGEFF_NONE, + /* 0x1 */ EN_RAT_DMGEFF_STUN, + /* 0xF */ EN_RAT_DMGEFF_HOOKSHOT = 0xF, // Pulls the Real Bombchu towards the player +} EnRatDamageEffect; + +static DamageTable sDamageTable = { + /* Deku Nut */ DMG_ENTRY(0, EN_RAT_DMGEFF_STUN), + /* Deku Stick */ DMG_ENTRY(1, EN_RAT_DMGEFF_NONE), + /* Horse trample */ DMG_ENTRY(1, EN_RAT_DMGEFF_NONE), + /* Explosives */ DMG_ENTRY(1, EN_RAT_DMGEFF_NONE), + /* Zora boomerang */ DMG_ENTRY(1, EN_RAT_DMGEFF_NONE), + /* Normal arrow */ DMG_ENTRY(1, EN_RAT_DMGEFF_NONE), + /* UNK_DMG_0x06 */ DMG_ENTRY(0, EN_RAT_DMGEFF_NONE), + /* Hookshot */ DMG_ENTRY(0, EN_RAT_DMGEFF_HOOKSHOT), + /* Goron punch */ DMG_ENTRY(1, EN_RAT_DMGEFF_NONE), + /* Sword */ DMG_ENTRY(1, EN_RAT_DMGEFF_NONE), + /* Goron pound */ DMG_ENTRY(1, EN_RAT_DMGEFF_NONE), + /* Fire arrow */ DMG_ENTRY(2, EN_RAT_DMGEFF_NONE), + /* Ice arrow */ DMG_ENTRY(2, EN_RAT_DMGEFF_NONE), + /* Light arrow */ DMG_ENTRY(2, EN_RAT_DMGEFF_NONE), + /* Goron spikes */ DMG_ENTRY(1, EN_RAT_DMGEFF_NONE), + /* Deku spin */ DMG_ENTRY(1, EN_RAT_DMGEFF_NONE), + /* Deku bubble */ DMG_ENTRY(1, EN_RAT_DMGEFF_NONE), + /* Deku launch */ DMG_ENTRY(2, EN_RAT_DMGEFF_NONE), + /* UNK_DMG_0x12 */ DMG_ENTRY(0, EN_RAT_DMGEFF_STUN), + /* Zora barrier */ DMG_ENTRY(1, EN_RAT_DMGEFF_NONE), + /* Normal shield */ DMG_ENTRY(0, EN_RAT_DMGEFF_NONE), + /* Light ray */ DMG_ENTRY(0, EN_RAT_DMGEFF_NONE), + /* Thrown object */ DMG_ENTRY(1, EN_RAT_DMGEFF_NONE), + /* Zora punch */ DMG_ENTRY(1, EN_RAT_DMGEFF_NONE), + /* Spin attack */ DMG_ENTRY(1, EN_RAT_DMGEFF_NONE), + /* Sword beam */ DMG_ENTRY(0, EN_RAT_DMGEFF_NONE), + /* Normal Roll */ DMG_ENTRY(0, EN_RAT_DMGEFF_NONE), + /* UNK_DMG_0x1B */ DMG_ENTRY(0, EN_RAT_DMGEFF_NONE), + /* UNK_DMG_0x1C */ DMG_ENTRY(0, EN_RAT_DMGEFF_NONE), + /* Unblockable */ DMG_ENTRY(0, EN_RAT_DMGEFF_NONE), + /* UNK_DMG_0x1E */ DMG_ENTRY(0, EN_RAT_DMGEFF_NONE), + /* Powder Keg */ DMG_ENTRY(1, EN_RAT_DMGEFF_NONE), }; -// sColChkInfoInit -static CollisionCheckInfoInit D_80A5844C = { 1, 30, 30, 50 }; +static CollisionCheckInfoInit sColChkInfoInit = { 1, 30, 30, 50 }; -// static InitChainEntry sInitChain[] = { -static InitChainEntry D_80A58464[] = { +static TexturePtr sSparkTextures[] = { + gElectricSpark1Tex, + gElectricSpark2Tex, + gElectricSpark3Tex, + gElectricSpark4Tex, +}; + +static InitChainEntry sInitChain[] = { ICHAIN_S8(hintId, 97, ICHAIN_CONTINUE), ICHAIN_VEC3F_DIV1000(scale, 15, ICHAIN_CONTINUE), ICHAIN_F32(targetArrowOffset, 5000, ICHAIN_STOP), }; -#endif +static EffectBlureInit2 sBlureInit = { + 0, 0, 0, { 250, 0, 0, 250 }, { 200, 0, 0, 130 }, { 150, 0, 0, 100 }, { 100, 0, 0, 50 }, 16, + 0, 0, 0, { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, +}; -extern ColliderSphereInit D_80A58400; -extern DamageTable D_80A5842C; -extern CollisionCheckInfoInit D_80A5844C; -extern InitChainEntry D_80A58464[]; +static s32 sTexturesDesegmented = false; -extern UNK_TYPE D_06000174; -extern UNK_TYPE D_0600026C; +void EnRat_Init(Actor* thisx, PlayState* play) { + s32 pad; + EnRat* this = THIS; + s32 attackRange; + s32 i; -#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Rat/EnRat_Init.s") + Actor_ProcessInitChain(&this->actor, sInitChain); + Collider_InitAndSetSphere(play, &this->collider, &this->actor, &sSphereInit); + this->collider.dim.worldSphere.radius = sSphereInit.dim.modelSphere.radius; -#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Rat/EnRat_Destroy.s") + attackRange = EN_RAT_GET_ATTACK_RANGE(&this->actor); + if (EN_RAT_IS_OVERWORLD_TYPE(&this->actor)) { + this->actor.params = EN_RAT_TYPE_OVERWORLD; + } else { + this->actor.params = EN_RAT_TYPE_DUNGEON; + } -#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Rat/func_80A563CC.s") + SkelAnime_InitFlex(play, &this->skelAnime, &gRealBombchuSkel, &gRealBombchuRunAnim, this->jointTable, + this->morphTable, REAL_BOMBCHU_LIMB_MAX); + ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 25.0f); -#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Rat/func_80A56444.s") + if (EN_RAT_GET_TYPE(&this->actor) == EN_RAT_TYPE_DUNGEON) { + Effect_Add(play, &this->blure1Index, EFFECT_BLURE2, 0, 0, &sBlureInit); + Effect_Add(play, &this->blure2Index, EFFECT_BLURE2, 0, 0, &sBlureInit); + this->timer = 30; + } else { + this->timer = 150; + } -#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Rat/func_80A5665C.s") + CollisionCheck_SetInfo(&this->actor.colChkInfo, &sDamageTable, &sColChkInfoInit); + EnRat_InitializeAxes(this); + EnRat_UpdateRotation(this); -#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Rat/func_80A566E0.s") + if ((attackRange == 255) || (attackRange == 0)) { + this->attackRange = 350.0f; + } else if (EN_RAT_GET_TYPE(&this->actor) == EN_RAT_TYPE_DUNGEON) { + this->attackRange = attackRange * 0.1f * 40.0f; + } else { + this->attackRange = attackRange * 0.5f * 40.0f; + } -#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Rat/func_80A56994.s") + if (!sTexturesDesegmented) { + for (i = 0; i < ARRAY_COUNT(sSparkTextures); i++) { + sSparkTextures[i] = Lib_SegmentedToVirtual(sSparkTextures[i]); + } -#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Rat/func_80A56AFC.s") + sTexturesDesegmented = true; + } -#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Rat/func_80A56EB8.s") + EnRat_SetupIdle(this); +} -#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Rat/func_80A56F68.s") +void EnRat_Destroy(Actor* thisx, PlayState* play) { + EnRat* this = THIS; -#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Rat/func_80A57010.s") + if (EN_RAT_GET_TYPE(&this->actor) == EN_RAT_TYPE_DUNGEON) { + Effect_Destroy(play, this->blure1Index); + Effect_Destroy(play, this->blure2Index); + } -#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Rat/func_80A57118.s") + Collider_DestroySphere(play, &this->collider); +} -#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Rat/func_80A57180.s") +void EnRat_InitializeAxes(EnRat* this) { + Matrix_RotateYS(this->actor.shape.rot.y, MTXMODE_NEW); + Matrix_RotateXS(this->actor.shape.rot.x, MTXMODE_APPLY); + Matrix_RotateZS(this->actor.shape.rot.z, MTXMODE_APPLY); -#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Rat/func_80A5723C.s") + Matrix_MultVecZ(1.0f, &this->axisForwards); + Matrix_MultVecY(1.0f, &this->axisUp); + Matrix_MultVecX(1.0f, &this->axisLeft); +} -#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Rat/func_80A57330.s") +/** + * Returns true if floorPoly is valid for the Real Bombchu to move on, false otherwise. + */ +s32 EnRat_UpdateFloorPoly(EnRat* this, CollisionPoly* floorPoly, PlayState* play) { + Vec3f normal; + Vec3f vec; + f32 angle; + f32 magnitude; + f32 normDotUp; -#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Rat/func_80A57384.s") + this->actor.floorPoly = floorPoly; -#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Rat/func_80A57488.s") + if (floorPoly != NULL) { + normal.x = COLPOLY_GET_NORMAL(floorPoly->normal.x); + normal.y = COLPOLY_GET_NORMAL(floorPoly->normal.y); + normal.z = COLPOLY_GET_NORMAL(floorPoly->normal.z); + } else { + normal.x = 0.0f; + normal.z = 0.0f; + normal.y = 1.0f; + } -#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Rat/func_80A574E8.s") + normDotUp = DOTXYZ(normal, this->axisUp); + if (fabsf(normDotUp) >= 0.999f) { + return false; + } -#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Rat/func_80A57570.s") + angle = func_80086C48(normDotUp); + if (angle < 0.001f) { + return false; + } -#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Rat/func_80A575F4.s") + Math3D_CrossProduct(&this->axisUp, &normal, &vec); -#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Rat/func_80A5764C.s") + magnitude = Math3D_Vec3fMagnitude(&vec); + if (magnitude < 0.001f) { + EnRat_Explode(this, play); + return false; + } -#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Rat/func_80A57918.s") + Math_Vec3f_Scale(&vec, 1.0f / magnitude); + Matrix_RotateAxisF(angle, &vec, MTXMODE_NEW); + Matrix_MultVec3f(&this->axisLeft, &vec); + Math_Vec3f_Copy(&this->axisLeft, &vec); + Math3D_CrossProduct(&this->axisLeft, &normal, &this->axisForwards); -#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Rat/func_80A57984.s") + magnitude = Math3D_Vec3fMagnitude(&this->axisForwards); + if (magnitude < 0.001f) { + EnRat_Explode(this, play); + return false; + } -#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Rat/func_80A57A08.s") + Math_Vec3f_Scale(&this->axisForwards, 1.0f / magnitude); + Math_Vec3f_Copy(&this->axisUp, &normal); + return true; +} -#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Rat/func_80A57A9C.s") +void EnRat_UpdateRotation(EnRat* this) { + MtxF mf; -#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Rat/EnRat_Update.s") + mf.xx = this->axisLeft.x; + mf.yx = this->axisLeft.y; + mf.zx = this->axisLeft.z; -#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Rat/func_80A57F10.s") + mf.xy = this->axisUp.x; + mf.yy = this->axisUp.y; + mf.zy = this->axisUp.z; -#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Rat/func_80A57F4C.s") + mf.xz = this->axisForwards.x; + mf.yz = this->axisForwards.y; + mf.zz = this->axisForwards.z; -#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Rat/EnRat_Draw.s") + Matrix_MtxFToYXZRot(&mf, &this->actor.world.rot, false); + this->actor.world.rot.x = -this->actor.world.rot.x; +} + +/** + * Chooses to either look at the player (if the Real Bombchu has spotted the player or + * is chasing after them) or at some other semi-random point (if the Bombchu is idle). + */ +void EnRat_ChooseDirection(EnRat* this) { + Vec3f newAxisForwards; + s16 angle; + + if (this->actionFunc != EnRat_Idle) { + angle = this->actor.yawTowardsPlayer - this->actor.shape.rot.y; + if (this->axisUp.y < -0.25f) { + angle -= 0x8000; + } + } else { + if (Actor_DistanceToPoint(&this->actor, &this->actor.home.pos) > 50.0f) { + Vec3f homeInHome; + Vec3f worldInHome; + Vec3f worldPlusForwardInHome; + Vec3f upInHome; + + // Set up matrix to unrotate, to make the "home rot" the new basis triad + Matrix_RotateZS(-this->actor.home.rot.z, MTXMODE_NEW); + Matrix_RotateXS(-this->actor.home.rot.x, MTXMODE_APPLY); + Matrix_RotateYS(-this->actor.home.rot.y, MTXMODE_APPLY); + + // Unrotate axisUp into "home rot" triad and store in upfInHome + Matrix_MultVec3f(&this->axisUp, &upInHome); + + // Move world.pos forward by axisForwards and store in homeInHome + Math_Vec3f_Sum(&this->actor.world.pos, &this->axisForwards, &homeInHome); + + // Unrotate homeInHome into "home rot" triad and store in worldPlusForwardInHome + Matrix_MultVec3f(&homeInHome, &worldPlusForwardInHome); + + // Unrotate home into "home rot" triad + Matrix_MultVec3f(&this->actor.home.pos, &homeInHome); + + // Unrotate world into "home rot" triad + Matrix_MultVec3f(&this->actor.world.pos, &worldInHome); + + angle = Math_Vec3f_Yaw(&worldInHome, &homeInHome) - Math_Vec3f_Yaw(&worldInHome, &worldPlusForwardInHome); + if (upInHome.y < -0.25f) { + angle -= 0x8000; + } + + angle += (s16)randPlusMinusPoint5Scaled(0x800); + } else { + angle = (Rand_ZeroOne() < 0.1f) ? (s16)randPlusMinusPoint5Scaled(0x800) : 0; + } + } + + angle = CLAMP(angle, -0x800, 0x800); + Matrix_RotateAxisF(angle * (M_PI / 0x8000), &this->axisUp, MTXMODE_NEW); + Matrix_MultVec3f(&this->axisForwards, &newAxisForwards); + Math_Vec3f_Copy(&this->axisForwards, &newAxisForwards); + Math3D_CrossProduct(&this->axisUp, &this->axisForwards, &this->axisLeft); + this->shouldRotateOntoSurfaces = true; +} + +/** + * Returns true if the Real Bombchu is on a collision poly or is on the water's surface. + */ +s32 EnRat_IsOnCollisionPoly(PlayState* play, Vec3f* posA, Vec3f* posB, Vec3f* posResult, CollisionPoly** poly, + s32* bgId) { + WaterBox* waterBox; + s32 isOnWater; + f32 waterSurface; + + if (WaterBox_GetSurface1(play, &play->colCtx, posB->x, posB->z, &waterSurface, &waterBox) && + (waterSurface <= posA->y) && (posB->y <= waterSurface)) { + isOnWater = true; + } else { + isOnWater = false; + } + + if (BgCheck_EntityLineTest1(&play->colCtx, posA, posB, posResult, poly, 1, 1, 1, 1, bgId)) { + if (!(func_800C9A4C(&play->colCtx, *poly, *bgId) & 0x30) && (!isOnWater || (waterSurface <= posResult->y))) { + return true; + } + } + + if (isOnWater) { + posResult->x = posB->x; + posResult->y = waterSurface; + posResult->z = posB->z; + *poly = NULL; + *bgId = BGCHECK_SCENE; + return true; + } + + return false; +} + +s32 EnRat_IsTouchingSurface(EnRat* this, PlayState* play) { + CollisionPoly* polySide = NULL; + CollisionPoly* polyUpDown = NULL; + s32 bgIdSide; + s32 bgIdUpDown; + s32 i; + f32 lineLength; + Vec3f posA; + Vec3f posB; + Vec3f posSide; + Vec3f posUpDown; + + bgIdUpDown = bgIdSide = BGCHECK_SCENE; + + lineLength = 2.0f * this->actor.speedXZ; + + posA.x = this->actor.world.pos.x + (this->axisUp.x * 5.0f); + posA.y = this->actor.world.pos.y + (this->axisUp.y * 5.0f); + posA.z = this->actor.world.pos.z + (this->axisUp.z * 5.0f); + + posB.x = this->actor.world.pos.x - (this->axisUp.x * 4.0f); + posB.y = this->actor.world.pos.y - (this->axisUp.y * 4.0f); + posB.z = this->actor.world.pos.z - (this->axisUp.z * 4.0f); + + if (EnRat_IsOnCollisionPoly(play, &posA, &posB, &posUpDown, &polyUpDown, &bgIdUpDown)) { + posB.x = (this->axisForwards.x * lineLength) + posA.x; + posB.y = (this->axisForwards.y * lineLength) + posA.y; + posB.z = (this->axisForwards.z * lineLength) + posA.z; + + if (EnRat_IsOnCollisionPoly(play, &posA, &posB, &posSide, &polySide, &bgIdSide)) { + if ((polySide != NULL) && this->hasLostTrackOfPlayer) { + return false; + } + + this->shouldRotateOntoSurfaces |= EnRat_UpdateFloorPoly(this, polySide, play); + Math_Vec3f_Copy(&this->actor.world.pos, &posSide); + this->actor.floorBgId = bgIdSide; + this->actor.speedXZ = 0.0f; + } else { + if (polyUpDown != this->actor.floorPoly) { + this->shouldRotateOntoSurfaces |= EnRat_UpdateFloorPoly(this, polyUpDown, play); + } + + Math_Vec3f_Copy(&this->actor.world.pos, &posUpDown); + this->actor.floorBgId = bgIdUpDown; + } + } else { + this->actor.speedXZ = 0.0f; + lineLength *= 3.0f; + Math_Vec3f_Copy(&posA, &posB); + + for (i = 0; i < 3; i++) { + if (i == 0) { + // backwards + posB.x = posA.x - (this->axisForwards.x * lineLength); + posB.y = posA.y - (this->axisForwards.y * lineLength); + posB.z = posA.z - (this->axisForwards.z * lineLength); + } else if (i == 1) { + // left + posB.x = posA.x + (this->axisLeft.x * lineLength); + posB.y = posA.y + (this->axisLeft.y * lineLength); + posB.z = posA.z + (this->axisLeft.z * lineLength); + } else { + // right + posB.x = posA.x - (this->axisLeft.x * lineLength); + posB.y = posA.y - (this->axisLeft.y * lineLength); + posB.z = posA.z - (this->axisLeft.z * lineLength); + } + + if (EnRat_IsOnCollisionPoly(play, &posA, &posB, &posSide, &polySide, &bgIdSide)) { + this->shouldRotateOntoSurfaces |= EnRat_UpdateFloorPoly(this, polySide, play); + Math_Vec3f_Copy(&this->actor.world.pos, &posSide); + this->actor.floorBgId = bgIdSide; + break; + } + } + + if (i == 3) { + // no collision nearby + return false; + } + } + + return true; +} + +/** + * Transform coordinates from actor coordinate space (origin at actor's world.pos, z-axis is facing + * angle, i.e. shape.rot.y) to world space, according to current orientation. + * `offset` is expected to already be at world scale. + */ +void EnRat_ActorCoordsToWorld(EnRat* this, Vec3f* offset, Vec3f* pos) { + f32 x = offset->x + this->visualJitter; + + pos->x = this->actor.world.pos.x + (this->axisLeft.x * x) + (this->axisUp.x * offset->y) + + (this->axisForwards.x * offset->z); + pos->y = this->actor.world.pos.y + (this->axisLeft.y * x) + (this->axisUp.y * offset->y) + + (this->axisForwards.y * offset->z); + pos->z = this->actor.world.pos.z + (this->axisLeft.z * x) + (this->axisUp.z * offset->y) + + (this->axisForwards.z * offset->z); +} + +/** + * This function will spawn splashes and ripples as the Real Bombchu runs across the water's surface. + */ +void EnRat_SpawnWaterEffects(EnRat* this, PlayState* play) { + s32 pad; + Vec3f splashPos; + + EffectSsGRipple_Spawn(play, &this->actor.world.pos, 70, 500, 0); + splashPos.x = this->actor.world.pos.x - (this->axisForwards.x * 10.0f); + splashPos.z = this->actor.world.pos.z - (this->axisForwards.z * 10.0f); + splashPos.y = this->actor.world.pos.y + 5.0f; + EffectSsGSplash_Spawn(play, &splashPos, NULL, NULL, 1, 450); +} + +void EnRat_HandleNonSceneCollision(EnRat* this, PlayState* play) { + s16 yaw = this->actor.shape.rot.y; + f32 sin; + f32 cos; + f32 tempX; + + BgCheck2_UpdateActorAttachedToMesh(&play->colCtx, this->actor.floorBgId, &this->actor); + + if (yaw != this->actor.shape.rot.y) { + yaw = this->actor.shape.rot.y - yaw; + + sin = Math_SinS(yaw); + cos = Math_CosS(yaw); + + tempX = this->axisForwards.x; + this->axisForwards.x = (sin * this->axisForwards.z) + (cos * tempX); + this->axisForwards.z = (cos * this->axisForwards.z) - (sin * tempX); + + tempX = this->axisUp.x; + this->axisUp.x = (sin * this->axisUp.z) + (cos * tempX); + this->axisUp.z = (cos * this->axisUp.z) - (sin * tempX); + + tempX = this->axisLeft.x; + this->axisLeft.x = (sin * this->axisLeft.z) + (cos * tempX); + this->axisLeft.z = (cos * this->axisLeft.z) - (sin * tempX); + } +} + +static Vec3f sSmokeAccel = { 0.0f, 0.6f, 0.0f }; +static Color_RGBA8 sSmokeColor = { 255, 255, 255, 255 }; + +void EnRat_SpawnSmoke(EnRat* this, PlayState* play) { + func_800B0EB0(play, &this->smokePos, &gZeroVec3f, &sSmokeAccel, &sSmokeColor, &sSmokeColor, 75, 7, 8); +} + +void EnRat_SetupRevive(EnRat* this) { + this->hasLostTrackOfPlayer = false; + this->timer = 200; + this->damageReaction.stunTimer = 0; + Math_Vec3f_Copy(&this->actor.world.pos, &this->actor.home.pos); + this->actor.shape.yOffset = 0.0f; + this->actor.shape.rot.x = this->actor.home.rot.x; + this->actor.shape.rot.y = this->actor.home.rot.y; + this->actor.shape.rot.z = this->actor.home.rot.z; + EnRat_InitializeAxes(this); + EnRat_UpdateRotation(this); + this->actor.flags &= ~ACTOR_FLAG_1; + this->actor.speedXZ = 0.0f; + Animation_PlayLoopSetSpeed(&this->skelAnime, &gRealBombchuSpotAnim, 0.0f); + this->revivePosY = 2666.6667f; + this->actor.draw = NULL; + this->actor.shape.shadowDraw = NULL; + this->actionFunc = EnRat_Revive; +} + +/** + * Makes the Real Bombchu respawn after a certain amount of time by tunneling up from underground. + * Used only by Overworld-type Bombchu. + */ +void EnRat_Revive(EnRat* this, PlayState* play) { + if (this->timer > 0) { + this->timer--; + if (this->timer == 0) { + this->actor.flags |= ACTOR_FLAG_1; + this->actor.draw = EnRat_Draw; + this->skelAnime.playSpeed = 1.0f; + } + } else { + Math_StepToF(&this->revivePosY, 0.0f, 666.6667f); + if (Animation_OnFrame(&this->skelAnime, 2.0f)) { + func_800B1210(play, &this->actor.world.pos, &this->axisUp, &gZeroVec3f, 600, 100); + this->actor.shape.shadowDraw = ActorShadow_DrawCircle; + } + + if (Animation_OnFrame(&this->skelAnime, 0.0f)) { + this->actor.flags &= ~ACTOR_FLAG_10; + this->timer = 150; + EnRat_SetupIdle(this); + } + } +} + +void EnRat_SetupIdle(EnRat* this) { + Animation_PlayLoop(&this->skelAnime, &gRealBombchuRunAnim); + this->animLoopCounter = 5; + this->actor.speedXZ = 2.0f; + this->actionFunc = EnRat_Idle; +} + +/** + * Move around randomly near the Bombchu's home until it spots the player. + */ +void EnRat_Idle(EnRat* this, PlayState* play) { + Player* player = GET_PLAYER(play); + + this->actor.speedXZ = 2.0f; + if (Animation_OnFrame(&this->skelAnime, 0.0f)) { + Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_BOMCHU_WALK); + if (this->animLoopCounter != 0) { + this->animLoopCounter--; + } + } + + if ((this->animLoopCounter == 0) && (Rand_ZeroOne() < 0.05f)) { + Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_BOMCHU_VOICE); + this->animLoopCounter = 5; + } + + if (!(player->stateFlags3 & PLAYER_STATE3_100) && (this->actor.xzDistToPlayer < this->attackRange) && + (Player_GetMask(play) != PLAYER_MASK_STONE) && Actor_IsFacingPlayer(&this->actor, 0x3800)) { + EnRat_SetupSpottedPlayer(this); + } +} + +void EnRat_SetupSpottedPlayer(EnRat* this) { + this->actor.flags |= ACTOR_FLAG_10; + Animation_MorphToLoop(&this->skelAnime, &gRealBombchuSpotAnim, -5.0f); + this->animLoopCounter = 3; + this->actor.speedXZ = 0.0f; + this->actionFunc = EnRat_SpottedPlayer; +} + +/** + * Play the "spotted" animation a few times, then start chasing the player. + */ +void EnRat_SpottedPlayer(EnRat* this, PlayState* play) { + if ((this->animLoopCounter == 3) && Animation_OnFrame(&this->skelAnime, 5.0f)) { + Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_BOMCHU_AIM); + } + + if (Animation_OnFrame(&this->skelAnime, 0.0f)) { + this->animLoopCounter--; + if (this->animLoopCounter == 0) { + EnRat_SetupChasePlayer(this); + } + } +} + +void EnRat_UpdateSparkOffsets(EnRat* this) { + s32 i; + Vec3f* ptr; + + for (i = 0; i < ARRAY_COUNT(this->sparkOffsets); i++) { + ptr = &this->sparkOffsets[i]; + ptr->x = randPlusMinusPoint5Scaled(6.0f); + ptr->y = randPlusMinusPoint5Scaled(6.0f); + ptr->z = randPlusMinusPoint5Scaled(6.0f); + } +} + +void EnRat_SetupChasePlayer(EnRat* this) { + Animation_MorphToLoop(&this->skelAnime, &gRealBombchuRunAnim, -5.0f); + this->actor.speedXZ = 6.1f; + EnRat_UpdateSparkOffsets(this); + this->actionFunc = EnRat_ChasePlayer; +} + +static Vec3f sBlureP1Offset = { 0.0f, 10.5f, -9.0f }; +static Vec3f sBlureP2LeftOffset = { 18.0f, 0.0f, -7.5f }; +static Vec3f sBlureP2RightOffset = { -18.0f, 0.0f, -7.5f }; +static Vec3f sDustVelocity = { 0.0f, 3.0f, 0.0f }; + +/** + * Run towards the player. If the player puts on the Stone Mask or burrows into a Deku + * Flower, the Real Bombchu will lose track of the player and run in a straight line. + */ +void EnRat_ChasePlayer(EnRat* this, PlayState* play) { + Player* player = GET_PLAYER(play); + Vec3f blureP1; + Vec3f blureP2; + + this->actor.speedXZ = 6.1f; + if (this->hasLostTrackOfPlayer) { + if (!(player->stateFlags3 & PLAYER_STATE3_100) && (Player_GetMask(play) != PLAYER_MASK_STONE) && + Actor_IsFacingPlayer(&this->actor, 0x3000)) { + this->hasLostTrackOfPlayer = false; + } + } else if ((player->stateFlags3 & PLAYER_STATE3_100) || (Player_GetMask(play) == PLAYER_MASK_STONE)) { + this->hasLostTrackOfPlayer = true; + } + + if (Animation_OnFrame(&this->skelAnime, 0.0f)) { + if (this->animLoopCounter != 0) { + this->animLoopCounter--; + } + + Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_BOMCHU_WALK); + } + + DECR(this->timer); + + if ((this->timer == 0) && (EN_RAT_GET_TYPE(&this->actor) == EN_RAT_TYPE_DUNGEON)) { + this->timer = 30; + } + + EnRat_SpawnSmoke(this, play); + this->visualJitter = + (5.0f + (Rand_ZeroOne() * 3.0f)) * Math_SinS(((Rand_ZeroOne() * 0x200) + 0x3000) * this->timer); + + if (EN_RAT_GET_TYPE(&this->actor) == EN_RAT_TYPE_DUNGEON) { + EnRat_ActorCoordsToWorld(this, &sBlureP1Offset, &blureP1); + + EnRat_ActorCoordsToWorld(this, &sBlureP2LeftOffset, &blureP2); + EffectBlure_AddVertex(Effect_GetByIndex(this->blure1Index), &blureP1, &blureP2); + + EnRat_ActorCoordsToWorld(this, &sBlureP2RightOffset, &blureP2); + EffectBlure_AddVertex(Effect_GetByIndex(this->blure2Index), &blureP1, &blureP2); + } else if ((this->actor.floorPoly != NULL) && ((play->gameplayFrames % 4) == 0)) { + func_800B1210(play, &this->actor.world.pos, &sDustVelocity, &gZeroVec3f, 550, 50); + } + + if ((this->actor.floorPoly == NULL) && (Animation_OnFrame(&this->skelAnime, 0.0f))) { + EnRat_SpawnWaterEffects(this, play); + } + + if ((this->animLoopCounter == 0) && (Rand_ZeroOne() < 0.05f)) { + Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_BOMCHU_AIM); + this->animLoopCounter = 5; + } + + func_800B9010(&this->actor, NA_SE_EN_BOMCHU_RUN - SFX_FLAG); + EnRat_UpdateSparkOffsets(this); +} + +void EnRat_SetupBounced(EnRat* this) { + this->actor.speedXZ = 5.0f; + this->actor.velocity.y = 8.0f; + this->actor.world.rot.y = this->actor.yawTowardsPlayer + 0x8000; + this->actor.gravity = -1.0f; + EnRat_UpdateSparkOffsets(this); + this->actor.bgCheckFlags &= ~(0x10 | 0x8 | 0x1); + this->actionFunc = EnRat_Bounced; +} + +/** + * Fly backwards until the Real Bombchu touches a wall, ceiling, or floor, then explode. + */ +void EnRat_Bounced(EnRat* this, PlayState* play) { + this->actor.shape.rot.x -= 0x700; + Math_StepToF(&this->actor.shape.yOffset, 1700.0f, 170.0f); + this->timer--; + if (this->timer == 0) { + this->timer = 30; + } + + if (this->actor.bgCheckFlags & (0x10 | 0x8 | 0x1)) { + EnRat_Explode(this, play); + } +} + +void EnRat_Explode(EnRat* this, PlayState* play) { + EnBom* bomb = (EnBom*)Actor_Spawn(&play->actorCtx, play, ACTOR_EN_BOM, this->actor.world.pos.x, + this->actor.world.pos.y, this->actor.world.pos.z, 0, 0, 0, ENBOM_0); + + if (bomb != NULL) { + bomb->timer = 0; + } + + if (EN_RAT_GET_TYPE(&this->actor) == EN_RAT_TYPE_OVERWORLD) { + Item_DropCollectibleRandom(play, &this->actor, &this->actor.world.pos, 0x100); + } + + this->actor.speedXZ = 0.0f; + this->actionFunc = EnRat_PostDetonation; +} + +/** + * If the Real Bombchu is an Overworld-type Bombchu, this will set it up to revive. + * Otherwise, it will simply kill the Bombchu. + */ +void EnRat_PostDetonation(EnRat* this, PlayState* play) { + if (EN_RAT_GET_TYPE(&this->actor) == EN_RAT_TYPE_OVERWORLD) { + EnRat_SetupRevive(this); + } else { + Actor_MarkForDeath(&this->actor); + } +} + +void EnRat_Update(Actor* thisx, PlayState* play) { + s32 pad; + EnRat* this = THIS; + + this->shouldRotateOntoSurfaces = false; + if (this->damageReaction.stunTimer == 0) { + SkelAnime_Update(&this->skelAnime); + } + + if (this->collider.base.atFlags & AT_HIT) { + this->collider.base.atFlags &= ~AT_HIT; + this->collider.base.acFlags &= ~AC_HIT; + this->collider.base.ocFlags1 &= ~OC1_HIT; + if (this->collider.base.atFlags & AT_BOUNCED) { + EnRat_SetupBounced(this); + } else { + EnRat_Explode(this, play); + return; + } + } else if (this->collider.base.acFlags & AC_HIT) { + this->collider.base.acFlags &= ~AC_HIT; + if (this->actor.colChkInfo.damageEffect == EN_RAT_DMGEFF_HOOKSHOT) { + this->damageReaction.hookedState = EN_RAT_HOOK_STARTED; + } else if (this->actor.colChkInfo.damageEffect == EN_RAT_DMGEFF_STUN) { + Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_COMMON_FREEZE); + Actor_SetColorFilter(&this->actor, 0, 120, 0, 40); + if (this->actionFunc == EnRat_Bounced) { + this->actor.speedXZ = 0.0f; + if (this->actor.velocity.y > 0.0f) { + this->actor.velocity.y = 0.0f; + } + } else { + this->damageReaction.stunTimer = 40; + } + } else { + EnRat_Explode(this, play); + return; + } + } else if (((this->collider.base.ocFlags1 & OC1_HIT) && (((this->collider.base.oc->category == ACTORCAT_ENEMY)) || + (this->collider.base.oc->category == ACTORCAT_BOSS) || + (this->collider.base.oc->category == ACTORCAT_PLAYER))) || + ((this->actionFunc == EnRat_ChasePlayer) && (this->timer == 0))) { + this->collider.base.ocFlags1 &= ~OC1_HIT; + EnRat_Explode(this, play); + return; + } + + this->actionFunc(this, play); + + if ((this->actionFunc != EnRat_PostDetonation) && (this->actionFunc != EnRat_Revive)) { + if (this->damageReaction.stunTimer > 0) { + this->damageReaction.stunTimer--; + } else if (this->damageReaction.hookedState < 0) { + if (this->damageReaction.hookedState == EN_RAT_HOOK_STARTED) { + // The player just hit the Real Bombchu with the Hookshot. + this->damageReaction.hookedState = EN_RAT_HOOKED; + } else if ((this->actor.flags & ACTOR_FLAG_2000) != ACTOR_FLAG_2000) { + // The player has hooked the Real Bombchu for more than one frame, but + // the actor flag indicating that the Hookshot is attached is *not* set. + EnRat_Explode(this, play); + return; + } + } else if (this->actionFunc != EnRat_Bounced) { + if (this->actor.floorBgId != BGCHECK_SCENE) { + EnRat_HandleNonSceneCollision(this, play); + } + + if (!this->hasLostTrackOfPlayer) { + EnRat_ChooseDirection(this); + } + + if ((this->actionFunc != EnRat_SpottedPlayer) && !EnRat_IsTouchingSurface(this, play)) { + EnRat_Explode(this, play); + return; + } + + if (this->shouldRotateOntoSurfaces) { + EnRat_UpdateRotation(this); + this->actor.shape.rot.x = -this->actor.world.rot.x; + this->actor.shape.rot.y = this->actor.world.rot.y; + this->actor.shape.rot.z = this->actor.world.rot.z; + } + + Actor_MoveWithoutGravity(&this->actor); + this->actor.floorHeight = this->actor.world.pos.y; + } else { + Actor_MoveWithGravity(&this->actor); + Actor_UpdateBgCheckInfo(play, &this->actor, 20.0f, 30.0f, 60.0f, 7); + } + + if (SurfaceType_IsWallDamage(&play->colCtx, this->actor.floorPoly, this->actor.floorBgId)) { + EnRat_Explode(this, play); + return; + } + + this->collider.dim.worldSphere.center.x = this->actor.world.pos.x + (this->axisUp.x * 10.0f); + this->collider.dim.worldSphere.center.y = this->actor.world.pos.y + (this->axisUp.y * 10.0f); + this->collider.dim.worldSphere.center.z = this->actor.world.pos.z + (this->axisUp.z * 10.0f); + + if (this->actionFunc != EnRat_Revive) { + if (this->damageReaction.stunTimer == 0) { + CollisionCheck_SetAT(play, &play->colChkCtx, &this->collider.base); + } + + CollisionCheck_SetAC(play, &play->colChkCtx, &this->collider.base); + CollisionCheck_SetOC(play, &play->colChkCtx, &this->collider.base); + } + + Actor_SetFocus(&this->actor, this->actor.shape.yOffset * 0.015f); + } +} + +s32 EnRat_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx) { + EnRat* this = THIS; + + if (limbIndex == REAL_BOMBCHU_LIMB_BODY) { + pos->y -= this->revivePosY; + } + + if (limbIndex == REAL_BOMBCHU_LIMB_TAIL_END) { + *dList = NULL; + } + + return false; +} + +void EnRat_PostLimbDraw(PlayState* play2, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* thisx) { + PlayState* play = play2; + EnRat* this = THIS; + MtxF* currentMatrixState; + Vec3f* ptr; + f32 redModifier; + + if (limbIndex == REAL_BOMBCHU_LIMB_TAIL_END) { + OPEN_DISPS(play->state.gfxCtx); + + Matrix_ReplaceRotation(&play->billboardMtxF); + Matrix_MultZero(&this->smokePos); + this->smokePos.y += 15.0f; + currentMatrixState = Matrix_GetCurrent(); + + if (this->actionFunc == EnRat_ChasePlayer) { + s32 i; + + gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, 255, 255, 150, 255); + gDPSetEnvColor(POLY_XLU_DISP++, 255, 0, 0, 0); + Matrix_Scale(45.0f, 45.0f, 45.0f, MTXMODE_APPLY); + + for (i = 0; i < ARRAY_COUNT(this->sparkOffsets); i++) { + ptr = &this->sparkOffsets[i]; + currentMatrixState->mf[3][0] = this->smokePos.x + ptr->x; + currentMatrixState->mf[3][1] = this->smokePos.y + ptr->y; + currentMatrixState->mf[3][2] = this->smokePos.z + ptr->z; + gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(play->state.gfxCtx), + G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); + gSPSegment(POLY_XLU_DISP++, 0x08, sSparkTextures[(play->gameplayFrames + i) & 3]); + gSPDisplayList(POLY_XLU_DISP++, gEffSparkDL); + } + + Matrix_Scale(1.0f / 45.0f, 1.0f / 45.0f, 1.0f / 45.0f, MTXMODE_APPLY); + currentMatrixState->mf[3][0] = this->smokePos.x; + currentMatrixState->mf[3][1] = this->smokePos.y - 15.0f; + currentMatrixState->mf[3][2] = this->smokePos.z; + } + + gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(play->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); + gSPDisplayList(POLY_OPA_DISP++, gBombCapDL); + if (EN_RAT_GET_TYPE(&this->actor) == EN_RAT_TYPE_DUNGEON) { + redModifier = fabsf(cos_rad(this->timer * (M_PI / 30.f))); + } else { + if (this->timer >= 120) { + redModifier = fabsf(cos_rad((this->timer % 30) * (M_PI / 30.0f))); + } else if (this->timer >= 30) { + redModifier = fabsf(cos_rad((this->timer % 6) * (M_PI / 6.0f))); + } else { + redModifier = fabsf(cos_rad((this->timer % 3) * (M_PI / 3.0f))); + } + } + + gDPSetEnvColor(POLY_OPA_DISP++, (s32)((1.0f - redModifier) * 255.0f), 0, 40, 255); + gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, (s32)((1.0f - redModifier) * 255.0f), 0, 40, 255); + Matrix_RotateZYX(0x4000, 0, 0, MTXMODE_APPLY); + gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(play->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); + gSPDisplayList(POLY_OPA_DISP++, gBombBodyDL); + + CLOSE_DISPS(play->state.gfxCtx); + } +} + +void EnRat_Draw(Actor* thisx, PlayState* play) { + EnRat* this = THIS; + + func_8012C28C(play->state.gfxCtx); + func_8012C974(play->state.gfxCtx); + func_800B8050(&this->actor, play, 0); + SkelAnime_DrawFlexOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount, + EnRat_OverrideLimbDraw, EnRat_PostLimbDraw, &this->actor); +} diff --git a/src/overlays/actors/ovl_En_Rat/z_en_rat.h b/src/overlays/actors/ovl_En_Rat/z_en_rat.h index c3ad7eedc..6dd51d10a 100644 --- a/src/overlays/actors/ovl_En_Rat/z_en_rat.h +++ b/src/overlays/actors/ovl_En_Rat/z_en_rat.h @@ -2,12 +2,57 @@ #define Z_EN_RAT_H #include "global.h" +#include "objects/object_rat/object_rat.h" + +#define EN_RAT_IS_OVERWORLD_TYPE(thisx) ((thisx)->params & 0x8000) +#define EN_RAT_GET_TYPE(thisx) ((thisx)->params) +#define EN_RAT_GET_ATTACK_RANGE(thisx) ((thisx)->params & 0xFF) + +/** + * There are many differences between the two types of Real Bombchu: + * - Dungeon-type don't respawn, while Overworld-type do. + * - Dungeon-type leave a blure trail behind them as they chase the player, + * while Overworld-type spawn dust around themselves instead. + * - Dungeon-type won't detonate automatically, while Overworld-type will + * detonate after 150 frames of chasing the player. + * - So long as EN_RAT_GET_ATTACK_RANGE returns something other than 0 or 255, + * Dungeon-type have 1/5th of the attack range compared to Overworld-type. + * - Dungeon-type do not drop items upon defeat, while Overworld-type do. + */ +typedef enum { + /* 0 */ EN_RAT_TYPE_DUNGEON, + /* 1 */ EN_RAT_TYPE_OVERWORLD, +} EnRatType; struct EnRat; +typedef void (*EnRatActionFunc)(struct EnRat*, PlayState*); + typedef struct EnRat { /* 0x000 */ Actor actor; - /* 0x144 */ char unk_144[0x17C]; + /* 0x144 */ SkelAnime skelAnime; + /* 0x188 */ EnRatActionFunc actionFunc; + /* 0x18C */ u8 hasLostTrackOfPlayer; + /* 0x18D */ u8 shouldRotateOntoSurfaces; + /* 0x18E */ s16 animLoopCounter; + /* 0x190 */ s16 timer; // Used for both exploding and reviving + /* 0x192 */ union { + s16 stunTimer; + s16 hookedState; + } damageReaction; + /* 0x194 */ Vec3s jointTable[REAL_BOMBCHU_LIMB_MAX]; + /* 0x1D0 */ Vec3s morphTable[REAL_BOMBCHU_LIMB_MAX]; + /* 0x20C */ Vec3f axisForwards; + /* 0x218 */ Vec3f axisUp; + /* 0x224 */ Vec3f axisLeft; + /* 0x230 */ Vec3f smokePos; + /* 0x23C */ Vec3f sparkOffsets[2]; + /* 0x254 */ f32 visualJitter; + /* 0x258 */ f32 attackRange; + /* 0x25C */ f32 revivePosY; + /* 0x260 */ s32 blure1Index; + /* 0x264 */ s32 blure2Index; + /* 0x268 */ ColliderSphere collider; } EnRat; // size = 0x2C0 extern const ActorInit En_Rat_InitVars; diff --git a/src/overlays/actors/ovl_En_Rg/z_en_rg.c b/src/overlays/actors/ovl_En_Rg/z_en_rg.c index 2415993b1..896947fa6 100644 --- a/src/overlays/actors/ovl_En_Rg/z_en_rg.c +++ b/src/overlays/actors/ovl_En_Rg/z_en_rg.c @@ -724,7 +724,7 @@ void func_80BF4FC4(EnRg* this, PlayState* play) { void EnRg_Init(Actor* thisx, PlayState* play) { EnRg* this = THIS; - if (gSaveContext.save.entranceIndex == 0xD010) { + if (gSaveContext.save.entrance == ENTRANCE(GORON_RACETRACK, 1)) { ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 20.0f); SkelAnime_InitFlex(play, &this->skelAnime, &gGoronSkel, NULL, this->jointTable, this->morphTable, GORON_LIMB_MAX); diff --git a/src/overlays/actors/ovl_En_Rsn/z_en_rsn.c b/src/overlays/actors/ovl_En_Rsn/z_en_rsn.c index dd25ce9b9..d7a4f9170 100644 --- a/src/overlays/actors/ovl_En_Rsn/z_en_rsn.c +++ b/src/overlays/actors/ovl_En_Rsn/z_en_rsn.c @@ -30,10 +30,10 @@ const ActorInit En_Rsn_InitVars = { (ActorFunc)EnRsn_Draw, }; -static AnimationInfo sAnimations[] = { { &gBombShopkeeperSwayAnim, 1.0f, 0.0f, 0.0f, ANIMMODE_LOOP, 0.0f } }; +static AnimationInfo sAnimationInfo[] = { { &gBombShopkeeperSwayAnim, 1.0f, 0.0f, 0.0f, ANIMMODE_LOOP, 0.0f } }; void func_80C25D40(EnRsn* this) { - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, 0); + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, 0); this->actionFunc = func_80C25D84; } diff --git a/src/overlays/actors/ovl_En_S_Goro/z_en_s_goro.c b/src/overlays/actors/ovl_En_S_Goro/z_en_s_goro.c index 00637ba25..ccc11a002 100644 --- a/src/overlays/actors/ovl_En_S_Goro/z_en_s_goro.c +++ b/src/overlays/actors/ovl_En_S_Goro/z_en_s_goro.c @@ -4,18 +4,96 @@ * Description: Goron in Goron Shrine / Bomb Shop Goron */ +/* +This actor appears to be used in three scenes. +-- Goron Shrine: Winter + Three variants (one instance of each used in game). + Main behavior determined by whether the Goron Elder's Son is asleep, and whether they themselves have been put to +sleep. One of them also has a dialogue tree that checks whether you have lit the chandelier (at least if the kid is not +crying) +-- Goron Shrine: Spring + Six variants - one instance of each appearing in a circle around the elder on the upper level of the shrine if +you've beaten Goht during that cycle. Dialogue determined by whether you have talked to elder in that context as a goron +at least once during that cycle. They have a cheering animation used while the elder is talking to you, otherwise they +stand idle. +-- Bomb Shop + Only one variant. Goron who sells you powder kegs in the bomb shop. +*/ + +/* +Week Event Flags: + 22 Bit 2 -- Goron Elder's Son has been pacified (Winter) + 77 Bit 7 -- You have spoken to the Goron Elder in goron form during spring + + 36 All Bits + 37 Bits 0 - 2 + Track whether or not you have ever spoken to each of the three winter shrine gorons + in various forms. ("Ever" being since last time reset, of course) +*/ + #include "z_en_s_goro.h" +#include "overlays/actors/ovl_En_Gk/z_en_gk.h" // Goron Elder's Son +#include "overlays/actors/ovl_En_Jg/z_en_jg.h" // Goron Elder +#include "objects/object_taisou/object_taisou.h" #define FLAGS (ACTOR_FLAG_1 | ACTOR_FLAG_8 | ACTOR_FLAG_10) - #define THIS ((EnSGoro*)thisx) +#define EN_S_GORO_ROLLEDUP_YOFFSET 14.0f +#define EN_S_GORO_OFTYPE_WSHRINE (EN_S_GORO_GET_MAIN_TYPE(&this->actor) < 3) + +#define EN_S_GORO_ACTIONFLAG_ROLLEDUP (1 << 0) +#define EN_S_GORO_ACTIONFLAG_FACEPLAYER (1 << 1) +#define EN_S_GORO_ACTIONFLAG_EYESOPEN (1 << 2) +#define EN_S_GORO_ACTIONFLAG_EARSCOVERED (1 << 3) +#define EN_S_GORO_ACTIONFLAG_ENGAGED (1 << 4) +#define EN_S_GORO_ACTIONFLAG_LASTMESSAGE (1 << 5) +#define EN_S_GORO_ACTIONFLAG_GKQUIET_ACKNOWLEDGED (1 << 6) +#define EN_S_GORO_ACTIONFLAG_SNOREPHASE (1 << 7) +#define EN_S_GORO_ACTIONFLAG_UNK0100 (1 << 8) +#define EN_S_GORO_ACTIONFLAG_HANDTAP (1 << 9) +#define EN_S_GORO_ACTIONFLAG_TIRED (1 << 10) +#define EN_S_GORO_ACTIONFLAG_SUPPRESS_SNORE (1 << 11) + +#define EN_S_GORO_BOMBBUYFLAG_TALKED_HUMAN (1 << 0) +#define EN_S_GORO_BOMBBUYFLAG_TALKED_GORONPK (1 << 1) +#define EN_S_GORO_BOMBBUYFLAG_TALKED_DEKU (1 << 2) +#define EN_S_GORO_BOMBBUYFLAG_TALKED_ZORA (1 << 3) +#define EN_S_GORO_BOMBBUYFLAG_TALKED_HUMAN_FINALNIGHT (1 << 4) +#define EN_S_GORO_BOMBBUYFLAG_TALKED_GOROKPK_FINALNIGHT (1 << 5) +#define EN_S_GORO_BOMBBUYFLAG_TALKED_DEKU_FINALNIGHT (1 << 6) +#define EN_S_GORO_BOMBBUYFLAG_TALKED_ZORA_FINALNIGHT (1 << 7) +#define EN_S_GORO_BOMBBUYFLAG_TALKED_GORON (1 << 8) +#define EN_S_GORO_BOMBBUYFLAG_TALKED_GORON_FINALNIGHT (1 << 9) +#define EN_S_GORO_BOMBBUYFLAG_YESBUY (1 << 10) + void EnSGoro_Init(Actor* thisx, PlayState* play); void EnSGoro_Destroy(Actor* thisx, PlayState* play); void EnSGoro_Update(Actor* thisx, PlayState* play); void EnSGoro_Draw(Actor* thisx, PlayState* play); -#if 0 +typedef enum EnSGoroEyeTexture { + /* 0x0 */ EN_S_GORO_EYETEX_OPEN, + /* 0x1 */ EN_S_GORO_EYETEX_HALF, + /* 0x2 */ EN_S_GORO_EYETEX_CLOSED, + /* 0x3 */ EN_S_GORO_EYETEX_CLOSED2 +} EnSGoroEyeTexture; + +typedef enum EnSGoroAnimation { + /* 0x0 */ EN_S_GORO_ANIM_IDLE_LIEDOWN_A, + /* 0x1 */ EN_S_GORO_ANIM_IDLE_LIEDOWN_B, + /* 0x2 */ EN_S_GORO_ANIM_UNROLL_A, + /* 0x3 */ EN_S_GORO_ANIM_UNROLL_B, + /* 0x4 */ EN_S_GORO_ANIM_ROLLUP, + /* 0x5 */ EN_S_GORO_ANIM_SHIVER_A, + /* 0x6 */ EN_S_GORO_ANIM_SHIVER_B, + /* 0xB */ EN_S_GORO_ANIM_COVEREARS = 11, + /* 0xC */ EN_S_GORO_ANIM_TAISOU_CHEER, + /* 0xD */ EN_S_GORO_ANIM_STAND_HANDTAP, + /* 0xE */ EN_S_GORO_ANIM_SLEEPY, + /* 0xF */ EN_S_GORO_ANIM_IDLE_STAND +} EnSGoroAnimation; + const ActorInit En_S_Goro_InitVars = { ACTOR_EN_S_GORO, ACTORCAT_NPC, @@ -28,18 +106,29 @@ const ActorInit En_S_Goro_InitVars = { (ActorFunc)EnSGoro_Draw, }; -// static ColliderCylinderInit sCylinderInit = { -static ColliderCylinderInit D_80BBF820 = { - { COLTYPE_HIT1, AT_NONE, AC_ON | AC_TYPE_PLAYER, OC1_ON | OC1_TYPE_ALL, OC2_TYPE_1, COLSHAPE_CYLINDER, }, - { ELEMTYPE_UNK1, { 0x00000000, 0x00, 0x00 }, { 0xF7CFFFFF, 0x00, 0x00 }, TOUCH_ON | TOUCH_SFX_NORMAL, BUMP_ON, OCELEM_ON, }, +static ColliderCylinderInit sCylinderInit = { + { + COLTYPE_HIT1, + AT_NONE, + AC_ON | AC_TYPE_PLAYER, + OC1_ON | OC1_TYPE_ALL, + OC2_TYPE_1, + COLSHAPE_CYLINDER, + }, + { + ELEMTYPE_UNK1, + { 0x00000000, 0x00, 0x00 }, + { 0xF7CFFFFF, 0x00, 0x00 }, + TOUCH_ON, + BUMP_ON, + OCELEM_ON, + }, { 0, 0, 0, { 0, 0, 0 } }, }; -// sColChkInfoInit -static CollisionCheckInfoInit2 D_80BBF84C = { 0, 0, 0, 0, MASS_IMMOVABLE }; +static CollisionCheckInfoInit2 sColChkInfoInit = { 0, 0, 0, 0, MASS_IMMOVABLE }; -// static DamageTable sDamageTable = { -static DamageTable D_80BBF858 = { +static DamageTable sDamageTable = { /* Deku Nut */ DMG_ENTRY(1, 0x0), /* Deku Stick */ DMG_ENTRY(1, 0x0), /* Horse trample */ DMG_ENTRY(1, 0x0), @@ -74,85 +163,1314 @@ static DamageTable D_80BBF858 = { /* Powder Keg */ DMG_ENTRY(1, 0x0), }; -#endif +static AnimationInfoS sAnimationInfo[] = { + { &gGoronLyingDownIdleAnim, 1.0f, 0, -1, ANIMMODE_LOOP, 0 }, + { &gGoronLyingDownIdleAnim, 1.0f, 0, -1, ANIMMODE_LOOP, -4 }, + { &gGoronUnrollAnim, 2.0f, 0, -1, ANIMMODE_ONCE, 0 }, + { &gGoronUnrollAnim, 2.0f, 0, -1, ANIMMODE_ONCE, -4 }, + { &gGoronUnrollAnim, -2.0f, 0, -1, ANIMMODE_ONCE, -4 }, + { &gGoronShiverAnim, 1.0f, 0, -1, ANIMMODE_LOOP, 0 }, + { &gGoronShiverAnim, 1.0f, 0, -1, ANIMMODE_LOOP, -4 }, + { &object_taisou_Anim_004DD4, 1.0f, 0, -1, ANIMMODE_LOOP, 0 }, + { &object_taisou_Anim_00283C, 1.0f, 0, -1, ANIMMODE_LOOP, 0 }, + { &object_taisou_Anim_007764, 1.0f, 0, -1, ANIMMODE_LOOP, 0 }, + { &object_taisou_Anim_005790, 1.0f, 0, -1, ANIMMODE_LOOP, 0 }, + { &gGoronCoverEarsAnim, 1.0f, 0, -1, ANIMMODE_LOOP, 0 }, + { &object_taisou_Anim_002C48, 1.0f, 0, -1, ANIMMODE_LOOP, -4 }, + { &gGoronStandingHandTappingAnim, 1.0f, 0, -1, ANIMMODE_LOOP, -4 }, + { &gGoronSleepyAnim, 1.0f, 0, -1, ANIMMODE_ONCE, -4 }, + { &gGoronStandingIdleAnim, 1.0f, 0, -1, ANIMMODE_LOOP, -8 }, +}; -extern ColliderCylinderInit D_80BBF820; -extern CollisionCheckInfoInit2 D_80BBF84C; -extern DamageTable D_80BBF858; +static TexturePtr sEyeTextures[] = { + gGoronEyeOpenTex, + gGoronEyeHalfTex, + gGoronEyeClosedTex, + gGoronEyeClosed2Tex, +}; -extern UNK_TYPE D_060091A8; -extern UNK_TYPE D_06012DE0; +u16 EnSGoro_ShrineGoron_NextTextId(EnSGoro* this, PlayState* play); +u16 EnSGoro_BombshopGoron_NextTextId(EnSGoro* this, PlayState* play); -#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_S_Goro/func_80BBCA80.s") +s32 EnSGoro_FindGoronElder(EnSGoro* this, PlayState* play); +s32 EnSGoro_FindGoronChild(EnSGoro* this, PlayState* play); +s32 EnSGoro_CheckLullaby(EnSGoro* this, PlayState* play); +s32 EnSGoro_CheckGKBehavior(EnSGoro* this, PlayState* play); -#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_S_Goro/func_80BBD348.s") +void EnSGoro_SetupAction(EnSGoro* this, PlayState* play); +void EnSGoro_WinterShrineGoron_Idle(EnSGoro* this, PlayState* play); +void EnSGoro_WinterShrineGoron_Talk(EnSGoro* this, PlayState* play); +void EnSGoro_SpringShrineGoron_Idle(EnSGoro* this, PlayState* play); +void EnSGoro_SpringShrineGoron_Talk(EnSGoro* this, PlayState* play); +void EnSGoro_ShopGoron_Idle(EnSGoro* this, PlayState* play); +void EnSGoro_ShopGoron_FinishUnroll(EnSGoro* this, PlayState* play); +void EnSGoro_ShopGoron_Talk(EnSGoro* this, PlayState* play); +void EnSGoro_ShopGoron_TakePayment(EnSGoro* this, PlayState* play); +void EnSGoro_ShopGoron_FinishTransaction(EnSGoro* this, PlayState* play); +void EnSGoro_Sleep(EnSGoro* this, PlayState* play); +void EnSGoro_SleepTalk(EnSGoro* this, PlayState* play); -#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_S_Goro/func_80BBD8F0.s") +s32 EnSGoro_UpdateCheerAnimation(EnSGoro* this, PlayState* play); +s32 EnSGoro_UpdateRotationToPlayer(EnSGoro* this, PlayState* play); +s32 EnSGoro_UpdateAttentionTarget(EnSGoro* this, PlayState* play); +void EnSGoro_UpdateToHandtapAnimation(EnSGoro* this); +void EnSGoro_UpdateSleepyAnimation(EnSGoro* this); +void EnSGoro_UpdateToIdleAnimation(EnSGoro* this); +void EnSGoro_UpdateEyes(EnSGoro* this); +void EnSGoro_UpdateActorFocus(EnSGoro* this); +void EnSGoro_UpdateSleeping(EnSGoro* this, PlayState* play); +void EnSGoro_UpdateCollider(EnSGoro* this, PlayState* play); -#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_S_Goro/func_80BBD93C.s") +s32 EnSGoro_UpdateLimb(s16 newRotZ, s16 newRotY, Vec3f* pos, Vec3s* rot, s32 stepRot, s32 overrideRot); +s32 EnSGoro_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx); +void EnSGoro_TransformLimbDraw(PlayState* play, s32 limbIndex, Actor* thisx); +void EnSGoro_DrawUnrolled(EnSGoro* this, PlayState* play); +void EnSGoro_DrawRolledUp(EnSGoro* this, PlayState* play); -#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_S_Goro/func_80BBD98C.s") +/** + * Dialogue tree for EnSGoro when use in Goron Shrine context. Returns ID of next message to display. + */ +u16 EnSGoro_ShrineGoron_NextTextId(EnSGoro* this, PlayState* play) { + Player* player = GET_PLAYER(play); -#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_S_Goro/func_80BBDACC.s") + switch (EN_S_GORO_GET_MAIN_TYPE(&this->actor)) { + case EN_S_GORO_TYPE_SHRINE_WINTER_A: + if (!(gSaveContext.save.weekEventReg[22] & 4)) { + if (player->transformation == PLAYER_FORM_GORON) { + if (!(gSaveContext.save.weekEventReg[36] & 2)) { + switch (this->textId) { + case 0xCFB: + return 0xCFC; + case 0xCFC: + return 0xCFD; + case 0xCFD: + gSaveContext.save.weekEventReg[36] |= 2; + this->actionFlags |= EN_S_GORO_ACTIONFLAG_LASTMESSAGE; + return 0xCFE; + default: + return 0xCFB; + } + } else { + this->actionFlags |= EN_S_GORO_ACTIONFLAG_LASTMESSAGE; + return 0xCFE; + } + } else { + if (!(gSaveContext.save.weekEventReg[36] & 1)) { + gSaveContext.save.weekEventReg[36] |= 1; + return 0xCF9; + } + this->actionFlags |= EN_S_GORO_ACTIONFLAG_LASTMESSAGE; + return 0xCFA; + } + } else { + // Scene flag - Checks whether the chandelier has been lit + if (!Flags_GetSwitch(play, EN_S_GORO_SCENEFLAG_INDEX(&this->actor))) { + if (player->transformation == PLAYER_FORM_GORON) { + if (!(gSaveContext.save.weekEventReg[36] & 8)) { + if (this->textId == 0xD02) { + gSaveContext.save.weekEventReg[36] |= 8; + this->actionFlags |= EN_S_GORO_ACTIONFLAG_LASTMESSAGE; + return 0xD03; + } + return 0xD02; + } + this->actionFlags |= EN_S_GORO_ACTIONFLAG_LASTMESSAGE; + return 0xD04; + } + if (!(gSaveContext.save.weekEventReg[36] & 4)) { + if (this->textId == 0xCFF) { + this->actionFlags |= EN_S_GORO_ACTIONFLAG_LASTMESSAGE; + gSaveContext.save.weekEventReg[36] |= 4; + return 0xD00; + } + return 0xCFF; + } + this->actionFlags |= EN_S_GORO_ACTIONFLAG_LASTMESSAGE; + return 0xD01; + } + if (!(gSaveContext.save.weekEventReg[36] & 0x10)) { + if (this->textId == 0xD05) { + gSaveContext.save.weekEventReg[36] |= 0x10; + this->actionFlags |= EN_S_GORO_ACTIONFLAG_LASTMESSAGE; + return 0xD06; + } + return 0xD05; + } + this->actionFlags |= EN_S_GORO_ACTIONFLAG_LASTMESSAGE; + return 0xD07; + } + break; -#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_S_Goro/func_80BBDC34.s") + case EN_S_GORO_TYPE_SHRINE_WINTER_B: + if (!(gSaveContext.save.weekEventReg[22] & 4)) { + if (player->transformation == PLAYER_FORM_GORON) { + if (!(gSaveContext.save.weekEventReg[36] & 0x40)) { + switch (this->textId) { + case 0xD15: + return 0xD16; + case 0xD16: + gSaveContext.save.weekEventReg[36] |= 0x40; + this->actionFlags |= EN_S_GORO_ACTIONFLAG_LASTMESSAGE; + return 0xD17; + default: + return 0xD15; + } + } else { + this->actionFlags |= EN_S_GORO_ACTIONFLAG_LASTMESSAGE; + return 0xD17; + } + } else { + if (!(gSaveContext.save.weekEventReg[36] & 0x20)) { + gSaveContext.save.weekEventReg[36] |= 0x20; + return 0xD13; + } + this->actionFlags |= EN_S_GORO_ACTIONFLAG_LASTMESSAGE; + return 0xD14; + } + } else if (player->transformation == PLAYER_FORM_GORON) { + if (!(gSaveContext.save.weekEventReg[37] & 1)) { + switch (this->textId) { + case 0xD1E: + return 0xD1F; + case 0xD1F: + gSaveContext.save.weekEventReg[37] |= 1; + this->actionFlags |= EN_S_GORO_ACTIONFLAG_LASTMESSAGE; + return 0xD20; + default: + return 0xD1E; + } + } else { + this->actionFlags |= EN_S_GORO_ACTIONFLAG_LASTMESSAGE; + return 0xD21; + } + } else { + if (!(gSaveContext.save.weekEventReg[36] & 0x80)) { + switch (this->textId) { + case 0xD18: + return 0xD19; + case 0xD19: + return 0xD1A; + case 0xD1A: + return 0xD1B; + case 0xD1B: + gSaveContext.save.weekEventReg[36] |= 0x80; + this->actionFlags |= EN_S_GORO_ACTIONFLAG_LASTMESSAGE; + return 0xD1C; + default: + return 0xD18; + } + } else { + this->actionFlags |= EN_S_GORO_ACTIONFLAG_LASTMESSAGE; + return 0xD1D; + } + } + break; -#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_S_Goro/func_80BBDCFC.s") + case EN_S_GORO_TYPE_SHRINE_WINTER_C: + if (!(gSaveContext.save.weekEventReg[22] & 4)) { + if (player->transformation == PLAYER_FORM_GORON) { + if (!(gSaveContext.save.weekEventReg[37] & 2)) { + switch (this->textId) { + case 0xD09: + return 0xD0A; + case 0xD0A: + return 0xD0B; + case 0xD0B: + gSaveContext.save.weekEventReg[37] |= 2; + this->actionFlags |= EN_S_GORO_ACTIONFLAG_LASTMESSAGE; + return 0xD0C; + default: + return 0xD09; + } + } else { + this->actionFlags |= EN_S_GORO_ACTIONFLAG_LASTMESSAGE; + return 0xD0D; + } + } else { + this->actionFlags |= EN_S_GORO_ACTIONFLAG_LASTMESSAGE; + return 0xD08; + } + } else if (player->transformation == PLAYER_FORM_GORON) { + if (!(gSaveContext.save.weekEventReg[37] & 4)) { + switch (this->textId) { + case 0xD0E: + return 0xD0F; + case 0xD0F: + gSaveContext.save.weekEventReg[37] |= 4; + this->actionFlags |= EN_S_GORO_ACTIONFLAG_LASTMESSAGE; + return 0xD10; + default: + return 0xD0E; + } + } else { + this->actionFlags |= EN_S_GORO_ACTIONFLAG_LASTMESSAGE; + return 0xD11; + } + } else { + this->actionFlags |= EN_S_GORO_ACTIONFLAG_LASTMESSAGE; + return 0xD12; + } + break; -#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_S_Goro/func_80BBDDF8.s") + case EN_S_GORO_TYPE_SHRINE_SPRING_A: + if (player->transformation == PLAYER_FORM_GORON) { + if (gSaveContext.save.weekEventReg[77] & 0x80) { + if (this->textId == 0xDE3) { + this->actionFlags |= EN_S_GORO_ACTIONFLAG_LASTMESSAGE; + return 0xDE4; + } + return 0xDE3; + } + this->actionFlags |= EN_S_GORO_ACTIONFLAG_LASTMESSAGE; + return 0xDE2; + } + this->actionFlags |= EN_S_GORO_ACTIONFLAG_LASTMESSAGE; + return 0xDE1; -#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_S_Goro/func_80BBDE78.s") + case EN_S_GORO_TYPE_SHRINE_SPRING_B: + if (player->transformation == PLAYER_FORM_GORON) { + if (gSaveContext.save.weekEventReg[77] & 0x80) { + if (this->textId == 0xDE7) { + this->actionFlags |= EN_S_GORO_ACTIONFLAG_LASTMESSAGE; + return 0xDE8; + } + return 0xDE7; + } + this->actionFlags |= EN_S_GORO_ACTIONFLAG_LASTMESSAGE; + return 0xDE6; + } + this->actionFlags |= EN_S_GORO_ACTIONFLAG_LASTMESSAGE; + return 0xDE5; -#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_S_Goro/func_80BBDF28.s") + case EN_S_GORO_TYPE_SHRINE_SPRING_C: + if (player->transformation == PLAYER_FORM_GORON) { + if (gSaveContext.save.weekEventReg[77] & 0x80) { + if (this->textId == 0xDEB) { + this->actionFlags |= EN_S_GORO_ACTIONFLAG_LASTMESSAGE; + return 0xDEC; + } + return 0xDEB; + } + this->actionFlags |= EN_S_GORO_ACTIONFLAG_LASTMESSAGE; + return 0xDEA; + } + this->actionFlags |= EN_S_GORO_ACTIONFLAG_LASTMESSAGE; + return 0xDE9; -#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_S_Goro/func_80BBDFA8.s") + case EN_S_GORO_TYPE_SHRINE_SPRING_D: + if (player->transformation == PLAYER_FORM_GORON) { + if (gSaveContext.save.weekEventReg[77] & 0x80) { + if (this->textId == 0xDF1) { + this->actionFlags |= EN_S_GORO_ACTIONFLAG_LASTMESSAGE; + return 0xDF2; + } + return 0xDF1; + } + this->actionFlags |= EN_S_GORO_ACTIONFLAG_LASTMESSAGE; + return 0xDF0; + } + switch (this->textId) { + case 0xDED: + return 0xDEE; + case 0xDEE: + this->actionFlags |= EN_S_GORO_ACTIONFLAG_LASTMESSAGE; + return 0xDEF; + default: + return 0xDED; + } + break; -#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_S_Goro/func_80BBE05C.s") + case EN_S_GORO_TYPE_SHRINE_SPRING_E: + if (player->transformation == PLAYER_FORM_GORON) { + if (gSaveContext.save.weekEventReg[77] & 0x80) { + if (this->textId == 0xDF6) { + this->actionFlags |= EN_S_GORO_ACTIONFLAG_LASTMESSAGE; + return 0xDF7; + } + return 0xDF6; + } + this->actionFlags |= EN_S_GORO_ACTIONFLAG_LASTMESSAGE; + return 0xDF5; + } + if (this->textId == 0xDF3) { + this->actionFlags |= EN_S_GORO_ACTIONFLAG_LASTMESSAGE; + return 0xDF4; + } + return 0xDF3; -#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_S_Goro/func_80BBE0E4.s") + case EN_S_GORO_TYPE_SHRINE_SPRING_F: + if (player->transformation == PLAYER_FORM_GORON) { + if (gSaveContext.save.weekEventReg[77] & 0x80) { + switch (this->textId) { + case 0xDFB: + return 0xDFC; + case 0xDFC: + this->actionFlags |= EN_S_GORO_ACTIONFLAG_LASTMESSAGE; + return 0xDFD; + default: + return 0xDFB; + } + } else { + this->actionFlags |= EN_S_GORO_ACTIONFLAG_LASTMESSAGE; + return 0xDFA; + } + } else { + if (this->textId == 0xDF8) { + this->actionFlags |= EN_S_GORO_ACTIONFLAG_LASTMESSAGE; + return 0xDF9; + } + return 0xDF8; + } + break; -#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_S_Goro/func_80BBE144.s") + default: + return 0; + } +} -#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_S_Goro/func_80BBE374.s") +/** + * Dialogue tree for bomb shop goron. Returns ID of next message to display. + */ +u16 EnSGoro_BombshopGoron_NextTextId(EnSGoro* this, PlayState* play) { + Player* player = GET_PLAYER(play); -#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_S_Goro/func_80BBE498.s") + switch (this->textId) { + case 0x0: + switch (player->transformation) { + case PLAYER_FORM_GORON: + // Check if Powder Keg is in Powder Key slot. + if (INV_CONTENT(ITEM_POWDER_KEG) == ITEM_POWDER_KEG) { + if ((gSaveContext.save.day == 3) && gSaveContext.save.isNight) { + if (!(this->bombbuyFlags & EN_S_GORO_BOMBBUYFLAG_TALKED_GOROKPK_FINALNIGHT)) { + this->bombbuyFlags |= EN_S_GORO_BOMBBUYFLAG_TALKED_GOROKPK_FINALNIGHT; + this->actionFlags |= EN_S_GORO_ACTIONFLAG_HANDTAP; + return 0x677; + } + return 0x67A; + } + if (!(this->bombbuyFlags & EN_S_GORO_BOMBBUYFLAG_TALKED_GORONPK)) { + this->bombbuyFlags |= EN_S_GORO_BOMBBUYFLAG_TALKED_GORONPK; + this->actionFlags |= EN_S_GORO_ACTIONFLAG_HANDTAP; + return 0x66E; + } + return 0x679; + } -#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_S_Goro/func_80BBE73C.s") + // No powder keg + if ((gSaveContext.save.day == 3) && gSaveContext.save.isNight) { + if (!(this->bombbuyFlags & EN_S_GORO_BOMBBUYFLAG_TALKED_GORON_FINALNIGHT)) { + this->bombbuyFlags |= EN_S_GORO_BOMBBUYFLAG_TALKED_GORON_FINALNIGHT; + this->actionFlags |= EN_S_GORO_ACTIONFLAG_HANDTAP; + return 0x67E; + } + return 0x683; + } + if (!(this->bombbuyFlags & EN_S_GORO_BOMBBUYFLAG_TALKED_GORON)) { + this->bombbuyFlags |= EN_S_GORO_BOMBBUYFLAG_TALKED_GORON; + this->actionFlags |= EN_S_GORO_ACTIONFLAG_HANDTAP; + return 0x67B; + } + return 0x681; -#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_S_Goro/func_80BBE844.s") + case PLAYER_FORM_ZORA: + if ((gSaveContext.save.day == 3) && gSaveContext.save.isNight) { + if (!(this->bombbuyFlags & EN_S_GORO_BOMBBUYFLAG_TALKED_ZORA_FINALNIGHT)) { + this->bombbuyFlags |= EN_S_GORO_BOMBBUYFLAG_TALKED_ZORA_FINALNIGHT; + return 0x668; + } + this->actionFlags |= EN_S_GORO_ACTIONFLAG_LASTMESSAGE; + this->actionFlags |= EN_S_GORO_ACTIONFLAG_TIRED; + return 0x66D; + } + if (!(this->bombbuyFlags & EN_S_GORO_BOMBBUYFLAG_TALKED_ZORA)) { + this->bombbuyFlags |= EN_S_GORO_BOMBBUYFLAG_TALKED_ZORA; + return 0x664; + } + this->actionFlags |= EN_S_GORO_ACTIONFLAG_LASTMESSAGE; + this->actionFlags |= EN_S_GORO_ACTIONFLAG_TIRED; + return 0x66C; -#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_S_Goro/func_80BBE904.s") + case PLAYER_FORM_DEKU: + if ((gSaveContext.save.day == 3) && gSaveContext.save.isNight) { + if (!(this->bombbuyFlags & EN_S_GORO_BOMBBUYFLAG_TALKED_DEKU_FINALNIGHT)) { + this->bombbuyFlags |= EN_S_GORO_BOMBBUYFLAG_TALKED_DEKU_FINALNIGHT; + return 0x668; + } + this->actionFlags |= EN_S_GORO_ACTIONFLAG_LASTMESSAGE; + return 0x66D; + } + if (!(this->bombbuyFlags & EN_S_GORO_BOMBBUYFLAG_TALKED_DEKU)) { + this->bombbuyFlags |= EN_S_GORO_BOMBBUYFLAG_TALKED_DEKU; + return 0x664; + } + this->actionFlags |= EN_S_GORO_ACTIONFLAG_LASTMESSAGE; + return 0x66C; -#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_S_Goro/func_80BBE9F8.s") + case PLAYER_FORM_HUMAN: + if ((gSaveContext.save.day == 3) && gSaveContext.save.isNight) { + if (!(this->bombbuyFlags & EN_S_GORO_BOMBBUYFLAG_TALKED_HUMAN_FINALNIGHT)) { + this->bombbuyFlags |= EN_S_GORO_BOMBBUYFLAG_TALKED_HUMAN_FINALNIGHT; + return 0x668; + } + this->actionFlags |= EN_S_GORO_ACTIONFLAG_LASTMESSAGE; + return 0x66D; + } + if (!(this->bombbuyFlags & EN_S_GORO_BOMBBUYFLAG_TALKED_HUMAN)) { + this->bombbuyFlags |= EN_S_GORO_BOMBBUYFLAG_TALKED_HUMAN; + return 0x664; + } + this->actionFlags |= EN_S_GORO_ACTIONFLAG_LASTMESSAGE; + return 0x66C; + } -#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_S_Goro/func_80BBEAD8.s") + case 0x664: + this->actionFlags |= EN_S_GORO_ACTIONFLAG_HANDTAP; + return 0x665; -#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_S_Goro/func_80BBEBF8.s") + case 0x665: + this->actionFlags &= ~EN_S_GORO_ACTIONFLAG_HANDTAP; + return 0x666; -#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_S_Goro/func_80BBECBC.s") + case 0x666: + this->actionFlags |= EN_S_GORO_ACTIONFLAG_LASTMESSAGE; + this->actionFlags |= EN_S_GORO_ACTIONFLAG_TIRED; + return 0x667; -#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_S_Goro/func_80BBEEB4.s") + case 0x668: + this->actionFlags |= EN_S_GORO_ACTIONFLAG_HANDTAP; + return 0x669; -#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_S_Goro/func_80BBEF34.s") + case 0x669: + this->actionFlags &= ~EN_S_GORO_ACTIONFLAG_HANDTAP; + return 0x66A; -#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_S_Goro/func_80BBEFA0.s") + case 0x66A: + this->actionFlags |= EN_S_GORO_ACTIONFLAG_LASTMESSAGE; + this->actionFlags |= EN_S_GORO_ACTIONFLAG_TIRED; + return 0x66B; -#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_S_Goro/func_80BBF01C.s") + case 0x677: + this->actionFlags &= ~EN_S_GORO_ACTIONFLAG_HANDTAP; + return 0x678; -#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_S_Goro/EnSGoro_Init.s") + case 0x678: + return 0x670; -#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_S_Goro/EnSGoro_Destroy.s") + case 0x66E: + this->actionFlags &= ~EN_S_GORO_ACTIONFLAG_HANDTAP; + return 0x66F; -#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_S_Goro/EnSGoro_Update.s") + case 0x66F: + return 0x670; -#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_S_Goro/func_80BBF298.s") + case 0x679: + return 0x670; -#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_S_Goro/func_80BBF3D0.s") + case 0x67A: + return 0x670; -#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_S_Goro/func_80BBF3EC.s") + case 0x67E: + this->actionFlags &= ~EN_S_GORO_ACTIONFLAG_HANDTAP; + return 0x67F; -#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_S_Goro/func_80BBF5F0.s") + case 0x67F: + this->actionFlags |= EN_S_GORO_ACTIONFLAG_LASTMESSAGE; + return 0x680; -#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_S_Goro/func_80BBF6BC.s") + case 0x67B: + this->actionFlags &= ~EN_S_GORO_ACTIONFLAG_HANDTAP; + return 0x67C; -#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_S_Goro/EnSGoro_Draw.s") + case 0x67C: + this->actionFlags |= EN_S_GORO_ACTIONFLAG_LASTMESSAGE; + return 0x67D; + + case 0x681: + this->actionFlags |= EN_S_GORO_ACTIONFLAG_LASTMESSAGE; + return 0x682; + + case 0x683: + this->actionFlags |= EN_S_GORO_ACTIONFLAG_LASTMESSAGE; + return 0x684; + + case 0x670: + if (this->bombbuyFlags & EN_S_GORO_BOMBBUYFLAG_YESBUY) { + if (AMMO(ITEM_POWDER_KEG) != 0) { + this->actionFlags |= EN_S_GORO_ACTIONFLAG_LASTMESSAGE; + play_sound(NA_SE_SY_ERROR); + return 0x673; + } + this->powderKegPrice = play->msgCtx.unk1206C; + if (gSaveContext.save.playerData.rupees < this->powderKegPrice) { + this->actionFlags |= EN_S_GORO_ACTIONFLAG_LASTMESSAGE; + this->actionFlags |= EN_S_GORO_ACTIONFLAG_TIRED; + play_sound(NA_SE_SY_ERROR); + return 0x674; + } + if ((gSaveContext.save.day == 3) && gSaveContext.save.isNight) { + this->actionFlags |= EN_S_GORO_ACTIONFLAG_LASTMESSAGE; + func_8019F208(); + return 0x676; + } + this->actionFlags |= EN_S_GORO_ACTIONFLAG_LASTMESSAGE; + func_8019F208(); + return 0x675; + } + if ((gSaveContext.save.day == 3) && gSaveContext.save.isNight) { + this->actionFlags |= EN_S_GORO_ACTIONFLAG_LASTMESSAGE; + return 0x672; + } + this->actionFlags |= EN_S_GORO_ACTIONFLAG_LASTMESSAGE; + return 0x671; + } + return 0; +} + +/** + * Links to actor of type EN_JG (Goron Elder), returns whether operation successful. + */ +s32 EnSGoro_FindGoronElder(EnSGoro* this, PlayState* play) { + this->otherGoron = SubS_FindActor(play, this->otherGoron, ACTORCAT_NPC, ACTOR_EN_JG); + if (this->otherGoron != NULL) { + return true; + } + return false; +} + +/** + * Links to actor of type EN_GK (Goron Elder's Son), returns whether operation successful. + */ +s32 EnSGoro_FindGoronChild(EnSGoro* this, PlayState* play) { + this->otherGoron = NULL; + this->otherGoron = SubS_FindActor(play, this->otherGoron, ACTORCAT_NPC, ACTOR_EN_GK); + if (this->otherGoron != NULL) { + return true; + } + return false; +} + +/** + * Looks like it manages the snoring cycle for when rolled up and asleep. + */ +void EnSGoro_UpdateSleeping(EnSGoro* this, PlayState* play) { + s16 curFrame = this->skelAnime.curFrame; + + this->snorePhase += 0x400; + this->scaleFactor = Math_SinS(this->snorePhase) * 0.01f * 0.1f; + this->actor.scale.y = 0.01f - this->scaleFactor; + this->actor.scale.z = 0.01f - this->scaleFactor; + this->actor.scale.x = 0.01f + this->scaleFactor; + + if (!(this->actionFlags & EN_S_GORO_ACTIONFLAG_SUPPRESS_SNORE)) { + if (this->snorePhase == 0) { + if (this->actionFlags & EN_S_GORO_ACTIONFLAG_SNOREPHASE) { + this->actionFlags &= ~EN_S_GORO_ACTIONFLAG_SNOREPHASE; + Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_GOLON_SNORE2); + } else { + this->actionFlags |= EN_S_GORO_ACTIONFLAG_SNOREPHASE; + Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_GOLON_SNORE1); + } + } + } else if (gSaveContext.save.weekEventReg[22] & 4) { + this->actionFlags &= ~EN_S_GORO_ACTIONFLAG_SUPPRESS_SNORE; + } + + if (!(this->actionFlags & EN_S_GORO_ACTIONFLAG_ROLLEDUP) && (curFrame == 0)) { + this->actionFlags |= EN_S_GORO_ACTIONFLAG_ROLLEDUP; + this->actor.shape.yOffset = EN_S_GORO_ROLLEDUP_YOFFSET; + } + + this->actor.shape.yOffset = (this->actor.scale.y / 0.01f) * EN_S_GORO_ROLLEDUP_YOFFSET; +} + +s32 EnSGoro_UpdateCheerAnimation(EnSGoro* this, PlayState* play) { + if (this->animInfoIndex == EN_S_GORO_ANIM_IDLE_STAND) { + if (((EnJg*)this->otherGoron)->flags & 1) { + this->loadedObjIndex = Object_GetIndex(&play->objectCtx, OBJECT_TAISOU); + if (this->loadedObjIndex >= 0) { + gSegments[6] = PHYSICAL_TO_VIRTUAL(play->objectCtx.status[this->loadedObjIndex].segment); + this->animInfoIndex = EN_S_GORO_ANIM_TAISOU_CHEER; + SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimationInfo, this->animInfoIndex); + return true; + } + } + } else if ((this->animInfoIndex == EN_S_GORO_ANIM_TAISOU_CHEER) && !(((EnJg*)this->otherGoron)->flags & 1)) { + this->loadedObjIndex = Object_GetIndex(&play->objectCtx, OBJECT_OF1D_MAP); + if (this->loadedObjIndex >= 0) { + gSegments[6] = PHYSICAL_TO_VIRTUAL(play->objectCtx.status[this->loadedObjIndex].segment); + this->animInfoIndex = EN_S_GORO_ANIM_IDLE_STAND; + SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimationInfo, this->animInfoIndex); + this->skelAnime.curFrame = this->skelAnime.endFrame; + return true; + } + } + return false; +} + +s32 EnSGoro_CheckLullaby(EnSGoro* this, PlayState* play) { + s32 actorType; + Player* player = GET_PLAYER(play); + + if ((player->transformation == PLAYER_FORM_GORON) && (play->msgCtx.ocarinaMode == 3)) { + if (play->msgCtx.lastPlayedSong == OCARINA_SONG_GORON_LULLABY) { + this->animInfoIndex = EN_S_GORO_ANIM_ROLLUP; + SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimationInfo, this->animInfoIndex); + + actorType = EN_S_GORO_GET_MAIN_TYPE(&this->actor); + this->snorePhase = 0x400 << (actorType + 1); + + /* + * Should be: + * if ((actorType % 2) == 0) + * However, the original code checks the negative case whereas the above does not. + * So unfortunately, this is the only way to get it to match. + */ + if (!(actorType % 2)) { + this->actionFlags |= EN_S_GORO_ACTIONFLAG_SNOREPHASE; + } + this->actionFunc = EnSGoro_Sleep; + return true; + } + } + return false; +} + +s32 EnSGoro_CheckGKBehavior(EnSGoro* this, PlayState* play) { + s32 actorType; + + if (!EnSGoro_FindGoronChild(this, play)) { + return false; + } + if ((!(this->actionFlags & EN_S_GORO_ACTIONFLAG_GKQUIET_ACKNOWLEDGED)) && + ((((EnGk*)this->otherGoron)->unk_1E4 & 0x80) || (gSaveContext.save.weekEventReg[22] & 4))) { + + this->actionFlags |= EN_S_GORO_ACTIONFLAG_GKQUIET_ACKNOWLEDGED; + this->animInfoIndex = EN_S_GORO_ANIM_ROLLUP; + SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimationInfo, this->animInfoIndex); + + actorType = EN_S_GORO_GET_MAIN_TYPE(&this->actor); + this->snorePhase = 0x400 << (actorType + 1); + + /* + * Should be: + * if ((actorType % 2) == 0) + * However, the original code checks the negative case whereas the above does not. + * So unfortunately, this is the only way to get it to match. + */ + if (!(actorType % 2)) { + this->actionFlags |= EN_S_GORO_ACTIONFLAG_SNOREPHASE; + } + this->actionFlags |= EN_S_GORO_ACTIONFLAG_SUPPRESS_SNORE; + this->actionFunc = EnSGoro_Sleep; + return true; + } + return false; +} + +void EnSGoro_UpdateToHandtapAnimation(EnSGoro* this) { + s16 curFrame = this->skelAnime.curFrame; + s16 lastFrame = Animation_GetLastFrame(sAnimationInfo[this->animInfoIndex].animation); + + if ((this->animInfoIndex != EN_S_GORO_ANIM_STAND_HANDTAP) && (curFrame == lastFrame)) { + this->animInfoIndex = EN_S_GORO_ANIM_STAND_HANDTAP; + SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimationInfo, this->animInfoIndex); + } +} + +void EnSGoro_UpdateSleepyAnimation(EnSGoro* this) { + s16 curFrame = this->skelAnime.curFrame; + s16 lastFrame = Animation_GetLastFrame(sAnimationInfo[this->animInfoIndex].animation); + + if (this->animInfoIndex != EN_S_GORO_ANIM_SLEEPY) { + if (curFrame == lastFrame) { + this->animInfoIndex = EN_S_GORO_ANIM_SLEEPY; + SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimationInfo, this->animInfoIndex); + } + } else if (curFrame == lastFrame) { + this->actionFlags &= ~EN_S_GORO_ACTIONFLAG_TIRED; + this->animInfoIndex = EN_S_GORO_ANIM_IDLE_STAND; + SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimationInfo, this->animInfoIndex); + } +} + +void EnSGoro_UpdateToIdleAnimation(EnSGoro* this) { + s16 curFrame = this->skelAnime.curFrame; + s16 lastFrame = Animation_GetLastFrame(sAnimationInfo[this->animInfoIndex].animation); + + if ((this->animInfoIndex != EN_S_GORO_ANIM_IDLE_STAND) && (curFrame == lastFrame)) { + this->animInfoIndex = EN_S_GORO_ANIM_IDLE_STAND; + SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimationInfo, this->animInfoIndex); + } +} + +void EnSGoro_UpdateCollider(EnSGoro* this, PlayState* play) { + Vec3f world_pos = this->actor.world.pos; + f32 radius = 24.0f; + f32 height = 62.0f; + + this->collider.dim.pos.x = world_pos.x; + this->collider.dim.pos.y = world_pos.y; + this->collider.dim.pos.z = world_pos.z; + this->collider.dim.radius = radius; + this->collider.dim.height = height; + + //! @bug: It is not clear what this is for. + if ((s32)this != -0x190) { + CollisionCheck_SetOC(play, &play->colChkCtx, &this->collider.base); + } +} + +void EnSGoro_UpdateEyes(EnSGoro* this) { + if (this->actionFlags & EN_S_GORO_ACTIONFLAG_EYESOPEN) { + if (DECR(this->eyeTimer) == 0) { + this->eyeTexIndex++; + if (this->eyeTexIndex > EN_S_GORO_EYETEX_CLOSED) { + this->eyeTimer = Rand_S16Offset(30, 30); + this->eyeTexIndex = EN_S_GORO_EYETEX_OPEN; + } + } + } +} + +void EnSGoro_UpdateActorFocus(EnSGoro* this) { + f32 yDelta; + + if (this->actionFlags & EN_S_GORO_ACTIONFLAG_ROLLEDUP) { + yDelta = this->actor.shape.yOffset; + } else { + yDelta = 58.0f; + } + + this->actor.focus.pos.x = this->actor.world.pos.x; + this->actor.focus.pos.y = this->actor.world.pos.y + yDelta; + this->actor.focus.pos.z = this->actor.world.pos.z; + this->actor.focus.rot.x = this->actor.world.rot.x; + this->actor.focus.rot.y = this->actor.world.rot.y; + this->actor.focus.rot.z = this->actor.world.rot.z; +} + +s32 EnSGoro_UpdateRotationToPlayer(EnSGoro* this, PlayState* play) { + Player* player = GET_PLAYER(play); + Vec3f playerPos; + Vec3f thisPos; + s16 target = (this->actor.yawTowardsPlayer - this->bodyRotY) - this->actor.shape.rot.y; + + Math_SmoothStepToS(&this->headRotY, target, 4, 0x2AA8, 1); + this->headRotY = CLAMP(this->headRotY, -0x1FFE, 0x1FFE); + + target = (this->actor.yawTowardsPlayer - this->headRotY) - this->actor.shape.rot.y; + Math_SmoothStepToS(&this->bodyRotY, target, 4, 0x2AA8, 1); + this->bodyRotY = CLAMP(this->bodyRotY, -0x1C70, 0x1C70); + + playerPos = player->actor.world.pos; + playerPos.y = player->bodyPartsPos[7].y + 3.0f; + thisPos = this->actor.world.pos; + thisPos.y += 70.0f; + + target = Math_Vec3f_Pitch(&thisPos, &playerPos) - this->bodyRotZ; + Math_SmoothStepToS(&this->headRotZ, target, 4, 0x2AA8, 1); + this->headRotZ = CLAMP(this->headRotZ, -0x1C70, 0x1C70); + + target = Math_Vec3f_Pitch(&thisPos, &playerPos) - this->headRotZ; + Math_SmoothStepToS(&this->bodyRotZ, target, 4, 0x2AA8, 1); + this->bodyRotZ = CLAMP(this->bodyRotZ, -0x1C70, 0x1C70); + + return true; +} + +s32 EnSGoro_UpdateAttentionTarget(EnSGoro* this, PlayState* play) { + if (DECR(this->loseAttentionTimer) != 0) { + // EnSGoro is in the process of returning to idle position from previously looking at the player. + if ((this->actionFlags & EN_S_GORO_ACTIONFLAG_EARSCOVERED) && + (this->actionFlags & EN_S_GORO_ACTIONFLAG_EYESOPEN)) { + // If ears are covered, but eyes are open, close eyes. + this->actionFlags &= ~EN_S_GORO_ACTIONFLAG_EYESOPEN; + this->eyeTexIndex = EN_S_GORO_EYETEX_CLOSED2; + } + // Reset position to idle. EnSGoro cannot return attention to player until the timer is up. + this->actionFlags &= ~EN_S_GORO_ACTIONFLAG_FACEPLAYER; + this->headRotZ = 0; + this->headRotY = 0; + this->bodyRotZ = 0; + this->bodyRotY = 0; + return true; + } + + // Turn to face player if either player has engaged EnSGoro or if player is in range and EnSGoro isn't covering his + // ears. + if (this->actionFlags & EN_S_GORO_ACTIONFLAG_ENGAGED) { + this->actionFlags |= EN_S_GORO_ACTIONFLAG_FACEPLAYER; + EnSGoro_UpdateRotationToPlayer(this, play); + } else if (!(this->actionFlags & EN_S_GORO_ACTIONFLAG_EARSCOVERED) && + Actor_IsFacingAndNearPlayer(&this->actor, 120.0f, 0x3FFC)) { + this->actionFlags |= EN_S_GORO_ACTIONFLAG_FACEPLAYER; + EnSGoro_UpdateRotationToPlayer(this, play); + } else { + // Unengaged or player out of range. + if (this->actionFlags & EN_S_GORO_ACTIONFLAG_FACEPLAYER) { + // Previously facing player, but now player out of range. + // Start counter for frames/function calls to ignore player while in process of returning to idle. + this->loseAttentionTimer = 20; + } + // Start animation to return to idle position. + this->actionFlags &= ~EN_S_GORO_ACTIONFLAG_FACEPLAYER; + this->headRotZ = 0; + this->headRotY = 0; + this->bodyRotZ = 0; + this->bodyRotY = 0; + } + return true; +} + +void EnSGoro_SetupAction(EnSGoro* this, PlayState* play) { + if (Object_IsLoaded(&play->objectCtx, this->loadedObjIndex)) { + this->actionFlags = 0; + if (EN_S_GORO_OFTYPE_WSHRINE) { + if (gSaveContext.save.weekEventReg[22] & 4) { + this->actionFlags |= EN_S_GORO_ACTIONFLAG_GKQUIET_ACKNOWLEDGED; + this->actionFlags |= EN_S_GORO_ACTIONFLAG_EYESOPEN; + this->animInfoIndex = EN_S_GORO_ANIM_SHIVER_A; + SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimationInfo, this->animInfoIndex); + } else { + this->eyeTexIndex = EN_S_GORO_EYETEX_CLOSED2; + this->actionFlags |= EN_S_GORO_ACTIONFLAG_EARSCOVERED; + this->animInfoIndex = EN_S_GORO_ANIM_COVEREARS; + SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimationInfo, this->animInfoIndex); + } + } else { + this->actionFlags |= EN_S_GORO_ACTIONFLAG_EYESOPEN; + this->animInfoIndex = EN_S_GORO_ANIM_IDLE_STAND; + SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimationInfo, this->animInfoIndex); + } + + this->scaleFactor = 0.01f; + Actor_SetScale(&this->actor, 0.01f); + this->actor.gravity = -1.0f; + this->actor.flags |= ACTOR_FLAG_10; + this->actor.flags |= ACTOR_FLAG_2000000; + this->actor.targetMode = 1; + + switch (EN_S_GORO_GET_MAIN_TYPE(&this->actor)) { + case EN_S_GORO_TYPE_SHRINE_WINTER_A: + this->actionFunc = EnSGoro_WinterShrineGoron_Idle; + break; + case EN_S_GORO_TYPE_SHRINE_WINTER_B: + this->actionFunc = EnSGoro_WinterShrineGoron_Idle; + break; + case EN_S_GORO_TYPE_SHRINE_WINTER_C: + this->actionFunc = EnSGoro_WinterShrineGoron_Idle; + break; + case EN_S_GORO_TYPE_SHRINE_SPRING_A: + if (EnSGoro_FindGoronElder(this, play)) { + this->actionFunc = EnSGoro_SpringShrineGoron_Idle; + } + break; + case EN_S_GORO_TYPE_SHRINE_SPRING_B: + if (EnSGoro_FindGoronElder(this, play)) { + this->actionFunc = EnSGoro_SpringShrineGoron_Idle; + } + break; + case EN_S_GORO_TYPE_SHRINE_SPRING_C: + if (EnSGoro_FindGoronElder(this, play)) { + this->actionFunc = EnSGoro_SpringShrineGoron_Idle; + } + break; + case EN_S_GORO_TYPE_SHRINE_SPRING_D: + if (EnSGoro_FindGoronElder(this, play)) { + this->actionFunc = EnSGoro_SpringShrineGoron_Idle; + } + break; + case EN_S_GORO_TYPE_SHRINE_SPRING_E: + if (EnSGoro_FindGoronElder(this, play)) { + this->actionFunc = EnSGoro_SpringShrineGoron_Idle; + } + break; + case EN_S_GORO_TYPE_SHRINE_SPRING_F: + if (EnSGoro_FindGoronElder(this, play)) { + this->actionFunc = EnSGoro_SpringShrineGoron_Idle; + } + break; + case EN_S_GORO_TYPE_BOMBSHOP: + this->actionFlags |= EN_S_GORO_ACTIONFLAG_ROLLEDUP; + this->actionFunc = EnSGoro_ShopGoron_Idle; + this->actor.shape.yOffset = EN_S_GORO_ROLLEDUP_YOFFSET; + break; + default: + Actor_MarkForDeath(&this->actor); + break; + } + } +} + +void EnSGoro_WinterShrineGoron_Idle(EnSGoro* this, PlayState* play) { + if (!EnSGoro_CheckLullaby(this, play) && !EnSGoro_CheckGKBehavior(this, play)) { + if (Actor_ProcessTalkRequest(&this->actor, &play->state)) { + this->actionFlags |= EN_S_GORO_ACTIONFLAG_ENGAGED; + if (this->actionFlags & EN_S_GORO_ACTIONFLAG_EARSCOVERED) { + this->actionFlags |= EN_S_GORO_ACTIONFLAG_EYESOPEN; + this->eyeTexIndex = EN_S_GORO_EYETEX_OPEN; + } + this->textId = EnSGoro_ShrineGoron_NextTextId(this, play); + Message_StartTextbox(play, this->textId, &this->actor); + this->actionFunc = EnSGoro_WinterShrineGoron_Talk; + } else if ((this->actor.xzDistToPlayer < 250.0f) || this->actor.isTargeted) { + func_800B863C(&this->actor, play); + } + Math_SmoothStepToS(&this->actor.shape.rot.y, this->actor.home.rot.y, 5, 0x1000, 0x100); + this->actor.world.rot.y = this->actor.shape.rot.y; + } +} + +void EnSGoro_WinterShrineGoron_Talk(EnSGoro* this, PlayState* play) { + if ((Message_GetState(&play->msgCtx) == TEXT_STATE_DONE) && (Message_ShouldAdvance(play))) { + if (this->actionFlags & EN_S_GORO_ACTIONFLAG_LASTMESSAGE) { + this->actionFlags &= ~EN_S_GORO_ACTIONFLAG_LASTMESSAGE; + this->actionFlags &= ~EN_S_GORO_ACTIONFLAG_ENGAGED; + this->actionFunc = EnSGoro_WinterShrineGoron_Idle; + return; + } + this->textId = EnSGoro_ShrineGoron_NextTextId(this, play); + Message_StartTextbox(play, this->textId, &this->actor); + } + Math_SmoothStepToS(&this->actor.shape.rot.y, this->actor.yawTowardsPlayer, 5, 0x1000, 0x100); + this->actor.world.rot.y = this->actor.shape.rot.y; +} + +void EnSGoro_SpringShrineGoron_Idle(EnSGoro* this, PlayState* play) { + if ((EN_S_GORO_GET_MAIN_TYPE(&this->actor) == EN_S_GORO_TYPE_SHRINE_SPRING_F) || + !EnSGoro_UpdateCheerAnimation(this, play)) { + if (Actor_ProcessTalkRequest(&this->actor, &play->state)) { + this->actionFlags |= EN_S_GORO_ACTIONFLAG_ENGAGED; + this->textId = EnSGoro_ShrineGoron_NextTextId(this, play); + Message_StartTextbox(play, this->textId, &this->actor); + this->actionFunc = EnSGoro_SpringShrineGoron_Talk; + } else if ((this->actor.xzDistToPlayer < 250.0f) || (this->actor.isTargeted)) { + func_800B863C(&this->actor, play); + } + Math_SmoothStepToS(&this->actor.shape.rot.y, this->actor.home.rot.y, 5, 0x1000, 0x100); + this->actor.world.rot.y = this->actor.shape.rot.y; + } +} + +void EnSGoro_SpringShrineGoron_Talk(EnSGoro* this, PlayState* play) { + if ((Message_GetState(&play->msgCtx) == TEXT_STATE_5) && Message_ShouldAdvance(play)) { + if (this->actionFlags & EN_S_GORO_ACTIONFLAG_LASTMESSAGE) { + this->actionFlags &= ~EN_S_GORO_ACTIONFLAG_LASTMESSAGE; + this->actionFlags &= ~EN_S_GORO_ACTIONFLAG_ENGAGED; + play->msgCtx.msgMode = 0x43; + play->msgCtx.stateTimer = 4; + this->actionFunc = EnSGoro_SpringShrineGoron_Idle; + return; + } + this->textId = EnSGoro_ShrineGoron_NextTextId(this, play); + Message_StartTextbox(play, this->textId, &this->actor); + } + Math_SmoothStepToS(&this->actor.shape.rot.y, this->actor.yawTowardsPlayer, 5, 0x1000, 0x100); + this->actor.world.rot.y = this->actor.shape.rot.y; +} + +void EnSGoro_ShopGoron_Idle(EnSGoro* this, PlayState* play) { + if (!(this->actionFlags & EN_S_GORO_ACTIONFLAG_ROLLEDUP)) { + EnSGoro_UpdateToIdleAnimation(this); + } + if (Actor_ProcessTalkRequest(&this->actor, &play->state)) { + this->actionFlags |= EN_S_GORO_ACTIONFLAG_ENGAGED; + this->textId = EnSGoro_BombshopGoron_NextTextId(this, play); + if (this->actionFlags & EN_S_GORO_ACTIONFLAG_ROLLEDUP) { + this->actionFlags &= ~EN_S_GORO_ACTIONFLAG_ROLLEDUP; + this->animInfoIndex = EN_S_GORO_ANIM_UNROLL_A; + SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimationInfo, this->animInfoIndex); + this->actionFunc = EnSGoro_ShopGoron_FinishUnroll; + } else { + Message_StartTextbox(play, this->textId, &this->actor); + this->actionFunc = EnSGoro_ShopGoron_Talk; + } + } else if ((this->actor.xzDistToPlayer < 250.0f) || this->actor.isTargeted) { + func_800B863C(&this->actor, play); + } + Math_SmoothStepToS(&this->actor.shape.rot.y, this->actor.home.rot.y, 5, 0x1000, 0x100); + this->actor.world.rot.y = this->actor.shape.rot.y; +} + +void EnSGoro_ShopGoron_FinishUnroll(EnSGoro* this, PlayState* play) { + s16 curFrame = this->skelAnime.curFrame; + s16 lastFrame = Animation_GetLastFrame(sAnimationInfo[this->animInfoIndex].animation); + + if ((this->animInfoIndex == EN_S_GORO_ANIM_UNROLL_A) && (curFrame == lastFrame)) { + this->animInfoIndex = EN_S_GORO_ANIM_IDLE_STAND; + SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimationInfo, this->animInfoIndex); + Message_StartTextbox(play, this->textId, &this->actor); + this->actionFunc = EnSGoro_ShopGoron_Talk; + } + + Math_SmoothStepToS(&this->actor.shape.rot.y, this->actor.yawTowardsPlayer, 5, 0x1000, 0x100); + this->actor.world.rot.y = this->actor.shape.rot.y; +} + +void EnSGoro_ShopGoron_Talk(EnSGoro* this, PlayState* play) { + u8 talkState = Message_GetState(&play->msgCtx); + + if (this->actionFlags & EN_S_GORO_ACTIONFLAG_HANDTAP) { + EnSGoro_UpdateToHandtapAnimation(this); + } else if (this->actionFlags & EN_S_GORO_ACTIONFLAG_TIRED) { + EnSGoro_UpdateSleepyAnimation(this); + } else { + EnSGoro_UpdateToIdleAnimation(this); + } + + if (talkState == TEXT_STATE_DONE) { + if (Message_ShouldAdvance(play)) { + if (this->actionFlags & EN_S_GORO_ACTIONFLAG_LASTMESSAGE) { + this->actionFlags &= ~EN_S_GORO_ACTIONFLAG_LASTMESSAGE; + this->actionFlags &= ~EN_S_GORO_ACTIONFLAG_ENGAGED; + this->textId = 0; + this->actionFunc = EnSGoro_ShopGoron_Idle; + return; + } + this->textId = EnSGoro_BombshopGoron_NextTextId(this, play); + Message_StartTextbox(play, this->textId, &this->actor); + } + } else if ((talkState == TEXT_STATE_CHOICE) && (Message_ShouldAdvance(play))) { + switch (play->msgCtx.choiceIndex) { + case 0: + this->bombbuyFlags |= EN_S_GORO_BOMBBUYFLAG_YESBUY; + break; + case 1: + func_8019F230(); + this->bombbuyFlags &= ~EN_S_GORO_BOMBBUYFLAG_YESBUY; + break; + } + + this->textId = EnSGoro_BombshopGoron_NextTextId(this, play); + if ((this->textId == 0x675) || (this->textId == 0x676)) { + play->msgCtx.msgMode = 0x43; + play->msgCtx.stateTimer = 4; + Actor_PickUp(&this->actor, play, GI_POWDER_KEG, 300.0f, 300.0f); + this->actionFunc = EnSGoro_ShopGoron_TakePayment; + } else { + Message_StartTextbox(play, this->textId, &this->actor); + } + } + + Math_SmoothStepToS(&this->actor.shape.rot.y, this->actor.yawTowardsPlayer, 5, 0x1000, 0x100); + this->actor.world.rot.y = this->actor.shape.rot.y; +} + +void EnSGoro_ShopGoron_TakePayment(EnSGoro* this, PlayState* play) { + if (Actor_HasParent(&this->actor, play)) { + this->actor.parent = NULL; + Rupees_ChangeBy(-this->powderKegPrice); + this->actionFunc = EnSGoro_ShopGoron_FinishTransaction; + } else { + Actor_PickUp(&this->actor, play, GI_POWDER_KEG, 300.0f, 300.0f); + } +} + +void EnSGoro_ShopGoron_FinishTransaction(EnSGoro* this, PlayState* play) { + if (Actor_ProcessTalkRequest(&this->actor, &play->state)) { + Message_StartTextbox(play, this->textId, &this->actor); + this->actionFunc = EnSGoro_ShopGoron_Talk; + } else { + func_800B85E0(&this->actor, play, 400.0f, -1); + } +} + +void EnSGoro_Sleep(EnSGoro* this, PlayState* play) { + if (Actor_ProcessTalkRequest(&this->actor, &play->state)) { + Message_StartTextbox(play, 0x23A, &this->actor); + this->actionFunc = EnSGoro_SleepTalk; + } else if (this->actor.isTargeted) { + func_800B863C(&this->actor, play); + } + EnSGoro_UpdateSleeping(this, play); +} + +void EnSGoro_SleepTalk(EnSGoro* this, PlayState* play) { + if (Message_GetState(&play->msgCtx) == TEXT_STATE_DONE) { + if (Message_ShouldAdvance(play)) { + play->msgCtx.msgMode = 0x43; + play->msgCtx.stateTimer = 4; + this->actionFunc = EnSGoro_Sleep; + } + } + EnSGoro_UpdateSleeping(this, play); +} + +void EnSGoro_Init(Actor* thisx, PlayState* play) { + s32 pad; + EnSGoro* this = THIS; + + ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 20.0f); + SkelAnime_InitFlex(play, &this->skelAnime, &gGoronSkel, &gGoronUnrollAnim, this->jointTable, this->morphTable, + GORON_LIMB_MAX); + Collider_InitCylinder(play, &this->collider); + Collider_SetCylinder(play, &this->collider, &this->actor, &sCylinderInit); + CollisionCheck_SetInfo2(&this->actor.colChkInfo, &sDamageTable, &sColChkInfoInit); + if (this->actor.update != NULL) { + s32 objIndex = Object_GetIndex(&play->objectCtx, OBJECT_OF1D_MAP); + + this->loadedObjIndex = objIndex; + if (objIndex < 0) { + Actor_MarkForDeath(&this->actor); + } + } + this->actor.draw = EnSGoro_Draw; + this->actionFunc = EnSGoro_SetupAction; +} + +void EnSGoro_Destroy(Actor* thisx, PlayState* play) { + EnSGoro* this = THIS; + + Collider_DestroyCylinder(play, &this->collider); +} + +void EnSGoro_Update(Actor* thisx, PlayState* play) { + EnSGoro* this = (EnSGoro*)thisx; + + this->actionFunc(this, play); + Actor_UpdateBgCheckInfo(play, &this->actor, 30.0f, 12.0f, 0.0f, 5); + gSegments[6] = PHYSICAL_TO_VIRTUAL(play->objectCtx.status[this->loadedObjIndex].segment); + SkelAnime_Update(&this->skelAnime); + if (this->animInfoIndex != EN_S_GORO_ANIM_SLEEPY) { + EnSGoro_UpdateAttentionTarget(this, play); + } + EnSGoro_UpdateEyes(this); + EnSGoro_UpdateActorFocus(this); + EnSGoro_UpdateCollider(this, play); +} + +/** + * This function appears to be identical to SubS_UpdateLimb. But it's here! + */ +s32 EnSGoro_UpdateLimb(s16 newRotZ, s16 newRotY, Vec3f* pos, Vec3s* rot, s32 stepRot, s32 overrideRot) { + Vec3f newPos; + Vec3f zeroVec = gZeroVec3f; + Vec3s newRot; + MtxF curState; + + Matrix_MultVec3f(&zeroVec, &newPos); + Matrix_Get(&curState); + Matrix_MtxFToYXZRot(&curState, &newRot, MTXMODE_NEW); + + *pos = newPos; + + if (!stepRot && !overrideRot) { + rot->x = newRot.x; + rot->y = newRot.y; + rot->z = newRot.z; + return true; + } + + if (overrideRot) { + newRot.z = newRotZ; + newRot.y = newRotY; + } + + Math_SmoothStepToS(&rot->x, newRot.x, 3, 0x2AA8, 0xB6); + Math_SmoothStepToS(&rot->y, newRot.y, 3, 0x2AA8, 0xB6); + Math_SmoothStepToS(&rot->z, newRot.z, 3, 0x2AA8, 0xB6); + return true; +} + +s32 EnSGoro_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx) { + return false; +} + +void EnSGoro_TransformLimbDraw(PlayState* play, s32 limbIndex, Actor* thisx) { + s32 stepRot; + s32 overrideRot; + EnSGoro* this = THIS; + + if (limbIndex != GORON_LIMB_BODY) { + if ((limbIndex == GORON_LIMB_HEAD) && (this->animInfoIndex != EN_S_GORO_ANIM_SLEEPY)) { + if (this->actionFlags & EN_S_GORO_ACTIONFLAG_FACEPLAYER) { + overrideRot = true; + } else { + overrideRot = false; + } + if (this->loseAttentionTimer != 0) { + stepRot = true; + } else { + stepRot = false; + } + + EnSGoro_UpdateLimb(this->headRotZ + this->bodyRotZ + 0x4000, + this->headRotY + this->bodyRotY + this->actor.shape.rot.y + 0x4000, &this->headTranslate, + &this->headRotate, stepRot, overrideRot); + + Matrix_Pop(); + Matrix_Translate(this->headTranslate.x, this->headTranslate.y, this->headTranslate.z, MTXMODE_NEW); + Matrix_Scale(this->actor.scale.x, this->actor.scale.y, this->actor.scale.z, MTXMODE_APPLY); + Matrix_RotateYS(this->headRotate.y, MTXMODE_APPLY); + Matrix_RotateXS(this->headRotate.x, MTXMODE_APPLY); + Matrix_RotateZS(this->headRotate.z, MTXMODE_APPLY); + Matrix_Push(); + } + } else if (this->animInfoIndex != EN_S_GORO_ANIM_SLEEPY) { + if (this->actionFlags & EN_S_GORO_ACTIONFLAG_FACEPLAYER) { + overrideRot = true; + } else { + overrideRot = false; + } + if (this->loseAttentionTimer != 0) { + stepRot = true; + } else { + stepRot = false; + } + + EnSGoro_UpdateLimb(this->bodyRotZ + 0x4000, this->bodyRotY + this->actor.shape.rot.y + 0x4000, + &this->bodyTranslate, &this->bodyRotate, stepRot, overrideRot); + + Matrix_Pop(); + Matrix_Translate(this->bodyTranslate.x, this->bodyTranslate.y, this->bodyTranslate.z, MTXMODE_NEW); + Matrix_Scale(this->actor.scale.x, this->actor.scale.y, this->actor.scale.z, MTXMODE_APPLY); + Matrix_RotateYS(this->bodyRotate.y, MTXMODE_APPLY); + Matrix_RotateXS(this->bodyRotate.x, MTXMODE_APPLY); + Matrix_RotateZS(this->bodyRotate.z, MTXMODE_APPLY); + Matrix_Push(); + } +} + +void EnSGoro_DrawUnrolled(EnSGoro* this, PlayState* play) { + s32 pad; + + OPEN_DISPS(play->state.gfxCtx); + func_8012C28C(play->state.gfxCtx); + + gSPSegment(POLY_OPA_DISP++, 0x8, Lib_SegmentedToVirtual(sEyeTextures[this->eyeTexIndex])); + gDPPipeSync(POLY_OPA_DISP++); + + SkelAnime_DrawTransformFlexOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable, + this->skelAnime.dListCount, EnSGoro_OverrideLimbDraw, NULL, + EnSGoro_TransformLimbDraw, &this->actor); + + CLOSE_DISPS(play->state.gfxCtx); +} + +void EnSGoro_DrawRolledUp(EnSGoro* this, PlayState* play) { + OPEN_DISPS(play->state.gfxCtx); + func_8012C28C(play->state.gfxCtx); + + Matrix_Translate(this->actor.world.pos.x, this->actor.world.pos.y + this->actor.shape.yOffset, + this->actor.world.pos.z, MTXMODE_NEW); + Matrix_RotateYS(this->actor.shape.rot.y, MTXMODE_APPLY); + Matrix_Translate(0.0f, -this->actor.shape.yOffset, 0.0f, MTXMODE_APPLY); + Matrix_RotateZS(this->actor.shape.rot.z, MTXMODE_APPLY); + Matrix_Translate(0.0f, this->actor.shape.yOffset, 0.0f, MTXMODE_APPLY); + Matrix_Scale(this->actor.scale.x, this->actor.scale.y, this->actor.scale.z, MTXMODE_APPLY); + + gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(play->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); + gSPDisplayList(POLY_OPA_DISP++, gGoronRolledUpDL); + + CLOSE_DISPS(play->state.gfxCtx); +} + +void EnSGoro_Draw(Actor* thisx, PlayState* play) { + EnSGoro* this = (EnSGoro*)thisx; + + if (this->actionFlags & EN_S_GORO_ACTIONFLAG_ROLLEDUP) { + EnSGoro_DrawRolledUp(this, play); + } else { + EnSGoro_DrawUnrolled(this, play); + } +} diff --git a/src/overlays/actors/ovl_En_S_Goro/z_en_s_goro.h b/src/overlays/actors/ovl_En_S_Goro/z_en_s_goro.h index 7d8e7627f..0d7ac9edb 100644 --- a/src/overlays/actors/ovl_En_S_Goro/z_en_s_goro.h +++ b/src/overlays/actors/ovl_En_S_Goro/z_en_s_goro.h @@ -2,20 +2,59 @@ #define Z_EN_S_GORO_H #include "global.h" +#include "objects/object_oF1d_map/object_oF1d_map.h" -#define EN_S_GORO_GET_PARAM_F(thisx) ((thisx)->params & 0xF) +#define EN_S_GORO_GET_MAIN_TYPE(thisx) ((thisx)->params & 0xF) +#define EN_S_GORO_SCENEFLAG_INDEX(thisx) (((thisx)->params & 0x7F0) >> 4) struct EnSGoro; typedef void (*EnSGoroActionFunc)(struct EnSGoro*, PlayState*); -typedef struct EnSGoro { - /* 0x000 */ Actor actor; - /* 0x144 */ char unk_144[0x48]; - /* 0x18C */ EnSGoroActionFunc actionFunc; - /* 0x190 */ char unk_190[0x180]; -} EnSGoro; // size = 0x310 - extern const ActorInit En_S_Goro_InitVars; +typedef struct EnSGoro { + /* 0x000 */ Actor actor; + /* 0x144 */ Actor* otherGoron; + /* 0x148 */ SkelAnime skelAnime; + /* 0x18C */ EnSGoroActionFunc actionFunc; + /* 0x190 */ ColliderCylinder collider; + /* 0x1DC */ u16 actionFlags; + /* 0x1DE */ u16 bombbuyFlags; + /* 0x1E0 */ UNK_TYPE1 unk_1E0[0xC]; + /* 0x1EC */ s16 eyeTexIndex; + /* 0x1EE */ s16 eyeTimer; + /* 0x1F0 */ s16 loseAttentionTimer; + /* 0x1F4 */ s32 loadedObjIndex; + /* 0x1F8 */ Vec3s jointTable[GORON_LIMB_MAX]; + /* 0x264 */ Vec3s morphTable[GORON_LIMB_MAX]; + /* 0x2D0 */ f32 scaleFactor; + /* 0x2D4 */ s16 headRotZ; + /* 0x2D6 */ s16 headRotY; + /* 0x2D8 */ s16 bodyRotZ; + /* 0x2DA */ s16 bodyRotY; + /* 0x2DC */ Vec3f headTranslate; + /* 0x2E8 */ Vec3s headRotate; + /* 0x2F0 */ Vec3f bodyTranslate; + /* 0x2FC */ Vec3s bodyRotate; + /* 0x302 */ UNK_TYPE1 unk_302[2]; + /* 0x304 */ u16 textId; + /* 0x306 */ s16 snorePhase; + /* 0x308 */ s32 animInfoIndex; + /* 0x30C */ s16 powderKegPrice; +} EnSGoro; // size = 0x310 + +typedef enum EnSGoroType { + /* 0x0 */ EN_S_GORO_TYPE_SHRINE_WINTER_A, + /* 0x1 */ EN_S_GORO_TYPE_SHRINE_WINTER_B, + /* 0x2 */ EN_S_GORO_TYPE_SHRINE_WINTER_C, + /* 0x3 */ EN_S_GORO_TYPE_SHRINE_SPRING_A, + /* 0x4 */ EN_S_GORO_TYPE_SHRINE_SPRING_B, + /* 0x5 */ EN_S_GORO_TYPE_SHRINE_SPRING_C, + /* 0x6 */ EN_S_GORO_TYPE_SHRINE_SPRING_D, + /* 0x7 */ EN_S_GORO_TYPE_SHRINE_SPRING_E, + /* 0x8 */ EN_S_GORO_TYPE_SHRINE_SPRING_F, + /* 0x9 */ EN_S_GORO_TYPE_BOMBSHOP +} EnSGoroType; + #endif // Z_EN_S_GORO_H diff --git a/src/overlays/actors/ovl_En_Scopenuts/z_en_scopenuts.c b/src/overlays/actors/ovl_En_Scopenuts/z_en_scopenuts.c index b110161d5..2553962f9 100644 --- a/src/overlays/actors/ovl_En_Scopenuts/z_en_scopenuts.c +++ b/src/overlays/actors/ovl_En_Scopenuts/z_en_scopenuts.c @@ -64,7 +64,7 @@ static ColliderCylinderInitType1 sCylinderInit = { { 27, 32, 0, { 0, 0, 0 } }, }; -static AnimationInfoS sAnimations[] = { +static AnimationInfoS sAnimationInfo[] = { { &object_dnt_Anim_005488, 1.0f, 0, -1, ANIMMODE_LOOP, 0 }, { &object_dnt_Anim_00B0B4, 1.0f, 0, -1, ANIMMODE_LOOP, 0 }, { &object_dnt_Anim_004AA0, 1.0f, 0, -1, ANIMMODE_ONCE, 0 }, @@ -197,7 +197,7 @@ void func_80BCAFA8(EnScopenuts* this, PlayState* play) { if (screenPos.y < (SCREEN_HEIGHT - 90.0f)) { this->actor.draw = EnScopenuts_Draw; this->unk_348 = 10; - SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimations, 10); + SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimationInfo, 10); this->actionFunc = func_80BCB078; } } @@ -246,7 +246,7 @@ void func_80BCB1C8(EnScopenuts* this, PlayState* play) { void func_80BCB230(EnScopenuts* this, PlayState* play) { s16 sp26 = this->skelAnime.curFrame; - s16 sp24 = Animation_GetLastFrame(sAnimations[this->unk_348].animation); + s16 sp24 = Animation_GetLastFrame(sAnimationInfo[this->unk_348].animation); Math_ApproachS(&this->actor.shape.rot.y, this->actor.yawTowardsPlayer, 2, 0xE38); @@ -257,30 +257,30 @@ void func_80BCB230(EnScopenuts* this, PlayState* play) { this->unk_348 = 3; this->collider.dim.height = 64; func_80BCAC40(this, play); - SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimations, 3); + SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimationInfo, 3); } else if (sp26 == sp24) { if ((this->unk_348 == 4) || (this->unk_348 == 18)) { this->unk_348 = 17; this->collider.dim.height = 0; Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_NUTS_DOWN); - SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimations, 17); + SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimationInfo, 17); } else if (this->unk_348 == 2) { this->unk_348 = 16; this->collider.dim.height = 32; Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_NUTS_UP); - SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimations, 16); + SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimationInfo, 16); } else if (this->unk_348 == 17) { if (DECR(this->unk_34E) == 0) { this->unk_34E = Rand_ZeroOne() * 10.0f; this->unk_348 = 2; this->collider.dim.height = 32; - SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimations, 2); + SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimationInfo, 2); } } else if ((this->unk_348 == 16) && (DECR(this->unk_34E) == 0)) { this->unk_34E = Rand_S16Offset(40, 40); this->unk_348 = 18; this->collider.dim.height = 32; - SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimations, 18); + SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimationInfo, 18); } } } @@ -288,7 +288,7 @@ void func_80BCB230(EnScopenuts* this, PlayState* play) { void func_80BCB4DC(EnScopenuts* this, PlayState* play) { if (this->skelAnime.curFrame == this->skelAnime.endFrame) { this->actionFunc = func_80BCB52C; - SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimations, 0); + SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimationInfo, 0); } } @@ -306,7 +306,7 @@ void func_80BCB52C(EnScopenuts* this, PlayState* play) { } else if (!(((this->actor.playerHeightRel < 50.0f) && (this->actor.playerHeightRel > -50.0f)) ? true : false) || !((this->actor.xzDistToPlayer < 200.0f) ? true : false)) { this->unk_348 = 4; - SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimations, 4); + SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimationInfo, 4); this->actionFunc = func_80BCB230; } } @@ -323,7 +323,7 @@ void func_80BCB6D0(EnScopenuts* this, PlayState* play) { this->actor.flags &= ~ACTOR_FLAG_1; this->unk_328 &= ~4; this->unk_348 = 8; - SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimations, 8); + SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimationInfo, 8); this->actionFunc = func_80BCBA00; } else { this->unk_33C = func_80BCAF0C(this); @@ -388,7 +388,7 @@ void func_80BCB980(EnScopenuts* this, PlayState* play) { void func_80BCBA00(EnScopenuts* this, PlayState* play) { s16 sp26 = this->skelAnime.curFrame; - s16 sp24 = Animation_GetLastFrame(sAnimations[this->unk_348].animation); + s16 sp24 = Animation_GetLastFrame(sAnimationInfo[this->unk_348].animation); switch (sp26) { case 10: @@ -463,7 +463,7 @@ void func_80BCBA00(EnScopenuts* this, PlayState* play) { if (sp26 == sp24) { this->unk_35A = 3; this->unk_348 = 19; - SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimations, 19); + SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimationInfo, 19); Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_NUTS_DOWN); this->unk_328 &= ~2; this->unk_34E = 50; @@ -498,7 +498,7 @@ void func_80BCBC60(EnScopenuts* this, PlayState* play) { void func_80BCBD28(EnScopenuts* this, PlayState* play) { Vec3f sp44; s16 sp42 = this->skelAnime.curFrame; - s16 sp40 = Animation_GetLastFrame(sAnimations[this->unk_348].animation); + s16 sp40 = Animation_GetLastFrame(sAnimationInfo[this->unk_348].animation); Vec3s sp38; func_80BCC448(this->path, this->unk_334, &this->actor.world.pos, &sp38); @@ -527,7 +527,7 @@ void func_80BCBD28(EnScopenuts* this, PlayState* play) { if ((this->actor.home.pos.y + 22.5f) < this->actor.world.pos.y) { this->unk_368 = 0.3f; this->unk_348 = 9; - SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimations, 9); + SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimationInfo, 9); Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_AKINDONUTS_HIDE); func_80BCAC40(this, play); this->actionFunc = func_80BCBF0C; @@ -547,7 +547,7 @@ void func_80BCBF0C(EnScopenuts* this, PlayState* play) { if ((this->actor.home.pos.y + 50.0f) < this->actor.world.pos.y) { Math_ApproachF(&this->actor.velocity.y, 0.0f, 0.2f, 1.0f); this->unk_348 = 10; - SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimations, 10); + SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimationInfo, 10); this->unk_328 |= 2; this->unk_36E = 0; this->actionFunc = func_80BCBFFC; @@ -728,7 +728,7 @@ void EnScopenuts_Init(Actor* thisx, PlayState* play) { this->unk_358 = 150; this->unk_348 = 4; this->unk_35A = 0; - SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimations, 4); + SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimationInfo, 4); this->actionFunc = func_80BCB230; } } else { diff --git a/src/overlays/actors/ovl_En_Sellnuts/z_en_sellnuts.c b/src/overlays/actors/ovl_En_Sellnuts/z_en_sellnuts.c index aacfa5685..d4a726887 100644 --- a/src/overlays/actors/ovl_En_Sellnuts/z_en_sellnuts.c +++ b/src/overlays/actors/ovl_En_Sellnuts/z_en_sellnuts.c @@ -80,7 +80,7 @@ static ColliderCylinderInitType1 sCylinderInit = { { 27, 32, 0, { 0, 0, 0 } }, }; -static AnimationInfoS D_80ADD990[] = { +static AnimationInfoS sAnimationInfo[] = { { &object_dnt_Anim_005488, 1.0f, 0, -1, ANIMMODE_LOOP, 0 }, { &object_dnt_Anim_00B0B4, 1.0f, 0, -1, ANIMMODE_LOOP, 0 }, { &object_dnt_Anim_004AA0, 1.0f, 0, -1, ANIMMODE_ONCE, 0 }, @@ -235,25 +235,25 @@ f32 func_80ADB08C(PlayState* play) { void func_80ADB0D8(EnSellnuts* this, PlayState* play) { s16 currentFrame = this->skelAnime.curFrame; - s16 frameCount = Animation_GetLastFrame(D_80ADD990[this->unk_34C].animation); + s16 frameCount = Animation_GetLastFrame(sAnimationInfo[this->unk_34C].animation); if (currentFrame == frameCount) { switch (this->unk_340) { case 0x611: case 0x62A: this->unk_34C = 0; - SubS_ChangeAnimationByInfoS(&this->skelAnime, D_80ADD990, 0); + SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimationInfo, 0); this->actionFunc = func_80ADBFA0; break; case 0x618: if (this->unk_34C == 1) { this->unk_34C = 0; - SubS_ChangeAnimationByInfoS(&this->skelAnime, D_80ADD990, 0); + SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimationInfo, 0); this->actionFunc = func_80ADB544; } else { this->unk_34C = 1; - SubS_ChangeAnimationByInfoS(&this->skelAnime, D_80ADD990, 1); + SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimationInfo, 1); this->actionFunc = func_80ADBFA0; } break; @@ -264,7 +264,7 @@ void func_80ADB0D8(EnSellnuts* this, PlayState* play) { case 0x614: case 0x628: this->unk_34C = 0; - SubS_ChangeAnimationByInfoS(&this->skelAnime, D_80ADD990, 0); + SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimationInfo, 0); this->actionFunc = func_80ADB924; break; @@ -273,14 +273,14 @@ void func_80ADB0D8(EnSellnuts* this, PlayState* play) { case 0x616: case 0x629: this->unk_34C = 1; - SubS_ChangeAnimationByInfoS(&this->skelAnime, D_80ADD990, 1); + SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimationInfo, 1); this->actionFunc = func_80ADB924; break; case 0x613: case 0x619: this->unk_34C = 7; - SubS_ChangeAnimationByInfoS(&this->skelAnime, D_80ADD990, 7); + SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimationInfo, 7); this->actionFunc = func_80ADBD64; break; } @@ -289,7 +289,7 @@ void func_80ADB0D8(EnSellnuts* this, PlayState* play) { void func_80ADB254(EnSellnuts* this, PlayState* play) { s16 currentFrame = this->skelAnime.curFrame; - s16 frameCount = Animation_GetLastFrame(D_80ADD990[this->unk_34C].animation); + s16 frameCount = Animation_GetLastFrame(sAnimationInfo[this->unk_34C].animation); Math_ApproachS(&this->actor.shape.rot.y, this->actor.yawTowardsPlayer, 2, 0xE38); if (((this->actor.playerHeightRel < 50.0f) && (this->actor.playerHeightRel > -50.0f) ? true : false) && @@ -298,31 +298,31 @@ void func_80ADB254(EnSellnuts* this, PlayState* play) { this->actionFunc = func_80ADB4F4; this->unk_34C = 3; this->collider.dim.height = 64; - SubS_ChangeAnimationByInfoS(&this->skelAnime, D_80ADD990, 3); + SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimationInfo, 3); } else if (currentFrame == frameCount) { if ((this->unk_34C == 4) || (this->unk_34C == 18)) { this->unk_34C = 17; this->collider.dim.height = 0; Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_NUTS_DOWN); - SubS_ChangeAnimationByInfoS(&this->skelAnime, D_80ADD990, 17); + SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimationInfo, 17); } else if (this->unk_34C == 2) { this->unk_34C = 16; this->collider.dim.height = 32; Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_NUTS_UP); - SubS_ChangeAnimationByInfoS(&this->skelAnime, D_80ADD990, 16); + SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimationInfo, 16); } else if (this->unk_34C == 17) { if (DECR(this->unk_34E) == 0) { this->unk_34E = Rand_ZeroOne() * 10.0f; this->unk_34C = 2; this->collider.dim.height = 32; - SubS_ChangeAnimationByInfoS(&this->skelAnime, D_80ADD990, 2); + SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimationInfo, 2); } } else if (this->unk_34C == 16) { if (DECR(this->unk_34E) == 0) { this->unk_34E = Rand_S16Offset(40, 40); this->unk_34C = 18; this->collider.dim.height = 32; - SubS_ChangeAnimationByInfoS(&this->skelAnime, D_80ADD990, 18); + SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimationInfo, 18); } } } @@ -331,7 +331,7 @@ void func_80ADB254(EnSellnuts* this, PlayState* play) { void func_80ADB4F4(EnSellnuts* this, PlayState* play) { if (this->skelAnime.curFrame == this->skelAnime.endFrame) { this->actionFunc = func_80ADB544; - SubS_ChangeAnimationByInfoS(&this->skelAnime, D_80ADD990, 0); + SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimationInfo, 0); } } @@ -341,7 +341,7 @@ void func_80ADB544(EnSellnuts* this, PlayState* play) { Math_SmoothStepToS(&this->actor.shape.rot.y, this->actor.yawTowardsPlayer, 3, 0x7D0, 0); this->actor.world.rot.y = this->actor.shape.rot.y; if (Actor_ProcessTalkRequest(&this->actor, &play->state)) { - if (Player_GetExchangeItemId(play) == EXCH_ITEM_MOON_TEAR) { + if (Player_GetExchangeItemId(play) == PLAYER_AP_MOON_TEAR) { player->actor.textId = D_80ADD928[this->unk_33A]; this->unk_340 = player->actor.textId; this->actionFunc = func_80ADBAB8; @@ -382,7 +382,7 @@ void func_80ADB544(EnSellnuts* this, PlayState* play) { } else if (((this->actor.xzDistToPlayer < 80.0f) && (((this->actor.playerHeightRel < 50.0f) && (this->actor.playerHeightRel > -50.0f)) ? true : false)) || this->actor.isTargeted) { - func_800B85E0(&this->actor, play, 80.0f, EXCH_ITEM_MOON_TEAR); + func_800B85E0(&this->actor, play, 80.0f, PLAYER_AP_MOON_TEAR); if (player->transformation == PLAYER_FORM_DEKU) { if (gSaveContext.save.day == 3) { this->unk_33A = 2; @@ -409,7 +409,7 @@ void func_80ADB544(EnSellnuts* this, PlayState* play) { if (!(((this->actor.playerHeightRel < 50.0f) && (this->actor.playerHeightRel > -50.0f)) ? true : false) || !((this->actor.xzDistToPlayer < 200.0f) ? true : false)) { this->unk_34C = 4; - SubS_ChangeAnimationByInfoS(&this->skelAnime, D_80ADD990, 4); + SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimationInfo, 4); this->actionFunc = func_80ADB254; } } @@ -421,8 +421,8 @@ void func_80ADB924(EnSellnuts* this, PlayState* play) { if (talkState == TEXT_STATE_16) { item = func_80123810(play); - if (item > EXCH_ITEM_NONE) { - if (item == EXCH_ITEM_MOON_TEAR) { + if (item > PLAYER_AP_NONE) { + if (item == PLAYER_AP_MOON_TEAR) { player->actor.textId = D_80ADD928[this->unk_33A]; this->unk_340 = player->actor.textId; player->exchangeItemId = item; @@ -433,7 +433,7 @@ void func_80ADB924(EnSellnuts* this, PlayState* play) { this->actionFunc = func_80ADB0D8; } func_801477B4(play); - } else if (item < EXCH_ITEM_NONE) { + } else if (item < PLAYER_AP_NONE) { this->unk_340 = D_80ADD920[this->unk_33A]; func_80151938(play, this->unk_340); this->actionFunc = func_80ADB0D8; @@ -454,18 +454,18 @@ void func_80ADB924(EnSellnuts* this, PlayState* play) { void func_80ADBAB8(EnSellnuts* this, PlayState* play) { u8 talkState = Message_GetState(&play->msgCtx); s16 currentFrame = this->skelAnime.curFrame; - s16 frameCount = Animation_GetLastFrame(D_80ADD990[this->unk_34C].animation); + s16 frameCount = Animation_GetLastFrame(sAnimationInfo[this->unk_34C].animation); if (this->unk_368 == 0x28) { this->unk_34C = 5; - SubS_ChangeAnimationByInfoS(&this->skelAnime, D_80ADD990, 5); + SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimationInfo, 5); } this->unk_368++; if ((currentFrame == frameCount) && (this->unk_34C == 5)) { this->unk_34C = 6; - SubS_ChangeAnimationByInfoS(&this->skelAnime, D_80ADD990, 6); + SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimationInfo, 6); } if ((talkState == TEXT_STATE_5) && Message_ShouldAdvance(play)) { @@ -491,14 +491,14 @@ void func_80ADBC60(EnSellnuts* this, PlayState* play) { Message_StartTextbox(play, this->unk_340, &this->actor); this->actionFunc = func_80ADB0D8; } else { - func_800B85E0(&this->actor, play, 400.0f, EXCH_ITEM_MINUS1); + func_800B85E0(&this->actor, play, 400.0f, PLAYER_AP_MINUS1); this->unk_340 = D_80ADD930[this->unk_33A]; } } void func_80ADBCE4(EnSellnuts* this, PlayState* play) { if ((Message_GetState(&play->msgCtx) == TEXT_STATE_DONE) && Message_ShouldAdvance(play)) { - func_800B85E0(&this->actor, play, 400.0f, EXCH_ITEM_MINUS1); + func_800B85E0(&this->actor, play, 400.0f, PLAYER_AP_MINUS1); this->unk_340 = D_80ADD930[this->unk_33A]; this->actionFunc = func_80ADBC60; } @@ -507,11 +507,11 @@ void func_80ADBCE4(EnSellnuts* this, PlayState* play) { void func_80ADBD64(EnSellnuts* this, PlayState* play) { u8 talkState = Message_GetState(&play->msgCtx); s16 currentFrame = this->skelAnime.curFrame; - s16 frameCount = Animation_GetLastFrame(D_80ADD990[this->unk_34C].animation); + s16 frameCount = Animation_GetLastFrame(sAnimationInfo[this->unk_34C].animation); if ((currentFrame == frameCount) && (this->unk_34C == 7)) { this->unk_34C = 0; - SubS_ChangeAnimationByInfoS(&this->skelAnime, D_80ADD990, 0); + SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimationInfo, 0); } if ((talkState == TEXT_STATE_5) && Message_ShouldAdvance(play)) { @@ -520,14 +520,14 @@ void func_80ADBD64(EnSellnuts* this, PlayState* play) { this->unk_338 &= ~2; this->actor.flags &= ~ACTOR_FLAG_1; this->unk_34C = 8; - SubS_ChangeAnimationByInfoS(&this->skelAnime, D_80ADD990, 8); + SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimationInfo, 8); this->actionFunc = func_80ADBE80; } } void func_80ADBE80(EnSellnuts* this, PlayState* play) { s16 currentFrame = this->skelAnime.curFrame; - s16 frameCount = Animation_GetLastFrame(D_80ADD990[this->unk_34C].animation); + s16 frameCount = Animation_GetLastFrame(sAnimationInfo[this->unk_34C].animation); func_80ADAE64(this); if (this->unk_366 == 0) { @@ -546,7 +546,7 @@ void func_80ADBE80(EnSellnuts* this, PlayState* play) { if (currentFrame == frameCount) { this->unk_350 = 4; this->unk_34C = 19; - SubS_ChangeAnimationByInfoS(&this->skelAnime, D_80ADD990, 19); + SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimationInfo, 19); Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_NUTS_DOWN); this->unk_338 &= ~1; this->unk_338 |= 8; @@ -580,7 +580,7 @@ void func_80ADC034(EnSellnuts* this, PlayState* play) { if ((this->actor.home.pos.y + 200.0f) < this->actor.world.pos.y) { Math_ApproachF(&this->actor.velocity.y, 0.0f, 0.2f, 1.0f); this->unk_34C = 10; - SubS_ChangeAnimationByInfoS(&this->skelAnime, D_80ADD990, 10); + SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimationInfo, 10); this->unk_368 = 0; this->actionFunc = func_80ADC37C; } @@ -589,7 +589,7 @@ void func_80ADC034(EnSellnuts* this, PlayState* play) { void func_80ADC118(EnSellnuts* this, PlayState* play) { Vec3f sp34; s16 currentFrame = this->skelAnime.curFrame; - s16 frameCount = Animation_GetLastFrame(D_80ADD990[this->unk_34C].animation); + s16 frameCount = Animation_GetLastFrame(sAnimationInfo[this->unk_34C].animation); if (currentFrame == frameCount) { Math_SmoothStepToS(&this->unk_364, 0x1C71, 3, 0x100, 0); @@ -615,7 +615,7 @@ void func_80ADC118(EnSellnuts* this, PlayState* play) { if ((this->actor.home.pos.y + 22.5f) < this->actor.world.pos.y) { this->unk_34C = 9; this->unk_360 = 0.3f; - SubS_ChangeAnimationByInfoS(&this->skelAnime, D_80ADD990, 9); + SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimationInfo, 9); Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_AKINDONUTS_HIDE); this->actionFunc = func_80ADC034; } @@ -793,7 +793,7 @@ void func_80ADC8C4(EnSellnuts* this, PlayState* play) { this->actor.gravity = -1.0f; this->actor.velocity.y = -1.0f; this->actor.speedXZ = 0.0f; - SubS_ChangeAnimationByInfoS(&this->skelAnime, D_80ADD990, this->unk_34C); + SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimationInfo, this->unk_34C); this->unk_338 &= ~1; this->unk_338 &= ~2; this->actionFunc = func_80ADCA64; @@ -808,7 +808,7 @@ void func_80ADC8C4(EnSellnuts* this, PlayState* play) { void func_80ADCA64(EnSellnuts* this, PlayState* play) { s16 currentFrame = this->skelAnime.curFrame; - s16 frameCount = Animation_GetLastFrame(D_80ADD990[this->unk_34C].animation); + s16 frameCount = Animation_GetLastFrame(sAnimationInfo[this->unk_34C].animation); if (this->unk_34C == 22) { Math_SmoothStepToS(&this->unk_364, 0, 3, 0x100, 0); @@ -821,7 +821,7 @@ void func_80ADCA64(EnSellnuts* this, PlayState* play) { this->unk_350 = 4; this->unk_34C = 19; this->actor.velocity.y = 0.0f; - SubS_ChangeAnimationByInfoS(&this->skelAnime, D_80ADD990, this->unk_34C); + SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimationInfo, this->unk_34C); Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_NUTS_DOWN); } return; @@ -832,7 +832,7 @@ void func_80ADCA64(EnSellnuts* this, PlayState* play) { if (this->unk_34C == 19) { this->unk_34C = 17; this->collider.dim.height = 0; - SubS_ChangeAnimationByInfoS(&this->skelAnime, D_80ADD990, 17); + SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimationInfo, 17); } else if (this->unk_34C == 17) { ActorCutscene_Stop(this->cutscene); gSaveContext.save.weekEventReg[73] |= 4; @@ -843,7 +843,7 @@ void func_80ADCA64(EnSellnuts* this, PlayState* play) { void func_80ADCC04(EnSellnuts* this, PlayState* play) { s16 currentFrame = this->skelAnime.curFrame; - s16 frameCount = Animation_GetLastFrame(D_80ADD990[this->unk_34C].animation); + s16 frameCount = Animation_GetLastFrame(sAnimationInfo[this->unk_34C].animation); if (this->unk_34C == 3) { if (currentFrame == frameCount) { @@ -852,7 +852,7 @@ void func_80ADCC04(EnSellnuts* this, PlayState* play) { this->unk_354 = 1.0f; this->unk_358 = 1.0f; this->unk_35C = 1.0f; - SubS_ChangeAnimationByInfoS(&this->skelAnime, D_80ADD990, this->unk_34C); + SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimationInfo, this->unk_34C); } } else if (this->unk_34C == 21) { func_80ADAFC0(this); @@ -863,7 +863,7 @@ void func_80ADCC04(EnSellnuts* this, PlayState* play) { } this->unk_340 = 0x626; this->unk_34C = 0; - SubS_ChangeAnimationByInfoS(&this->skelAnime, D_80ADD990, this->unk_34C); + SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimationInfo, this->unk_34C); this->actionFunc = func_80ADC5A4; } } @@ -884,7 +884,7 @@ void func_80ADCD3C(EnSellnuts* this, PlayState* play) { this->unk_34C = 3; this->unk_350 = 4; Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_AKINDONUTS_HIDE); - SubS_ChangeAnimationByInfoS(&this->skelAnime, D_80ADD990, this->unk_34C); + SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimationInfo, this->unk_34C); this->actionFunc = func_80ADCC04; } else if (D_80ADD940 != 0) { this->collider.dim.height = 64; @@ -989,7 +989,7 @@ void EnSellnuts_Init(Actor* thisx, PlayState* play) { this->actor.gravity = -1.0f; this->unk_34A = 50; this->unk_34C = 4; - SubS_ChangeAnimationByInfoS(&this->skelAnime, D_80ADD990, this->unk_34C); + SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimationInfo, this->unk_34C); this->actionFunc = func_80ADB254; return; } @@ -1007,7 +1007,7 @@ void EnSellnuts_Init(Actor* thisx, PlayState* play) { this->unk_358 = 1.0f; this->unk_354 = 1.0f; this->unk_360 = 1.0f; - SubS_ChangeAnimationByInfoS(&this->skelAnime, D_80ADD990, this->unk_34C); + SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimationInfo, this->unk_34C); this->actionFunc = func_80ADC5A4; } else { this->unk_338 |= 2; @@ -1018,7 +1018,7 @@ void EnSellnuts_Init(Actor* thisx, PlayState* play) { this->unk_34C = 4; this->unk_34E = 20; this->collider.dim.height = 64; - SubS_ChangeAnimationByInfoS(&this->skelAnime, D_80ADD990, this->unk_34C); + SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimationInfo, this->unk_34C); this->actionFunc = func_80ADCD3C; } } diff --git a/src/overlays/actors/ovl_En_Shn/z_en_shn.c b/src/overlays/actors/ovl_En_Shn/z_en_shn.c index 706d7d801..93b75e96b 100644 --- a/src/overlays/actors/ovl_En_Shn/z_en_shn.c +++ b/src/overlays/actors/ovl_En_Shn/z_en_shn.c @@ -68,8 +68,8 @@ void func_80AE6130(EnShn* this) { SkelAnime_Update(&this->skelAnime); } -s32 func_80AE615C(EnShn* this, s32 arg1) { - static AnimationInfoS sAnimations[] = { +s32 func_80AE615C(EnShn* this, s32 animIndex) { + static AnimationInfoS sAnimationInfo[] = { { &gBurlyGuyHandsOnTableAnim, 1.0f, 0, -1, 0, 0 }, { &gBurlyGuyHandsOnTableAnim, 1.0f, 0, -1, 0, -4 }, { &gSwampGuideChinScratchAnim, 1.0f, 0, -1, 0, 0 }, @@ -78,12 +78,12 @@ s32 func_80AE615C(EnShn* this, s32 arg1) { s32 phi_v0 = 0; s32 phi_v1 = 0; - if (arg1 != this->unk_2E8) { + if (animIndex != this->unk_2E8) { phi_v0 = 1; } if (phi_v0 != 0) { - this->unk_2E8 = arg1; - phi_v1 = SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimations, arg1); + this->unk_2E8 = animIndex; + phi_v1 = SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimationInfo, animIndex); this->playSpeed = this->skelAnime.playSpeed; } return phi_v1; @@ -260,7 +260,7 @@ s32 func_80AE6704(Actor* thisx, PlayState* play) { case 6: gSaveContext.save.weekEventReg[90] &= (u8)~0x40; func_800B7298(play, &this->actor, 7); - play->nextEntranceIndex = 0x8460; + play->nextEntrance = ENTRANCE(SOUTHERN_SWAMP_POISONED, 6); gSaveContext.nextCutsceneIndex = 0; play->transitionTrigger = TRANS_TRIGGER_START; play->transitionType = TRANS_TYPE_03; @@ -293,10 +293,10 @@ s32 func_80AE68F0(EnShn* this, PlayState* play) { if (this->unk_1D8 & 7) { if (Actor_ProcessTalkRequest(&this->actor, &play->state)) { this->unk_1D8 &= ~0x180; - if (player->exchangeItemId == EXCH_ITEM_PICTO_BOX) { + if (player->exchangeItemId == PLAYER_AP_PICTO_BOX) { this->unk_1D8 |= 0x80; this->unk_2E4 = player->exchangeItemId; - } else if (player->exchangeItemId != EXCH_ITEM_NONE) { + } else if (player->exchangeItemId != PLAYER_AP_NONE) { this->unk_1D8 |= 0x100; this->unk_2E4 = player->exchangeItemId; } @@ -360,7 +360,7 @@ void EnShn_Init(Actor* thisx, PlayState* play) { this->unk_2E0 = 0; this->unk_2D8 = 0; this->unk_1D8 = 0; - if (gSaveContext.save.entranceIndex != 0xA820) { + if (gSaveContext.save.entrance != ENTRANCE(TOURIST_INFORMATION, 2)) { SubS_UpdateFlags(&this->unk_1D8, 3, 7); this->unk_2BE = 0; } else { @@ -382,7 +382,7 @@ void EnShn_Update(Actor* thisx, PlayState* play) { func_80AE6130(this); func_80AE63A8(this, play); this->unk_2E0 = 0; - func_8013C964(&this->actor, play, 120.0f, 40.0f, EXCH_ITEM_NONE, this->unk_1D8 & 7); + func_8013C964(&this->actor, play, 120.0f, 40.0f, PLAYER_AP_NONE, this->unk_1D8 & 7); } s32 EnShn_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx) { diff --git a/src/overlays/actors/ovl_En_Skb/z_en_skb.c b/src/overlays/actors/ovl_En_Skb/z_en_skb.c index 21df2d8f9..e3c5b1730 100644 --- a/src/overlays/actors/ovl_En_Skb/z_en_skb.c +++ b/src/overlays/actors/ovl_En_Skb/z_en_skb.c @@ -49,7 +49,7 @@ void func_809964A0(EnSkb* this, PlayState* play); s32 func_80996594(EnSkb* this, PlayState* play); void func_80996BEC(EnSkb* this, PlayState* play); -static AnimationInfo sAnimations[] = { +static AnimationInfo sAnimationInfo[] = { { &object_skb_Anim_0064E0, 1.0f, 0.0f, 0.0f, ANIMMODE_LOOP, -4.0 }, { &object_skb_Anim_003584, 1.0f, 0.0f, 0.0f, ANIMMODE_ONCE, -1.0f }, { &object_skb_Anim_002190, 0.6f, 0.0f, 0.0f, ANIMMODE_ONCE_INTERP, 4.0f }, @@ -287,7 +287,7 @@ void func_80994DA8(EnSkb* this, PlayState* play) { } void func_80994E2C(EnSkb* this) { - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, 1); + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, 1); this->actor.flags &= ~ACTOR_FLAG_1; Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_STALKID_APPEAR); this->unk_3D0 = 0; @@ -342,7 +342,7 @@ void func_80995068(EnSkb* this, PlayState* play) { if (this->unk_3E0 == 1) { Message_StartTextbox(play, 0x13F8, &this->actor); if (this->unk_3DE == 2) { - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, 11); + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, 11); } } else { Message_StartTextbox(play, 0x13F6, &this->actor); @@ -374,7 +374,7 @@ void func_80995190(EnSkb* this, PlayState* play) { if (Message_ShouldAdvance(play)) { Message_StartTextbox(play, 0x13F7, &this->actor); if (this->unk_3DE == 2) { - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, 11); + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, 11); } } break; @@ -412,7 +412,7 @@ void func_80995244(EnSkb* this, PlayState* play) { } void func_809952D8(EnSkb* this) { - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, 5); + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, 5); this->actor.colChkInfo.mass = MASS_IMMOVABLE; this->unk_3DE = 9; this->actionFunc = func_8099533C; @@ -434,7 +434,7 @@ void func_8099533C(EnSkb* this, PlayState* play) { } void func_809953E8(EnSkb* this) { - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, 6); + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, 6); this->actor.colChkInfo.mass = MASS_IMMOVABLE; this->unk_3DE = 10; this->actionFunc = func_8099544C; @@ -456,7 +456,7 @@ void func_8099544C(EnSkb* this, PlayState* play) { } void func_809954F8(EnSkb* this) { - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, 7); + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, 7); this->actor.colChkInfo.mass = MASS_IMMOVABLE; this->unk_3DE = 11; this->actionFunc = func_8099556C; @@ -499,14 +499,14 @@ void func_8099571C(EnSkb* this) { this->unk_3DC = 0; this->actor.shape.shadowScale = 0.0f; if (this->unk_3DE == 9) { - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, 8); + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, 8); this->actor.speedXZ = 2.4f; this->actor.gravity = -1.0f; this->actor.velocity.y = 3.0f; } else if (this->unk_3DE == 0xA) { - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, 8); + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, 8); } else if (this->unk_3DE == 0xB) { - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, 9); + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, 9); this->actor.speedXZ = 3.2f; this->actor.gravity = -1.0f; this->actor.velocity.y = 2.0f; @@ -560,7 +560,7 @@ void func_8099599C(EnSkb* this, PlayState* play) { } void func_80995A30(EnSkb* this) { - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, 0); + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, 0); this->actor.speedXZ = 1.6f; this->unk_3DA = 0; this->unk_3DE = 2; @@ -573,7 +573,7 @@ void func_80995A8C(EnSkb* this, PlayState* play) { this->actor.flags |= (ACTOR_FLAG_1 | ACTOR_FLAG_8); this->actor.hintId = 0xFF; this->actor.colChkInfo.mass = MASS_HEAVY; - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, 12); + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, 12); func_8099504C(this); return; } @@ -596,7 +596,7 @@ void func_80995A8C(EnSkb* this, PlayState* play) { } void func_80995C24(EnSkb* this) { - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, 2); + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, 2); this->collider.base.atFlags &= ~AT_BOUNCED; this->actor.speedXZ = 0.0f; this->unk_3DE = 3; @@ -682,17 +682,17 @@ void func_80995E64(EnSkb* this, PlayState* play) { void func_80995F98(EnSkb* this) { if ((this->unk_3DE == 9) || (this->unk_3DE == 0xA)) { this->actor.world.rot.y = this->actor.yawTowardsPlayer; - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, 8); + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, 8); this->actor.gravity = -1.0f; this->actor.speedXZ = 1.0f; } else if (this->unk_3DE == 0xB) { - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, 9); + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, 9); this->actor.speedXZ = 3.2f; this->actor.velocity.y = 2.0f; this->actor.gravity = -1.0f; } else { this->actor.world.rot.y = this->actor.yawTowardsPlayer; - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, 3); + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, 3); if (this->actor.bgCheckFlags & 1) { this->actor.speedXZ = -4.0f; } @@ -728,7 +728,7 @@ void func_809960AC(EnSkb* this, PlayState* play) { } void func_809961E4(EnSkb* this, PlayState* play) { - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, 4); + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, 4); this->unk_3D8 |= 0x40; if (this->actor.bgCheckFlags & 1) { this->actor.speedXZ = -6.0f; @@ -760,7 +760,7 @@ void func_8099630C(EnSkb* this, PlayState* play) { this->drawDmgEffAlpha = 0.0f; if (this->actor.colChkInfo.health != 0) { Actor_SetColorFilter(&this->actor, 0x4000, 0xFF, 0, 8); - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, 3); + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, 3); this->unk_3D8 |= 1; func_80995F98(this); } else { @@ -782,7 +782,7 @@ void func_809963D8(EnSkb* this, PlayState* play) { this->drawDmgEffAlpha = 0.0f; if (this->actor.colChkInfo.health != 0) { Actor_SetColorFilter(&this->actor, 0x4000, 255, 0, 8); - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, 3); + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, 3); this->unk_3D8 |= 1; func_80995F98(this); } else { @@ -953,7 +953,7 @@ void func_8099672C(EnSkb* this, PlayState* play) { this->drawDmgEffScale = 0.5f; Actor_SetColorFilter(&this->actor, 0x4000, 0xFF, 0, 8); Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_STALKID_DAMAGE); - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, 3); + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, 3); func_809963C4(this); break; @@ -971,7 +971,7 @@ void func_8099672C(EnSkb* this, PlayState* play) { case 13: Actor_SetColorFilter(&this->actor, 0x4000, 0xFF, 0, 8); - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, 3); + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, 3); func_80995F98(this); break; } diff --git a/src/overlays/actors/ovl_En_Sob1/z_en_sob1.c b/src/overlays/actors/ovl_En_Sob1/z_en_sob1.c index b5386bdb0..5fa0a362c 100644 --- a/src/overlays/actors/ovl_En_Sob1/z_en_sob1.c +++ b/src/overlays/actors/ovl_En_Sob1/z_en_sob1.c @@ -58,7 +58,7 @@ typedef enum { /* 2 */ BOMB_SHOPKEEPER_ANIM_SIT_AT_COUNTER_LOOP } BombShopkeeperAnimation; -static AnimationInfoS sAnimationsBombShopkeeper[] = { +static AnimationInfoS sAnimationInfoBombShopkeeper[] = { { &gBombShopkeeperWalkAnim, 2.0f, 0, -1, ANIMMODE_LOOP, 20 }, { &gBombShopkeeperSitAtCounterStartAnim, 1.0f, 0, -1, ANIMMODE_ONCE, 0 }, { &gBombShopkeeperSitAtCounterLoopAnim, 1.0f, 0, -1, ANIMMODE_LOOP, 0 }, @@ -156,10 +156,10 @@ static Vec3f sPosOffset[] = { { 0.0f, -4.0f, 0.0f }, }; -void EnSob1_ChangeAnim(SkelAnime* skelAnime, AnimationInfoS* animations, s32 index) { +void EnSob1_ChangeAnim(SkelAnime* skelAnime, AnimationInfoS* animations, s32 animIndex) { f32 frameCount; - animations += index; + animations += animIndex; if (animations->frameCount < 0) { frameCount = Animation_GetLastFrame(animations->animation); } else { @@ -722,7 +722,8 @@ void EnSob1_EndWalk(EnSob1* this, PlayState* play) { if (distSq < 12.0f) { this->actor.speedXZ = 0.0f; if (animLastFrame == curFrame) { - EnSob1_ChangeAnim(&this->skelAnime, sAnimationsBombShopkeeper, BOMB_SHOPKEEPER_ANIM_SIT_AT_COUNTER_START); + EnSob1_ChangeAnim(&this->skelAnime, sAnimationInfoBombShopkeeper, + BOMB_SHOPKEEPER_ANIM_SIT_AT_COUNTER_START); EnSob1_SetupAction(this, EnSob1_SetupIdle); } } @@ -733,7 +734,7 @@ void EnSob1_SetupIdle(EnSob1* this, PlayState* play) { s16 curFrame = this->skelAnime.curFrame; if (Animation_GetLastFrame(&gBombShopkeeperSitAtCounterStartAnim) == curFrame) { - EnSob1_ChangeAnim(&this->skelAnime, sAnimationsBombShopkeeper, BOMB_SHOPKEEPER_ANIM_SIT_AT_COUNTER_LOOP); + EnSob1_ChangeAnim(&this->skelAnime, sAnimationInfoBombShopkeeper, BOMB_SHOPKEEPER_ANIM_SIT_AT_COUNTER_LOOP); EnSob1_SetupAction(this, EnSob1_Idle); } EnSob1_Walking(this, play); @@ -823,7 +824,7 @@ void EnSob1_ItemPurchased(EnSob1* this, PlayState* play) { if (Actor_ProcessTalkRequest(&this->actor, &play->state)) { func_80151938(play, 0x647); } else { - func_800B85E0(&this->actor, play, 400.0f, EXCH_ITEM_MINUS1); + func_800B85E0(&this->actor, play, 400.0f, PLAYER_AP_MINUS1); } } @@ -1079,7 +1080,7 @@ void EnSob1_SetupItemPurchased(EnSob1* this, PlayState* play) { this->cutscene = this->lookToShopkeeperCutscene; ActorCutscene_SetIntentToPlay(this->cutscene); } - func_800B85E0(&this->actor, play, 400.0f, EXCH_ITEM_MINUS1); + func_800B85E0(&this->actor, play, 400.0f, PLAYER_AP_MINUS1); } } @@ -1095,7 +1096,7 @@ void EnSob1_ContinueShopping(EnSob1* this, PlayState* play) { player->stateFlags2 |= 0x20000000; Message_StartTextbox(play, this->welcomeTextId, &this->actor); EnSob1_SetupStartShopping(play, this, true); - func_800B85E0(&this->actor, play, 200.0f, EXCH_ITEM_MINUS1); + func_800B85E0(&this->actor, play, 200.0f, PLAYER_AP_MINUS1); } } diff --git a/src/overlays/actors/ovl_En_Ssh/z_en_ssh.c b/src/overlays/actors/ovl_En_Ssh/z_en_ssh.c index d7c41603e..6e7915539 100644 --- a/src/overlays/actors/ovl_En_Ssh/z_en_ssh.c +++ b/src/overlays/actors/ovl_En_Ssh/z_en_ssh.c @@ -206,39 +206,40 @@ void EnSsh_InitColliders(EnSsh* this, PlayState* play) { Collider_SetJntSph(play, &this->collider2, &this->actor, &sJntSphInit, this->collider2Elements); } -f32 EnSsh_SetAnimation(EnSsh* this, s32 arg0) { - AnimationHeader* animation[] = { &object_ssh_Anim_006D78, &object_ssh_Anim_001494, &object_ssh_Anim_001494, - &object_ssh_Anim_006788, &object_ssh_Anim_001494, &object_ssh_Anim_001494, - &object_ssh_Anim_006D78 }; - f32 playerbackSpeed[] = { 1.0f, 4.0f, 1.0f, 1.0f, 8.0f, 6.0f, 2.0f }; - u8 mode[] = { +f32 EnSsh_ChangeAnim(EnSsh* this, s32 animIndex) { + AnimationHeader* sAnimations[] = { &object_ssh_Anim_006D78, &object_ssh_Anim_001494, &object_ssh_Anim_001494, + &object_ssh_Anim_006788, &object_ssh_Anim_001494, &object_ssh_Anim_001494, + &object_ssh_Anim_006D78 }; + f32 sPlaySpeeds[] = { 1.0f, 4.0f, 1.0f, 1.0f, 8.0f, 6.0f, 2.0f }; + u8 sAnimationModes[] = { ANIMMODE_ONCE_INTERP, ANIMMODE_ONCE_INTERP, ANIMMODE_LOOP_INTERP, ANIMMODE_ONCE_INTERP, ANIMMODE_LOOP_INTERP, ANIMMODE_LOOP_INTERP, ANIMMODE_LOOP_INTERP, }; - f32 frameCount = Animation_GetLastFrame(animation[arg0]); + f32 frameCount = Animation_GetLastFrame(sAnimations[animIndex]); s32 pad; - Animation_Change(&this->skelAnime, animation[arg0], playerbackSpeed[arg0], 0.0f, frameCount, mode[arg0], -6.0f); + Animation_Change(&this->skelAnime, sAnimations[animIndex], sPlaySpeeds[animIndex], 0.0f, frameCount, + sAnimationModes[animIndex], -6.0f); return frameCount; } void EnSsh_SetWaitAnimation(EnSsh* this) { - EnSsh_SetAnimation(this, SSH_ANIM_WAIT); + EnSsh_ChangeAnim(this, SSH_ANIM_WAIT); } void EnSsh_SetReturnAnimation(EnSsh* this) { Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_STALTU_UP); - EnSsh_SetAnimation(this, SSH_ANIM_UP); + EnSsh_ChangeAnim(this, SSH_ANIM_UP); } void EnSsh_SetLandAnimation(EnSsh* this) { this->actor.world.pos.y = this->floorHeightOffset + this->actor.floorHeight; - this->animTimer = EnSsh_SetAnimation(this, SSH_ANIM_LAND); + this->animTimer = EnSsh_ChangeAnim(this, SSH_ANIM_LAND); } void EnSsh_SetDropAnimation(EnSsh* this) { if (this->unkTimer == 0) { - this->animTimer = EnSsh_SetAnimation(this, SSH_ANIM_DROP); + this->animTimer = EnSsh_ChangeAnim(this, SSH_ANIM_DROP); } this->actor.velocity.y = -10.0f; } @@ -724,11 +725,11 @@ void EnSsh_Idle(EnSsh* this, PlayState* play) { } if ((this->unkTimer != 0) && (DECR(this->unkTimer) == 0)) { - EnSsh_SetAnimation(this, SSH_ANIM_WAIT); + EnSsh_ChangeAnim(this, SSH_ANIM_WAIT); } if ((this->animTimer != 0) && (DECR(this->animTimer) == 0)) { - EnSsh_SetAnimation(this, SSH_ANIM_WAIT); + EnSsh_ChangeAnim(this, SSH_ANIM_WAIT); } if (!EnSsh_IsCloseToLink(this, play)) { @@ -752,11 +753,11 @@ void EnSsh_Idle(EnSsh* this, PlayState* play) { void EnSsh_Land(EnSsh* this, PlayState* play) { if ((this->unkTimer != 0) && (DECR(this->unkTimer) == 0)) { - EnSsh_SetAnimation(this, SSH_ANIM_WAIT); + EnSsh_ChangeAnim(this, SSH_ANIM_WAIT); } if ((this->animTimer != 0) && (DECR(this->animTimer) == 0)) { - EnSsh_SetAnimation(this, SSH_ANIM_WAIT); + EnSsh_ChangeAnim(this, SSH_ANIM_WAIT); } if ((this->actor.floorHeight + this->floorHeightOffset) <= this->actor.world.pos.y) { @@ -768,7 +769,7 @@ void EnSsh_Land(EnSsh* this, PlayState* play) { void EnSsh_Drop(EnSsh* this, PlayState* play) { if ((this->unkTimer != 0) && (DECR(this->unkTimer) == 0)) { - EnSsh_SetAnimation(this, SSH_ANIM_DROP); + EnSsh_ChangeAnim(this, SSH_ANIM_DROP); } if (!EnSsh_IsCloseToLink(this, play)) { diff --git a/src/overlays/actors/ovl_En_St/z_en_st.c b/src/overlays/actors/ovl_En_St/z_en_st.c index e8c9eaeb9..b3c353f1f 100644 --- a/src/overlays/actors/ovl_En_St/z_en_st.c +++ b/src/overlays/actors/ovl_En_St/z_en_st.c @@ -152,7 +152,7 @@ static DamageTable sDamageTable = { /* Powder Keg */ DMG_ENTRY(1, 0x0), }; -static AnimationInfoS sAnimations[] = { +static AnimationInfoS sAnimationInfo[] = { { &object_st_Anim_000304, 1.0f, 0, -1, ANIMMODE_LOOP, 0 }, { &object_st_Anim_005B98, 1.0f, 0, -1, ANIMMODE_ONCE, -4 }, { &object_st_Anim_000304, 4.0f, 0, -1, ANIMMODE_ONCE, -4 }, @@ -447,7 +447,7 @@ s32 func_808A6064(EnSt* this) { } void func_808A60E0(EnSt* this) { - s32 idx = (this->unk_2C8 > 0.0f) ? 2 : 6; + s32 animIndex = (this->unk_2C8 > 0.0f) ? 2 : 6; f32 sp20 = (this->unk_2C8 > 0.0f) ? 4.0f : 9.0f; f32 sp1C; u16 sfxId = (this->unk_2C8 < 0.0f) ? NA_SE_EN_STALTU_DOWN : NA_SE_EN_STALTU_UP; @@ -455,7 +455,7 @@ void func_808A60E0(EnSt* this) { sp1C = this->skelAnime.curFrame / (this->skelAnime.animLength - 1.0f); if (sp1C == 1.0f) { - SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimations, idx); + SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimationInfo, animIndex); Actor_PlaySfxAtPos(&this->actor, sfxId); } @@ -507,7 +507,7 @@ void func_808A6220(EnSt* this, PlayState* play) { } void func_808A63E8(EnSt* this) { - SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimations, 3); + SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimationInfo, 3); this->unk_2C8 = 1.0f; func_808A5D7C(this); this->unk_30C = 0; @@ -520,7 +520,7 @@ void func_808A63E8(EnSt* this) { void func_808A6468(EnSt* this, PlayState* play) { func_808A5050(this, play); - SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimations, 4); + SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimationInfo, 4); this->unk_18C |= (0x8 | 0x4); this->unk_18C &= ~(0x10 | 0x2); this->unk_2C8 = -1.0f; @@ -535,9 +535,9 @@ void func_808A6468(EnSt* this, PlayState* play) { } void func_808A650C(EnSt* this) { - s32 idx = (this->unk_2C8 > 0.0f) ? 2 : 6; + s32 animIndex = (this->unk_2C8 > 0.0f) ? 2 : 6; - SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimations, idx); + SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimationInfo, animIndex); this->unk_2CC = 0.0f; this->unk_2D4 = 0.0f; this->unk_2D8 = 0.0f; @@ -604,7 +604,7 @@ s32 func_808A6580(EnSt* this, PlayState* play) { this->unk_314 = 20; this->unk_312 = 0; Actor_SetColorFilter(&this->actor, 0x4000, 200, 0, this->unk_314); - SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimations, 1); + SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimationInfo, 1); this->unk_18C |= 8; this->actionFunc = func_808A6D84; this->unk_2C8 = -1.0f; @@ -645,7 +645,7 @@ s32 func_808A6580(EnSt* this, PlayState* play) { } if (this->drawDmgEffType != ACTOR_DRAW_DMGEFF_FROZEN_NO_SFX) { - SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimations, 7); + SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimationInfo, 7); this->unk_2CC = 0.0f; this->unk_2D4 = 0.0f; this->actor.gravity = -1.0f; @@ -690,7 +690,7 @@ void func_808A6A78(EnSt* this, PlayState* play) { if (Object_IsLoaded(&play->objectCtx, this->unk_2C0)) { ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 8.0f); SkelAnime_Init(play, &this->skelAnime, &object_st_Skel_005298, NULL, this->jointTable, this->morphTable, 30); - SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimations, 0); + SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimationInfo, 0); Collider_InitAndSetCylinder(play, &this->collider1, &this->actor, &sCylinderInit1); Collider_InitAndSetCylinder(play, &this->collider2, &this->actor, &sCylinderInit2); @@ -721,7 +721,7 @@ void func_808A6C04(EnSt* this, PlayState* play) { Actor_MoveWithGravity(&this->actor); if ((this->unk_18C & 8) && Animation_OnFrame(&this->skelAnime, this->skelAnime.endFrame)) { - SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimations, 3); + SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimationInfo, 3); this->unk_18C &= ~8; } else if ((this->unk_310 == 0) && func_808A5F28(this, play) && !func_808A6064(this)) { func_808A650C(this); @@ -763,7 +763,7 @@ void func_808A6E24(EnSt* this, PlayState* play) { } if (count == ARRAY_COUNT(this->unk_31C)) { - SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimations, 7); + SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimationInfo, 7); this->drawDmgEffType = ACTOR_DRAW_DMGEFF_BLUE_FIRE; this->unk_2CC = 0.0f; this->unk_2D4 = 0.0f; diff --git a/src/overlays/actors/ovl_En_Suttari/z_en_suttari.c b/src/overlays/actors/ovl_En_Suttari/z_en_suttari.c index 3fed1f8f2..10cdec079 100644 --- a/src/overlays/actors/ovl_En_Suttari/z_en_suttari.c +++ b/src/overlays/actors/ovl_En_Suttari/z_en_suttari.c @@ -49,7 +49,7 @@ const ActorInit En_Suttari_InitVars = { (ActorFunc)EnSuttari_Draw, }; -static AnimationInfo sAnimations[] = { +static AnimationInfo sAnimationInfo[] = { { &object_boj_Anim_00071C, 1.0f, 0.0f, 0.0f, ANIMMODE_LOOP, 0.0f }, { &object_boj_Anim_0128F4, 1.0f, 0.0f, 0.0f, ANIMMODE_LOOP, 0.0f }, { &object_boj_Anim_011F84, 1.0f, 0.0f, 0.0f, ANIMMODE_LOOP, 0.0f }, @@ -222,8 +222,8 @@ Actor* EnSuttari_GetActorById(PlayState* play, s16 actorId) { return NULL; } -void EnSuttari_SetNextEntrance(PlayState* play, u16 nextEntranceIndex) { - play->nextEntranceIndex = nextEntranceIndex; +void EnSuttari_TriggerTransition(PlayState* play, u16 entrance) { + play->nextEntrance = entrance; play->transitionType = TRANS_TYPE_64; gSaveContext.nextTransitionType = TRANS_TYPE_64; play->transitionTrigger = TRANS_TRIGGER_START; @@ -250,7 +250,7 @@ s32 func_80BAA904(EnSuttari* this, PlayState* play) { void func_80BAA9B4(EnSuttari* this) { s16 curFrame = this->skelAnime.curFrame; - s16 frameCount = Animation_GetLastFrame(sAnimations[this->animationIndex].animation); + s16 frameCount = Animation_GetLastFrame(sAnimationInfo[this->animIndex].animation); switch (this->textId) { case 0x1454: @@ -261,15 +261,15 @@ void func_80BAA9B4(EnSuttari* this) { case 0x1459: case 0x145A: case 0x145B: - if ((this->animationIndex != 8) && (curFrame == frameCount)) { - this->animationIndex = 8; - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, this->animationIndex); + if ((this->animIndex != 8) && (curFrame == frameCount)) { + this->animIndex = 8; + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, this->animIndex); } break; default: - if ((this->animationIndex != 1) && (curFrame == frameCount)) { - this->animationIndex = 1; - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, this->animationIndex); + if ((this->animIndex != 1) && (curFrame == frameCount)) { + this->animIndex = 1; + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, this->animIndex); } } } @@ -277,8 +277,8 @@ void func_80BAA9B4(EnSuttari* this) { void func_80BAAA94(EnSuttari* this) { switch (this->textId) { case 0x29E5: - this->animationIndex = 1; - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, this->animationIndex); + this->animIndex = 1; + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, this->animIndex); break; case 0x29E9: this->enFsn->flags |= ENFSN_ANGRY; @@ -290,12 +290,12 @@ void func_80BAAA94(EnSuttari* this) { this->enFsn->flags |= ENFSN_OFFER_FINAL_PRICE; break; case 0x29EC: - this->animationIndex = 7; - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, this->animationIndex); + this->animIndex = 7; + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, this->animIndex); break; case 0x29ED: - this->animationIndex = 1; - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, this->animationIndex); + this->animIndex = 1; + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, this->animIndex); break; } } @@ -417,14 +417,14 @@ void func_80BAAB78(EnSuttari* this, PlayState* play) { void func_80BAAF1C(EnSuttari* this) { s16 curFrame = this->skelAnime.curFrame; - s16 frameCount = Animation_GetLastFrame(sAnimations[this->animationIndex].animation); + s16 frameCount = Animation_GetLastFrame(sAnimationInfo[this->animIndex].animation); - if (this->animationIndex == 5) { - this->animationIndex = 3; - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, this->animationIndex); - } else if ((this->animationIndex == 3) && (curFrame == frameCount)) { - this->animationIndex = 6; - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, this->animationIndex); + if (this->animIndex == 5) { + this->animIndex = 3; + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, this->animIndex); + } else if ((this->animIndex == 3) && (curFrame == frameCount)) { + this->animIndex = 6; + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, this->animIndex); this->flags1 &= ~0x100; } } @@ -842,7 +842,7 @@ s32 func_80BAC220(EnSuttari* this, PlayState* play) { void func_80BAC2FC(EnSuttari* this, PlayState* play) { Player* player = GET_PLAYER(play); s16 curFrame = this->skelAnime.curFrame; - s16 frameCount = Animation_GetLastFrame(sAnimations[this->animationIndex].animation); + s16 frameCount = Animation_GetLastFrame(sAnimationInfo[this->animIndex].animation); switch (this->unk428) { case 12: @@ -851,9 +851,9 @@ void func_80BAC2FC(EnSuttari* this, PlayState* play) { func_80BABFD4(this, play); break; case 15: - if ((this->animationIndex == 1) && (curFrame == frameCount)) { - this->animationIndex = 2; - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, this->animationIndex); + if ((this->animIndex == 1) && (curFrame == frameCount)) { + this->animIndex = 2; + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, this->animIndex); } if (!(gSaveContext.save.weekEventReg[83] & 4) && !(this->flags1 & 0x1000)) { if (ActorCutscene_GetCanPlayNext(this->cutscenes[0])) { @@ -884,9 +884,9 @@ void func_80BAC2FC(EnSuttari* this, PlayState* play) { this->flags1 |= 0x80; this->flags1 |= 0x20; this->enFsn->flags &= ~ENFSN_HAGGLE; - if (this->animationIndex != 2) { - this->animationIndex = 2; - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, this->animationIndex); + if (this->animIndex != 2) { + this->animIndex = 2; + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, this->animIndex); } func_80BAC220(this, play); break; @@ -915,9 +915,9 @@ void func_80BAC2FC(EnSuttari* this, PlayState* play) { break; case 4: if (!(gSaveContext.save.weekEventReg[33] & 8)) { - if (this->animationIndex == 2 || this->animationIndex == 1) { - this->animationIndex = 5; - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, this->animationIndex); + if (this->animIndex == 2 || this->animIndex == 1) { + this->animIndex = 5; + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, this->animIndex); } this->flags1 |= 0x10; if (this->flags2 & 2) { @@ -945,16 +945,16 @@ void func_80BAC6E8(EnSuttari* this, PlayState* play) { if (play->sceneNum == SCENE_IKANA) { this->flags1 |= 1; if (gSaveContext.save.day == 1 || gSaveContext.save.day == 2) { - this->animationIndex = 2; - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, this->animationIndex); + this->animIndex = 2; + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, this->animIndex); this->flags1 |= 0x80; this->actionFunc = func_80BACA14; return; } else if ((gSaveContext.save.day == 3) && (gSaveContext.save.time <= CLOCK_TIME(19, 0)) && !(gSaveContext.save.weekEventReg[61] & 8) && !(gSaveContext.save.weekEventReg[33] & 8) && (gSaveContext.save.weekEventReg[51] & 8)) { - this->animationIndex = 2; - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, this->animationIndex); + this->animIndex = 2; + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, this->animIndex); this->actionFunc = func_80BACEE0; return; } @@ -962,15 +962,16 @@ void func_80BAC6E8(EnSuttari* this, PlayState* play) { if (gSaveContext.save.time >= CLOCK_TIME(0, 20) && gSaveContext.save.time < CLOCK_TIME(6, 00)) { Actor_MarkForDeath(&this->actor); } - if ((gSaveContext.save.entranceIndex == 0xD670) || (gSaveContext.save.weekEventReg[58] & 0x40)) { + if ((gSaveContext.save.entrance == ENTRANCE(NORTH_CLOCK_TOWN, 7)) || + (gSaveContext.save.weekEventReg[58] & 0x40)) { Actor_MarkForDeath(&this->actor); } this->cutscenes[0] = this->actor.cutscene; this->cutscenes[1] = ActorCutscene_GetAdditionalCutscene(this->cutscenes[0]); this->flags1 |= 0x80; this->flags1 |= 8; - this->animationIndex = 1; - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, this->animationIndex); + this->animIndex = 1; + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, this->animIndex); this->actionFunc = func_80BAD004; return; } else if (play->sceneNum == SCENE_ICHIBA) { @@ -978,8 +979,8 @@ void func_80BAC6E8(EnSuttari* this, PlayState* play) { Actor_MarkForDeath(&this->actor); return; } - this->animationIndex = 0; - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, this->animationIndex); + this->animIndex = 0; + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, this->animIndex); this->flags1 |= 2; this->actionFunc = func_80BAD5F8; return; @@ -988,8 +989,8 @@ void func_80BAC6E8(EnSuttari* this, PlayState* play) { Actor_MarkForDeath(&this->actor); return; } - this->animationIndex = 0; - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, this->animationIndex); + this->animIndex = 0; + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, this->animIndex); this->cutscenes[0] = this->actor.cutscene; this->cutscenes[1] = ActorCutscene_GetAdditionalCutscene(this->cutscenes[0]); this->flags1 |= 4; @@ -1007,9 +1008,9 @@ void func_80BAC6E8(EnSuttari* this, PlayState* play) { void func_80BACA14(EnSuttari* this, PlayState* play) { Player* player = GET_PLAYER(play); - if (this->animationIndex == 1 || this->animationIndex == 8) { - this->animationIndex = 2; - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, this->animationIndex); + if (this->animIndex == 1 || this->animIndex == 8) { + this->animIndex = 2; + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, this->animIndex); } func_80BABA90(this, 0, 0); func_80BAB434(this); @@ -1232,7 +1233,7 @@ void func_80BAD380(EnSuttari* this, PlayState* play) { this->actor.speedXZ = 0.0f; Audio_QueueSeqCmd(0x101400FF); this->flags2 |= 4; - EnSuttari_SetNextEntrance(play, 0xD670); + EnSuttari_TriggerTransition(play, ENTRANCE(NORTH_CLOCK_TOWN, 7)); } else { this->unk3F2 = this->headRot.y; Math_ApproachF(&this->actor.speedXZ, 4.0f, 0.2f, 0.5f); @@ -1245,11 +1246,11 @@ void func_80BAD380(EnSuttari* this, PlayState* play) { void func_80BAD5F8(EnSuttari* this, PlayState* play) { ScheduleOutput scheduleOutput; s16 curFrame = this->skelAnime.curFrame; - s16 frameCount = Animation_GetLastFrame(sAnimations[this->animationIndex].animation); + s16 frameCount = Animation_GetLastFrame(sAnimationInfo[this->animIndex].animation); - if ((curFrame == frameCount) && (this->animationIndex == 0) && (this->flags1 & 0x20)) { - this->animationIndex = 2; - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, this->animationIndex); + if ((curFrame == frameCount) && (this->animIndex == 0) && (this->flags1 & 0x20)) { + this->animIndex = 2; + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, this->animIndex); } this->timePathTimeSpeed = REG(15) + ((void)0, gSaveContext.save.daySpeed); if (!Schedule_RunScript(play, D_80BAE820, &scheduleOutput) || @@ -1280,14 +1281,14 @@ void func_80BAD5F8(EnSuttari* this, PlayState* play) { void func_80BAD7F8(EnSuttari* this, PlayState* play) { ScheduleOutput scheduleOutput; s16 curFrame = this->skelAnime.curFrame; - s16 frameCount = Animation_GetLastFrame(sAnimations[this->animationIndex].animation); + s16 frameCount = Animation_GetLastFrame(sAnimationInfo[this->animIndex].animation); if (this->enFsn == NULL) { this->enFsn = (EnFsn*)EnSuttari_GetActorById(play, ACTOR_EN_FSN); } else { - if ((this->flags1 & 0x2000) && (this->animationIndex == 1) && (curFrame == frameCount)) { - this->animationIndex = 2; - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, this->animationIndex); + if ((this->flags1 & 0x2000) && (this->animIndex == 1) && (curFrame == frameCount)) { + this->animIndex = 2; + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, this->animIndex); } this->timePathTimeSpeed = REG(15) + ((void)0, gSaveContext.save.daySpeed); if (!Schedule_RunScript(play, D_80BAE820, &scheduleOutput) || @@ -1329,14 +1330,14 @@ void func_80BADA08(EnSuttari* this, PlayState* play) { void func_80BADA9C(EnSuttari* this, PlayState* play) { u8 talkstate = Message_GetState(&play->msgCtx); s16 curFrame = this->skelAnime.curFrame; - s16 frameCount = Animation_GetLastFrame(sAnimations[this->animationIndex].animation); + s16 frameCount = Animation_GetLastFrame(sAnimationInfo[this->animIndex].animation); if (this->flags1 & 1) { this->unk3F2 = this->headRot.y; func_80BAA9B4(this); - } else if ((this->animationIndex == 7) && (curFrame == frameCount)) { - this->animationIndex = 1; - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, this->animationIndex); + } else if ((this->animIndex == 7) && (curFrame == frameCount)) { + this->animIndex = 1; + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, this->animIndex); } if (talkstate == TEXT_STATE_5) { if (Message_ShouldAdvance(play)) { @@ -1482,11 +1483,11 @@ void EnSuttari_Update(Actor* thisx, PlayState* play) { EnSuttari_UpdateTime(); } if (this->unk428 != 0) { - if (this->animationIndex == 2 || this->animationIndex == 6) { + if (this->animIndex == 2 || this->animIndex == 6) { if (Animation_OnFrame(&this->skelAnime, 8.0f) || Animation_OnFrame(&this->skelAnime, 16.0f)) { Actor_PlaySfxAtPos(&this->actor, NA_SE_EV_PAMERA_WALK); } - } else if (this->animationIndex == 0 || this->animationIndex == 5) { + } else if (this->animIndex == 0 || this->animIndex == 5) { if (Animation_OnFrame(&this->skelAnime, 8.0f) || Animation_OnFrame(&this->skelAnime, 17.0f)) { Actor_PlaySfxAtPos(&this->actor, NA_SE_EV_PAMERA_WALK); } diff --git a/src/overlays/actors/ovl_En_Suttari/z_en_suttari.h b/src/overlays/actors/ovl_En_Suttari/z_en_suttari.h index 2861e5971..35a9b6e2e 100644 --- a/src/overlays/actors/ovl_En_Suttari/z_en_suttari.h +++ b/src/overlays/actors/ovl_En_Suttari/z_en_suttari.h @@ -54,7 +54,7 @@ typedef struct EnSuttari { /* 0x436 */ s16 unk436; /* 0x438 */ Vec3f unk438; /* 0x444 */ Vec3f unk444; - /* 0x450 */ s32 animationIndex; + /* 0x450 */ s32 animIndex; /* 0x454 */ UNK_TYPE1 unk_454[0x2]; /* 0x456 */ s16 cutscenes[2]; /* 0x45A */ s16 cutsceneIdx; diff --git a/src/overlays/actors/ovl_En_Sw/z_en_sw.c b/src/overlays/actors/ovl_En_Sw/z_en_sw.c index 35893a1f0..a69cbe213 100644 --- a/src/overlays/actors/ovl_En_Sw/z_en_sw.c +++ b/src/overlays/actors/ovl_En_Sw/z_en_sw.c @@ -134,7 +134,7 @@ static DamageTable sDamageTable2 = { /* Powder Keg */ DMG_ENTRY(1, 0x0), }; -static AnimationInfoS sAnimations[] = { +static AnimationInfoS sAnimationInfo[] = { { &object_st_Anim_000304, 1.0f, 0, -1, ANIMMODE_ONCE_INTERP, 0 }, { &object_st_Anim_000304, 1.0f, 0, -1, ANIMMODE_ONCE_INTERP, -4 }, { &object_st_Anim_0055A8, 1.0f, 0, -1, ANIMMODE_LOOP_INTERP, -4 }, @@ -678,7 +678,7 @@ s32 func_808DA08C(EnSw* this, PlayState* play) { Enemy_StartFinishingBlow(play, &this->actor); this->actor.flags &= ~ACTOR_FLAG_1; if (!ENSW_GET_3(&this->actor)) { - SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimations, 3); + SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimationInfo, 3); } switch (this->actor.colChkInfo.damageEffect) { @@ -781,11 +781,10 @@ void func_808DA3F4(EnSw* this, PlayState* play) { func_808D94D0(this, play, 0, 0, temp_s1); } -#ifdef NON_MATCHING void func_808DA578(EnSw* this, PlayState* play) { f32 temp_f0; - s32 test; - s32 test2; + f32 temp; + s16 temp2; Vec3f sp30; if (!Animation_OnFrame(&this->skelAnime, this->skelAnime.endFrame)) { @@ -795,7 +794,8 @@ void func_808DA578(EnSw* this, PlayState* play) { if ((this->actor.speedXZ == 0.0f) && (this->unk_44C != 0.0f)) { Math_Vec3f_Copy(&sp30, &this->unk_374); func_808D9894(this, &sp30); - func_808D94D0(this, play, 0, 0, Math_FAtan2F(sp30.z, sp30.x)); + temp2 = Math_FAtan2F(sp30.z, sp30.x); + func_808D94D0(this, play, 0, 0, temp2); } } else if (this->unk_410 & 0x20) { Math_Vec3f_Copy(&this->unk_374, &this->actor.home.pos); @@ -805,28 +805,18 @@ void func_808DA578(EnSw* this, PlayState* play) { this->skelAnime.curFrame = 0.0f; } - temp_f0 = Math_Vec3f_DistXYZ(&this->actor.world.pos, &this->unk_374); - if (!(this->unk_410 & 0x20)) { - test = this->unk_414; - test2 = temp_f0; - if ((test != 0) && (test < test2)) { - this->unk_410 |= 0x20; - } + temp = Math_Vec3f_DistXYZ(&this->actor.world.pos, &this->unk_374); + if (!(this->unk_410 & 0x20) && ((s32)this->unk_414 != 0) && ((s32)this->unk_414 < (s32)temp)) { + this->unk_410 |= 0x20; } - this->unk_414 = temp_f0; + this->unk_414 = temp; } -#else -void func_808DA578(EnSw* this, PlayState* play); -#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Sw/func_808DA578.s") -#endif -#ifdef NON_MATCHING void func_808DA6FC(EnSw* this, PlayState* play) { f32 sp4C; - s32 temp; - s32 temp2; - Vec3f sp38; f32 temp_f0; + s16 temp2; + Vec3f sp38; if (!Animation_OnFrame(&this->skelAnime, this->skelAnime.endFrame)) { temp_f0 = this->skelAnime.endFrame - this->skelAnime.curFrame; @@ -835,7 +825,8 @@ void func_808DA6FC(EnSw* this, PlayState* play) { if ((this->actor.speedXZ == 0.0f) && (this->unk_44C != 0.0f)) { Math_Vec3f_Copy(&sp38, &this->unk_374); func_808D9894(this, &sp38); - func_808D94D0(this, play, 0, 0, Math_FAtan2F(sp38.z, sp38.x)); + temp2 = Math_FAtan2F(sp38.z, sp38.x); + func_808D94D0(this, play, 0, 0, temp2); } } else { Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_STALWALL_DASH); @@ -843,9 +834,8 @@ void func_808DA6FC(EnSw* this, PlayState* play) { } sp4C = Math_Vec3f_DistXYZ(&this->actor.world.pos, &this->unk_374); - temp = this->unk_414; - temp2 = sp4C; - if ((temp != 0) && (temp < temp2)) { + + if (((s32)this->unk_414 != 0) && ((s32)this->unk_414 < (s32)sp4C)) { Math_Vec3f_Copy(&this->actor.world.pos, &this->unk_374); this->unk_454 = Rand_S16Offset(20, 20); this->unk_456 = (Rand_ZeroOne() * 10.0f) + 3.0f; @@ -854,10 +844,6 @@ void func_808DA6FC(EnSw* this, PlayState* play) { } this->unk_414 = sp4C; } -#else -void func_808DA6FC(EnSw* this, PlayState* play); -#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Sw/func_808DA6FC.s") -#endif void func_808DA89C(EnSw* this, PlayState* play) { if (this->drawDmgEffType == ACTOR_DRAW_DMGEFF_FROZEN_NO_SFX) { @@ -966,15 +952,13 @@ void func_808DAA60(EnSw* this, PlayState* play) { func_808D94D0(this, play, 0, 0, sp40); } -#ifdef NON_MATCHING void func_808DACF4(EnSw* this, PlayState* play) { f32 sp4C; - f32 temp_f0; - s32 temp_f6; + f32 temp; + s16 temp_f6; if (Animation_OnFrame(&this->skelAnime, this->skelAnime.endFrame) == 0) { Vec3f sp38; - f32 temp; temp = this->skelAnime.endFrame - this->skelAnime.curFrame; this->unk_44C = 0.1f * temp; @@ -983,7 +967,8 @@ void func_808DACF4(EnSw* this, PlayState* play) { Math_Vec3f_Copy(&sp38, &this->unk_374); func_808D9894(this, &sp38); - func_808D94D0(this, play, 0, 0, Math_FAtan2F(sp38.z, sp38.x)); + temp_f6 = Math_FAtan2F(sp38.z, sp38.x); + func_808D94D0(this, play, 0, 0, temp_f6); } } else { Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_STALWALL_DASH); @@ -991,8 +976,8 @@ void func_808DACF4(EnSw* this, PlayState* play) { } sp4C = Math_Vec3f_DistXYZ(&this->actor.world.pos, &this->unk_374); - temp_f6 = this->unk_414; - if ((temp_f6 != 0) && (temp_f6 < (s32)sp4C)) { + + if (((s32)this->unk_414 != 0) && ((s32)this->unk_414 < (s32)sp4C)) { Math_Vec3f_Copy(&this->actor.world.pos, &this->unk_374); this->unk_4A0 += this->unk_49C; if ((this->unk_4A0 >= this->unk_1E4->count) || (this->unk_4A0 < 0)) { @@ -1009,10 +994,6 @@ void func_808DACF4(EnSw* this, PlayState* play) { } this->unk_414 = sp4C; } -#else -void func_808DACF4(EnSw* this, PlayState* play); -#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Sw/func_808DACF4.s") -#endif void func_808DAEB4(EnSw* this, PlayState* play) { Vec3f sp5C; @@ -1158,7 +1139,7 @@ void EnSw_Init(Actor* thisx, PlayState* play) { if (!func_808D9968(this, play)) { ActorShape_Init(&this->actor.shape, 0.0f, NULL, 0.0f); SkelAnime_Init(play, &this->skelAnime, &object_st_Skel_005298, NULL, this->jointTable, this->morphTable, 30); - SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimations, 0); + SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimationInfo, 0); this->skelAnime.playSpeed = 4.0f; Collider_InitAndSetSphere(play, &this->collider, &this->actor, &sSphereInit); diff --git a/src/overlays/actors/ovl_En_Syateki_Dekunuts/z_en_syateki_dekunuts.c b/src/overlays/actors/ovl_En_Syateki_Dekunuts/z_en_syateki_dekunuts.c index d9ae07847..cebaafb44 100644 --- a/src/overlays/actors/ovl_En_Syateki_Dekunuts/z_en_syateki_dekunuts.c +++ b/src/overlays/actors/ovl_En_Syateki_Dekunuts/z_en_syateki_dekunuts.c @@ -68,7 +68,7 @@ static ColliderCylinderInit sCylinderInit = { static Cylinder16 D_80A2CADC[] = { { 24, 40, 0, { 0, 0, 0 } } }; -static AnimationInfo sAnimations[] = { +static AnimationInfo sAnimationInfo[] = { { &gDekuScrubUpAnim, 1.0f, 0.0f, 0.0f, ANIMMODE_ONCE, -1.0f }, { &gDekuScrubBurrowAnim, 1.0f, 0.0f, 0.0f, ANIMMODE_ONCE, -1.0f }, { &gDekuScrubIdleAnim, 1.0f, 0.0f, 0.0f, ANIMMODE_LOOP, -1.0f }, @@ -231,7 +231,7 @@ void func_80A2C168(EnSyatekiDekunuts* this, PlayState* play) { void func_80A2C1AC(EnSyatekiDekunuts* this) { Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_NUTS_UP); - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, 0); + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, 0); this->actor.shape.rot.y = this->actor.yawTowardsPlayer; this->actor.world.rot.y = this->actor.yawTowardsPlayer; this->actionFunc = func_80A2C208; @@ -250,7 +250,7 @@ void func_80A2C208(EnSyatekiDekunuts* this, PlayState* play) { } void func_80A2C27C(EnSyatekiDekunuts* this) { - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, 3); + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, 3); if (EN_SYATEKI_DEKUNUTS_GET_PARAM_F(&this->actor) != 1) { this->actionFunc = func_80A2C2E0; } else { @@ -281,7 +281,7 @@ void func_80A2C33C(EnSyatekiDekunuts* this, PlayState* play) { } void func_80A2C3AC(EnSyatekiDekunuts* this) { - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, 1); + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, 1); this->actionFunc = func_80A2C3F0; } @@ -330,7 +330,7 @@ void func_80A2C4D0(EnSyatekiDekunuts* this, PlayState* play) { Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_NUTS_DAMAGE); this->unk_1E2 = 0; - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, 4); + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, 4); this->unk_1D8 = 160; this->actionFunc = func_80A2C5DC; } @@ -342,7 +342,7 @@ void func_80A2C5DC(EnSyatekiDekunuts* this, PlayState* play) { if (Animation_OnFrame(&this->skelAnime, this->skelAnime.endFrame)) { if (this->unk_1D8 == 160) { - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, 5); + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, 5); Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_NUTS_DEAD); this->unk_1D8--; } else if (this->unk_1D8 < 160) { diff --git a/src/overlays/actors/ovl_En_Syateki_Man/z_en_syateki_man.c b/src/overlays/actors/ovl_En_Syateki_Man/z_en_syateki_man.c index 5e157fe77..9b6cc24d3 100644 --- a/src/overlays/actors/ovl_En_Syateki_Man/z_en_syateki_man.c +++ b/src/overlays/actors/ovl_En_Syateki_Man/z_en_syateki_man.c @@ -72,12 +72,12 @@ const ActorInit En_Syateki_Man_InitVars = { }; typedef enum { - /* 0 */ EN_SYATEKI_MAN_ANIMATION_HANDS_ON_TABLE, - /* 1 */ EN_SYATEKI_MAN_ANIMATION_SWAMP_HEAD_SCRATCH_LOOP, - /* 2 */ EN_SYATEKI_MAN_ANIMATION_SWAMP_HEAD_SCRATCH_END, -} EnSyatekiManAnimationIndex; + /* 0 */ EN_SYATEKI_MAN_ANIM_HANDS_ON_TABLE, + /* 1 */ EN_SYATEKI_MAN_ANIM_SWAMP_HEAD_SCRATCH_LOOP, + /* 2 */ EN_SYATEKI_MAN_ANIM_SWAMP_HEAD_SCRATCH_END, +} EnSyatekiManAnimation; -static AnimationInfo sAnimations[] = { +static AnimationInfo sAnimationInfo[] = { { &gBurlyGuyHandsOnTableAnim, 1.0f, 0.0f, 0.0f, ANIMMODE_LOOP, -8.0f }, { &gSwampShootingGalleryManHeadScratchLoopAnim, 1.0f, 0.0f, 0.0f, ANIMMODE_LOOP, -8.0f }, { &gSwampShootingGalleryManHeadScratchEndAnim, 1.0f, 0.0f, 0.0f, ANIMMODE_ONCE, -8.0f }, @@ -260,7 +260,7 @@ void EnSyatekiMan_Swamp_Idle(EnSyatekiMan* this, PlayState* play) { if (Actor_ProcessTalkRequest(&this->actor, &play->state)) { u16 faceReactionTextId; - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, EN_SYATEKI_MAN_ANIMATION_SWAMP_HEAD_SCRATCH_END); + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, EN_SYATEKI_MAN_ANIM_SWAMP_HEAD_SCRATCH_END); faceReactionTextId = Text_GetFaceReaction(play, 0x31); if (faceReactionTextId != 0) { Message_StartTextbox(play, faceReactionTextId, &this->actor); @@ -479,7 +479,7 @@ void EnSyatekiMan_Swamp_Talk(EnSyatekiMan* this, PlayState* play) { if (this->skelAnime.animation == &gSwampShootingGalleryManHeadScratchEndAnim) { if (Animation_OnFrame(&this->skelAnime, this->skelAnime.endFrame)) { - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, EN_SYATEKI_MAN_ANIMATION_HANDS_ON_TABLE); + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, EN_SYATEKI_MAN_ANIM_HANDS_ON_TABLE); } } } @@ -899,7 +899,7 @@ void EnSyatekiMan_Swamp_GiveReward(EnSyatekiMan* this, PlayState* play) { this->shootingGameState = SG_GAME_STATE_NONE; this->actionFunc = EnSyatekiMan_Swamp_Talk; } else { - func_800B85E0(&this->actor, play, 500.0f, EXCH_ITEM_MINUS1); + func_800B85E0(&this->actor, play, 500.0f, PLAYER_AP_MINUS1); } } @@ -963,7 +963,7 @@ void EnSyatekiMan_Town_GiveReward(EnSyatekiMan* this, PlayState* play) { this->shootingGameState = SG_GAME_STATE_NONE; this->actionFunc = EnSyatekiMan_Town_Talk; } else { - func_800B85E0(&this->actor, play, 500.0f, EXCH_ITEM_MINUS1); + func_800B85E0(&this->actor, play, 500.0f, PLAYER_AP_MINUS1); } } diff --git a/src/overlays/actors/ovl_En_Syateki_Okuta/z_en_syateki_okuta.c b/src/overlays/actors/ovl_En_Syateki_Okuta/z_en_syateki_okuta.c index eda6337a0..9077b38c4 100644 --- a/src/overlays/actors/ovl_En_Syateki_Okuta/z_en_syateki_okuta.c +++ b/src/overlays/actors/ovl_En_Syateki_Okuta/z_en_syateki_okuta.c @@ -60,7 +60,7 @@ static ColliderCylinderInit sCylinderInit = { { 20, 40, -30, { 0, 0, 0 } }, }; -static AnimationInfo sAnimations[] = { +static AnimationInfo sAnimationInfo[] = { { &gOctorokShootAnim, 1.0f, 0.0f, 0.0f, ANIMMODE_ONCE, -1.0f }, { &gOctorokDieAnim, 1.0f, 0.0f, 0.0f, ANIMMODE_ONCE, -1.0f }, { &gOctorokHideAnim, 1.0f, 0.0f, 0.0f, ANIMMODE_ONCE, -1.0f }, @@ -185,7 +185,7 @@ void func_80A36350(EnSyatekiOkuta* this, PlayState* play) { void func_80A36360(EnSyatekiOkuta* this) { this->actor.draw = EnSyatekiOkuta_Draw; this->unk_2AA = 0; - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, 4); + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, 4); this->actionFunc = func_80A363B4; } @@ -205,7 +205,7 @@ void func_80A363B4(EnSyatekiOkuta* this, PlayState* play) { } void func_80A36444(EnSyatekiOkuta* this) { - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, 3); + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, 3); this->actionFunc = func_80A36488; } @@ -218,7 +218,7 @@ void func_80A36488(EnSyatekiOkuta* this, PlayState* play) { } void func_80A364C0(EnSyatekiOkuta* this) { - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, 2); + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, 2); this->actionFunc = func_80A36504; } @@ -238,7 +238,7 @@ void func_80A3657C(EnSyatekiOkuta* this) { Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_OCTAROCK_DEAD1); } - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, 1); + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, 1); this->actionFunc = func_80A365EC; } diff --git a/src/overlays/actors/ovl_En_Syateki_Wf/z_en_syateki_wf.c b/src/overlays/actors/ovl_En_Syateki_Wf/z_en_syateki_wf.c index 7c6073bb2..d15859a74 100644 --- a/src/overlays/actors/ovl_En_Syateki_Wf/z_en_syateki_wf.c +++ b/src/overlays/actors/ovl_En_Syateki_Wf/z_en_syateki_wf.c @@ -113,7 +113,7 @@ const ActorInit En_Syateki_Wf_InitVars = { (ActorFunc)EnSyatekiWf_Draw, }; -static AnimationInfo sAnimations[] = { +static AnimationInfo sAnimationInfo[] = { { &gWolfosWaitingAnim, 2.0f, 0.0f, 0.0f, ANIMMODE_LOOP, -1.0f }, { &gWolfosRunningAnim, 1.0f, 0.0f, 0.0f, ANIMMODE_LOOP, -8.0f }, { &gWolfosRunningAnim, 1.0f, 0.0f, 4.0f, ANIMMODE_ONCE, 1.0f }, @@ -257,7 +257,7 @@ void func_80A20320(EnSyatekiWf* this, PlayState* play) { } void func_80A20378(EnSyatekiWf* this) { - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, 1); + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, 1); this->actor.speedXZ = 10.0f; this->actor.world.rot.y = this->actor.shape.rot.y; this->actor.draw = EnSyatekiWf_Draw; @@ -328,7 +328,7 @@ void func_80A20670(EnSyatekiWf* this) { Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_TEKU_JUMP); this->actor.velocity.y = 20.0f; this->actor.speedXZ = 5.0f; - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, 2); + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, 2); this->actionFunc = func_80A206DC; } @@ -340,7 +340,7 @@ void func_80A206DC(EnSyatekiWf* this, PlayState* play) { void func_80A20710(EnSyatekiWf* this) { this->actor.speedXZ = 0.0f; - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, 3); + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, 3); this->actionFunc = func_80A2075C; } @@ -354,7 +354,7 @@ void func_80A2079C(EnSyatekiWf* this) { this->unk_29A = 40; this->actor.speedXZ = 0.0f; Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_WOLFOS_APPEAR); - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, 5); + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, 5); this->actionFunc = func_80A20800; } @@ -374,7 +374,7 @@ void func_80A20858(EnSyatekiWf* this, PlayState* play) { this->actor.speedXZ = 0.0f; EffectSsExtra_Spawn(play, &this->actor.world.pos, &D_80A20EDC, &D_80A20EE8, 5, 2); Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_WOLFOS_DEAD); - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, 6); + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, 6); syatekiMan->score += 100; this->actionFunc = func_80A208F8; } diff --git a/src/overlays/actors/ovl_En_Tab/z_en_tab.c b/src/overlays/actors/ovl_En_Tab/z_en_tab.c index 7d2bbb9bb..860ad9d0c 100644 --- a/src/overlays/actors/ovl_En_Tab/z_en_tab.c +++ b/src/overlays/actors/ovl_En_Tab/z_en_tab.c @@ -552,7 +552,7 @@ void EnTab_Update(Actor* thisx, PlayState* play) { radius = this->collider.dim.radius + this->unk_30C; height = this->collider.dim.height + 10; - func_8013C964(&this->actor, play, radius, height, EXCH_ITEM_NONE, this->unk_2FC & 7); + func_8013C964(&this->actor, play, radius, height, PLAYER_AP_NONE, this->unk_2FC & 7); Actor_MoveWithGravity(&this->actor); Actor_UpdateBgCheckInfo(play, &this->actor, 30.0f, 12.0f, 0.0f, 4); func_80BE0620(this, play); diff --git a/src/overlays/actors/ovl_En_Talk_Gibud/z_en_talk_gibud.c b/src/overlays/actors/ovl_En_Talk_Gibud/z_en_talk_gibud.c index fff6d29fa..f1268e1e0 100644 --- a/src/overlays/actors/ovl_En_Talk_Gibud/z_en_talk_gibud.c +++ b/src/overlays/actors/ovl_En_Talk_Gibud/z_en_talk_gibud.c @@ -75,21 +75,21 @@ typedef enum { } EnTalkGibudRequestedItemIndex; typedef enum { - /* 0 */ EN_TALK_GIBUD_ANIMATION_GRAB_ATTACK, - /* 1 */ EN_TALK_GIBUD_ANIMATION_GRAB_END, - /* 2 */ EN_TALK_GIBUD_ANIMATION_GRAB_START, - /* 3 */ EN_TALK_GIBUD_ANIMATION_LOOK_BACK, - /* 4 */ EN_TALK_GIBUD_ANIMATION_CROUCH_WIPING_TEARS, - /* 5 */ EN_TALK_GIBUD_ANIMATION_CROUCH_CRYING, - /* 6 */ EN_TALK_GIBUD_ANIMATION_DEATH, - /* 7 */ EN_TALK_GIBUD_ANIMATION_DAMAGE, - /* 8 */ EN_TALK_GIBUD_ANIMATION_CROUCH_END, - /* 9 */ EN_TALK_GIBUD_ANIMATION_IDLE, - /* 10 */ EN_TALK_GIBUD_ANIMATION_WALK, - /* 11 */ EN_TALK_GIBUD_ANIMATION_DANCE_SQUAT, - /* 12 */ EN_TALK_GIBUD_ANIMATION_DANCE_PIROUETTE, - /* 13 */ EN_TALK_GIBUD_ANIMATION_DANCE_CLAP, -} EnTalkGibudAnimations; + /* 0 */ EN_TALK_GIBUD_ANIM_GRAB_ATTACK, + /* 1 */ EN_TALK_GIBUD_ANIM_GRAB_END, + /* 2 */ EN_TALK_GIBUD_ANIM_GRAB_START, + /* 3 */ EN_TALK_GIBUD_ANIM_LOOK_BACK, + /* 4 */ EN_TALK_GIBUD_ANIM_CROUCH_WIPING_TEARS, + /* 5 */ EN_TALK_GIBUD_ANIM_CROUCH_CRYING, + /* 6 */ EN_TALK_GIBUD_ANIM_DEATH, + /* 7 */ EN_TALK_GIBUD_ANIM_DAMAGE, + /* 8 */ EN_TALK_GIBUD_ANIM_CROUCH_END, + /* 9 */ EN_TALK_GIBUD_ANIM_IDLE, + /* 10 */ EN_TALK_GIBUD_ANIM_WALK, + /* 11 */ EN_TALK_GIBUD_ANIM_DANCE_SQUAT, + /* 12 */ EN_TALK_GIBUD_ANIM_DANCE_PIROUETTE, + /* 13 */ EN_TALK_GIBUD_ANIM_DANCE_CLAP, +} EnTalkGibudAnimation; typedef enum { /* 0 */ EN_TALK_GIBUD_TYPE_GIBDO, @@ -114,7 +114,7 @@ const ActorInit En_Talk_Gibud_InitVars = { (ActorFunc)EnTalkGibud_Draw, }; -static AnimationInfo sAnimations[] = { +static AnimationInfo sAnimationInfo[] = { { &gGibdoRedeadGrabAttackAnim, 1.0f, 0.0f, 0.0f, ANIMMODE_LOOP, -8.0f }, { &gGibdoRedeadGrabEndAnim, 0.5f, 0.0f, 0.0f, ANIMMODE_ONCE_INTERP, 0.0f }, { &gGibdoRedeadGrabStartAnim, 1.0f, 0.0f, 0.0f, ANIMMODE_ONCE, -8.0f }, @@ -282,7 +282,7 @@ void EnTalkGibud_Destroy(Actor* thisx, PlayState* play) { } void EnTalkGibud_SetupIdle(EnTalkGibud* this) { - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, EN_TALK_GIBUD_ANIMATION_IDLE); + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, EN_TALK_GIBUD_ANIM_IDLE); this->actionFunc = EnTalkGibud_Idle; } @@ -300,7 +300,7 @@ void EnTalkGibud_Idle(EnTalkGibud* this, PlayState* play) { } void EnTalkGibud_SetupAttemptPlayerFreeze(EnTalkGibud* this) { - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, EN_TALK_GIBUD_ANIMATION_IDLE); + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, EN_TALK_GIBUD_ANIM_IDLE); this->actionFunc = EnTalkGibud_AttemptPlayerFreeze; } @@ -321,7 +321,7 @@ void EnTalkGibud_AttemptPlayerFreeze(EnTalkGibud* this, PlayState* play) { } void EnTalkGibud_SetupWalkToPlayer(EnTalkGibud* this) { - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, EN_TALK_GIBUD_ANIMATION_WALK); + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, EN_TALK_GIBUD_ANIM_WALK); this->actor.speedXZ = 0.4f; if (this->actionFunc == EnTalkGibud_AttemptPlayerFreeze) { @@ -381,7 +381,7 @@ void EnTalkGibud_WalkToPlayer(EnTalkGibud* this, PlayState* play) { } void EnTalkGibud_SetupGrab(EnTalkGibud* this) { - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, EN_TALK_GIBUD_ANIMATION_GRAB_START); + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, EN_TALK_GIBUD_ANIM_GRAB_START); this->grabDamageTimer = 0; this->actor.flags &= ~ACTOR_FLAG_1; this->grabState = EN_TALK_GIBUD_GRAB_START; @@ -399,7 +399,7 @@ void EnTalkGibud_Grab(EnTalkGibud* this, PlayState* play) { inPositionToAttack = EnTalkGibud_MoveToIdealGrabPositionAndRotation(this, play); if (Animation_OnFrame(&this->skelAnime, this->skelAnime.endFrame) && (inPositionToAttack == true)) { this->grabState = EN_TALK_GIBUD_GRAB_ATTACK; - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, EN_TALK_GIBUD_ANIMATION_GRAB_ATTACK); + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, EN_TALK_GIBUD_ANIM_GRAB_ATTACK); } break; @@ -426,7 +426,7 @@ void EnTalkGibud_Grab(EnTalkGibud* this, PlayState* play) { player->unk_AE8 = 100; } - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, EN_TALK_GIBUD_ANIMATION_GRAB_END); + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, EN_TALK_GIBUD_ANIM_GRAB_END); this->actor.flags |= ACTOR_FLAG_1; this->grabState = EN_TALK_GIBUD_GRAB_RELEASE; this->grabDamageTimer = 0; @@ -446,7 +446,7 @@ void EnTalkGibud_Grab(EnTalkGibud* this, PlayState* play) { } void EnTalkGibud_SetupGrabFail(EnTalkGibud* this) { - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, EN_TALK_GIBUD_ANIMATION_DAMAGE); + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, EN_TALK_GIBUD_ANIM_DAMAGE); Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_REDEAD_DAMAGE); this->actor.speedXZ = -2.0f; this->actionFunc = EnTalkGibud_GrabFail; @@ -468,7 +468,7 @@ void EnTalkGibud_GrabFail(EnTalkGibud* this, PlayState* play) { void EnTalkGibud_SetupTurnAwayAndShakeHead(EnTalkGibud* this) { this->headShakeTimer = 0; - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, EN_TALK_GIBUD_ANIMATION_WALK); + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, EN_TALK_GIBUD_ANIM_WALK); this->actionFunc = EnTalkGibud_TurnAwayAndShakeHead; } @@ -486,7 +486,7 @@ void EnTalkGibud_TurnAwayAndShakeHead(EnTalkGibud* this, PlayState* play) { } void EnTalkGibud_SetupWalkToHome(EnTalkGibud* this) { - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, EN_TALK_GIBUD_ANIMATION_WALK); + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, EN_TALK_GIBUD_ANIM_WALK); this->actor.speedXZ = 0.4f; this->actionFunc = EnTalkGibud_WalkToHome; } @@ -547,7 +547,7 @@ void EnTalkGibud_Stunned(EnTalkGibud* this, PlayState* play) { } void EnTalkGibud_SetupDamage(EnTalkGibud* this) { - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, EN_TALK_GIBUD_ANIMATION_DAMAGE); + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, EN_TALK_GIBUD_ANIM_DAMAGE); Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_REDEAD_DAMAGE); this->stunTimer = 0; this->grabWaitTimer = 0; @@ -583,7 +583,7 @@ void EnTalkGibud_Damage(EnTalkGibud* this, PlayState* play) { } void EnTalkGibud_SetupDead(EnTalkGibud* this) { - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, EN_TALK_GIBUD_ANIMATION_DEATH); + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, EN_TALK_GIBUD_ANIM_DEATH); this->actor.flags &= ~ACTOR_FLAG_1; Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_REDEAD_DEAD); this->deathTimer = 0; @@ -761,7 +761,7 @@ void EnTalkGibud_CheckPresentedItem(EnTalkGibud* this, PlayState* play) { void EnTalkGibud_SetupPassiveIdle(EnTalkGibud* this) { this->isTalking = false; if (this->actionFunc != EnTalkGibud_Talk) { - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, EN_TALK_GIBUD_ANIMATION_IDLE); + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, EN_TALK_GIBUD_ANIM_IDLE); } this->actionFunc = EnTalkGibud_PassiveIdle; } @@ -842,7 +842,7 @@ void EnTalkGibud_Talk(EnTalkGibud* this, PlayState* play) { } void EnTalkGibud_SetupDisappear(EnTalkGibud* this) { - Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimations, EN_TALK_GIBUD_ANIMATION_IDLE); + Actor_ChangeAnimationByInfo(&this->skelAnime, sAnimationInfo, EN_TALK_GIBUD_ANIM_IDLE); this->actor.flags &= ~ACTOR_FLAG_1; this->disappearanceTimer = 40; this->actionFunc = EnTalkGibud_Disappear; diff --git a/src/overlays/actors/ovl_En_Test4/z_en_test4.c b/src/overlays/actors/ovl_En_Test4/z_en_test4.c index 9b2907023..03b836815 100644 --- a/src/overlays/actors/ovl_En_Test4/z_en_test4.c +++ b/src/overlays/actors/ovl_En_Test4/z_en_test4.c @@ -403,8 +403,8 @@ void func_80A42AB8(EnTest4* this, PlayState* play) { func_80A41FA4(this, play); } else { gSaveContext.screenScale = 0.0f; - Play_SetRespawnData(&play->state, RESPAWN_MODE_DOWN, Entrance_CreateIndexFromSpawn(0), - player->unk_3CE, 0xBFF, &player->unk_3C0, player->unk_3CC); + Play_SetRespawnData(&play->state, RESPAWN_MODE_DOWN, Entrance_CreateFromSpawn(0), player->unk_3CE, + 0xBFF, &player->unk_3C0, player->unk_3CC); func_80169EFC(&play->state); if (player->stateFlags1 & 0x800000) { EnHorse* rideActor = (EnHorse*)player->rideActor; @@ -445,20 +445,20 @@ void func_80A42AB8(EnTest4* this, PlayState* play) { ((gSaveContext.save.inventory.items[SLOT_OCARINA] == ITEM_NONE) || (play->sceneNum == SCENE_CLOCKTOWER))) { s32 playerParams; - u32 entranceIndex = gSaveContext.save.entranceIndex; + u32 entrance = gSaveContext.save.entrance; if (play->actorCtx.unk5 & 2) { playerParams = 0xCFF; } else { playerParams = 0xBFF; } - Play_SetRespawnData(&play->state, RESPAWN_MODE_RETURN, entranceIndex, player->unk_3CE, playerParams, + Play_SetRespawnData(&play->state, RESPAWN_MODE_RETURN, entrance, player->unk_3CE, playerParams, &player->unk_3C0, player->unk_3CC); if ((play->sceneNum == SCENE_TENMON_DAI) || (play->sceneNum == SCENE_00KEIKOKU)) { - play->nextEntranceIndex = 0x5400; + play->nextEntrance = ENTRANCE(TERMINA_FIELD, 0); } else { - play->nextEntranceIndex = 0xD800; + play->nextEntrance = ENTRANCE(SOUTH_CLOCK_TOWN, 0); } gSaveContext.nextCutsceneIndex = 0xFFF1; play->transitionTrigger = TRANS_TRIGGER_START; diff --git a/src/overlays/actors/ovl_En_Test6/z_en_test6.c b/src/overlays/actors/ovl_En_Test6/z_en_test6.c index 17587b32a..82af65e3c 100644 --- a/src/overlays/actors/ovl_En_Test6/z_en_test6.c +++ b/src/overlays/actors/ovl_En_Test6/z_en_test6.c @@ -593,9 +593,9 @@ void func_80A91760(EnTest6* this, PlayState* play) { (CHECK_BTN_ALL(input->press.button, BTN_A) || CHECK_BTN_ALL(input->press.button, BTN_B))) { this->unk_286 = 1; if (ENTEST6_GET(&this->actor) == ENTEST6_25) { - Audio_StopSfxById(NA_SE_SY_TIME_CONTROL_SLOW); + AudioSfx_StopById(NA_SE_SY_TIME_CONTROL_SLOW); } else if (ENTEST6_GET(&this->actor) == ENTEST6_24) { - Audio_StopSfxById(NA_SE_SY_TIME_CONTROL_NORMAL); + AudioSfx_StopById(NA_SE_SY_TIME_CONTROL_NORMAL); } } @@ -976,11 +976,11 @@ void func_80A92950(EnTest6* this, PlayState* play) { return; case 9: - Play_SetRespawnData(&play->state, 1, ((void)0, gSaveContext.save.entranceIndex & 0xFFFF), - player->unk_3CE, 0xBFF, &player->unk_3C0, player->unk_3CC); + Play_SetRespawnData(&play->state, 1, ((void)0, gSaveContext.save.entrance & 0xFFFF), player->unk_3CE, + 0xBFF, &player->unk_3C0, player->unk_3CC); this->unk_276 = 99; play->transitionTrigger = TRANS_TRIGGER_START; - play->nextEntranceIndex = gSaveContext.respawn[RESPAWN_MODE_RETURN].entranceIndex; + play->nextEntrance = gSaveContext.respawn[RESPAWN_MODE_RETURN].entrance; play->transitionType = TRANS_TYPE_02; if ((gSaveContext.save.time > CLOCK_TIME(18, 0)) || (gSaveContext.save.time < CLOCK_TIME(6, 0))) { gSaveContext.respawnFlag = -0x63; @@ -1057,11 +1057,11 @@ void func_80A92950(EnTest6* this, PlayState* play) { case 9: if (gSaveContext.save.time > CLOCK_TIME(12, 0)) { - Play_SetRespawnData(&play->state, 1, ((void)0, gSaveContext.save.entranceIndex & 0xFFFF), + Play_SetRespawnData(&play->state, 1, ((void)0, gSaveContext.save.entrance & 0xFFFF), player->unk_3CE, 0xBFF, &player->unk_3C0, player->unk_3CC); this->unk_276 = 99; play->transitionTrigger = TRANS_TRIGGER_START; - play->nextEntranceIndex = gSaveContext.respawn[RESPAWN_MODE_RETURN].entranceIndex; + play->nextEntrance = gSaveContext.respawn[RESPAWN_MODE_RETURN].entrance; play->transitionType = TRANS_TYPE_02; gSaveContext.respawnFlag = 2; play->msgCtx.ocarinaMode = 4; diff --git a/src/overlays/actors/ovl_En_Test7/z_en_test7.c b/src/overlays/actors/ovl_En_Test7/z_en_test7.c index b9b62e9f7..ed9d2870c 100644 --- a/src/overlays/actors/ovl_En_Test7/z_en_test7.c +++ b/src/overlays/actors/ovl_En_Test7/z_en_test7.c @@ -638,7 +638,11 @@ void func_80AF2318(EnTest7* this, PlayState* play) { } u16 D_80AF343C[] = { - 0x68B0, 0x6A60, 0xB230, 0x9A80, 0xD890, 0x3E40, 0x8640, 0x84A0, 0x2040, 0xAA30, + ENTRANCE(GREAT_BAY_COAST, 11), ENTRANCE(ZORA_CAPE, 6), + ENTRANCE(SNOWHEAD, 3), ENTRANCE(MOUNTAIN_VILLAGE_WINTER, 8), + ENTRANCE(SOUTH_CLOCK_TOWN, 9), ENTRANCE(MILK_ROAD, 4), + ENTRANCE(WOODFALL, 4), ENTRANCE(SOUTHERN_SWAMP_POISONED, 10), + ENTRANCE(IKANA_CANYON, 4), ENTRANCE(STONE_TOWER, 3), }; void func_80AF2350(EnTest7* this, PlayState* play) { @@ -655,17 +659,19 @@ void func_80AF2350(EnTest7* this, PlayState* play) { this->unk_148.unk_10 -= 0x2EE0; if (play->sceneNum == SCENE_SECOM) { - play->nextEntranceIndex = 0x2060; + play->nextEntrance = ENTRANCE(IKANA_CANYON, 6); } else if (ENTEST7_GET(&this->actor) == ENTEST7_26) { func_80169F78(&play->state); - gSaveContext.respawn[2].playerParams = (gSaveContext.respawn[2].playerParams & 0xFF) | 0x600; + gSaveContext.respawn[RESPAWN_MODE_TOP].playerParams = + (gSaveContext.respawn[RESPAWN_MODE_TOP].playerParams & 0xFF) | 0x600; gSaveContext.respawnFlag = -6; } else { - play->nextEntranceIndex = D_80AF343C[ENTEST7_GET(&this->actor) - ENTEST7_1C]; - if ((play->nextEntranceIndex == 0x84A0) && (gSaveContext.save.weekEventReg[20] & 2)) { - play->nextEntranceIndex = 0xCA0; - } else if ((play->nextEntranceIndex == 0x9A80) && (gSaveContext.save.weekEventReg[33] & 0x80)) { - play->nextEntranceIndex = 0xAE80; + play->nextEntrance = D_80AF343C[ENTEST7_GET(&this->actor) - ENTEST7_1C]; + if ((play->nextEntrance == ENTRANCE(SOUTHERN_SWAMP_POISONED, 10)) && (gSaveContext.save.weekEventReg[20] & 2)) { + play->nextEntrance = ENTRANCE(SOUTHERN_SWAMP_CLEARED, 10); + } else if ((play->nextEntrance == ENTRANCE(MOUNTAIN_VILLAGE_WINTER, 8)) && + (gSaveContext.save.weekEventReg[33] & 0x80)) { + play->nextEntrance = ENTRANCE(MOUNTAIN_VILLAGE_SPRING, 8); } } diff --git a/src/overlays/actors/ovl_En_Thiefbird/z_en_thiefbird.c b/src/overlays/actors/ovl_En_Thiefbird/z_en_thiefbird.c index 849795b06..03c7d0e1d 100644 --- a/src/overlays/actors/ovl_En_Thiefbird/z_en_thiefbird.c +++ b/src/overlays/actors/ovl_En_Thiefbird/z_en_thiefbird.c @@ -5,7 +5,6 @@ */ #include "z_en_thiefbird.h" -#include "objects/object_thiefbird/object_thiefbird.h" #define FLAGS (ACTOR_FLAG_1 | ACTOR_FLAG_4 | ACTOR_FLAG_200 | ACTOR_FLAG_1000 | ACTOR_FLAG_80000000) @@ -150,8 +149,8 @@ void EnThiefbird_Init(Actor* thisx, PlayState* play) { ColliderJntSphElementDim* dim; Actor_ProcessInitChain(&this->actor, sInitChain); - SkelAnime_InitFlex(play, &this->skelAnime, &object_thiefbird_Skel_0061A0, &object_thiefbird_Anim_000604, - this->jointTable, this->morphTable, 17); + SkelAnime_InitFlex(play, &this->skelAnime, &gTakkuriSkel, &gTakkuriFlyAnim, this->jointTable, this->morphTable, + TAKKURI_LIMB_MAX); Collider_InitAndSetJntSph(play, &this->collider, &this->actor, &sJntSphInit, this->colliderElements); for (i = 0; i < ARRAY_COUNT(this->colliderElements); i++) { @@ -206,7 +205,7 @@ void func_80C10984(EnThiefbird* this, s32 arg1) { } s32 func_80C10B0C(EnThiefbird* this, PlayState* play) { - static Gfx* D_80C13680[] = { object_thiefbird_DL_004348, object_thiefbird_DL_004B88, object_thiefbird_DL_0055E0 }; + static Gfx* D_80C13680[] = { gTakkuriStolenKokiriSwordDL, gTakkuriStolenRazorSwordDL, gTakkuriStolenGildedSwordDL }; s32 isItemFound = false; s32 phi_a3 = 0; s32 slotId = SLOT_BOTTLE_1; @@ -239,7 +238,7 @@ s32 func_80C10B0C(EnThiefbird* this, PlayState* play) { if (isItemFound) { Inventory_DeleteItem(itemId2, slotId); - this->unk_3E8 = object_thiefbird_DL_0033B0; + this->unk_3E8 = gTakkuriStolenBottleDL; if (Message_GetState(&play->msgCtx) == TEXT_STATE_NONE) { Message_StartTextbox(play, 0xF4, NULL); } @@ -256,7 +255,7 @@ s32 func_80C10B0C(EnThiefbird* this, PlayState* play) { itemId1 = phi_a3 + (ITEM_SWORD_KOKIRI - 1); if (phi_a3 == 4) { Inventory_DeleteItem(ITEM_SWORD_GREAT_FAIRY, SLOT_SWORD_GREAT_FAIRY); - this->unk_3E8 = object_thiefbird_DL_003D58; + this->unk_3E8 = gTakkuriStolenGreatFairySwordDL; itemId1 = ITEM_SWORD_GREAT_FAIRY; } else { CUR_FORM_EQUIP(EQUIP_SLOT_B) = ITEM_NONE; @@ -461,7 +460,7 @@ void func_80C114C0(EnThiefbird* this, PlayState* play) { } void func_80C11538(EnThiefbird* this) { - Animation_MorphToLoop(&this->skelAnime, &object_thiefbird_Anim_000604, -4.0f); + Animation_MorphToLoop(&this->skelAnime, &gTakkuriFlyAnim, -4.0f); this->unk_18E = 60; this->collider.base.acFlags |= AC_ON; this->actionFunc = func_80C11590; @@ -525,7 +524,7 @@ void func_80C11590(EnThiefbird* this, PlayState* play) { } void func_80C118E4(EnThiefbird* this) { - Animation_MorphToLoop(&this->skelAnime, &object_thiefbird_Anim_0063C4, -10.0f); + Animation_MorphToLoop(&this->skelAnime, &gTakkuriAttackAnim, -10.0f); this->unk_18E = 300; this->actionFunc = func_80C1193C; this->actor.speedXZ = 5.0f; @@ -591,7 +590,7 @@ void func_80C1193C(EnThiefbird* this, PlayState* play) { void func_80C11C60(EnThiefbird* this) { this->actor.speedXZ = 0.0f; this->actor.velocity.y = 0.0f; - Animation_PlayOnce(&this->skelAnime, &object_thiefbird_Anim_000088); + Animation_PlayOnce(&this->skelAnime, &gTakkuriDeathAnim); this->actor.bgCheckFlags &= ~1; this->actor.shape.rot.x = 0; this->unk_18E = 40; @@ -663,7 +662,7 @@ void func_80C11DF0(EnThiefbird* this, PlayState* play) { } void func_80C11F6C(EnThiefbird* this, PlayState* play) { - Animation_MorphToLoop(&this->skelAnime, &object_thiefbird_Anim_000278, -4.0f); + Animation_MorphToLoop(&this->skelAnime, &gTakkuriFlyWithItemAnim, -4.0f); func_80C10984(this, 15); if (this->actor.colChkInfo.damageEffect != 3) { this->actor.speedXZ = 4.0f; @@ -747,7 +746,7 @@ void func_80C1215C(EnThiefbird* this, PlayState* play) { } void func_80C12308(EnThiefbird* this) { - Animation_MorphToLoop(&this->skelAnime, &object_thiefbird_Anim_000278, -4.0f); + Animation_MorphToLoop(&this->skelAnime, &gTakkuriFlyWithItemAnim, -4.0f); func_80C10984(this, 15); this->unk_190 = -0x1000; this->unk_192 = BINANG_ROT180(this->actor.yawTowardsPlayer); @@ -776,7 +775,7 @@ void func_80C12378(EnThiefbird* this, PlayState* play) { } void func_80C1242C(EnThiefbird* this) { - Animation_Change(&this->skelAnime, &object_thiefbird_Anim_000278, 2.0f, 0.0f, 0.0f, ANIMMODE_LOOP, -4.0f); + Animation_Change(&this->skelAnime, &gTakkuriFlyWithItemAnim, 2.0f, 0.0f, 0.0f, ANIMMODE_LOOP, -4.0f); this->actor.flags |= ACTOR_FLAG_10; this->collider.base.acFlags |= AC_ON; this->actionFunc = func_80C124B0; @@ -836,8 +835,8 @@ void func_80C126D8(EnThiefbird* this, PlayState* play) { } void func_80C12744(EnThiefbird* this) { - Animation_MorphToLoop(&this->skelAnime, &object_thiefbird_Anim_000604, -4.0f); - Animation_Change(&this->skelAnime, &object_thiefbird_Anim_000604, 1.0f, 0.0f, 0.0f, ANIMMODE_LOOP_INTERP, -4.0f); + Animation_MorphToLoop(&this->skelAnime, &gTakkuriFlyAnim, -4.0f); + Animation_Change(&this->skelAnime, &gTakkuriFlyAnim, 1.0f, 0.0f, 0.0f, ANIMMODE_LOOP_INTERP, -4.0f); this->unk_190 = 0; this->collider.base.acFlags |= AC_ON; this->actor.flags |= ACTOR_FLAG_10; @@ -1030,8 +1029,8 @@ void EnThiefbird_Update(Actor* thisx, PlayState* play2) { } func_80C12D00(this); - if (((this->skelAnime.animation == &object_thiefbird_Anim_000604) && Animation_OnFrame(&this->skelAnime, 13.0f)) || - ((this->skelAnime.animation == &object_thiefbird_Anim_000278) && Animation_OnFrame(&this->skelAnime, 1.0f))) { + if (((this->skelAnime.animation == &gTakkuriFlyAnim) && Animation_OnFrame(&this->skelAnime, 13.0f)) || + ((this->skelAnime.animation == &gTakkuriFlyWithItemAnim) && Animation_OnFrame(&this->skelAnime, 1.0f))) { Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_KAICHO_FLUTTER); } } @@ -1039,12 +1038,12 @@ void EnThiefbird_Update(Actor* thisx, PlayState* play2) { s32 EnThiefbird_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx) { EnThiefbird* this = THIS; - if ((limbIndex == 10) || (limbIndex == 11)) { + if ((limbIndex == TAKKURI_LIMB_RIGHT_EAR) || (limbIndex == TAKKURI_LIMB_LEFT_EAR)) { this->unk_3E4 = *dList; *dList = NULL; - } else if (limbIndex == 16) { + } else if (limbIndex == TAKKURI_LIMB_STOLEN_ITEM) { *dList = NULL; - } else if (limbIndex == 8) { + } else if (limbIndex == TAKKURI_LIMB_NECK) { rot->z += this->unk_194; } @@ -1061,7 +1060,7 @@ void EnThiefbird_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s s8 idx; Collider_UpdateSpheres(limbIndex, &this->collider); - if ((limbIndex == 10) || (limbIndex == 11)) { + if ((limbIndex == TAKKURI_LIMB_RIGHT_EAR) || (limbIndex == TAKKURI_LIMB_LEFT_EAR)) { OPEN_DISPS(play->state.gfxCtx); gfx = POLY_OPA_DISP; @@ -1071,11 +1070,11 @@ void EnThiefbird_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s POLY_OPA_DISP = &gfx[2]; CLOSE_DISPS(play->state.gfxCtx); - } else if (limbIndex == 16) { + } else if (limbIndex == TAKKURI_LIMB_STOLEN_ITEM) { if (this->unk_3E8 != NULL) { OPEN_DISPS(play->state.gfxCtx); - if (this->unk_3E8 == object_thiefbird_DL_0033B0) { + if (this->unk_3E8 == gTakkuriStolenBottleDL) { gfx = POLY_XLU_DISP; } else { gfx = POLY_OPA_DISP; @@ -1084,7 +1083,7 @@ void EnThiefbird_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s gSPMatrix(&gfx[0], Matrix_NewMtx(play->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); gSPDisplayList(&gfx[1], this->unk_3E8); - if (this->unk_3E8 == object_thiefbird_DL_0033B0) { + if (this->unk_3E8 == gTakkuriStolenBottleDL) { POLY_XLU_DISP = &gfx[2]; } else { POLY_OPA_DISP = &gfx[2]; @@ -1117,7 +1116,7 @@ void func_80C13354(EnThiefbird* this, PlayState* play2) { gfx = POLY_OPA_DISP; gSPDisplayList(&gfx[0], &sSetupDL[6 * 25]); - gSPDisplayList(&gfx[1], object_thiefbird_DL_003060); + gSPDisplayList(&gfx[1], gTakkuriFeatherMaterialDL); gfx = &gfx[2]; for (i = 0; i < ARRAY_COUNT(this->unk_3F0); i++, ptr++) { @@ -1130,7 +1129,7 @@ void func_80C13354(EnThiefbird* this, PlayState* play2) { Matrix_Scale(ptr->unk_18, ptr->unk_18, 1.0f, MTXMODE_APPLY); gSPMatrix(&gfx[0], Matrix_NewMtx(play->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gSPDisplayList(&gfx[1], object_thiefbird_DL_0030D8); + gSPDisplayList(&gfx[1], gTakkuriFeatherModelDL); gfx = &gfx[2]; } } diff --git a/src/overlays/actors/ovl_En_Thiefbird/z_en_thiefbird.h b/src/overlays/actors/ovl_En_Thiefbird/z_en_thiefbird.h index 698d963be..1bbee73e0 100644 --- a/src/overlays/actors/ovl_En_Thiefbird/z_en_thiefbird.h +++ b/src/overlays/actors/ovl_En_Thiefbird/z_en_thiefbird.h @@ -2,6 +2,7 @@ #define Z_EN_THIEFBIRD_H #include "global.h" +#include "objects/object_thiefbird/object_thiefbird.h" struct EnThiefbird; @@ -27,8 +28,8 @@ typedef struct EnThiefbird { /* 0x192 */ s16 unk_192; /* 0x194 */ s16 unk_194; /* 0x196 */ s16 unk_196[6]; - /* 0x1A2 */ Vec3s jointTable[17]; - /* 0x208 */ Vec3s morphTable[17]; + /* 0x1A2 */ Vec3s jointTable[TAKKURI_LIMB_MAX]; + /* 0x208 */ Vec3s morphTable[TAKKURI_LIMB_MAX]; /* 0x270 */ ColliderJntSph collider; /* 0x290 */ ColliderJntSphElement colliderElements[3]; /* 0x350 */ Vec3f limbPos[11]; diff --git a/src/overlays/actors/ovl_En_Time_Tag/z_en_time_tag.c b/src/overlays/actors/ovl_En_Time_Tag/z_en_time_tag.c index 26b3ecbe5..c660772f7 100644 --- a/src/overlays/actors/ovl_En_Time_Tag/z_en_time_tag.c +++ b/src/overlays/actors/ovl_En_Time_Tag/z_en_time_tag.c @@ -263,7 +263,7 @@ void func_80ACA714(EnTimeTag* this, PlayState* play) { void func_80ACA724(EnTimeTag* this, PlayState* play) { if (Message_GetState(&play->msgCtx) == TEXT_STATE_5) { - play->nextEntranceIndex = play->setupExitList[ENTIMETAG_GET_1F(&this->actor)]; + play->nextEntrance = play->setupExitList[ENTIMETAG_GET_1F(&this->actor)]; play->transitionTrigger = TRANS_TRIGGER_START; if (!ENTIMETAG_GET_E000(&this->actor)) { Actor_PlaySfxAtPos(&this->actor, NA_SE_OC_DOOR_OPEN); diff --git a/src/overlays/actors/ovl_En_Tk/z_en_tk.c b/src/overlays/actors/ovl_En_Tk/z_en_tk.c index 52ffa365f..2b8cbef82 100644 --- a/src/overlays/actors/ovl_En_Tk/z_en_tk.c +++ b/src/overlays/actors/ovl_En_Tk/z_en_tk.c @@ -486,7 +486,7 @@ s32 func_80AECE60(EnTk* this, PlayState* play) { } if (!(this->unk_3CE & 8) && !(this->unk_2CA & 0x10) && (this->actor.xzDistToPlayer < 100.0f)) { - func_8013E8F8(&this->actor, play, 100.0f, 100.0f, EXCH_ITEM_NONE, 0x4000, 0x4000); + func_8013E8F8(&this->actor, play, 100.0f, 100.0f, PLAYER_AP_NONE, 0x4000, 0x4000); } return false; @@ -696,7 +696,7 @@ void func_80AED940(EnTk* this, PlayState* play) { func_80AEDE10(this, play); } else if (!(this->unk_2CA & 0x80)) { if (this->actor.xzDistToPlayer < 100.0f) { - func_8013E8F8(&this->actor, play, 100.0f, 100.0f, EXCH_ITEM_NONE, 0x4000, 0x4000); + func_8013E8F8(&this->actor, play, 100.0f, 100.0f, PLAYER_AP_NONE, 0x4000, 0x4000); } } else { func_800B8500(&this->actor, play, this->actor.xzDistToPlayer, this->actor.playerHeightRel, 0); diff --git a/src/overlays/actors/ovl_En_Toto/z_en_toto.c b/src/overlays/actors/ovl_En_Toto/z_en_toto.c index 753b5a664..473ff1edd 100644 --- a/src/overlays/actors/ovl_En_Toto/z_en_toto.c +++ b/src/overlays/actors/ovl_En_Toto/z_en_toto.c @@ -258,7 +258,7 @@ void func_80BA39C8(EnToto* this, PlayState* play) { if (this->unk2B6 != 0) { this->text = D_80BA5044; this->actor.flags |= ACTOR_FLAG_10000; - func_800B8500(&this->actor, play, 9999.9f, 9999.9f, EXCH_ITEM_NONE); + func_800B8500(&this->actor, play, 9999.9f, 9999.9f, PLAYER_AP_NONE); } else { this->actor.flags &= ~ACTOR_FLAG_10000; func_800B8614(&this->actor, play, 50.0f); diff --git a/src/overlays/actors/ovl_En_Trt/z_en_trt.c b/src/overlays/actors/ovl_En_Trt/z_en_trt.c index 3685d24a2..50126d97e 100644 --- a/src/overlays/actors/ovl_En_Trt/z_en_trt.c +++ b/src/overlays/actors/ovl_En_Trt/z_en_trt.c @@ -64,7 +64,7 @@ void EnTrt_Blink(EnTrt* this); void EnTrt_OpenEyes2(EnTrt* this); void EnTrt_NodOff(EnTrt* this); -static AnimationInfoS sAnimations[] = { +static AnimationInfoS sAnimationInfo[] = { { &object_trt_Anim_00DE68, 1.0f, 0, -1, ANIMMODE_ONCE, 0 }, { &object_trt_Anim_00EE98, 1.0f, 0, -1, ANIMMODE_ONCE, 0 }, { &object_trt_Anim_00FD34, 1.0f, 0, -1, ANIMMODE_LOOP, 0 }, @@ -97,17 +97,17 @@ static ShopItem sShop[] = { { SI_POTION_BLUE, { -12, 32, -36 } }, }; -void EnTrt_ChangeAnim(SkelAnime* skelAnime, AnimationInfoS* animations, s32 idx) { +void EnTrt_ChangeAnim(SkelAnime* skelAnime, AnimationInfoS* animationInfo, s32 animIndex) { f32 frameCount; - animations += idx; - if (animations->frameCount < 0) { - frameCount = Animation_GetLastFrame(animations->animation); + animationInfo += animIndex; + if (animationInfo->frameCount < 0) { + frameCount = Animation_GetLastFrame(animationInfo->animation); } else { - frameCount = animations->frameCount; + frameCount = animationInfo->frameCount; } - Animation_Change(skelAnime, animations->animation, animations->playSpeed, animations->startFrame, frameCount, - animations->mode, animations->morphFrames); + Animation_Change(skelAnime, animationInfo->animation, animationInfo->playSpeed, animationInfo->startFrame, + frameCount, animationInfo->mode, animationInfo->morphFrames); } s32 EnTrt_TestItemSelected(PlayState* play) { @@ -466,7 +466,7 @@ void EnTrt_GivenRedPotionForKoume(EnTrt* this, PlayState* play) { ActorCutscene_SetIntentToPlay(this->cutscene); } } - func_800B85E0(&this->actor, play, 400.0f, EXCH_ITEM_MINUS1); + func_800B85E0(&this->actor, play, 400.0f, PLAYER_AP_MINUS1); this->actionFunc = EnTrt_ItemGiven; } } @@ -785,8 +785,8 @@ void EnTrt_IdleSleeping(EnTrt* this, PlayState* play) { } if (DECR(this->timer) == 0) { this->timer = 40; - EnTrt_ChangeAnim(&this->skelAnime, sAnimations, 1); - this->animationIndex = 1; + EnTrt_ChangeAnim(&this->skelAnime, sAnimationInfo, 1); + this->animIndex = 1; this->actionFunc = EnTrt_IdleAwake; this->blinkFunc = EnTrt_OpenThenCloseEyes; } @@ -821,7 +821,7 @@ void EnTrt_IdleAwake(EnTrt* this, PlayState* play) { if (player->transformation == PLAYER_FORM_HUMAN) { this->flags |= ENTRT_MET; } - EnTrt_ChangeAnim(&this->skelAnime, sAnimations, 2); + EnTrt_ChangeAnim(&this->skelAnime, sAnimationInfo, 2); this->blinkFunc = EnTrt_EyesClosed; this->timer = 45; this->actionFunc = EnTrt_BeginInteraction; @@ -831,8 +831,8 @@ void EnTrt_IdleAwake(EnTrt* this, PlayState* play) { } if (DECR(this->timer) == 0) { this->timer = Rand_S16Offset(150, 100); - EnTrt_ChangeAnim(&this->skelAnime, sAnimations, 2); - this->animationIndex = 2; + EnTrt_ChangeAnim(&this->skelAnime, sAnimationInfo, 2); + this->animIndex = 2; this->sleepSoundTimer = 10; this->actor.textId = 0; this->actionFunc = EnTrt_IdleSleeping; @@ -852,10 +852,10 @@ void EnTrt_BeginInteraction(EnTrt* this, PlayState* play) { ActorCutscene_SetIntentToPlay(this->cutscene); } } else if (this->cutsceneState == ENTRT_CUTSCENESTATE_PLAYING_SPECIAL) { - if (this->animationIndex != 5) { + if (this->animIndex != 5) { if (curFrame == animLastFrame) { - EnTrt_ChangeAnim(&this->skelAnime, sAnimations, 3); - this->animationIndex = 3; + EnTrt_ChangeAnim(&this->skelAnime, sAnimationInfo, 3); + this->animIndex = 3; this->blinkFunc = EnTrt_OpenEyesThenSetToBlink; this->timer = 10; this->cutsceneState = ENTRT_CUTSCENESTATE_PLAYING; @@ -868,9 +868,9 @@ void EnTrt_BeginInteraction(EnTrt* this, PlayState* play) { } } else if (DECR(this->timer) == 0) { this->timer = Rand_S16Offset(40, 20); - EnTrt_ChangeAnim(&this->skelAnime, sAnimations, 5); + EnTrt_ChangeAnim(&this->skelAnime, sAnimationInfo, 5); Message_StartTextbox(play, this->textId, &this->actor); - this->animationIndex = 5; + this->animIndex = 5; switch (this->textId) { case 0x834: if (!(gSaveContext.save.weekEventReg[12] & 8) && !(gSaveContext.save.weekEventReg[84] & 0x40) && @@ -910,8 +910,8 @@ void EnTrt_Surprised(EnTrt* this, PlayState* play) { } } else if (this->cutsceneState == ENTRT_CUTSCENESTATE_PLAYING_SPECIAL) { if (DECR(this->timer) == 0) { - EnTrt_ChangeAnim(&this->skelAnime, sAnimations, 4); - this->animationIndex = 4; + EnTrt_ChangeAnim(&this->skelAnime, sAnimationInfo, 4); + this->animIndex = 4; this->blinkFunc = EnTrt_OpenEyes2; Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_KOTAKE_SURPRISED); this->timer = 30; @@ -919,9 +919,9 @@ void EnTrt_Surprised(EnTrt* this, PlayState* play) { } } else if (DECR(this->timer) == 0) { this->timer = Rand_S16Offset(40, 20); - EnTrt_ChangeAnim(&this->skelAnime, sAnimations, 5); + EnTrt_ChangeAnim(&this->skelAnime, sAnimationInfo, 5); Message_StartTextbox(play, this->textId, &this->actor); - this->animationIndex = 5; + this->animIndex = 5; this->actionFunc = EnTrt_TryToGiveRedPotionAfterSurprised; } } @@ -1010,7 +1010,7 @@ void EnTrt_ItemGiven(EnTrt* this, PlayState* play) { } func_80151938(play, this->textId); } else { - func_800B85E0(&this->actor, play, 400.0f, EXCH_ITEM_MINUS1); + func_800B85E0(&this->actor, play, 400.0f, PLAYER_AP_MINUS1); } } @@ -1034,9 +1034,9 @@ void EnTrt_ShopkeeperGone(EnTrt* this, PlayState* play) { } if ((talkState == TEXT_STATE_DONE) && Message_ShouldAdvance(play)) { if (gSaveContext.save.weekEventReg[20] & 2) { - play->nextEntranceIndex = 0xC50; + play->nextEntrance = ENTRANCE(SOUTHERN_SWAMP_CLEARED, 5); } else { - play->nextEntranceIndex = 0x8450; + play->nextEntrance = ENTRANCE(SOUTHERN_SWAMP_POISONED, 5); } play->transitionType = TRANS_TYPE_64; gSaveContext.nextTransitionType = TRANS_TYPE_64; @@ -1083,7 +1083,7 @@ void EnTrt_SetupItemGiven(EnTrt* this, PlayState* play) { this->cutscene = this->lookToShopkeeperCutscene; ActorCutscene_SetIntentToPlay(this->cutscene); } - func_800B85E0(&this->actor, play, 400.0f, EXCH_ITEM_MINUS1); + func_800B85E0(&this->actor, play, 400.0f, PLAYER_AP_MINUS1); } } @@ -1106,7 +1106,7 @@ void EnTrt_ContinueShopping(EnTrt* this, PlayState* play) { player->stateFlags2 |= 0x20000000; Message_StartTextbox(play, this->textId, &this->actor); EnTrt_SetupStartShopping(play, this, true); - func_800B85E0(&this->actor, play, 400.0f, EXCH_ITEM_MINUS1); + func_800B85E0(&this->actor, play, 400.0f, PLAYER_AP_MINUS1); break; case 1: default: @@ -1371,8 +1371,8 @@ void EnTrt_TalkToShopkeeper(EnTrt* this, PlayState* play) { } } else if (talkState == TEXT_STATE_16) { itemGiven = func_80123810(play); - if (itemGiven > EXCH_ITEM_NONE) { - if (itemGiven == EXCH_ITEM_1E) { + if (itemGiven > PLAYER_AP_NONE) { + if (itemGiven == PLAYER_AP_BOTTLE_MUSHROOM) { if (gSaveContext.save.weekEventReg[53] & 8) { player->actor.textId = 0x888; } else { @@ -1391,7 +1391,7 @@ void EnTrt_TalkToShopkeeper(EnTrt* this, PlayState* play) { this->actionFunc = EnTrt_Goodbye; } func_801477B4(play); - } else if (itemGiven < EXCH_ITEM_NONE) { + } else if (itemGiven < PLAYER_AP_NONE) { if (this->flags & ENTRT_GIVEN_MUSHROOM) { this->textId = 0x88B; } else { diff --git a/src/overlays/actors/ovl_En_Trt/z_en_trt.h b/src/overlays/actors/ovl_En_Trt/z_en_trt.h index 13af94bcc..46f070797 100644 --- a/src/overlays/actors/ovl_En_Trt/z_en_trt.h +++ b/src/overlays/actors/ovl_En_Trt/z_en_trt.h @@ -41,7 +41,7 @@ typedef struct EnTrt { /* 0x3F0 */ Color_RGBAu32 cursorColor; /* 0x400 */ u8 drawCursor; /* 0x402 */ s16 timer; - /* 0x404 */ s16 animationIndex; + /* 0x404 */ s16 animIndex; /* 0x406 */ u16 textId; /* 0x408 */ u16 prevTextId; /* 0x40A */ u16 talkOptionTextId; diff --git a/src/overlays/actors/ovl_En_Trt2/z_en_trt2.c b/src/overlays/actors/ovl_En_Trt2/z_en_trt2.c index 0dd9da893..9e791dbea 100644 --- a/src/overlays/actors/ovl_En_Trt2/z_en_trt2.c +++ b/src/overlays/actors/ovl_En_Trt2/z_en_trt2.c @@ -26,7 +26,7 @@ void func_80AD4FE4(EnTrt2* this, PlayState* play); void func_80AD5234(EnTrt2* this, PlayState* play); void func_80AD56E8(Actor* thisx, PlayState* play); -static AnimationInfoS sAnimations[] = { +static AnimationInfoS sAnimationInfo[] = { { &object_trt_Anim_00DE68, 1.0f, 0, -1, ANIMMODE_ONCE, 0 }, { &object_trt_Anim_00EE98, 1.0f, 0, -1, ANIMMODE_ONCE, 0 }, { &object_trt_Anim_00FD34, 1.0f, 0, -1, ANIMMODE_LOOP, 0 }, @@ -170,7 +170,7 @@ void func_80AD3530(EnTrt2* this, PlayState* play) { if (DECR(this->unk_3AE) == 0) { this->unk_3AE = Rand_S16Offset(20, 20); - func_80AD3380(&this->skelAnime, sAnimations, 7); + func_80AD3380(&this->skelAnime, sAnimationInfo, 7); this->unk_3B2 = 5; } } @@ -277,7 +277,7 @@ void func_80AD3A24(EnTrt2* this, PlayState* play) { Math_ApproachF(&this->actor.speedXZ, 0.0f, 0.2f, 1.0f); } else if (DECR(this->unk_3AE) == 0) { this->unk_3AE = Rand_S16Offset(100, 50); - func_80AD3380(&this->skelAnime, sAnimations, 6); + func_80AD3380(&this->skelAnime, sAnimationInfo, 6); this->unk_3B2 = 4; } Actor_MoveWithGravity(&this->actor); @@ -288,7 +288,7 @@ void func_80AD3AE4(EnTrt2* this, PlayState* play) { Math_ApproachF(&this->actor.velocity.y, 0.5f, 0.2f, 0.1f); } else { this->actor.velocity.y = 0.0f; - func_80AD3380(&this->skelAnime, sAnimations, 6); + func_80AD3380(&this->skelAnime, sAnimationInfo, 6); this->unk_3B2 = 4; } Actor_MoveWithGravity(&this->actor); @@ -298,7 +298,7 @@ void func_80AD3B6C(EnTrt2* this, PlayState* play) { if (DECR(this->unk_3B0) == 0) { this->unk_3B0 = 10; this->actor.velocity.y = -1.0f; - func_80AD3380(&this->skelAnime, sAnimations, 8); + func_80AD3380(&this->skelAnime, sAnimationInfo, 8); this->unk_3B2 = 8; } } @@ -311,7 +311,7 @@ void func_80AD3BE4(EnTrt2* this, PlayState* play) { this->actor.world.rot.y += this->unk_3C0; this->actor.shape.rot.y = this->actor.world.rot.y; if (this->actor.world.pos.y < 5.0f) { - func_80AD3380(&this->skelAnime, sAnimations, 9); + func_80AD3380(&this->skelAnime, sAnimationInfo, 9); this->unk_3B2 = 9; } } @@ -335,7 +335,7 @@ void func_80AD3CEC(EnTrt2* this, PlayState* play) { } else if ((talkState == TEXT_STATE_5) && Message_ShouldAdvance(play)) { play->msgCtx.msgMode = 0x43; play->msgCtx.stateTimer = 4; - func_80AD3380(&this->skelAnime, sAnimations, 6); + func_80AD3380(&this->skelAnime, sAnimationInfo, 6); this->unk_3B2 = 4; } } @@ -436,7 +436,7 @@ void func_80AD417C(EnTrt2* this, PlayState* play) { play->msgCtx.msgMode = 0x43; play->msgCtx.stateTimer = 4; if (this->unk_3A8 == 0x84C) { - func_80AD3380(&this->skelAnime, sAnimations, 6); + func_80AD3380(&this->skelAnime, sAnimationInfo, 6); this->path = SubS_GetPathByIndex(play, ENTRT2_GET_FC00(&this->actor), 0x3F); this->unk_3B2 = 18; } else if (this->unk_3A8 == 0x88F) { @@ -510,7 +510,7 @@ void func_80AD4550(EnTrt2* this, PlayState* play) { u8 talkState = Message_GetState(&play->msgCtx); if ((player->transformation != PLAYER_FORM_HUMAN) && (player->transformation != PLAYER_FORM_FIERCE_DEITY)) { - func_80AD3380(&this->skelAnime, sAnimations, 7); + func_80AD3380(&this->skelAnime, sAnimationInfo, 7); this->unk_3B2 = 17; } @@ -665,7 +665,7 @@ s32 func_80AD4B4C(EnTrt2* this, PlayState* play) { } else { this->unk_3A8 = 0x84F; this->unk_3D8 = true; - func_80AD3380(&this->skelAnime, sAnimations, 7); + func_80AD3380(&this->skelAnime, sAnimationInfo, 7); this->unk_3B2 = 7; } } diff --git a/src/overlays/actors/ovl_En_Tru/z_en_tru.c b/src/overlays/actors/ovl_En_Tru/z_en_tru.c index 659992854..996a32bef 100644 --- a/src/overlays/actors/ovl_En_Tru/z_en_tru.c +++ b/src/overlays/actors/ovl_En_Tru/z_en_tru.c @@ -106,7 +106,7 @@ static ColliderSphereInit sSphereInit = { static CollisionCheckInfoInit2 sColChkInfoInit = { 1, 20, 0, 0, MASS_IMMOVABLE }; -static AnimationInfoS D_80A8B2D8[] = { +static AnimationInfoS sAnimationInfo[] = { { &object_tru_Anim_00F9A0, 1.0f, 0, -1, ANIMMODE_LOOP, 0 }, { &object_tru_Anim_00F9A0, 1.0f, 0, -1, ANIMMODE_LOOP, -4 }, { &object_tru_Anim_0108AC, 1.0f, 0, -1, ANIMMODE_ONCE, -4 }, @@ -424,7 +424,7 @@ s32 func_80A86924(EnTru* this, s32 arg1) { if (arg1 != this->unk_37C) { this->unk_37C = arg1; - ret = SubS_ChangeAnimationByInfoS(&this->skelAnime, D_80A8B2D8, arg1); + ret = SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimationInfo, arg1); this->unk_358 = this->skelAnime.playSpeed; } @@ -994,7 +994,7 @@ s32 func_80A87DC0(Actor* thisx, PlayState* play) { break; case 2: - Audio_StopSfxById(NA_SE_EN_KOUME_MAGIC); + AudioSfx_StopById(NA_SE_EN_KOUME_MAGIC); Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_KOUME_AWAY); Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_KOUME_LAUGH); func_80A86924(this, 13); @@ -1105,7 +1105,7 @@ void func_80A881E0(EnTru* this, PlayState* play) { void EnTru_Init(Actor* thisx, PlayState* play) { EnTru* this = THIS; - if ((gSaveContext.save.entranceIndex != 0xC200) || (gSaveContext.save.weekEventReg[12] & 8)) { + if ((gSaveContext.save.entrance != 0xC200) || (gSaveContext.save.weekEventReg[12] & 8)) { Actor_MarkForDeath(&this->actor); return; } @@ -1128,7 +1128,7 @@ void EnTru_Init(Actor* thisx, PlayState* play) { if (gSaveContext.save.weekEventReg[16] & 0x10) { func_80A86924(this, 5); } else { - this->unk_388 = EXCH_ITEM_NONE; + this->unk_388 = PLAYER_AP_NONE; } this->actionFunc = func_80A87FD0; @@ -1154,7 +1154,7 @@ void EnTru_Update(Actor* thisx, PlayState* play) { func_80A86DB8(this); radius = this->collider.dim.worldSphere.radius + 30; - this->unk_388 = !(this->unk_34E & 0x80) ? EXCH_ITEM_NONE : EXCH_ITEM_NONE; + this->unk_388 = !(this->unk_34E & 0x80) ? PLAYER_AP_NONE : PLAYER_AP_NONE; func_8013C964(&this->actor, play, radius, 20.0f, this->unk_388, this->unk_34E & 7); func_80A8697C(this, play); diff --git a/src/overlays/actors/ovl_En_Tru_Mt/z_en_tru_mt.c b/src/overlays/actors/ovl_En_Tru_Mt/z_en_tru_mt.c index f2159e4d3..ac772a940 100644 --- a/src/overlays/actors/ovl_En_Tru_Mt/z_en_tru_mt.c +++ b/src/overlays/actors/ovl_En_Tru_Mt/z_en_tru_mt.c @@ -87,7 +87,7 @@ static DamageTable sDamageTable = { /* Powder Keg */ DMG_ENTRY(1, 0x0), }; -static AnimationInfoS D_80B7755C[] = { +static AnimationInfoS sAnimationInfo[] = { { &object_tru_Anim_00F9A0, 1.0f, 0, -1, ANIMMODE_LOOP, 0 }, { &object_tru_Anim_00F9A0, 1.0f, 0, -1, ANIMMODE_LOOP, -4 }, { &object_tru_Anim_0108AC, 1.0f, 0, -1, ANIMMODE_ONCE, -4 }, @@ -115,19 +115,19 @@ s32 func_80B76030(SkelAnime* skelAnime, s16 arg1) { s16 startFrame; s32 ret = false; - if ((arg1 >= 0) && (arg1 < ARRAY_COUNT(D_80B7755C))) { - endFrame = D_80B7755C[arg1].frameCount; + if ((arg1 >= 0) && (arg1 < ARRAY_COUNT(sAnimationInfo))) { + endFrame = sAnimationInfo[arg1].frameCount; if (endFrame < 0) { - endFrame = Animation_GetLastFrame(D_80B7755C[arg1].animation); + endFrame = Animation_GetLastFrame(sAnimationInfo[arg1].animation); } - startFrame = D_80B7755C[arg1].startFrame; + startFrame = sAnimationInfo[arg1].startFrame; if (startFrame < 0) { - startFrame = Animation_GetLastFrame(D_80B7755C[arg1].animation); + startFrame = Animation_GetLastFrame(sAnimationInfo[arg1].animation); } - Animation_Change(skelAnime, D_80B7755C[arg1].animation, D_80B7755C[arg1].playSpeed, startFrame, endFrame, - D_80B7755C[arg1].mode, D_80B7755C[arg1].morphFrames); + Animation_Change(skelAnime, sAnimationInfo[arg1].animation, sAnimationInfo[arg1].playSpeed, startFrame, + endFrame, sAnimationInfo[arg1].mode, sAnimationInfo[arg1].morphFrames); ret = true; } return ret; @@ -373,7 +373,7 @@ void func_80B76A64(EnTruMt* this, PlayState* play) { void func_80B76BB8(EnTruMt* this, PlayState* play) { if (Message_GetState(&play->msgCtx) == TEXT_STATE_5) { if (Message_ShouldAdvance(play)) { - play->nextEntranceIndex = 0xA810; + play->nextEntrance = ENTRANCE(TOURIST_INFORMATION, 1); play->transitionType = TRANS_TYPE_03; gSaveContext.nextTransitionType = TRANS_TYPE_03; play->transitionTrigger = TRANS_TRIGGER_START; diff --git a/src/overlays/actors/ovl_En_Wallmas/z_en_wallmas.c b/src/overlays/actors/ovl_En_Wallmas/z_en_wallmas.c index c2ed3f3a1..16cfa6a4b 100644 --- a/src/overlays/actors/ovl_En_Wallmas/z_en_wallmas.c +++ b/src/overlays/actors/ovl_En_Wallmas/z_en_wallmas.c @@ -247,7 +247,7 @@ void EnWallmas_WaitToDrop(EnWallmas* this, PlayState* play) { (player->actor.freezeTimer > 0) || !(player->actor.bgCheckFlags & 1) || ((WALLMASTER_GET_TYPE(&this->actor) == WALLMASTER_TYPE_PROXIMITY) && (Math_Vec3f_DistXZ(&this->actor.home.pos, playerPos) > (120.f + this->detectionRadius)))) { - Audio_StopSfxById(NA_SE_EN_FALL_AIM); + AudioSfx_StopById(NA_SE_EN_FALL_AIM); this->timer = 130; } diff --git a/src/overlays/actors/ovl_En_Warp_Uzu/z_en_warp_uzu.c b/src/overlays/actors/ovl_En_Warp_Uzu/z_en_warp_uzu.c index e67d8a630..34c8db4bb 100644 --- a/src/overlays/actors/ovl_En_Warp_Uzu/z_en_warp_uzu.c +++ b/src/overlays/actors/ovl_En_Warp_Uzu/z_en_warp_uzu.c @@ -111,8 +111,8 @@ void func_80A66278(EnWarpUzu* this, PlayState* play) { } void func_80A66384(EnWarpUzu* this, PlayState* play) { - play->nextEntranceIndex = 0x22A0; - gSaveContext.respawn[RESPAWN_MODE_DOWN].entranceIndex = play->nextEntranceIndex; + play->nextEntrance = ENTRANCE(PIRATES_FORTRESS, 10); + gSaveContext.respawn[RESPAWN_MODE_DOWN].entrance = play->nextEntrance; func_80169EFC(&play->state); gSaveContext.respawnFlag = -2; this->actionFunc = EnWarpUzu_DoNothing; diff --git a/src/overlays/actors/ovl_En_Warp_tag/z_en_warp_tag.c b/src/overlays/actors/ovl_En_Warp_tag/z_en_warp_tag.c index 3430e15f4..a7df95fb8 100644 --- a/src/overlays/actors/ovl_En_Warp_tag/z_en_warp_tag.c +++ b/src/overlays/actors/ovl_En_Warp_tag/z_en_warp_tag.c @@ -144,7 +144,7 @@ void EnWarpTag_RespawnPlayer(EnWarptag* this, PlayState* play) { Player* player; s32 playerSpawnIndex; s32 new15E; - s32 entranceIndex; + s32 entrance; u32 playerSpawnIndexPerForm[PLAYER_FORM_MAX]; u8 playerForm; s16 playerParams; @@ -192,7 +192,7 @@ void EnWarpTag_RespawnPlayer(EnWarptag* this, PlayState* play) { playerForm = player->transformation; } - entranceIndex = gSaveContext.save.entranceIndex; + entrance = gSaveContext.save.entrance; playerSpawnIndex = playerSpawnIndexPerForm[playerForm]; playerActorEntry = &play->linkActorEntry[playerSpawnIndex]; @@ -209,7 +209,7 @@ void EnWarpTag_RespawnPlayer(EnWarptag* this, PlayState* play) { // why are we getting player home rotation from the room data? doesnt player have home.rot.y? // especially because we are converting from deg to binang, but isnt home.rot.y already in binang?? Play_SetRespawnData( - &play->state, 0, entranceIndex, // parameter 3 is called "sceneSetup" + &play->state, 0, entrance, // parameter 3 is called "sceneSetup" play->setupEntranceList[playerSpawnIndex].room, playerParams, &newRespawnPos, ((((playerActorEntry->rot.y >> 7) & 0x1FF) / 180.0f) * 32768.0f)); // DEG_TO_BINANG ? @@ -241,7 +241,7 @@ void EnWarpTag_GrottoReturn(EnWarptag* this, PlayState* play) { } if (this->grottoExitDelay++ == 10) { - play->nextEntranceIndex = play->setupExitList[GET_WARPTAG_EXIT_INDEX(&this->dyna.actor)]; + play->nextEntrance = play->setupExitList[GET_WARPTAG_EXIT_INDEX(&this->dyna.actor)]; Scene_SetExitFade(play); play->transitionTrigger = TRANS_TRIGGER_START; func_8019F128(NA_SE_OC_SECRET_HOLE_OUT); diff --git a/src/overlays/actors/ovl_En_Yb/z_en_yb.c b/src/overlays/actors/ovl_En_Yb/z_en_yb.c index d694d186c..d0fda7dfd 100644 --- a/src/overlays/actors/ovl_En_Yb/z_en_yb.c +++ b/src/overlays/actors/ovl_En_Yb/z_en_yb.c @@ -29,7 +29,7 @@ void EnYb_TeachingDance(EnYb* this, PlayState* play); void EnYb_WaitForMidnight(EnYb* this, PlayState* play); void EnYb_ActorShadowFunc(Actor* thisx, Lights* mapper, PlayState* play); -void EnYb_SetAnimation(PlayState*, EnYb*, s16, u8, f32); +void EnYb_ChangeAnim(PlayState* play, EnYb* this, s16 animIndex, u8 animMode, f32 morphFrames); s32 EnYb_CanTalk(EnYb* this, PlayState* play); const ActorInit En_Yb_InitVars = { @@ -93,11 +93,11 @@ void EnYb_Init(Actor* thisx, PlayState* play) { Collider_InitAndSetCylinder(play, &this->collider, &this->actor, &sCylinderInit); this->actor.colChkInfo.mass = MASS_IMMOVABLE; this->actionFunc = EnYb_Idle; - this->currentAnimIndex = 3; // gets overwritten to 2 in EnYb_SetAnimation later + this->animIndex = 3; // gets overwritten to 2 in EnYb_ChangeAnim later this->actor.terminalVelocity = -9.0f; this->actor.gravity = -1.0f; - EnYb_SetAnimation(play, this, 2, ANIMMODE_LOOP, 0.0f); + EnYb_ChangeAnim(play, this, 2, ANIMMODE_LOOP, 0.0f); tempCutscene = this->actor.cutscene; for (i = 0; i < ARRAY_COUNT(this->cutscenes); i++) { @@ -147,7 +147,7 @@ void EnYb_ActorShadowFunc(Actor* thisx, Lights* mapper, PlayState* play) { EnYb* this = THIS; if (this->alpha > 0) { - if (this->currentAnimIndex == 2) { + if (this->animIndex == 2) { f32 tempScale = (((27.0f - this->shadowPos.y) + this->actor.world.pos.y) * ((1 / 2.25f) * 0.001f)) + 0.01f; this->actor.scale.x = tempScale; } @@ -167,19 +167,19 @@ void EnYb_ActorShadowFunc(Actor* thisx, Lights* mapper, PlayState* play) { } } -void EnYb_SetAnimation(PlayState* play, EnYb* this, s16 animIndex, u8 animMode, f32 transitionRate) { +void EnYb_ChangeAnim(PlayState* play, EnYb* this, s16 animIndex, u8 animMode, f32 morphFrames) { if (animIndex >= 0 && animIndex < 3) { - if (animIndex != this->currentAnimIndex || animMode != ANIMMODE_LOOP) { + if (animIndex != this->animIndex || animMode != ANIMMODE_LOOP) { if (animIndex > 0) { if (animMode == ANIMMODE_LOOP) { LinkAnimation_Change(play, &this->skelAnime, gLinkAnimations[animIndex - 1], 1.0f, 0.0f, Animation_GetLastFrame(gLinkAnimations[animIndex - 1]), ANIMMODE_LOOP, - transitionRate); + morphFrames); } else { // unused case, (only called once with animMode = ANIMMODE_LOOP) LinkAnimation_Change(play, &this->skelAnime, gLinkAnimations[animIndex - 1], 1.0f, 0.0f, Animation_GetLastFrame(gLinkAnimations[animIndex - 1]), ANIMMODE_LOOP, - transitionRate); + morphFrames); } } else { // unused case, (only called once with animIndex = 2) @@ -188,9 +188,9 @@ void EnYb_SetAnimation(PlayState* play, EnYb* this, s16 animIndex, u8 animMode, if (1) {} Animation_Change(&this->skelAnime, gYbUnusedAnimations[animIndex], 1.0f, 0.0f, - Animation_GetLastFrame(animationPtr), animMode, transitionRate); + Animation_GetLastFrame(animationPtr), animMode, morphFrames); } - this->currentAnimIndex = animIndex; + this->animIndex = animIndex; } } } @@ -205,7 +205,7 @@ s32 EnYb_CanTalk(EnYb* this, PlayState* play) { } void EnYb_UpdateAnimation(EnYb* this, PlayState* play) { - if (this->currentAnimIndex <= 0) { + if (this->animIndex <= 0) { SkelAnime_Update(&this->skelAnime); } else { LinkAnimation_Update(play, &this->skelAnime); diff --git a/src/overlays/actors/ovl_En_Yb/z_en_yb.h b/src/overlays/actors/ovl_En_Yb/z_en_yb.h index 72d92d817..c7b977653 100644 --- a/src/overlays/actors/ovl_En_Yb/z_en_yb.h +++ b/src/overlays/actors/ovl_En_Yb/z_en_yb.h @@ -18,7 +18,7 @@ typedef struct EnYb { /* 0x3B8 */ ColliderCylinder collider; /* 0x404 */ Vec3f shadowPos; /* 0x410 */ u16 playerOcarinaOut; - /* 0x412 */ s16 currentAnimIndex; + /* 0x412 */ s16 animIndex; /* 0x414 */ s16 alpha; /* 0x416 */ s16 cutscenes[2]; /* 0x41A */ s16 cutsceneIndex; diff --git a/src/overlays/actors/ovl_En_Zo/z_en_zo.c b/src/overlays/actors/ovl_En_Zo/z_en_zo.c index 68051705e..c4bf8f56d 100644 --- a/src/overlays/actors/ovl_En_Zo/z_en_zo.c +++ b/src/overlays/actors/ovl_En_Zo/z_en_zo.c @@ -88,7 +88,7 @@ static DamageTable sDamageTable = { /* Powder Keg */ DMG_ENTRY(0, 0), }; -static AnimationInfoS sAnimations[] = { +static AnimationInfoS sAnimationInfo[] = { { &gZoraIdleAnim, 1.0f, 0, -1, ANIMMODE_LOOP, 0 }, { &gZoraIdleAnim, 1.0f, 0, -1, ANIMMODE_LOOP, -4 }, { &gZoraSurfacingAnim, 1.0f, 0, -1, ANIMMODE_LOOP, -4 }, @@ -102,19 +102,19 @@ s8 sBodyParts[] = { -1, 1, 12, 13, 14, 9, 10, 11, 0, 6, 7, 8, 3, 4, 5, 2, -1, -1 s8 sParentBodyParts[] = { 0, 0, 0, 0, 3, 4, 0, 6, 7, 0, 9, 10, 0, 12, 13 }; u8 sShadowSizes[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; -s32 EnZo_SetAnimation(SkelAnime* skelAnime, s16 index) { +s32 EnZo_ChangeAnim(SkelAnime* skelAnime, s16 animIndex) { s16 frameCount; s32 didChange = false; - if ((index >= 0) && (index < ARRAY_COUNT(sAnimations))) { + if ((animIndex >= 0) && (animIndex < ARRAY_COUNT(sAnimationInfo))) { didChange = true; - frameCount = sAnimations[index].frameCount; + frameCount = sAnimationInfo[animIndex].frameCount; if (frameCount < 0) { - frameCount = Animation_GetLastFrame(sAnimations[index].animation); + frameCount = Animation_GetLastFrame(sAnimationInfo[animIndex].animation); } - Animation_Change(skelAnime, sAnimations[index].animation, sAnimations[index].playSpeed, - sAnimations[index].startFrame, frameCount, sAnimations[index].mode, - sAnimations[index].morphFrames); + Animation_Change(skelAnime, sAnimationInfo[animIndex].animation, sAnimationInfo[animIndex].playSpeed, + sAnimationInfo[animIndex].startFrame, frameCount, sAnimationInfo[animIndex].mode, + sAnimationInfo[animIndex].morphFrames); } return didChange; } @@ -206,7 +206,7 @@ void EnZo_LookAtPlayer(EnZo* this, PlayState* play) { void EnZo_Walk(EnZo* this, PlayState* play) { if (ENZO_GET_PATH(&this->actor) != 0x3F) { - EnZo_SetAnimation(&this->skelAnime, 6); + EnZo_ChangeAnim(&this->skelAnime, 6); } if (ENZO_GET_PATH(&this->actor) != 0x3F) { @@ -230,7 +230,7 @@ void EnZo_FollowPath(EnZo* this, PlayState* play) { } if (this->actor.depthInWater > 60.0f) { - EnZo_SetAnimation(&this->skelAnime, 1); + EnZo_ChangeAnim(&this->skelAnime, 1); this->actionFunc = EnZo_TreadWater; this->actor.gravity = 0.0f; this->actor.speedXZ = 0.0f; @@ -257,7 +257,7 @@ void EnZo_Init(Actor* thisx, PlayState* play) { ActorShape_Init(&this->actor.shape, 0.0f, NULL, 0.0f); SkelAnime_InitFlex(play, &this->skelAnime, &gZoraSkel, NULL, this->jointTable, this->morphTable, ZORA_LIMB_MAX); - EnZo_SetAnimation(&this->skelAnime, 0); + EnZo_ChangeAnim(&this->skelAnime, 0); Collider_InitCylinder(play, &this->collider); Collider_SetCylinder(play, &this->collider, &this->actor, &sCylinderInit); diff --git a/src/overlays/actors/ovl_En_Zot/z_en_zot.c b/src/overlays/actors/ovl_En_Zot/z_en_zot.c index b0dd0e033..bced0c6f3 100644 --- a/src/overlays/actors/ovl_En_Zot/z_en_zot.c +++ b/src/overlays/actors/ovl_En_Zot/z_en_zot.c @@ -516,7 +516,7 @@ void func_80B975F8(EnZot* this, PlayState* play) { if (Actor_ProcessTalkRequest(&this->actor, &play->state)) { this->actionFunc = func_80B973BC; } else { - func_800B8500(&this->actor, play, 10000.0f, 1000.0f, EXCH_ITEM_NONE); + func_800B8500(&this->actor, play, 10000.0f, 1000.0f, PLAYER_AP_NONE); } } @@ -931,7 +931,7 @@ void func_80B9849C(EnZot* this, PlayState* play) { } this->actionFunc = func_80B98728; } else { - func_800B8500(&this->actor, play, 1000.0f, 1000.0f, EXCH_ITEM_MINUS1); + func_800B8500(&this->actor, play, 1000.0f, 1000.0f, PLAYER_AP_MINUS1); } } @@ -941,7 +941,7 @@ void func_80B9854C(EnZot* this, PlayState* play) { this->actor.parent = NULL; this->actionFunc = func_80B9849C; this->actor.flags |= ACTOR_FLAG_10000; - func_800B8500(&this->actor, play, 1000.0f, 1000.0f, EXCH_ITEM_MINUS1); + func_800B8500(&this->actor, play, 1000.0f, 1000.0f, PLAYER_AP_MINUS1); } else { Actor_PickUp(&this->actor, play, this->unk_2D4, 10000.0f, 50.0f); } diff --git a/src/overlays/actors/ovl_En_Zov/z_en_zov.c b/src/overlays/actors/ovl_En_Zov/z_en_zov.c index 5da61c966..05726ddce 100644 --- a/src/overlays/actors/ovl_En_Zov/z_en_zov.c +++ b/src/overlays/actors/ovl_En_Zov/z_en_zov.c @@ -423,7 +423,7 @@ void func_80BD1DB8(EnZov* this, PlayState* play) { break; case 0x1039: - play->nextEntranceIndex = play->setupExitList[ENZOV_GET_FE00(&this->picto.actor)]; + play->nextEntrance = play->setupExitList[ENZOV_GET_FE00(&this->picto.actor)]; play->transitionType = TRANS_TYPE_05; play->transitionTrigger = TRANS_TRIGGER_START; gSaveContext.save.weekEventReg[78] |= 1; diff --git a/src/overlays/actors/ovl_Obj_Bean/z_obj_bean.c b/src/overlays/actors/ovl_Obj_Bean/z_obj_bean.c index 55ff4fe14..c13fde9b0 100644 --- a/src/overlays/actors/ovl_Obj_Bean/z_obj_bean.c +++ b/src/overlays/actors/ovl_Obj_Bean/z_obj_bean.c @@ -545,7 +545,7 @@ void func_80937FC8(ObjBean* this, PlayState* play) { this->unk_1E8(this); if (Actor_ProcessTalkRequest(&this->dyna.actor, &play->state)) { - if (Player_GetExchangeItemId(play) == EXCH_ITEM_2E) { + if (Player_GetExchangeItemId(play) == PLAYER_AP_MAGIC_BEANS) { func_809383B4(this); Flags_SetSwitch(play, OBJBEAN_GET_3F80(&this->dyna.actor, 0)); } diff --git a/src/overlays/actors/ovl_Obj_Nozoki/z_obj_nozoki.c b/src/overlays/actors/ovl_Obj_Nozoki/z_obj_nozoki.c index c4276efed..681faf3c1 100644 --- a/src/overlays/actors/ovl_Obj_Nozoki/z_obj_nozoki.c +++ b/src/overlays/actors/ovl_Obj_Nozoki/z_obj_nozoki.c @@ -441,7 +441,7 @@ void func_80BA3344(ObjNozoki* this, PlayState* play) { ObjNozoki_SetupAction(this, func_80BA3230); } } else if ((this->dyna.actor.textId == 0) || Actor_TextboxIsClosing(&this->dyna.actor, play)) { - play->nextEntranceIndex = 0xE20; + play->nextEntrance = ENTRANCE(CURIOSITY_SHOP, 2); play->transitionTrigger = TRANS_TRIGGER_START; } } diff --git a/src/overlays/actors/ovl_Obj_Spidertent/z_obj_spidertent.c b/src/overlays/actors/ovl_Obj_Spidertent/z_obj_spidertent.c index 4fb83303b..05fe851a9 100644 --- a/src/overlays/actors/ovl_Obj_Spidertent/z_obj_spidertent.c +++ b/src/overlays/actors/ovl_Obj_Spidertent/z_obj_spidertent.c @@ -695,15 +695,11 @@ void func_80B30AD4(ObjSpidertent* this) { this->actionFunc = func_80B30AF8; } -#ifdef NON_MATCHING void func_80B30AF8(ObjSpidertent* this, PlayState* play) { ObjSpidertentStruct* temp_s0 = &D_80B31350[OBJSPIDERTENT_GET_1(&this->dyna.actor)]; - TriNorm* triNorm; s32 i; s32 j; s32 pad; - Vec3f sp60; - f32 sp5C; this->unk_3C6++; @@ -762,10 +758,10 @@ void func_80B30AF8(ObjSpidertent* this, PlayState* play) { func_800C62BC(play, &play->colCtx.dyna, this->dyna.bgId); } - if (this->unk_3C1 >= 0x20) { + if (this->unk_3C1 >= 32) { if (this->unk_3C7 > 0) { this->unk_3C7--; - } else if (this->unk_3C1 >= 0x33) { + } else if (this->unk_3C1 > 50) { Actor_PlaySfxAtPos(&this->dyna.actor, NA_SE_EN_EXTINCT); this->unk_3C7 = Rand_S16Offset(2, 2); } else { @@ -781,11 +777,15 @@ void func_80B30AF8(ObjSpidertent* this, PlayState* play) { } for (i = 0; i < ARRAY_COUNT(this->colliderElements); i++) { - triNorm = &this->collider.elements[i].dim; + TriNorm* triNorm = &this->collider.elements[i].dim; + Vec3f sp60; + f32 sp5C; for (j = 0; j < ARRAY_COUNT(this->unk_3B0); j++) { - if (!(this->unk_3B0[j] < 5.0f) && !(this->unk_3C0 & (1 << j)) && - func_80B2FB94(&this->unk_3A4, this->unk_3B0[j], triNorm, &sp60, &sp5C)) { + if ((this->unk_3B0[j] < 5.0f) || (this->unk_3C0 & (1 << j))) { + continue; + } + if (func_80B2FB94(&this->unk_3A4, this->unk_3B0[j], triNorm, &sp60, &sp5C)) { func_80B300F4(this, play, triNorm, &sp60, sp5C, j); } } @@ -795,9 +795,6 @@ void func_80B30AF8(ObjSpidertent* this, PlayState* play) { Actor_MarkForDeath(&this->dyna.actor); } } -#else -#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_Obj_Spidertent/func_80B30AF8.s") -#endif void ObjSpidertent_Update(Actor* thisx, PlayState* play) { ObjSpidertent* this = THIS; diff --git a/src/overlays/actors/ovl_Obj_Spinyroll/z_obj_spinyroll.c b/src/overlays/actors/ovl_Obj_Spinyroll/z_obj_spinyroll.c index 3a1cae372..0db945c96 100644 --- a/src/overlays/actors/ovl_Obj_Spinyroll/z_obj_spinyroll.c +++ b/src/overlays/actors/ovl_Obj_Spinyroll/z_obj_spinyroll.c @@ -272,26 +272,25 @@ void func_80A1DFA0(ObjSpinyroll* this) { for (i = 0; i < ARRAY_COUNT(this->unk_3A4.unk_00); i++) { for (j = 0, phi_f12 = temp_f0; j < this->unk_3A4.unk_F4; j++, phi_f12 -= temp_f2) { - this->unk_3A4.unk_00[i].unk_00[j].unk_00 = phi_f12; + this->unk_3A4.unk_00[i][j].unk_00 = phi_f12; } } } -#ifdef NON_MATCHING -// play not in s reg, something with ptr->unk_F0 = temp_s1; line s32 func_80A1E074(ObjSpinyroll* this, PlayState* play, Vec3f* arg2, s32 arg3) { + f32 temp_f0; + ObjSpinyrollStruct* ptr = &this->unk_3A4; + f32 temp_f20; s32 i; s32 j; - ObjSpinyrollStruct2* ptr = &this->unk_3A4; - f32 temp_f0; - f32 temp_f20; Vec3f spC8; Vec3f spBC; Vec3f spB0; - ObjSpinyrollStruct* temp_s1; + ObjSpinyrollSubStruct* temp_s1; f32 temp_f22; f32 temp_f24; f32 temp; + s32 pad; s32 sp98; spC8.y = this->dyna.actor.world.pos.y + 10.0f; @@ -304,19 +303,17 @@ s32 func_80A1E074(ObjSpinyroll* this, PlayState* play, Vec3f* arg2, s32 arg3) { temp = D_80A1F1F4[i]; temp_f22 = temp * this->unk_4C4.x; temp_f24 = temp * this->unk_4C4.z; - temp_s1 = &ptr->unk_00[i]; for (j = 0; j < ptr->unk_F4; j++) { - spC8.x = - (temp_s1->unk_00[j].unk_00 * Math_CosS(this->dyna.actor.world.rot.y)) + this->dyna.actor.world.pos.x; - spC8.z = - (temp_s1->unk_00[j].unk_00 * -Math_SinS(this->dyna.actor.world.rot.y)) + this->dyna.actor.world.pos.z; + temp_s1 = &ptr->unk_00[i][j]; + spC8.x = (temp_s1->unk_00 * Math_CosS(this->dyna.actor.world.rot.y)) + this->dyna.actor.world.pos.x; + spC8.z = (temp_s1->unk_00 * -Math_SinS(this->dyna.actor.world.rot.y)) + this->dyna.actor.world.pos.z; spBC.x = temp_f22 + spC8.x; spBC.z = temp_f24 + spC8.z; - if (BgCheck_EntityLineTest3(&play->colCtx, &spC8, &spBC, &spB0, &temp_s1->unk_00[j].unk_04, 1, 0, 0, 1, - &temp_s1->unk_00[j].bgId, &this->dyna.actor, 0.0f)) { + if (BgCheck_EntityLineTest3(&play->colCtx, &spC8, &spBC, &spB0, &temp_s1->unk_04, 1, 0, 0, 1, + &temp_s1->bgId, &this->dyna.actor, 0.0f)) { if (arg3 && (this->dyna.actor.flags & ACTOR_FLAG_40)) { func_80A1DA50(play, this, &spC8, &spB0); } @@ -334,10 +331,6 @@ s32 func_80A1E074(ObjSpinyroll* this, PlayState* play, Vec3f* arg2, s32 arg3) { return sp98; } -#else -s32 func_80A1E074(ObjSpinyroll* this, PlayState* play, Vec3f* arg2, s32 arg3); -#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_Obj_Spinyroll/func_80A1E074.s") -#endif s32 func_80A1E2D8(ObjSpinyroll* this, PlayState* play, s32 arg2) { Vec3f sp1C; @@ -363,10 +356,9 @@ s32 func_80A1E394(CollisionContext* colCtx, f32* arg1, CollisionPoly** polyOut, return BgCheck_EntityCheckCeiling(colCtx, arg1, arg4, 24.0f, polyOut, bgId, &this->dyna.actor); } -#ifdef NON_MATCHING s32 func_80A1E3D8(ObjSpinyroll* this, PlayState* play, f32* arg2, s32 arg3) { - f32 temp_f20; - ObjSpinyrollStruct2* spC8; + f32 phi_f26; + ObjSpinyrollStruct* spC8 = &this->unk_3A4; f32 phi_f22; ObjSpinyrollColFunc spC0; s32 i; @@ -374,11 +366,12 @@ s32 func_80A1E3D8(ObjSpinyroll* this, PlayState* play, f32* arg2, s32 arg3) { Vec3f spAC; Vec3f spA0; Vec3f sp94; - ObjSpinyrollStruct* temp_s0; - f32 phi_f26; + ObjSpinyrollSubStruct* temp_s0; + f32 temp_f20; + s32 pad; s32 sp84; - - spC8 = &this->unk_3A4; + s32 pad2; + f32* temp; if (this->unk_4C4.y > 0.0f) { spC0 = func_80A1E394; @@ -393,18 +386,19 @@ s32 func_80A1E3D8(ObjSpinyroll* this, PlayState* play, f32* arg2, s32 arg3) { phi_f22 = FLT_MAX; spC8->unk_F0 = NULL; - for (i = 0; i < ARRAY_COUNT(this->unk_3A4.unk_00); i++) { - sp94.z = D_80A1F1FC[i]; - temp_s0 = &spC8->unk_00[i]; + for (i = 0, temp = D_80A1F1FC; i < ARRAY_COUNT(this->unk_3A4.unk_00); i++, temp++) { + sp94.z = *temp; for (j = 0; j < spC8->unk_F4; j++) { - sp94.x = temp_s0->unk_00[j].unk_00; + temp_s0 = &spC8->unk_00[i][j]; + + sp94.x = temp_s0->unk_00; func_80A1DAAC(&spAC, &sp94, this->dyna.actor.world.rot.y); spAC.x += this->dyna.actor.world.pos.x; spAC.z += this->dyna.actor.world.pos.z; - if (spC0(&play->colCtx, &spA0.y, &temp_s0->unk_00[j].unk_04, &temp_s0->unk_00[j].bgId, &spAC, this)) { + if (spC0(&play->colCtx, &spA0.y, &temp_s0->unk_04, &temp_s0->bgId, &spAC, this)) { temp_f20 = fabsf(spA0.y - spAC.y); if (temp_f20 <= 24.0f) { if (arg3 && (this->dyna.actor.flags & ACTOR_FLAG_40)) { @@ -425,10 +419,6 @@ s32 func_80A1E3D8(ObjSpinyroll* this, PlayState* play, f32* arg2, s32 arg3) { } return sp84; } -#else -s32 func_80A1E3D8(ObjSpinyroll* this, PlayState* play, f32* arg2, s32 arg3); -#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_Obj_Spinyroll/func_80A1E3D8.s") -#endif s32 func_80A1E648(ObjSpinyroll* this, PlayState* play, s32 arg2) { f32 sp1C; @@ -442,7 +432,7 @@ s32 func_80A1E648(ObjSpinyroll* this, PlayState* play, s32 arg2) { DynaPolyActor* func_80A1E694(ObjSpinyroll* this, PlayState* play) { if (this->unk_3A4.unk_F0 != NULL) { - return DynaPoly_GetActor(&play->colCtx, this->unk_3A4.unk_F0->unk_00[0].bgId); + return DynaPoly_GetActor(&play->colCtx, this->unk_3A4.unk_F0->bgId); } return NULL; } diff --git a/src/overlays/actors/ovl_Obj_Spinyroll/z_obj_spinyroll.h b/src/overlays/actors/ovl_Obj_Spinyroll/z_obj_spinyroll.h index 741385264..10322586a 100644 --- a/src/overlays/actors/ovl_Obj_Spinyroll/z_obj_spinyroll.h +++ b/src/overlays/actors/ovl_Obj_Spinyroll/z_obj_spinyroll.h @@ -24,22 +24,16 @@ typedef struct { } ObjSpinyrollSubStruct; // size = 0xC typedef struct { - /* 0x00 */ ObjSpinyrollSubStruct unk_00[10]; -} ObjSpinyrollStruct; // size = 0x78 - -typedef struct { - /* 0x00 */ ObjSpinyrollStruct unk_00[2]; - /* 0xF0 */ ObjSpinyrollStruct* unk_F0; + /* 0x00 */ ObjSpinyrollSubStruct unk_00[2][10]; + /* 0xF0 */ ObjSpinyrollSubStruct* unk_F0; /* 0xF4 */ s32 unk_F4; -} ObjSpinyrollStruct2; // size = 0xF8? +} ObjSpinyrollStruct; // size = 0xF8? typedef struct ObjSpinyroll { /* 0x000 */ DynaPolyActor dyna; /* 0x15C */ ColliderTris collider; /* 0x17C */ ColliderTrisElement colliderElements[6]; - /* 0x3A4 */ ObjSpinyrollStruct2 unk_3A4; - ///* 0x494 */ ObjSpinyrollStruct* unk_494; // alternative testing - ///* 0x498 */ s32 unk_498; + /* 0x3A4 */ ObjSpinyrollStruct unk_3A4; /* 0x49C */ s32 unk_49C; /* 0x4A0 */ ObjSpinyrollActionFunc actionFunc; /* 0x4A4 */ f32 unk_4A4; diff --git a/src/overlays/actors/ovl_Obj_Syokudai/z_obj_syokudai.c b/src/overlays/actors/ovl_Obj_Syokudai/z_obj_syokudai.c index c14a5213a..7625b403f 100644 --- a/src/overlays/actors/ovl_Obj_Syokudai/z_obj_syokudai.c +++ b/src/overlays/actors/ovl_Obj_Syokudai/z_obj_syokudai.c @@ -254,8 +254,8 @@ void ObjSyokudai_Update(Actor* thisx, PlayState* play2) { OBJ_SYOKUDAI_SNUFF_TIMER_INITIAL(groupSize) + OBJ_SYOKUDAI_SNUFF_TIMER_JUST_LIT_BONUS; } } - Audio_PlaySfxGeneral(NA_SE_EV_FLAME_IGNITION, &thisx->projectedPos, 4, &D_801DB4B0, &D_801DB4B0, - &gSfxDefaultReverb); + AudioSfx_PlaySfx(NA_SE_EV_FLAME_IGNITION, &thisx->projectedPos, 4, &gSfxDefaultFreqAndVolScale, + &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb); } } } diff --git a/src/overlays/actors/ovl_Obj_Tokeidai/z_obj_tokeidai.c b/src/overlays/actors/ovl_Obj_Tokeidai/z_obj_tokeidai.c index 9b78bc273..79b2e577e 100644 --- a/src/overlays/actors/ovl_Obj_Tokeidai/z_obj_tokeidai.c +++ b/src/overlays/actors/ovl_Obj_Tokeidai/z_obj_tokeidai.c @@ -457,7 +457,7 @@ void ObjTokeidai_TowerOpening_EndCutscene(ObjTokeidai* this, PlayState* play) { gSaveContext.nextCutsceneIndex = 0; gSaveContext.respawnFlag = 2; play->transitionTrigger = TRANS_TRIGGER_START; - play->nextEntranceIndex = gSaveContext.respawn[RESPAWN_MODE_RETURN].entranceIndex; + play->nextEntrance = gSaveContext.respawn[RESPAWN_MODE_RETURN].entrance; play->transitionType = TRANS_TYPE_02; if (gSaveContext.respawn[RESPAWN_MODE_RETURN].playerParams == 0xCFF) { gSaveContext.nextTransitionType = TRANS_TYPE_21; diff --git a/src/overlays/actors/ovl_Obj_Tsubo/z_obj_tsubo.c b/src/overlays/actors/ovl_Obj_Tsubo/z_obj_tsubo.c index 32a0a0d54..c2cc74a82 100644 --- a/src/overlays/actors/ovl_Obj_Tsubo/z_obj_tsubo.c +++ b/src/overlays/actors/ovl_Obj_Tsubo/z_obj_tsubo.c @@ -498,7 +498,7 @@ void func_809289E4(ObjTsubo* this, PlayState* play) { this->actor.flags &= ~ACTOR_FLAG_10; } } - if ((this->actor.xzDistToPlayer < 800.0f) || (gSaveContext.save.entranceIndex == 0xD010)) { + if ((this->actor.xzDistToPlayer < 800.0f) || (gSaveContext.save.entrance == ENTRANCE(GORON_RACETRACK, 1))) { Collider_UpdateCylinder(&this->actor, &this->cylinderCollider); CollisionCheck_SetAC(play, &play->colChkCtx, &this->cylinderCollider.base); if (this->actor.xzDistToPlayer < 150.0f) { diff --git a/src/overlays/actors/ovl_Obj_Um/z_obj_um.c b/src/overlays/actors/ovl_Obj_Um/z_obj_um.c index 658cae652..dc4270bf2 100644 --- a/src/overlays/actors/ovl_Obj_Um/z_obj_um.c +++ b/src/overlays/actors/ovl_Obj_Um/z_obj_um.c @@ -58,7 +58,7 @@ void ObjUm_Update(Actor* thisx, PlayState* play); void ObjUm_Draw(Actor* thisx, PlayState* play); void ObjUm_DefaultAnim(ObjUm* this, PlayState* play); -void ObjUm_UpdateAnim(ObjUm* this, PlayState* play, ObjUmAnimimations index); +void ObjUm_ChangeAnim(ObjUm* this, PlayState* play, ObjUmAnimation index); void ObjUm_SetupAction(ObjUm* this, ObjUmActionFunc actionFunc); const ActorInit Obj_Um_InitVars = { @@ -795,7 +795,7 @@ void ObjUm_Destroy(Actor* thisx, PlayState* play) { DynaPoly_DeleteBgActor(play, &play->colCtx.dyna, this->dyna.bgId); for (i = 0; i < ARRAY_COUNT(this->potPos); i++) { - Audio_StopSfxByPos(&this->potPos[i]); + AudioSfx_StopByPos(&this->potPos[i]); } Collider_DestroyCylinder(play, &this->banditsCollisions[0]); @@ -833,7 +833,7 @@ s32 func_80B795A0(PlayState* play, ObjUm* this, s32 arg2) { player = GET_PLAYER(play); func_8019F208(); gSaveContext.save.weekEventReg[31] |= 0x80; - play->nextEntranceIndex = 0x64B0; + play->nextEntrance = ENTRANCE(ROMANI_RANCH, 11); if (player->stateFlags1 & PLAYER_STATE1_800000) { D_801BDAA0 = 1; } @@ -992,7 +992,7 @@ void ObjUm_RanchWait(ObjUm* this, PlayState* play) { this->dyna.actor.flags |= ACTOR_FLAG_1; SkelAnime_Update(&this->skelAnime); - ObjUm_UpdateAnim(this, play, OBJ_UM_ANIM_IDLE); + ObjUm_ChangeAnim(this, play, OBJ_UM_ANIM_IDLE); this->flags |= OBJ_UM_FLAG_WAITING; if ((gSaveContext.save.time > CLOCK_TIME(18, 0)) && (gSaveContext.save.time <= CLOCK_TIME(19, 0))) { if (!(player->stateFlags1 & PLAYER_STATE1_800000)) { @@ -1121,9 +1121,9 @@ ObjUmPathState ObjUm_UpdatePath(ObjUm* this, PlayState* play) { } } - if (this->currentAnimIndex == OBJ_UM_ANIM_TROT) { + if (this->animIndex == OBJ_UM_ANIM_TROT) { this->dyna.actor.speedXZ = 4.0f; - } else if (this->currentAnimIndex == OBJ_UM_ANIM_GALLOP) { + } else if (this->animIndex == OBJ_UM_ANIM_GALLOP) { this->dyna.actor.speedXZ = 8.0f; } @@ -1133,14 +1133,14 @@ ObjUmPathState ObjUm_UpdatePath(ObjUm* this, PlayState* play) { void ObjUm_RanchWaitPathFinished(ObjUm* this, PlayState* play) { this->wheelRot += 0x3E8; this->flags &= ~OBJ_UM_FLAG_WAITING; - ObjUm_UpdateAnim(this, play, OBJ_UM_ANIM_TROT); + ObjUm_ChangeAnim(this, play, OBJ_UM_ANIM_TROT); switch (ObjUm_UpdatePath(this, play)) { case OBJUM_PATH_STATE_1: case OBJUM_PATH_STATE_FINISH: if (gSaveContext.save.weekEventReg[31] & 0x80) { ActorCutscene_Stop(this->dyna.actor.cutscene); - play->nextEntranceIndex = 0x3E50; + play->nextEntrance = ENTRANCE(MILK_ROAD, 5); play->transitionType = TRANS_TYPE_64; gSaveContext.nextTransitionType = TRANS_TYPE_03; play->transitionTrigger = TRANS_TRIGGER_START; @@ -1156,7 +1156,7 @@ void ObjUm_RanchWaitPathFinished(ObjUm* this, PlayState* play) { } void ObjUm_RanchStartCs(ObjUm* this, PlayState* play) { - ObjUm_UpdateAnim(this, play, OBJ_UM_ANIM_IDLE); + ObjUm_ChangeAnim(this, play, OBJ_UM_ANIM_IDLE); if (ActorCutscene_GetCanPlayNext(this->dyna.actor.cutscene)) { ActorCutscene_StartAndSetUnkLinkFields(this->dyna.actor.cutscene, &this->dyna.actor); @@ -1185,9 +1185,9 @@ void func_80B7A070(ObjUm* this, PlayState* play) { } void func_80B7A0E0(ObjUm* this, PlayState* play) { - ObjUm_UpdateAnim(this, play, OBJ_UM_ANIM_IDLE); + ObjUm_ChangeAnim(this, play, OBJ_UM_ANIM_IDLE); if (gSaveContext.save.time != this->lastTime) { - ObjUm_UpdateAnim(this, play, OBJ_UM_ANIM_TROT); + ObjUm_ChangeAnim(this, play, OBJ_UM_ANIM_TROT); ObjUm_SetupAction(this, func_80B7A070); } } @@ -1199,7 +1199,7 @@ void func_80B7A144(ObjUm* this, PlayState* play) { this->flags |= OBJ_UM_FLAG_0100; this->flags |= OBJ_UM_FLAG_0004; player->stateFlags1 |= PLAYER_STATE1_20; - ObjUm_UpdateAnim(this, play, OBJ_UM_ANIM_IDLE); + ObjUm_ChangeAnim(this, play, OBJ_UM_ANIM_IDLE); ObjUm_SetupAction(this, ObjUm_RanchStartCs); } @@ -1227,7 +1227,7 @@ void ObjUm_PreMilkRunDialogueHandler(ObjUm* this, PlayState* play) { } void func_80B7A240(ObjUm* this, PlayState* play) { - ObjUm_UpdateAnim(this, play, OBJ_UM_ANIM_IDLE); + ObjUm_ChangeAnim(this, play, OBJ_UM_ANIM_IDLE); if (gSaveContext.save.time != this->lastTime) { ObjUm_SetupAction(this, func_80B7A2AC); } @@ -1238,12 +1238,12 @@ void func_80B7A240(ObjUm* this, PlayState* play) { void func_80B7A2AC(ObjUm* this, PlayState* play) { this->wheelRot += 0x3E8; - ObjUm_UpdateAnim(this, play, OBJ_UM_ANIM_TROT); + ObjUm_ChangeAnim(this, play, OBJ_UM_ANIM_TROT); switch (ObjUm_UpdatePath(this, play)) { case OBJUM_PATH_STATE_1: case OBJUM_PATH_STATE_FINISH: - play->nextEntranceIndex = 0xCE40; + play->nextEntrance = ENTRANCE(GORMAN_TRACK, 4); play->transitionType = TRANS_TYPE_64; gSaveContext.nextTransitionType = TRANS_TYPE_03; play->transitionTrigger = TRANS_TRIGGER_START; @@ -1265,7 +1265,7 @@ void func_80B7A394(ObjUm* this, PlayState* play) { ObjUm_SetPlayerPosition(this, play); this->flags |= OBJ_UM_FLAG_0004; if (gSaveContext.save.time != this->lastTime) { - ObjUm_UpdateAnim(this, play, OBJ_UM_ANIM_TROT); + ObjUm_ChangeAnim(this, play, OBJ_UM_ANIM_TROT); ObjUm_SetupAction(this, func_80B7A2AC); } } @@ -1290,7 +1290,7 @@ void ObjUm_RunMinigame(ObjUm* this, PlayState* play) { ObjUm_RotatePlayer(this, play, 0x7FFF); this->wheelRot += 0x7D0; this->flags |= OBJ_UM_FLAG_0010; - ObjUm_UpdateAnim(this, play, OBJ_UM_ANIM_GALLOP); + ObjUm_ChangeAnim(this, play, OBJ_UM_ANIM_GALLOP); switch (ObjUm_UpdatePath(this, play)) { case OBJUM_PATH_STATE_1: @@ -1301,14 +1301,14 @@ void ObjUm_RunMinigame(ObjUm* this, PlayState* play) { if (!(gSaveContext.save.weekEventReg[52] & 1) && !(gSaveContext.save.weekEventReg[52] & 2)) { if (!this->areAllPotsBroken) { - play->nextEntranceIndex = 0x3E60; + play->nextEntrance = ENTRANCE(MILK_ROAD, 6); play->transitionType = TRANS_TYPE_64; gSaveContext.nextTransitionType = TRANS_TYPE_03; play->transitionTrigger = TRANS_TRIGGER_START; gSaveContext.save.weekEventReg[52] |= 1; gSaveContext.save.weekEventReg[52] &= (u8)~2; } else { - play->nextEntranceIndex = 0x6480; + play->nextEntrance = ENTRANCE(ROMANI_RANCH, 8); play->transitionType = TRANS_TYPE_64; gSaveContext.nextTransitionType = TRANS_TYPE_03; play->transitionTrigger = TRANS_TRIGGER_START; @@ -1333,7 +1333,7 @@ void func_80B7A614(ObjUm* this, PlayState* play) { this->wheelRot += 0x7D0; this->flags |= OBJ_UM_FLAG_0010; this->flags |= OBJ_UM_FLAG_PLAYING_MINIGAME; - ObjUm_UpdateAnim(this, play, OBJ_UM_ANIM_GALLOP); + ObjUm_ChangeAnim(this, play, OBJ_UM_ANIM_GALLOP); if (ObjUm_UpdatePath(this, play) == OBJUM_PATH_STATE_3 && this->unk_4DC == 0) { this->unk_4DC = 1; @@ -1387,7 +1387,7 @@ void func_80B7A7AC(ObjUm* this, PlayState* play) { this->flags |= OBJ_UM_FLAG_0010; func_80B78DF0(this, play); this->flags |= 4; - ObjUm_UpdateAnim(this, play, OBJ_UM_ANIM_GALLOP); + ObjUm_ChangeAnim(this, play, OBJ_UM_ANIM_GALLOP); ObjUm_SetupAction(this, func_80B7A614); } @@ -1488,7 +1488,7 @@ void func_80B7A860(ObjUm* this, PlayState* play) { } void func_80B7AB78(ObjUm* this, PlayState* play) { - ObjUm_UpdateAnim(this, play, OBJ_UM_ANIM_IDLE); + ObjUm_ChangeAnim(this, play, OBJ_UM_ANIM_IDLE); if (gSaveContext.save.time != this->lastTime) { ObjUm_SetupAction(this, func_80B7ABE4); } @@ -1500,7 +1500,7 @@ void func_80B7AB78(ObjUm* this, PlayState* play) { void func_80B7ABE4(ObjUm* this, PlayState* play) { this->wheelRot += 0x3E8; - ObjUm_UpdateAnim(this, play, OBJ_UM_ANIM_TROT); + ObjUm_ChangeAnim(this, play, OBJ_UM_ANIM_TROT); switch (ObjUm_UpdatePath(this, play)) { case OBJUM_PATH_STATE_FINISH: func_80B79524(this); @@ -1543,14 +1543,14 @@ void ObjUm_PostMilkRunWaitPathFinished(ObjUm* this, PlayState* play) { ObjUm_RotatePlayer(this, play, 0); this->flags |= OBJ_UM_FLAG_0004; this->wheelRot += 0x3E8; - ObjUm_UpdateAnim(this, play, OBJ_UM_ANIM_TROT); + ObjUm_ChangeAnim(this, play, OBJ_UM_ANIM_TROT); if ((ObjUm_UpdatePath(this, play) == OBJUM_PATH_STATE_4) && !(gSaveContext.save.weekEventReg[59] & 2)) { ActorCutscene_Stop(this->dyna.actor.cutscene); Audio_SetCutsceneFlag(false); gSaveContext.save.weekEventReg[59] |= 2; gSaveContext.nextCutsceneIndex = 0xFFF3; - play->nextEntranceIndex = 0x5400; + play->nextEntrance = ENTRANCE(TERMINA_FIELD, 0); play->transitionType = TRANS_TYPE_64; gSaveContext.nextTransitionType = TRANS_TYPE_03; play->transitionTrigger = TRANS_TRIGGER_START; @@ -1566,7 +1566,7 @@ void ObjUm_PostMilkRunStartCs(ObjUm* this, PlayState* play) { ObjUm_SetPlayerPosition(this, play); ObjUm_RotatePlayer(this, play, 0); this->flags |= OBJ_UM_FLAG_0004; - ObjUm_UpdateAnim(this, play, OBJ_UM_ANIM_IDLE); + ObjUm_ChangeAnim(this, play, OBJ_UM_ANIM_IDLE); if (ActorCutscene_GetCanPlayNext(this->dyna.actor.cutscene)) { ActorCutscene_StartAndSetUnkLinkFields(this->dyna.actor.cutscene, &this->dyna.actor); @@ -1577,7 +1577,7 @@ void ObjUm_PostMilkRunStartCs(ObjUm* this, PlayState* play) { } void ObjUm_TerminaFieldIdle(ObjUm* this, PlayState* play) { - ObjUm_UpdateAnim(this, play, OBJ_UM_ANIM_IDLE); + ObjUm_ChangeAnim(this, play, OBJ_UM_ANIM_IDLE); SkelAnime_Update(&this->skelAnime); } @@ -1627,7 +1627,7 @@ void func_80B7AF30(ObjUm* this, PlayState* play) { void ObjUm_DefaultAnim(ObjUm* this, PlayState* play) { Animation_PlayOnce(&this->skelAnime, &gUmTrotAnim); - this->currentAnimIndex = OBJ_UM_ANIM_TROT; + this->animIndex = OBJ_UM_ANIM_TROT; } typedef struct { @@ -1643,45 +1643,45 @@ struct_80B7C25C sUmAnims[] = { { &gUmLookBackAnim, false }, // OBJ_UM_ANIM_LOOK_BACK }; -void ObjUm_UpdateAnim(ObjUm* this, PlayState* play, ObjUmAnimimations index) { +void ObjUm_ChangeAnim(ObjUm* this, PlayState* play, ObjUmAnimation animIndex) { s32 changeAnim; s32 temp; - s32 indexTemp = index; + s32 indexTemp = animIndex; f32 animPlaybackSpeed = 0.0f; - if (sUmAnims[index].doesMove) { + if (sUmAnims[animIndex].doesMove) { this->flags |= OBJ_UM_FLAG_MOVING; } else { this->flags &= ~OBJ_UM_FLAG_MOVING; } - if (index == OBJ_UM_ANIM_TROT) { + if (animIndex == OBJ_UM_ANIM_TROT) { animPlaybackSpeed = this->dyna.actor.speedXZ * 0.25f; - } else if (index == OBJ_UM_ANIM_GALLOP) { + } else if (animIndex == OBJ_UM_ANIM_GALLOP) { animPlaybackSpeed = this->dyna.actor.speedXZ * 0.2f; - } else if (index == OBJ_UM_ANIM_IDLE) { + } else if (animIndex == OBJ_UM_ANIM_IDLE) { animPlaybackSpeed = 1.0f; } this->skelAnime.playSpeed = animPlaybackSpeed; if (this->flags & OBJ_UM_FLAG_LOOK_BACK) { this->skelAnime.playSpeed = 1.0f; - index = OBJ_UM_ANIM_MINUS_1; + animIndex = OBJ_UM_ANIM_MINUS_1; } - changeAnim = (index != this->currentAnimIndex); + changeAnim = (animIndex != this->animIndex); if (SkelAnime_Update(&this->skelAnime) || changeAnim) { - this->currentAnimIndex = index; + this->animIndex = animIndex; - if (index != OBJ_UM_ANIM_MINUS_1) { + if (animIndex != OBJ_UM_ANIM_MINUS_1) { if (this->donkey != NULL) { - this->donkey->unk_538 = index; + this->donkey->unk_538 = animIndex; } if (changeAnim) { - Animation_MorphToPlayOnce(&this->skelAnime, sUmAnims[index].anim, -3.0f); + Animation_MorphToPlayOnce(&this->skelAnime, sUmAnims[animIndex].anim, -3.0f); } else { - Animation_PlayOnce(&this->skelAnime, sUmAnims[index].anim); + Animation_PlayOnce(&this->skelAnime, sUmAnims[animIndex].anim); } } else { EnHorse* donkey = this->donkey; @@ -1691,10 +1691,10 @@ void ObjUm_UpdateAnim(ObjUm* this, PlayState* play, ObjUmAnimimations index) { } if (changeAnim) { - temp = 3 - index; // OBJ_UM_ANIM_LOOK_BACK + temp = 3 - animIndex; // OBJ_UM_ANIM_LOOK_BACK Animation_MorphToPlayOnce(&this->skelAnime, sUmAnims[temp].anim, -10.0f); } else { - temp = 3 - index; // OBJ_UM_ANIM_LOOK_BACK + temp = 3 - animIndex; // OBJ_UM_ANIM_LOOK_BACK Animation_PlayOnce(&this->skelAnime, sUmAnims[temp].anim); } } diff --git a/src/overlays/actors/ovl_Obj_Um/z_obj_um.h b/src/overlays/actors/ovl_Obj_Um/z_obj_um.h index 9d228eda8..74eb5f521 100644 --- a/src/overlays/actors/ovl_Obj_Um/z_obj_um.h +++ b/src/overlays/actors/ovl_Obj_Um/z_obj_um.h @@ -11,14 +11,14 @@ typedef void (*ObjUmActionFunc)(struct ObjUm*, PlayState*); #define MILK_POTS_COUNT 3 -typedef enum ObjUmAnimimations { +typedef enum ObjUmAnimation { /* -1 */ OBJ_UM_ANIM_MINUS_1 = -1, /* 0 */ OBJ_UM_ANIM_TROT, /* 1 */ OBJ_UM_ANIM_GALLOP, /* 2 */ OBJ_UM_ANIM_IDLE, /* 3 */ OBJ_UM_ANIM_3, // NULL pointer /* 4 */ OBJ_UM_ANIM_LOOK_BACK -} ObjUmAnimimations; +} ObjUmAnimation; typedef struct ObjUm { /* 0x000 */ DynaPolyActor dyna; @@ -40,7 +40,7 @@ typedef struct ObjUm { /* 0x2F4 */ s32 flags; /* 0x2BC */ Vec3s unk_2F8; /* 0x2FE */ Vec3s unk_2FE; - /* 0x304 */ ObjUmAnimimations currentAnimIndex; + /* 0x304 */ ObjUmAnimation animIndex; /* 0x308 */ Vec3f unk_308; /* 0x314 */ s32 potsLife[MILK_POTS_COUNT]; /* 0x320 */ s32 wasPotHit[MILK_POTS_COUNT]; // resets to false in the same frame diff --git a/src/overlays/actors/ovl_Obj_Wturn/z_obj_wturn.c b/src/overlays/actors/ovl_Obj_Wturn/z_obj_wturn.c index 6e5b44772..83e06a1a3 100644 --- a/src/overlays/actors/ovl_Obj_Wturn/z_obj_wturn.c +++ b/src/overlays/actors/ovl_Obj_Wturn/z_obj_wturn.c @@ -112,10 +112,10 @@ void func_808A7C78(ObjWturn* this, PlayState* play) { play->transitionType = TRANS_TYPE_64; gSaveContext.nextTransitionType = TRANS_TYPE_03; gSaveContext.nextCutsceneIndex = 0; - if (play->sceneNum == 0x58) { - play->nextEntranceIndex = 0xAC00; + if (play->sceneNum == SCENE_F40) { + play->nextEntrance = ENTRANCE(STONE_TOWER_INVERTED, 0); } else { - play->nextEntranceIndex = 0xAA10; + play->nextEntrance = ENTRANCE(STONE_TOWER, 1); } play->transitionTrigger = TRANS_TRIGGER_START; } diff --git a/src/overlays/actors/ovl_Object_Kankyo/z_object_kankyo.c b/src/overlays/actors/ovl_Object_Kankyo/z_object_kankyo.c index a21e6c4f1..0247cd23a 100644 --- a/src/overlays/actors/ovl_Object_Kankyo/z_object_kankyo.c +++ b/src/overlays/actors/ovl_Object_Kankyo/z_object_kankyo.c @@ -648,23 +648,22 @@ f32 func_808DDE74(void) { } #ifdef NON_MATCHING -// play->envCtx.unk_F2[1] needs to be loaded into s0 and then copied to s7 +// s2/s3 swapped void func_808DDE9C(Actor* thisx, PlayState* play2) { PlayState* play = play2; ObjectKankyo* this = THIS; Player* player = GET_PLAYER(play); s32 i; - s16 temp; + u8 phi_s5; + u16 end = play->envCtx.unk_F2[1]; f32 temp_f12; f32 temp_f20; f32 temp_f22; f32 temp_f2; - u8 phi_s5; - s32 end = play->envCtx.unk_F2[1]; OPEN_DISPS(play->state.gfxCtx); - if (end != 0) { + if (end) { gDPPipeSync(POLY_XLU_DISP++); gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, 150, 255, 255, 25); POLY_XLU_DISP = Gfx_CallSetupDL(POLY_XLU_DISP, 20); diff --git a/src/overlays/actors/ovl_Oceff_Wipe7/z_oceff_wipe7.c b/src/overlays/actors/ovl_Oceff_Wipe7/z_oceff_wipe7.c index 3eee00a94..abd01e1ff 100644 --- a/src/overlays/actors/ovl_Oceff_Wipe7/z_oceff_wipe7.c +++ b/src/overlays/actors/ovl_Oceff_Wipe7/z_oceff_wipe7.c @@ -15,7 +15,6 @@ void OceffWipe7_Destroy(Actor* thisx, PlayState* play); void OceffWipe7_Update(Actor* thisx, PlayState* play); void OceffWipe7_Draw(Actor* thisx, PlayState* play); -#if 0 const ActorInit Oceff_Wipe7_InitVars = { ACTOR_OCEFF_WIPE7, ACTORCAT_ITEMACTION, @@ -28,12 +27,77 @@ const ActorInit Oceff_Wipe7_InitVars = { (ActorFunc)OceffWipe7_Draw, }; -#endif +#include "assets/overlays/ovl_Oceff_Wipe7/ovl_Oceff_Wipe7.c" -#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_Oceff_Wipe7/OceffWipe7_Init.s") +s32 D_80BCEB10; -#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_Oceff_Wipe7/OceffWipe7_Destroy.s") +void OceffWipe7_Init(Actor* thisx, PlayState* play) { + OceffWipe7* this = THIS; -#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_Oceff_Wipe7/OceffWipe7_Update.s") + Actor_SetScale(&this->actor, 1.0f); + this->counter = 0; + this->actor.world.pos = GET_ACTIVE_CAM(play)->eye; +} -#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_Oceff_Wipe7/OceffWipe7_Draw.s") +void OceffWipe7_Destroy(Actor* thisx, PlayState* play) { + OceffWipe7* this = THIS; + + Magic_Reset(play); + play->msgCtx.unk120B0 = 0; +} + +void OceffWipe7_Update(Actor* thisx, PlayState* play) { + OceffWipe7* this = THIS; + + this->actor.world.pos = GET_ACTIVE_CAM(play)->eye; + if (this->counter < 100) { + this->counter++; + } else { + Actor_MarkForDeath(&this->actor); + } +} + +void OceffWipe7_Draw(Actor* thisx, PlayState* play) { + OceffWipe7* this = THIS; + f32 z; + u8 alpha; + s32 i; + s32 counter; + Vec3f activeCamEye = GET_ACTIVE_CAM(play)->eye; + s32 pad; + Vec3f quakeOffset; + s32 pad2; + + Camera_GetQuakeOffset(&quakeOffset, GET_ACTIVE_CAM(play)); + + if (this->counter < 32) { + z = Math_SinS(this->counter * 0x200) * 1220.0f; + } else { + z = 1220.0f; + } + + if (this->counter >= 80) { + alpha = 12 * (100 - this->counter); + } else { + alpha = 255; + } + + for (i = 1; i < ARRAY_COUNT(sSongofHealingEffectFrustrumVtx); i += 2) { + sSongofHealingEffectFrustrumVtx[i].v.cn[3] = alpha; + } + + OPEN_DISPS(play->state.gfxCtx); + + func_8012C2DC(play->state.gfxCtx); + Matrix_Translate(activeCamEye.x + quakeOffset.x, activeCamEye.y + quakeOffset.y, activeCamEye.z + quakeOffset.z, + MTXMODE_NEW); + Matrix_Scale(0.1f, 0.1f, 0.1f, MTXMODE_APPLY); + Matrix_ReplaceRotation(&play->billboardMtxF); + Matrix_RotateXS(0x708, MTXMODE_APPLY); + Matrix_Translate(0.0f, 0.0f, -z, MTXMODE_APPLY); + gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(play->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); + AnimatedMat_Draw(play, sSongofHealingEffectTexAnim); + gSPDisplayList(POLY_XLU_DISP++, sSongOfHealingEffectFrustumDL); + + CLOSE_DISPS(play->state.gfxCtx); +} diff --git a/src/overlays/actors/ovl_Oceff_Wipe7/z_oceff_wipe7.h b/src/overlays/actors/ovl_Oceff_Wipe7/z_oceff_wipe7.h index df517e1fe..d5d82130c 100644 --- a/src/overlays/actors/ovl_Oceff_Wipe7/z_oceff_wipe7.h +++ b/src/overlays/actors/ovl_Oceff_Wipe7/z_oceff_wipe7.h @@ -7,7 +7,7 @@ struct OceffWipe7; typedef struct OceffWipe7 { /* 0x000 */ Actor actor; - /* 0x144 */ char unk_144[0x4]; + /* 0x144 */ s16 counter; } OceffWipe7; // size = 0x148 extern const ActorInit Oceff_Wipe7_InitVars; diff --git a/src/overlays/effects/ovl_Effect_Ss_Dead_Dd/z_eff_ss_dead_dd.c b/src/overlays/effects/ovl_Effect_Ss_Dead_Dd/z_eff_ss_dead_dd.c index b1d6bb8af..6dfbce5a1 100644 --- a/src/overlays/effects/ovl_Effect_Ss_Dead_Dd/z_eff_ss_dead_dd.c +++ b/src/overlays/effects/ovl_Effect_Ss_Dead_Dd/z_eff_ss_dead_dd.c @@ -5,23 +5,141 @@ */ #include "z_eff_ss_dead_dd.h" +#include "objects/gameplay_keep/gameplay_keep.h" + +#define rScale regs[0] +#define rPrimColorR regs[2] +#define rPrimColorG regs[3] +#define rPrimColorB regs[4] +#define rAlpha regs[5] +#define rEnvColorR regs[6] +#define rEnvColorG regs[7] +#define rEnvColorB regs[8] +#define rScaleStep regs[9] +#define rAlphaStep regs[10] +#define rAlphaMode regs[11] #define PARAMS ((EffectSsDeadDdInitParams*)initParamsx) -s32 EffectSsDeadDd_Init(PlayState* play, u32 index, EffectSs* this, void* initParamsx); +u32 EffectSsDeadDd_Init(PlayState* play, u32 index, EffectSs* this, void* initParamsx); void EffectSsDeadDd_Update(PlayState* play, u32 index, EffectSs* this); void EffectSsDeadDd_Draw(PlayState* play, u32 index, EffectSs* this); -#if 0 const EffectSsInit Effect_Ss_Dead_Dd_InitVars = { EFFECT_SS_DEAD_DD, EffectSsDeadDd_Init, }; -#endif +u32 EffectSsDeadDd_Init(PlayState* play, u32 index, EffectSs* this, void* initParamsx) { + EffectSsDeadDdInitParams* initParams = PARAMS; -#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_Effect_Ss_Dead_Dd/EffectSsDeadDd_Init.s") + if (initParams->type == DEADDD_TYPE_0) { + this->pos = initParams->pos; + this->velocity = initParams->velocity; + this->accel = initParams->accel; + this->life = initParams->life; + this->rScaleStep = initParams->scaleStep; + this->rAlphaMode = initParams->alphaStep; -#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_Effect_Ss_Dead_Dd/EffectSsDeadDd_Draw.s") + if (initParams->alphaStep != 0) { + this->rAlphaStep = initParams->alphaStep; + } else { + this->rAlphaStep = initParams->primColor.a / initParams->life; + } -#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_Effect_Ss_Dead_Dd/EffectSsDeadDd_Update.s") + this->draw = EffectSsDeadDd_Draw; + this->update = EffectSsDeadDd_Update; + this->rScale = initParams->scale; + this->rPrimColorR = initParams->primColor.r; + this->rPrimColorG = initParams->primColor.g; + this->rPrimColorB = initParams->primColor.b; + this->rAlpha = initParams->primColor.a; + this->rEnvColorR = initParams->envColor.r; + this->rEnvColorG = initParams->envColor.g; + this->rEnvColorB = initParams->envColor.b; + + } else if (initParams->type == DEADDD_TYPE_1) { + s32 i; + + this->life = initParams->life; + this->rScaleStep = initParams->scaleStep; + this->rAlphaMode = 0; + this->rAlphaStep = 155 / initParams->life; + this->rScale = initParams->scale; + this->rPrimColorR = 255; + this->rPrimColorG = 255; + this->rPrimColorB = 155; + this->rAlpha = 155; + this->rEnvColorR = 250; + this->rEnvColorG = 180; + this->rEnvColorB = 0; + this->draw = EffectSsDeadDd_Draw; + this->update = EffectSsDeadDd_Update; + + for (i = initParams->randIter; i > 0; i--) { + this->pos.x = ((Rand_ZeroOne() - 0.5f) * initParams->randPosScale) + initParams->pos.x; + this->pos.y = ((Rand_ZeroOne() - 0.5f) * initParams->randPosScale) + initParams->pos.y; + this->pos.z = ((Rand_ZeroOne() - 0.5f) * initParams->randPosScale) + initParams->pos.z; + this->accel.x = this->velocity.x = (Rand_ZeroOne() - 0.5f) * 2.0f; + this->accel.y = this->velocity.y = (Rand_ZeroOne() - 0.5f) * 2.0f; + this->accel.z = this->velocity.z = (Rand_ZeroOne() - 0.5f) * 2.0f; + } + } else { + return 0; + } + + return 1; +} + +void EffectSsDeadDd_Draw(PlayState* play, u32 index, EffectSs* this) { + GraphicsContext* gfxCtx = play->state.gfxCtx; + MtxF mfTrans; + MtxF mfScale; + MtxF mfResult; + Mtx* mtx; + f32 scale; + + OPEN_DISPS(gfxCtx); + + scale = this->rScale * 0.01f; + SkinMatrix_SetTranslate(&mfTrans, this->pos.x, this->pos.y, this->pos.z); + SkinMatrix_SetScale(&mfScale, scale, scale, scale); + SkinMatrix_MtxFMtxFMult(&mfTrans, &mfScale, &mfResult); + + mtx = SkinMatrix_MtxFToNewMtx(gfxCtx, &mfResult); + + if (mtx != NULL) { + func_8012C974(gfxCtx); + gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, this->rPrimColorR, this->rPrimColorG, this->rPrimColorB, this->rAlpha); + gDPSetEnvColor(POLY_XLU_DISP++, this->rEnvColorR, this->rEnvColorG, this->rEnvColorB, this->rAlpha); + gSPMatrix(POLY_XLU_DISP++, mtx, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); + gSPMatrix(POLY_XLU_DISP++, &D_01000000, G_MTX_NOPUSH | G_MTX_MUL | G_MTX_MODELVIEW); + gDPSetCombineLERP(POLY_XLU_DISP++, 0, 0, 0, PRIMITIVE, TEXEL0, 0, PRIMITIVE, 0, 0, 0, 0, PRIMITIVE, TEXEL0, 0, + PRIMITIVE, 0); + gSPDisplayList(POLY_XLU_DISP++, gameplay_keep_DL_054940); + } + + CLOSE_DISPS(gfxCtx); +} + +void EffectSsDeadDd_Update(PlayState* play, u32 index, EffectSs* this) { + + this->rScale += this->rScaleStep; + + if (this->rScale < 0) { + this->rScale = 0; + } + + if (this->rAlphaMode != 0) { + this->rAlpha += this->rAlphaStep; + if (this->rAlpha > 255) { + this->rAlpha = 255; + } + } else { + if (this->rAlpha < this->rAlphaStep) { + this->rAlpha = 0; + } else { + this->rAlpha -= this->rAlphaStep; + } + } +} diff --git a/src/overlays/effects/ovl_Effect_Ss_Dead_Dd/z_eff_ss_dead_dd.h b/src/overlays/effects/ovl_Effect_Ss_Dead_Dd/z_eff_ss_dead_dd.h index e344df407..9c9dcf28e 100644 --- a/src/overlays/effects/ovl_Effect_Ss_Dead_Dd/z_eff_ss_dead_dd.h +++ b/src/overlays/effects/ovl_Effect_Ss_Dead_Dd/z_eff_ss_dead_dd.h @@ -3,6 +3,11 @@ #include "global.h" +typedef enum { + /* 0 */ DEADDD_TYPE_0, + /* 1 */ DEADDD_TYPE_1 // Unused +} DeadDDType; + typedef struct { /* 0x00 */ Vec3f pos; /* 0x0C */ Vec3f velocity; diff --git a/src/overlays/gamestates/ovl_opening/z_opening.c b/src/overlays/gamestates/ovl_opening/z_opening.c index cf8c4f93c..bc5e46940 100644 --- a/src/overlays/gamestates/ovl_opening/z_opening.c +++ b/src/overlays/gamestates/ovl_opening/z_opening.c @@ -7,7 +7,7 @@ #include "z_opening.h" void Opening_SetupForTitleCutscene(OpeningContext* this) { - static s32 openingEntrances[] = { 0x1C00, 0x1C10 }; + static s32 openingEntrances[] = { ENTRANCE(CUTSCENE, 0), ENTRANCE(CUTSCENE, 1) }; static s32 openingCutscenes[] = { 0xFFFA, 0xFFFA }; gSaveContext.eventInf[1] &= (u8)~0x80; @@ -15,7 +15,7 @@ void Opening_SetupForTitleCutscene(OpeningContext* this) { Sram_InitNewSave(); - gSaveContext.save.entranceIndex = openingEntrances[D_801BB12C]; + gSaveContext.save.entrance = openingEntrances[D_801BB12C]; gSaveContext.nextCutsceneIndex = gSaveContext.save.cutscene = openingCutscenes[D_801BB12C]; gSaveContext.sceneSetupIndex = 0; @@ -57,8 +57,8 @@ void Opening_Init(GameState* thisx) { this->gameState.destroy = Opening_Destroy; gSaveContext.respawnFlag = 0; - gSaveContext.respawn[RESPAWN_MODE_GORON].entranceIndex = 0xFF; - gSaveContext.respawn[RESPAWN_MODE_ZORA].entranceIndex = 0xFF; - gSaveContext.respawn[RESPAWN_MODE_DEKU].entranceIndex = 0xFF; - gSaveContext.respawn[RESPAWN_MODE_HUMAN].entranceIndex = 0xFF; + gSaveContext.respawn[RESPAWN_MODE_GORON].entrance = 0xFF; + gSaveContext.respawn[RESPAWN_MODE_ZORA].entrance = 0xFF; + gSaveContext.respawn[RESPAWN_MODE_DEKU].entrance = 0xFF; + gSaveContext.respawn[RESPAWN_MODE_HUMAN].entrance = 0xFF; } diff --git a/src/overlays/gamestates/ovl_select/z_select.c b/src/overlays/gamestates/ovl_select/z_select.c index ccc30f79e..76a9931d4 100644 --- a/src/overlays/gamestates/ovl_select/z_select.c +++ b/src/overlays/gamestates/ovl_select/z_select.c @@ -17,7 +17,7 @@ void MapSelect_LoadTitle(MapSelectState* this) { SET_NEXT_GAMESTATE(&this->state, Title_Init, TitleContext); } -void MapSelect_LoadGame(MapSelectState* this, u32 entranceIndex, s32 opt) { +void MapSelect_LoadGame(MapSelectState* this, u32 entrance, s32 spawn) { if (gSaveContext.fileNum == 0xFF) { Sram_InitDebugSave(); } @@ -33,26 +33,26 @@ void MapSelect_LoadGame(MapSelectState* this, u32 entranceIndex, s32 opt) { gSaveContext.hudVisibilityTimer = 0; Audio_QueueSeqCmd(NA_BGM_STOP); - gSaveContext.save.entranceIndex = entranceIndex; + gSaveContext.save.entrance = entrance; - if (opt != 0) { - gSaveContext.save.entranceIndex = - Entrance_CreateIndex((s32)gSaveContext.save.entranceIndex >> 9, opt, gSaveContext.save.entranceIndex & 0xF); + if (spawn != 0) { + gSaveContext.save.entrance = + Entrance_Create((s32)gSaveContext.save.entrance >> 9, spawn, gSaveContext.save.entrance & 0xF); } - if (gSaveContext.save.entranceIndex == 0xC000) { + if (gSaveContext.save.entrance == ENTRANCE(CLOCK_TOWER_INTERIOR, 0)) { gSaveContext.save.day = 0; gSaveContext.save.time = CLOCK_TIME(6, 0) - 1; } - gSaveContext.respawn[RESPAWN_MODE_DOWN].entranceIndex = 0xFFFF; + gSaveContext.respawn[RESPAWN_MODE_DOWN].entrance = 0xFFFF; gSaveContext.seqIndex = (u8)NA_BGM_DISABLED; gSaveContext.nightSeqIndex = 0xFF; gSaveContext.showTitleCard = true; gSaveContext.respawnFlag = 0; - gSaveContext.respawn[RESPAWN_MODE_GORON].entranceIndex = 0xFF; - gSaveContext.respawn[RESPAWN_MODE_ZORA].entranceIndex = 0xFF; - gSaveContext.respawn[RESPAWN_MODE_DEKU].entranceIndex = 0xFF; - gSaveContext.respawn[RESPAWN_MODE_HUMAN].entranceIndex = 0xFF; + gSaveContext.respawn[RESPAWN_MODE_GORON].entrance = 0xFF; + gSaveContext.respawn[RESPAWN_MODE_ZORA].entrance = 0xFF; + gSaveContext.respawn[RESPAWN_MODE_DEKU].entrance = 0xFF; + gSaveContext.respawn[RESPAWN_MODE_HUMAN].entrance = 0xFF; gWeatherMode = 0; do { @@ -65,434 +65,443 @@ void MapSelect_LoadGame(MapSelectState* this, u32 entranceIndex, s32 opt) { // "Translation" (Actual name) static SceneSelectEntry sScenes[] = { // "0: OP Woods for Cutscene Use" (Forest Opening Scene) - { " 0:OP" GFXP_KATAKANA "デモ" GFXP_HIRAGANA "ヨウ シンリン", MapSelect_LoadGame, 0x1C00 }, + { " 0:OP" GFXP_KATAKANA "デモ" GFXP_HIRAGANA "ヨウ シンリン", MapSelect_LoadGame, ENTRANCE(CUTSCENE, 0) }, // "0-0: Lost Woods" (Lost Woods) - { " 0-0:" GFXP_HIRAGANA "マヨイ ノ モリ", MapSelect_LoadGame, 0xC400 }, + { " 0-0:" GFXP_HIRAGANA "マヨイ ノ モリ", MapSelect_LoadGame, ENTRANCE(LOST_WOODS, 0) }, // "1: Town Outskirts" (Termina Field) - { " 1:" GFXP_KATAKANA "タウン " GFXP_HIRAGANA "コウガイ", MapSelect_LoadGame, 0x5400 }, + { " 1:" GFXP_KATAKANA "タウン " GFXP_HIRAGANA "コウガイ", MapSelect_LoadGame, ENTRANCE(TERMINA_FIELD, 0) }, // "1-0: Astral Observatory" (Astral Observatory) - { " 1-0:" GFXP_HIRAGANA "テンモンカンソクジョ", MapSelect_LoadGame, 0x4C00 }, + { " 1-0:" GFXP_HIRAGANA "テンモンカンソクジョ", MapSelect_LoadGame, ENTRANCE(ASTRAL_OBSERVATORY, 0) }, // "1-1: Astral Observatory Telescope" (Astral Observatory - Telescope) - { " 1-1:" GFXP_HIRAGANA "テンモンカンソクジョ デ ボウエンキョウ", MapSelect_LoadGame, 0x54A0 }, + { " 1-1:" GFXP_HIRAGANA "テンモンカンソクジョ デ ボウエンキョウ", MapSelect_LoadGame, ENTRANCE(TERMINA_FIELD, 10) }, // "1-2: Ikana Graveyard" (Ikana Canyon Graveyard) - { " 1-2:" GFXP_KATAKANA "イカーナ " GFXP_HIRAGANA "ノ ハカバ", MapSelect_LoadGame, 0x8000 }, + { " 1-2:" GFXP_KATAKANA "イカーナ " GFXP_HIRAGANA "ノ ハカバ", MapSelect_LoadGame, ENTRANCE(IKANA_GRAVEYARD, 0) }, // "2: Romani Ranch" (Romani Ranch) - { " 2:" GFXP_KATAKANA "ロマニー " GFXP_HIRAGANA "ボクジョウ", MapSelect_LoadGame, 0x6400 }, + { " 2:" GFXP_KATAKANA "ロマニー " GFXP_HIRAGANA "ボクジョウ", MapSelect_LoadGame, ENTRANCE(ROMANI_RANCH, 0) }, // "3: Milk Road" (Milk Road) - { " 3:" GFXP_KATAKANA "ミルクロード", MapSelect_LoadGame, 0x3E00 }, + { " 3:" GFXP_KATAKANA "ミルクロード", MapSelect_LoadGame, ENTRANCE(MILK_ROAD, 0) }, // "4: Main Building" ("Ranch House) - { " 4:" GFXP_HIRAGANA "オモヤ", MapSelect_LoadGame, 0x610 }, + { " 4:" GFXP_HIRAGANA "オモヤ", MapSelect_LoadGame, ENTRANCE(RANCH_HOUSE, 1) }, // "5: Cow Shed" (Cow Shed) - { " 5:" GFXP_HIRAGANA "ウシゴヤ", MapSelect_LoadGame, 0x600 }, + { " 5:" GFXP_HIRAGANA "ウシゴヤ", MapSelect_LoadGame, ENTRANCE(RANCH_HOUSE, 0) }, // "6: Cucco Shed" (Cucco Shed) - { " 6:" GFXP_KATAKANA "コッコ " GFXP_HIRAGANA "ゴヤ", MapSelect_LoadGame, 0x7E00 }, + { " 6:" GFXP_KATAKANA "コッコ " GFXP_HIRAGANA "ゴヤ", MapSelect_LoadGame, ENTRANCE(CUCCO_SHACK, 0) }, // "7: Dog Racing Area" (Doggy Racetrack) - { " 7:" GFXP_KATAKANA "ドッグレース" GFXP_HIRAGANA "ジョウ", MapSelect_LoadGame, 0x7C00 }, + { " 7:" GFXP_KATAKANA "ドッグレース" GFXP_HIRAGANA "ジョウ", MapSelect_LoadGame, ENTRANCE(DOGGY_RACETRACK, 0) }, // "8: Gorman Track" (Gorman Track) - { " 8:" GFXP_KATAKANA "ゴーマン トラック", MapSelect_LoadGame, 0xCE00 }, + { " 8:" GFXP_KATAKANA "ゴーマン トラック", MapSelect_LoadGame, ENTRANCE(GORMAN_TRACK, 0) }, // "10: Mountain Village -Winter-" (Mountain Village - Winter) - { " 10:" GFXP_HIRAGANA "ヤマザト -フユ-", MapSelect_LoadGame, 0x9A00 }, + { " 10:" GFXP_HIRAGANA "ヤマザト -フユ-", MapSelect_LoadGame, ENTRANCE(MOUNTAIN_VILLAGE_WINTER, 0) }, // "10-0: Mountain Village -Spring-" (Mountain Village - Spring) - { " 10-0:" GFXP_HIRAGANA "ヤマザト -ハル-", MapSelect_LoadGame, 0xAE00 }, + { " 10-0:" GFXP_HIRAGANA "ヤマザト -ハル-", MapSelect_LoadGame, ENTRANCE(MOUNTAIN_VILLAGE_SPRING, 0) }, // "10-1: Mountain Village Blacksmith" (Mountain Smithy) - { " 10-1:" GFXP_HIRAGANA "ヤマザト ノ カジヤ", MapSelect_LoadGame, 0x5200 }, + { " 10-1:" GFXP_HIRAGANA "ヤマザト ノ カジヤ", MapSelect_LoadGame, ENTRANCE(MOUNTAIN_SMITHY, 0) }, // "11: Goron Village -Winter-" (Goron Village - Winter) - { " 11:" GFXP_KATAKANA "ゴロン" GFXP_HIRAGANA " ノ サト -フユ-", MapSelect_LoadGame, 0x9400 }, + { " 11:" GFXP_KATAKANA "ゴロン" GFXP_HIRAGANA " ノ サト -フユ-", MapSelect_LoadGame, ENTRANCE(GORON_VILLAGE_WINTER, 0) }, // "11-0: Goron Village -Spring-" (Goron Village - Spring) - { " 11-0:" GFXP_KATAKANA "ゴロン" GFXP_HIRAGANA " ノ サト -ハル-", MapSelect_LoadGame, 0x8A00 }, + { " 11-0:" GFXP_KATAKANA "ゴロン" GFXP_HIRAGANA " ノ サト -ハル-", MapSelect_LoadGame, ENTRANCE(GORON_VILLAGE_SPRING, 0) }, // "11-1: Goron Shrine" (Goron Shrine) - { " 11-1:" GFXP_KATAKANA "ゴロン" GFXP_HIRAGANA " ノ ホコラ", MapSelect_LoadGame, 0x5E00 }, + { " 11-1:" GFXP_KATAKANA "ゴロン" GFXP_HIRAGANA " ノ ホコラ", MapSelect_LoadGame, ENTRANCE(GORON_SHRINE, 0) }, // "11-2: Lone Peak Shrine" (Lone Peak Shrine) - { " 11-2:" GFXP_HIRAGANA "ハナレヤマ ノ ホコラ", MapSelect_LoadGame, 0x1500 }, + { " 11-2:" GFXP_HIRAGANA "ハナレヤマ ノ ホコラ", MapSelect_LoadGame, ENTRANCE(GROTTOS, 16) }, // "11-3: Goron Shop" (Goron Shop) - { " 11-3:" GFXP_KATAKANA "ゴロン " GFXP_HIRAGANA "ノ ミセ", MapSelect_LoadGame, 0x7400 }, + { " 11-3:" GFXP_KATAKANA "ゴロン " GFXP_HIRAGANA "ノ ミセ", MapSelect_LoadGame, ENTRANCE(GORON_SHOP, 0) }, // "12: Snowhead" (Snowhead) - { " 12:" GFXP_KATAKANA "スノーヘッド", MapSelect_LoadGame, 0xB200 }, + { " 12:" GFXP_KATAKANA "スノーヘッド", MapSelect_LoadGame, ENTRANCE(SNOWHEAD, 0) }, // "13: Blizzard Path" (Path to Goron Village - Part 1) - { " 13:" GFXP_HIRAGANA "フブキ ノ ミチ", MapSelect_LoadGame, 0x3200 }, + { " 13:" GFXP_HIRAGANA "フブキ ノ ミチ", MapSelect_LoadGame, ENTRANCE(PATH_TO_MOUNTAIN_VILLAGE, 0) }, // "14: Snowball Path" (Path to Goron Village - Part 2) - { " 14:" GFXP_HIRAGANA "ユキダマ ノ ミチ", MapSelect_LoadGame, 0xB000 }, + { " 14:" GFXP_HIRAGANA "ユキダマ ノ ミチ", MapSelect_LoadGame, ENTRANCE(PATH_TO_SNOWHEAD, 0) }, // "15: Goron Racetrack" (Goron Racetrack) - { " 15:" GFXP_KATAKANA "ゴロンレース " GFXP_HIRAGANA "ジョウ", MapSelect_LoadGame, 0xD000 }, + { " 15:" GFXP_KATAKANA "ゴロンレース " GFXP_HIRAGANA "ジョウ", MapSelect_LoadGame, ENTRANCE(GORON_RACETRACK, 0) }, // "16: Goron Grave" (Darmani's Grave) - { " 16:" GFXP_KATAKANA "ゴロン " GFXP_HIRAGANA "ノ ハカ", MapSelect_LoadGame, 0x9600 }, + { " 16:" GFXP_KATAKANA "ゴロン " GFXP_HIRAGANA "ノ ハカ", MapSelect_LoadGame, ENTRANCE(GORON_GRAVERYARD, 0) }, // "17: Snow Field Battle -Winter-" (Path to Goron Village - Winter) - { " 17:" GFXP_HIRAGANA "セツゲン " GFXP_KATAKANA "バトル " GFXP_HIRAGANA "-フユ-", MapSelect_LoadGame, 0xB400 }, + { " 17:" GFXP_HIRAGANA "セツゲン " GFXP_KATAKANA "バトル " GFXP_HIRAGANA "-フユ-", MapSelect_LoadGame, + ENTRANCE(PATH_TO_GORON_VILLAGE_WINTER, 0) }, // "17-0: Snow Field Battle -Spring-" (Path to Goron Village - Spring) - { " 17-0:" GFXP_HIRAGANA "セツゲン " GFXP_KATAKANA "バトル " GFXP_HIRAGANA "-ハル-", MapSelect_LoadGame, 0xB600 }, + { " 17-0:" GFXP_HIRAGANA "セツゲン " GFXP_KATAKANA "バトル " GFXP_HIRAGANA "-ハル-", MapSelect_LoadGame, + ENTRANCE(PATH_TO_GORON_VILLAGE_SPRING, 0) }, // "20: Swampland" (Southern Swamp) - { " 20:" GFXP_HIRAGANA "ヌマチ", MapSelect_LoadGame, 0x8400 }, + { " 20:" GFXP_HIRAGANA "ヌマチ", MapSelect_LoadGame, ENTRANCE(SOUTHERN_SWAMP_POISONED, 0) }, // "20-0: Swampland - Afterwards" (Southern Swamp - After Odolwa) - { " 20-0:" GFXP_HIRAGANA "ヌマチ ソノゴ", MapSelect_LoadGame, 0xC00 }, + { " 20-0:" GFXP_HIRAGANA "ヌマチ ソノゴ", MapSelect_LoadGame, ENTRANCE(SOUTHERN_SWAMP_CLEARED, 0) }, // "20-1: Swamp Tourist Information" (Tourist Information) - { " 20-1:" GFXP_HIRAGANA "ヌマ ノ カンコウアンナイ", MapSelect_LoadGame, 0xA800 }, + { " 20-1:" GFXP_HIRAGANA "ヌマ ノ カンコウアンナイ", MapSelect_LoadGame, ENTRANCE(TOURIST_INFORMATION, 0) }, // "20-2: Magic Hags' Potion Shop" (Magic Hags' Potion Shop) - { " 20-2:" GFXP_HIRAGANA "マホウオババ ノ クスリヤ", MapSelect_LoadGame, 0x400 }, + { " 20-2:" GFXP_HIRAGANA "マホウオババ ノ クスリヤ", MapSelect_LoadGame, ENTRANCE(MAGIC_HAGS_POTION_SHOP, 0) }, // "21: Wood Mountain" (Woodfall) - { " 21:" GFXP_KATAKANA "ウッドマウンテン", MapSelect_LoadGame, 0x8600 }, + { " 21:" GFXP_KATAKANA "ウッドマウンテン", MapSelect_LoadGame, ENTRANCE(WOODFALL, 0) }, // "21-0: Deku Princess's Prison" (Deku Princess's Prison Cutscene: Tatl Apologizes) - { " 21-0:" GFXP_KATAKANA "デク" GFXP_HIRAGANA "ヒメ ノ ロウヤ", MapSelect_LoadGame, 0x3010 }, + { " 21-0:" GFXP_KATAKANA "デク" GFXP_HIRAGANA "ヒメ ノ ロウヤ", MapSelect_LoadGame, ENTRANCE(WOODFALL_TEMPLE, 1) }, // "22: Deku Castle" (Deku Palace) - { " 22:" GFXP_KATAKANA "デクナッツ " GFXP_HIRAGANA "ノ シロ", MapSelect_LoadGame, 0x5000 }, + { " 22:" GFXP_KATAKANA "デクナッツ " GFXP_HIRAGANA "ノ シロ", MapSelect_LoadGame, ENTRANCE(DEKU_PALACE, 0) }, // "22-0: Boe Hole 0" (Deku Palace Grotto 0 - Deku Baba & Butterflies, Entrance 1) - { " 22-0:" GFXP_KATAKANA "クロスケ " GFXP_HIRAGANA "ノ アナ0", MapSelect_LoadGame, 0x1460 }, + { " 22-0:" GFXP_KATAKANA "クロスケ " GFXP_HIRAGANA "ノ アナ0", MapSelect_LoadGame, ENTRANCE(GROTTOS, 6) }, // "22-1: Boe Hole 1" (Deku Palace Grotto 1 - Deku Baba & Butterflies, Entrance 2) - { " 22-1:" GFXP_KATAKANA "クロスケ " GFXP_HIRAGANA "ノ アナ1", MapSelect_LoadGame, 0x14E0 }, + { " 22-1:" GFXP_KATAKANA "クロスケ " GFXP_HIRAGANA "ノ アナ1", MapSelect_LoadGame, ENTRANCE(GROTTOS, 14) }, // "22-2: Boe Hole 2" (Deku Palace Grotto 2 - Skullwalltula Wall, Lower Entrance) - { " 22-2:" GFXP_KATAKANA "クロスケ " GFXP_HIRAGANA "ノ アナ2", MapSelect_LoadGame, 0x1480 }, + { " 22-2:" GFXP_KATAKANA "クロスケ " GFXP_HIRAGANA "ノ アナ2", MapSelect_LoadGame, ENTRANCE(GROTTOS, 8) }, // "22-3: Boe Hole 3" (Deku Palace Grotto 3 - Skullwalltula Wall, Upper Entrance) - { " 22-3:" GFXP_KATAKANA "クロスケ " GFXP_HIRAGANA "ノ アナ3", MapSelect_LoadGame, 0x14F0 }, + { " 22-3:" GFXP_KATAKANA "クロスケ " GFXP_HIRAGANA "ノ アナ3", MapSelect_LoadGame, ENTRANCE(GROTTOS, 15) }, // "22-4: Boe Hole 4" (Deku Palace Grotto 4 - Bean Seller) - { " 22-4:" GFXP_KATAKANA "クロスケ " GFXP_HIRAGANA "ノ アナ4", MapSelect_LoadGame, 0x14C0 }, + { " 22-4:" GFXP_KATAKANA "クロスケ " GFXP_HIRAGANA "ノ アナ4", MapSelect_LoadGame, ENTRANCE(GROTTOS, 12) }, // "24: Beast Path" (Road to Swamp) - { " 24:" GFXP_HIRAGANA "ケモノミチ", MapSelect_LoadGame, 0x7A00 }, + { " 24:" GFXP_HIRAGANA "ケモノミチ", MapSelect_LoadGame, ENTRANCE(ROAD_TO_SOUTHERN_SWAMP, 0) }, // "24-0: Forest Shooting Gallery" (Swamp Shooting Gallery) - { " 24-0:" GFXP_HIRAGANA "モリ ノ シャテキジョウ", MapSelect_LoadGame, 0x4200 }, + { " 24-0:" GFXP_HIRAGANA "モリ ノ シャテキジョウ", MapSelect_LoadGame, ENTRANCE(SWAMP_SHOOTING_GALLERY, 0) }, // "25: Deku King's Chamber" (Deku Palace Throne Room) - { " 25:" GFXP_KATAKANA "デク" GFXP_HIRAGANA "オウ ノ マ", MapSelect_LoadGame, 0x7600 }, + { " 25:" GFXP_KATAKANA "デク" GFXP_HIRAGANA "オウ ノ マ", MapSelect_LoadGame, ENTRANCE(DEKU_KINGS_CHAMBER, 0) }, // "26: Woods of Mystery" (Woods of Mystery) - { " 26:" GFXP_HIRAGANA "フシギ ノ モリ", MapSelect_LoadGame, 0xC200 }, + { " 26:" GFXP_HIRAGANA "フシギ ノ モリ", MapSelect_LoadGame, ENTRANCE(WOODS_OF_MYSTERY, 0) }, // "30: Great Bay Coast" (Great Bay Coast - Entrance Area) - { " 30:" GFXP_KATAKANA "グレートベイ" GFXP_HIRAGANA " ノ カイガン", MapSelect_LoadGame, 0x6800 }, + { " 30:" GFXP_KATAKANA "グレートベイ" GFXP_HIRAGANA " ノ カイガン", MapSelect_LoadGame, ENTRANCE(GREAT_BAY_COAST, 0) }, // "30-0: Ocean Laboratory" (Marine Research Lab) - { " 30-0:" GFXP_HIRAGANA "カイヨウ ケンキュウジョ", MapSelect_LoadGame, 0x5800 }, + { " 30-0:" GFXP_HIRAGANA "カイヨウ ケンキュウジョ", MapSelect_LoadGame, ENTRANCE(MARINE_RESEARCH_LAB, 0) }, // "30-1: Fisherman's House" (Fisherman's Hut) - { " 30-1:" GFXP_HIRAGANA "リョウシ ノ イエ", MapSelect_LoadGame, 0x7200 }, + { " 30-1:" GFXP_HIRAGANA "リョウシ ノ イエ", MapSelect_LoadGame, ENTRANCE(FISHERMANS_HUT, 0) }, // "30-2: Pointed Rock" (Twin Pillars) - { " 30-2:" GFXP_HIRAGANA "トンガリ イワ", MapSelect_LoadGame, 0x4400 }, + { " 30-2:" GFXP_HIRAGANA "トンガリ イワ", MapSelect_LoadGame, ENTRANCE(PINNACLE_ROCK, 0) }, // "31: Cape" (Great Bay Coast - River Area) - { " 31:" GFXP_HIRAGANA "ミサキ", MapSelect_LoadGame, 0x6A00 }, + { " 31:" GFXP_HIRAGANA "ミサキ", MapSelect_LoadGame, ENTRANCE(ZORA_CAPE, 0) }, // "32: Outside of Pirates' Fortress" (Pirates' Fortress - Exterior) - { " 32:" GFXP_HIRAGANA "カイゾクノトリデマエ", MapSelect_LoadGame, 0x7000 }, + { " 32:" GFXP_HIRAGANA "カイゾクノトリデマエ", MapSelect_LoadGame, ENTRANCE(PIRATES_FORTRESS_EXTERIOR, 0) }, // "32-0: Pirates' Fortress" (Pirates' Fortress - Courtyard) - { " 32-0:" GFXP_HIRAGANA "カイゾクノトリデ", MapSelect_LoadGame, 0x2200 }, + { " 32-0:" GFXP_HIRAGANA "カイゾクノトリデ", MapSelect_LoadGame, ENTRANCE(PIRATES_FORTRESS, 0) }, // "32-1: Pirates' Fortress - Telescope" (Pirates' Fortress - Secret Entrance, Looking Through Telescope) - { " 32-1:" GFXP_HIRAGANA "カイゾクノトリデ ボウエンキョウ", MapSelect_LoadGame, 0x22A0 }, + { " 32-1:" GFXP_HIRAGANA "カイゾクノトリデ ボウエンキョウ", MapSelect_LoadGame, ENTRANCE(PIRATES_FORTRESS, 10) }, // "32-2: Pirates' Fortress - Interior 0" (Pirates' Fortress - Throne Room) - { " 32-2:" GFXP_HIRAGANA "カイゾクノトリデナイブ0", MapSelect_LoadGame, 0x4000 }, + { " 32-2:" GFXP_HIRAGANA "カイゾクノトリデナイブ0", MapSelect_LoadGame, ENTRANCE(PIRATES_FORTRESS_INTERIOR, 0) }, // "32-3: Pirates' Fortress - Interior 1" (Pirates' Fortress - View of Throne Room, Wasp Nest) - { " 32-3:" GFXP_HIRAGANA "カイゾクノトリデナイブ1", MapSelect_LoadGame, 0x4010 }, + { " 32-3:" GFXP_HIRAGANA "カイゾクノトリデナイブ1", MapSelect_LoadGame, ENTRANCE(PIRATES_FORTRESS_INTERIOR, 1) }, // "32-4: Pirates' Fortress - Interior 2" (Pirates' Fortress - Tempting Treasure Chest, Leading to 32-5) - { " 32-4:" GFXP_HIRAGANA "カイゾクノトリデナイブ2", MapSelect_LoadGame, 0x4020 }, + { " 32-4:" GFXP_HIRAGANA "カイゾクノトリデナイブ2", MapSelect_LoadGame, ENTRANCE(PIRATES_FORTRESS_INTERIOR, 2) }, // "32-5: Pirates' Fortress - Interior 3" (Pirates' Fortress - Zora Egg Room, One Shell Blade) - { " 32-5:" GFXP_HIRAGANA "カイゾクノトリデナイブ3", MapSelect_LoadGame, 0x4030 }, + { " 32-5:" GFXP_HIRAGANA "カイゾクノトリデナイブ3", MapSelect_LoadGame, ENTRANCE(PIRATES_FORTRESS_INTERIOR, 3) }, // "32-6: Pirates' Fortress - Interior 4" (Pirates' Fortress - Oil Drum Room, Leading to 32-7) - { " 32-6:" GFXP_HIRAGANA "カイゾクノトリデナイブ4", MapSelect_LoadGame, 0x4040 }, + { " 32-6:" GFXP_HIRAGANA "カイゾクノトリデナイブ4", MapSelect_LoadGame, ENTRANCE(PIRATES_FORTRESS_INTERIOR, 4) }, // "32-7: Pirates' Fortress - Interior 5" (Pirates' Fortress - Zora Egg Room, One Shell Blade) - { " 32-7:" GFXP_HIRAGANA "カイゾクノトリデナイブ5", MapSelect_LoadGame, 0x4050 }, + { " 32-7:" GFXP_HIRAGANA "カイゾクノトリデナイブ5", MapSelect_LoadGame, ENTRANCE(PIRATES_FORTRESS_INTERIOR, 5) }, // "32-8: Pirates' Fortress - Interior 6" (Pirates' Fortress - Fenced Indoor Walkway, Leading to 32-9) - { " 32-8:" GFXP_HIRAGANA "カイゾクノトリデナイブ6", MapSelect_LoadGame, 0x4060 }, + { " 32-8:" GFXP_HIRAGANA "カイゾクノトリデナイブ6", MapSelect_LoadGame, ENTRANCE(PIRATES_FORTRESS_INTERIOR, 6) }, // "32-9: Pirates' Fortress - Interior 7" (Pirates' Fortress - Zora Egg Room, One Desbreko & Treasure Chest) - { " 32-9:" GFXP_HIRAGANA "カイゾクノトリデナイブ7", MapSelect_LoadGame, 0x4070 }, + { " 32-9:" GFXP_HIRAGANA "カイゾクノトリデナイブ7", MapSelect_LoadGame, ENTRANCE(PIRATES_FORTRESS_INTERIOR, 7) }, // "32-10: Pirates' Fortress - Interior 8" (Pirates' Fortress - End of Secret Entrance: Telescope Room) - { " 32-10:" GFXP_HIRAGANA "カイゾクノトリデナイブ8", MapSelect_LoadGame, 0x4080 }, + { " 32-10:" GFXP_HIRAGANA "カイゾクノトリデナイブ8", MapSelect_LoadGame, ENTRANCE(PIRATES_FORTRESS_INTERIOR, 8) }, // "32-11: Pirates' Fortress - Interior 9" (Pirates' Fortress - Start of Secret Entrance) - { " 32-11:" GFXP_HIRAGANA "カイゾクノトリデナイブ9", MapSelect_LoadGame, 0x4090 }, + { " 32-11:" GFXP_HIRAGANA "カイゾクノトリデナイブ9", MapSelect_LoadGame, ENTRANCE(PIRATES_FORTRESS_INTERIOR, 9) }, // "33: Zora Shrine" (Zora Hall) - { " 33:" GFXP_KATAKANA "ゾーラ " GFXP_HIRAGANA "ノ ホコラ", MapSelect_LoadGame, 0x6000 }, + { " 33:" GFXP_KATAKANA "ゾーラ " GFXP_HIRAGANA "ノ ホコラ", MapSelect_LoadGame, ENTRANCE(ZORA_HALL, 0) }, // "33-0: Zora Shop" (Zora Shop) - { " 33-0:" GFXP_KATAKANA "ゾーラ " GFXP_HIRAGANA "ノ ミセ", MapSelect_LoadGame, 0x9250 }, + { " 33-0:" GFXP_KATAKANA "ゾーラ " GFXP_HIRAGANA "ノ ミセ", MapSelect_LoadGame, ENTRANCE(ZORA_HALL_ROOMS, 5) }, // "33-1: Zora Waiting Room" (Mikau & Tijo's Room) - { " 33-1:" GFXP_KATAKANA "ゾーラ " GFXP_HIRAGANA "ノ ヒカエシツ", MapSelect_LoadGame, 0x9200 }, + { " 33-1:" GFXP_KATAKANA "ゾーラ " GFXP_HIRAGANA "ノ ヒカエシツ", MapSelect_LoadGame, ENTRANCE(ZORA_HALL_ROOMS, 0) }, // "34: Great Bay" (Great Bay Cutscene: Pirates Approach Temple) - { " 34:" GFXP_KATAKANA "グレートベイ", MapSelect_LoadGame, 0xBE00 }, + { " 34:" GFXP_KATAKANA "グレートベイ", MapSelect_LoadGame, ENTRANCE(GREAT_BAY_CUTSCENE, 0) }, // "35: Mountain Stream Above Falls" (Waterfall Rapids) - { " 35:" GFXP_HIRAGANA "タキウエ ノ ケイリュウ", MapSelect_LoadGame, 0x8E00 }, + { " 35:" GFXP_HIRAGANA "タキウエ ノ ケイリュウ", MapSelect_LoadGame, ENTRANCE(WATERFALL_RAPIDS, 0) }, // "40: Rock Building Shaft" (Stone Tower) - { " 40:" GFXP_KATAKANA "ロックビル" GFXP_HIRAGANA " ノ タテアナ", MapSelect_LoadGame, 0xAA00 }, + { " 40:" GFXP_KATAKANA "ロックビル" GFXP_HIRAGANA " ノ タテアナ", MapSelect_LoadGame, ENTRANCE(STONE_TOWER, 0) }, // "40-0: Heaven & Earth Are Overturned" (Stone Tower Cutscene: Tower is Flipped) - { " 40-0:" GFXP_HIRAGANA "テンチ ギャクテン", MapSelect_LoadGame, 0xAC00 }, + { " 40-0:" GFXP_HIRAGANA "テンチ ギャクテン", MapSelect_LoadGame, ENTRANCE(STONE_TOWER_INVERTED, 0) }, // "41: Road to Ikana" (Road to Ikana) - { " 41:" GFXP_KATAKANA "イカーナ " GFXP_HIRAGANA "ヘノ ミチ", MapSelect_LoadGame, 0xA000 }, + { " 41:" GFXP_KATAKANA "イカーナ " GFXP_HIRAGANA "ヘノ ミチ", MapSelect_LoadGame, ENTRANCE(ROAD_TO_IKANA, 0) }, // "42: Ancient Castle of Ikana" (Ancient Castle of Ikana) - { " 42:" GFXP_KATAKANA "イカーナ" GFXP_HIRAGANA " コジョウ", MapSelect_LoadGame, 0x3400 }, + { " 42:" GFXP_KATAKANA "イカーナ" GFXP_HIRAGANA " コジョウ", MapSelect_LoadGame, ENTRANCE(IKANA_CASTLE, 0) }, // "42-0: Ancient Castle of Ikana - Interior" (Ancient Castle of Ikana - Interior) - { " 42-0:" GFXP_KATAKANA "イカーナ" GFXP_HIRAGANA " ノ コジョウ ナイブ", MapSelect_LoadGame, 0x3430 }, + { " 42-0:" GFXP_KATAKANA "イカーナ" GFXP_HIRAGANA " ノ コジョウ ナイブ", MapSelect_LoadGame, ENTRANCE(IKANA_CASTLE, 3) }, // "42-B: Ancient Castle of Ikana - Boss Room" (Ikana King's Throne) { " 42-B:" GFXP_KATAKANA "イカーナ" GFXP_HIRAGANA " ノ コジョウ " GFXP_KATAKANA "ボス" GFXP_HIRAGANA "ベヤ", - MapSelect_LoadGame, 0xA600 }, + MapSelect_LoadGame, ENTRANCE(IGOS_DU_IKANAS_LAIR, 0) }, // "43: Ikana Canyon" (Ikana Canyon) - { " 43:" GFXP_KATAKANA "イカーナ " GFXP_HIRAGANA "ケイコク", MapSelect_LoadGame, 0x2000 }, + { " 43:" GFXP_KATAKANA "イカーナ " GFXP_HIRAGANA "ケイコク", MapSelect_LoadGame, ENTRANCE(IKANA_CANYON, 0) }, // "43-0: Ikana Canyon Cave" (Sharp's Cave) - { " 43-0:" GFXP_KATAKANA "イカーナ " GFXP_HIRAGANA "ケイコク ドウクツ", MapSelect_LoadGame, 0x20E0 }, + { " 43-0:" GFXP_KATAKANA "イカーナ " GFXP_HIRAGANA "ケイコク ドウクツ", MapSelect_LoadGame, ENTRANCE(IKANA_CANYON, 14) }, // "43-1: Secom's House" (Sakon's Hideout) - { " 43-1:" GFXP_KATAKANA "セコム " GFXP_HIRAGANA "ノ イエ", MapSelect_LoadGame, 0x9800 }, + { " 43-1:" GFXP_KATAKANA "セコム " GFXP_HIRAGANA "ノ イエ", MapSelect_LoadGame, ENTRANCE(SAKONS_HIDEOUT, 0) }, // "43-2: Music Box House" (Music Box House) - { " 43-2:" GFXP_KATAKANA "オルゴール ハウス", MapSelect_LoadGame, 0xA400 }, + { " 43-2:" GFXP_KATAKANA "オルゴール ハウス", MapSelect_LoadGame, ENTRANCE(MUSIC_BOX_HOUSE, 0) }, // "50: Clock Town -East-" (East Clock Town) - { " 50:" GFXP_KATAKANA "クロックタウン " GFXP_HIRAGANA "-ヒガシ-", MapSelect_LoadGame, 0xD200 }, + { " 50:" GFXP_KATAKANA "クロックタウン " GFXP_HIRAGANA "-ヒガシ-", MapSelect_LoadGame, ENTRANCE(EAST_CLOCK_TOWN, 0) }, // "50-0: Town Target Range" (Shooting Gallery) - { " 50-0:" GFXP_HIRAGANA "マチ ノ シャテキジョウ", MapSelect_LoadGame, 0x3A00 }, + { " 50-0:" GFXP_HIRAGANA "マチ ノ シャテキジョウ", MapSelect_LoadGame, ENTRANCE(TOWN_SHOOTING_GALLERY, 0) }, // "50-1: Honey and Darling's Shop" (Honey & Darling's Shop) - { " 50-1:" GFXP_KATAKANA "ハニー アンド ダーリン " GFXP_HIRAGANA "ノ ミセ", MapSelect_LoadGame, 0x800 }, + { " 50-1:" GFXP_KATAKANA "ハニー アンド ダーリン " GFXP_HIRAGANA "ノ ミセ", MapSelect_LoadGame, + ENTRANCE(HONEY_AND_DARLINGS_SHOP, 0) }, // "50-2: Treasure Chest Shop" (Treasure Chest Shop) - { " 50-2:" GFXP_HIRAGANA "タカラバコヤ", MapSelect_LoadGame, 0x2800 }, + { " 50-2:" GFXP_HIRAGANA "タカラバコヤ", MapSelect_LoadGame, ENTRANCE(TREASURE_CHEST_SHOP, 0) }, // "50-3: Pots 'n' Pans Inn" (Stockpot Inn) - { " 50-3:" GFXP_KATAKANA "ナベ" GFXP_HIRAGANA "カマ テイ", MapSelect_LoadGame, 0xBC00 }, + { " 50-3:" GFXP_KATAKANA "ナベ" GFXP_HIRAGANA "カマ テイ", MapSelect_LoadGame, ENTRANCE(STOCK_POT_INN, 0) }, // "50-4: Mayor's House" (The Mayor's Residence) - { " 50-4:" GFXP_HIRAGANA "チョウチョウ ノ イエ", MapSelect_LoadGame, 0 }, + { " 50-4:" GFXP_HIRAGANA "チョウチョウ ノ イエ", MapSelect_LoadGame, ENTRANCE(MAYORS_RESIDENCE, 0) }, // "50-5: Milk Bar" (Milk Bar) - { " 50-5:" GFXP_KATAKANA "ミルクバー", MapSelect_LoadGame, 0x2400 }, + { " 50-5:" GFXP_KATAKANA "ミルクバー", MapSelect_LoadGame, ENTRANCE(MILK_BAR, 0) }, // "51: Clock Town -West-" (West Clock Town) - { " 51:" GFXP_KATAKANA "クロックタウン " GFXP_HIRAGANA "-ニシ-", MapSelect_LoadGame, 0xD400 }, + { " 51:" GFXP_KATAKANA "クロックタウン " GFXP_HIRAGANA "-ニシ-", MapSelect_LoadGame, ENTRANCE(WEST_CLOCK_TOWN, 0) }, // "51-0: Bomb Shop" (Bomb Shop) - { " 51-0:" GFXP_HIRAGANA "バクダン ヤ", MapSelect_LoadGame, 0xCA00 }, + { " 51-0:" GFXP_HIRAGANA "バクダン ヤ", MapSelect_LoadGame, ENTRANCE(BOMB_SHOP, 0) }, // "51-1: Maniac Mart" (Curiosity Shop) - { " 51-1:" GFXP_KATAKANA "マニ" GFXP_HIRAGANA "ヤ", MapSelect_LoadGame, 0xE00 }, + { " 51-1:" GFXP_KATAKANA "マニ" GFXP_HIRAGANA "ヤ", MapSelect_LoadGame, ENTRANCE(CURIOSITY_SHOP, 0) }, // "51-2: General Store" (Trading Post) - { " 51-2:" GFXP_HIRAGANA "ザッカ ヤ", MapSelect_LoadGame, 0x6200 }, + { " 51-2:" GFXP_HIRAGANA "ザッカ ヤ", MapSelect_LoadGame, ENTRANCE(TRADING_POST, 0) }, // "51-3: Sword Dojo" (Swordsman's School) - { " 51-3:" GFXP_HIRAGANA "ケンドウジョウ", MapSelect_LoadGame, 0xA200 }, + { " 51-3:" GFXP_HIRAGANA "ケンドウジョウ", MapSelect_LoadGame, ENTRANCE(SWORDMANS_SCHOOL, 0) }, // "51-4: Post House" (Post Office) - { " 51-4:" GFXP_HIRAGANA "ポストハウス", MapSelect_LoadGame, 0x5600 }, + { " 51-4:" GFXP_HIRAGANA "ポストハウス", MapSelect_LoadGame, ENTRANCE(POST_OFFICE, 0) }, // "51-5: Lottery Shop" (Lottery Shop) - { " 51-5:" GFXP_HIRAGANA "タカラクジヤ", MapSelect_LoadGame, 0x6C00 }, + { " 51-5:" GFXP_HIRAGANA "タカラクジヤ", MapSelect_LoadGame, ENTRANCE(LOTTERY_SHOP, 0) }, // "52: Clock Town -North-" (North Clock Town) - { " 52:" GFXP_KATAKANA "クロックタウン " GFXP_HIRAGANA "-キタ-", MapSelect_LoadGame, 0xD600 }, + { " 52:" GFXP_KATAKANA "クロックタウン " GFXP_HIRAGANA "-キタ-", MapSelect_LoadGame, ENTRANCE(NORTH_CLOCK_TOWN, 0) }, // "53: Clocktown -South-" (South Clock Town) - { " 53:" GFXP_KATAKANA "クロックタウン " GFXP_HIRAGANA "-ミナミ-", MapSelect_LoadGame, 0xD800 }, + { " 53:" GFXP_KATAKANA "クロックタウン " GFXP_HIRAGANA "-ミナミ-", MapSelect_LoadGame, ENTRANCE(SOUTH_CLOCK_TOWN, 0) }, // "53-0: Clock Tower Interior" (Clock Tower Interior) - { " 53-0:" GFXP_HIRAGANA "トケイトウナイブ", MapSelect_LoadGame, 0xC000 }, + { " 53-0:" GFXP_HIRAGANA "トケイトウナイブ", MapSelect_LoadGame, ENTRANCE(CLOCK_TOWER_INTERIOR, 0) }, // "54: Clock Tower Rooftop" (Clock Tower Rooftop) - { " 54:" GFXP_HIRAGANA "トケイトウ オクジョウ", MapSelect_LoadGame, 0x2C00 }, + { " 54:" GFXP_HIRAGANA "トケイトウ オクジョウ", MapSelect_LoadGame, ENTRANCE(CLOCK_TOWER_ROOFTOP, 0) }, // "55: Laundry Area" (Laundry Pool) - { " 55:" GFXP_HIRAGANA "センタクジョウ", MapSelect_LoadGame, 0xDA00 }, + { " 55:" GFXP_HIRAGANA "センタクジョウ", MapSelect_LoadGame, ENTRANCE(LAUNDRY_POOL, 0) }, // "55-0: Maniac Mart - Rear Entrance" (Curiosity Shop - Back Room) - { " 55-0:" GFXP_KATAKANA "マニ" GFXP_HIRAGANA "ヤ ノ ウラグチ", MapSelect_LoadGame, 0xE10 }, + { " 55-0:" GFXP_KATAKANA "マニ" GFXP_HIRAGANA "ヤ ノ ウラグチ", MapSelect_LoadGame, ENTRANCE(CURIOSITY_SHOP, 1) }, // "55-1: Maniac Mart - Peephole" (Curiosity Shop Back Room - Peephole) - { " 55-1:" GFXP_KATAKANA "マニ" GFXP_HIRAGANA "ヤ ノ ノゾキアナ", MapSelect_LoadGame, 0xE20 }, + { " 55-1:" GFXP_KATAKANA "マニ" GFXP_HIRAGANA "ヤ ノ ノゾキアナ", MapSelect_LoadGame, ENTRANCE(CURIOSITY_SHOP, 2) }, // "100: Wood Mountain Temple" (Woodfall Temple) - { "100:" GFXP_KATAKANA "ウッドマウンテン " GFXP_HIRAGANA "ノ シンデン", MapSelect_LoadGame, 0x3000 }, + { "100:" GFXP_KATAKANA "ウッドマウンテン " GFXP_HIRAGANA "ノ シンデン", MapSelect_LoadGame, ENTRANCE(WOODFALL_TEMPLE, 0) }, // "100-B: Wood Mountain Temple - Boss" (Odolwa's Lair) - { "100-B:" GFXP_KATAKANA "ウッドマウンテン " GFXP_HIRAGANA "ノ シンデン" GFXP_KATAKANA "-ボス-", MapSelect_LoadGame, 0x3800 }, + { "100-B:" GFXP_KATAKANA "ウッドマウンテン " GFXP_HIRAGANA "ノ シンデン" GFXP_KATAKANA "-ボス-", MapSelect_LoadGame, + ENTRANCE(ODOLWAS_LAIR, 0) }, // "101: Snowhead Temple" (Snowhead Temple) - { "101:" GFXP_KATAKANA "スノーヘッド " GFXP_HIRAGANA "ノ シンデン", MapSelect_LoadGame, 0x3C00 }, + { "101:" GFXP_KATAKANA "スノーヘッド " GFXP_HIRAGANA "ノ シンデン", MapSelect_LoadGame, ENTRANCE(SNOWHEAD_TEMPLE, 0) }, // "101-B: Snowhead Temple - Boss" (Goht's Lair) - { "101-B:" GFXP_KATAKANA "スノーヘッド " GFXP_HIRAGANA "ノ シンデン" GFXP_KATAKANA "-ボス-", MapSelect_LoadGame, 0x8200 }, + { "101-B:" GFXP_KATAKANA "スノーヘッド " GFXP_HIRAGANA "ノ シンデン" GFXP_KATAKANA "-ボス-", MapSelect_LoadGame, + ENTRANCE(GOHTS_LAIR, 0) }, // "102: Great Bay Temple" (Great Bay Temple) - { "102:" GFXP_KATAKANA "グレートベイ " GFXP_HIRAGANA "ノ シンデン", MapSelect_LoadGame, 0x8C00 }, + { "102:" GFXP_KATAKANA "グレートベイ " GFXP_HIRAGANA "ノ シンデン", MapSelect_LoadGame, ENTRANCE(GREAT_BAY_TEMPLE, 0) }, // "102-B: Great Bay Temple - Boss" (Gyorg's Lair) - { "102-B:" GFXP_KATAKANA "グレートベイ " GFXP_HIRAGANA "ノ シンデン" GFXP_KATAKANA "-ボス-", MapSelect_LoadGame, 0xB800 }, + { "102-B:" GFXP_KATAKANA "グレートベイ " GFXP_HIRAGANA "ノ シンデン" GFXP_KATAKANA "-ボス-", MapSelect_LoadGame, + ENTRANCE(GYORGS_LAIR, 0) }, // "103: Rock Building Temple -Top Side-" (Stone Tower Temple) - { "103:" GFXP_KATAKANA "ロックビル " GFXP_HIRAGANA "ノ シンデン-オモテー", MapSelect_LoadGame, 0x2600 }, + { "103:" GFXP_KATAKANA "ロックビル " GFXP_HIRAGANA "ノ シンデン-オモテー", MapSelect_LoadGame, + ENTRANCE(STONE_TOWER_TEMPLE, 0) }, // "103-0: Rock Building Temple -Underside-" (Stone Tower Temple - Flipped) - { "103-0:" GFXP_KATAKANA "ロックビル " GFXP_HIRAGANA "ノ シンデン-ウラー", MapSelect_LoadGame, 0x2A00 }, + { "103-0:" GFXP_KATAKANA "ロックビル " GFXP_HIRAGANA "ノ シンデン-ウラー", MapSelect_LoadGame, + ENTRANCE(STONE_TOWER_TEMPLE_INVERTED, 0) }, // "103-B: Rock Building Temple - Boss" (Twinmold's Lair) - { "103-B:" GFXP_KATAKANA "ロックビル " GFXP_HIRAGANA "ノ シンデン" GFXP_KATAKANA "-ボス-", MapSelect_LoadGame, 0x6600 }, + { "103-B:" GFXP_KATAKANA "ロックビル " GFXP_HIRAGANA "ノ シンデン" GFXP_KATAKANA "-ボス-", MapSelect_LoadGame, + ENTRANCE(TWINMOLDS_LAIR, 0) }, // "104: Steppe" (On the Moon) - { "104:" GFXP_KATAKANA "ソウゲン", MapSelect_LoadGame, 0xC800 }, + { "104:" GFXP_KATAKANA "ソウゲン", MapSelect_LoadGame, ENTRANCE(THE_MOON, 0) }, // "104-0: Last Deku Dungeon" (Deku Trial) - { "104-0:" GFXP_KATAKANA "ラスト デク ダンジョン", MapSelect_LoadGame, 0x4E00 }, + { "104-0:" GFXP_KATAKANA "ラスト デク ダンジョン", MapSelect_LoadGame, ENTRANCE(MOON_DEKU_TRIAL, 0) }, // "104-1: Last Goron Dungeon" (Goron Trial) - { "104-1:" GFXP_KATAKANA "ラスト ゴロン ダンジョン", MapSelect_LoadGame, 0x7800 }, + { "104-1:" GFXP_KATAKANA "ラスト ゴロン ダンジョン", MapSelect_LoadGame, ENTRANCE(MOON_GORON_TRIAL, 0) }, // "104-2: Last Zora Dungeon" (Zora Trial) - { "104-2:" GFXP_KATAKANA "ラスト ゾーラ ダンジョン", MapSelect_LoadGame, 0x8800 }, + { "104-2:" GFXP_KATAKANA "ラスト ゾーラ ダンジョン", MapSelect_LoadGame, ENTRANCE(MOON_ZORA_TRIAL, 0) }, // "104-3: Last Link Dungeon" (Link Trial) - { "104-3:" GFXP_KATAKANA "ラスト リンク ダンジョン", MapSelect_LoadGame, 0xC600 }, + { "104-3:" GFXP_KATAKANA "ラスト リンク ダンジョン", MapSelect_LoadGame, ENTRANCE(MOON_LINK_TRIAL, 0) }, // "104-B: Last Dungeon -Boss-" (Majora's Lair) - { "104-B:" GFXP_KATAKANA "ラストダンジョン -ボス-", MapSelect_LoadGame, 0x200 }, + { "104-B:" GFXP_KATAKANA "ラストダンジョン -ボス-", MapSelect_LoadGame, ENTRANCE(MAJORAS_LAIR, 0) }, // "119: Deku Shrine" (Deku Shrine) - { "119:" GFXP_KATAKANA "デクナッツ " GFXP_HIRAGANA "ノ ホコラ", MapSelect_LoadGame, 0x9E00 }, + { "119:" GFXP_KATAKANA "デクナッツ " GFXP_HIRAGANA "ノ ホコラ", MapSelect_LoadGame, ENTRANCE(DEKU_SHRINE, 0) }, // "121: Secret Shrine" (Secret Shrine) - { "121:" GFXP_HIRAGANA "ヒミツ ノ ホコラ", MapSelect_LoadGame, 0xBA00 }, + { "121:" GFXP_HIRAGANA "ヒミツ ノ ホコラ", MapSelect_LoadGame, ENTRANCE(SECRET_SHRINE, 0) }, // "122: Opening Dungeon" (Pond Area Cutscene: Falling of the Cliff) - { "122:" GFXP_KATAKANA "オープニング ダンジョン", MapSelect_LoadGame, 0x2E00 }, + { "122:" GFXP_KATAKANA "オープニング ダンジョン", MapSelect_LoadGame, ENTRANCE(OPENING_DUNGEON, 0) }, // "123: Giants' Chamber" (Giants' Chamber) - { "123:" GFXP_HIRAGANA "キョジン ノ マ", MapSelect_LoadGame, 0xCC00 }, + { "123:" GFXP_HIRAGANA "キョジン ノ マ", MapSelect_LoadGame, ENTRANCE(GIANTS_CHAMBER, 0) }, // "126: Deku Minigame" (Deku Rupee Minigame) - { "126:" GFXP_KATAKANA "デクナッツ ミニゲーム", MapSelect_LoadGame, 0x3600 }, + { "126:" GFXP_KATAKANA "デクナッツ ミニゲーム", MapSelect_LoadGame, ENTRANCE(DEKU_SCRUB_PLAYGROUND, 0) }, // "127-0: Fairy Fountain 0" (Fairy Fountain - Clock Town) - { "127-0:" GFXP_HIRAGANA "ヨウセイ ノ イズミ 0", MapSelect_LoadGame, 0x4600 }, + { "127-0:" GFXP_HIRAGANA "ヨウセイ ノ イズミ 0", MapSelect_LoadGame, ENTRANCE(FAIRY_FOUNTAIN, 0) }, // "127-1: Fairy Fountain 1" (Fairy Fountain - Woodfall) - { "127-1:" GFXP_HIRAGANA "ヨウセイ ノ イズミ 1", MapSelect_LoadGame, 0x4610 }, + { "127-1:" GFXP_HIRAGANA "ヨウセイ ノ イズミ 1", MapSelect_LoadGame, ENTRANCE(FAIRY_FOUNTAIN, 1) }, // "127-2: Fairy Fountain 2" (Fairy Fountain - Snowhead) - { "127-2:" GFXP_HIRAGANA "ヨウセイ ノ イズミ 2", MapSelect_LoadGame, 0x4620 }, + { "127-2:" GFXP_HIRAGANA "ヨウセイ ノ イズミ 2", MapSelect_LoadGame, ENTRANCE(FAIRY_FOUNTAIN, 2) }, // "127-3: Fairy Fountain 3" (Fairy Fountain - Great Bay Coast) - { "127-3:" GFXP_HIRAGANA "ヨウセイ ノ イズミ 3", MapSelect_LoadGame, 0x4630 }, + { "127-3:" GFXP_HIRAGANA "ヨウセイ ノ イズミ 3", MapSelect_LoadGame, ENTRANCE(FAIRY_FOUNTAIN, 3) }, // "127-4: Fairy Fountain 4" (Fairy Fountain - Ikana Canyon) - { "127-4:" GFXP_HIRAGANA "ヨウセイ ノ イズミ 4", MapSelect_LoadGame, 0x4640 }, + { "127-4:" GFXP_HIRAGANA "ヨウセイ ノ イズミ 4", MapSelect_LoadGame, ENTRANCE(FAIRY_FOUNTAIN, 4) }, // "128: Swamp Spider Manor" (Swamp Spider House) - { "128:" GFXP_HIRAGANA "ヌマ ノ クモヤカタ", MapSelect_LoadGame, 0x4800 }, + { "128:" GFXP_HIRAGANA "ヌマ ノ クモヤカタ", MapSelect_LoadGame, ENTRANCE(SWAMP_SPIDER_HOUSE, 0) }, // "129: Ocean Spider Manor" (Oceanside Spider House) - { "129:" GFXP_HIRAGANA "ウミ ノ クモヤカタ", MapSelect_LoadGame, 0x4A00 }, + { "129:" GFXP_HIRAGANA "ウミ ノ クモヤカタ", MapSelect_LoadGame, ENTRANCE(OCEANSIDE_SPIDER_HOUSE, 0) }, // "130: Beneath the Graves - Dampe" (Beneath the Graveyard) - { "130:" GFXP_HIRAGANA "ハカ ノ シタ-" GFXP_KATAKANA "ダンペイ-", MapSelect_LoadGame, 0x5A00 }, + { "130:" GFXP_HIRAGANA "ハカ ノ シタ-" GFXP_KATAKANA "ダンペイ-", MapSelect_LoadGame, ENTRANCE(DAMPES_HOUSE, 0) }, // "131: Beneath the Well" (Beneath the Well) - { "131:" GFXP_HIRAGANA "イド ノ シタ", MapSelect_LoadGame, 0x9000 }, + { "131:" GFXP_HIRAGANA "イド ノ シタ", MapSelect_LoadGame, ENTRANCE(BENEATH_THE_WELL, 0) }, // "132: Ghost Hut" (Ghost Hut) - { "132:" GFXP_HIRAGANA "ユウレイゴヤ", MapSelect_LoadGame, 0x9C00 }, + { "132:" GFXP_HIRAGANA "ユウレイゴヤ", MapSelect_LoadGame, ENTRANCE(GHOST_HUT, 0) }, // "133-0: Beneath the Graves 0" (Beneath the Graveyard - Part 1) - { "133-0:" GFXP_HIRAGANA "ハカ ノ シタ0", MapSelect_LoadGame, 0xA00 }, + { "133-0:" GFXP_HIRAGANA "ハカ ノ シタ0", MapSelect_LoadGame, ENTRANCE(BENEATH_THE_GRAVERYARD, 0) }, // "133-1: Beneath the Graves 1" (Beneath the Graveyard - Part 2) - { "133-1:" GFXP_HIRAGANA "ハカ ノ シタ1", MapSelect_LoadGame, 0xA10 }, + { "133-1:" GFXP_HIRAGANA "ハカ ノ シタ1", MapSelect_LoadGame, ENTRANCE(BENEATH_THE_GRAVERYARD, 1) }, // "134-0: Secret Grotto 0" (Secret Grotto - Four Gossip Stones) - { "134-0:" GFXP_HIRAGANA "カクシアナ 0", MapSelect_LoadGame, 0x1400 }, + { "134-0:" GFXP_HIRAGANA "カクシアナ 0", MapSelect_LoadGame, ENTRANCE(GROTTOS, 0) }, // "134-1: Secret Grotto 1" (Secret Grotto - Four Gossip Stones, Skulltula) - { "134-1:" GFXP_HIRAGANA "カクシアナ 1", MapSelect_LoadGame, 0x1410 }, + { "134-1:" GFXP_HIRAGANA "カクシアナ 1", MapSelect_LoadGame, ENTRANCE(GROTTOS, 1) }, // "134-2: Secret Grotto 2" (Secret Grotto - Four Gossip Stones, Water Puddles) - { "134-2:" GFXP_HIRAGANA "カクシアナ 2", MapSelect_LoadGame, 0x1420 }, + { "134-2:" GFXP_HIRAGANA "カクシアナ 2", MapSelect_LoadGame, ENTRANCE(GROTTOS, 2) }, // "134-3: Secret Grotto 3" (Secret Grotto - Four Gossip Stones, Water Puddle With Bugs) - { "134-3:" GFXP_HIRAGANA "カクシアナ 3", MapSelect_LoadGame, 0x1430 }, + { "134-3:" GFXP_HIRAGANA "カクシアナ 3", MapSelect_LoadGame, ENTRANCE(GROTTOS, 3) }, // "134-4: Secret Grotto 4" (Secret Grotto - Chest with Blue Rupee, Deku Babas) - { "134-4:" GFXP_HIRAGANA "カクシアナ 4", MapSelect_LoadGame, 0x1440 }, + { "134-4:" GFXP_HIRAGANA "カクシアナ 4", MapSelect_LoadGame, ENTRANCE(GROTTOS, 4) }, // "134-5: Secret Grotto 5" (Secret Grotto - Hot Spring, Deku Babas, Large Stones) - { "134-5:" GFXP_HIRAGANA "カクシアナ5", MapSelect_LoadGame, 0x1450 }, + { "134-5:" GFXP_HIRAGANA "カクシアナ5", MapSelect_LoadGame, ENTRANCE(GROTTOS, 5) }, // "134-7: Secret Grotto 7" (Secret Grotto - Two Dondogos) - { "134-7:" GFXP_HIRAGANA "カクシアナ 7", MapSelect_LoadGame, 0x1470 }, + { "134-7:" GFXP_HIRAGANA "カクシアナ 7", MapSelect_LoadGame, ENTRANCE(GROTTOS, 7) }, // "134-9: Secret Grotto 9" (Secret Grotto - Tall Grass With Box, Pot, Bugs) - { "134-9:" GFXP_HIRAGANA "カクシアナ 9", MapSelect_LoadGame, 0x1490 }, + { "134-9:" GFXP_HIRAGANA "カクシアナ 9", MapSelect_LoadGame, ENTRANCE(GROTTOS, 9) }, // "134-10: Secret Grotto 10" (Secret Grotto - Two Cows Surrounded by Grass) - { "134-10:" GFXP_HIRAGANA "カクシアナ10", MapSelect_LoadGame, 0x14A0 }, + { "134-10:" GFXP_HIRAGANA "カクシアナ10", MapSelect_LoadGame, ENTRANCE(GROTTOS, 10) }, // "134-11: Secret Grotto 11" (Secret Grotto - Watery Hole Filled with Underwater Babas, Fish) - { "134-11:" GFXP_HIRAGANA "カクシアナ11", MapSelect_LoadGame, 0x14B0 }, + { "134-11:" GFXP_HIRAGANA "カクシアナ11", MapSelect_LoadGame, ENTRANCE(GROTTOS, 11) }, // "134-13: Secret Grotto 13" (Secret Grotto - Peahat in Center) - { "134-13:" GFXP_HIRAGANA "カクシアナ13", MapSelect_LoadGame, 0x14D0 }, + { "134-13:" GFXP_HIRAGANA "カクシアナ13", MapSelect_LoadGame, ENTRANCE(GROTTOS, 13) }, // "X 1: SPOT00" (Opening Cutscene) - { "X 1:SPOT00", MapSelect_LoadGame, 0x1C00 }, + { "X 1:SPOT00", MapSelect_LoadGame, ENTRANCE(CUTSCENE, 0) }, // "Title" (Title Screen) - { "title", (void*)MapSelect_LoadTitle, 0x0000 }, + { "title", (void*)MapSelect_LoadTitle, 0 }, }; void MapSelect_UpdateMenu(MapSelectState* this) { @@ -516,8 +525,7 @@ void MapSelect_UpdateMenu(MapSelectState* this) { gSaveContext.minigameState = 0; if (this->scenes[this->currentScene].loadFunc != NULL) { - this->scenes[this->currentScene].loadFunc(this, this->scenes[this->currentScene].entranceIndex, - this->opt); + this->scenes[this->currentScene].loadFunc(this, this->scenes[this->currentScene].entrance, this->opt); } } diff --git a/src/overlays/gamestates/ovl_select/z_select.h b/src/overlays/gamestates/ovl_select/z_select.h index 4791a2427..efe5f9945 100644 --- a/src/overlays/gamestates/ovl_select/z_select.h +++ b/src/overlays/gamestates/ovl_select/z_select.h @@ -10,7 +10,7 @@ typedef void (*Select_LoadFunc)(struct MapSelectState*, u32, s32); typedef struct { /* 0x00 */ char* name; /* 0x04 */ Select_LoadFunc loadFunc; - /* 0x08 */ s32 entranceIndex; + /* 0x08 */ s32 entrance; } SceneSelectEntry; // size = 0xC typedef struct MapSelectState { diff --git a/tools/disasm/functions.txt b/tools/disasm/functions.txt index f39c5b276..fb40a8575 100644 --- a/tools/disasm/functions.txt +++ b/tools/disasm/functions.txt @@ -1113,37 +1113,37 @@ 0x800CAFDC:("DynaPolyActor_IsInHeavySwitchPressedState",), 0x800CB000:("DynaPolyActor_ValidateMove",), 0x800CB210:("Camera_fabsf",), - 0x800CB240:("Camera_LengthVec3f",), - 0x800CB270:("func_800CB270",), - 0x800CB330:("Camera_Lerpf",), - 0x800CB398:("Camera_Lerps",), - 0x800CB42C:("func_800CB42C",), - 0x800CB4C0:("Camera_LerpVec3f",), - 0x800CB544:("func_800CB544",), - 0x800CB584:("func_800CB584",), - 0x800CB5DC:("func_800CB5DC",), - 0x800CB60C:("func_800CB60C",), - 0x800CB674:("func_800CB674",), - 0x800CB6C8:("func_800CB6C8",), - 0x800CB700:("func_800CB700",), - 0x800CB780:("func_800CB780",), + 0x800CB240:("Camera_Vec3fMagnitude",), + 0x800CB270:("Camera_QuadraticAttenuation",), + 0x800CB330:("Camera_LerpCeilF",), + 0x800CB398:("Camera_LerpCeilS",), + 0x800CB42C:("Camera_LerpFloorS",), + 0x800CB4C0:("Camera_LerpCeilVec3f",), + 0x800CB544:("Camera_SetUpdateRatesFastPitch",), + 0x800CB584:("Camera_SetUpdateRatesFastYaw",), + 0x800CB5DC:("Camera_SetUpdateRatesSlow",), + 0x800CB60C:("Camera_Vec3sToVec3f",), + 0x800CB674:("Camera_AngleDiffAndScale",), + 0x800CB6C8:("Camera_UpdateAtActorOffset",), + 0x800CB700:("Camera_GetFocalActorHeight",), + 0x800CB780:("Camera_GetRunSpeedLimit",), 0x800CB7CC:("func_800CB7CC",), - 0x800CB7F8:("func_800CB7F8",), - 0x800CB828:("func_800CB828",), + 0x800CB7F8:("Camera_IsMountedOnHorse",), + 0x800CB828:("Camera_IsDekuHovering",), 0x800CB854:("func_800CB854",), 0x800CB880:("Camera_IsSwimming",), - 0x800CB8C8:("func_800CB8C8",), - 0x800CB8F4:("func_800CB8F4",), + 0x800CB8C8:("Camera_IsDiving",), + 0x800CB8F4:("Camera_IsPlayerFormZora",), 0x800CB924:("func_800CB924",), 0x800CB950:("func_800CB950",), - 0x800CBA08:("func_800CBA08",), - 0x800CBA34:("func_800CBA34",), + 0x800CBA08:("Camera_IsClimbingLedge",), + 0x800CBA34:("Camera_IsChargingSwordOrDekuFlowerDive",), 0x800CBA7C:("func_800CBA7C",), 0x800CBAAC:("func_800CBAAC",), - 0x800CBAD4:("func_800CBAD4",), - 0x800CBB58:("func_800CBB58",), + 0x800CBAD4:("Camera_GetFocalActorPos",), + 0x800CBB58:("Camera_IsUnderwaterAsZora",), 0x800CBB88:("func_800CBB88",), - 0x800CBC00:("func_800CBC00",), + 0x800CBC00:("Camera_IsUsingZoraFins",), 0x800CBC30:("func_800CBC30",), 0x800CBC84:("func_800CBC84",), 0x800CBFA4:("func_800CBFA4",), @@ -2456,8 +2456,8 @@ 0x80130674:("Scene_HeaderCmdAnimatedMaterials",), 0x801306A4:("Scene_SetExitFade",), 0x801306E8:("Scene_ProcessHeader",), - 0x80130768:("Entrance_CreateIndex",), - 0x80130784:("Entrance_CreateIndexFromSpawn",), + 0x80130768:("Entrance_Create",), + 0x80130784:("Entrance_CreateFromSpawn",), 0x801307C0:("Scene_ExecuteDrawConfig",), 0x801307F4:("Scene_DrawConfigDefault",), 0x80130834:("AnimatedMat_TexScroll",), @@ -3688,10 +3688,10 @@ 0x80193774:("func_80193774",), 0x8019380C:("func_8019380C",), 0x80193858:("func_80193858",), - 0x8019387C:("func_8019387C",), - 0x801938A0:("Audio_QueueCmdS8",), + 0x8019387C:("AudioThread_QueueCmdS32",), + 0x801938A0:("AudioThread_QueueCmdS8",), 0x801938D0:("func_801938D0",), - 0x80193900:("func_80193900",), + 0x80193900:("AudioThread_ScheduleProcessCmds",), 0x80193990:("func_80193990",), 0x801939A8:("func_801939A8",), 0x80193AEC:("func_80193AEC",), @@ -3718,8 +3718,8 @@ 0x80194528:("func_80194528",), 0x80194548:("func_80194548",), 0x80194568:("func_80194568",), - 0x80194668:("Audio_NextRandom",), - 0x801946E4:("Audio_InitMesgQueues",), + 0x80194668:("AudioThread_NextRandom",), + 0x801946E4:("AudioThread_InitMesgQueues",), 0x80194710:("Audio_InvalDCache",), 0x80194750:("Audio_WritebackDCache",), 0x80194790:("osAiSetNextBuffer",), @@ -3858,27 +3858,27 @@ 0x8019E0FC:("func_8019E0FC",), 0x8019E104:("func_8019E104",), 0x8019E110:("func_8019E110",), - 0x8019E14C:("func_8019E14C",), - 0x8019E324:("func_8019E324",), - 0x8019E4B0:("func_8019E4B0",), - 0x8019E634:("func_8019E634",), - 0x8019E864:("func_8019E864",), - 0x8019EA40:("func_8019EA40",), - 0x8019EB2C:("func_8019EB2C",), - 0x8019F024:("func_8019F024",), - 0x8019F05C:("func_8019F05C",), + 0x8019E14C:("AudioSfx_ComputeVolume",), + 0x8019E324:("AudioSfx_ComputeReverb",), + 0x8019E4B0:("AudioSfx_ComputePanSigned",), + 0x8019E634:("AudioSfx_ComputeFreqScale",), + 0x8019E864:("AudioSfx_ComputeSurroundSoundFilter",), + 0x8019EA40:("AudioSfx_ComputeCombFilter",), + 0x8019EB2C:("AudioSfx_SetProperties",), + 0x8019F024:("AudioSfx_SetFreqAndStereoBits",), + 0x8019F05C:("AudioSfx_ResetSfxChannelState",), 0x8019F0C8:("play_sound",), 0x8019F128:("func_8019F128",), 0x8019F170:("func_8019F170",), 0x8019F1C0:("Audio_PlaySfxAtPos",), 0x8019F208:("func_8019F208",), 0x8019F230:("func_8019F230",), - 0x8019F258:("func_8019F258",), - 0x8019F300:("func_8019F300",), + 0x8019F258:("AudioSfx_AddSfxSetting",), + 0x8019F300:("AudioSfx_ProcessSfxSettings",), 0x8019F420:("func_8019F420",), 0x8019F4AC:("func_8019F4AC",), 0x8019F540:("func_8019F540",), - 0x8019F570:("func_8019F570",), + 0x8019F570:("AudioSfx_LowerSfxSettingsReverb",), 0x8019F5AC:("func_8019F5AC",), 0x8019F638:("func_8019F638",), 0x8019F780:("func_8019F780",), @@ -3912,7 +3912,7 @@ 0x801A0554:("func_801A0554",), 0x801A05E4:("func_801A05E4",), 0x801A05F0:("func_801A05F0",), - 0x801A0654:("func_801A0654",), + 0x801A0654:("AudioSfx_SetChannelIO",), 0x801A0810:("func_801A0810",), 0x801A0868:("func_801A0868",), 0x801A09D4:("func_801A09D4",), @@ -4001,9 +4001,9 @@ 0x801A47DC:("func_801A47DC",), 0x801A48E0:("func_801A48E0",), 0x801A4A28:("func_801A4A28",), - 0x801A4B80:("func_801A4B80",), - 0x801A4C30:("func_801A4C30",), - 0x801A4C54:("func_801A4C54",), + 0x801A4B80:("Audio_SetNatureAmbienceRandomBend",), + 0x801A4C30:("Audio_Init",), + 0x801A4C54:("AudioSfx_Init",), 0x801A4D00:("func_801A4D00",), 0x801A4D50:("func_801A4D50",), 0x801A4DA4:("func_801A4DA4",), @@ -4030,29 +4030,29 @@ 0x801A5808:("func_801A5808",), 0x801A5A10:("func_801A5A10",), 0x801A5A1C:("func_801A5A1C",), - 0x801A5BD0:("Audio_SetSfxBanksMute",), - 0x801A5C28:("Audio_SetFlagForBgmVolumeLow",), - 0x801A5C8C:("Audio_ClearFlagForBgmVolumeLow",), - 0x801A5CFC:("Audio_PlaySfxGeneral",), - 0x801A5DDC:("func_801A5DDC",), - 0x801A5F7C:("func_801A5F7C",), - 0x801A6430:("func_801A6430",), - 0x801A65C8:("func_801A65C8",), - 0x801A6D0C:("func_801A6D0C",), - 0x801A7084:("func_801A7084",), - 0x801A7168:("func_801A7168",), - 0x801A7284:("func_801A7284",), - 0x801A72CC:("Audio_StopSfxByPos",), - 0x801A7328:("func_801A7328",), - 0x801A7484:("func_801A7484",), - 0x801A75E8:("Audio_StopSfxById",), - 0x801A7720:("func_801A7720",), - 0x801A7794:("func_801A7794",), - 0x801A7828:("func_801A7828",), - 0x801A787C:("func_801A787C",), - 0x801A78E4:("Audio_IsSfxPlaying",), - 0x801A794C:("func_801A794C",), - 0x801A7B10:("func_801A7B10",), + 0x801A5BD0:("AudioSfx_MuteBanks",), + 0x801A5C28:("AudioSfx_LowerBgmVolume",), + 0x801A5C8C:("AudioSfx_RestoreBgmVolume",), + 0x801A5CFC:("AudioSfx_PlaySfx",), + 0x801A5DDC:("AudioSfx_RemoveMatchingRequests",), + 0x801A5F7C:("AudioSfx_ProcessRequest",), + 0x801A6430:("AudioSfx_RemoveBankEntry",), + 0x801A65C8:("AudioSfx_ChooseActiveSfx",), + 0x801A6D0C:("AudioSfx_PlayActiveSfx",), + 0x801A7084:("AudioSfx_StopByBank",), + 0x801A7168:("AudioSfx_StopByPosAndBankImpl",), + 0x801A7284:("AudioSfx_StopByPosAndBank",), + 0x801A72CC:("AudioSfx_StopByPos",), + 0x801A7328:("AudioSfx_StopByPosAndId",), + 0x801A7484:("AudioSfx_StopByTokenAndId",), + 0x801A75E8:("AudioSfx_StopById",), + 0x801A7720:("AudioSfx_ProcessRequests",), + 0x801A7794:("AudioSfx_SetBankLerp",), + 0x801A7828:("AudioSfx_StepBankLerp",), + 0x801A787C:("AudioSfx_ProcessActiveSfx",), + 0x801A78E4:("AudioSfx_IsPlaying",), + 0x801A794C:("AudioSfx_Reset",), + 0x801A7B10:("Audio_StartSequence",), 0x801A7D04:("func_801A7D04",), 0x801A7D84:("func_801A7D84",), 0x801A89A8:("Audio_QueueSeqCmd",), @@ -5237,7 +5237,7 @@ 0x8087DF64:("EnHorse_MountedIdle",), 0x8087E080:("EnHorse_MountedIdleAnim",), 0x8087E0A4:("EnHorse_MountedIdleWhinney",), - 0x8087E18C:("EnHorse_MountedIdleWhinneying",), + 0x8087E18C:("EnHorse_MountedIdleWhinnying",), 0x8087E2A8:("EnHorse_StartTurning",), 0x8087E350:("EnHorse_MountedTurn",), 0x8087E564:("EnHorse_StartWalkingFromIdle",), @@ -6703,7 +6703,7 @@ 0x808F25A4:("EnKarebaba_Update",), 0x808F280C:("func_808F280C",), 0x808F28F8:("EnKarebaba_Draw",), - 0x808F30B0:("func_808F30B0",), + 0x808F30B0:("EnIn_ChangeAnim",), 0x808F3178:("func_808F3178",), 0x808F322C:("func_808F322C",), 0x808F32A0:("func_808F32A0",), @@ -7539,7 +7539,7 @@ 0x809455A0:("ItemInbox_Draw",), 0x80945650:("EnGe1_Init",), 0x809457C0:("EnGe1_Destroy",), - 0x809457EC:("EnGe1_SetAnimation",), + 0x809457EC:("EnGe1_ChangeAnim",), 0x80945924:("EnGe1_LookAtPlayer",), 0x80945A00:("EnGe1_ShadowDraw",), 0x80945A9C:("EnGe1_SetupPath",), @@ -8016,7 +8016,7 @@ 0x8096F4DC:("BgF40Swlift_Draw",), 0x8096F5E0:("EnKakasi_Destroy",), 0x8096F60C:("EnKakasi_Init",), - 0x8096F800:("EnKakasi_SetAnimation",), + 0x8096F800:("EnKakasi_ChangeAnim",), 0x8096F88C:("EnKakasi_ValidatePictograph",), 0x8096F8D8:("func_8096F8D8",), 0x8096FA18:("func_8096FA18",), @@ -8083,7 +8083,7 @@ 0x80974118:("EnSsh_AddBlureVertex",), 0x80974220:("EnSsh_AddBlureSpace",), 0x8097424C:("EnSsh_InitColliders",), - 0x80974374:("EnSsh_SetAnimation",), + 0x80974374:("EnSsh_ChangeAnim",), 0x809744A8:("EnSsh_SetWaitAnimation",), 0x809744C8:("EnSsh_SetReturnAnimation",), 0x809744FC:("EnSsh_SetLandAnimation",), @@ -8305,7 +8305,7 @@ 0x80987A3C:("OceffWipe3_Destroy",), 0x80987A70:("OceffWipe3_Update",), 0x80987AD0:("OceffWipe3_Draw",), - 0x80989140:("EnDg_ChangeAnimation",), + 0x80989140:("EnDg_ChangeAnim",), 0x80989204:("EnDg_UpdateCollision",), 0x8098933C:("EnDg_GetFloorRot",), 0x80989418:("EnDg_HasReachedPoint",), @@ -8615,7 +8615,7 @@ 0x8099D7DC:("OceffWipe4_Destroy",), 0x8099D810:("OceffWipe4_Update",), 0x8099D870:("OceffWipe4_Draw",), - 0x8099E790:("EnZo_SetAnimation",), + 0x8099E790:("EnZo_ChangeAnim",), 0x8099E858:("EnZo_PlayWalkingSound",), 0x8099E96C:("EnZo_Blink",), 0x8099E9E0:("EnZo_UpdateCollider",), @@ -9749,7 +9749,7 @@ 0x80A16D6C:("EnRaf_ClearPixelPetal",), 0x80A16D90:("EnRaf_Init",), 0x80A17018:("EnRaf_Destroy",), - 0x80A17060:("EnRaf_ChangeAnimation",), + 0x80A17060:("EnRaf_ChangeAnim",), 0x80A1712C:("EnRaf_SetupIdle",), 0x80A171D8:("EnRaf_Idle",), 0x80A17414:("EnRaf_SetupGrab",), @@ -10090,7 +10090,7 @@ 0x80A2CF50:("func_80A2CF50",), 0x80A2CF7C:("func_80A2CF7C",), 0x80A2D0FC:("ElfMsg3_Update",), - 0x80A2D280:("EnFg_UpdateAnimation",), + 0x80A2D280:("EnFg_ChangeAnim",), 0x80A2D348:("func_80A2D348",), 0x80A2D3D4:("func_80A2D3D4",), 0x80A2D400:("func_80A2D400",), @@ -10641,32 +10641,32 @@ 0x80A560F0:("EnFirefly2_Draw",), 0x80A56150:("EnRat_Init",), 0x80A56370:("EnRat_Destroy",), - 0x80A563CC:("func_80A563CC",), - 0x80A56444:("func_80A56444",), - 0x80A5665C:("func_80A5665C",), - 0x80A566E0:("func_80A566E0",), - 0x80A56994:("func_80A56994",), - 0x80A56AFC:("func_80A56AFC",), - 0x80A56EB8:("func_80A56EB8",), - 0x80A56F68:("func_80A56F68",), - 0x80A57010:("func_80A57010",), - 0x80A57118:("func_80A57118",), - 0x80A57180:("func_80A57180",), - 0x80A5723C:("func_80A5723C",), - 0x80A57330:("func_80A57330",), - 0x80A57384:("func_80A57384",), - 0x80A57488:("func_80A57488",), - 0x80A574E8:("func_80A574E8",), - 0x80A57570:("func_80A57570",), - 0x80A575F4:("func_80A575F4",), - 0x80A5764C:("func_80A5764C",), - 0x80A57918:("func_80A57918",), - 0x80A57984:("func_80A57984",), - 0x80A57A08:("func_80A57A08",), - 0x80A57A9C:("func_80A57A9C",), + 0x80A563CC:("EnRat_InitializeAxes",), + 0x80A56444:("EnRat_UpdateFloorPoly",), + 0x80A5665C:("EnRat_UpdateRotation",), + 0x80A566E0:("EnRat_ChooseDirection",), + 0x80A56994:("EnRat_IsOnCollisionPoly",), + 0x80A56AFC:("EnRat_IsTouchingSurface",), + 0x80A56EB8:("EnRat_ActorCoordsToWorld",), + 0x80A56F68:("EnRat_SpawnWaterEffects",), + 0x80A57010:("EnRat_HandleNonSceneCollision",), + 0x80A57118:("EnRat_SpawnSmoke",), + 0x80A57180:("EnRat_SetupRevive",), + 0x80A5723C:("EnRat_Revive",), + 0x80A57330:("EnRat_SetupIdle",), + 0x80A57384:("EnRat_Idle",), + 0x80A57488:("EnRat_SetupSpottedPlayer",), + 0x80A574E8:("EnRat_SpottedPlayer",), + 0x80A57570:("EnRat_UpdateSparkOffsets",), + 0x80A575F4:("EnRat_SetupChasePlayer",), + 0x80A5764C:("EnRat_ChasePlayer",), + 0x80A57918:("EnRat_SetupBounced",), + 0x80A57984:("EnRat_Bounced",), + 0x80A57A08:("EnRat_Explode",), + 0x80A57A9C:("EnRat_PostDetonation",), 0x80A57AE0:("EnRat_Update",), - 0x80A57F10:("func_80A57F10",), - 0x80A57F4C:("func_80A57F4C",), + 0x80A57F10:("EnRat_OverrideLimbDraw",), + 0x80A57F4C:("EnRat_PostLimbDraw",), 0x80A58354:("EnRat_Draw",), 0x80A587A0:("func_80A587A0",), 0x80A58908:("func_80A58908",), @@ -11464,7 +11464,7 @@ 0x80A9FB54:("DmOpstage_Update",), 0x80A9FBB8:("DmOpstage_Draw",), 0x80A9FDB0:("DmStk_LoadObjectForAnimation",), - 0x80A9FE3C:("DmStk_ChangeAnimation",), + 0x80A9FE3C:("DmStk_ChangeAnim",), 0x80A9FED8:("DmStk_PlaySfxForIntroCutsceneFirstPart",), 0x80AA00CC:("DmStk_PlaySfxForTitleCutscene",), 0x80AA0100:("DmStk_PlaySfxForIntroCutsceneSecondPart",), @@ -11547,7 +11547,7 @@ 0x80AA90F4:("func_80AA90F4",), 0x80AA9140:("DmChar01_Update",), 0x80AA922C:("DmChar01_Draw",), - 0x80AAAE30:("DmChar02_ChangeAnimation",), + 0x80AAAE30:("DmChar02_ChangeAnim",), 0x80AAAECC:("DmChar02_PlaySfxForDroppingOcarinaCutscene",), 0x80AAAF2C:("DmChar02_PlaySfxForCutscenes",), 0x80AAAF78:("DmChar02_Init",), @@ -11558,7 +11558,7 @@ 0x80AAB258:("DmChar02_PostLimbDraw",), 0x80AAB270:("DmChar02_TransformLimbDraw",), 0x80AAB284:("DmChar02_Draw",), - 0x80AAB4A0:("DmChar03_ChangeAnimation",), + 0x80AAB4A0:("DmChar03_ChangeAnim",), 0x80AAB53C:("DmChar03_Init",), 0x80AAB5E8:("DmChar03_Destroy",), 0x80AAB5F8:("func_80AAB5F8",), @@ -11656,16 +11656,16 @@ 0x80AB0E7C:("func_80AB0E7C",), 0x80AB0F90:("func_80AB0F90",), 0x80AB1124:("DmChar08_Draw",), - 0x80AB1E10:("func_80AB1E10",), + 0x80AB1E10:("DmChar09_ChangeAnim",), 0x80AB1EAC:("DmChar09_Init",), 0x80AB1F90:("DmChar09_Destroy",), 0x80AB1FA0:("func_80AB1FA0",), 0x80AB1FDC:("func_80AB1FDC",), - 0x80AB2258:("func_80AB2258",), + 0x80AB2258:("DmChar09_DoNothing",), 0x80AB2268:("func_80AB2268",), 0x80AB24BC:("func_80AB24BC",), 0x80AB2544:("DmChar09_Update",), - 0x80AB25D8:("func_80AB25D8",), + 0x80AB25D8:("DmChar09_OverrideLimbDraw",), 0x80AB261C:("DmChar09_Draw",), 0x80AB2790:("ObjTokeidai_GetTargetSunMoonPanelRotation",), 0x80AB27B4:("ObjTokeidai_SetupClockOrExteriorGear",), @@ -12865,12 +12865,12 @@ 0x80B00F08:("EnTalkGibud_OverrideLimbDraw",), 0x80B00F64:("EnTalkGibud_PostLimbDraw",), 0x80B01040:("EnTalkGibud_Draw",), - 0x80B01990:("EnGiant_ChangeAnimation",), + 0x80B01990:("EnGiant_ChangeAnim",), 0x80B01A74:("EnGiant_IsImprisoned",), 0x80B01B30:("EnGiant_Init",), 0x80B01E74:("EnGiant_Destroy",), 0x80B01E84:("EnGiant_ChangeToStartOrLoopAnimation",), - 0x80B01EE8:("EnGiant_ChangeAnimationBasedOnCsAction",), + 0x80B01EE8:("EnGiant_ChangeAnimBasedOnCsAction",), 0x80B020A0:("EnGiant_UpdateAlpha",), 0x80B0211C:("EnGiant_PlayAndUpdateAnimation",), 0x80B02234:("EnGiant_PlaySound",), @@ -13277,7 +13277,7 @@ 0x80B23F50:("ObjWind_Destroy",), 0x80B23F60:("ObjWind_Update",), 0x80B243C0:("ObjWind_Draw",), - 0x80B24630:("EnRacedog_ChangeAnimation",), + 0x80B24630:("EnRacedog_ChangeAnim",), 0x80B246F4:("EnRacedog_UpdateCollision",), 0x80B2478C:("EnRacedog_GetYRotation",), 0x80B248B8:("EnRacedog_GetFloorRot",), @@ -14130,7 +14130,7 @@ 0x80B5E1D8:("func_80B5E1D8",), 0x80B5E890:("EnDragon_Init",), 0x80B5EA74:("EnDragon_Destroy",), - 0x80B5EAA0:("EnDragon_ChangeAnimation",), + 0x80B5EAA0:("EnDragon_ChangeAnim",), 0x80B5EB40:("EnDragon_SpawnBubbles",), 0x80B5ED90:("EnDragon_RetreatOnceTimerEnds",), 0x80B5EDF0:("EnDragon_SetupRetreatOrIdle",), @@ -14508,7 +14508,7 @@ 0x80B7AEFC:("ObjUm_TerminaFieldIdle",), 0x80B7AF30:("func_80B7AF30",), 0x80B7B154:("ObjUm_DefaultAnim",), - 0x80B7B18C:("ObjUm_UpdateAnim",), + 0x80B7B18C:("ObjUm_ChangeAnim",), 0x80B7B368:("ObjUm_Update",), 0x80B7B598:("ObjUm_OverrideLimbDraw",), 0x80B7B93C:("ObjUm_SpawnFragments",), @@ -15198,7 +15198,7 @@ 0x80BAA220:("EnBaba_Draw",), 0x80BAA6D0:("EnSuttari_UpdateCollider",), 0x80BAA848:("EnSuttari_GetActorById",), - 0x80BAA88C:("EnSuttari_SetNextEntrance",), + 0x80BAA88C:("EnSuttari_TriggerTransition",), 0x80BAA8D0:("EnSuttari_UpdateTime",), 0x80BAA904:("func_80BAA904",), 0x80BAA9B4:("func_80BAA9B4",), @@ -15414,42 +15414,42 @@ 0x80BBC4E4:("func_80BBC4E4",), 0x80BBC500:("func_80BBC500",), 0x80BBC540:("EnZos_Draw",), - 0x80BBCA80:("func_80BBCA80",), - 0x80BBD348:("func_80BBD348",), - 0x80BBD8F0:("func_80BBD8F0",), - 0x80BBD93C:("func_80BBD93C",), - 0x80BBD98C:("func_80BBD98C",), - 0x80BBDACC:("func_80BBDACC",), - 0x80BBDC34:("func_80BBDC34",), - 0x80BBDCFC:("func_80BBDCFC",), - 0x80BBDDF8:("func_80BBDDF8",), - 0x80BBDE78:("func_80BBDE78",), - 0x80BBDF28:("func_80BBDF28",), - 0x80BBDFA8:("func_80BBDFA8",), - 0x80BBE05C:("func_80BBE05C",), - 0x80BBE0E4:("func_80BBE0E4",), - 0x80BBE144:("func_80BBE144",), - 0x80BBE374:("func_80BBE374",), - 0x80BBE498:("func_80BBE498",), - 0x80BBE73C:("func_80BBE73C",), - 0x80BBE844:("func_80BBE844",), - 0x80BBE904:("func_80BBE904",), - 0x80BBE9F8:("func_80BBE9F8",), - 0x80BBEAD8:("func_80BBEAD8",), - 0x80BBEBF8:("func_80BBEBF8",), - 0x80BBECBC:("func_80BBECBC",), - 0x80BBEEB4:("func_80BBEEB4",), - 0x80BBEF34:("func_80BBEF34",), - 0x80BBEFA0:("func_80BBEFA0",), - 0x80BBF01C:("func_80BBF01C",), + 0x80BBCA80:("EnSGoro_ShrineGoron_NextTextId",), + 0x80BBD348:("EnSGoro_BombshopGoron_NextTextId",), + 0x80BBD8F0:("EnSGoro_FindGoronElder",), + 0x80BBD93C:("EnSGoro_FindGoronChild",), + 0x80BBD98C:("EnSGoro_UpdateSleeping",), + 0x80BBDACC:("EnSGoro_UpdateCheerAnimation",), + 0x80BBDC34:("EnSGoro_CheckLullaby",), + 0x80BBDCFC:("EnSGoro_CheckGKBehavior",), + 0x80BBDDF8:("EnSGoro_UpdateToHandtapAnimation",), + 0x80BBDE78:("EnSGoro_UpdateSleepyAnimation",), + 0x80BBDF28:("EnSGoro_UpdateToIdleAnimation",), + 0x80BBDFA8:("EnSGoro_UpdateCollider",), + 0x80BBE05C:("EnSGoro_UpdateEyes",), + 0x80BBE0E4:("EnSGoro_UpdateActorFocus",), + 0x80BBE144:("EnSGoro_UpdateRotationToPlayer",), + 0x80BBE374:("EnSGoro_UpdateAttentionTarget",), + 0x80BBE498:("EnSGoro_SetupAction",), + 0x80BBE73C:("EnSGoro_WinterShrineGoron_Idle",), + 0x80BBE844:("EnSGoro_WinterShrineGoron_Talk",), + 0x80BBE904:("EnSGoro_SpringShrineGoron_Idle",), + 0x80BBE9F8:("EnSGoro_SpringShrineGoron_Talk",), + 0x80BBEAD8:("EnSGoro_ShopGoron_Idle",), + 0x80BBEBF8:("EnSGoro_ShopGoron_FinishUnroll",), + 0x80BBECBC:("EnSGoro_ShopGoron_Talk",), + 0x80BBEEB4:("EnSGoro_ShopGoron_TakePayment",), + 0x80BBEF34:("EnSGoro_ShopGoron_FinishTransaction",), + 0x80BBEFA0:("EnSGoro_Sleep",), + 0x80BBF01C:("EnSGoro_SleepTalk",), 0x80BBF09C:("EnSGoro_Init",), 0x80BBF198:("EnSGoro_Destroy",), 0x80BBF1C4:("EnSGoro_Update",), - 0x80BBF298:("func_80BBF298",), - 0x80BBF3D0:("func_80BBF3D0",), - 0x80BBF3EC:("func_80BBF3EC",), - 0x80BBF5F0:("func_80BBF5F0",), - 0x80BBF6BC:("func_80BBF6BC",), + 0x80BBF298:("EnSGoro_UpdateLimb",), + 0x80BBF3D0:("EnSGoro_OverrideLimbDraw",), + 0x80BBF3EC:("EnSGoro_TransformLimbDraw",), + 0x80BBF5F0:("EnSGoro_DrawUnrolled",), + 0x80BBF6BC:("EnSGoro_DrawRolledUp",), 0x80BBF7BC:("EnSGoro_Draw",), 0x80BBFDB0:("func_80BBFDB0",), 0x80BBFE60:("func_80BBFE60",), @@ -15577,7 +15577,7 @@ 0x80BC61D0:("EnPoComposer_Draw",), 0x80BC6BF0:("EnGuruguru_Init",), 0x80BC6D28:("EnGuruguru_Destroy",), - 0x80BC6D64:("EnGuruguru_ChangeAnimation",), + 0x80BC6D64:("EnGuruguru_ChangeAnim",), 0x80BC6E00:("EnGuruguru_DoNothing",), 0x80BC6E10:("func_80BC6E10",), 0x80BC6F14:("func_80BC6F14",), @@ -16148,7 +16148,7 @@ 0x80BE8390:("EnMuto_Draw",), 0x80BE84F0:("EnBaisen_Init",), 0x80BE8664:("EnBaisen_Destroy",), - 0x80BE8690:("EnBaisen_ChangeAnimation",), + 0x80BE8690:("EnBaisen_ChangeAnim",), 0x80BE871C:("func_80BE871C",), 0x80BE87B0:("func_80BE87B0",), 0x80BE87FC:("func_80BE87FC",), @@ -16161,7 +16161,7 @@ 0x80BE8D94:("EnBaisen_Draw",), 0x80BE8F20:("EnHeishi_Init",), 0x80BE9090:("EnHeishi_Destroy",), - 0x80BE90BC:("EnHeishi_ChangeAnimation",), + 0x80BE90BC:("EnHeishi_ChangeAnim",), 0x80BE9148:("EnHeishi_SetHeadRotation",), 0x80BE91DC:("EnHeishi_SetupIdle",), 0x80BE9214:("EnHeishi_Idle",), @@ -16170,7 +16170,7 @@ 0x80BE93D8:("EnHeishi_Draw",), 0x80BE9510:("EnDemoheishi_Init",), 0x80BE95C0:("EnDemoheishi_Destroy",), - 0x80BE95EC:("EnDemoheishi_ChangeAnimation",), + 0x80BE95EC:("EnDemoheishi_ChangeAnim",), 0x80BE9678:("EnDemoheishi_SetHeadRotation",), 0x80BE970C:("EnDemoheishi_SetupIdle",), 0x80BE975C:("EnDemoheishi_Idle",), @@ -16380,7 +16380,7 @@ 0x80BFA2D0:("EnYb_Destroy",), 0x80BFA2FC:("func_80BFA2FC",), 0x80BFA350:("EnYb_ActorShadowFunc",), - 0x80BFA444:("EnYb_SetAnimation",), + 0x80BFA444:("EnYb_ChangeAnim",), 0x80BFA5CC:("EnYb_CanTalk",), 0x80BFA634:("EnYb_UpdateAnimation",), 0x80BFA67C:("EnYb_FinishTeachingCutscene",), @@ -16437,7 +16437,7 @@ 0x80BFD158:("EnScopecoin_Update",), 0x80BFD17C:("EnScopecoin_Draw",), 0x80BFD2E0:("EnBjt_UpdateSkelAnime",), - 0x80BFD30C:("EnBjt_ChangeAnimation",), + 0x80BFD30C:("EnBjt_ChangeAnim",), 0x80BFD3A4:("EnBjt_UpdateCollision",), 0x80BFD434:("EnBjt_TakeItem",), 0x80BFD4FC:("EnBjt_Appear",), @@ -16930,7 +16930,7 @@ 0x80C1B9D4:("func_80C1B9D4",), 0x80C1BAC8:("EnFall2_Update",), 0x80C1BAEC:("EnFall2_Draw",), - 0x80C1BD90:("DmAl_ChangeAnimation",), + 0x80C1BD90:("DmAl_ChangeAnim",), 0x80C1BDD8:("func_80C1BDD8",), 0x80C1BF08:("DmAl_Init",), 0x80C1BFB8:("DmAl_Destroy",), diff --git a/tools/disasm/variables.txt b/tools/disasm/variables.txt index b694deaa3..fc9c3950b 100644 --- a/tools/disasm/variables.txt +++ b/tools/disasm/variables.txt @@ -2254,7 +2254,7 @@ 0x801D6194:("D_801D6194","UNK_TYPE4","",0x4), 0x801D61A0:("sSeqInstructionArgsTable","u8","[96]",0x60), 0x801D6200:("D_801D6200","UNK_TYPE1","",0x1), - 0x801D6600:("D_801D6600","UNK_TYPE1","",0x1), + 0x801D6600:("gIsLargeSfxBank","UNK_TYPE1","",0x1), 0x801D6608:("D_801D6608","UNK_TYPE1","",0x1), 0x801D6610:("gChannelsPerBank","UNK_TYPE1","",0x1), 0x801D662C:("gUsedChannelsPerBank","UNK_TYPE1","",0x1), @@ -2273,7 +2273,7 @@ 0x801D6698:("sGanonsTowerLevelsVol","u8","[8]",0x8), 0x801D66A0:("sEnterGanonsTowerTimer","UNK_TYPE1","",0x1), 0x801D66A4:("sSfxVolumeDuration","UNK_TYPE2","",0x2), - 0x801D66A8:("sAudioFileSelectSetting","UNK_TYPE1","",0x1), + 0x801D66A8:("sSoundMode","UNK_TYPE1","",0x1), 0x801D66AC:("sAudioIsWindowOpen","UNK_TYPE1","",0x1), 0x801D66B0:("sAudioCutsceneFlag","UNK_TYPE1","",0x1), 0x801D66B4:("sSpecReverb","UNK_TYPE1","",0x1), @@ -2381,14 +2381,14 @@ 0x801DADD0:("sOcarinaBankParams","UNK_TYPE1","",0x1), 0x801DAE10:("sVoiceBankParams","UNK_TYPE1","",0x1), 0x801DB450:("gSfxParams","UNK_PTR","",0x4), - 0x801DB470:("D_801DB470","UNK_TYPE1","",0x1), - 0x801DB474:("D_801DB474","UNK_TYPE1","",0x1), - 0x801DB478:("D_801DB478","UNK_PTR","[7]",0x1c), - 0x801DB494:("D_801DB494","UNK_TYPE1","",0x1), - 0x801DB49C:("D_801DB49C","UNK_TYPE1","",0x1), - 0x801DB4A0:("D_801DB4A0","UNK_TYPE2","",0x2), + 0x801DB470:("sSfxRequestWriteIndex","UNK_TYPE1","",0x1), + 0x801DB474:("sSfxRequestReadIndex","UNK_TYPE1","",0x1), + 0x801DB478:("gSfxBanks","UNK_PTR","[7]",0x1c), + 0x801DB494:("sSfxBankSizes","UNK_TYPE1","",0x1), + 0x801DB49C:("gSfxChannelLayout","UNK_TYPE1","",0x1), + 0x801DB4A0:("sSfxChannelLowVolumeFlag","UNK_TYPE2","",0x2), 0x801DB4A4:("gSfxDefaultPos","UNK_TYPE4","",0x4), - 0x801DB4B0:("D_801DB4B0","UNK_TYPE1","",0x1), + 0x801DB4B0:("gSfxDefaultFreqAndVolScale","UNK_TYPE1","",0x1), 0x801DB4B8:("gSfxDefaultReverb","UNK_TYPE1","",0x1), 0x801DB4C0:("D_801DB4C0","UNK_TYPE1","",0x1), 0x801DB4C4:("D_801DB4C4","UNK_TYPE1","",0x1), @@ -4321,21 +4321,21 @@ 0x801FD5E8:("D_801FD5E8","UNK_TYPE1","",0x1), 0x801FD608:("D_801FD608","UNK_TYPE1","",0x1), 0x801FD610:("D_801FD610","UNK_TYPE1","",0x1), - 0x801FD710:("D_801FD710","UNK_TYPE1","",0x1), - 0x801FD8C0:("D_801FD8C0","UNK_TYPE1","",0x1), - 0x801FDB00:("D_801FDB00","UNK_TYPE1","",0x1), - 0x801FE100:("D_801FE100","UNK_TYPE1","",0x1), - 0x801FE4C0:("D_801FE4C0","UNK_TYPE1","",0x1), - 0x801FE640:("D_801FE640","UNK_TYPE1","",0x1), - 0x801FE6D0:("D_801FE6D0","UNK_TYPE1","",0x1), - 0x801FE7C0:("D_801FE7C0","SoundRequest","[1]",0x14), - 0x801FFBC0:("D_801FFBC0","UNK_TYPE1","",0x1), - 0x801FFBC8:("D_801FFBC8","UNK_TYPE1","",0x1), - 0x801FFBD0:("D_801FFBD0","UNK_TYPE1","",0x1), - 0x801FFBD8:("D_801FFBD8","UNK_TYPE1","",0x1), - 0x801FFC80:("D_801FFC80","UNK_TYPE1","",0x1), - 0x801FFC84:("D_801FFC84","UNK_TYPE1","",0x1), - 0x801FFC90:("D_801FFC90","UNK_TYPE1","",0x1), + 0x801FD710:("sSfxPlayerBank","UNK_TYPE1","",0x1), + 0x801FD8C0:("sSfxItemBank","UNK_TYPE1","",0x1), + 0x801FDB00:("sSfxEnvironmentBank","UNK_TYPE1","",0x1), + 0x801FE100:("sSfxEnemyBank","UNK_TYPE1","",0x1), + 0x801FE4C0:("sSfxSystemBank","UNK_TYPE1","",0x1), + 0x801FE640:("sSfxOcarinaBank","UNK_TYPE1","",0x1), + 0x801FE6D0:("sSfxVoiceBank","UNK_TYPE1","",0x1), + 0x801FE7C0:("sSfxRequests","SfxRequest","[0x100]",0x14), + 0x801FFBC0:("sSfxBankListEnd","UNK_TYPE1","",0x1), + 0x801FFBC8:("sSfxBankFreeListStart","UNK_TYPE1","",0x1), + 0x801FFBD0:("sSfxBankUnused","UNK_TYPE1","",0x1), + 0x801FFBD8:("gActiveSfx","UNK_TYPE1","",0x1), + 0x801FFC80:("sCurSfxPlayerChannelIndex","UNK_TYPE1","",0x1), + 0x801FFC84:("gSfxBankMuted","UNK_TYPE1","",0x1), + 0x801FFC90:("sUnusedBankLerp","UNK_TYPE1","",0x1), 0x801FFD00:("D_801FFD00","UNK_TYPE1","",0x1), 0x801FFD34:("D_801FFD34","UNK_TYPE1","",0x1), 0x801FFD40:("D_801FFD40","UNK_TYPE1","",0x1), @@ -8529,7 +8529,7 @@ 0x80951C5C:("D_80951C5C","UNK_TYPE1","",0x1), 0x80951C88:("D_80951C88","UNK_TYPE1","",0x1), 0x80951CB4:("D_80951CB4","UNK_TYPE1","",0x1), - 0x80951CC0:("D_80951CC0","UNK_TYPE1","",0x1), + 0x80951CC0:("sAnimationInfo","UNK_TYPE1","",0x1), 0x80951D90:("D_80951D90","UNK_TYPE1","",0x1), 0x80951D9C:("D_80951D9C","UNK_TYPE1","",0x1), 0x80951DA8:("D_80951DA8","UNK_TYPE1","",0x1), @@ -9868,7 +9868,7 @@ 0x809C1008:("D_809C1008","UNK_TYPE1","",0x1), 0x809C1010:("D_809C1010","f32","",0x4), 0x809C3770:("En_Aob_01_InitVars","UNK_TYPE1","",0x1), - 0x809C3790:("D_809C3790","UNK_TYPE4","",0x4), + 0x809C3790:("sAnimationInfo","UNK_TYPE4","",0x4), 0x809C3820:("D_809C3820","UNK_TYPE1","",0x1), 0x809C384C:("D_809C384C","UNK_TYPE4","",0x4), 0x809C392C:("D_809C392C","UNK_TYPE1","",0x1), @@ -9979,7 +9979,7 @@ 0x809CCD14:("D_809CCD14","f32","",0x4), 0x809CDC30:("En_Bji_01_InitVars","ActorInit","",0x20), 0x809CDC50:("D_809CDC50","UNK_TYPE1","",0x1), - 0x809CDC7C:("D_809CDC7C","UNK_TYPE1","",0x1), + 0x809CDC7C:("sAnimationInfo","UNK_TYPE1","",0x1), 0x809CDCBC:("D_809CDCBC","UNK_TYPE1","",0x1), 0x809CDCC8:("D_809CDCC8","UNK_TYPE1","",0x1), 0x809CDCD4:("D_809CDCD4","UNK_TYPE1","",0x1), @@ -11155,7 +11155,7 @@ 0x80A2E630:("D_80A2E630","f32","",0x4), 0x80A2E910:("Dm_Ravine_InitVars","UNK_TYPE1","",0x1), 0x80A2ECE0:("Dm_Sa_InitVars","UNK_TYPE1","",0x1), - 0x80A2ED00:("D_80A2ED00","UNK_TYPE1","",0x1), + 0x80A2ED00:("sAnimationInfo","UNK_TYPE1","",0x1), 0x80A2ED20:("D_80A2ED20","f32","",0x4), 0x80A31AD0:("En_Slime_InitVars","UNK_TYPE1","",0x1), 0x80A31AF0:("D_80A31AF0","UNK_TYPE1","",0x1), @@ -11671,7 +11671,7 @@ 0x80A53444:("En_Dnq_InitVars","UNK_TYPE1","",0x1), 0x80A53464:("D_80A53464","UNK_TYPE1","",0x1), 0x80A53490:("D_80A53490","UNK_PTR","",0x4), - 0x80A5349C:("D_80A5349C","UNK_TYPE1","",0x1), + 0x80A5349C:("sAnimationInfo","UNK_TYPE1","",0x1), 0x80A535DC:("D_80A535DC","UNK_TYPE1","",0x1), 0x80A535F0:("D_80A535F0","UNK_TYPE4","",0x4), 0x80A535FC:("D_80A535FC","UNK_TYPE1","",0x1), @@ -11739,20 +11739,19 @@ 0x80A55E40:("D_80A55E40","f32","",0x4), 0x80A56100:("En_Firefly2_InitVars","UNK_TYPE1","",0x1), 0x80A583E0:("En_Rat_InitVars","UNK_TYPE1","",0x1), - 0x80A58400:("D_80A58400","UNK_TYPE1","",0x1), - 0x80A58428:("D_80A58428","UNK_TYPE2","",0x2), - 0x80A5842C:("D_80A5842C","UNK_TYPE1","",0x1), - 0x80A5844C:("D_80A5844C","UNK_TYPE1","",0x1), - 0x80A58454:("D_80A58454","UNK_TYPE4","",0x4), - 0x80A58464:("D_80A58464","UNK_TYPE1","",0x1), - 0x80A58470:("D_80A58470","EffectBlureInit2","",0x24), - 0x80A58494:("D_80A58494","UNK_TYPE4","",0x4), - 0x80A58498:("D_80A58498","UNK_TYPE1","",0x1), - 0x80A584A4:("D_80A584A4","UNK_TYPE1","",0x1), - 0x80A584A8:("D_80A584A8","UNK_TYPE1","",0x1), - 0x80A584B4:("D_80A584B4","UNK_TYPE1","",0x1), - 0x80A584C0:("D_80A584C0","UNK_TYPE1","",0x1), - 0x80A584CC:("D_80A584CC","UNK_TYPE1","",0x1), + 0x80A58400:("sSphereInit","UNK_TYPE1","",0x1), + 0x80A5842C:("sDamageTable","UNK_TYPE1","",0x1), + 0x80A5844C:("sColChkInfoInit","UNK_TYPE1","",0x1), + 0x80A58454:("sSparkTextures","UNK_TYPE4","",0x4), + 0x80A58464:("sInitChain","UNK_TYPE1","",0x1), + 0x80A58470:("sBlureInit","EffectBlureInit2","",0x24), + 0x80A58494:("sTexturesDesegmented","UNK_TYPE4","",0x4), + 0x80A58498:("sSmokeAccel","UNK_TYPE1","",0x1), + 0x80A584A4:("sSmokeColor","UNK_TYPE1","",0x1), + 0x80A584A8:("sBlureP1Offset","UNK_TYPE1","",0x1), + 0x80A584B4:("sBlureP2LeftOffset","UNK_TYPE1","",0x1), + 0x80A584C0:("sBlureP2RightOffset","UNK_TYPE1","",0x1), + 0x80A584CC:("sDustVelocity","UNK_TYPE1","",0x1), 0x80A584E0:("D_80A584E0","f32","",0x4), 0x80A584E4:("D_80A584E4","f32","",0x4), 0x80A584E8:("D_80A584E8","f32","",0x4), @@ -12343,7 +12342,7 @@ 0x80A8B280:("D_80A8B280","UNK_TYPE1","",0x1), 0x80A8B2A0:("D_80A8B2A0","UNK_TYPE1","",0x1), 0x80A8B2CC:("D_80A8B2CC","UNK_TYPE1","",0x1), - 0x80A8B2D8:("D_80A8B2D8","UNK_TYPE1","",0x1), + 0x80A8B2D8:("sAnimationInfo","UNK_TYPE1","",0x1), 0x80A8B3D8:("D_80A8B3D8","UNK_TYPE1","",0x1), 0x80A8B3E4:("D_80A8B3E4","UNK_TYPE1","",0x1), 0x80A8B3F0:("D_80A8B3F0","UNK_TYPE1","",0x1), @@ -13174,7 +13173,7 @@ 0x80ADD940:("D_80ADD940","UNK_TYPE1","",0x1), 0x80ADD944:("En_Sellnuts_InitVars","UNK_TYPE1","",0x1), 0x80ADD964:("D_80ADD964","UNK_TYPE1","",0x1), - 0x80ADD990:("D_80ADD990","UNK_TYPE1","",0x1), + 0x80ADD990:("sAnimationInfo","UNK_TYPE1","",0x1), 0x80ADDB00:("D_80ADDB00","UNK_TYPE1","",0x1), 0x80ADDB10:("jtbl_80ADDB10","UNK_PTR","",0x4), 0x80ADDB4C:("D_80ADDB4C","f32","",0x4), @@ -14288,7 +14287,7 @@ 0x80B3DED0:("D_80B3DED0","f32","",0x4), 0x80B3FBD0:("En_Dai_InitVars","UNK_TYPE1","",0x1), 0x80B3FBF0:("D_80B3FBF0","UNK_TYPE4","",0x4), - 0x80B3FBFC:("D_80B3FBFC","UNK_TYPE1","",0x1), + 0x80B3FBFC:("sAnimationInfo","UNK_TYPE1","",0x1), 0x80B3FC8C:("D_80B3FC8C","UNK_TYPE1","",0x1), 0x80B3FCB4:("D_80B3FCB4","UNK_TYPE4","",0x4), 0x80B3FCE4:("D_80B3FCE4","UNK_TYPE4","",0x4), @@ -14981,7 +14980,7 @@ 0x80B774F0:("En_Tru_Mt_InitVars","UNK_TYPE1","",0x1), 0x80B77510:("D_80B77510","UNK_TYPE1","",0x1), 0x80B7753C:("D_80B7753C","UNK_TYPE1","",0x1), - 0x80B7755C:("D_80B7755C","UNK_TYPE1","",0x1), + 0x80B7755C:("sAnimationInfo","UNK_TYPE1","",0x1), 0x80B7765C:("D_80B7765C","UNK_TYPE1","",0x1), 0x80B77668:("D_80B77668","UNK_TYPE1","",0x1), 0x80B77674:("D_80B77674","UNK_TYPE4","",0x4), @@ -15610,12 +15609,12 @@ 0x80BBC75C:("D_80BBC75C","UNK_TYPE1","",0x1), 0x80BBC770:("D_80BBC770","f32","",0x4), 0x80BBC774:("jtbl_80BBC774","UNK_PTR","",0x4), - 0x80BBF800:("En_S_Goro_InitVars","UNK_TYPE1","",0x1), - 0x80BBF820:("D_80BBF820","UNK_TYPE1","",0x1), - 0x80BBF84C:("D_80BBF84C","UNK_TYPE1","",0x1), - 0x80BBF858:("D_80BBF858","UNK_TYPE1","",0x1), - 0x80BBF878:("D_80BBF878","UNK_TYPE1","",0x1), - 0x80BBF978:("D_80BBF978","UNK_TYPE1","",0x1), + 0x80BBF800:("En_S_Goro_InitVars","ActorInit","",0x20), + 0x80BBF820:("sCylinderInit","ColliderCylinderInit","",0x2C), + 0x80BBF84C:("sColChkInfoInit","CollisionCheckInfoInit2","",0xC), + 0x80BBF858:("sDamageTable","DamageTable","",0x20), + 0x80BBF878:("sAnimationInfo","AnimationInfoS","[16]",0x100), + 0x80BBF978:("sEyeTextures","TexturePtr","[4]",0x18), 0x80BBF990:("jtbl_80BBF990","UNK_PTR","",0x4), 0x80BBF9B4:("jtbl_80BBF9B4","UNK_PTR","",0x4), 0x80BBFA34:("D_80BBFA34","f32","",0x4), @@ -15701,9 +15700,9 @@ 0x80BC7960:("En_Guruguru_InitVars","UNK_TYPE1","",0x1), 0x80BC7980:("D_80BC7980","UNK_TYPE1","",0x1), 0x80BC79A0:("D_80BC79A0","UNK_TYPE1","",0x1), - 0x80BC79CC:("D_80BC79CC","UNK_TYPE1","",0x1), - 0x80BC79D4:("D_80BC79D4","UNK_TYPE1","",0x1), - 0x80BC79D8:("D_80BC79D8","UNK_TYPE1","",0x1), + 0x80BC79CC:("sAnimations","UNK_TYPE1","",0x1), + 0x80BC79D4:("sAnimationModes","UNK_TYPE1","",0x1), + 0x80BC79D8:("sPlaySpeeds","UNK_TYPE1","",0x1), 0x80BC79E0:("D_80BC79E0","UNK_TYPE1","",0x1), 0x80BC79E8:("D_80BC79E8","UNK_TYPE1","",0x1), 0x80BC7EF0:("Oceff_Wipe5_InitVars","UNK_TYPE1","",0x1), @@ -16060,17 +16059,17 @@ 0x80BE8DF0:("En_Baisen_InitVars","UNK_TYPE1","",0x1), 0x80BE8E10:("D_80BE8E10","UNK_TYPE1","",0x1), 0x80BE8E3C:("D_80BE8E3C","UNK_TYPE1","",0x1), - 0x80BE8E4C:("D_80BE8E4C","UNK_TYPE1","",0x1), + 0x80BE8E4C:("sAnimations","UNK_TYPE1","",0x1), 0x80BE8E58:("D_80BE8E58","UNK_TYPE1","",0x1), 0x80BE9430:("En_Heishi_InitVars","UNK_TYPE1","",0x1), 0x80BE9450:("sCylinderInit","UNK_TYPE1","",0x1), 0x80BE947C:("sAnimations","UNK_TYPE1","",0x1), - 0x80BE9490:("sAnimModes","UNK_TYPE1","",0x1), + 0x80BE9490:("sAnimationModes","UNK_TYPE1","",0x1), 0x80BE9A30:("En_Demo_heishi_InitVars","UNK_TYPE1","",0x1), 0x80BE9A50:("sCylinderInit","UNK_TYPE1","",0x1), 0x80BE9A7C:("sTextIds","UNK_TYPE1","",0x1), 0x80BE9A80:("sAnimations","UNK_TYPE1","",0x1), - 0x80BE9A94:("sAnimModes","UNK_TYPE1","",0x1), + 0x80BE9A94:("sAnimationModes","UNK_TYPE1","",0x1), 0x80BEB1B0:("En_Dt_InitVars","UNK_TYPE1","",0x1), 0x80BEB1D0:("D_80BEB1D0","UNK_TYPE1","",0x1), 0x80BEB208:("D_80BEB208","UNK_TYPE1","",0x1), @@ -16315,7 +16314,7 @@ 0x80C058A0:("sTextIds","u16","",0x1), 0x80C058B0:("sCylinderInit","UNK_TYPE1","",0x1), 0x80C058DC:("sAnimations","AnimationHeader*","",0x1), - 0x80C058F8:("sAnimModes","u8","",0x1), + 0x80C058F8:("sAnimationModes","u8","",0x1), 0x80C05900:("sSetPrimColorDL","UNK_TYPE1","",0x1), 0x80C05910:("sSetPrimColorDlPtr","Gfx*","",0x4), 0x80C05914:("sEyeTextures","void*","",0x1), @@ -16586,7 +16585,7 @@ 0x80C1DE20:("D_80C1DE20","UNK_TYPE4","",0x4), 0x80C1DE28:("D_80C1DE28","UNK_TYPE1","",0x1), 0x80C1E1E0:("Dm_Nb_InitVars","UNK_TYPE1","",0x1), - 0x80C1E200:("D_80C1E200","UNK_TYPE1","",0x1), + 0x80C1E200:("sAnimationInfo","UNK_TYPE1","",0x1), 0x80C1E210:("D_80C1E210","UNK_TYPE4","",0x4), 0x80C1E5C0:("En_Drs_InitVars","UNK_TYPE1","",0x1), 0x80C1E5E0:("D_80C1E5E0","UNK_TYPE1","",0x1), @@ -16596,7 +16595,7 @@ 0x80C1E970:("D_80C1E970","UNK_TYPE1","",0x1), 0x80C1E984:("D_80C1E984","UNK_TYPE1","",0x1), 0x80C1F150:("Dm_Bal_InitVars","UNK_TYPE1","",0x1), - 0x80C1F170:("D_80C1F170","UNK_PTR","",0x4), + 0x80C1F170:("sAnimationInfo","UNK_PTR","",0x4), 0x80C1F2C0:("D_80C1F2C0","UNK_TYPE2","",0x2), 0x80C1F2C4:("D_80C1F2C4","UNK_TYPE4","",0x4), 0x80C1F2D0:("D_80C1F2D0","UNK_TYPE1","",0x1), diff --git a/tools/entr.py b/tools/entr.py new file mode 100755 index 000000000..9b16556c5 --- /dev/null +++ b/tools/entr.py @@ -0,0 +1,132 @@ +#!/usr/bin/env python3 + +enumPrfix = "ENTR_SCENE_" +entranceScenes = [ + "ENTR_SCENE_MAYORS_RESIDENCE", + "ENTR_SCENE_MAJORAS_LAIR", + "ENTR_SCENE_MAGIC_HAGS_POTION_SHOP", + "ENTR_SCENE_RANCH_HOUSE", + "ENTR_SCENE_HONEY_AND_DARLINGS_SHOP", + "ENTR_SCENE_BENEATH_THE_GRAVERYARD", + "ENTR_SCENE_SOUTHERN_SWAMP_CLEARED", + "ENTR_SCENE_CURIOSITY_SHOP", + "ENTR_SCENE_UNSET_08", + "ENTR_SCENE_UNSET_09", + "ENTR_SCENE_GROTTOS", + "ENTR_SCENE_UNSET_0B", + "ENTR_SCENE_UNSET_0C", + "ENTR_SCENE_UNSET_0D", + "ENTR_SCENE_CUTSCENE", + "ENTR_SCENE_UNSET_0F", + "ENTR_SCENE_IKANA_CANYON", + "ENTR_SCENE_PIRATES_FORTRESS", + "ENTR_SCENE_MILK_BAR", + "ENTR_SCENE_STONE_TOWER_TEMPLE", + "ENTR_SCENE_TREASURE_CHEST_SHOP", + "ENTR_SCENE_STONE_TOWER_TEMPLE_REVERSED", + "ENTR_SCENE_CLOCK_TOWER_ROOFTOP", + "ENTR_SCENE_OPENING_DUNGEON", + "ENTR_SCENE_WOODFALL_TEMPLE", + "ENTR_SCENE_PATH_TO_MOUNTAIN_VILLAGE", + "ENTR_SCENE_IKANA_CASTLE", + "ENTR_SCENE_DEKU_SCRUB_PLAYGROUND", + "ENTR_SCENE_ODOLWAS_LAIR", + "ENTR_SCENE_TOWN_SHOOTING_GALLERY", + "ENTR_SCENE_SNOWHEAD_TEMPLE", + "ENTR_SCENE_MILK_ROAD", + "ENTR_SCENE_PIRATES_FORTRESS_INTERIOR", + "ENTR_SCENE_SWAMP_SHOOTING_GALLERY", + "ENTR_SCENE_PINNACLE_ROCK", + "ENTR_SCENE_FAIRY_FOUNTAIN", + "ENTR_SCENE_SWAMP_SPIDER_HOUSE", + "ENTR_SCENE_OCEANSIDE_SPIDER_HOUSE", + "ENTR_SCENE_ASTRAL_OBSERVATORY", + "ENTR_SCENE_MOON_DEKU_TRIAL", + "ENTR_SCENE_DEKU_PALACE", + "ENTR_SCENE_MOUNTAIN_SMITHY", + "ENTR_SCENE_TERMINA_FIELD", + "ENTR_SCENE_POST_OFFICE", + "ENTR_SCENE_MARINE_RESEARCH_LAB", + "ENTR_SCENE_DAMPES_HOUSE", + "ENTR_SCENE_UNSET_2E", + "ENTR_SCENE_GORON_SHRINE", + "ENTR_SCENE_ZORA_HALL", + "ENTR_SCENE_TRADING_POST", + "ENTR_SCENE_ROMANI_RANCH", + "ENTR_SCENE_TWINMOLDS_LAIR", + "ENTR_SCENE_GREAT_BAY_COAST", + "ENTR_SCENE_ZORA_CAPE", + "ENTR_SCENE_LOTTERY_SHOP", + "ENTR_SCENE_UNSET_37", + "ENTR_SCENE_PIRATES_FORTRESS_EXTERIOR", + "ENTR_SCENE_FISHERMANS_HUT", + "ENTR_SCENE_GORON_SHOP", + "ENTR_SCENE_DEKU_KINGS_CHAMBER", + "ENTR_SCENE_MOON_GORON_TRIAL", + "ENTR_SCENE_ROAD_TO_SOUTHERN_SWAMP", + "ENTR_SCENE_DOGGY_RACETRACK", + "ENTR_SCENE_CUCCO_SHACK", + "ENTR_SCENE_IKANA_GRAVEYARD", + "ENTR_SCENE_GOHTS_LAIR", + "ENTR_SCENE_SOUTHERN_SWAMP_POISONED", + "ENTR_SCENE_WOODFALL", + "ENTR_SCENE_MOON_ZORA_TRIAL", + "ENTR_SCENE_GORON_VILLAGE_SPRING", + "ENTR_SCENE_GREAT_BAY_TEMPLE", + "ENTR_SCENE_WATERFALL_RAPIDS", + "ENTR_SCENE_BENEATH_THE_WELL", + "ENTR_SCENE_ZORA_HALL_ROOMS", + "ENTR_SCENE_GORON_VILLAGE_WINTER", + "ENTR_SCENE_GORON_GRAVERYARD", + "ENTR_SCENE_SAKONS_HIDEOUT", + "ENTR_SCENE_MOUNTAIN_VILLAGE_WINTER", + "ENTR_SCENE_GHOST_HUT", + "ENTR_SCENE_DEKU_SHRINE", + "ENTR_SCENE_ROAD_TO_IKANA", + "ENTR_SCENE_SWORDMANS_SCHOOL", + "ENTR_SCENE_MUSIC_BOX_HOUSE", + "ENTR_SCENE_IGOS_DU_IKANAS_LAIR", + "ENTR_SCENE_TOURIST_INFORMATION", + "ENTR_SCENE_STONE_TOWER", + "ENTR_SCENE_STONE_TOWER_INVERTED", + "ENTR_SCENE_MOUNTAIN_VILLAGE_SPRING", + "ENTR_SCENE_PATH_TO_SNOWHEAD", + "ENTR_SCENE_SNOWHEAD", + "ENTR_SCENE_PATH_TO_GORON_VILLAGE_WINTER", + "ENTR_SCENE_PATH_TO_GORON_VILLAGE_SPRING", + "ENTR_SCENE_GYORGS_LAIR", + "ENTR_SCENE_SECRET_SHRINE", + "ENTR_SCENE_STOCK_POT_INN", + "ENTR_SCENE_GREAT_BAY_CUTSCENE", + "ENTR_SCENE_CLOCK_TOWER_INTERIOR", + "ENTR_SCENE_WOODS_OF_MYSTERY", + "ENTR_SCENE_LOST_WOODS", + "ENTR_SCENE_MOON_LINK_TRIAL", + "ENTR_SCENE_THE_MOON", + "ENTR_SCENE_BOMB_SHOP", + "ENTR_SCENE_GIANTS_CHAMBER", + "ENTR_SCENE_GORMAN_TRACK", + "ENTR_SCENE_GORON_RACETRACK", + "ENTR_SCENE_EAST_CLOCK_TOWN", + "ENTR_SCENE_WEST_CLOCK_TOWN", + "ENTR_SCENE_NORTH_CLOCK_TOWN", + "ENTR_SCENE_SOUTH_CLOCK_TOWN", + "ENTR_SCENE_LAUNDRY_POOL", + "ENTR_SCENE_MAX" +] + +def macro(num): + sceneIndex = (num >> 9) & 0x7F + spawnIndex = (num >> 4) & 0x1F + return f'ENTRANCE({entranceScenes[sceneIndex][len(enumPrfix):]}, {spawnIndex})' + +if __name__ == "__main__": + import sys + + if len(sys.argv) < 2: + print(f'{sys.argv[0]} nextEntrance', file=sys.stderr) + exit(1) + + nextEntrance = sys.argv[1] + nextEntrance = int(nextEntrance, 16 if nextEntrance.startswith("0x") else 10) + print(macro(nextEntrance)) diff --git a/tools/namefixer.py b/tools/namefixer.py index d9f2a318a..573c96056 100755 --- a/tools/namefixer.py +++ b/tools/namefixer.py @@ -145,7 +145,11 @@ wordReplace = { "ShrinkWindow_Fini": "ShrinkWindow_Destroy", "func_801A89A8": "Audio_QueueSeqCmd", "func_8019F1C0": "Audio_PlaySfxAtPos", - "func_801A72CC": "Audio_StopSfxByPos", + "func_801A5BD0": "AudioSfx_MuteBanks", + "func_801A72CC": "AudioSfx_StopByPos", + "Audio_StopSfxByPos": "AudioSfx_StopByPos", + "func_801A7328": "AudioSfx_StopByPosAndId", + "func_801A75E8": "AudioSfx_StopById", "SkelAnime_LodDrawLimb": "SkelAnime_DrawLimbLod", "SkelAnime_LodDraw": "SkelAnime_DrawLod", "SkelAnime_LodDrawLimbSV": "SkelAnime_DrawFlexLimbLod", @@ -256,7 +260,8 @@ wordReplace = { "func_800B8B84": "Actor_PickUpNearby", "func_800B8BB0": "Actor_LiftActor", "func_800B8BD0": "Actor_PickUpFar", - "func_801A5CFC": "Audio_PlaySfxGeneral", + "func_801A5CFC": "AudioSfx_PlaySfx", + "Audio_PlaySfxGeneral": "AudioSfx_PlaySfx", "func_800BBDAC": "Actor_SpawnFloorDustRing", "func_800B8708": "Player_GetExchangeItemId", "func_801233E4": "Player_InCsMode", @@ -607,6 +612,9 @@ wordReplace = { "ActorCutscene_GetCurrentCamera": "ActorCutscene_GetCurrentSubCamId", + "Entrance_CreateIndex": "Entrance_Create", + "Entrance_CreateIndexFromSpawn": "Entrance_CreateFromSpawn", + # Structs "ActorAnimationEntry": "AnimationInfo", "ActorAnimationEntryS": "AnimationInfoS", @@ -651,7 +659,7 @@ wordReplace = { "gSaveContext.playerName": "gSaveContext.save.playerData.playerName", "gSaveContext.inventory": "gSaveContext.save.inventory", "gSaveContext.equippedMask": "gSaveContext.save.equippedMask", - "gSaveContext.entranceIndex": "gSaveContext.save.entranceIndex", + "gSaveContext.entranceIndex": "gSaveContext.save.entrance", "gSaveContext.time": "gSaveContext.save.time", "gSaveContext.unk_14": "gSaveContext.save.daySpeed", "gSaveContext.unk_FE6": "gSaveContext.save.bombersCaughtNum", @@ -668,6 +676,7 @@ wordReplace = { "gSaveContext.unk_1016": "gSaveContext.jinxTimer", "gSaveContext.unk_3F58": "gSaveContext.sunsSongState", "gSaveContext.unk_48C8": "gSaveContext.dungeonIndex", + "gSaveContext.save.entranceIndex": "gSaveContext.save.entrance", "player->unk_A87": "player->exchangeItemId", "player->leftHandActor": "player->heldActor", @@ -700,6 +709,7 @@ wordReplace = { "play->msgCtx.unk12023": "play->msgCtx.stateTimer", "play->msgCtx.unk1202A": "play->msgCtx.ocarinaMode", "play->msgCtx.unk1202C": "play->msgCtx.ocarinaAction", + "play->nextEntranceIndex": "play->nextEntrance", "play->sceneLoadFlag": "play->transitionTrigger", "play->unk_18B4A": "play->transitionMode", @@ -723,6 +733,22 @@ wordReplace = { "ICHAIN_F32_DIV1000(minVelocityY,": "ICHAIN_F32_DIV1000(terminalVelocity,", "ICHAIN_F32(minVelocityY,": "ICHAIN_F32(terminalVelocity,", + "EXCH_ITEM_MINUS1": "PLAYER_AP_MINUS1", + "EXCH_ITEM_NONE": "PLAYER_AP_NONE", + "EXCH_ITEM_PICTO_BOX": "PLAYER_AP_PICTO_BOX", + "EXCH_ITEM_1E": "PLAYER_AP_BOTTLE_MUSHROOM", + "EXCH_ITEM_MOON_TEAR": "PLAYER_AP_MOON_TEAR", + "EXCH_ITEM_DEED_LAND": "PLAYER_AP_DEED_LAND", + "EXCH_ITEM_ROOM_KEY": "PLAYER_AP_ROOM_KEY", + "EXCH_ITEM_LETTER_TO_KAFEI": "PLAYER_AP_LETTER_TO_KAFEI", + "EXCH_ITEM_2E": "PLAYER_AP_MAGIC_BEANS", + "EXCH_ITEM_DEED_SWAMP": "PLAYER_AP_DEED_SWAMP", + "EXCH_ITEM_DEED_MOUNTAIN": "PLAYER_AP_DEED_MOUNTAIN", + "EXCH_ITEM_DEED_OCEAN": "PLAYER_AP_DEED_OCEAN", + "EXCH_ITEM_LETTER_MAMA": "PLAYER_AP_LETTER_MAMA", + "ITEM_FISHING_POLE": "ITEM_FISHING_ROD", + "PLAYER_AP_FISHING_POLE": "PLAYER_AP_FISHING_ROD", + # Example of custom behaviour: # "PLAYER": ("GET_PLAYER(play)", {"ignore": (-1, '"PLAYER"')}), # ignore "PLAYER" in sSoundBankNames } diff --git a/tools/sizes/code_functions.csv b/tools/sizes/code_functions.csv index 76ba70d03..d9be06fcf 100644 --- a/tools/sizes/code_functions.csv +++ b/tools/sizes/code_functions.csv @@ -627,37 +627,37 @@ asm/non_matchings/code/z_bg_item/DynaPoly_IsInSwitchPressedState.s,DynaPoly_IsIn asm/non_matchings/code/z_bg_item/DynaPoly_IsInHeavySwitchPressedState.s,DynaPoly_IsInHeavySwitchPressedState,0x800CAFDC,0x9 asm/non_matchings/code/z_bg_item/DynaPoly_ValidateMove.s,DynaPoly_ValidateMove,0x800CB000,0x84 asm/non_matchings/code/z_camera/Camera_fabsf.s,Camera_fabsf,0x800CB210,0xC -asm/non_matchings/code/z_camera/Camera_LengthVec3f.s,Camera_LengthVec3f,0x800CB240,0xC -asm/non_matchings/code/z_camera/func_800CB270.s,func_800CB270,0x800CB270,0x30 -asm/non_matchings/code/z_camera/Camera_Lerpf.s,Camera_Lerpf,0x800CB330,0x1A -asm/non_matchings/code/z_camera/Camera_Lerps.s,Camera_Lerps,0x800CB398,0x25 -asm/non_matchings/code/z_camera/func_800CB42C.s,func_800CB42C,0x800CB42C,0x25 -asm/non_matchings/code/z_camera/Camera_LerpVec3f.s,Camera_LerpVec3f,0x800CB4C0,0x21 -asm/non_matchings/code/z_camera/func_800CB544.s,func_800CB544,0x800CB544,0x10 -asm/non_matchings/code/z_camera/func_800CB584.s,func_800CB584,0x800CB584,0x16 -asm/non_matchings/code/z_camera/func_800CB5DC.s,func_800CB5DC,0x800CB5DC,0xC -asm/non_matchings/code/z_camera/func_800CB60C.s,func_800CB60C,0x800CB60C,0x1A -asm/non_matchings/code/z_camera/func_800CB674.s,func_800CB674,0x800CB674,0x15 -asm/non_matchings/code/z_camera/func_800CB6C8.s,func_800CB6C8,0x800CB6C8,0xE -asm/non_matchings/code/z_camera/func_800CB700.s,func_800CB700,0x800CB700,0x20 -asm/non_matchings/code/z_camera/func_800CB780.s,func_800CB780,0x800CB780,0x13 +asm/non_matchings/code/z_camera/Camera_Vec3fMagnitude.s,Camera_Vec3fMagnitude,0x800CB240,0xC +asm/non_matchings/code/z_camera/Camera_QuadraticAttenuation.s,Camera_QuadraticAttenuation,0x800CB270,0x30 +asm/non_matchings/code/z_camera/Camera_LerpCeilF.s,Camera_LerpCeilF,0x800CB330,0x1A +asm/non_matchings/code/z_camera/Camera_LerpCeilS.s,Camera_LerpCeilS,0x800CB398,0x25 +asm/non_matchings/code/z_camera/Camera_LerpFloorS.s,Camera_LerpFloorS,0x800CB42C,0x25 +asm/non_matchings/code/z_camera/Camera_LerpCeilVec3f.s,Camera_LerpCeilVec3f,0x800CB4C0,0x21 +asm/non_matchings/code/z_camera/Camera_SetUpdateRatesFastPitch.s,Camera_SetUpdateRatesFastPitch,0x800CB544,0x10 +asm/non_matchings/code/z_camera/Camera_SetUpdateRatesFastYaw.s,Camera_SetUpdateRatesFastYaw,0x800CB584,0x16 +asm/non_matchings/code/z_camera/Camera_SetUpdateRatesSlow.s,Camera_SetUpdateRatesSlow,0x800CB5DC,0xC +asm/non_matchings/code/z_camera/Camera_Vec3sToVec3f.s,Camera_Vec3sToVec3f,0x800CB60C,0x1A +asm/non_matchings/code/z_camera/Camera_AngleDiffAndScale.s,Camera_AngleDiffAndScale,0x800CB674,0x15 +asm/non_matchings/code/z_camera/Camera_UpdateAtActorOffset.s,Camera_UpdateAtActorOffset,0x800CB6C8,0xE +asm/non_matchings/code/z_camera/Camera_GetFocalActorHeight.s,Camera_GetFocalActorHeight,0x800CB700,0x20 +asm/non_matchings/code/z_camera/Camera_GetRunSpeedLimit.s,Camera_GetRunSpeedLimit,0x800CB780,0x13 asm/non_matchings/code/z_camera/func_800CB7CC.s,func_800CB7CC,0x800CB7CC,0xB -asm/non_matchings/code/z_camera/func_800CB7F8.s,func_800CB7F8,0x800CB7F8,0xC -asm/non_matchings/code/z_camera/func_800CB828.s,func_800CB828,0x800CB828,0xB +asm/non_matchings/code/z_camera/Camera_IsMountedOnHorse.s,Camera_IsMountedOnHorse,0x800CB7F8,0xC +asm/non_matchings/code/z_camera/Camera_IsDekuHovering.s,Camera_IsDekuHovering,0x800CB828,0xB asm/non_matchings/code/z_camera/func_800CB854.s,func_800CB854,0x800CB854,0xB asm/non_matchings/code/z_camera/Camera_IsSwimming.s,Camera_IsSwimming,0x800CB880,0x12 -asm/non_matchings/code/z_camera/func_800CB8C8.s,func_800CB8C8,0x800CB8C8,0xB -asm/non_matchings/code/z_camera/func_800CB8F4.s,func_800CB8F4,0x800CB8F4,0xC +asm/non_matchings/code/z_camera/Camera_IsDiving.s,Camera_IsDiving,0x800CB8C8,0xB +asm/non_matchings/code/z_camera/Camera_IsPlayerFormZora.s,Camera_IsPlayerFormZora,0x800CB8F4,0xC asm/non_matchings/code/z_camera/func_800CB924.s,func_800CB924,0x800CB924,0xB asm/non_matchings/code/z_camera/func_800CB950.s,func_800CB950,0x800CB950,0x2E -asm/non_matchings/code/z_camera/func_800CBA08.s,func_800CBA08,0x800CBA08,0xB -asm/non_matchings/code/z_camera/func_800CBA34.s,func_800CBA34,0x800CBA34,0x12 +asm/non_matchings/code/z_camera/Camera_IsClimbingLedge.s,Camera_IsClimbingLedge,0x800CBA08,0xB +asm/non_matchings/code/z_camera/Camera_IsChargingSwordOrDekuFlowerDive.s,Camera_IsChargingSwordOrDekuFlowerDive,0x800CBA34,0x12 asm/non_matchings/code/z_camera/func_800CBA7C.s,func_800CBA7C,0x800CBA7C,0xC asm/non_matchings/code/z_camera/func_800CBAAC.s,func_800CBAAC,0x800CBAAC,0xA -asm/non_matchings/code/z_camera/func_800CBAD4.s,func_800CBAD4,0x800CBAD4,0x21 -asm/non_matchings/code/z_camera/func_800CBB58.s,func_800CBB58,0x800CBB58,0xC +asm/non_matchings/code/z_camera/Camera_GetFocalActorPos.s,Camera_GetFocalActorPos,0x800CBAD4,0x21 +asm/non_matchings/code/z_camera/Camera_IsUnderwaterAsZora.s,Camera_IsUnderwaterAsZora,0x800CBB58,0xC asm/non_matchings/code/z_camera/func_800CBB88.s,func_800CBB88,0x800CBB88,0x1E -asm/non_matchings/code/z_camera/func_800CBC00.s,func_800CBC00,0x800CBC00,0xC +asm/non_matchings/code/z_camera/Camera_IsUsingZoraFins.s,Camera_IsUsingZoraFins,0x800CBC00,0xC asm/non_matchings/code/z_camera/func_800CBC30.s,func_800CBC30,0x800CBC30,0x15 asm/non_matchings/code/z_camera/func_800CBC84.s,func_800CBC84,0x800CBC84,0xC8 asm/non_matchings/code/z_camera/func_800CBFA4.s,func_800CBFA4,0x800CBFA4,0x17 @@ -1970,8 +1970,8 @@ asm/non_matchings/code/z_scene/Scene_HeaderCmdSetAreaVisitedFlag.s,Scene_HeaderC asm/non_matchings/code/z_scene/Scene_HeaderCmdAnimatedMaterials.s,Scene_HeaderCmdAnimatedMaterials,0x80130674,0xC asm/non_matchings/code/z_scene/Scene_SetExitFade.s,Scene_SetExitFade,0x801306A4,0x11 asm/non_matchings/code/z_scene/Scene_ProcessHeader.s,Scene_ProcessHeader,0x801306E8,0x20 -asm/non_matchings/code/z_scene/Entrance_CreateIndex.s,Entrance_CreateIndex,0x80130768,0x7 -asm/non_matchings/code/z_scene/Entrance_CreateIndexFromSpawn.s,Entrance_CreateIndexFromSpawn,0x80130784,0xF +asm/non_matchings/code/z_scene/Entrance_Create.s,Entrance_Create,0x80130768,0x7 +asm/non_matchings/code/z_scene/Entrance_CreateFromSpawn.s,Entrance_CreateFromSpawn,0x80130784,0xF asm/non_matchings/code/z_scene_proc/Scene_ExecuteDrawConfig.s,Scene_ExecuteDrawConfig,0x801307C0,0xD asm/non_matchings/code/z_scene_proc/Scene_DrawConfigDefault.s,Scene_DrawConfigDefault,0x801307F4,0x10 asm/non_matchings/code/z_scene_proc/AnimatedMat_TexScroll.s,AnimatedMat_TexScroll,0x80130834,0x1B @@ -3204,10 +3204,10 @@ asm/non_matchings/code/code_80192BE0/func_8019372C.s,func_8019372C,0x8019372C,0x asm/non_matchings/code/code_80192BE0/func_80193774.s,func_80193774,0x80193774,0x26 asm/non_matchings/code/code_80192BE0/func_8019380C.s,func_8019380C,0x8019380C,0x13 asm/non_matchings/code/code_80192BE0/func_80193858.s,func_80193858,0x80193858,0x9 -asm/non_matchings/code/code_80192BE0/func_8019387C.s,func_8019387C,0x8019387C,0x9 -asm/non_matchings/code/code_80192BE0/Audio_QueueCmdS8.s,Audio_QueueCmdS8,0x801938A0,0xC +asm/non_matchings/code/code_80192BE0/AudioThread_QueueCmdS32.s,AudioThread_QueueCmdS32,0x8019387C,0x9 +asm/non_matchings/code/code_80192BE0/AudioThread_QueueCmdS8.s,AudioThread_QueueCmdS8,0x801938A0,0xC asm/non_matchings/code/code_80192BE0/func_801938D0.s,func_801938D0,0x801938D0,0xC -asm/non_matchings/code/code_80192BE0/func_80193900.s,func_80193900,0x80193900,0x24 +asm/non_matchings/code/code_80192BE0/AudioThread_ScheduleProcessCmds.s,AudioThread_ScheduleProcessCmds,0x80193900,0x24 asm/non_matchings/code/code_80192BE0/func_80193990.s,func_80193990,0x80193990,0x6 asm/non_matchings/code/code_80192BE0/func_801939A8.s,func_801939A8,0x801939A8,0x51 asm/non_matchings/code/code_80192BE0/func_80193AEC.s,func_80193AEC,0x80193AEC,0x2D @@ -3234,8 +3234,8 @@ asm/non_matchings/code/code_80192BE0/func_8019440C.s,func_8019440C,0x8019440C,0x asm/non_matchings/code/code_80192BE0/func_80194528.s,func_80194528,0x80194528,0x8 asm/non_matchings/code/code_80192BE0/func_80194548.s,func_80194548,0x80194548,0x8 asm/non_matchings/code/code_80192BE0/func_80194568.s,func_80194568,0x80194568,0x40 -asm/non_matchings/code/code_80192BE0/Audio_NextRandom.s,Audio_NextRandom,0x80194668,0x1F -asm/non_matchings/code/code_80192BE0/Audio_InitMesgQueues.s,Audio_InitMesgQueues,0x801946E4,0xB +asm/non_matchings/code/code_80192BE0/AudioThread_NextRandom.s,AudioThread_NextRandom,0x80194668,0x1F +asm/non_matchings/code/code_80192BE0/AudioThread_InitMesgQueues.s,AudioThread_InitMesgQueues,0x801946E4,0xB asm/non_matchings/code/code_80194710/Audio_InvalDCache.s,Audio_InvalDCache,0x80194710,0x10 asm/non_matchings/code/code_80194710/Audio_WritebackDCache.s,Audio_WritebackDCache,0x80194750,0x10 asm/non_matchings/code/code_80194710/osAiSetNextBuffer.s,osAiSetNextBuffer,0x80194790,0x1D @@ -3374,27 +3374,27 @@ asm/non_matchings/code/code_8019AF00/func_8019E014.s,func_8019E014,0x8019E014,0x asm/non_matchings/code/code_8019AF00/func_8019E0FC.s,func_8019E0FC,0x8019E0FC,0x2 asm/non_matchings/code/code_8019AF00/func_8019E104.s,func_8019E104,0x8019E104,0x3 asm/non_matchings/code/code_8019AF00/func_8019E110.s,func_8019E110,0x8019E110,0xF -asm/non_matchings/code/code_8019AF00/func_8019E14C.s,func_8019E14C,0x8019E14C,0x76 -asm/non_matchings/code/code_8019AF00/func_8019E324.s,func_8019E324,0x8019E324,0x63 -asm/non_matchings/code/code_8019AF00/func_8019E4B0.s,func_8019E4B0,0x8019E4B0,0x61 -asm/non_matchings/code/code_8019AF00/func_8019E634.s,func_8019E634,0x8019E634,0x8C -asm/non_matchings/code/code_8019AF00/func_8019E864.s,func_8019E864,0x8019E864,0x77 -asm/non_matchings/code/code_8019AF00/func_8019EA40.s,func_8019EA40,0x8019EA40,0x3B -asm/non_matchings/code/code_8019AF00/func_8019EB2C.s,func_8019EB2C,0x8019EB2C,0x13E -asm/non_matchings/code/code_8019AF00/func_8019F024.s,func_8019F024,0x8019F024,0xE -asm/non_matchings/code/code_8019AF00/func_8019F05C.s,func_8019F05C,0x8019F05C,0x1B +asm/non_matchings/code/code_8019AF00/AudioSfx_ComputeVolume.s,AudioSfx_ComputeVolume,0x8019E14C,0x76 +asm/non_matchings/code/code_8019AF00/AudioSfx_ComputeReverb.s,AudioSfx_ComputeReverb,0x8019E324,0x63 +asm/non_matchings/code/code_8019AF00/AudioSfx_ComputePanSigned.s,AudioSfx_ComputePanSigned,0x8019E4B0,0x61 +asm/non_matchings/code/code_8019AF00/AudioSfx_ComputeFreqScale.s,AudioSfx_ComputeFreqScale,0x8019E634,0x8C +asm/non_matchings/code/code_8019AF00/AudioSfx_ComputeSurroundSoundFilter.s,AudioSfx_ComputeSurroundSoundFilter,0x8019E864,0x77 +asm/non_matchings/code/code_8019AF00/AudioSfx_ComputeCombFilter.s,AudioSfx_ComputeCombFilter,0x8019EA40,0x3B +asm/non_matchings/code/code_8019AF00/AudioSfx_SetProperties.s,AudioSfx_SetProperties,0x8019EB2C,0x13E +asm/non_matchings/code/code_8019AF00/AudioSfx_SetFreqAndStereoBits.s,AudioSfx_SetFreqAndStereoBits,0x8019F024,0xE +asm/non_matchings/code/code_8019AF00/AudioSfx_ResetSfxChannelState.s,AudioSfx_ResetSfxChannelState,0x8019F05C,0x1B asm/non_matchings/code/code_8019AF00/play_sound.s,play_sound,0x8019F0C8,0x18 asm/non_matchings/code/code_8019AF00/func_8019F128.s,func_8019F128,0x8019F128,0x12 asm/non_matchings/code/code_8019AF00/func_8019F170.s,func_8019F170,0x8019F170,0x14 asm/non_matchings/code/code_8019AF00/Audio_PlaySfxAtPos.s,Audio_PlaySfxAtPos,0x8019F1C0,0x12 asm/non_matchings/code/code_8019AF00/func_8019F208.s,func_8019F208,0x8019F208,0xA asm/non_matchings/code/code_8019AF00/func_8019F230.s,func_8019F230,0x8019F230,0xA -asm/non_matchings/code/code_8019AF00/func_8019F258.s,func_8019F258,0x8019F258,0x2A -asm/non_matchings/code/code_8019AF00/func_8019F300.s,func_8019F300,0x8019F300,0x48 +asm/non_matchings/code/code_8019AF00/AudioSfx_AddSfxSetting.s,AudioSfx_AddSfxSetting,0x8019F258,0x2A +asm/non_matchings/code/code_8019AF00/AudioSfx_ProcessSfxSettings.s,AudioSfx_ProcessSfxSettings,0x8019F300,0x48 asm/non_matchings/code/code_8019AF00/func_8019F420.s,func_8019F420,0x8019F420,0x23 asm/non_matchings/code/code_8019AF00/func_8019F4AC.s,func_8019F4AC,0x8019F4AC,0x25 asm/non_matchings/code/code_8019AF00/func_8019F540.s,func_8019F540,0x8019F540,0xC -asm/non_matchings/code/code_8019AF00/func_8019F570.s,func_8019F570,0x8019F570,0xF +asm/non_matchings/code/code_8019AF00/AudioSfx_LowerSfxSettingsReverb.s,AudioSfx_LowerSfxSettingsReverb,0x8019F570,0xF asm/non_matchings/code/code_8019AF00/func_8019F5AC.s,func_8019F5AC,0x8019F5AC,0x23 asm/non_matchings/code/code_8019AF00/func_8019F638.s,func_8019F638,0x8019F638,0x52 asm/non_matchings/code/code_8019AF00/func_8019F780.s,func_8019F780,0x8019F780,0x16 @@ -3428,7 +3428,7 @@ asm/non_matchings/code/code_8019AF00/Audio_UpdateRiverSoundVolumes.s,Audio_Updat asm/non_matchings/code/code_8019AF00/func_801A0554.s,func_801A0554,0x801A0554,0x24 asm/non_matchings/code/code_8019AF00/func_801A05E4.s,func_801A05E4,0x801A05E4,0x3 asm/non_matchings/code/code_8019AF00/func_801A05F0.s,func_801A05F0,0x801A05F0,0x19 -asm/non_matchings/code/code_8019AF00/func_801A0654.s,func_801A0654,0x801A0654,0x6F +asm/non_matchings/code/code_8019AF00/AudioSfx_SetChannelIO.s,AudioSfx_SetChannelIO,0x801A0654,0x6F asm/non_matchings/code/code_8019AF00/func_801A0810.s,func_801A0810,0x801A0810,0x16 asm/non_matchings/code/code_8019AF00/func_801A0868.s,func_801A0868,0x801A0868,0x5B asm/non_matchings/code/code_8019AF00/func_801A09D4.s,func_801A09D4,0x801A09D4,0xA7 @@ -3517,9 +3517,9 @@ asm/non_matchings/code/code_8019AF00/func_801A479C.s,func_801A479C,0x801A479C,0x asm/non_matchings/code/code_8019AF00/func_801A47DC.s,func_801A47DC,0x801A47DC,0x41 asm/non_matchings/code/code_8019AF00/func_801A48E0.s,func_801A48E0,0x801A48E0,0x52 asm/non_matchings/code/code_8019AF00/func_801A4A28.s,func_801A4A28,0x801A4A28,0x56 -asm/non_matchings/code/code_8019AF00/func_801A4B80.s,func_801A4B80,0x801A4B80,0x2C -asm/non_matchings/code/code_8019AF00/func_801A4C30.s,func_801A4C30,0x801A4C30,0x9 -asm/non_matchings/code/code_8019AF00/func_801A4C54.s,func_801A4C54,0x801A4C54,0x2B +asm/non_matchings/code/code_8019AF00/Audio_SetNatureAmbienceRandomBend.s,Audio_SetNatureAmbienceRandomBend,0x801A4B80,0x2C +asm/non_matchings/code/code_8019AF00/Audio_Init.s,Audio_Init,0x801A4C30,0x9 +asm/non_matchings/code/code_8019AF00/AudioSfx_Init.s,AudioSfx_Init,0x801A4C54,0x2B asm/non_matchings/code/code_8019AF00/func_801A4D00.s,func_801A4D00,0x801A4D00,0x14 asm/non_matchings/code/code_8019AF00/func_801A4D50.s,func_801A4D50,0x801A4D50,0x15 asm/non_matchings/code/code_8019AF00/func_801A4DA4.s,func_801A4DA4,0x801A4DA4,0x14 @@ -3546,29 +3546,29 @@ asm/non_matchings/code/code_801A51F0/func_801A5680.s,func_801A5680,0x801A5680,0x asm/non_matchings/code/code_801A51F0/func_801A5808.s,func_801A5808,0x801A5808,0x82 asm/non_matchings/code/code_801A51F0/func_801A5A10.s,func_801A5A10,0x801A5A10,0x3 asm/non_matchings/code/code_801A51F0/func_801A5A1C.s,func_801A5A1C,0x801A5A1C,0x69 -asm/non_matchings/code/code_801A5BD0/Audio_SetSfxBanksMute.s,Audio_SetSfxBanksMute,0x801A5BD0,0x16 -asm/non_matchings/code/code_801A5BD0/Audio_SetFlagForBgmVolumeLow.s,Audio_SetFlagForBgmVolumeLow,0x801A5C28,0x19 -asm/non_matchings/code/code_801A5BD0/Audio_ClearFlagForBgmVolumeLow.s,Audio_ClearFlagForBgmVolumeLow,0x801A5C8C,0x1C -asm/non_matchings/code/code_801A5BD0/Audio_PlaySfxGeneral.s,Audio_PlaySfxGeneral,0x801A5CFC,0x38 -asm/non_matchings/code/code_801A5BD0/func_801A5DDC.s,func_801A5DDC,0x801A5DDC,0x68 -asm/non_matchings/code/code_801A5BD0/func_801A5F7C.s,func_801A5F7C,0x801A5F7C,0x12D -asm/non_matchings/code/code_801A5BD0/func_801A6430.s,func_801A6430,0x801A6430,0x66 -asm/non_matchings/code/code_801A5BD0/func_801A65C8.s,func_801A65C8,0x801A65C8,0x1D1 -asm/non_matchings/code/code_801A5BD0/func_801A6D0C.s,func_801A6D0C,0x801A6D0C,0xDE -asm/non_matchings/code/code_801A5BD0/func_801A7084.s,func_801A7084,0x801A7084,0x39 -asm/non_matchings/code/code_801A5BD0/func_801A7168.s,func_801A7168,0x801A7168,0x47 -asm/non_matchings/code/code_801A5BD0/func_801A7284.s,func_801A7284,0x801A7284,0x12 -asm/non_matchings/code/code_801A5BD0/Audio_StopSfxByPos.s,Audio_StopSfxByPos,0x801A72CC,0x17 -asm/non_matchings/code/code_801A5BD0/func_801A7328.s,func_801A7328,0x801A7328,0x57 -asm/non_matchings/code/code_801A5BD0/func_801A7484.s,func_801A7484,0x801A7484,0x59 -asm/non_matchings/code/code_801A5BD0/Audio_StopSfxById.s,Audio_StopSfxById,0x801A75E8,0x4E -asm/non_matchings/code/code_801A5BD0/func_801A7720.s,func_801A7720,0x801A7720,0x1D -asm/non_matchings/code/code_801A5BD0/func_801A7794.s,func_801A7794,0x801A7794,0x25 -asm/non_matchings/code/code_801A5BD0/func_801A7828.s,func_801A7828,0x801A7828,0x15 -asm/non_matchings/code/code_801A5BD0/func_801A787C.s,func_801A787C,0x801A787C,0x1A -asm/non_matchings/code/code_801A5BD0/Audio_IsSfxPlaying.s,Audio_IsSfxPlaying,0x801A78E4,0x1A -asm/non_matchings/code/code_801A5BD0/func_801A794C.s,func_801A794C,0x801A794C,0x71 -asm/non_matchings/code/code_801A7B10/func_801A7B10.s,func_801A7B10,0x801A7B10,0x7D +asm/non_matchings/code/code_801A5BD0/AudioSfx_MuteBanks.s,AudioSfx_MuteBanks,0x801A5BD0,0x16 +asm/non_matchings/code/code_801A5BD0/AudioSfx_LowerBgmVolume.s,AudioSfx_LowerBgmVolume,0x801A5C28,0x19 +asm/non_matchings/code/code_801A5BD0/AudioSfx_RestoreBgmVolume.s,AudioSfx_RestoreBgmVolume,0x801A5C8C,0x1C +asm/non_matchings/code/code_801A5BD0/AudioSfx_PlaySfx.s,AudioSfx_PlaySfx,0x801A5CFC,0x38 +asm/non_matchings/code/code_801A5BD0/AudioSfx_RemoveMatchingRequests.s,AudioSfx_RemoveMatchingRequests,0x801A5DDC,0x68 +asm/non_matchings/code/code_801A5BD0/AudioSfx_ProcessRequest.s,AudioSfx_ProcessRequest,0x801A5F7C,0x12D +asm/non_matchings/code/code_801A5BD0/AudioSfx_RemoveBankEntry.s,AudioSfx_RemoveBankEntry,0x801A6430,0x66 +asm/non_matchings/code/code_801A5BD0/AudioSfx_ChooseActiveSfx.s,AudioSfx_ChooseActiveSfx,0x801A65C8,0x1D1 +asm/non_matchings/code/code_801A5BD0/AudioSfx_PlayActiveSfx.s,AudioSfx_PlayActiveSfx,0x801A6D0C,0xDE +asm/non_matchings/code/code_801A5BD0/AudioSfx_StopByBank.s,AudioSfx_StopByBank,0x801A7084,0x39 +asm/non_matchings/code/code_801A5BD0/AudioSfx_StopByPosAndBankImpl.s,AudioSfx_StopByPosAndBankImpl,0x801A7168,0x47 +asm/non_matchings/code/code_801A5BD0/AudioSfx_StopByPosAndBank.s,AudioSfx_StopByPosAndBank,0x801A7284,0x12 +asm/non_matchings/code/code_801A5BD0/AudioSfx_StopByPos.s,AudioSfx_StopByPos,0x801A72CC,0x17 +asm/non_matchings/code/code_801A5BD0/AudioSfx_StopByPosAndId.s,AudioSfx_StopByPosAndId,0x801A7328,0x57 +asm/non_matchings/code/code_801A5BD0/AudioSfx_StopByTokenAndId.s,AudioSfx_StopByTokenAndId,0x801A7484,0x59 +asm/non_matchings/code/code_801A5BD0/AudioSfx_StopById.s,AudioSfx_StopById,0x801A75E8,0x4E +asm/non_matchings/code/code_801A5BD0/AudioSfx_ProcessRequests.s,AudioSfx_ProcessRequests,0x801A7720,0x1D +asm/non_matchings/code/code_801A5BD0/AudioSfx_SetBankLerp.s,AudioSfx_SetBankLerp,0x801A7794,0x25 +asm/non_matchings/code/code_801A5BD0/AudioSfx_StepBankLerp.s,AudioSfx_StepBankLerp,0x801A7828,0x15 +asm/non_matchings/code/code_801A5BD0/AudioSfx_ProcessActiveSfx.s,AudioSfx_ProcessActiveSfx,0x801A787C,0x1A +asm/non_matchings/code/code_801A5BD0/AudioSfx_IsPlaying.s,AudioSfx_IsPlaying,0x801A78E4,0x1A +asm/non_matchings/code/code_801A5BD0/AudioSfx_Reset.s,AudioSfx_Reset,0x801A794C,0x71 +asm/non_matchings/code/code_801A7B10/Audio_StartSequence.s,Audio_StartSequence,0x801A7B10,0x7D asm/non_matchings/code/code_801A7B10/func_801A7D04.s,func_801A7D04,0x801A7D04,0x20 asm/non_matchings/code/code_801A7B10/func_801A7D84.s,func_801A7D84,0x801A7D84,0x309 asm/non_matchings/code/code_801A7B10/Audio_QueueSeqCmd.s,Audio_QueueSeqCmd,0x801A89A8,0xA diff --git a/undefined_syms.txt b/undefined_syms.txt index b2410d3ce..faf0aba38 100644 --- a/undefined_syms.txt +++ b/undefined_syms.txt @@ -1290,12 +1290,6 @@ D_06004340 = 0x06004340; D_06001A80 = 0x06001A80; -// ovl_En_Rat - -D_06000174 = 0x06000174; -D_0600026C = 0x0600026C; -D_06001858 = 0x06001858; - // ovl_En_Ru D_0600C700 = 0x0600C700;