mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2025-07-16 10:02:59 -07:00
[Game Interactor] Add LoadGame and ExitGame hooks (#2542)
* add loadgame/exitgame GI hooks * implement loadgame/exitgame hooks in game code * move entrance tracker data lifecycle to hooks * update cosmetic editor to update onloadgame hook
This commit is contained in:
parent
17aeec4b13
commit
f7bb807940
10 changed files with 47 additions and 21 deletions
|
@ -7,6 +7,7 @@
|
|||
#include <ImGuiImpl.h>
|
||||
#include "soh/frame_interpolation.h"
|
||||
#include "soh/Enhancements/debugconsole.h"
|
||||
#include "soh/Enhancements/game-interactor/GameInteractor.h"
|
||||
#include "soh/Enhancements/randomizer/randomizer_entrance.h"
|
||||
#include <overlays/actors/ovl_En_Niw/z_en_niw.h>
|
||||
|
||||
|
@ -427,10 +428,12 @@ void Play_Init(GameState* thisx) {
|
|||
}
|
||||
}
|
||||
|
||||
// Invalid entrance, so immediately exit the game to opening title
|
||||
if (gSaveContext.entranceIndex == -1) {
|
||||
gSaveContext.entranceIndex = 0;
|
||||
play->state.running = false;
|
||||
SET_NEXT_GAMESTATE(&play->state, Opening_Init, OpeningContext);
|
||||
GameInteractor_ExecuteOnExitGame(gSaveContext.fileNum);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue