mirror of
https://github.com/HarbourMasters/Starship.git
synced 2025-04-28 12:27:59 +03:00
update level select
This commit is contained in:
parent
a66816a986
commit
51189791c0
2 changed files with 43 additions and 43 deletions
|
@ -96,6 +96,8 @@ void RamMod_Update(void);
|
|||
void Spawner(void);
|
||||
#endif
|
||||
|
||||
#define DEBUG_SKIP_BRIEFING 1
|
||||
|
||||
/*
|
||||
|
||||
// @port: Tag the transform.
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
#include "global.h"
|
||||
#include "fox_map.h"
|
||||
#include "mods.h"
|
||||
|
||||
extern PlanetId sPlanetList[15];
|
||||
extern PlanetId sCurrentPlanetId;
|
||||
|
@ -28,6 +29,8 @@ void Map_LevelSelect(void) {
|
|||
"ZONESS", "CORNERIA", "TITANIA", "AQUAS", "FORTUNA", "VENOM 1", "SOLAR", "VENOM 2",
|
||||
};
|
||||
static s32 startOption = 0;
|
||||
static s32 timer = 30;
|
||||
static s32 startLevel = 0;
|
||||
|
||||
// static f32 zStart = 0.0f;
|
||||
// f32 zInc;
|
||||
|
@ -74,63 +77,58 @@ void Map_LevelSelect(void) {
|
|||
startOption ^= 1;
|
||||
}
|
||||
|
||||
// if (contPress->button & U_CBUTTONS) {
|
||||
// zInc = 100.0f;
|
||||
// } else if (contPress->button & R_CBUTTONS) {
|
||||
// zInc = 1000.0f;
|
||||
// } else if (contPress->button & D_CBUTTONS) {
|
||||
// zInc = -100.0f;
|
||||
// } else if (contPress->button & L_CBUTTONS) {
|
||||
// zInc = -1000.0f;
|
||||
// }
|
||||
// if (gControllerHold[0].button & R_TRIG) {
|
||||
// zInc *= 100.0f;
|
||||
// }
|
||||
// zStart += zInc;
|
||||
// if(zStart < 0.0f) {
|
||||
// zStart = 0.0f;
|
||||
// } else if (zStart > 500000.0f) {
|
||||
// zStart = 500000.0f;
|
||||
// }
|
||||
int y = 225;
|
||||
|
||||
/* Draw */
|
||||
if ((sCurrentPlanetId >= 0) && (sCurrentPlanetId < PLANET_MAX)) {
|
||||
RCP_SetupDL(&gMasterDisp, SETUPDL_83);
|
||||
gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 0, 255);
|
||||
|
||||
Graphics_DisplaySmallText(20, 200, 1.0f, 1.0f, "PLANET:");
|
||||
Graphics_DisplaySmallText(80, 200, 1.0f, 1.0f, sLevelSelectPlanetNames[sPlanetArray[mission][difficulty]]);
|
||||
Graphics_DisplaySmallText(20, y, 1.0f, 1.0f, "PLANET:");
|
||||
Graphics_DisplaySmallText(80, y, 1.0f, 1.0f, sLevelSelectPlanetNames[sPlanetArray[mission][difficulty]]);
|
||||
|
||||
if (startOption) {
|
||||
if ((sCurrentPlanetId == PLANET_SECTOR_X) || (sCurrentPlanetId == PLANET_METEO)) {
|
||||
Graphics_DisplaySmallText(80, 210, 1.0f, 1.0f, "WARP ZONE");
|
||||
Graphics_DisplaySmallText(80 + 60 + 10, y, 1.0f, 1.0f, "WARP ZONE");
|
||||
} else if (sCurrentPlanetId == PLANET_VENOM) {
|
||||
Graphics_DisplaySmallText(80, 210, 1.0f, 1.0f, "ANDROSS");
|
||||
Graphics_DisplaySmallText(80 + 60 + 3, y, 1.0f, 1.0f, "ANDROSS");
|
||||
} else if (sCurrentPlanetId == PLANET_AREA_6) {
|
||||
Graphics_DisplaySmallText(80, 210, 1.0f, 1.0f, "BETA SB");
|
||||
Graphics_DisplaySmallText(80 + 60 - 3, y, 1.0f, 1.0f, "BETA SB");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Bypass briefing
|
||||
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;
|
||||
}
|
||||
// gSavedPathProgress = gPathProgress = zStart;
|
||||
if (gControllerPress[0].button & A_BUTTON) {
|
||||
timer = 15;
|
||||
startLevel = 1;
|
||||
}
|
||||
|
||||
if (timer > 0) {
|
||||
timer--;
|
||||
}
|
||||
|
||||
// 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;
|
||||
}
|
||||
} 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
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue