From 41ccb86c8cfa9ac83b6d6422093646eebf9efafd Mon Sep 17 00:00:00 2001 From: Zeno Rogue Date: Fri, 12 Aug 2022 09:09:38 +0200 Subject: [PATCH] rogueviz:: various minor fixes to presentations --- rogueviz/fifteen.cpp | 2 ++ rogueviz/highdim-demo.cpp | 2 -- rogueviz/noniso-honeycombs.cpp | 9 ++++----- rogueviz/notknot.cpp | 4 ++-- rogueviz/playing-with-impossibility.cpp | 19 +++++++++++++------ rogueviz/rogueviz.cpp | 2 +- 6 files changed, 22 insertions(+), 16 deletions(-) diff --git a/rogueviz/fifteen.cpp b/rogueviz/fifteen.cpp index f7f16294..8d2de859 100644 --- a/rogueviz/fifteen.cpp +++ b/rogueviz/fifteen.cpp @@ -474,8 +474,10 @@ auto fifteen_hook = slide_backup(mapeditor::drawplayer, mapeditor::drawplayer); slide_backup(vid.wallmode, 2); slide_backup(pconf.scale, .6); + slide_backup(no_find_player, true); stop_game(); mapstream::loadMap(fname); + popScreenAll(); fullcenter(); if(lev == "coiled" || lev == "mobiusband") View = spin(90*degree) * View; diff --git a/rogueviz/highdim-demo.cpp b/rogueviz/highdim-demo.cpp index 5540bb10..df2de4bc 100644 --- a/rogueviz/highdim-demo.cpp +++ b/rogueviz/highdim-demo.cpp @@ -248,7 +248,6 @@ void sync(int mode, flagtype flags) { vid.use_smart_range = 2; crystal::view_coordinates = (flags & VC); smooth_scrolling = true; - tour::slide_backup(game_keys_scroll, true); } if(mode == pmKey && !(flags & NO_VC)) crystal::view_coordinates = !crystal::view_coordinates; @@ -405,7 +404,6 @@ auto explore_structure(int _shapeid) { if(mode == pmStart) { tour::slide_backup(mapeditor::drawplayer, false); tour::slide_backup(smooth_scrolling, true); - tour::slide_backup(game_keys_scroll, true); stop_game(); set_geometry(geometry == gCrystal534 ? gCrystal534 : gCrystal344); enable_canvas(); diff --git a/rogueviz/noniso-honeycombs.cpp b/rogueviz/noniso-honeycombs.cpp index 123595f9..00227881 100644 --- a/rogueviz/noniso-honeycombs.cpp +++ b/rogueviz/noniso-honeycombs.cpp @@ -11,8 +11,8 @@ bool in_special = false; auto geoslide(eGeometry g, char canvas, int jhole, int jblock) { using namespace tour; return [=] (presmode mode) { + setCanvas(mode, '0'); if(mode == pmStart) { - stop_game(); set_geometry(g); if(g == gSphere) { set_geometry(gProduct); @@ -25,7 +25,6 @@ auto geoslide(eGeometry g, char canvas, int jhole, int jblock) { tour::slide_backup(sightranges[gSol], 7); tour::slide_backup(sightranges[gSpace435], 7); vid.texture_step = 4; - enable_canvas(); tour::slide_backup(patterns::jhole, jhole); tour::slide_backup(patterns::rwalls, jhole); tour::slide_backup(patterns::jblock, jblock); @@ -156,13 +155,13 @@ tour::slide *gen_noniso_demo() { noniso_slides.clear(); using namespace tour; noniso_slides.emplace_back( - slide{"Non-isotropic geometry demo", 999, LEGAL::NONE | QUICKSKIP, + slide{"Non-isotropic geometry demo", 999, LEGAL::NONE | QUICKSKIP | QUICKGEO, "This is a presentation of non-isotropic geometries.", [] (presmode mode) { slide_url(mode, 'p', "paper about non-isotropic geometries", "https://arxiv.org/abs/2002.09533"); + setCanvas(mode, 'r'); if(mode == pmStart) { - stop_game(); - set_geometry(gCubeTiling); + set_geometry(gCubeTiling); start_game(); } } diff --git a/rogueviz/notknot.cpp b/rogueviz/notknot.cpp index 3b737c8c..09e7629c 100644 --- a/rogueviz/notknot.cpp +++ b/rogueviz/notknot.cpp @@ -1434,7 +1434,7 @@ void portal_slideshow(tour::ss::slideshow_callback cb) { auto add = [&] (string s, string text, string youtube, reaction_t act) { portal_slides.emplace_back( - tour::slide{s, 100, LEGAL::NONE | QUICKGEO | QUICKSKIP, text, + tour::slide{s, 100, LEGAL::NONE | QUICKGEO | QUICKSKIP | ALWAYS_TEXT, text, [=] (presmode mode) { setCanvas(mode, '0'); if(youtube != "") @@ -1488,7 +1488,7 @@ void portal_slideshow(tour::ss::slideshow_callback cb) { add("self-hiding portal", "This knotted portal is 'self-hiding'. It appears that the portal enters itself and disappears!", "https://www.youtube.com/watch?v=vFLZ2NGtuGw", launch_euc_with(true)); add("non-Euclidean portal in Nil", "A portal in Nil geometry.", "https://www.youtube.com/watch?v=2K-v8tK68AE", launch_nil); add("spherical portal", "A portal in spherical geometry. Such a portal lets us create a space with spherical geometry that has more volume than the sphere.", "https://www.youtube.com/watch?v=PerPeQFu5gw", launch_sphere); - add("kontted spherical portal", "A knotted portal in spherical geometry.", "https://www.youtube.com/watch?v=PerPeQFu5gw", launch_sphereknot); + add("knotted spherical portal", "A knotted portal in spherical geometry.", "https://www.youtube.com/watch?v=PerPeQFu5gw", launch_sphereknot); add("Cat Portal in Solv", "A portal in Solv geometry. The honeycomb is based on the mapping torus of Arnold's cat mapping.", "https://www.youtube.com/watch?v=CGiSxC9B6i0", launch_solv); callhooks(rogueviz::pres::hooks_build_rvtour, "portal", portal_slides); diff --git a/rogueviz/playing-with-impossibility.cpp b/rogueviz/playing-with-impossibility.cpp index 2d94969d..94c48a07 100644 --- a/rogueviz/playing-with-impossibility.cpp +++ b/rogueviz/playing-with-impossibility.cpp @@ -901,11 +901,11 @@ slide dmv_slides[] = { dialog::display(); return true; }); - no_other_hud(mode); + non_game_slide_scroll(mode); } }, - {"Compasses in Nil", 123, LEGAL::ANY, + {"Compasses in Nil", 123, LEGAL::ANY | QUICKGEO, "However, it turns out that there actually exists a non-Euclidean geometry, " "known as the Nil geometry, where constructions such as Penrose staircases and " "triangles naturally appear!\n\n" @@ -952,7 +952,7 @@ slide dmv_slides[] = { } }, - {"Cartesian coordinates", 999, LEGAL::NONE, + {"Cartesian coordinates", 999, LEGAL::NONE | QUICKGEO, "The puzzle shows an important fact: every point on Earth has defined directions " "(North, East, South, West), and in most life situations, we can assume that these " "directions work the same as in the Cartesian system of coordinates." @@ -963,7 +963,7 @@ slide dmv_slides[] = { no_other_hud(mode); } }, - {"Nil coordinates", 999, LEGAL::NONE, + {"Nil coordinates", 999, LEGAL::NONE | QUICKGEO, "However, because Earth is curved (non-Euclidean), these directions actually " "work different! If you are closer to the pole, moving East or West changes " "your longitude much more quickly.\n\n" @@ -981,7 +981,7 @@ slide dmv_slides[] = { no_other_hud(mode); } }, - {"Nil coordinates (area)", 999, LEGAL::NONE, + {"Nil coordinates (area)", 999, LEGAL::NONE | QUICKGEO, "The formulas look strange at a first glance, but the idea is actually simple: " "the change in the 'z' coordinate is the area of a triangle, as shown in the picture. " "The change is positive if we go counterclockwise, and negative if we go clockwise.\n\n" @@ -992,7 +992,7 @@ slide dmv_slides[] = { no_other_hud(mode); } }, - {"Nil coordinates (loop)", 999, LEGAL::NONE, + {"Nil coordinates (loop)", 999, LEGAL::NONE | QUICKGEO, "If we make a tour in Nil moving only in the directions N, W, S, E, such that " "the analogous tour in Euclidean space would return us to the starting point, " "then the tour in Nil would return us directly above or below the starting point, " @@ -1011,6 +1011,7 @@ slide dmv_slides[] = { , [] (presmode mode) { brick_slide(0, mode, gCubeTiling, mdHorocyclic, 0); + non_game_slide_scroll(mode); } }, {"Simple Penrose stairs in Nil", 999, LEGAL::NONE | QUICKGEO, @@ -1022,6 +1023,7 @@ slide dmv_slides[] = { [] (presmode mode) { brick_slide(0, mode, gNil, mdHorocyclic, 0); if(mode == pmKey) bricks::animation = !bricks::animation; + non_game_slide_scroll(mode); } }, {"Simple Penrose stairs in Nil (FPP)", 999, LEGAL::NONE | QUICKGEO, @@ -1135,6 +1137,7 @@ slide dmv_slides[] = { } return false; }); + non_game_slide_scroll(mode); // pmodel = (pmodel == mdGeodesic ? mdPerspective : mdGeodesic); } }, @@ -1145,6 +1148,7 @@ slide dmv_slides[] = { brick_slide(1, mode, gNil, mdHorocyclic, 1); // if(mode == pmKey) DRAW // pmodel = (pmodel == mdGeodesic ? mdPerspective : mdGeodesic); + non_game_slide_scroll(mode); } }, {"Penrose triangle (FPP)", 999, LEGAL::NONE | QUICKGEO, @@ -1187,6 +1191,7 @@ slide dmv_slides[] = { , [] (presmode mode) { impossible_ring_slide(mode); + non_game_slide_scroll(mode); } }, {"impossible ring in Nil", 18, LEGAL::NONE | QUICKGEO, @@ -1234,6 +1239,7 @@ slide dmv_slides[] = { , [] (presmode mode) { brick_slide(2, mode, gCubeTiling, mdHorocyclic, 0); + non_game_slide_scroll(mode); } }, {"two Penrose triangles (Nil)", 999, LEGAL::NONE | QUICKGEO, @@ -1244,6 +1250,7 @@ slide dmv_slides[] = { "triangles with two different orientations.", [] (presmode mode) { brick_slide(2, mode, gNil, mdHorocyclic, 0); + non_game_slide_scroll(mode); } }, diff --git a/rogueviz/rogueviz.cpp b/rogueviz/rogueviz.cpp index 128f2d1b..5bdbf785 100644 --- a/rogueviz/rogueviz.cpp +++ b/rogueviz/rogueviz.cpp @@ -666,7 +666,7 @@ bool drawVertex(const shiftmatrix &V, cell *c, shmup::monster *m) { } - if(showlabels) { + if(showlabels && !darken) { bool doshow = true; if((vizflags & RV_COMPRESS_LABELS) && i > 0 && !vd.virt) { vertexdata& vdp = vdata[vd.data];