diff --git a/config/implemented.csv b/config/implemented.csv index 50010192..c6eba846 100644 --- a/config/implemented.csv +++ b/config/implemented.csv @@ -214,6 +214,7 @@ th06::FileSystem::WriteDataToFile th06::ItemManager::SpawnItem th06::ItemManager::OnUpdate th06::ItemManager::OnDraw +th06::ItemManager::RemoveAllItems th06::MainMenu::AddedCallback th06::MainMenu::DeletedCallback th06::MainMenu::ReleaseTitleAnm diff --git a/config/stubbed.csv b/config/stubbed.csv index 395e725d..2574ee18 100644 --- a/config/stubbed.csv +++ b/config/stubbed.csv @@ -13,7 +13,6 @@ th06::ResultScreen::RegisterChain th06::ResultScreen::ReleaseScoreDat th06::ScreenEffect::RegisterChain th06::MainMenu::SelectRelated -th06::ItemManager::RemoveAllItems th06::ReplayManager::RegisterChain th06::ReplayManager::StopRecording th06::ReplayManager::SaveReplay diff --git a/src/ItemManager.cpp b/src/ItemManager.cpp index b1ab8b2d..e8d97ee4 100644 --- a/src/ItemManager.cpp +++ b/src/ItemManager.cpp @@ -332,6 +332,23 @@ void ItemManager::OnUpdate() return; } +#pragma var_order(idx, cursor) +void ItemManager::RemoveAllItems() +{ + Item *cursor; + i32 idx; + + for (cursor = &this->items[0], idx = 0; idx < ARRAY_SIZE_SIGNED(this->items); idx += 1, cursor += 1) + { + if (!cursor->isInUse) + { + continue; + } + cursor->state = 1; + } + return; +} + #pragma var_order(itemAlpha, idx, curItem) void ItemManager::OnDraw() {