mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2025-02-11 21:00:12 -05:00
Address review.
This commit is contained in:
parent
f8650367ce
commit
702e227c20
@ -1443,7 +1443,6 @@ extern "C" void Graph_ProcessGfxCommands(Gfx* commands) {
|
||||
bool curAltAssets = CVarGetInteger(CVAR_ENHANCEMENT("AltAssets"), 0);
|
||||
if (prevAltAssets != curAltAssets) {
|
||||
prevAltAssets = curAltAssets;
|
||||
CVarSetInteger(CVAR_ENHANCEMENT("AltAssets"), prevAltAssets);
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesNextFrame();
|
||||
Ship::Context::GetInstance()->GetResourceManager()->SetAltAssetsEnabled(curAltAssets);
|
||||
gfx_texture_cache_clear();
|
||||
|
@ -529,8 +529,7 @@ std::string GetSceneRootPath(int16_t sceneNum, bool alt = true) {
|
||||
size_t pos = path.find("/shared/", 0);
|
||||
if (IS_MASTER_QUEST || (IS_RANDO && OTRGlobals::Instance->gRandoContext->GetDungeons()->GetDungeonFromScene(sceneNum)->IsMQ())) {
|
||||
path.replace(pos, 8, "/mq/");
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
path.replace(pos, 8, "/nonmq/");
|
||||
}
|
||||
}
|
||||
@ -780,5 +779,6 @@ extern "C" void ResourceMgr_RegisterHooks() {
|
||||
});
|
||||
GameInteractor::Instance->RegisterGameHook<GameInteractor::OnSceneInit>([](uint32_t sceneNum) {
|
||||
ResourceMgr_SceneInitSkybox();
|
||||
ResourceMgr_UnloadSceneAssets();
|
||||
});
|
||||
}
|
||||
|
@ -77,8 +77,6 @@ void OTRPlay_InitScene(PlayState* play, s32 spawn) {
|
||||
Object_InitBank(play, &play->objectCtx);
|
||||
LightContext_Init(play, &play->lightCtx);
|
||||
TransitionActor_InitContext(&play->state, &play->transiActorCtx);
|
||||
//ResourceMgr_LoadAllSceneResources(play->sceneNum, false);
|
||||
ResourceMgr_UnloadSceneAssets();
|
||||
|
||||
func_80096FD4(play, &play->roomCtx.curRoom);
|
||||
YREG(15) = 0;
|
||||
|
@ -471,21 +471,20 @@ void GameState_Destroy(GameState* gameState) {
|
||||
// Performing clear skeletons before unload resources fixes an actor heap corruption crash due to the skeleton patching system.
|
||||
PlayState* play = (PlayState*)gameState;
|
||||
static s16 sceneNum = -1;
|
||||
if (play->sceneNum != sceneNum) {
|
||||
|
||||
// Performing clear skeletons before unload resources fixes an actor heap corruption crash due to the skeleton patching system.
|
||||
ResourceMgr_ClearSkeletons();
|
||||
// Performing clear skeletons before unload resources fixes an actor heap corruption crash due to the skeleton patching system.
|
||||
ResourceMgr_ClearSkeletons();
|
||||
if (play->sceneNum != sceneNum) {
|
||||
|
||||
if (play->sceneNum >= SCENE_DEKU_TREE && play->sceneNum <= SCENE_TESTROOM) {
|
||||
ResourceMgr_RegisterUnloadSceneAssets(play->sceneNum);
|
||||
}
|
||||
ResourceUnloadDirectory("alt/textures/vs*");
|
||||
|
||||
if (ResourceMgr_IsAltAssetsEnabled()) {
|
||||
gfx_texture_cache_clear();
|
||||
}
|
||||
sceneNum = play->sceneNum;
|
||||
}
|
||||
if (ResourceMgr_IsAltAssetsEnabled()) {
|
||||
gfx_texture_cache_clear();
|
||||
}
|
||||
}
|
||||
|
||||
GameStateFunc GameState_GetInit(GameState* gameState) {
|
||||
|
Loading…
Reference in New Issue
Block a user