mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-09-05 11:57:58 +00:00
rv:: portal demos now organized into a separate presentation
This commit is contained in:
@@ -481,34 +481,49 @@ auto hooks =
|
||||
0xFFFDD0, 0xFFD080
|
||||
};
|
||||
})
|
||||
+ addHook_rvslides(191, [] (string s, vector<tour::slide>& v) {
|
||||
if(s != "mixed") return;
|
||||
v.push_back(tour::slide{
|
||||
"inter-geometric portals", 10, tour::LEGAL::NONE | tour::QUICKSKIP | tour::QUICKGEO,
|
||||
"Portals between different geometries.\n"
|
||||
"These levels take some time to load, so you need to load them using the buttons below."
|
||||
,
|
||||
[] (tour::presmode mode) {
|
||||
setCanvas(mode, '0');
|
||||
slide_url(mode, 'y', "portals (YouTube)", "https://youtu.be/yqUv2JO2BCs");
|
||||
slide_url(mode, 't', "portals (Twitter)", "https://twitter.com/ZenoRogue/status/1496867204419452935");
|
||||
using namespace tour;
|
||||
auto load = [&] (string s, ld x) {
|
||||
return [s, x] {
|
||||
slide_backup(vid.cells_drawn_limit, 100);
|
||||
slide_backup(smooth_scrolling, true);
|
||||
slide_backup(ray::max_cells, 999999);
|
||||
slide_backup(walking::on, true);
|
||||
slide_backup(walking::eye_level, x);
|
||||
mapstream::loadMap(s);
|
||||
};
|
||||
};
|
||||
slide_action(mode, 'p', "load portals", load("portalscene3.lev", 0.2174492));
|
||||
slide_url(mode, 'C', "curved landscape (Twitter)", "https://twitter.com/ZenoRogue/status/1446127100516130826");
|
||||
slide_action(mode, 'c', "load curved landscape", load("solv-h3-scene.lev", 0.05));
|
||||
}
|
||||
});
|
||||
});
|
||||
+ addHook_rvslides(10, ([] (string s, vector<tour::slide>& v) {
|
||||
println(hlog, "called with s='", s, "'");
|
||||
if(s != "portal") return;
|
||||
|
||||
using namespace tour;
|
||||
auto load = [] (string s, ld x, int y) {
|
||||
return [s, x, y] {
|
||||
slide_backup(vid.cells_drawn_limit, 100);
|
||||
slide_backup(smooth_scrolling, true);
|
||||
slide_backup(ray::max_cells, 999999);
|
||||
slide_backup(walking::on, true);
|
||||
slide_backup(walking::eye_level, x);
|
||||
mapstream::loadMap(s);
|
||||
slide_backup(ray::fixed_map, true);
|
||||
slide_backup(ray::max_iter_intra, y);
|
||||
};
|
||||
};
|
||||
|
||||
auto add = [&] (string s, string desc, string youtube, string twitter, reaction_t loader) {
|
||||
v.push_back(tour::slide{
|
||||
s, 10, tour::LEGAL::NONE | tour::QUICKSKIP | tour::QUICKGEO, desc,
|
||||
[=] (tour::presmode mode) {
|
||||
setCanvas(mode, '0');
|
||||
if(youtube != "")
|
||||
slide_url(mode, 'y', "YouTube link", youtube);
|
||||
if(twitter != "")
|
||||
slide_url(mode, 't', "Twitter link", twitter);
|
||||
slide_action(mode, 'r', "run this visualization", loader);
|
||||
if(mode == tour::pmKey) pushScreen(intra::show_portals);
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
add("inter-geometric portals",
|
||||
"In this world we can find portals between six different geometries. The camera is in 'walking mode' i.e. restricted to keep close to the floor (this can be disabled with '5').",
|
||||
"https://youtu.be/yqUv2JO2BCs", "https://twitter.com/ZenoRogue/status/1496867204419452935",
|
||||
load("portalscene3.lev", 0.2174492, 600)
|
||||
);
|
||||
add("curved landscape",
|
||||
"Here we create portals between Solv and H3 geometries, resulting in a scene looking a bit like a curved landscape.",
|
||||
"", "https://twitter.com/ZenoRogue/status/1446127100516130826",
|
||||
load("solv-h3-scene.lev", 0.05, 3000));
|
||||
}));
|
||||
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user