diff --git a/src/glue/CCharacterSelection.cpp b/src/glue/CCharacterSelection.cpp index b25acb3..2d082e9 100644 --- a/src/glue/CCharacterSelection.cpp +++ b/src/glue/CCharacterSelection.cpp @@ -2,6 +2,7 @@ #include "client/ClientServices.hpp" #include "component/CCharacterComponent.hpp" #include "db/Db.hpp" +#include "glue/CGlueLoading.hpp" #include "glue/CGlueMgr.hpp" #include "glue/CRealmList.hpp" #include "glue/Types.hpp" @@ -169,7 +170,8 @@ void CCharacterSelection::ShowCharacter() { petModel->AttachToParent(parent, 1, nullptr, 0); } - // TODO CGlueLoading::StartLoad(&character->component, 0); + // TODO a2 may be 1 in some circumstances + CGlueLoading::StartLoad(character->component, 0); return; } diff --git a/src/glue/CGlueLoading.cpp b/src/glue/CGlueLoading.cpp new file mode 100644 index 0000000..d4b5f79 --- /dev/null +++ b/src/glue/CGlueLoading.cpp @@ -0,0 +1,21 @@ +#include "glue/CGlueLoading.hpp" +#include "component/CCharacterComponent.hpp" +#include "model/Model2.hpp" +#include "util/SFile.hpp" + +int32_t CGlueLoading::s_loadState; + +void CGlueLoading::StartLoad(CCharacterComponent* component, int32_t a2) { + if (SFile::IsStreamingTrial()) { + // TODO + + return; + } + + if (component) { + component->RenderPrep(1); + component->m_data.model->IsDrawable(1, 1); + } + + CGlueLoading::s_loadState = 3; +} diff --git a/src/glue/CGlueLoading.hpp b/src/glue/CGlueLoading.hpp new file mode 100644 index 0000000..a735a87 --- /dev/null +++ b/src/glue/CGlueLoading.hpp @@ -0,0 +1,17 @@ +#ifndef GLUE_C_GLUE_LOADING_HPP +#define GLUE_C_GLUE_LOADING_HPP + +#include + +class CCharacterComponent; + +class CGlueLoading { + public: + // Static variables + static int32_t s_loadState; + + // Static functions + static void StartLoad(CCharacterComponent* component, int32_t a2); +}; + +#endif