From 942f0def1efbcb608d7306185b70a193d18d335a Mon Sep 17 00:00:00 2001 From: Piotr Macha Date: Mon, 27 May 2024 05:02:01 +0200 Subject: [PATCH] Cleanup code after last changes --- src/NH/Bass/Channel.cpp | 2 +- src/NH/Bass/Channel.h | 14 ++------------ src/NH/Bass/CommonTypes.h | 9 --------- src/NH/Bass/Engine.h | 2 +- src/NH/Bass/EventManager.h | 1 - 5 files changed, 4 insertions(+), 24 deletions(-) delete mode 100644 src/NH/Bass/CommonTypes.h diff --git a/src/NH/Bass/Channel.cpp b/src/NH/Bass/Channel.cpp index 88e33da..c18df3e 100644 --- a/src/NH/Bass/Channel.cpp +++ b/src/NH/Bass/Channel.cpp @@ -93,7 +93,7 @@ namespace NH::Bass { log->Error("Trying to acquire a non-available channel. We will allow that to not crash the game but the music may be funky."); } - m_Status = ChannelStatus::PLAYING; + m_Status = ChannelStatus::ACQUIRED; } void Channel::Release() diff --git a/src/NH/Bass/Channel.h b/src/NH/Bass/Channel.h index be9d26f..2b80c54 100644 --- a/src/NH/Bass/Channel.h +++ b/src/NH/Bass/Channel.h @@ -1,6 +1,5 @@ #pragma once -#include "NH/Bass/CommonTypes.h" #include "EventManager.h" #include "NH/Logger.h" #include @@ -8,15 +7,9 @@ #include - namespace NH::Bass { - enum class ChannelStatus - { - AVAILABLE, - PLAYING, - FADING_OUT - }; + enum class ChannelStatus { AVAILABLE, ACQUIRED }; class Channel : public IChannel { @@ -45,10 +38,7 @@ namespace NH::Bass void Acquire() override; void Release() override; - bool IsAvailable() override - { - return m_Status == ChannelStatus::AVAILABLE; - }; + bool IsAvailable() override { return m_Status == ChannelStatus::AVAILABLE; }; private: static void CALLBACK OnSlideVolumeSyncCallFunction(HSYNC, DWORD channel, DWORD data, void* userData); diff --git a/src/NH/Bass/CommonTypes.h b/src/NH/Bass/CommonTypes.h deleted file mode 100644 index 4c00cae..0000000 --- a/src/NH/Bass/CommonTypes.h +++ /dev/null @@ -1,9 +0,0 @@ -#pragma once - -#include "bass.h" -#include "Union/String.h" - -namespace NH::Bass -{ - -} diff --git a/src/NH/Bass/Engine.h b/src/NH/Bass/Engine.h index 5ab3518..2393a4d 100644 --- a/src/NH/Bass/Engine.h +++ b/src/NH/Bass/Engine.h @@ -1,6 +1,6 @@ #pragma once -#include "CommonTypes.h" +#include #include "EventManager.h" #include "Channel.h" #include "NH/Logger.h" diff --git a/src/NH/Bass/EventManager.h b/src/NH/Bass/EventManager.h index b40aaec..c87758b 100644 --- a/src/NH/Bass/EventManager.h +++ b/src/NH/Bass/EventManager.h @@ -1,6 +1,5 @@ #pragma once -#include "NH/Bass/CommonTypes.h" #include "NH/Logger.h" #include