ksys/gdt: Implement more Manager functions

This commit is contained in:
Léo Lam
2020-11-04 12:27:38 +01:00
parent f9373cd154
commit f2a8d32f29
3 changed files with 157 additions and 27 deletions
+9 -4
View File
@@ -113,10 +113,8 @@ void Manager::init(sead::Heap* heap, sead::Framework* framework) {
shop_gamedata_info_path.format("%s/%s.byml", "GameData", "ShopGameDataInfo");
loadShopGameDataInfo(shop_gamedata_info_path);
mParam.param1 = &mFlagBuffer1;
mParam.param = &mFlagBuffer;
mParamBypassPerm.param1 = &mFlagBuffer1;
mParamBypassPerm.param = &mFlagBuffer;
mParam.setBuffers(&mFlagBuffer1, &mFlagBuffer);
mParamBypassPerm.setBuffers(&mFlagBuffer1, &mFlagBuffer);
mMethodTreeNode.method_tree_mgr = framework->getMethodTreeMgr();
mMethodTreeNode.node.setPauseFlag(sead::MethodTreeNode::cPause_None);
@@ -127,4 +125,11 @@ void Manager::init(sead::Heap* heap, sead::Framework* framework) {
mNumFlagsToReset = 0;
}
void Manager::unloadResources() {
for (s32 i = 0; i < mBgdataHandles.size(); ++i)
mBgdataHandles[i].requestUnload();
mGameDataArcHandle.requestUnload();
}
} // namespace ksys::gdt