mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2024-11-23 21:07:17 +00:00
shmup replaced with random special mode in start menu; use current settings in the start menu
This commit is contained in:
parent
17dc4c7e83
commit
e24ae3f717
28
config.cpp
28
config.cpp
@ -4,8 +4,8 @@
|
|||||||
|
|
||||||
videopar vid;
|
videopar vid;
|
||||||
|
|
||||||
#define DEFAULT_WALLMODE ISMOBILE ? 3 : 5
|
#define DEFAULT_WALLMODE (ISMOBILE ? 3 : 5)
|
||||||
#define DEFAULT_MONMODE ISMOBILE ? 2 : 4
|
#define DEFAULT_MONMODE (ISMOBILE ? 2 : 4)
|
||||||
|
|
||||||
#if ISANDROID
|
#if ISANDROID
|
||||||
#define ANDROID_SETTINGS settingsChanged = true;
|
#define ANDROID_SETTINGS settingsChanged = true;
|
||||||
@ -359,6 +359,30 @@ bool inSpecialMode() {
|
|||||||
vid.wallmode != DEFAULT_WALLMODE;
|
vid.wallmode != DEFAULT_WALLMODE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool have_current_settings() {
|
||||||
|
int modecount = 0;
|
||||||
|
if(inv::on) modecount++;
|
||||||
|
if(shmup::on) modecount += 10;
|
||||||
|
if(tour::on) modecount += 10;
|
||||||
|
if(chaosmode) modecount += 10;
|
||||||
|
if(nonbitrunc) modecount += 10;
|
||||||
|
if(peace::on) modecount += 10;
|
||||||
|
if(yendor::on) modecount += 10;
|
||||||
|
if(tactic::on) modecount += 10;
|
||||||
|
if(randomPatternsMode) modecount += 10;
|
||||||
|
if(geometry != gNormal) modecount += 10;
|
||||||
|
|
||||||
|
if(vid.xposition || vid.yposition || vid.alpha != 1 || vid.scale != 1)
|
||||||
|
return true;
|
||||||
|
if(pmodel != mdDisk || vid.monmode != DEFAULT_MONMODE || vid.wallmode != DEFAULT_WALLMODE)
|
||||||
|
return true;
|
||||||
|
if(firstland != laIce || vid.scfg.players != 1 || rug::rugged)
|
||||||
|
return true;
|
||||||
|
if(modecount > 1)
|
||||||
|
return true;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
void resetModes(char leave) {
|
void resetModes(char leave) {
|
||||||
popAllGames();
|
popAllGames();
|
||||||
firstland = laIce; vid.scfg.players = 1;
|
firstland = laIce; vid.scfg.players = 1;
|
||||||
|
2
hyper.h
2
hyper.h
@ -2870,3 +2870,5 @@ ld hypot2(const hyperpoint& h);
|
|||||||
transmatrix pushxto0(const hyperpoint& H);
|
transmatrix pushxto0(const hyperpoint& H);
|
||||||
transmatrix rpushxto0(const hyperpoint& H);
|
transmatrix rpushxto0(const hyperpoint& H);
|
||||||
transmatrix spintox(const hyperpoint& H);
|
transmatrix spintox(const hyperpoint& H);
|
||||||
|
|
||||||
|
extern int ewhichscreen;
|
||||||
|
130
menus.cpp
130
menus.cpp
@ -421,6 +421,15 @@ void switchHardcore() {
|
|||||||
if(pureHardcore()) popScreenAll();
|
if(pureHardcore()) popScreenAll();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void help_nochaos() {
|
||||||
|
gotoHelp(
|
||||||
|
"In the Chaos mode, lands change very often, and "
|
||||||
|
"there are no walls between them. "
|
||||||
|
"Some lands are incompatible with this."
|
||||||
|
"\n\nYou need to reach Crossroads IV to unlock the Chaos mode."
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
void showChangeMode() {
|
void showChangeMode() {
|
||||||
gamescreen(3);
|
gamescreen(3);
|
||||||
dialog::init(XLAT("special game modes"));
|
dialog::init(XLAT("special game modes"));
|
||||||
@ -509,12 +518,7 @@ void showChangeMode() {
|
|||||||
#endif
|
#endif
|
||||||
else if(uni == 'C') {
|
else if(uni == 'C') {
|
||||||
if(chaosUnlocked) restartGame('C');
|
if(chaosUnlocked) restartGame('C');
|
||||||
if(chaosmode) gotoHelp(
|
if(chaosmode) help_nochaos();
|
||||||
"In the Chaos mode, lands change very often, and "
|
|
||||||
"there are no walls between them. "
|
|
||||||
"Some lands are incompatible with this."
|
|
||||||
"\n\nYou need to reach Crossroads IV to unlock the Chaos mode."
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
else if(xuni == 'P') {
|
else if(xuni == 'P') {
|
||||||
if(!princess::everSaved)
|
if(!princess::everSaved)
|
||||||
@ -565,7 +569,15 @@ bool showHalloween() {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int daily;
|
||||||
|
|
||||||
void showStartMenu() {
|
void showStartMenu() {
|
||||||
|
if(!daily) {
|
||||||
|
daily = hrand(10) + 1;
|
||||||
|
if(showHalloween())
|
||||||
|
daily = 20;
|
||||||
|
}
|
||||||
|
|
||||||
gamescreen(2);
|
gamescreen(2);
|
||||||
|
|
||||||
getcstat = ' ';
|
getcstat = ' ';
|
||||||
@ -585,31 +597,73 @@ void showStartMenu() {
|
|||||||
dialog::addInfo(XLAT("use your Orbs in tough situations"));
|
dialog::addInfo(XLAT("use your Orbs in tough situations"));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if CAP_SHMUP_GOOD
|
|
||||||
dialog::addBreak(100);
|
|
||||||
dialog::addBigItem(XLAT("shoot'em up mode"), 's');
|
|
||||||
dialog::addInfo(XLAT("continuous spacetime"));
|
|
||||||
#if CAP_ACHIEVE
|
|
||||||
dialog::addInfo(XLAT("(most achievements are not available)"));
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if CAP_TOUR
|
#if CAP_TOUR
|
||||||
dialog::addBreak(100);
|
dialog::addBreak(100);
|
||||||
dialog::addBigItem(XLAT("tutorial"), 't');
|
dialog::addBigItem(XLAT("tutorial"), 't');
|
||||||
dialog::addInfo(XLAT("learn about hyperbolic geometry!"));
|
dialog::addInfo(XLAT("learn about hyperbolic geometry!"));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
switch(daily) {
|
||||||
|
case 1:
|
||||||
|
#if CAP_SHMUP_GOOD
|
||||||
|
dialog::addBreak(100);
|
||||||
|
dialog::addBigItem(XLAT("shoot'em up mode"), 's');
|
||||||
|
dialog::addInfo(XLAT("continuous spacetime"));
|
||||||
|
#if CAP_ACHIEVE
|
||||||
|
dialog::addInfo(XLAT("(most achievements are not available)"));
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 2:
|
||||||
|
dialog::addBreak(100);
|
||||||
|
dialog::addBigItem(XLAT("heptagonal mode"), '7');
|
||||||
|
dialog::addInfo(XLAT("more curvature"));
|
||||||
|
dialog::addInfo(XLAT("(most achievements are not available)"));
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 3:
|
||||||
|
dialog::addBreak(100);
|
||||||
|
dialog::addBigItem(XLAT("geometry experiments"), 'g');
|
||||||
|
dialog::addInfo(XLAT("(most achievements are not available)"));
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 4:
|
||||||
|
if(chaosUnlocked) {
|
||||||
|
dialog::addBreak(100);
|
||||||
|
dialog::addBigItem(XLAT("Chaos mode"), 'C');
|
||||||
|
dialog::addInfo(XLAT("(most achievements are not available)"));
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 5:
|
||||||
|
dialog::addBreak(100);
|
||||||
|
dialog::addBigItem(XLAT("hypersian rug mode"), 'M');
|
||||||
|
dialog::addInfo(XLAT("see the true form"));
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 6:
|
||||||
|
dialog::addBreak(100);
|
||||||
|
dialog::addBigItem(XLAT("texture mode"), 'T');
|
||||||
|
dialog::addInfo(XLAT("paint pictures"));
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 20:
|
||||||
|
dialog::addBreak(100);
|
||||||
|
dialog::addBigItem(XLAT1("Halloween"), 'z');
|
||||||
|
dialog::addInfo(XLAT("Halloween mini-game"));
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
#if CAP_ROGUEVIZ && CAP_TOUR
|
#if CAP_ROGUEVIZ && CAP_TOUR
|
||||||
dialog::addBreak(100);
|
dialog::addBreak(100);
|
||||||
dialog::addBigItem(XLAT("RogueViz"), 'r');
|
dialog::addBigItem(XLAT("RogueViz"), 'r');
|
||||||
dialog::addInfo(XLAT("see the visualizations"));
|
dialog::addInfo(XLAT("see the visualizations"));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if(showHalloween()) {
|
if(have_current_settings()) {
|
||||||
dialog::addBreak(100);
|
dialog::addBreak(100);
|
||||||
dialog::addBigItem(XLAT1("Halloween"), 'z');
|
dialog::addBigItem(XLAT1("use current/saved settings"), SDLK_ESCAPE);
|
||||||
dialog::addInfo(XLAT("Halloween mini-game"));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
dialog::addBreak(100);
|
dialog::addBreak(100);
|
||||||
@ -635,7 +689,45 @@ void showStartMenu() {
|
|||||||
keyhandler = [] (int sym, int uni) {
|
keyhandler = [] (int sym, int uni) {
|
||||||
dialog::handleNavigation(sym, uni);
|
dialog::handleNavigation(sym, uni);
|
||||||
if(uni == 'o') uni = 'i';
|
if(uni == 'o') uni = 'i';
|
||||||
if(uni == 'c' || uni == 'i' || uni == 's') {
|
else if(uni == 'M') {
|
||||||
|
rug::init();
|
||||||
|
popScreenAll();
|
||||||
|
resetModes('c');
|
||||||
|
clearMessages();
|
||||||
|
welcomeMessage();
|
||||||
|
vid.wallmode = 3;
|
||||||
|
vid.monmode = 2;
|
||||||
|
rug::model_distance *= 2;
|
||||||
|
rug::init();
|
||||||
|
}
|
||||||
|
else if(uni == 'T') {
|
||||||
|
popScreenAll();
|
||||||
|
resetModes('c');
|
||||||
|
clearMessages();
|
||||||
|
welcomeMessage();
|
||||||
|
using namespace texture;
|
||||||
|
if(config.data.whitetexture() && config.data.loadTextureGL()) {
|
||||||
|
config.tstate = config.tstate_max = tsActive;
|
||||||
|
config.perform_mapping();
|
||||||
|
config.finish_mapping();
|
||||||
|
mapeditor::initdraw(cwt.c);
|
||||||
|
pushScreen(showMenu);
|
||||||
|
pushScreen(mapeditor::showDrawEditor);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if(uni == 'g') {
|
||||||
|
popScreenAll();
|
||||||
|
resetModes('c');
|
||||||
|
clearMessages();
|
||||||
|
welcomeMessage();
|
||||||
|
pushScreen(showEuclideanMenu);
|
||||||
|
ewhichscreen = 2;
|
||||||
|
}
|
||||||
|
else if(uni == 'c' || uni == 'i' || uni == 's' || uni == 'C' || uni == '7') {
|
||||||
|
if(uni == 'C' && !chaosUnlocked) {
|
||||||
|
help_nochaos();
|
||||||
|
return;
|
||||||
|
}
|
||||||
popScreenAll();
|
popScreenAll();
|
||||||
resetModes(uni);
|
resetModes(uni);
|
||||||
clearMessages();
|
clearMessages();
|
||||||
|
Loading…
Reference in New Issue
Block a user