feat(glue): wire up character select background

This commit is contained in:
fallenoak 2023-02-19 21:39:21 -06:00
parent f384fce742
commit 5e3d08bf32
No known key found for this signature in database
GPG key ID: 7628F8E61AEA070D
4 changed files with 57 additions and 2 deletions

View file

@ -1,3 +1,31 @@
#include "glue/CCharacterSelection.hpp"
#include "model/CM2Shared.hpp"
#include "ui/CSimpleModelFFX.hpp"
TSGrowableArray<CharacterSelectionDisplay> CCharacterSelection::s_characterList;
CSimpleModelFFX* CCharacterSelection::s_modelFrame;
void CCharacterSelection::SetBackgroundModel(const char* modelPath) {
if (!CCharacterSelection::s_modelFrame || !modelPath || !*modelPath) {
return;
}
auto model = CCharacterSelection::s_modelFrame->m_model;
// Check if already set
if (model && !SStrCmpI(modelPath, model->m_shared->m_filePath, STORM_MAX_STR)) {
return;
}
CCharacterSelection::s_modelFrame->SetModel(modelPath);
// TODO BYTE1(CCharacterSelection::m_modelFrame->simplemodelffx_dword510[3]) = 1;
model = CCharacterSelection::s_modelFrame->m_model;
if (model) {
// TODO lighting callback + arg
model->IsDrawable(1, 1);
}
}