mirror of
https://github.com/TwilitRealm/dusklight
synced 2026-08-21 05:34:10 -04:00
Gamemode service fixes
This commit is contained in:
@@ -186,13 +186,6 @@ void dBrightCheck_c::modeMove() {
|
||||
if (mDoCPd_c::getTrigA(PAD_1) || mDoCPd_c::getTrigStart(PAD_1)) {
|
||||
mDoAud_seStart(Z2SE_ENTER_GAME, NULL, 0, 0);
|
||||
#ifdef TARGET_PC
|
||||
if (!dusk::getSettings().game.hideTvSettingsScreen) {
|
||||
const dusk::gamemode::Gamemode* gamemode = dusk::gamemode::getGamemodeManager().getCurrentGamemode();
|
||||
if (gamemode) {
|
||||
gamemode->invokeOnSaveLoadedFunction();
|
||||
}
|
||||
}
|
||||
|
||||
toggleAutoSave(true);
|
||||
#endif
|
||||
mCompleteCheck = true;
|
||||
|
||||
@@ -1416,6 +1416,11 @@ void dFile_select_c::menuSelectStart() {
|
||||
dComIfGs_setDataNum(mSelectNum);
|
||||
#if TARGET_PC
|
||||
dusk::mods::svc::save_slot_loaded(mSelectNum, &mSaveData[mSelectNum]);
|
||||
|
||||
const dusk::gamemode::Gamemode* gamemode = dusk::gamemode::getGamemodeManager().getCurrentGamemode();
|
||||
if (gamemode) {
|
||||
gamemode->invokeOnSaveLoadedFunction();
|
||||
}
|
||||
#endif
|
||||
} else if (mSelectMenuNum == 0) {
|
||||
mSelIcon->setAlphaRate(0.0f);
|
||||
@@ -1769,6 +1774,11 @@ void dFile_select_c::nameInput2() {
|
||||
mIsSelectEnd = true;
|
||||
#if TARGET_PC
|
||||
dusk::mods::svc::save_slot_new(mSelectNum);
|
||||
const dusk::gamemode::Gamemode* gamemode = dusk::gamemode::getGamemodeManager().getCurrentGamemode();
|
||||
if (gamemode) {
|
||||
gamemode->invokeOnNewSaveFunction();
|
||||
gamemode->invokeOnSaveLoadedFunction();
|
||||
}
|
||||
#endif
|
||||
mDataSelProc = DATASELPROC_NEXT_MODE_WAIT;
|
||||
}
|
||||
|
||||
@@ -27,6 +27,7 @@
|
||||
#include "dusk/logging.h"
|
||||
#include "dusk/main.h"
|
||||
#include "dusk/mods/svc/save.hpp"
|
||||
#include "dusk/gamemode.hpp"
|
||||
#include "dusk/version.hpp"
|
||||
#include "m_Do/m_Do_MemCard.h"
|
||||
#endif
|
||||
@@ -785,6 +786,10 @@ void dScnLogo_c::nextSceneChange() {
|
||||
if (status == 1) {
|
||||
dusk::mods::svc::save_slot_loaded(
|
||||
saveSlot, buf + saveSlot * SAVEDATA_SIZE);
|
||||
const dusk::gamemode::Gamemode* gamemode = dusk::gamemode::getGamemodeManager().getCurrentGamemode();
|
||||
if (gamemode) {
|
||||
gamemode->invokeOnSaveLoadedFunction();
|
||||
}
|
||||
}
|
||||
|
||||
dComIfGs_gameStart();
|
||||
|
||||
@@ -422,13 +422,6 @@ void dScnName_c::changeGameScene() {
|
||||
dComIfGs_setRestartRoomParam(0);
|
||||
|
||||
#if TARGET_PC
|
||||
if (dusk::getSettings().game.hideTvSettingsScreen) {
|
||||
const dusk::gamemode::Gamemode* gamemode = dusk::gamemode::getGamemodeManager().getCurrentGamemode();
|
||||
if (gamemode) {
|
||||
gamemode->invokeOnSaveLoadedFunction();
|
||||
}
|
||||
}
|
||||
|
||||
toggleAutoSave(true);
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -1537,13 +1537,6 @@ void dSv_save_c::init() {
|
||||
|
||||
mEvent.init();
|
||||
mMiniGame.init();
|
||||
|
||||
#ifdef TARGET_PC
|
||||
const dusk::gamemode::Gamemode* gamemode = dusk::gamemode::getGamemodeManager().getCurrentGamemode();
|
||||
if (gamemode) {
|
||||
gamemode->invokeOnNewSaveFunction();
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
dSv_memory2_c* dSv_save_c::getSave2(int i_stage2No) {
|
||||
|
||||
Reference in New Issue
Block a user