mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2024-09-28 14:08:40 +00:00
rogueviz::hypcity:: presentation
This commit is contained in:
parent
c4b059192f
commit
dc66fe836e
@ -99,6 +99,62 @@ void enable() {
|
|||||||
add_model_settings();
|
add_model_settings();
|
||||||
}
|
}
|
||||||
|
|
||||||
auto hypcity_ah = arg::add3("-hypcity", enable);
|
auto hypcity_ah = arg::add3("-hypcity", enable)
|
||||||
|
+ addHook(tour::ss::hooks_extra_slideshows, 120, [] (tour::ss::slideshow_callback cb) {
|
||||||
|
|
||||||
|
using namespace rogueviz::pres;
|
||||||
|
static vector<slide> hypcity_slides;
|
||||||
|
|
||||||
|
if(hypcity_slides.empty()) {
|
||||||
|
hypcity_slides.emplace_back(
|
||||||
|
slide{"Introduction", 999, LEGAL::NONE,
|
||||||
|
"Here we put a 3D model of a city into various geometries. Don't forget to try changing RogueViz projection and view range settings!\n\n"
|
||||||
|
"Model by Emile Johansson, downloaded from: https://sketchfab.com/3d-models/night-city-p2-82637933a7cb4fafadb0e2a79415c438\n\n"
|
||||||
|
"Thanks to Nico Belmonte for the idea of using this model.\n\n"
|
||||||
|
"Remember to try different projections (press '1')!"
|
||||||
|
,
|
||||||
|
[] (presmode mode) {}
|
||||||
|
});
|
||||||
|
|
||||||
|
auto add = [&] (string s, string text, int dim, reaction_t setter) {
|
||||||
|
hypcity_slides.emplace_back(
|
||||||
|
tour::slide{s, 100, LEGAL::NONE | QUICKGEO, text,
|
||||||
|
[=] (presmode mode) {
|
||||||
|
if(mode == pmStart && dim == 2 && !vid.always3) {
|
||||||
|
geom3::switch_fpp();
|
||||||
|
}
|
||||||
|
setCanvas(mode, '0');
|
||||||
|
if(mode == pmStart) {
|
||||||
|
// slide_backup(canvas_default_wall, waInvisibleFloor);
|
||||||
|
if(dim == 2) slide_backup(vid.camera, 0);
|
||||||
|
if(dim == 2) slide_backup(vid.depth, 0);
|
||||||
|
slide_backup(context_fog, false);
|
||||||
|
setter();
|
||||||
|
start_game();
|
||||||
|
enable();
|
||||||
|
}
|
||||||
|
}});
|
||||||
|
};
|
||||||
|
|
||||||
|
add("hyperbolic", "Hyperbolic geometry.", 2, [] {
|
||||||
|
set_geometry(g45);
|
||||||
|
gp::param = {1, 1};
|
||||||
|
set_variation(eVariation::unrectified);
|
||||||
|
});
|
||||||
|
add("spherical", "Spherical geometry.", 2, [] {
|
||||||
|
set_geometry(gSmallSphere);
|
||||||
|
set_variation(eVariation::pure);
|
||||||
|
});
|
||||||
|
add("Nil", "Nil geometry.", 3, [] {
|
||||||
|
set_geometry(gNil);
|
||||||
|
});
|
||||||
|
add("Solv", "Solv geometry.", 3, [] {
|
||||||
|
set_geometry(gSol);
|
||||||
|
});
|
||||||
|
add_end(hypcity_slides);
|
||||||
|
}
|
||||||
|
|
||||||
|
cb(XLAT("non-Euclidean city"), &hypcity_slides[0], 'c');
|
||||||
|
});
|
||||||
|
|
||||||
}}
|
}}
|
||||||
|
Loading…
Reference in New Issue
Block a user