Compare commits

..

12 Commits

Author SHA1 Message Date
Christopher Leggett e88adbe672 Version Bump (#2916) 2023-05-22 21:34:18 -04:00
aMannus dddd3b14aa Add back missing Greg timestamp (#2911) 2023-05-22 10:56:44 -04:00
briaguya f34df2f064 remove what i assume to be accidentally copied stuff from a diff (#2909) 2023-05-22 09:33:31 -04:00
Rozelette f005bd3b7f add skeleton unregistration to actors that manage their own skeletons (#2908) 2023-05-22 09:20:06 -04:00
Patrick12115 7962e0e6d6 Add Scene Specific Checks to Dirt Path Fixes (#2907)
* Move from Dev to Dev-Spock

* Moved to mod.h

* Update GameInteractor.h
2023-05-21 18:12:25 -04:00
Malkierian cf711d9164 Initialize gSlotAgeReqs[SLOT_TRADE_CHILD] and gItemAgeReqs[ITEM_MASK_BUNNY] on load initialization according to gMMBunnyHood and gTimelessEquipment to prevent bunny hood from being unequipped from adult equips on first load. (#2904)
Move the code to change those values based on the child trade slot item to the selecting mask loop to not be setting them every frame just because you're in the inventory.
2023-05-21 12:13:38 -04:00
Adam Bird cf42057842 Fix: seed srand on launch and fix spoiler log for seed testing generation (#2902) 2023-05-20 16:25:29 -04:00
Malkierian 0b47a19c2c Mask Sale Fix (#2900) 2023-05-20 12:05:47 -04:00
Christopher Leggett 4d02d89e03 Fixes buying songs crash on Switch (#2899) 2023-05-20 09:24:02 -04:00
AltoXorg 30cc61abce fix search rom extension oversight (#2891)
Co-authored-by: Christopher Leggett <chris@leggett.dev>
Co-authored-by: briaguya <70942617+briaguya-ai@users.noreply.github.com>
2023-05-17 22:22:57 -04:00
Amaro Martínez b361d5ede1 Use UTF-8 for MSVC and enable visual styles for Windows (#2888)
* Add proper manifest for Windows

* MSVC: Use UTF-8 encoding compile option
2023-05-17 22:21:26 -04:00
Malkierian 099d9cd0fd Threaded save was causing issues for old oot-save.sav conversion. Added an option just for that instance to run SaveManager::SaveFileThreaded outside of a thread. Everything else still runs threaded. (#2894) 2023-05-17 15:51:17 -04:00
149 changed files with 448 additions and 85 deletions
+3 -2
View File
@@ -5,12 +5,13 @@ set(CMAKE_CXX_STANDARD 20 CACHE STRING "The C++ standard to use")
set(CMAKE_OSX_DEPLOYMENT_TARGET "10.15" CACHE STRING "Minimum OS X deployment version")
project(Ship VERSION 7.0.1 LANGUAGES C CXX)
set(PROJECT_BUILD_NAME "Spock Bravo" CACHE STRING "")
project(Ship VERSION 7.0.2 LANGUAGES C CXX)
set(PROJECT_BUILD_NAME "Spock Charlie" CACHE STRING "")
set(PROJECT_TEAM "github.com/harbourmasters" CACHE STRING "")
set_property(DIRECTORY ${CMAKE_SOURCE_DIR} PROPERTY VS_STARTUP_PROJECT soh)
add_compile_options($<$<CXX_COMPILER_ID:MSVC>:/MP>)
add_compile_options($<$<CXX_COMPILER_ID:MSVC>:/utf-8>)
if (CMAKE_SYSTEM_NAME MATCHES "Windows|Linux")
if(NOT DEFINED BUILD_CROWD_CONTROL)
+2
View File
@@ -500,6 +500,7 @@ if(MSVC)
/INCREMENTAL:NO;
/FORCE:MULTIPLE
>
/MANIFEST:NO;
/DEBUG;
/SUBSYSTEM:WINDOWS
)
@@ -514,6 +515,7 @@ if(MSVC)
/INCREMENTAL:NO;
/FORCE:MULTIPLE
>
/MANIFEST:NO;
/DEBUG;
/SUBSYSTEM:WINDOWS
)
+7
View File
@@ -91,6 +91,13 @@ END
// remains consistent on all systems.
IDI_ICON1 ICON "SHIPOFHARKINIAN.ico"
/////////////////////////////////////////////////////////////////////////////
//
// RT_MANIFEST
//
1 RT_MANIFEST "SHIPOFHARKINIAN.manifest"
#endif // English (United States) resources
/////////////////////////////////////////////////////////////////////////////
+31
View File
@@ -0,0 +1,31 @@
<?xml version='1.0' encoding='UTF-8' standalone='yes'?>
<assembly xmlns='urn:schemas-microsoft-com:asm.v1' manifestVersion='1.0'>
<dependency>
<dependentAssembly>
<assemblyIdentity
type="win32"
name="Microsoft.Windows.Common-Controls"
version="6.0.0.0"
publicKeyToken="6595b64144ccf1df"
language="*"
processorArchitecture="*" />
</dependentAssembly>
</dependency>
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
<security>
<requestedPrivileges>
<requestedExecutionLevel level='asInvoker' uiAccess='false' />
</requestedPrivileges>
</security>
</trustInfo>
<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
<application>
<!-- Windows 8 -->
<supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}" />
<!-- Windows 8.1 -->
<supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}" />
<!-- Windows 10 -->
<supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}" />
</application>
</compatibility>
</assembly>
+1
View File
@@ -103,6 +103,7 @@ extern "C"
extern u32 gGsFlagsShifts[4];
extern void* gItemIcons[0x82];
extern u8 gItemAgeReqs[];
extern u8 gSlotAgeReqs[];
extern u8 gItemSlots[56];
extern void (*gSceneCmdHandlers[SCENE_CMD_ID_MAX])(PlayState*, SceneCmd*);
extern s16 gLinkObjectIds[2];
@@ -267,10 +267,10 @@ namespace GameControlEditor {
UIWidgets::PaddedEnhancementCheckbox("Invert Camera Y Axis", "gInvertYAxis", true, true, false, "", UIWidgets::CheckboxGraphics::Cross, true);
DrawHelpIcon("Inverts the Camera Y Axis in:\n-Free camera");
UIWidgets::Spacer(0);
+ UIWidgets::PaddedEnhancementSliderFloat("Third-Person Horizontal Sensitivity: %d %%", "##ThirdPersonSensitivity Horizontal",
+ "gThirdPersonCameraSensitivityX", 0.01f, 5.0f, "", 1.0f, true, true, false, true);
+ UIWidgets::PaddedEnhancementSliderFloat("Third-Person Vertical Sensitivity: %d %%", "##ThirdPersonSensitivity Vertical",
+ "gThirdPersonCameraSensitivityY", 0.01f, 5.0f, "", 1.0f, true, true, false, true);
UIWidgets::PaddedEnhancementSliderFloat("Third-Person Horizontal Sensitivity: %d %%", "##ThirdPersonSensitivity Horizontal",
"gThirdPersonCameraSensitivityX", 0.01f, 5.0f, "", 1.0f, true, true, false, true);
UIWidgets::PaddedEnhancementSliderFloat("Third-Person Vertical Sensitivity: %d %%", "##ThirdPersonSensitivity Vertical",
"gThirdPersonCameraSensitivityY", 0.01f, 5.0f, "", 1.0f, true, true, false, true);
UIWidgets::PaddedEnhancementSliderInt("Camera Distance: %d", "##CamDist",
"gFreeCameraDistMax", 100, 900, "", 185, true, false, true);
UIWidgets::PaddedEnhancementSliderInt("Camera Transition Speed: %d", "##CamTranSpeed",
@@ -1,40 +1,46 @@
#include "GameInteractor.h"
#ifdef __cplusplus
extern "C" {
#endif
// MARK: - Gameplay
extern "C" void GameInteractor_ExecuteOnLoadGame(int32_t fileNum);
extern "C" void GameInteractor_ExecuteOnExitGame(int32_t fileNum);
extern "C" void GameInteractor_ExecuteOnGameFrameUpdate();
extern "C" void GameInteractor_ExecuteOnItemReceiveHooks(GetItemEntry itemEntry);
extern "C" void GameInteractor_ExecuteOnSaleEndHooks(GetItemEntry itemEntry);
extern "C" void GameInteractor_ExecuteOnTransitionEndHooks(int16_t sceneNum);
extern "C" void GameInteractor_ExecuteOnSceneInit(int16_t sceneNum);
extern "C" void GameInteractor_ExecuteOnSceneSpawnActors();
extern "C" void GameInteractor_ExecuteOnPlayerUpdate();
extern "C" void GameInteractor_ExecuteOnOcarinaSongAction();
extern "C" void GameInteractor_ExecuteOnActorUpdate(void* actor);
extern "C" void GameInteractor_ExecuteOnPlayerBonk();
extern "C" void GameInteractor_ExecuteOnOcarinaSongAction();
void GameInteractor_ExecuteOnLoadGame(int32_t fileNum);
void GameInteractor_ExecuteOnExitGame(int32_t fileNum);
void GameInteractor_ExecuteOnGameFrameUpdate();
void GameInteractor_ExecuteOnItemReceiveHooks(GetItemEntry itemEntry);
void GameInteractor_ExecuteOnSaleEndHooks(GetItemEntry itemEntry);
void GameInteractor_ExecuteOnTransitionEndHooks(int16_t sceneNum);
void GameInteractor_ExecuteOnSceneInit(int16_t sceneNum);
void GameInteractor_ExecuteOnSceneSpawnActors();
void GameInteractor_ExecuteOnPlayerUpdate();
void GameInteractor_ExecuteOnOcarinaSongAction();
void GameInteractor_ExecuteOnActorUpdate(void* actor);
void GameInteractor_ExecuteOnPlayerBonk();
void GameInteractor_ExecuteOnOcarinaSongAction();
// MARK: - Save Files
extern "C" void GameInteractor_ExecuteOnSaveFile(int32_t fileNum);
extern "C" void GameInteractor_ExecuteOnLoadFile(int32_t fileNum);
extern "C" void GameInteractor_ExecuteOnDeleteFile(int32_t fileNum);
void GameInteractor_ExecuteOnSaveFile(int32_t fileNum);
void GameInteractor_ExecuteOnLoadFile(int32_t fileNum);
void GameInteractor_ExecuteOnDeleteFile(int32_t fileNum);
// MARK: - Dialog
extern "C" void GameInteractor_ExecuteOnDialogMessage();
extern "C" void GameInteractor_ExecuteOnPresentTitleCard();
extern "C" void GameInteractor_ExecuteOnInterfaceUpdate();
extern "C" void GameInteractor_ExecuteOnKaleidoscopeUpdate(int16_t inDungeonScene);
void GameInteractor_ExecuteOnDialogMessage();
void GameInteractor_ExecuteOnPresentTitleCard();
void GameInteractor_ExecuteOnInterfaceUpdate();
void GameInteractor_ExecuteOnKaleidoscopeUpdate(int16_t inDungeonScene);
// MARK: - Main Menu
extern "C" void GameInteractor_ExecuteOnPresentFileSelect();
extern "C" void GameInteractor_ExecuteOnUpdateFileSelectSelection(uint16_t optionIndex);
extern "C" void GameInteractor_ExecuteOnUpdateFileCopySelection(uint16_t optionIndex);
extern "C" void GameInteractor_ExecuteOnUpdateFileCopyConfirmationSelection(uint16_t optionIndex);
extern "C" void GameInteractor_ExecuteOnUpdateFileEraseSelection(uint16_t optionIndex);
extern "C" void GameInteractor_ExecuteOnUpdateFileEraseConfirmationSelection(uint16_t optionIndex);
extern "C" void GameInteractor_ExecuteOnUpdateFileAudioSelection(uint8_t optionIndex);
extern "C" void GameInteractor_ExecuteOnUpdateFileTargetSelection(uint8_t optionIndex);
void GameInteractor_ExecuteOnPresentFileSelect();
void GameInteractor_ExecuteOnUpdateFileSelectSelection(uint16_t optionIndex);
void GameInteractor_ExecuteOnUpdateFileCopySelection(uint16_t optionIndex);
void GameInteractor_ExecuteOnUpdateFileCopyConfirmationSelection(uint16_t optionIndex);
void GameInteractor_ExecuteOnUpdateFileEraseSelection(uint16_t optionIndex);
void GameInteractor_ExecuteOnUpdateFileEraseConfirmationSelection(uint16_t optionIndex);
void GameInteractor_ExecuteOnUpdateFileAudioSelection(uint8_t optionIndex);
void GameInteractor_ExecuteOnUpdateFileTargetSelection(uint8_t optionIndex);
// MARK: - Game
extern "C" void GameInteractor_ExecuteOnSetGameLanguage();
void GameInteractor_ExecuteOnSetGameLanguage();
#ifdef __cplusplus
}
#endif
+1
View File
@@ -618,6 +618,7 @@ void SetupDisplayNames() {
strcpy(itemTimestampDisplayName[TIMESTAMP_DEFEAT_TWINROVA], "Twinrova Defeated: ");
strcpy(itemTimestampDisplayName[TIMESTAMP_DEFEAT_GANONDORF], "Ganondorf Defeated: ");
strcpy(itemTimestampDisplayName[TIMESTAMP_DEFEAT_GANON], "Ganon Defeated: ");
strcpy(itemTimestampDisplayName[TIMESTAMP_FOUND_GREG], "Greg Found: ");
}
void SetupDisplayColors() {
+19
View File
@@ -486,6 +486,24 @@ void RegisterBonkDamage() {
});
}
void UpdateDirtPathFixState(int32_t sceneNum) {
switch (sceneNum) {
case SCENE_SPOT00:
case SCENE_SPOT04:
case SCENE_SPOT15:
CVarSetInteger("gDirtPathFix", CVarGetInteger("gSceneSpecificDirtPathFix", 0));
return;
default:
CVarClear("gDirtPathFix");
}
}
void RegisterMenuPathFix() {
GameInteractor::Instance->RegisterGameHook<GameInteractor::OnTransitionEnd>([](int32_t sceneNum) {
UpdateDirtPathFixState(sceneNum);
});
}
void InitMods() {
RegisterTTS();
RegisterInfiniteMoney();
@@ -504,4 +522,5 @@ void InitMods() {
RegisterRupeeDash();
RegisterHyperBosses();
RegisterBonkDamage();
RegisterMenuPathFix();
}
+3
View File
@@ -1,3 +1,5 @@
#include <stdint.h>
#ifndef MODS_H
#define MODS_H
@@ -5,6 +7,7 @@
extern "C" {
#endif
void UpdateDirtPathFixState(int32_t sceneNum);
void InitMods();
#ifdef __cplusplus
@@ -518,7 +518,7 @@ std::string GenerateRandomizer(std::unordered_map<RandomizerSettingKey, uint8_t>
srand(time(NULL));
// if a blank seed was entered, make a random one
if (seedString.empty()) {
Settings::seed = rand() & 0xFFFFFFFF;
seedString = std::to_string(rand() % 0xFFFFFFFF);
} else if (seedString.rfind("seed_testing_count", 0) == 0 && seedString.length() > 18) {
int count;
try {
@@ -530,17 +530,12 @@ std::string GenerateRandomizer(std::unordered_map<RandomizerSettingKey, uint8_t>
}
Playthrough::Playthrough_Repeat(cvarSettings, excludedLocations, count);
return "";
} else {
try {
uint32_t seedHash = boost::hash_32<std::string>{}(seedString);
int seed = seedHash & 0xFFFFFFFF;
Settings::seed = seed;
Settings::seedString = seedString;
} catch (...) {
return "";
}
}
Settings::seedString = seedString;
uint32_t seedHash = boost::hash_32<std::string>{}(Settings::seedString);
Settings::seed = seedHash & 0xFFFFFFFF;
int ret = Playthrough::Playthrough_Init(Settings::seed, cvarSettings, excludedLocations);
if (ret < 0) {
if (ret == -1) { // Failed to generate after 5 tries
@@ -87,8 +87,9 @@ int Playthrough_Repeat(std::unordered_map<RandomizerSettingKey, uint8_t> cvarSet
printf("\x1b[0;0HGENERATING %d SEEDS", count);
uint32_t repeatedSeed = 0;
for (int i = 0; i < count; i++) {
repeatedSeed = rand() % 0xFFFFFFFF;
Settings::seed = repeatedSeed;
Settings::seedString = std::to_string(rand() % 0xFFFFFFFF);
repeatedSeed = boost::hash_32<std::string>{}(Settings::seedString);
Settings::seed = repeatedSeed % 0xFFFFFFFF;
CitraPrint("testing seed: " + std::to_string(Settings::seed));
ClearProgress();
Playthrough_Init(Settings::seed, cvarSettings, excludedLocations);
@@ -3191,8 +3191,8 @@ void DrawRandoEditor(bool& open) {
}
UIWidgets::Spacer(0);
if (ImGui::Button("Generate Randomizer")) {
GenerateRandomizer(CVarGetInteger("gRandoManualSeedEntry", 0) ? seedString : std::to_string(rand() & 0xFFFFFFFF).c_str());
if (ImGui::Button("Generate Randomizer")) {
GenerateRandomizer(CVarGetInteger("gRandoManualSeedEntry", 0) ? seedString : "");
}
UIWidgets::Spacer(0);
+3 -3
View File
@@ -222,9 +222,9 @@ void Extractor::GetRoms(std::vector<std::string>& roms) {
if (S_ISREG(path.st_mode)) {
// Get the position of the extension character.
char* ext = strchr(dir->d_name, '.');
if (ext != NULL && (strcmp(ext, ".z64") == 0) && (strcmp(ext, ".n64") == 0) &&
(strcmp(ext, ".v64") == 0)) {
char* ext = strrchr(dir->d_name, '.');
if (ext != NULL && (strcmp(ext, ".z64") == 0 || strcmp(ext, ".n64") == 0 ||
strcmp(ext, ".v64") == 0)) {
roms.push_back(dir->d_name);
}
}
+6 -1
View File
@@ -29,6 +29,7 @@
#include "soh/SaveManager.h"
#include "OTRGlobals.h"
#include "soh/Enhancements/presets.h"
#include "soh/Enhancements/mods.h"
#include "soh/resource/type/Skeleton.h"
#ifdef ENABLE_CROWD_CONTROL
@@ -46,6 +47,8 @@ extern "C" {
void disableBetaQuest() { isBetaQuestEnabled = false; }
}
extern "C" PlayState* gPlayState;
enum SeqPlayers {
/* 0 */ SEQ_BGM_MAIN,
/* 1 */ SEQ_FANFARE,
@@ -860,7 +863,9 @@ namespace GameMenuBar {
ImGui::EndMenu();
}
UIWidgets::PaddedText("Fix Vanishing Paths", true, false);
UIWidgets::EnhancementCombobox("gDirtPathFix", zFightingOptions, 0);
if (UIWidgets::EnhancementCombobox("gSceneSpecificDirtPathFix", zFightingOptions, 0) && gPlayState != NULL) {
UpdateDirtPathFixState(gPlayState->sceneNum);
}
UIWidgets::Tooltip("Disabled: Paths vanish more the higher the resolution (Z-fighting is based on resolution)\n"
"Consistent: Certain paths vanish the same way in all resolutions\n"
"No Vanish: Paths do not vanish, Link seems to sink in to some paths\n"
+5 -2
View File
@@ -688,9 +688,10 @@ std::unordered_map<uint32_t, uint32_t> ItemIDtoGetItemID{
{ ITEM_WEIRD_EGG, GI_WEIRD_EGG }
};
extern "C" uint32_t GetGIID(uint32_t itemID) {
if (ItemIDtoGetItemID.contains(itemID))
extern "C" int32_t GetGIID(uint32_t itemID) {
if (ItemIDtoGetItemID.contains(itemID)) {
return ItemIDtoGetItemID.at(itemID);
}
return -1;
}
@@ -781,6 +782,8 @@ extern "C" void InitOTR() {
} else {
CVarClear("gLetItSnow");
}
srand(now);
#ifdef ENABLE_CROWD_CONTROL
CrowdControl::Instance = new CrowdControl();
CrowdControl::Instance->Init();
+1 -1
View File
@@ -145,7 +145,7 @@ void EntranceTracker_SetLastEntranceOverride(s16 entranceIndex);
void Gfx_RegisterBlendedTexture(const char* name, u8* mask, u8* replacement);
void SaveManager_ThreadPoolWait();
uint32_t GetGIID(uint32_t itemID);
int32_t GetGIID(uint32_t itemID);
#endif
#endif
+8 -4
View File
@@ -754,14 +754,18 @@ void SaveManager::SaveFileThreaded(int fileNum, SaveContext* saveContext) {
GameInteractor::Instance->ExecuteHooks<GameInteractor::OnSaveFile>(fileNum);
}
void SaveManager::SaveFile(int fileNum) {
void SaveManager::SaveFile(int fileNum, bool threaded) {
if (fileNum == 0xFF) {
return;
}
// Can't think of any time the promise would be needed, so use push_task instead of submit
auto saveContext = new SaveContext;
memcpy(saveContext, &gSaveContext, sizeof(gSaveContext));
smThreadPool->push_task_back(&SaveManager::SaveFileThreaded, this, fileNum, saveContext);
if (threaded) {
smThreadPool->push_task_back(&SaveManager::SaveFileThreaded, this, fileNum, saveContext);
} else {
SaveFileThreaded(fileNum, saveContext);
}
}
void SaveManager::SaveGlobal() {
@@ -2135,7 +2139,7 @@ void SaveManager::ConvertFromUnversioned() {
static SaveContext saveContextSave = gSaveContext;
InitFile(false);
CopyV0Save(*file, gSaveContext);
SaveFile(fileNum);
SaveFile(fileNum, false);
InitMeta(fileNum);
gSaveContext = saveContextSave;
}
@@ -2156,7 +2160,7 @@ extern "C" void Save_InitFile(int isDebug) {
}
extern "C" void Save_SaveFile(void) {
SaveManager::Instance->SaveFile(gSaveContext.fileNum);
SaveManager::Instance->SaveFile(gSaveContext.fileNum, true);
}
extern "C" void Save_SaveGlobal(void) {
+1 -1
View File
@@ -52,7 +52,7 @@ public:
void Init();
void InitFile(bool isDebug);
void SaveFile(int fileNum);
void SaveFile(int fileNum, bool threaded);
void SaveGlobal();
void LoadFile(int fileNum);
bool SaveFile_Exist(int fileNum);
+14 -3
View File
@@ -15,6 +15,7 @@
#endif
#include "soh/Enhancements/game-interactor/GameInteractor.h"
#include "soh/Enhancements/game-interactor/GameInteractor_Hooks.h"
#define DO_ACTION_TEX_WIDTH() 48
@@ -1706,7 +1707,12 @@ u8 Return_Item_Entry(GetItemEntry itemEntry, ItemID returnItem ) {
// Processes Item_Give returns
u8 Return_Item(u8 itemID, ModIndex modId, ItemID returnItem) {
uint32_t get = GetGIID(itemID);
// ITEM_SOLD_OUT doesn't have an ItemTable entry, so pass custom entry instead
if (itemID == ITEM_SOLD_OUT) {
GetItemEntry gie = { ITEM_SOLD_OUT, 0, 0, 0, 0, 0, 0, 0, false, ITEM_FROM_NPC, ITEM_CATEGORY_LESSER, NULL };
return Return_Item_Entry(gie, returnItem);
}
int32_t get = GetGIID(itemID);
if (get == -1) {
modId = MOD_RANDOMIZER;
get = itemID;
@@ -6158,8 +6164,13 @@ void Interface_Update(PlayState* play) {
u16 tempSaleMod = gSaveContext.pendingSaleMod;
gSaveContext.pendingSale = ITEM_NONE;
gSaveContext.pendingSaleMod = MOD_NONE;
if (tempSaleMod == 0) {
tempSaleItem = GetGIID(tempSaleItem);
if (tempSaleMod == MOD_NONE) {
s16 giid = GetGIID(tempSaleItem);
if (giid == -1) {
tempSaleMod = MOD_RANDOMIZER;
} else {
tempSaleItem = giid;
}
}
GameInteractor_ExecuteOnSaleEndHooks(ItemTable_RetrieveEntry(tempSaleMod, tempSaleItem));
}
+9
View File
@@ -604,6 +604,15 @@ void Play_Init(GameState* thisx) {
(s32)(zAllocAligned + zAllocSize) - (s32)(zAllocAligned - zAlloc));
Fault_AddClient(&D_801614B8, ZeldaArena_Display, NULL, NULL);
// In order to keep bunny hood equipped on first load, we need to pre-set the age reqs for the item and slot
if (CVarGetInteger("gMMBunnyHood", 0) || CVarGetInteger("gTimelessEquipment", 0)) {
gItemAgeReqs[ITEM_MASK_BUNNY] = 9;
if(INV_CONTENT(ITEM_TRADE_CHILD) == ITEM_MASK_BUNNY)
gSlotAgeReqs[SLOT_TRADE_CHILD] = 9;
}
else {
gItemAgeReqs[ITEM_MASK_BUNNY] = gSlotAgeReqs[SLOT_TRADE_CHILD] = 1;
}
func_800304DC(play, &play->actorCtx, play->linkActorEntry);
while (!func_800973FC(play, &play->roomCtx)) {
@@ -109,7 +109,9 @@ void BgDyYoseizo_Init(Actor* thisx, PlayState* play2) {
this->actionFunc = BgDyYoseizo_CheckMagicAcquired;
}
void BgDyYoseizo_Destroy(Actor* this, PlayState* play) {
void BgDyYoseizo_Destroy(Actor* thisx, PlayState* play) {
BgDyYoseizo* this = (BgDyYoseizo*)thisx;
ResourceMgr_UnregisterSkeleton(&this->skelAnime);
}
static Color_RGB8 sParticlePrimColors[] = {
@@ -346,6 +346,8 @@ void BossSst_Destroy(Actor* thisx, PlayState* play) {
Collider_DestroyJntSph(play, &this->colliderJntSph);
Collider_DestroyCylinder(play, &this->colliderCyl);
Audio_StopSfxByPos(&this->center);
ResourceMgr_UnregisterSkeleton(&this->skelAnime);
}
void BossSst_HeadSetupLurk(BossSst* this) {
@@ -24,6 +24,9 @@ void DemoIk_Type1Draw(DemoIk* this, PlayState* play);
void DemoIk_Type2Draw(DemoIk* this, PlayState* play);
void DemoIk_Destroy(Actor* thisx, PlayState* play) {
DemoIk* this = (DemoIk*)thisx;
ResourceMgr_UnregisterSkeleton(&this->skelAnime);
}
void DemoIk_BgCheck(DemoIk* this, PlayState* play) {
@@ -1163,7 +1163,10 @@ void DemoIm_Init(Actor* thisx, PlayState* play) {
}
void DemoIm_Destroy(Actor* thisx, PlayState* play) {
DemoIm* this = (DemoIm*)thisx;
DemoIm_DestroyCollider(thisx, play);
ResourceMgr_UnregisterSkeleton(&this->skelAnime);
}
s32 DemoIm_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, void* thisx) {
@@ -203,6 +203,8 @@ void DoorKiller_Destroy(Actor* thisx, PlayState* play) {
if ((thisx->params & 0xFF) == DOOR_KILLER_DOOR) {
Collider_DestroyCylinder(play, &this->colliderCylinder);
Collider_DestroyJntSph(play, &this->colliderJntSph);
ResourceMgr_UnregisterSkeleton(&this->skelAnime);
}
}
@@ -97,7 +97,16 @@ void DoorWarp1_Destroy(Actor* thisx, PlayState* play) {
play->envCtx.adjAmbientColor[i] = play->envCtx.adjFogColor[i] = play->envCtx.adjLight1Color[i] =
0;
}
//! @bug SkelAnime_Free is not called for crystal variants
switch (this->actor.params) {
case WARP_DUNGEON_ADULT:
case WARP_BLUE_CRYSTAL:
case WARP_PURPLE_CRYSTAL:
SkelAnime_Free(&this->skelAnime, play);
break;
default:
break;
}
}
void DoorWarp1_SetupWarp(DoorWarp1* this, PlayState* play) {
@@ -249,6 +249,8 @@ void EnAm_Destroy(Actor* thisx, PlayState* play) {
Collider_DestroyCylinder(play, &this->hurtCollider);
Collider_DestroyCylinder(play, &this->blockCollider);
//! @bug Quad collider is not destroyed (though destroy doesnt really do anything anyway)
ResourceMgr_UnregisterSkeleton(&this->skelAnime);
}
void EnAm_SpawnEffects(EnAm* this, PlayState* play) {
@@ -95,6 +95,8 @@ void EnAni_Destroy(Actor* thisx, PlayState* play) {
EnAni* this = (EnAni*)thisx;
Collider_DestroyCylinder(play, &this->collider);
ResourceMgr_UnregisterSkeleton(&this->skelAnime);
}
s32 EnAni_SetText(EnAni* this, PlayState* play, u16 textId) {
@@ -167,6 +167,8 @@ void EnAnubice_Destroy(Actor* thisx, PlayState* play) {
tag->anubis = NULL;
}
}
ResourceMgr_UnregisterSkeleton(&this->skelAnime);
}
void EnAnubice_FindFlameCircles(EnAnubice* this, PlayState* play) {
@@ -68,6 +68,8 @@ void EnAttackNiw_Destroy(Actor* thisx, PlayState* play) {
cucco->unk_296--;
}
}
ResourceMgr_UnregisterSkeleton(&this->skelAnime);
}
void func_809B5268(EnAttackNiw* this, PlayState* play, s16 arg2) {
@@ -403,6 +403,8 @@ void EnBb_Destroy(Actor* thisx, PlayState* play) {
EnBb* this = (EnBb*)thisx;
Collider_DestroyJntSph(play, &this->collider);
ResourceMgr_UnregisterSkeleton(&this->skelAnime);
}
void EnBb_SetupFlameTrail(EnBb* this) {
@@ -196,6 +196,8 @@ void EnBigokuta_Destroy(Actor* thisx, PlayState* play) {
for (i = 0; i < ARRAY_COUNT(this->cylinder); i++) {
Collider_DestroyCylinder(play, &this->cylinder[i]);
}
ResourceMgr_UnregisterSkeleton(&this->skelAnime);
}
void func_809BCE3C(EnBigokuta* this) {
@@ -136,6 +136,8 @@ void EnBili_Destroy(Actor* thisx, PlayState* play) {
EnBili* this = (EnBili*)thisx;
Collider_DestroyCylinder(play, &this->collider);
ResourceMgr_UnregisterSkeleton(&this->skelAnime);
}
// Setup Action Functions
@@ -62,6 +62,9 @@ void EnBird_Init(Actor* thisx, PlayState* play) {
}
void EnBird_Destroy(Actor* thisx, PlayState* play) {
EnBird* this = (EnBird*)thisx;
SkelAnime_Free(&this->skelAnime, play);
}
void func_809C1CAC(EnBird* this, s16 params) {
@@ -89,6 +89,9 @@ void EnBomBowlMan_Init(Actor* thisx, PlayState* play2) {
}
void EnBomBowlMan_Destroy(Actor* thisx, PlayState* play) {
EnBomBowlMan* this = (EnBomBowlMan*)thisx;
ResourceMgr_UnregisterSkeleton(&this->skelAnime);
}
void EnBomBowMan_SetupWaitAsleep(EnBomBowlMan* this, PlayState* play) {
@@ -208,6 +208,8 @@ void EnBox_Destroy(Actor* thisx, PlayState* play) {
EnBox* this = (EnBox*)thisx;
DynaPoly_DeleteBgActor(play, &play->colCtx.dyna, this->dyna.bgId);
ResourceMgr_UnregisterSkeleton(&this->skelanime);
}
void EnBox_RandomDustKinematic(EnBox* this, Vec3f* pos, Vec3f* velocity, Vec3f* accel) {
@@ -102,6 +102,8 @@ void EnBrob_Destroy(Actor* thisx, PlayState* play) {
DynaPoly_DeleteBgActor(play, &play->colCtx.dyna, this->dyna.bgId);
Collider_DestroyCylinder(play, &this->colliders[0]);
Collider_DestroyCylinder(play, &this->colliders[1]);
ResourceMgr_UnregisterSkeleton(&this->skelAnime);
}
void func_809CADDC(EnBrob* this, PlayState* play) {
@@ -180,6 +180,8 @@ void EnButte_Destroy(Actor* thisx, PlayState* play2) {
EnButte* this = (EnButte*)thisx;
Collider_DestroyJntSph(play, &this->collider);
ResourceMgr_UnregisterSkeleton(&this->skelAnime);
}
void func_809CD56C(EnButte* this) {
@@ -161,6 +161,8 @@ void EnBw_Destroy(Actor* thisx, PlayState* play) {
Collider_DestroyCylinder(play, &this->collider1);
Collider_DestroyCylinder(play, &this->collider2);
ResourceMgr_UnregisterSkeleton(&this->skelAnime);
}
void func_809CE884(EnBw* this, PlayState* play) {
@@ -162,6 +162,8 @@ void EnCow_Destroy(Actor* thisx, PlayState* play) {
Collider_DestroyCylinder(play, &this->colliders[0]);
Collider_DestroyCylinder(play, &this->colliders[1]);
}
ResourceMgr_UnregisterSkeleton(&this->skelAnime);
}
void func_809DF494(EnCow* this, PlayState* play) {
@@ -124,6 +124,8 @@ void EnCrow_Destroy(Actor* thisx, PlayState* play) {
EnCrow* this = (EnCrow*)thisx;
Collider_DestroyJntSph(play, &this->collider);
ResourceMgr_UnregisterSkeleton(&this->skelAnime);
}
// Setup Action functions
@@ -161,6 +161,8 @@ void EnCs_Destroy(Actor* thisx, PlayState* play) {
EnCs* this = (EnCs*)thisx;
Collider_DestroyCylinder(play, &this->collider);
ResourceMgr_UnregisterSkeleton(&this->skelAnime);
}
s32 EnCs_GetTalkState(EnCs* this, PlayState* play) {
@@ -219,6 +219,8 @@ void EnDaiku_Destroy(Actor* thisx, PlayState* play) {
EnDaiku* this = (EnDaiku*)thisx;
Collider_DestroyCylinder(play, &this->collider);
ResourceMgr_UnregisterSkeleton(&this->skelAnime);
}
s32 EnDaiku_UpdateTalking(EnDaiku* this, PlayState* play) {
@@ -208,6 +208,8 @@ void EnDaikuKakariko_Destroy(Actor* thisx, PlayState* play) {
EnDaikuKakariko* this = (EnDaikuKakariko*)thisx;
Collider_DestroyCylinder(play, &this->collider);
ResourceMgr_UnregisterSkeleton(&this->skelAnime);
}
s32 EnDaikuKakariko_GetTalkState(EnDaikuKakariko* this, PlayState* play) {
@@ -278,6 +278,8 @@ void EnDekubaba_Destroy(Actor* thisx, PlayState* play) {
EnDekubaba* this = (EnDekubaba*)thisx;
Collider_DestroyJntSph(play, &this->collider);
ResourceMgr_UnregisterSkeleton(&this->skelAnime);
}
void EnDekubaba_DisableHitboxes(EnDekubaba* this) {
@@ -136,6 +136,8 @@ void EnDekunuts_Destroy(Actor* thisx, PlayState* play) {
if (this->actor.params != DEKUNUTS_FLOWER) {
Collider_DestroyCylinder(play, &this->collider);
ResourceMgr_UnregisterSkeleton(&this->skelAnime);
}
}
@@ -164,6 +164,8 @@ void EnDh_Destroy(Actor* thisx, PlayState* play) {
func_800F5B58();
Collider_DestroyCylinder(play, &this->collider1);
Collider_DestroyJntSph(play, &this->collider2);
ResourceMgr_UnregisterSkeleton(&this->skelAnime);
}
void EnDh_SpawnDebris(PlayState* play, EnDh* this, Vec3f* spawnPos, f32 spread, s32 arg4, f32 accelXZ,
@@ -177,6 +177,8 @@ void EnDha_Destroy(Actor* thisx, PlayState* play) {
EnDha* this = (EnDha*)thisx;
Collider_DestroyJntSph(play, &this->collider);
ResourceMgr_UnregisterSkeleton(&this->skelAnime);
}
void EnDha_SetupWait(EnDha* this) {
@@ -108,6 +108,8 @@ void EnDivingGame_Destroy(Actor* thisx, PlayState* play) {
gSaveContext.timer1State = 0;
}
Collider_DestroyCylinder(play, &this->collider);
ResourceMgr_UnregisterSkeleton(&this->skelAnime);
}
void EnDivingGame_SpawnRuppy(EnDivingGame* this, PlayState* play) {
@@ -200,6 +200,8 @@ void EnDns_Destroy(Actor* thisx, PlayState* play) {
EnDns* this = (EnDns*)thisx;
Collider_DestroyCylinder(play, &this->collider);
ResourceMgr_UnregisterSkeleton(&this->skelAnime);
}
void EnDns_ChangeAnim(EnDns* this, u8 index) {
@@ -96,6 +96,8 @@ void EnDntJiji_Destroy(Actor* thisx, PlayState* play) {
EnDntJiji* this = (EnDntJiji*)thisx;
Collider_DestroyCylinder(play, &this->collider);
ResourceMgr_UnregisterSkeleton(&this->skelAnime);
}
void EnDntJiji_SetFlower(EnDntJiji* this, PlayState* play) {
@@ -167,6 +167,8 @@ void EnDntNomal_Destroy(Actor* thisx, PlayState* play) {
} else {
Collider_DestroyCylinder(play, &this->bodyCyl);
}
ResourceMgr_UnregisterSkeleton(&this->skelAnime);
}
void EnDntNomal_WaitForObject(EnDntNomal* this, PlayState* play) {
@@ -88,6 +88,8 @@ void EnDodojr_Destroy(Actor* thisx, PlayState* play) {
EnDodojr* this = (EnDodojr*)thisx;
Collider_DestroyCylinder(play, &this->collider);
ResourceMgr_UnregisterSkeleton(&this->skelAnime);
}
void func_809F64D0(EnDodojr* this) {
@@ -353,6 +353,8 @@ void EnDodongo_Destroy(Actor* thisx, PlayState* play) {
Collider_DestroyTris(play, &this->colliderHard);
Collider_DestroyJntSph(play, &this->colliderBody);
Collider_DestroyQuad(play, &this->colliderAT);
ResourceMgr_UnregisterSkeleton(&this->skelAnime);
}
void EnDodongo_SetupIdle(EnDodongo* this) {
@@ -300,6 +300,8 @@ void EnDog_Init(Actor* thisx, PlayState* play) {
void EnDog_Destroy(Actor* thisx, PlayState* play) {
EnDog* this = (EnDog*)thisx;
Collider_DestroyCylinder(play, &this->collider);
ResourceMgr_UnregisterSkeleton(&this->skelAnime);
}
void EnDog_FollowPath(EnDog* this, PlayState* play) {
@@ -143,6 +143,8 @@ void EnDoor_Destroy(Actor* thisx, PlayState* play) {
if (transitionEntry->id < 0) {
transitionEntry->id = -transitionEntry->id;
}
ResourceMgr_UnregisterSkeleton(&this->skelAnime);
}
void EnDoor_SetupType(EnDoor* this, PlayState* play) {
@@ -50,6 +50,9 @@ void EnDs_Init(Actor* thisx, PlayState* play) {
}
void EnDs_Destroy(Actor* thisx, PlayState* play) {
EnDs* this = (EnDs*)thisx;
ResourceMgr_UnregisterSkeleton(&this->skelAnime);
}
void EnDs_Talk(EnDs* this, PlayState* play) {
@@ -171,6 +171,8 @@ void EnEiyer_Init(Actor* thisx, PlayState* play) {
void EnEiyer_Destroy(Actor* thisx, PlayState* play) {
EnEiyer* this = (EnEiyer*)thisx;
Collider_DestroyCylinder(play, &this->collider);
ResourceMgr_UnregisterSkeleton(&this->skelanime);
}
void EnEiyer_RotateAroundHome(EnEiyer* this) {
@@ -437,6 +437,8 @@ void EnElf_Destroy(Actor* thisx, PlayState* play) {
LightContext_RemoveLight(play, &play->lightCtx, this->lightNodeGlow);
LightContext_RemoveLight(play, &play->lightCtx, this->lightNodeNoGlow);
ResourceMgr_UnregisterSkeleton(&this->skelAnime);
}
void func_80A02A20(EnElf* this, PlayState* play) {
@@ -472,6 +472,8 @@ void EnFd_Destroy(Actor* thisx, PlayState* play) {
EnFd* this = (EnFd*)thisx;
Collider_DestroyJntSph(play, &this->collider);
ResourceMgr_UnregisterSkeleton(&this->skelAnime);
}
void EnFd_Reappear(EnFd* this, PlayState* play) {
@@ -198,6 +198,8 @@ void EnFirefly_Destroy(Actor* thisx, PlayState* play) {
EnFirefly* this = (EnFirefly*)thisx;
Collider_DestroyJntSph(play, &this->collider);
ResourceMgr_UnregisterSkeleton(&this->skelAnime);
}
void EnFirefly_SetupFlyIdle(EnFirefly* this) {
@@ -157,6 +157,8 @@ void EnFish_Destroy(Actor* thisx, PlayState* play2) {
EnFish* this = (EnFish*)thisx;
Collider_DestroyJntSph(play, &this->collider);
ResourceMgr_UnregisterSkeleton(&this->skelAnime);
}
void EnFish_SetYOffset(EnFish* this) {
@@ -179,6 +179,8 @@ void EnFloormas_Destroy(Actor* thisx, PlayState* play) {
EnFloormas* this = (EnFloormas*)thisx;
ColliderCylinder* col = &this->collider;
Collider_DestroyCylinder(play, col);
ResourceMgr_UnregisterSkeleton(&this->skelAnime);
}
void EnFloormas_MakeInvulnerable(EnFloormas* this) {
@@ -309,6 +309,9 @@ void EnFr_Destroy(Actor* thisx, PlayState* play) {
EnFr* this = (EnFr*)thisx;
LightContext_RemoveLight(play, &play->lightCtx, this->lightNode);
ResourceMgr_UnregisterSkeleton(&this->skelAnime);
ResourceMgr_UnregisterSkeleton(&this->skelAnimeButterfly);
}
void EnFr_IsDivingIntoWater(EnFr* this, PlayState* play) {
@@ -99,6 +99,8 @@ void EnFu_Init(Actor* thisx, PlayState* play) {
void EnFu_Destroy(Actor* thisx, PlayState* play) {
EnFu* this = (EnFu*)thisx;
Collider_DestroyCylinder(play, &this->collider);
ResourceMgr_UnregisterSkeleton(&this->skelanime);
}
s32 func_80A1D94C(EnFu* this, PlayState* play, u16 textID, EnFuActionFunc actionFunc) {
@@ -208,6 +208,8 @@ void EnFw_Init(Actor* thisx, PlayState* play) {
void EnFw_Destroy(Actor* thisx, PlayState* play) {
EnFw* this = (EnFw*)thisx;
Collider_DestroyJntSph(play, &this->collider);
ResourceMgr_UnregisterSkeleton(&this->skelAnime);
}
void EnFw_Bounce(EnFw* this, PlayState* play) {
@@ -224,6 +224,8 @@ void EnGb_Destroy(Actor* thisx, PlayState* play) {
Collider_DestroyCylinder(play, &this->collider);
LightContext_RemoveLight(play, &play->lightCtx, this->light);
DynaPoly_DeleteBgActor(play, &play->colCtx.dyna, this->dyna.bgId);
ResourceMgr_UnregisterSkeleton(&this->skelAnime);
}
void func_80A2F608(EnGb* this) {
@@ -203,6 +203,8 @@ void EnGe1_Destroy(Actor* thisx, PlayState* play) {
EnGe1* this = (EnGe1*)thisx;
Collider_DestroyCylinder(play, &this->collider);
ResourceMgr_UnregisterSkeleton(&this->skelAnime);
}
s32 EnGe1_SetTalkAction(EnGe1* this, PlayState* play, u16 textId, f32 arg3, EnGe1ActionFunc actionFunc) {
@@ -174,6 +174,8 @@ void EnGe2_Destroy(Actor* thisx, PlayState* play) {
EnGe2* this = (EnGe2*)thisx;
Collider_DestroyCylinder(play, &this->collider);
ResourceMgr_UnregisterSkeleton(&this->skelAnime);
}
// Detection/check functions
@@ -90,6 +90,8 @@ void EnGe3_Destroy(Actor* thisx, PlayState* play) {
EnGe3* this = (EnGe3*)thisx;
Collider_DestroyCylinder(play, &this->collider);
ResourceMgr_UnregisterSkeleton(&this->skelAnime);
}
void EnGe3_TurnToFacePlayer(EnGe3* this, PlayState* play) {
@@ -269,6 +269,8 @@ void EnGeldB_Destroy(Actor* thisx, PlayState* play) {
Collider_DestroyTris(play, &this->blockCollider);
Collider_DestroyCylinder(play, &this->bodyCollider);
Collider_DestroyQuad(play, &this->swordCollider);
ResourceMgr_UnregisterSkeleton(&this->skelAnime);
}
s32 EnGeldB_ReactToPlayer(PlayState* play, EnGeldB* this, s16 arg2) {
@@ -452,11 +452,6 @@ void EnGirlA_Init(Actor* thisx, PlayState* play) {
}
void EnGirlA_Destroy(Actor* thisx, PlayState* play) {
EnGirlA* this = (EnGirlA*)thisx;
if (this->isInitialized) {
SkelAnime_Free(&this->skelAnime, play);
}
}
s32 EnGirlA_CanBuy_Arrows(PlayState* play, EnGirlA* this) {
@@ -88,6 +88,8 @@ void EnGm_Destroy(Actor* thisx, PlayState* play) {
EnGm* this = (EnGm*)thisx;
Collider_DestroyCylinder(play, &this->collider);
ResourceMgr_UnregisterSkeleton(&this->skelAnime);
}
s32 func_80A3D7C8(void) {
@@ -1691,6 +1691,9 @@ void EnGo2_Init(Actor* thisx, PlayState* play) {
}
void EnGo2_Destroy(Actor* thisx, PlayState* play) {
EnGo2* this = (EnGo2*)thisx;
ResourceMgr_UnregisterSkeleton(&this->skelAnime);
}
void EnGo2_CurledUp(EnGo2* this, PlayState* play) {
@@ -177,6 +177,8 @@ void EnGoma_Destroy(Actor* thisx, PlayState* play) {
if (this->actor.params < 10) {
Collider_DestroyCylinder(play, &this->colCyl1);
Collider_DestroyCylinder(play, &this->colCyl2);
ResourceMgr_UnregisterSkeleton(&this->skelanime);
}
}
@@ -71,6 +71,8 @@ void EnGuest_Destroy(Actor* thisx, PlayState* play) {
EnGuest* this = (EnGuest*)thisx;
Collider_DestroyCylinder(play, &this->collider);
ResourceMgr_UnregisterSkeleton(&this->skelAnime);
}
void EnGuest_Update(Actor* thisx, PlayState* play) {
@@ -142,6 +142,9 @@ void EnHeishi1_Init(Actor* thisx, PlayState* play) {
}
void EnHeishi1_Destroy(Actor* thisx, PlayState* play) {
EnHeishi1* this = (EnHeishi1*)thisx;
ResourceMgr_UnregisterSkeleton(&this->skelAnime);
}
void EnHeishi1_SetupWalk(EnHeishi1* this, PlayState* play) {
@@ -166,6 +166,8 @@ void EnHeishi2_Destroy(Actor* thisx, PlayState* play) {
if ((this->collider.dim.radius != 0) || (this->collider.dim.height != 0)) {
Collider_DestroyCylinder(play, &this->collider);
}
ResourceMgr_UnregisterSkeleton(&this->skelAnime);
}
void EnHeishi2_DoNothing1(EnHeishi2* this, PlayState* play) {
@@ -90,6 +90,8 @@ void EnHeishi3_Destroy(Actor* thisx, PlayState* play) {
EnHeishi3* this = (EnHeishi3*)thisx;
Collider_DestroyCylinder(play, &this->collider);
ResourceMgr_UnregisterSkeleton(&this->skelAnime);
}
void EnHeishi3_SetupGuardType(EnHeishi3* this, PlayState* play) {
@@ -107,6 +107,8 @@ void EnHeishi4_Destroy(Actor* thisx, PlayState* play) {
EnHeishi4* this = (EnHeishi4*)thisx;
Collider_DestroyCylinder(play, &this->collider);
ResourceMgr_UnregisterSkeleton(&this->skelAnime);
}
void func_80A56328(EnHeishi4* this, PlayState* play) {
@@ -105,6 +105,8 @@ void EnHintnuts_Destroy(Actor* thisx, PlayState* play) {
if (this->actor.params != 0xA) {
Collider_DestroyCylinder(play, &this->collider);
ResourceMgr_UnregisterSkeleton(&this->skelAnime);
}
}
@@ -116,6 +116,8 @@ void EnHs_Destroy(Actor* thisx, PlayState* play) {
EnHs* this = (EnHs*)thisx;
Collider_DestroyCylinder(play, &this->collider);
ResourceMgr_UnregisterSkeleton(&this->skelAnime);
}
s32 func_80A6E53C(EnHs* this, PlayState* play, u16 textId, EnHsActionFunc actionFunc) {
@@ -71,6 +71,8 @@ void EnHs2_Destroy(Actor* thisx, PlayState* play) {
EnHs2* this = (EnHs2*)thisx;
Collider_DestroyCylinder(play, &this->collider);
ResourceMgr_UnregisterSkeleton(&this->skelAnime);
}
s32 func_80A6F0B4(EnHs2* this, PlayState* play, u16 textId, EnHs2ActionFunc actionFunc) {
@@ -906,6 +906,8 @@ void EnHy_Destroy(Actor* thisx, PlayState* play) {
EnHy* this = (EnHy*)thisx;
Collider_DestroyCylinder(play, &this->collider);
ResourceMgr_UnregisterSkeleton(&this->skelAnime);
}
void EnHy_InitImpl(EnHy* this, PlayState* play) {
@@ -175,6 +175,8 @@ void EnIk_Destroy(Actor* thisx, PlayState* play) {
Collider_DestroyTris(play, &this->shieldCollider);
Collider_DestroyCylinder(play, &this->bodyCollider);
Collider_DestroyQuad(play, &this->axeCollider);
ResourceMgr_UnregisterSkeleton(&this->skelAnime);
}
void EnIk_SetupAction(EnIk* this, EnIkActionFunc actionFunc) {
@@ -503,6 +503,8 @@ void EnIn_Destroy(Actor* thisx, PlayState* play) {
if (this->actionFunc != NULL && this->actionFunc != func_80A79FB0) {
Collider_DestroyCylinder(play, &this->collider);
ResourceMgr_UnregisterSkeleton(&this->skelAnime);
}
}
@@ -234,6 +234,8 @@ void EnInsect_Destroy(Actor* thisx, PlayState* play) {
if ((temp_v0 == 2 || temp_v0 == 3) && D_80A7DEB8 > 0) {
D_80A7DEB8--;
}
ResourceMgr_UnregisterSkeleton(&this->skelAnime);
}
void func_80A7C3A0(EnInsect* this) {
@@ -143,6 +143,8 @@ void EnJj_Destroy(Actor* thisx, PlayState* play) {
case JABUJABU_MAIN:
DynaPoly_DeleteBgActor(play, &play->colCtx.dyna, this->dyna.bgId);
Collider_DestroyCylinder(play, &this->collider);
ResourceMgr_UnregisterSkeleton(&this->skelAnime);
break;
case JABUJABU_COLLISION:
@@ -76,6 +76,8 @@ void EnJs_Destroy(Actor* thisx, PlayState* play) {
EnJs* this = (EnJs*)thisx;
Collider_DestroyCylinder(play, &this->collider);
ResourceMgr_UnregisterSkeleton(&this->skelAnime);
}
u8 func_80A88F64(EnJs* this, PlayState* play, u16 textId) {
@@ -59,8 +59,7 @@ void EnKakasi_Destroy(Actor* thisx, PlayState* play) {
EnKakasi* this = (EnKakasi*)thisx;
Collider_DestroyCylinder(play, &this->collider);
SkelAnime_Free(&this->skelanime, play); // OTR - Fixed this memory leak
//! @bug SkelAnime_Free is not called
SkelAnime_Free(&this->skelanime, play);
}
void EnKakasi_Init(Actor* thisx, PlayState* play) {
@@ -109,8 +109,7 @@ void EnKakasi2_Destroy(Actor* thisx, PlayState* play) {
EnKakasi2* this = (EnKakasi2*)thisx;
Collider_DestroyCylinder(play, &this->collider);
SkelAnime_Free(&this->skelAnime, play); // OTR - Fixed this memory leak
//! @bug SkelAnime_Free is not called
SkelAnime_Free(&this->skelAnime, play);
}
void func_80A90264(EnKakasi2* this, PlayState* play) {
@@ -63,8 +63,7 @@ void EnKakasi3_Destroy(Actor* thisx, PlayState* play) {
EnKakasi3* this = (EnKakasi3*)thisx;
Collider_DestroyCylinder(play, &this->collider);
SkelAnime_Free(&this->skelAnime, play); //OTR - Fixed this memory leak
//! @bug SkelAnime_Free is not called
SkelAnime_Free(&this->skelAnime, play);
}
void EnKakasi3_Init(Actor* thisx, PlayState* play) {
@@ -119,6 +119,8 @@ void EnKarebaba_Destroy(Actor* thisx, PlayState* play) {
Collider_DestroyCylinder(play, &this->bodyCollider);
Collider_DestroyCylinder(play, &this->headCollider);
ResourceMgr_UnregisterSkeleton(&this->skelAnime);
}
void EnKarebaba_ResetCollider(EnKarebaba* this) {
@@ -1145,6 +1145,8 @@ void EnKo_Init(Actor* thisx, PlayState* play) {
void EnKo_Destroy(Actor* thisx, PlayState* play) {
EnKo* this = (EnKo*)thisx;
Collider_DestroyCylinder(play, &this->collider);
ResourceMgr_UnregisterSkeleton(&this->skelAnime);
}
void func_80A99048(EnKo* this, PlayState* play) {
@@ -385,6 +385,8 @@ void EnKz_Destroy(Actor* thisx, PlayState* play) {
EnKz* this = (EnKz*)thisx;
Collider_DestroyCylinder(play, &this->collider);
ResourceMgr_UnregisterSkeleton(&this->skelanime);
}
void EnKz_PreMweepWait(EnKz* this, PlayState* play) {
@@ -336,6 +336,8 @@ void EnMb_Destroy(Actor* thisx, PlayState* play) {
Collider_DestroyTris(play, &this->frontShielding);
Collider_DestroyCylinder(play, &this->hitbox);
Collider_DestroyQuad(play, &this->attackCollider);
ResourceMgr_UnregisterSkeleton(&this->skelAnime);
}
void EnMb_FaceWaypoint(EnMb* this, PlayState* play) {
@@ -699,6 +699,8 @@ void EnMd_Init(Actor* thisx, PlayState* play) {
void EnMd_Destroy(Actor* thisx, PlayState* play) {
EnMd* this = (EnMd*)thisx;
Collider_DestroyCylinder(play, &this->collider);
ResourceMgr_UnregisterSkeleton(&this->skelAnime);
}
void func_80AAB874(EnMd* this, PlayState* play) {
@@ -79,6 +79,8 @@ void EnMk_Destroy(Actor* thisx, PlayState* play) {
EnMk* this = (EnMk*)thisx;
Collider_DestroyCylinder(play, &this->collider);
ResourceMgr_UnregisterSkeleton(&this->skelAnime);
}
void func_80AACA40(EnMk* this, PlayState* play) {
@@ -198,6 +198,8 @@ void EnMm_Destroy(Actor* thisx, PlayState* play) {
EnMm* this = (EnMm*)thisx;
Collider_DestroyCylinder(play, &this->collider);
ResourceMgr_UnregisterSkeleton(&this->skelAnime);
}
s32 func_80AADA70(void) {

Some files were not shown because too many files have changed in this diff Show More