Skip briefing developer option

This commit is contained in:
Sonic Dreamcaster 2024-11-24 16:54:36 -03:00
parent b3ad7e8ab8
commit bda925b33f
2 changed files with 23 additions and 19 deletions

View File

@ -112,27 +112,27 @@ void Map_LevelSelect(void) {
}
// Bypass briefing
#if DEBUG_SKIP_BRIEFING
if ((timer == 0) && (startLevel == 1)) {
if ((sMapState == 2) && (sMapSubState > 0)) {
if (sCurrentPlanetId == PLANET_VENOM) {
if (startOption) {
gCurrentLevel = LEVEL_VENOM_ANDROSS;
} else if (sPlanetArray[mission][difficulty] == SAVE_SLOT_VENOM_2) {
gCurrentLevel = LEVEL_VENOM_2;
if (CVarGetInteger("gSkipBriefing", 0) == 1) {
if ((timer == 0) && (startLevel == 1)) {
if ((sMapState == 2) && (sMapSubState > 0)) {
if (sCurrentPlanetId == PLANET_VENOM) {
if (startOption) {
gCurrentLevel = LEVEL_VENOM_ANDROSS;
} else if (sPlanetArray[mission][difficulty] == SAVE_SLOT_VENOM_2) {
gCurrentLevel = LEVEL_VENOM_2;
}
} else if ((sCurrentPlanetId == PLANET_AREA_6) && startOption) {
gCurrentLevel = LEVEL_UNK_4;
}
Map_LevelStart_AudioSpecSetup(gCurrentLevel);
sLevelStartState = 0;
D_menu_801CD968 = 0;
Map_PlayLevel();
if (startOption && ((gCurrentLevel == LEVEL_METEO) || (gCurrentLevel == LEVEL_SECTOR_X) ||
(sPlanetArray[mission][difficulty] == SAVE_SLOT_VENOM_2))) {
gLevelPhase = 1;
}
} else if ((sCurrentPlanetId == PLANET_AREA_6) && startOption) {
gCurrentLevel = LEVEL_UNK_4;
}
Map_LevelStart_AudioSpecSetup(gCurrentLevel);
sLevelStartState = 0;
D_menu_801CD968 = 0;
Map_PlayLevel();
if (startOption && ((gCurrentLevel == LEVEL_METEO) || (gCurrentLevel == LEVEL_SECTOR_X) ||
(sPlanetArray[mission][difficulty] == SAVE_SLOT_VENOM_2))) {
gLevelPhase = 1;
}
}
}
#endif
}

View File

@ -485,6 +485,10 @@ void DrawDebugMenu() {
.tooltip = "Allows you to select any level from the main menu"
});
UIWidgets::CVarCheckbox("Skip Briefing", "gSkipBriefing", {
.tooltip = "Allows you to skip the briefing sequence in level select"
});
UIWidgets::CVarCheckbox("Enable Expert Mode", "gForceExpertMode", {
.tooltip = "Allows you to force expert mode"
});