mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-01-23 15:36:59 +00:00
rogueviz:: various minor fixes to presentations
This commit is contained in:
parent
d5467eb379
commit
41ccb86c8c
@ -474,8 +474,10 @@ auto fifteen_hook =
|
|||||||
slide_backup(mapeditor::drawplayer, mapeditor::drawplayer);
|
slide_backup(mapeditor::drawplayer, mapeditor::drawplayer);
|
||||||
slide_backup(vid.wallmode, 2);
|
slide_backup(vid.wallmode, 2);
|
||||||
slide_backup(pconf.scale, .6);
|
slide_backup(pconf.scale, .6);
|
||||||
|
slide_backup(no_find_player, true);
|
||||||
stop_game();
|
stop_game();
|
||||||
mapstream::loadMap(fname);
|
mapstream::loadMap(fname);
|
||||||
|
popScreenAll();
|
||||||
fullcenter();
|
fullcenter();
|
||||||
if(lev == "coiled" || lev == "mobiusband")
|
if(lev == "coiled" || lev == "mobiusband")
|
||||||
View = spin(90*degree) * View;
|
View = spin(90*degree) * View;
|
||||||
|
@ -248,7 +248,6 @@ void sync(int mode, flagtype flags) {
|
|||||||
vid.use_smart_range = 2;
|
vid.use_smart_range = 2;
|
||||||
crystal::view_coordinates = (flags & VC);
|
crystal::view_coordinates = (flags & VC);
|
||||||
smooth_scrolling = true;
|
smooth_scrolling = true;
|
||||||
tour::slide_backup(game_keys_scroll, true);
|
|
||||||
}
|
}
|
||||||
if(mode == pmKey && !(flags & NO_VC))
|
if(mode == pmKey && !(flags & NO_VC))
|
||||||
crystal::view_coordinates = !crystal::view_coordinates;
|
crystal::view_coordinates = !crystal::view_coordinates;
|
||||||
@ -405,7 +404,6 @@ auto explore_structure(int _shapeid) {
|
|||||||
if(mode == pmStart) {
|
if(mode == pmStart) {
|
||||||
tour::slide_backup(mapeditor::drawplayer, false);
|
tour::slide_backup(mapeditor::drawplayer, false);
|
||||||
tour::slide_backup(smooth_scrolling, true);
|
tour::slide_backup(smooth_scrolling, true);
|
||||||
tour::slide_backup(game_keys_scroll, true);
|
|
||||||
stop_game();
|
stop_game();
|
||||||
set_geometry(geometry == gCrystal534 ? gCrystal534 : gCrystal344);
|
set_geometry(geometry == gCrystal534 ? gCrystal534 : gCrystal344);
|
||||||
enable_canvas();
|
enable_canvas();
|
||||||
|
@ -11,8 +11,8 @@ bool in_special = false;
|
|||||||
auto geoslide(eGeometry g, char canvas, int jhole, int jblock) {
|
auto geoslide(eGeometry g, char canvas, int jhole, int jblock) {
|
||||||
using namespace tour;
|
using namespace tour;
|
||||||
return [=] (presmode mode) {
|
return [=] (presmode mode) {
|
||||||
|
setCanvas(mode, '0');
|
||||||
if(mode == pmStart) {
|
if(mode == pmStart) {
|
||||||
stop_game();
|
|
||||||
set_geometry(g);
|
set_geometry(g);
|
||||||
if(g == gSphere) {
|
if(g == gSphere) {
|
||||||
set_geometry(gProduct);
|
set_geometry(gProduct);
|
||||||
@ -25,7 +25,6 @@ auto geoslide(eGeometry g, char canvas, int jhole, int jblock) {
|
|||||||
tour::slide_backup<ld>(sightranges[gSol], 7);
|
tour::slide_backup<ld>(sightranges[gSol], 7);
|
||||||
tour::slide_backup<ld>(sightranges[gSpace435], 7);
|
tour::slide_backup<ld>(sightranges[gSpace435], 7);
|
||||||
vid.texture_step = 4;
|
vid.texture_step = 4;
|
||||||
enable_canvas();
|
|
||||||
tour::slide_backup(patterns::jhole, jhole);
|
tour::slide_backup(patterns::jhole, jhole);
|
||||||
tour::slide_backup(patterns::rwalls, jhole);
|
tour::slide_backup(patterns::rwalls, jhole);
|
||||||
tour::slide_backup(patterns::jblock, jblock);
|
tour::slide_backup(patterns::jblock, jblock);
|
||||||
@ -156,12 +155,12 @@ tour::slide *gen_noniso_demo() {
|
|||||||
noniso_slides.clear();
|
noniso_slides.clear();
|
||||||
using namespace tour;
|
using namespace tour;
|
||||||
noniso_slides.emplace_back(
|
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.",
|
"This is a presentation of non-isotropic geometries.",
|
||||||
[] (presmode mode) {
|
[] (presmode mode) {
|
||||||
slide_url(mode, 'p', "paper about non-isotropic geometries", "https://arxiv.org/abs/2002.09533");
|
slide_url(mode, 'p', "paper about non-isotropic geometries", "https://arxiv.org/abs/2002.09533");
|
||||||
|
setCanvas(mode, 'r');
|
||||||
if(mode == pmStart) {
|
if(mode == pmStart) {
|
||||||
stop_game();
|
|
||||||
set_geometry(gCubeTiling);
|
set_geometry(gCubeTiling);
|
||||||
start_game();
|
start_game();
|
||||||
}
|
}
|
||||||
|
@ -1434,7 +1434,7 @@ void portal_slideshow(tour::ss::slideshow_callback cb) {
|
|||||||
auto add = [&] (string s, string text, string youtube, reaction_t act) {
|
auto add = [&] (string s, string text, string youtube, reaction_t act) {
|
||||||
|
|
||||||
portal_slides.emplace_back(
|
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) {
|
[=] (presmode mode) {
|
||||||
setCanvas(mode, '0');
|
setCanvas(mode, '0');
|
||||||
if(youtube != "")
|
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("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("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("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);
|
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);
|
callhooks(rogueviz::pres::hooks_build_rvtour, "portal", portal_slides);
|
||||||
|
@ -901,11 +901,11 @@ slide dmv_slides[] = {
|
|||||||
dialog::display();
|
dialog::display();
|
||||||
return true;
|
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, "
|
"However, it turns out that there actually exists a non-Euclidean geometry, "
|
||||||
"known as the Nil geometry, where constructions such as Penrose staircases and "
|
"known as the Nil geometry, where constructions such as Penrose staircases and "
|
||||||
"triangles naturally appear!\n\n"
|
"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 "
|
"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 "
|
"(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."
|
"directions work the same as in the Cartesian system of coordinates."
|
||||||
@ -963,7 +963,7 @@ slide dmv_slides[] = {
|
|||||||
no_other_hud(mode);
|
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 "
|
"However, because Earth is curved (non-Euclidean), these directions actually "
|
||||||
"work different! If you are closer to the pole, moving East or West changes "
|
"work different! If you are closer to the pole, moving East or West changes "
|
||||||
"your longitude much more quickly.\n\n"
|
"your longitude much more quickly.\n\n"
|
||||||
@ -981,7 +981,7 @@ slide dmv_slides[] = {
|
|||||||
no_other_hud(mode);
|
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 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 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"
|
"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);
|
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 "
|
"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, "
|
"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, "
|
"then the tour in Nil would return us directly above or below the starting point, "
|
||||||
@ -1011,6 +1011,7 @@ slide dmv_slides[] = {
|
|||||||
,
|
,
|
||||||
[] (presmode mode) {
|
[] (presmode mode) {
|
||||||
brick_slide(0, mode, gCubeTiling, mdHorocyclic, 0);
|
brick_slide(0, mode, gCubeTiling, mdHorocyclic, 0);
|
||||||
|
non_game_slide_scroll(mode);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{"Simple Penrose stairs in Nil", 999, LEGAL::NONE | QUICKGEO,
|
{"Simple Penrose stairs in Nil", 999, LEGAL::NONE | QUICKGEO,
|
||||||
@ -1022,6 +1023,7 @@ slide dmv_slides[] = {
|
|||||||
[] (presmode mode) {
|
[] (presmode mode) {
|
||||||
brick_slide(0, mode, gNil, mdHorocyclic, 0);
|
brick_slide(0, mode, gNil, mdHorocyclic, 0);
|
||||||
if(mode == pmKey) bricks::animation = !bricks::animation;
|
if(mode == pmKey) bricks::animation = !bricks::animation;
|
||||||
|
non_game_slide_scroll(mode);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{"Simple Penrose stairs in Nil (FPP)", 999, LEGAL::NONE | QUICKGEO,
|
{"Simple Penrose stairs in Nil (FPP)", 999, LEGAL::NONE | QUICKGEO,
|
||||||
@ -1135,6 +1137,7 @@ slide dmv_slides[] = {
|
|||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
|
non_game_slide_scroll(mode);
|
||||||
// pmodel = (pmodel == mdGeodesic ? mdPerspective : mdGeodesic);
|
// pmodel = (pmodel == mdGeodesic ? mdPerspective : mdGeodesic);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -1145,6 +1148,7 @@ slide dmv_slides[] = {
|
|||||||
brick_slide(1, mode, gNil, mdHorocyclic, 1);
|
brick_slide(1, mode, gNil, mdHorocyclic, 1);
|
||||||
// if(mode == pmKey) DRAW
|
// if(mode == pmKey) DRAW
|
||||||
// pmodel = (pmodel == mdGeodesic ? mdPerspective : mdGeodesic);
|
// pmodel = (pmodel == mdGeodesic ? mdPerspective : mdGeodesic);
|
||||||
|
non_game_slide_scroll(mode);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{"Penrose triangle (FPP)", 999, LEGAL::NONE | QUICKGEO,
|
{"Penrose triangle (FPP)", 999, LEGAL::NONE | QUICKGEO,
|
||||||
@ -1187,6 +1191,7 @@ slide dmv_slides[] = {
|
|||||||
,
|
,
|
||||||
[] (presmode mode) {
|
[] (presmode mode) {
|
||||||
impossible_ring_slide(mode);
|
impossible_ring_slide(mode);
|
||||||
|
non_game_slide_scroll(mode);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{"impossible ring in Nil", 18, LEGAL::NONE | QUICKGEO,
|
{"impossible ring in Nil", 18, LEGAL::NONE | QUICKGEO,
|
||||||
@ -1234,6 +1239,7 @@ slide dmv_slides[] = {
|
|||||||
,
|
,
|
||||||
[] (presmode mode) {
|
[] (presmode mode) {
|
||||||
brick_slide(2, mode, gCubeTiling, mdHorocyclic, 0);
|
brick_slide(2, mode, gCubeTiling, mdHorocyclic, 0);
|
||||||
|
non_game_slide_scroll(mode);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{"two Penrose triangles (Nil)", 999, LEGAL::NONE | QUICKGEO,
|
{"two Penrose triangles (Nil)", 999, LEGAL::NONE | QUICKGEO,
|
||||||
@ -1244,6 +1250,7 @@ slide dmv_slides[] = {
|
|||||||
"triangles with two different orientations.",
|
"triangles with two different orientations.",
|
||||||
[] (presmode mode) {
|
[] (presmode mode) {
|
||||||
brick_slide(2, mode, gNil, mdHorocyclic, 0);
|
brick_slide(2, mode, gNil, mdHorocyclic, 0);
|
||||||
|
non_game_slide_scroll(mode);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -666,7 +666,7 @@ bool drawVertex(const shiftmatrix &V, cell *c, shmup::monster *m) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if(showlabels) {
|
if(showlabels && !darken) {
|
||||||
bool doshow = true;
|
bool doshow = true;
|
||||||
if((vizflags & RV_COMPRESS_LABELS) && i > 0 && !vd.virt) {
|
if((vizflags & RV_COMPRESS_LABELS) && i > 0 && !vd.virt) {
|
||||||
vertexdata& vdp = vdata[vd.data];
|
vertexdata& vdp = vdata[vd.data];
|
||||||
|
Loading…
Reference in New Issue
Block a user