2023-02-11 23:35:53 -06:00
|
|
|
#include "glue/CRealmList.hpp"
|
2023-02-14 23:23:09 -06:00
|
|
|
#include "db/Db.hpp"
|
|
|
|
|
#include <storm/Memory.hpp>
|
|
|
|
|
|
|
|
|
|
TSFixedArray<RealmCategory*> CRealmList::s_categories;
|
|
|
|
|
|
|
|
|
|
void CRealmList::Initialize() {
|
|
|
|
|
CRealmList::s_categories.SetCount(g_cfg_CategoriesDB.m_numRecords);
|
|
|
|
|
|
|
|
|
|
for (int32_t i = 0; i < g_cfg_CategoriesDB.m_numRecords; i++) {
|
|
|
|
|
auto m = SMemAlloc(sizeof(RealmCategory), __FILE__, __LINE__, 0x0);
|
|
|
|
|
auto category = new (m) RealmCategory();
|
|
|
|
|
|
|
|
|
|
CRealmList::s_categories[i] = category;
|
|
|
|
|
CRealmList::s_categories[i]->m_category = g_cfg_CategoriesDB.GetRecordByIndex(i);
|
|
|
|
|
CRealmList::s_categories[i]->uint14 = 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// TODO Initialize CRealmList::s_sortCriteria
|
|
|
|
|
}
|
2023-02-11 23:35:53 -06:00
|
|
|
|
|
|
|
|
void CRealmList::UpdateList() {
|
|
|
|
|
// TODO
|
|
|
|
|
}
|