mirror of
https://github.com/zeldaret/ss
synced 2026-07-09 14:15:23 -04:00
Refactoring
This commit is contained in:
@@ -5,9 +5,9 @@
|
||||
#include "d/col/bg/d_bg_s.h"
|
||||
#include "d/col/bg/d_bg_s_lin_chk.h"
|
||||
#include "d/flag/sceneflag_manager.h"
|
||||
#include "d/snd/d_snd_wzsound.h"
|
||||
#include "m/m_mtx.h"
|
||||
#include "m/m_vec.h"
|
||||
#include "toBeSorted/small_sound_mgr.h"
|
||||
#include "toBeSorted/time_area_mgr.h"
|
||||
|
||||
SPECIAL_ACTOR_PROFILE(BOMBF, dAcBombf_c, fProfile::BOMBF, 0x129, 0, 4099);
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
#include "d/d_sc_game.h"
|
||||
#include "d/flag/sceneflag_manager.h"
|
||||
#include "d/flag/storyflag_manager.h"
|
||||
#include "d/snd/d_snd_wzsound.h"
|
||||
#include "f/f_base.h"
|
||||
#include "f/f_profile_name.h"
|
||||
#include "m/m3d/m_fanm.h"
|
||||
@@ -38,7 +39,6 @@
|
||||
#include "s/s_Math.h"
|
||||
#include "toBeSorted/blur_and_palette_manager.h"
|
||||
#include "toBeSorted/d_emitter.h"
|
||||
#include "toBeSorted/small_sound_mgr.h"
|
||||
#include "toBeSorted/time_area_mgr.h"
|
||||
|
||||
#include <cmath.h>
|
||||
|
||||
@@ -5,12 +5,12 @@
|
||||
#include "d/a/obj/d_a_obj_tower_D101.h"
|
||||
#include "d/col/bg/d_bg_s_wtr_chk.h"
|
||||
#include "d/d_stage.h"
|
||||
#include "d/snd/d_snd_wzsound.h"
|
||||
#include "f/f_base.h"
|
||||
#include "f/f_manager.h"
|
||||
#include "f/f_profile_name.h"
|
||||
#include "m/m_vec.h"
|
||||
#include "nw4r/g3d/res/g3d_resmdl.h"
|
||||
#include "toBeSorted/small_sound_mgr.h"
|
||||
|
||||
SPECIAL_ACTOR_PROFILE(OBJ_TOWER_GEAR_D101, dAcOTowerGearD101_c, fProfile::OBJ_TOWER_GEAR_D101, 0x17E, 0, 7);
|
||||
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
#include "d/d_linkage.h"
|
||||
#include "d/flag/dungeonflag_manager.h"
|
||||
#include "d/flag/sceneflag_manager.h"
|
||||
#include "d/snd/d_snd_wzsound.h"
|
||||
#include "egg/math/eggMath.h"
|
||||
#include "f/f_manager.h"
|
||||
#include "f/f_profile_name.h"
|
||||
@@ -34,7 +35,6 @@
|
||||
#include "toBeSorted/blur_and_palette_manager.h"
|
||||
#include "toBeSorted/d_emitter.h"
|
||||
#include "toBeSorted/event_manager.h"
|
||||
#include "toBeSorted/small_sound_mgr.h"
|
||||
#include "toBeSorted/special_item_drop_mgr.h"
|
||||
|
||||
void float_ordering() {
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
#include "d/col/c/c_m3d_g_pla.h"
|
||||
#include "d/col/cc/d_cc_d.h"
|
||||
#include "d/col/cc/d_cc_s.h"
|
||||
#include "d/snd/d_snd_wzsound.h"
|
||||
#include "egg/math/eggMath.h"
|
||||
#include "egg/math/eggQuat.h"
|
||||
#include "m/m_angle.h"
|
||||
@@ -20,8 +21,6 @@
|
||||
#include "toBeSorted/blur_and_palette_manager.h"
|
||||
#include "toBeSorted/d_emitter.h"
|
||||
#include "toBeSorted/dowsing_target.h"
|
||||
#include "toBeSorted/small_sound_mgr.h"
|
||||
|
||||
|
||||
void float_ordering() {
|
||||
const f32 arr[] = {5.f, 15.f, 7.f, 0.5f, 0.1f};
|
||||
|
||||
@@ -9,8 +9,8 @@
|
||||
#include "d/d_pouch.h"
|
||||
#include "d/d_sc_game.h"
|
||||
#include "d/flag/sceneflag_manager.h"
|
||||
#include "d/snd/d_snd_small_effect_mgr.h"
|
||||
#include "m/m_angle.h"
|
||||
#include "toBeSorted/small_sound_mgr.h"
|
||||
|
||||
SPECIAL_ACTOR_PROFILE(TAG_REACTION, dTgReaction_c, fProfile::TAG_REACTION, 0x0151, 0, 0);
|
||||
|
||||
@@ -172,7 +172,7 @@ void dTgReaction_c::checkForBonkItem() {
|
||||
if (dAcObjBase_c::create(fProfile::ITEM, roomid, newItemParms, &c2, nullptr, nullptr, 0xFFFFFFFF)) {
|
||||
field_0x4DD = 1;
|
||||
onDelete();
|
||||
SmallSoundManager::GetInstance()->playSound(SE_S_READ_RIDDLE_A);
|
||||
dSndSmallEffectMgr_c::GetInstance()->playSound(SE_S_READ_RIDDLE_A);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
@@ -194,7 +194,7 @@ void dTgReaction_c::checkForBonkItem() {
|
||||
|
||||
pos.y += field_0x4E4;
|
||||
if (fn_578_DB0(pos, uVar3)) {
|
||||
SmallSoundManager::GetInstance()->playSound(SE_S_READ_RIDDLE_B);
|
||||
dSndSmallEffectMgr_c::GetInstance()->playSound(SE_S_READ_RIDDLE_B);
|
||||
}
|
||||
SceneflagManager::sInstance->setFlag(roomid, getSceneFlag());
|
||||
onDelete();
|
||||
@@ -228,7 +228,7 @@ void dTgReaction_c::checkForSlingBellowsItem() {
|
||||
mVec3_c spawnPos = position;
|
||||
spawnPos.y += field_0x4E4;
|
||||
if (fn_578_DB0(spawnPos, uVar3)) {
|
||||
SmallSoundManager::GetInstance()->playSound(SE_S_READ_RIDDLE_B);
|
||||
dSndSmallEffectMgr_c::GetInstance()->playSound(SE_S_READ_RIDDLE_B);
|
||||
}
|
||||
SceneflagManager::sInstance->setFlag(roomid, getSceneFlag());
|
||||
onDelete();
|
||||
|
||||
@@ -10,12 +10,12 @@
|
||||
#include "d/col/bg/d_bg_w_base.h"
|
||||
#include "d/col/c/c_cc_d.h"
|
||||
#include "d/col/c/c_m3d_g_pla.h"
|
||||
#include "d/snd/d_snd_wzsound.h"
|
||||
#include "m/m_angle.h"
|
||||
#include "m/m_mtx.h"
|
||||
#include "m/m_vec.h"
|
||||
#include "toBeSorted/attention.h"
|
||||
#include "toBeSorted/d_emitter.h"
|
||||
#include "toBeSorted/small_sound_mgr.h"
|
||||
|
||||
void dAcOInsect_c::kill() {
|
||||
dJEffManager_c::spawnEffect(PARTICLE_RESOURCE_ID_MAPPING_394_, position, nullptr, nullptr, nullptr, nullptr, 0, 0);
|
||||
|
||||
@@ -6,10 +6,10 @@
|
||||
#include "d/d_linkage.h"
|
||||
#include "d/d_rumble.h"
|
||||
#include "d/flag/sceneflag_manager.h"
|
||||
#include "d/snd/d_snd_wzsound.h"
|
||||
#include "nw4r/g3d/res/g3d_resfile.h"
|
||||
#include "s/s_Math.h"
|
||||
#include "toBeSorted/d_emitter.h"
|
||||
#include "toBeSorted/small_sound_mgr.h"
|
||||
|
||||
SPECIAL_ACTOR_PROFILE(OBJ_SW, dAcOsw_c, fProfile::OBJ_SW, 0x12B, 0, 0x1002);
|
||||
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
#include "d/flag/sceneflag_manager.h"
|
||||
#include "d/flag/storyflag_manager.h"
|
||||
#include "d/flag/tboxflag_manager.h"
|
||||
#include "d/snd/d_snd_small_effect_mgr.h"
|
||||
#include "d/t/d_t_siren.h"
|
||||
#include "m/m3d/m_fanm.h"
|
||||
#include "m/m3d/m_scnleaf.h"
|
||||
@@ -35,7 +36,6 @@
|
||||
#include "toBeSorted/counters/goddess_chest_counter.h"
|
||||
#include "toBeSorted/dowsing_target.h"
|
||||
#include "toBeSorted/event_manager.h"
|
||||
#include "toBeSorted/small_sound_mgr.h"
|
||||
|
||||
SPECIAL_ACTOR_PROFILE(TBOX, dAcTbox_c, fProfile::TBOX, 0x018D, 0, 6);
|
||||
|
||||
@@ -1781,7 +1781,7 @@ void dAcTbox_c::executeState_DemoAppear() {
|
||||
if (isStop && mAnmMatClr1.isStop(0) && field_0x11F8 > 0x5A) {
|
||||
mEvent.advanceNext();
|
||||
mStateMgr.changeState(StateID_WaitOpen);
|
||||
SmallSoundManager::GetInstance()->playSound(SE_S_READ_RIDDLE_A);
|
||||
dSndSmallEffectMgr_c::GetInstance()->playSound(SE_S_READ_RIDDLE_A);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+2
-2
@@ -3,9 +3,9 @@
|
||||
#include "d/d_cs_base.h"
|
||||
#include "d/d_cursor_hit_check.h"
|
||||
#include "d/lyt/d2d.h"
|
||||
#include "d/snd/d_snd_small_effect_mgr.h"
|
||||
#include "f/f_base.h"
|
||||
#include "toBeSorted/arc_managers/layout_arc_manager.h"
|
||||
#include "toBeSorted/small_sound_mgr.h"
|
||||
|
||||
SPECIAL_BASE_PROFILE(C_GAME, dCsGame_c, fProfile::C_GAME, 0x2BF, 0x06F9);
|
||||
|
||||
@@ -407,7 +407,7 @@ void dCsGame_c::lytItemCursor_c::lytBowCsr_c::executeState_Charge() {
|
||||
if (!mAnm[MAIN_ANIM_ARROW_PEAK].isEnabled()) {
|
||||
mAnm[MAIN_ANIM_ARROW_PEAK].setAnimEnable(true);
|
||||
mAnm[MAIN_ANIM_ARROW_PEAK].setFrame(0.0f);
|
||||
SmallSoundManager::GetInstance()->playSound(SE_S_BW_ALIGN_SIGHT);
|
||||
dSndSmallEffectMgr_c::GetInstance()->playSound(SE_S_BW_ALIGN_SIGHT);
|
||||
}
|
||||
mAnm[MAIN_ANIM_ARROW_KEEP].setAnimEnable(false);
|
||||
} else {
|
||||
|
||||
+2
-2
@@ -22,6 +22,7 @@
|
||||
#include "d/lyt/d_lyt_mini_game.h"
|
||||
#include "d/lyt/meter/d_lyt_meter.h"
|
||||
#include "d/lyt/msg_window/d_lyt_msg_window.h"
|
||||
#include "d/snd/d_snd_small_effect_mgr.h"
|
||||
#include "egg/core/eggHeap.h"
|
||||
#include "f/f_base.h"
|
||||
#include "f/f_profile.h"
|
||||
@@ -38,7 +39,6 @@
|
||||
#include "toBeSorted/file_manager.h"
|
||||
#include "toBeSorted/minigame_mgr.h"
|
||||
#include "toBeSorted/music_mgrs.h"
|
||||
#include "toBeSorted/small_sound_mgr.h"
|
||||
#include "toBeSorted/unk_save_time.h"
|
||||
|
||||
#include "rvl/OS.h"
|
||||
@@ -216,7 +216,7 @@ void dFlow_c::playSound(u32 params) {
|
||||
|
||||
switch (sSoundDefs[idx].mSoundMgr) {
|
||||
case 0: AnotherSoundMgr__playSound(FANFARE_SOUND_MGR, sSoundDefs[idx].mSoundId); break;
|
||||
case 1: SmallSoundManager::GetInstance()->playSound(sSoundDefs[idx].mSoundId); break;
|
||||
case 1: dSndSmallEffectMgr_c::GetInstance()->playSound(sSoundDefs[idx].mSoundId); break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#include "d/lyt/d_lyt_bird_gauge.h"
|
||||
|
||||
#include "common.h"
|
||||
#include "toBeSorted/small_sound_mgr.h"
|
||||
#include "d/snd/d_snd_small_effect_mgr.h"
|
||||
|
||||
STATE_DEFINE(dLytBirdGaugeMain_c, ModeNone);
|
||||
STATE_DEFINE(dLytBirdGaugeMain_c, ModeIn);
|
||||
@@ -181,7 +181,7 @@ void dLytBirdGaugeMain_c::changeToRecovery() {
|
||||
mAnmGroups[LYT_SKY_GAUGE_MAIN_ANIM_RECOVERY + mNumDisplayedDashes].setAnimEnable(true);
|
||||
mAnmGroups[LYT_SKY_GAUGE_MAIN_ANIM_RECOVERY + mNumDisplayedDashes].setFrame(0.0f);
|
||||
mLyt.calc();
|
||||
SmallSoundManager::GetInstance()->playSound(SE_S_BIRD_RECOVER);
|
||||
dSndSmallEffectMgr_c::GetInstance()->playSound(SE_S_BIRD_RECOVER);
|
||||
mStateMgr.changeState(StateID_ModeRecovery);
|
||||
mIsAnimating = false;
|
||||
mNumDisplayedDashes++;
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
#include "common.h"
|
||||
#include "d/d_sys.h"
|
||||
#include "d/lyt/d2d.h"
|
||||
#include "toBeSorted/small_sound_mgr.h"
|
||||
#include "d/snd/d_snd_small_effect_mgr.h"
|
||||
|
||||
static const d2d::LytBrlanMapping brlanMap[] = {
|
||||
{ "aBtn_00_in.brlan", "G_inOut_00"},
|
||||
@@ -186,9 +186,9 @@ void dLytCommonABtn_c::goToStateDecideOut() {
|
||||
anm.setRate(1.0f);
|
||||
}
|
||||
if (mSoundVariant == VARIANT_NORMAL) {
|
||||
SmallSoundManager::GetInstance()->playSound(SE_S_WINDOW_PRESS_A);
|
||||
dSndSmallEffectMgr_c::GetInstance()->playSound(SE_S_WINDOW_PRESS_A);
|
||||
} else {
|
||||
SmallSoundManager::GetInstance()->playSound(SE_S_TITLE_PRESS_START);
|
||||
dSndSmallEffectMgr_c::GetInstance()->playSound(SE_S_TITLE_PRESS_START);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
|
||||
#include "d/d_cs_base.h"
|
||||
#include "d/d_cursor_hit_check.h"
|
||||
#include "d/snd/d_snd_small_effect_mgr.h"
|
||||
#include "rvl/MTX/mtx.h"
|
||||
#include "toBeSorted/arc_managers/layout_arc_manager.h"
|
||||
#include "toBeSorted/small_sound_mgr.h"
|
||||
|
||||
STATE_DEFINE(dLytCommonArrow_c, None);
|
||||
STATE_DEFINE(dLytCommonArrow_c, In);
|
||||
@@ -262,9 +262,9 @@ void dLytCommonArrow_c::executeState_Wait() {
|
||||
if (field_0x6C0 != 2) {
|
||||
displayElement(field_0x6C0 + ANIM_DECIDE_OFFSET, 0.0f);
|
||||
if (field_0x6C0 == 0) {
|
||||
SmallSoundManager::GetInstance()->playSound(SE_S_MENU_SELECT_TURN_PAGE_LEFT);
|
||||
dSndSmallEffectMgr_c::GetInstance()->playSound(SE_S_MENU_SELECT_TURN_PAGE_LEFT);
|
||||
} else {
|
||||
SmallSoundManager::GetInstance()->playSound(SE_S_MENU_SELECT_TURN_PAGE_RIGHT);
|
||||
dSndSmallEffectMgr_c::GetInstance()->playSound(SE_S_MENU_SELECT_TURN_PAGE_RIGHT);
|
||||
}
|
||||
mTimer++;
|
||||
}
|
||||
@@ -287,9 +287,9 @@ void dLytCommonArrow_c::executeState_Wait() {
|
||||
|
||||
if (field_0x6BC != field_0x6B8 && field_0x6B8 != 2) {
|
||||
if (field_0x6B8 == 0) {
|
||||
SmallSoundManager::GetInstance()->playSound(SE_S_MENU_POINT_TURN_PAGE_LEFT);
|
||||
dSndSmallEffectMgr_c::GetInstance()->playSound(SE_S_MENU_POINT_TURN_PAGE_LEFT);
|
||||
} else {
|
||||
SmallSoundManager::GetInstance()->playSound(SE_S_MENU_POINT_TURN_PAGE_RIGHT);
|
||||
dSndSmallEffectMgr_c::GetInstance()->playSound(SE_S_MENU_POINT_TURN_PAGE_RIGHT);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,12 +3,12 @@
|
||||
#include "common.h"
|
||||
#include "d/a/d_a_player.h"
|
||||
#include "d/lyt/meter/d_lyt_meter.h"
|
||||
#include "d/snd/d_snd_small_effect_mgr.h"
|
||||
#include "nw4r/lyt/lyt_pane.h"
|
||||
#include "nw4r/lyt/lyt_types.h"
|
||||
#include "nw4r/math/math_types.h"
|
||||
#include "sized_string.h"
|
||||
#include "toBeSorted/event_manager.h"
|
||||
#include "toBeSorted/small_sound_mgr.h"
|
||||
|
||||
struct DoButtonClass {
|
||||
DoButtonClass();
|
||||
@@ -639,7 +639,7 @@ void dLytDobutton_c::realize() {
|
||||
}
|
||||
|
||||
if (mDoActionToShow == ACT_DO_CATCH) {
|
||||
SmallSoundManager::GetInstance()->playSound(SE_S_CALL_BIRD_CATCH);
|
||||
dSndSmallEffectMgr_c::GetInstance()->playSound(SE_S_CALL_BIRD_CATCH);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -31,6 +31,7 @@
|
||||
#include "d/lyt/d_lyt_sky_gauge.h"
|
||||
#include "d/lyt/msg_window/d_lyt_msg_window.h"
|
||||
#include "d/lyt/msg_window/d_lyt_simple_window.h"
|
||||
#include "d/snd/d_snd_small_effect_mgr.h"
|
||||
#include "f/f_manager.h"
|
||||
#include "f/f_profile_name.h"
|
||||
#include "m/m_vec.h"
|
||||
@@ -40,7 +41,6 @@
|
||||
#include "toBeSorted/event_manager.h"
|
||||
#include "toBeSorted/minigame_mgr.h"
|
||||
#include "toBeSorted/misc_actor.h"
|
||||
#include "toBeSorted/small_sound_mgr.h"
|
||||
// clang-format on
|
||||
|
||||
static dLytMeterConfiguration_c sConf;
|
||||
@@ -207,7 +207,7 @@ bool dLytMeter1Button_c::execute() {
|
||||
if (mAnm[BUTTON_1_ANIM_CALL].isEnabled()) {
|
||||
mAnm[BUTTON_1_ANIM_CALL].play();
|
||||
if (meter->checkAllFlags(METER_BTN_1) && mCallCount < 3 && mAnm[BUTTON_1_ANIM_CALL].getFrame() == 1.0f) {
|
||||
SmallSoundManager::GetInstance()->playSound(SE_S_1_BUTTON_BLINK);
|
||||
dSndSmallEffectMgr_c::GetInstance()->playSound(SE_S_1_BUTTON_BLINK);
|
||||
mCallCount++;
|
||||
}
|
||||
}
|
||||
@@ -384,7 +384,7 @@ bool dLytMeter2Button_c::execute() {
|
||||
if (mAnm[BUTTON_1_ANIM_CALL].isEnabled()) {
|
||||
mAnm[BUTTON_1_ANIM_CALL].play();
|
||||
if (meter->checkAllFlags(METER_BTN_2) && mCallCount < 3 && mAnm[BUTTON_1_ANIM_CALL].getFrame() == 1.0f) {
|
||||
SmallSoundManager::GetInstance()->playSound(SE_S_2_BUTTON_BLINK);
|
||||
dSndSmallEffectMgr_c::GetInstance()->playSound(SE_S_2_BUTTON_BLINK);
|
||||
mCallCount++;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,10 +7,10 @@
|
||||
#include "d/lyt/d2d.h"
|
||||
#include "d/lyt/d_lyt_unknowns.h"
|
||||
#include "d/lyt/meter/d_lyt_meter.h"
|
||||
#include "d/snd/d_snd_small_effect_mgr.h"
|
||||
#include "toBeSorted/event_manager.h"
|
||||
#include "toBeSorted/fi_context.h"
|
||||
#include "toBeSorted/misc_actor.h"
|
||||
#include "toBeSorted/small_sound_mgr.h"
|
||||
|
||||
STATE_DEFINE(dLytMeterCrossBtnParts_c, Wait);
|
||||
STATE_DEFINE(dLytMeterCrossBtnParts_c, On);
|
||||
@@ -504,7 +504,7 @@ bool dLytMeterCrossBtn_c::execute() {
|
||||
mAnm[CROSS_BTN_ANIM_CALL_0].play();
|
||||
if (mParts[CROSS_BTN_PART_DOWN].isActive() && mCallCount0 < 3 &&
|
||||
mAnm[CROSS_BTN_ANIM_CALL_0].getFrame() == 1.0f) {
|
||||
SmallSoundManager::GetInstance()->playSound(SE_S_SG_CALL);
|
||||
dSndSmallEffectMgr_c::GetInstance()->playSound(SE_S_SG_CALL);
|
||||
mCallCount0++;
|
||||
}
|
||||
}
|
||||
@@ -525,7 +525,7 @@ bool dLytMeterCrossBtn_c::execute() {
|
||||
mAnm[CROSS_BTN_ANIM_CALL_1].play();
|
||||
if (mParts[CROSS_BTN_PART_TOP].isActive() && mCallCount1 < 3 &&
|
||||
mAnm[CROSS_BTN_ANIM_CALL_1].getFrame() == 1.0f) {
|
||||
SmallSoundManager::GetInstance()->playSound(SE_S_CATAPULT_READY);
|
||||
dSndSmallEffectMgr_c::GetInstance()->playSound(SE_S_CATAPULT_READY);
|
||||
mCallCount1++;
|
||||
}
|
||||
}
|
||||
@@ -546,7 +546,7 @@ bool dLytMeterCrossBtn_c::execute() {
|
||||
if (mAnm[CROSS_BTN_ANIM_CALL_2].isEnabled()) {
|
||||
mAnm[CROSS_BTN_ANIM_CALL_2].play();
|
||||
if (mParts[CROSS_BTN_PART_DOWN].isActive() && mAnm[CROSS_BTN_ANIM_CALL_2].getFrame() == 1.0f) {
|
||||
SmallSoundManager::GetInstance()->playSound(SE_S_BIRD_CALL);
|
||||
dSndSmallEffectMgr_c::GetInstance()->playSound(SE_S_BIRD_CALL);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
#include "d/lyt/d_lyt_util_items.h"
|
||||
#include "d/lyt/d_window.h"
|
||||
#include "d/lyt/meter/d_lyt_meter.h"
|
||||
#include "d/snd/d_snd_small_effect_mgr.h"
|
||||
#include "m/m_vec.h"
|
||||
#include "nw4r/lyt/lyt_group.h"
|
||||
#include "nw4r/math/math_types.h"
|
||||
@@ -17,7 +18,6 @@
|
||||
#include "toBeSorted/d_emitter.h"
|
||||
#include "toBeSorted/dowsing_target.h"
|
||||
#include "toBeSorted/file_manager.h"
|
||||
#include "toBeSorted/small_sound_mgr.h"
|
||||
|
||||
STATE_DEFINE(dLytMeterDowsingMenuIcon_c, Wait);
|
||||
STATE_DEFINE(dLytMeterDowsingMenuIcon_c, On);
|
||||
@@ -717,7 +717,7 @@ void dLytMeterDowsing_c::executeState_DemoMove() {
|
||||
nw4r::math::MTX34 mtx = mpPanes[idx]->GetGlobalMtx();
|
||||
mVec3_c pos(mtx._03, mtx._13, 0.0f);
|
||||
dJEffManager_c::spawnUIEffect(PARTICLE_RESOURCE_ID_MAPPING_970_, pos, nullptr, nullptr, nullptr, nullptr);
|
||||
SmallSoundManager::GetInstance()->playSound(SE_S_DOWSING_ADD);
|
||||
dSndSmallEffectMgr_c::GetInstance()->playSound(SE_S_DOWSING_ADD);
|
||||
}
|
||||
} else if (mDemoFrame == 16) {
|
||||
for (int i = 0; i < DOWSING_NUM_ITEMS; i++) {
|
||||
@@ -1010,7 +1010,7 @@ bool dLytMeterDowsing_c::execute() {
|
||||
if (mAnm[DOWSING_ANIM_CALL].isEnabled()) {
|
||||
mAnm[DOWSING_ANIM_CALL].play();
|
||||
if (dLytMeter_c::GetInstance()->checkAllFlags(METER_BTN_C) && mAnm[DOWSING_ANIM_CALL].getFrame() == 1.0f) {
|
||||
SmallSoundManager::GetInstance()->playSound(SE_S_C_BUTTON_BLINK);
|
||||
dSndSmallEffectMgr_c::GetInstance()->playSound(SE_S_C_BUTTON_BLINK);
|
||||
}
|
||||
}
|
||||
} else if (field_0x5509 == 1) {
|
||||
|
||||
@@ -5,11 +5,11 @@
|
||||
#include "d/d_sc_game.h"
|
||||
#include "d/lyt/d2d.h"
|
||||
#include "d/lyt/d_lyt_game_over.h"
|
||||
#include "d/snd/d_snd_small_effect_mgr.h"
|
||||
#include "nw4r/math/math_types.h"
|
||||
#include "toBeSorted/d_emitter.h"
|
||||
#include "toBeSorted/event_manager.h"
|
||||
#include "toBeSorted/file_manager.h"
|
||||
#include "toBeSorted/small_sound_mgr.h"
|
||||
|
||||
static const d2d::LytBrlanMapping brlanMap[] = {
|
||||
{ "heartAll_00_heat.brlan", "G_heart_00"},
|
||||
@@ -288,7 +288,7 @@ void dLytMeterHeart_c::executeInternal() {
|
||||
nw4r::math::MTX34 mtx = mpHeartPanes[mEffectHeartIdx]->GetGlobalMtx();
|
||||
mVec3_c pos(mtx._03, mtx._13, 0.0f);
|
||||
dJEffManager_c::spawnUIEffect(PARTICLE_RESOURCE_ID_MAPPING_972_, pos, nullptr, nullptr, nullptr, nullptr);
|
||||
SmallSoundManager::GetInstance()->playSound(SE_S_HEART_ADD);
|
||||
dSndSmallEffectMgr_c::GetInstance()->playSound(SE_S_HEART_ADD);
|
||||
mEffectHeartIdx = -1;
|
||||
}
|
||||
|
||||
@@ -323,14 +323,14 @@ void dLytMeterHeart_c::executeInternal() {
|
||||
if (mpAlphaPane->IsVisible() && mpAlphaPane->GetGlobalAlpha() != 0 && mStoredHealth % 4 == 0 &&
|
||||
(!(dScGame_c::currentSpawnInfo.stageName == "F406") || dScGame_c::currentSpawnInfo.layer != 13) &&
|
||||
dLytGameOver_c::GetInstance() == nullptr) {
|
||||
SmallSoundManager::GetInstance()->playSound(SE_S_HP_GAUGE_UP);
|
||||
dSndSmallEffectMgr_c::GetInstance()->playSound(SE_S_HP_GAUGE_UP);
|
||||
}
|
||||
} else {
|
||||
if (mStoredHealth - 1 >= current) {
|
||||
mStoredHealth = mStoredHealth - 1;
|
||||
if (EventManager::isInEvent() && !strcmp(EventManager::getCurrentEventName(), ("MoleF202Start")) &&
|
||||
mStoredHealth % 4 == 0) {
|
||||
SmallSoundManager::GetInstance()->playSound(SE_S_HP_GAUGE_DOWN);
|
||||
dSndSmallEffectMgr_c::GetInstance()->playSound(SE_S_HP_GAUGE_DOWN);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
#include "d/lyt/d_lyt_do_button.h"
|
||||
#include "d/lyt/d_lyt_unknowns.h"
|
||||
#include "d/lyt/meter/d_lyt_meter.h"
|
||||
#include "d/snd/d_snd_small_effect_mgr.h"
|
||||
#include "m/m_vec.h"
|
||||
#include "nw4r/lyt/lyt_group.h"
|
||||
#include "nw4r/math/math_types.h"
|
||||
@@ -22,7 +23,6 @@
|
||||
#include "toBeSorted/event_manager.h"
|
||||
#include "toBeSorted/minigame_mgr.h"
|
||||
#include "toBeSorted/misc_actor.h"
|
||||
#include "toBeSorted/small_sound_mgr.h"
|
||||
|
||||
STATE_DEFINE(dLytMeterItemSelectIcon_c, Wait);
|
||||
STATE_DEFINE(dLytMeterItemSelectIcon_c, On);
|
||||
@@ -1392,7 +1392,7 @@ void dLytMeterItemSelect_c::initializeState_DemoMove() {
|
||||
mAnm[i + ITEM_SELECT_ANIM_HAVE_OFFSET].setAnimEnable(false);
|
||||
}
|
||||
|
||||
SmallSoundManager::GetInstance()->playSound(SE_S_GET_ITEM_SET);
|
||||
dSndSmallEffectMgr_c::GetInstance()->playSound(SE_S_GET_ITEM_SET);
|
||||
}
|
||||
|
||||
void dLytMeterItemSelect_c::executeState_DemoMove() {
|
||||
@@ -1988,7 +1988,7 @@ bool dLytMeterItemSelect_c::execute() {
|
||||
|
||||
if (dLytDobutton_c::getField0x47C() == dLytDobutton_c::ACT_DO_SAILCLOTH) {
|
||||
if (field_0x5774 == 0) {
|
||||
SmallSoundManager::GetInstance()->playSound(SE_S_PARACHUTE_CALL);
|
||||
dSndSmallEffectMgr_c::GetInstance()->playSound(SE_S_PARACHUTE_CALL);
|
||||
}
|
||||
field_0x5774++;
|
||||
if (field_0x5774 >= mAnm[ITEM_SELECT_ANIM_CALL].getAnimDuration() / 2.0f) {
|
||||
@@ -2058,11 +2058,11 @@ bool dLytMeterItemSelect_c::execute() {
|
||||
mAnm[ITEM_SELECT_ANIM_FULL].setFrame(0.0f);
|
||||
mAnm[ITEM_SELECT_ANIM_FULL].setAnimEnable(true);
|
||||
if (field_0x5797 == I_BOMB_BAG) {
|
||||
SmallSoundManager::GetInstance()->playSound(SE_S_BM_MAX);
|
||||
dSndSmallEffectMgr_c::GetInstance()->playSound(SE_S_BM_MAX);
|
||||
} else if (field_0x5797 == I_BOW) {
|
||||
SmallSoundManager::GetInstance()->playSound(SE_S_AW_MAX);
|
||||
dSndSmallEffectMgr_c::GetInstance()->playSound(SE_S_AW_MAX);
|
||||
} else if (field_0x5797 == I_SLINGSHOT) {
|
||||
SmallSoundManager::GetInstance()->playSound(SE_S_PC_MAX);
|
||||
dSndSmallEffectMgr_c::GetInstance()->playSound(SE_S_PC_MAX);
|
||||
}
|
||||
}
|
||||
field_0x57B7 = false;
|
||||
@@ -2094,7 +2094,7 @@ bool dLytMeterItemSelect_c::execute() {
|
||||
mAnm[ITEM_SELECT_ANIM_CALL].play();
|
||||
if (dLytMeter_c::GetInstance()->checkAllFlags(METER_BTN_B) &&
|
||||
mAnm[ITEM_SELECT_ANIM_CALL].getFrame() == 1.0f) {
|
||||
SmallSoundManager::GetInstance()->playSound(SE_S_B_BUTTON_BLINK);
|
||||
dSndSmallEffectMgr_c::GetInstance()->playSound(SE_S_B_BUTTON_BLINK);
|
||||
}
|
||||
}
|
||||
b2 = true;
|
||||
@@ -2115,7 +2115,7 @@ bool dLytMeterItemSelect_c::execute() {
|
||||
mAnm[ITEM_SELECT_ANIM_CALL].play();
|
||||
if (dLytMeter_c::GetInstance()->checkAllFlags(METER_BTN_B) &&
|
||||
mAnm[ITEM_SELECT_ANIM_CALL].getFrame() == 1.0f) {
|
||||
SmallSoundManager::GetInstance()->playSound(SE_S_PARACHUTE_CALL);
|
||||
dSndSmallEffectMgr_c::GetInstance()->playSound(SE_S_PARACHUTE_CALL);
|
||||
}
|
||||
}
|
||||
b2 = true;
|
||||
|
||||
@@ -5,9 +5,9 @@
|
||||
#include "d/a/d_a_item.h"
|
||||
#include "d/d_stage_mgr.h"
|
||||
#include "d/lyt/d2d.h"
|
||||
#include "d/snd/d_snd_small_effect_mgr.h"
|
||||
#include "m/m_vec.h"
|
||||
#include "nw4r/lyt/lyt_pane.h"
|
||||
#include "toBeSorted/small_sound_mgr.h"
|
||||
|
||||
STATE_DEFINE(dLytMeterKakeraKey_c, Wait);
|
||||
STATE_DEFINE(dLytMeterKakeraKey_c, On);
|
||||
@@ -87,9 +87,9 @@ void dLytMeterKakeraKey_c::initializeState_Increase() {
|
||||
mAnm[mNextKeyPieceCount - 1 + KEY_KAKERA_ANIM_NUMBER_OFFSET].setFrame(0.0f);
|
||||
mSavedKeyPieceCount = dAcItem_c::getKeyPieceCount();
|
||||
if (mSavedKeyPieceCount == KEY_KAKERA_NUM_PIECES) {
|
||||
SmallSoundManager::GetInstance()->playSound(SE_S_KEY_COMPLETE);
|
||||
dSndSmallEffectMgr_c::GetInstance()->playSound(SE_S_KEY_COMPLETE);
|
||||
} else {
|
||||
SmallSoundManager::GetInstance()->playSound(SE_S_KEY_PARTS);
|
||||
dSndSmallEffectMgr_c::GetInstance()->playSound(SE_S_KEY_PARTS);
|
||||
}
|
||||
}
|
||||
void dLytMeterKakeraKey_c::executeState_Increase() {
|
||||
|
||||
@@ -7,12 +7,12 @@
|
||||
#include "d/lyt/d_lyt_control_game.h"
|
||||
#include "d/lyt/d_lyt_util_items.h"
|
||||
#include "d/lyt/meter/d_lyt_meter.h"
|
||||
#include "d/snd/d_snd_small_effect_mgr.h"
|
||||
#include "m/m_angle.h"
|
||||
#include "nw4r/lyt/lyt_group.h"
|
||||
#include "nw4r/math/math_types.h"
|
||||
#include "sized_string.h"
|
||||
#include "toBeSorted/file_manager.h"
|
||||
#include "toBeSorted/small_sound_mgr.h"
|
||||
|
||||
STATE_DEFINE(dLytMeterMinusBtnMenuIcon_c, Wait);
|
||||
STATE_DEFINE(dLytMeterMinusBtnMenuIcon_c, On);
|
||||
@@ -635,9 +635,9 @@ void dLytMeterMinusBtn_c::initializeState_DemoMove() {
|
||||
}
|
||||
|
||||
if (field_0x4E8C == 0) {
|
||||
SmallSoundManager::GetInstance()->playSound(SE_S_DOGU_PORCH_ADD_FIRST);
|
||||
dSndSmallEffectMgr_c::GetInstance()->playSound(SE_S_DOGU_PORCH_ADD_FIRST);
|
||||
} else {
|
||||
SmallSoundManager::GetInstance()->playSound(SE_S_DOGU_PORCH_ADD);
|
||||
dSndSmallEffectMgr_c::GetInstance()->playSound(SE_S_DOGU_PORCH_ADD);
|
||||
}
|
||||
}
|
||||
void dLytMeterMinusBtn_c::executeState_DemoMove() {
|
||||
@@ -898,7 +898,7 @@ bool dLytMeterMinusBtn_c::execute() {
|
||||
mAnm[MINUS_BTN_ANIM_CALL].play();
|
||||
if (dLytMeter_c::GetInstance()->checkAllFlags(METER_BTN_MINUS) &&
|
||||
mAnm[MINUS_BTN_ANIM_CALL].getFrame() == 1.0f) {
|
||||
SmallSoundManager::GetInstance()->playSound(SE_S_MINUS_BUTTON_BLINK);
|
||||
dSndSmallEffectMgr_c::GetInstance()->playSound(SE_S_MINUS_BUTTON_BLINK);
|
||||
}
|
||||
}
|
||||
} else if (field_0x4EBA == 1) {
|
||||
|
||||
@@ -9,11 +9,11 @@
|
||||
#include "d/lyt/d_lyt_unknowns.h"
|
||||
#include "d/lyt/d_window.h"
|
||||
#include "d/lyt/meter/d_lyt_meter.h"
|
||||
#include "d/snd/d_snd_small_effect_mgr.h"
|
||||
#include "d/t/d_t_map_mark.h"
|
||||
#include "f/f_base.h"
|
||||
#include "f/f_manager.h"
|
||||
#include "f/f_profile_name.h"
|
||||
#include "toBeSorted/small_sound_mgr.h"
|
||||
|
||||
STATE_DEFINE(dLytMeterPlusBtn_c, Wait);
|
||||
STATE_DEFINE(dLytMeterPlusBtn_c, ToUse);
|
||||
@@ -196,7 +196,7 @@ bool dLytMeterPlusBtn_c::execute() {
|
||||
mAnm[PLUS_BTN_ANIM_CALL].play();
|
||||
if (dLytMeter_c::GetInstance()->checkAllFlags(METER_BTN_PLUS) &&
|
||||
mAnm[PLUS_BTN_ANIM_CALL].getFrame() == 1.0f && mCallCount < 3) {
|
||||
SmallSoundManager::GetInstance()->playSound(SE_S_PLUS_BUTTON_BLINK);
|
||||
dSndSmallEffectMgr_c::GetInstance()->playSound(SE_S_PLUS_BUTTON_BLINK);
|
||||
mCallCount++;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
#include "d/a/d_a_item.h"
|
||||
#include "d/lyt/d2d.h"
|
||||
#include "d/lyt/d_lyt_meter_configuration.h"
|
||||
#include "d/snd/d_snd_small_effect_mgr.h"
|
||||
#include "nw4r/math/math_types.h"
|
||||
#include "toBeSorted/small_sound_mgr.h"
|
||||
|
||||
STATE_DEFINE(dLytMeterRupyStart_c, Wait);
|
||||
STATE_DEFINE(dLytMeterRupyStart_c, Start);
|
||||
@@ -426,9 +426,9 @@ bool dLytMeterRupy_c::updateDisplayedAmount(bool suppressSound) {
|
||||
b = true;
|
||||
if (field_0x8AB) {
|
||||
if (newNumDisplayed == amount) {
|
||||
SmallSoundManager::GetInstance()->playSound(SE_S_RUPEE_COUNT_DOWN_END);
|
||||
dSndSmallEffectMgr_c::GetInstance()->playSound(SE_S_RUPEE_COUNT_DOWN_END);
|
||||
} else {
|
||||
SmallSoundManager::GetInstance()->playSound(SE_S_RUPEE_COUNT_DOWN);
|
||||
dSndSmallEffectMgr_c::GetInstance()->playSound(SE_S_RUPEE_COUNT_DOWN);
|
||||
}
|
||||
}
|
||||
if (field_0x8AD) {
|
||||
@@ -445,13 +445,13 @@ bool dLytMeterRupy_c::updateDisplayedAmount(bool suppressSound) {
|
||||
b = true;
|
||||
if (field_0x8AB) {
|
||||
if (newNumDisplayed == amount) {
|
||||
SmallSoundManager::GetInstance()->playSound(SE_S_RUPEE_COUNT_UP_END);
|
||||
dSndSmallEffectMgr_c::GetInstance()->playSound(SE_S_RUPEE_COUNT_UP_END);
|
||||
if (field_0x8AD) {
|
||||
field_0x890 = 0;
|
||||
field_0x8AD = 0;
|
||||
}
|
||||
} else {
|
||||
SmallSoundManager::GetInstance()->playSound(SE_S_RUPEE_COUNT_UP);
|
||||
dSndSmallEffectMgr_c::GetInstance()->playSound(SE_S_RUPEE_COUNT_UP);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -511,7 +511,7 @@ bool dLytMeterRupy_c::updateDisplayedAmount(bool suppressSound) {
|
||||
mPrevDigits[2] = mDisplayedDigits[2];
|
||||
mPrevDigits[3] = mDisplayedDigits[3];
|
||||
} else if (field_0x8AD && amount == dAcItem_c::getCurrentWalletCapacity()) {
|
||||
SmallSoundManager::GetInstance()->playSound(SE_S_RUPEE_MAX);
|
||||
dSndSmallEffectMgr_c::GetInstance()->playSound(SE_S_RUPEE_MAX);
|
||||
field_0x890 = 0;
|
||||
field_0x8AD = 0;
|
||||
}
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
#include "d/d_pouch.h"
|
||||
#include "d/lyt/d2d.h"
|
||||
#include "d/lyt/d_lyt_meter_configuration.h"
|
||||
#include "d/snd/d_snd_small_effect_mgr.h"
|
||||
#include "toBeSorted/file_manager.h"
|
||||
#include "toBeSorted/small_sound_mgr.h"
|
||||
|
||||
STATE_DEFINE(dLytMeterShieldGauge_c, Normal);
|
||||
STATE_DEFINE(dLytMeterShieldGauge_c, Use);
|
||||
@@ -181,13 +181,13 @@ bool dLytMeterShieldGauge_c::execute() {
|
||||
if (mCurrentDurability >= mMaxDurability) {
|
||||
if (field_0x31E) {
|
||||
// Unreachable?
|
||||
SmallSoundManager::GetInstance()->playSoundWithPitch(SE_S_GAUGE_SHIELD_UP_LV, 1.0f);
|
||||
dSndSmallEffectMgr_c::GetInstance()->playSoundWithPitch(SE_S_GAUGE_SHIELD_UP_LV, 1.0f);
|
||||
}
|
||||
SmallSoundManager::GetInstance()->playSound(SE_S_GAUGE_SHIELD_UP_MAX);
|
||||
dSndSmallEffectMgr_c::GetInstance()->playSound(SE_S_GAUGE_SHIELD_UP_MAX);
|
||||
} else {
|
||||
if (field_0x31E) {
|
||||
// Unreachable?
|
||||
SmallSoundManager::GetInstance()->playSoundWithPitch(
|
||||
dSndSmallEffectMgr_c::GetInstance()->playSoundWithPitch(
|
||||
SE_S_GAUGE_SHIELD_UP_LV, mCurrentDurability / mMaxDurability
|
||||
);
|
||||
}
|
||||
|
||||
@@ -10,13 +10,13 @@
|
||||
#include "d/lyt/d2d.h"
|
||||
#include "d/lyt/d_lyt_drop_line.h"
|
||||
#include "d/lyt/meter/d_lyt_meter.h"
|
||||
#include "d/snd/d_snd_small_effect_mgr.h"
|
||||
#include "d/t/d_t_siren.h"
|
||||
#include "m/m_vec.h"
|
||||
#include "nw4r/lyt/lyt_pane.h"
|
||||
#include "nw4r/math/math_types.h"
|
||||
#include "toBeSorted/d_emitter.h"
|
||||
#include "toBeSorted/event_manager.h"
|
||||
#include "toBeSorted/small_sound_mgr.h"
|
||||
|
||||
#include <cstring>
|
||||
|
||||
@@ -328,7 +328,7 @@ bool LytMeterTimerPart1_c::incrementTearCount() {
|
||||
startNextFruitAnim();
|
||||
if (!dLytMeter_c::getfn_800C9FE0()) {
|
||||
createEffect(mActualTearCount - 1);
|
||||
SmallSoundManager::GetInstance()->playSound(SE_S_SIREN_SHIZUKU_GET_IN);
|
||||
dSndSmallEffectMgr_c::GetInstance()->playSound(SE_S_SIREN_SHIZUKU_GET_IN);
|
||||
}
|
||||
|
||||
if (mActualTearCount < TIMER_01_NUM_TEARS) {
|
||||
|
||||
@@ -7,8 +7,8 @@
|
||||
#include "d/lyt/d_lyt_control_game.h"
|
||||
#include "d/lyt/d_lyt_unknowns.h"
|
||||
#include "d/lyt/meter/d_lyt_meter.h"
|
||||
#include "d/snd/d_snd_small_effect_mgr.h"
|
||||
#include "toBeSorted/attention.h"
|
||||
#include "toBeSorted/small_sound_mgr.h"
|
||||
|
||||
STATE_DEFINE(dLytMeterZBtn_c, Wait);
|
||||
STATE_DEFINE(dLytMeterZBtn_c, On);
|
||||
@@ -224,7 +224,7 @@ bool dLytMeterZBtn_c::execute() {
|
||||
if (mAnm[Z_BTN_ANIM_CALL].isEnabled()) {
|
||||
mAnm[Z_BTN_ANIM_CALL].play();
|
||||
if (dLytMeter_c::GetInstance()->checkAllFlags(0x800) && mAnm[Z_BTN_ANIM_CALL].getFrame() == 1.0f) {
|
||||
SmallSoundManager::GetInstance()->playSound(SE_S_Z_BUTTON_BLINK);
|
||||
dSndSmallEffectMgr_c::GetInstance()->playSound(SE_S_Z_BUTTON_BLINK);
|
||||
}
|
||||
}
|
||||
} else if (field_0x1C6 == 1) {
|
||||
|
||||
@@ -27,6 +27,7 @@
|
||||
#include "d/lyt/d_lyt_auto_caption.h"
|
||||
// clang-format on
|
||||
|
||||
#include "d/snd/d_snd_small_effect_mgr.h"
|
||||
#include "f/f_base.h"
|
||||
#include "m/m_fader_base.h"
|
||||
#include "m/m_vec.h"
|
||||
@@ -38,7 +39,6 @@
|
||||
#include "toBeSorted/lyt_related_floats.h"
|
||||
#include "toBeSorted/music_mgrs.h"
|
||||
#include "toBeSorted/other_sound_stuff.h"
|
||||
#include "toBeSorted/small_sound_mgr.h"
|
||||
|
||||
#include <cstring>
|
||||
|
||||
@@ -308,7 +308,7 @@ void dLytMsgWindow_c::executeState_OutputText() {
|
||||
} else if (mpTagProcessor->getMsgWindowSubtype() <= MSG_WINDOW_1 && oldValue != mpMsgWindowUnk->getField_0x147A()) {
|
||||
u16 a = mpMsgWindowUnk->getField_0x147C();
|
||||
f32 b = (dTagProcessor_c::fn_800B8040(0, 0) * 100.0f);
|
||||
SmallSoundManager::GetInstance()->playButtonPressSoundWhenAdvancingTextBoxes(a / b);
|
||||
dSndSmallEffectMgr_c::GetInstance()->playButtonPressSoundWhenAdvancingTextBoxes(a / b);
|
||||
}
|
||||
|
||||
if (setTextToDisplay(mpMsgWindowUnk->getProcessedText())) {
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
#include "common.h"
|
||||
#include "d/d_pad.h"
|
||||
#include "d/lyt/d2d.h"
|
||||
#include "d/snd/d_snd_small_effect_mgr.h"
|
||||
#include "toBeSorted/music_mgrs.h"
|
||||
#include "toBeSorted/small_sound_mgr.h"
|
||||
|
||||
|
||||
STATE_DEFINE(dLytMsgWindowSelectBtnParts_c, Wait);
|
||||
@@ -278,11 +278,11 @@ void dLytMsgWindowSelectBtn_c::initializeState_In() {
|
||||
} else {
|
||||
if (field_0x9CF != 0) {
|
||||
if (field_0x9A0 == 1) {
|
||||
SmallSoundManager::GetInstance()->playSound(SE_S_CHOICE_START);
|
||||
dSndSmallEffectMgr_c::GetInstance()->playSound(SE_S_CHOICE_START);
|
||||
} else if (field_0x9A0 == 2) {
|
||||
SmallSoundManager::GetInstance()->playSound(SE_S_CHOICE_START_GAMEOVER);
|
||||
dSndSmallEffectMgr_c::GetInstance()->playSound(SE_S_CHOICE_START_GAMEOVER);
|
||||
} else {
|
||||
SmallSoundManager::GetInstance()->playSound(SE_S_TALK_CHOICE_START);
|
||||
dSndSmallEffectMgr_c::GetInstance()->playSound(SE_S_TALK_CHOICE_START);
|
||||
}
|
||||
}
|
||||
mAnm[SELECT_BTN_ANIM_IN].setFrame(0.0f);
|
||||
@@ -323,7 +323,7 @@ void dLytMsgWindowSelectBtn_c::executeState_WaitSelect() {
|
||||
mpWindow->UpdateSize(mpSizeBox, 32.0f);
|
||||
} else if (v == 3) {
|
||||
field_0x9D1 = 1;
|
||||
SmallSoundManager::GetInstance()->playSound(SE_S_POINTER_RESET);
|
||||
dSndSmallEffectMgr_c::GetInstance()->playSound(SE_S_POINTER_RESET);
|
||||
mStateMgr.changeState(StateID_In);
|
||||
return;
|
||||
}
|
||||
@@ -334,9 +334,9 @@ void dLytMsgWindowSelectBtn_c::executeState_WaitSelect() {
|
||||
mStateMgr.changeState(StateID_WaitDecide);
|
||||
// TODO
|
||||
if (mpTagProcessor != nullptr) {
|
||||
SmallSoundManager::GetInstance()->playSound(SE_S_TALK_CURSOR_CANCEL);
|
||||
dSndSmallEffectMgr_c::GetInstance()->playSound(SE_S_TALK_CURSOR_CANCEL);
|
||||
} else {
|
||||
SmallSoundManager::GetInstance()->playSound(SE_S_TALK_CURSOR_OK);
|
||||
dSndSmallEffectMgr_c::GetInstance()->playSound(SE_S_TALK_CURSOR_OK);
|
||||
}
|
||||
fn_8035E880(BGM_MGR);
|
||||
} else if (dPad::checkButtonBPressed()) {
|
||||
@@ -347,9 +347,9 @@ void dLytMsgWindowSelectBtn_c::executeState_WaitSelect() {
|
||||
mStateMgr.changeState(StateID_WaitCancel);
|
||||
// TODO
|
||||
if (mpTagProcessor != nullptr) {
|
||||
SmallSoundManager::GetInstance()->playSound(SE_S_TALK_CURSOR_CANCEL);
|
||||
dSndSmallEffectMgr_c::GetInstance()->playSound(SE_S_TALK_CURSOR_CANCEL);
|
||||
} else {
|
||||
SmallSoundManager::GetInstance()->playSound(SE_S_TALK_CURSOR_OK);
|
||||
dSndSmallEffectMgr_c::GetInstance()->playSound(SE_S_TALK_CURSOR_OK);
|
||||
}
|
||||
fn_8035E880(BGM_MGR);
|
||||
}
|
||||
|
||||
@@ -27,7 +27,7 @@ dSnd3DActor_c::dSnd3DActor_c(UNKTYPE *a1, u8 a2)
|
||||
mFlags(0),
|
||||
mDistanceToPlayer(INFINITY),
|
||||
a_field_0xE0(0.0f) {
|
||||
resetFloats();
|
||||
resetCachedRelativePositions();
|
||||
// Portability hazard
|
||||
SetUserParam(reinterpret_cast<u32>(this));
|
||||
if (dSndPlayerMgr_c::GetInstance()->canUseThisPlayer(a2)) {
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
#include "nw4r/snd/snd_SoundArchive.h"
|
||||
#include "toBeSorted/music_mgrs.h"
|
||||
|
||||
template class SndMgrDisposer<dSnd3DManager_c>;
|
||||
SND_DISPOSER_DEFINE(dSnd3DManager_c);
|
||||
|
||||
dSnd3DManager_c::dSnd3DManager_c() : mIsSetup(false), mCalculationsFresh(0) {
|
||||
mCameraPosSqVelocity = 0.0f;
|
||||
|
||||
@@ -0,0 +1,61 @@
|
||||
#include "d/snd/d_snd_area_sound.h"
|
||||
|
||||
#include "common.h"
|
||||
#include "d/snd/d_snd_sound.h"
|
||||
|
||||
dSndAreaSound_c::dSndAreaSound_c()
|
||||
: field_0xF0(false), mpCalcCallback(nullptr), field_0xF8(nullptr), field_0xFC(nullptr), field_0x100(nullptr) {}
|
||||
|
||||
void dSndAreaSound_c::cancel() {
|
||||
dSndSound_c::cancel();
|
||||
field_0xF0 = false;
|
||||
}
|
||||
|
||||
void dSndAreaSound_c::calc() {
|
||||
if (isFadingOut() && mPauseFlag) {
|
||||
if (GetRemainingFadeFrames() <= 0) {
|
||||
Stop(0);
|
||||
cancel();
|
||||
}
|
||||
}
|
||||
|
||||
dSndSound_c::calc();
|
||||
if (mpCalcCallback != nullptr) {
|
||||
(mpCalcCallback)(*this);
|
||||
}
|
||||
}
|
||||
|
||||
void dSndAreaSound_c::fadeIn(u32 id, s32 fadeFrames) {
|
||||
dSndSound_c::fadeIn(id, fadeFrames);
|
||||
initCallback(id);
|
||||
}
|
||||
|
||||
void dSndAreaSound_c::pause(s32 fadeFrames) {
|
||||
if (isRunning()) {
|
||||
if (fadeFrames != 0) {
|
||||
pause(true, fadeFrames);
|
||||
mIsFadingOut = true;
|
||||
} else {
|
||||
Stop(fadeFrames);
|
||||
cancel();
|
||||
}
|
||||
} else {
|
||||
cancel();
|
||||
}
|
||||
}
|
||||
|
||||
void dSndAreaSound_c::unpause(s32 fadeFrames) {
|
||||
if (isFadingOut()) {
|
||||
pause(false, fadeFrames);
|
||||
mIsFadingOut = false;
|
||||
}
|
||||
}
|
||||
|
||||
void dSndAreaSound_c::initCallback(u32 id) {
|
||||
Callback cb = nullptr;
|
||||
mpCalcCallback = nullptr;
|
||||
field_0xF8 = nullptr;
|
||||
field_0xFC = nullptr;
|
||||
field_0x100 = nullptr;
|
||||
field_0x104 = nullptr;
|
||||
}
|
||||
@@ -0,0 +1,75 @@
|
||||
#include "d/snd/d_snd_area_sound_effect_mgr.h"
|
||||
|
||||
#include "common.h"
|
||||
#include "d/d_sc_game.h"
|
||||
#include "d/snd/d_snd_mgr.h"
|
||||
#include "d/snd/d_snd_player_mgr.h"
|
||||
#include "d/snd/d_snd_util.h"
|
||||
#include "nw4r/snd/snd_SoundStartable.h"
|
||||
|
||||
SND_DISPOSER_DEFINE(dSndAreaSoundEffectMgr_c);
|
||||
|
||||
dSndAreaSoundEffectMgr_c::dSndAreaSoundEffectMgr_c()
|
||||
: field_0x328(0),
|
||||
field_0x32C(1.0f),
|
||||
field_0x330(1.0f),
|
||||
mActor(*dSndMgr_c::GetInstance()->getPlayer()),
|
||||
field_0x388(1.0f) {}
|
||||
|
||||
void dSndAreaSoundEffectMgr_c::calc() {
|
||||
for (int i = 0; i < 3; i++) {
|
||||
mSounds[i].calc();
|
||||
}
|
||||
}
|
||||
|
||||
bool dSndAreaSoundEffectMgr_c::startSound(u32 soundId, u32 handleIdx) {
|
||||
if (dSndPlayerMgr_c::GetInstance()->checkFlag(0x2)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (isPlayingSound(soundId)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (handleIdx > 2) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (dScGame_c::currentSpawnInfo.getTrial() == SpawnInfo::TRIAL) {
|
||||
return false;
|
||||
}
|
||||
|
||||
dSndAreaSound_c *snd = &mSounds[handleIdx];
|
||||
nw4r::snd::SoundStartable::StartResult res = mActor.detail_StartSound(snd, soundId, nullptr);
|
||||
if (res == nw4r::snd::SoundStartable::START_SUCCESS) {
|
||||
snd->fadeIn(soundId, 30);
|
||||
}
|
||||
|
||||
// @bug should probably be `res != nw4r::snd::SoundStartable::START_SUCCESS`
|
||||
// all callers seem to ignore return value though
|
||||
return res;
|
||||
}
|
||||
|
||||
void dSndAreaSoundEffectMgr_c::stopSounds(s32 fadeFrames) {
|
||||
for (u32 i = 0; i < 3; i++) {
|
||||
mSounds[i].stop(fadeFrames);
|
||||
}
|
||||
}
|
||||
|
||||
bool dSndAreaSoundEffectMgr_c::isPlayingAnySound() const {
|
||||
for (int i = 0; i < 3; i++) {
|
||||
if (mSounds[i].IsAttachedSound()) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
bool dSndAreaSoundEffectMgr_c::isPlayingSound(u32 soundId) const {
|
||||
for (int i = 0; i < 3; i++) {
|
||||
if (mSounds[i].GetId() == soundId) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
@@ -4,7 +4,7 @@
|
||||
#include "d/snd/d_snd_control_player.h"
|
||||
#include "nw4r/ut/ut_list.h"
|
||||
|
||||
template class SndMgrDisposer<dSndControlPlayerMgr_c>;
|
||||
SND_DISPOSER_DEFINE(dSndControlPlayerMgr_c);
|
||||
|
||||
dSndControlPlayerMgr_c::dSndControlPlayerMgr_c() : mOverrideVolumeMask(0) {
|
||||
// TODO offsetof
|
||||
@@ -47,7 +47,7 @@ void dSndControlPlayerMgr_c::calcVolumes() {
|
||||
f32 currentVolume = getAppliedPlayerVolume(i);
|
||||
f32 targetVolume = mpTargetVolumes[i];
|
||||
f32 maxVolumeDecrease = mpMaxVolumeDecreases[i];
|
||||
f32 maxVolumeIncrease = mpMaxVolumeDecreases[i];
|
||||
f32 maxVolumeIncrease = mpMaxVolumeIncreases[i];
|
||||
|
||||
if (currentVolume != targetVolume) {
|
||||
if (currentVolume - targetVolume > maxVolumeDecrease) {
|
||||
@@ -61,7 +61,7 @@ void dSndControlPlayerMgr_c::calcVolumes() {
|
||||
}
|
||||
mpTargetVolumes[i] = 1.0f;
|
||||
mpMaxVolumeDecreases[i] = 0.1f;
|
||||
mpMaxVolumeDecreases[i] = 0.025f;
|
||||
mpMaxVolumeIncreases[i] = 0.025f;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -101,7 +101,7 @@ void dSndControlPlayerMgr_c::setVolume(u32 playerIdx, f32 value, s32 frames) {
|
||||
} else {
|
||||
// Volume is not overridden, set volume normally
|
||||
setControlValue(CTRL_VOLUME, playerIdx, value, frames);
|
||||
mpSavedVolumes[playerIdx] = getControlVolumeTarget(CTRL_VOLUME, playerIdx);
|
||||
mpSavedVolumes[playerIdx] = getControlTarget(CTRL_VOLUME, playerIdx);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -111,7 +111,7 @@ void dSndControlPlayerMgr_c::overrideVolume(u32 playerIdx, f32 volume, s32 frame
|
||||
}
|
||||
u32 mask = (1 << playerIdx);
|
||||
if ((mOverrideVolumeMask & mask) == 0) {
|
||||
mpSavedVolumes[playerIdx] = getControlVolumeTarget(CTRL_VOLUME, playerIdx);
|
||||
mpSavedVolumes[playerIdx] = getControlTarget(CTRL_VOLUME, playerIdx);
|
||||
mOverrideVolumeMask |= mask;
|
||||
}
|
||||
setControlValue(CTRL_VOLUME, playerIdx, volume, frames);
|
||||
@@ -171,7 +171,7 @@ f32 dSndControlPlayerMgr_c::getAppliedPlayerVolume(u32 playerIdx) const {
|
||||
return getPlayer1(playerIdx)->GetVolume();
|
||||
}
|
||||
|
||||
f32 dSndControlPlayerMgr_c::getControlVolumeTarget(PlayerCtrl_e ctrlType, u32 playerIdx) const {
|
||||
f32 dSndControlPlayerMgr_c::getControlTarget(PlayerCtrl_e ctrlType, u32 playerIdx) const {
|
||||
if (ctrlType >= CTRL_MAX) {
|
||||
return 1.0f;
|
||||
}
|
||||
|
||||
@@ -1,17 +1,16 @@
|
||||
#include "d/snd/d_snd_mgr.h"
|
||||
|
||||
#include "d/snd/d_snd_3d_manager.h"
|
||||
#include "d/snd/d_snd_area_sound_effect_mgr.h"
|
||||
#include "d/snd/d_snd_control_player_mgr.h"
|
||||
#include "d/snd/d_snd_player_mgr.h"
|
||||
#include "d/snd/d_snd_util.h"
|
||||
#include "d/snd/d_snd_small_effect_mgr.h"
|
||||
#include "egg/audio/eggAudioRmtSpeakerMgr.h"
|
||||
#include "egg/audio/eggAudioUtility.h"
|
||||
|
||||
extern "C" void initEnemySoundMgr();
|
||||
extern "C" void initFanfareSoundMgr();
|
||||
extern "C" void initSomeUnusedSoundMgr();
|
||||
extern "C" void initSoundEffectSoundMgr();
|
||||
extern "C" void fn_8036A430();
|
||||
extern "C" void initEnemyBgmRelatedMgr();
|
||||
extern "C" void fn_80393530();
|
||||
extern "C" void fn_80394830();
|
||||
@@ -23,14 +22,14 @@ dSndMgr_c *dSndMgr_c::sInstance;
|
||||
|
||||
dSndMgr_c::dSndMgr_c(): field_0x6CC(0) {
|
||||
sInstance = this;
|
||||
SndMgrDisposer<dSndPlayerMgr_c>::create();
|
||||
SndMgrDisposer<dSndControlPlayerMgr_c>::create();
|
||||
dSndPlayerMgr_c::create();
|
||||
dSndControlPlayerMgr_c::create();
|
||||
initEnemySoundMgr();
|
||||
SndMgrDisposer<dSnd3DManager_c>::create();
|
||||
dSnd3DManager_c::create();
|
||||
initFanfareSoundMgr();
|
||||
initSomeUnusedSoundMgr();
|
||||
initSoundEffectSoundMgr();
|
||||
fn_8036A430();
|
||||
dSndSmallEffectMgr_c::create();
|
||||
dSndAreaSoundEffectMgr_c::create();
|
||||
initEnemyBgmRelatedMgr();
|
||||
fn_80393530();
|
||||
fn_80394830();
|
||||
|
||||
@@ -12,7 +12,7 @@ const char *dSndPlayerMgr_c::getSoundArchivePath() {
|
||||
return "Sound/WZSound.brsar";
|
||||
}
|
||||
|
||||
template class SndMgrDisposer<dSndPlayerMgr_c>;
|
||||
SND_DISPOSER_DEFINE(dSndPlayerMgr_c);
|
||||
|
||||
dSndPlayerMgr_c::dSndPlayerMgr_c()
|
||||
: field_0x010(0), field_0x011(0), field_0x014(-1), field_0x018(-1), field_0x01C(-1), mFlags(0) {}
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
#include "d/snd/d_snd_small_effect_mgr.h"
|
||||
|
||||
#include "d/snd/d_snd_util.h"
|
||||
|
||||
|
||||
SND_DISPOSER_DEFINE(dSndSmallEffectMgr_c)
|
||||
|
||||
dSndSmallEffectMgr_c::dSndSmallEffectMgr_c() {}
|
||||
@@ -61,7 +61,7 @@ void dSndSound_c::resetControls() {
|
||||
resetTrackVolumes();
|
||||
}
|
||||
|
||||
void dSndSound_c::executeCtrls() {
|
||||
void dSndSound_c::calc() {
|
||||
if (mIsRunning && !IsAttachedSound()) {
|
||||
cancel();
|
||||
}
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
#include "d/d_sys.h"
|
||||
#include "d/lyt/d_lyt_save_msg_window.h"
|
||||
#include "d/lyt/d_lyt_system_window.h"
|
||||
#include "d/snd/d_snd_small_effect_mgr.h"
|
||||
#include "egg/core/eggHeap.h"
|
||||
#include "m/m_pad.h"
|
||||
#include "toBeSorted/arc_managers/layout_arc_manager.h"
|
||||
@@ -18,7 +19,6 @@
|
||||
#include "toBeSorted/nand_request_thread.h"
|
||||
#include "toBeSorted/nand_result_tracker.h"
|
||||
#include "toBeSorted/reload_color_fader.h"
|
||||
#include "toBeSorted/small_sound_mgr.h"
|
||||
|
||||
#include "rvl/NAND.h"
|
||||
#include "rvl/TPL.h"
|
||||
@@ -511,7 +511,7 @@ void SaveMgr::executeSaveBanner() {
|
||||
|
||||
if (b == 1) {
|
||||
if (!dDvdUnk::FontUnk::GetInstance()->getField_0x28()) {
|
||||
SmallSoundManager::GetInstance()->playSound(SE_S_SAVE_FINISH);
|
||||
dSndSmallEffectMgr_c::GetInstance()->playSound(SE_S_SAVE_FINISH);
|
||||
}
|
||||
mDelayTimer = 0;
|
||||
mStep++;
|
||||
|
||||
Reference in New Issue
Block a user