mirror of
https://github.com/AxioDL/metaforce.git
synced 2025-08-08 11:39:06 +00:00
CMFGame: Make use of std::array where applicable
This commit is contained in:
parent
c296f0ab8f
commit
eba3270c14
@ -1,5 +1,7 @@
|
|||||||
#include "Runtime/MP1/CMFGame.hpp"
|
#include "Runtime/MP1/CMFGame.hpp"
|
||||||
|
|
||||||
|
#include <array>
|
||||||
|
|
||||||
#include "Runtime/CArchitectureQueue.hpp"
|
#include "Runtime/CArchitectureQueue.hpp"
|
||||||
#include "Runtime/MP1/CSamusHud.hpp"
|
#include "Runtime/MP1/CSamusHud.hpp"
|
||||||
#include "Runtime/MP1/MP1.hpp"
|
#include "Runtime/MP1/MP1.hpp"
|
||||||
@ -286,17 +288,19 @@ CMFGameLoader::CMFGameLoader()
|
|||||||
|
|
||||||
CMFGameLoader::~CMFGameLoader() = default;
|
CMFGameLoader::~CMFGameLoader() = default;
|
||||||
|
|
||||||
static const char* LoadDepPAKs[] = {"TestAnim", "SamusGun", "SamGunFx", nullptr};
|
|
||||||
|
|
||||||
void CMFGameLoader::MakeLoadDependencyList() {
|
void CMFGameLoader::MakeLoadDependencyList() {
|
||||||
|
static constexpr std::array loadDepPAKs{"TestAnim", "SamusGun", "SamGunFx"};
|
||||||
|
|
||||||
std::vector<SObjectTag> tags;
|
std::vector<SObjectTag> tags;
|
||||||
for (int i = 0; LoadDepPAKs[i]; ++i)
|
for (const auto pak : loadDepPAKs) {
|
||||||
g_ResFactory->GetTagListForFile(LoadDepPAKs[i], tags);
|
g_ResFactory->GetTagListForFile(pak, tags);
|
||||||
|
}
|
||||||
|
|
||||||
x1c_loadList.reserve(tags.size());
|
x1c_loadList.reserve(tags.size());
|
||||||
for (const SObjectTag& tag : tags)
|
for (const SObjectTag& tag : tags) {
|
||||||
x1c_loadList.push_back(g_SimplePool->GetObj(tag));
|
x1c_loadList.push_back(g_SimplePool->GetObj(tag));
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
CIOWin::EMessageReturn CMFGameLoader::OnMessage(const CArchitectureMessage& msg, CArchitectureQueue& queue) {
|
CIOWin::EMessageReturn CMFGameLoader::OnMessage(const CArchitectureMessage& msg, CArchitectureQueue& queue) {
|
||||||
std::shared_ptr<CWorldTransManager> wtMgr = g_GameState->GetWorldTransitionManager();
|
std::shared_ptr<CWorldTransManager> wtMgr = g_GameState->GetWorldTransitionManager();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user