| 1 | #include "Library/Bgm/BgmKeeper.h" |
|---|---|
| 2 | |
| 3 | #include "Library/Audio/System/AudioSystemInfo.h" |
| 4 | #include "Library/Bgm/BgmDirector.h" |
| 5 | #include "Library/Bgm/BgmFunction.h" |
| 6 | #include "Library/Bgm/BgmLineFunction.h" |
| 7 | #include "Library/Resource/Resource.h" |
| 8 | #include "Project/Bgm/BgmInfo.h" |
| 9 | |
| 10 | namespace al { |
| 11 | |
| 12 | BgmKeeper::BgmKeeper(const AudioSystemInfo* audioInfo, BgmDirector* director, const char* string) |
| 13 | : mBgmDirector(director) { |
| 14 | if (string != nullptr) |
| 15 | mBgmUserInfo = alBgmFunction::tryFindBgmUserInfo(audioInfo->bgmDataBase, string); |
| 16 | } |
| 17 | |
| 18 | BgmKeeper* BgmKeeper::create(const AudioSystemInfo* audioInfo, BgmDirector* director, |
| 19 | const char* string) { |
| 20 | if (!audioInfo->seDataBase) |
| 21 | return nullptr; |
| 22 | return new BgmKeeper(audioInfo, director, string); |
| 23 | } |
| 24 | |
| 25 | void BgmKeeper::update() {} |
| 26 | |
| 27 | const char* BgmKeeper::getUserName() const { |
| 28 | if (mBgmUserInfo == nullptr) |
| 29 | return nullptr; |
| 30 | return mBgmUserInfo->name; |
| 31 | } |
| 32 | } // namespace al |
| 33 |