Fix one regswap

This commit is contained in:
robojumper
2025-07-06 23:55:57 +02:00
parent 73f1060a16
commit f50222e997
2 changed files with 8 additions and 7 deletions
+5
View File
@@ -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();
+3 -7
View File
@@ -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);