1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-11-27 22:39:53 +00:00

rogueviz::notknot:: neater structure

This commit is contained in:
Zeno Rogue 2021-03-31 15:19:03 +02:00
parent 9d52b1b092
commit 4539de3ae0

View File

@ -1155,20 +1155,7 @@ void regenerate() {
bool show_selfhiding = true;
void show() {
cmode = sm::SIDE | sm::MAYDARK;
gamescreen(0);
dialog::init(XLAT("notknot"), 0xFFFFFFFF, 150, 0);
dialog::addItem("available scenes", 'a');
dialog::add_action_push([] {
cmode = sm::SIDE | sm::MAYDARK;
gamescreen(0);
dialog::init(XLAT("notknot scenes"), 0xFFFFFFFF, 150, 0);
dialog::addItem("knot portal in Euclidean geometry", 'a');
dialog::add_action([] {
void launch_euc() {
stop_game();
set_geometry(gCubeTiling);
base = gCubeTiling;
@ -1184,10 +1171,9 @@ void show() {
ray::volumetric::on = false;
ray::exp_decay_poly = 30;
pmodel = mdPerspective;
});
}
dialog::addItem("Penrose staircase portal in Nil geometry", 'b');
dialog::add_action([] {
void launch_nil() {
stop_game();
set_geometry(gNil);
base_map = "";
@ -1207,10 +1193,9 @@ void show() {
ray::exp_decay_poly = 3;
camera_speed = 1;
pmodel = mdGeodesic;
});
}
dialog::addItem("great circle portal in spherical geometry", 'c');
dialog::add_action([] {
void launch_sphere() {
stop_game();
set_geometry(gCell120);
base_map = "spherring.lev";
@ -1229,10 +1214,9 @@ void show() {
mapeditor::drawplayer = false;
pmodel = mdPerspective;
((hrmap_notknot*)currentmap)->add_fog();
});
}
dialog::addItem("knotted portal in spherical geometry", 'd');
dialog::add_action([] {
void launch_sphereknot() {
stop_game();
set_geometry(gCell600);
base_map = "spherknot.lev";
@ -1249,10 +1233,9 @@ void show() {
mapeditor::drawplayer = false;
pmodel = mdPerspective;
((hrmap_notknot*)currentmap)->add_fog();
});
}
dialog::addItem("a portal in Solv geometry", 'e');
dialog::add_action([] {
void launch_solv() {
stop_game();
set_geometry(gArnoldCat);
base_map = "";
@ -1274,7 +1257,34 @@ void show() {
camera_speed = 1;
pmodel = mdGeodesic;
((hrmap_notknot*)currentmap)->add_fog();
});
}
void show() {
cmode = sm::SIDE | sm::MAYDARK;
gamescreen(0);
dialog::init(XLAT("notknot"), 0xFFFFFFFF, 150, 0);
dialog::addItem("available scenes", 'a');
dialog::add_action_push([] {
cmode = sm::SIDE | sm::MAYDARK;
gamescreen(0);
dialog::init(XLAT("notknot scenes"), 0xFFFFFFFF, 150, 0);
dialog::addItem("knot portal in Euclidean geometry", 'a');
dialog::add_action(launch_euc);
dialog::addItem("Penrose staircase portal in Nil geometry", 'b');
dialog::add_action(launch_nil);
dialog::addItem("great circle portal in spherical geometry", 'c');
dialog::add_action(launch_sphere);
dialog::addItem("knotted portal in spherical geometry", 'd');
dialog::add_action(launch_sphereknot);
dialog::addItem("a portal in Solv geometry", 'e');
dialog::add_action(launch_solv);
dialog::display();
});