mirror of
https://github.com/zeldaret/ss
synced 2026-05-31 09:21:42 -04:00
dSndSourceEnemyAnim_c::overrideStartSoundId, overrideHoldSoundId OK
This commit is contained in:
@@ -30,13 +30,15 @@ public:
|
||||
return specializeBgHitSoundId(soundId, mPolyAttr0, mPolyAttr1);
|
||||
}
|
||||
|
||||
protected:
|
||||
void unregisterEnemySource();
|
||||
|
||||
private:
|
||||
// Probably not a problem for weak function order since getName is emitted
|
||||
// earlier through an explicit call
|
||||
bool isName(const char *name) const {
|
||||
return streq(name, getName());
|
||||
}
|
||||
void unregisterEnemySource();
|
||||
|
||||
/* 0x15C */ nw4r::ut::Node mMgrEnemyLink;
|
||||
/* 0x164 */ UNKWORD field_0x164;
|
||||
|
||||
@@ -123,12 +123,39 @@ u32 dSndSourceEnemy_c::overrideHoldSoundId(u32 soundId, bool initial) {
|
||||
}
|
||||
|
||||
u32 dSndSourceEnemyAnim_c::overrideStartSoundId(u32 soundId) {
|
||||
// TODO
|
||||
switch (mSourceType) {
|
||||
case SND_SOURCE_MAGUPPO:
|
||||
if (mSubtype == 1) {
|
||||
switch (soundId) {
|
||||
case SE_EMagupp_APPEAR: soundId = SE_EMagupp_APPEAR_SAND; break;
|
||||
case SE_EMagupp_DISAPPEAR: soundId = SE_EMagupp_DISAPPEAR_SAND; break;
|
||||
case SE_EMagupp_WATER0: soundId = SE_EMagupp_WATER0_SAND; break;
|
||||
case SE_EMagupp_SWIM: soundId = SE_EMagupp_SWIM_SAND; break;
|
||||
case SE_EMagupp_BLOWNUP_LV: soundId = SE_EMagupp_BLOWNUP_LV_SAND; break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case SND_SOURCE_LIZARUFOS:
|
||||
if (mSubtype == 0 && soundId == SE_ELizaru_FIRE_LV) {
|
||||
soundId = SE_ELizaru_FIRE_LV_MA;
|
||||
}
|
||||
if (soundId == SE_E_DISAPPEAR) {
|
||||
unregisterEnemySource();
|
||||
}
|
||||
break;
|
||||
case SND_SOURCE_BC_Z:
|
||||
if (soundId == SE_E_DISAPPEAR) {
|
||||
unregisterEnemySource();
|
||||
}
|
||||
break;
|
||||
}
|
||||
return soundId;
|
||||
}
|
||||
|
||||
u32 dSndSourceEnemyAnim_c::overrideHoldSoundId(u32 soundId, bool initial) {
|
||||
// TODO
|
||||
if (mSourceType == SND_SOURCE_MAGUPPO && mSubtype == 1 && soundId == SE_EMagupp_BLOWNUP_LV) {
|
||||
soundId = SE_EMagupp_BLOWNUP_LV_SAND;
|
||||
}
|
||||
return soundId;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user