diff --git a/include/d/snd/d_snd_bgm_mgr.h b/include/d/snd/d_snd_bgm_mgr.h index 9dc08c9f..5a4400be 100644 --- a/include/d/snd/d_snd_bgm_mgr.h +++ b/include/d/snd/d_snd_bgm_mgr.h @@ -84,6 +84,11 @@ public: bool weirdCheckAlwaysFalse(); dSndBgmSound_c *getActiveBgmSound(); + // I don't love this inline but it fixes one regswap + // TODO look into getting rid of this one + dSndBgmSound_c *getActiveBgmSound_i() { + return getActiveBgmSound(); + } private: dSndBgmBattleSound_c *getBgmBattleSound(); diff --git a/src/d/snd/d_snd_bgm_mgr.cpp b/src/d/snd/d_snd_bgm_mgr.cpp index 325a71bb..dcfcb3ac 100644 --- a/src/d/snd/d_snd_bgm_mgr.cpp +++ b/src/d/snd/d_snd_bgm_mgr.cpp @@ -1,8 +1,8 @@ #include "d/snd/d_snd_bgm_mgr.h" #include "common.h" -#include "d/snd/d_snd_bgm_sound.h" #include "d/snd/d_snd_bgm_sound battle.h" +#include "d/snd/d_snd_bgm_sound.h" #include "d/snd/d_snd_mgr.h" #include "d/snd/d_snd_player_mgr.h" #include "d/snd/d_snd_sound.h" @@ -77,10 +77,7 @@ dSndBgmMgr_c::dSndBgmMgr_c() } void dSndBgmMgr_c::calcLists() { - // TODO Regswap - dSndBgmSound_c *snd; - - snd = getActiveBgmSound(); + dSndBgmSound_c *snd = getActiveBgmSound_i(); if (snd != nullptr) { if (snd != mpPrevActiveBgmSound) { snd->onBecomeActive(); @@ -88,8 +85,7 @@ void dSndBgmMgr_c::calcLists() { snd->applyVars(); } mpPrevActiveBgmSound = snd; - - + dSndBgmSound_c *next, *it; for (it = getFirstInBgmSoundList(BGM_LIST_PLAYING); it != nullptr; it = next) { next = getNextInBgmSoundList(BGM_LIST_PLAYING, it);