1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-11-30 15:39:54 +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; bool show_selfhiding = true;
void show() { void launch_euc() {
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([] {
stop_game(); stop_game();
set_geometry(gCubeTiling); set_geometry(gCubeTiling);
base = gCubeTiling; base = gCubeTiling;
@ -1184,10 +1171,9 @@ void show() {
ray::volumetric::on = false; ray::volumetric::on = false;
ray::exp_decay_poly = 30; ray::exp_decay_poly = 30;
pmodel = mdPerspective; pmodel = mdPerspective;
}); }
dialog::addItem("Penrose staircase portal in Nil geometry", 'b'); void launch_nil() {
dialog::add_action([] {
stop_game(); stop_game();
set_geometry(gNil); set_geometry(gNil);
base_map = ""; base_map = "";
@ -1207,10 +1193,9 @@ void show() {
ray::exp_decay_poly = 3; ray::exp_decay_poly = 3;
camera_speed = 1; camera_speed = 1;
pmodel = mdGeodesic; pmodel = mdGeodesic;
}); }
dialog::addItem("great circle portal in spherical geometry", 'c'); void launch_sphere() {
dialog::add_action([] {
stop_game(); stop_game();
set_geometry(gCell120); set_geometry(gCell120);
base_map = "spherring.lev"; base_map = "spherring.lev";
@ -1229,10 +1214,9 @@ void show() {
mapeditor::drawplayer = false; mapeditor::drawplayer = false;
pmodel = mdPerspective; pmodel = mdPerspective;
((hrmap_notknot*)currentmap)->add_fog(); ((hrmap_notknot*)currentmap)->add_fog();
}); }
dialog::addItem("knotted portal in spherical geometry", 'd'); void launch_sphereknot() {
dialog::add_action([] {
stop_game(); stop_game();
set_geometry(gCell600); set_geometry(gCell600);
base_map = "spherknot.lev"; base_map = "spherknot.lev";
@ -1249,10 +1233,9 @@ void show() {
mapeditor::drawplayer = false; mapeditor::drawplayer = false;
pmodel = mdPerspective; pmodel = mdPerspective;
((hrmap_notknot*)currentmap)->add_fog(); ((hrmap_notknot*)currentmap)->add_fog();
}); }
dialog::addItem("a portal in Solv geometry", 'e'); void launch_solv() {
dialog::add_action([] {
stop_game(); stop_game();
set_geometry(gArnoldCat); set_geometry(gArnoldCat);
base_map = ""; base_map = "";
@ -1274,7 +1257,34 @@ void show() {
camera_speed = 1; camera_speed = 1;
pmodel = mdGeodesic; pmodel = mdGeodesic;
((hrmap_notknot*)currentmap)->add_fog(); ((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(); dialog::display();
}); });