mirror of
https://github.com/TwilitRealm/dusklight
synced 2026-07-26 06:16:24 -04:00
Merge branch 'main' of ssh://github.com/TwilitRealm/dusklight into jpn
This commit is contained in:
+62
-2
@@ -23,8 +23,12 @@
|
||||
#include "m_Do/m_Do_main.h"
|
||||
#include "JSystem/JUtility/JUTConsole.h"
|
||||
|
||||
#ifdef TARGET_PC
|
||||
#include "dusk/logging.h"
|
||||
#include "dusk/version.hpp"
|
||||
#include "dusk/main.h"
|
||||
#include "m_Do/m_Do_MemCard.h"
|
||||
#endif
|
||||
|
||||
#if !PLATFORM_GCN
|
||||
#include <revolution/os.h>
|
||||
@@ -757,7 +761,63 @@ void dScnLogo_c::nextSceneChange() {
|
||||
if (!mDoRst::isReset()) {
|
||||
if (!isOpeningCut())
|
||||
{
|
||||
dComIfG_changeOpeningScene(this, fpcNm_OPENING_SCENE_e);
|
||||
#ifdef TARGET_PC
|
||||
// If we are requesting a save from the command line, load it here and set the scene to play instead of loading the LOGO SCENE
|
||||
if (dusk::SaveRequested >= 1 && dusk::SaveRequested <= 3) {
|
||||
u8 buf[SAVEDATA_SIZE * 3];
|
||||
mDoMemCd_Load();
|
||||
uint8_t status;
|
||||
do {
|
||||
status = mDoMemCd_LoadSync(buf, sizeof(buf), 0);
|
||||
// Wait until the card is loaded
|
||||
} while (status == 0);
|
||||
|
||||
if (status == 1) {
|
||||
dComIfGs_setCardToMemory(buf, dusk::SaveRequested - 1);
|
||||
} else {
|
||||
dComIfGs_init();
|
||||
}
|
||||
|
||||
dComIfGs_setNoFile(dusk::SaveRequested);
|
||||
dComIfGs_setDataNum(dusk::SaveRequested-1);
|
||||
|
||||
dComIfGs_gameStart();
|
||||
|
||||
fopScnM_ChangeReq(this, fpcNm_PLAY_SCENE_e, 0, 30);
|
||||
|
||||
dKy_clear_game_init();
|
||||
dComIfGs_resetDan();
|
||||
dComIfGs_setRestartRoomParam(0);
|
||||
|
||||
DuskLog.info("Loaded Save From Slot {}",dusk::SaveRequested);
|
||||
dusk::SaveRequested = 0xff;
|
||||
} else if (dusk::SaveRequested == 0xff) {
|
||||
// This indicates that the save has loaded, but we are waiting for the scene
|
||||
// manager to change to play
|
||||
} else if (dusk::StageRequested.set) {
|
||||
// Do nothing if we need to request a stage to load later in the function
|
||||
} else{
|
||||
#endif
|
||||
dComIfG_changeOpeningScene(this, fpcNm_OPENING_SCENE_e);
|
||||
#ifdef TARGET_PC
|
||||
}
|
||||
|
||||
if (dusk::StageRequested.set) {
|
||||
// If we aren't loading a save, initialize a blank save file and request the correct scene to load
|
||||
if (dusk::SaveRequested == 0) {
|
||||
dComIfGs_init();
|
||||
|
||||
fopScnM_ChangeReq(this, fpcNm_PLAY_SCENE_e, 0, 30);
|
||||
dusk::SaveRequested = 0xff; //Skip requesting the scene from above
|
||||
}
|
||||
|
||||
// Use both to force-set start stage
|
||||
dComIfGp_setNextStage(dusk::StageRequested.stage.c_str(), dusk::StageRequested.point, dusk::StageRequested.room, dusk::StageRequested.layer);
|
||||
g_dComIfG_gameInfo.play.mNextStage.getStartStage()->set(dusk::StageRequested.stage.c_str(), dusk::StageRequested.room, dusk::StageRequested.point, dusk::StageRequested.layer);
|
||||
|
||||
dusk::StageRequested.set = false; // Setting the stage should only happen once
|
||||
}
|
||||
#endif
|
||||
} else {
|
||||
#if DEBUG
|
||||
fopScnM_ChangeReq(this, fpcNm_MENU_SCENE_e, 0, 30);
|
||||
@@ -1803,7 +1863,7 @@ static scene_method_class l_dScnLogo_Method = {
|
||||
(process_method_func)dScnLogo_Draw,
|
||||
};
|
||||
|
||||
scene_process_profile_definition g_profile_LOGO_SCENE = {
|
||||
DUSK_PROFILE scene_process_profile_definition DUSK_CONST g_profile_LOGO_SCENE = {
|
||||
/* Layer ID */ fpcLy_ROOT_e,
|
||||
/* List ID */ 1,
|
||||
/* List Prio */ fpcPi_CURRENT_e,
|
||||
|
||||
Reference in New Issue
Block a user