mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-06-06 08:24:06 +00:00
rogueviz::pres::non_game_slide_scroll
This commit is contained in:
parent
1f832faeba
commit
f138bbb5c2
@ -248,6 +248,7 @@ 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;
|
||||||
@ -404,6 +405,7 @@ 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();
|
||||||
|
@ -124,10 +124,8 @@ auto hypcity_ah = arg::add3("-hypcity", enable)
|
|||||||
geom3::switch_fpp();
|
geom3::switch_fpp();
|
||||||
}
|
}
|
||||||
setCanvas(mode, '0');
|
setCanvas(mode, '0');
|
||||||
slide_backup(mapeditor::drawplayer, false);
|
|
||||||
if(mode == pmStart) {
|
if(mode == pmStart) {
|
||||||
slide_backup(canvas_default_wall, waInvisibleFloor);
|
slide_backup(canvas_default_wall, waInvisibleFloor);
|
||||||
slide_backup(smooth_scrolling, 1);
|
|
||||||
if(dim == 2) slide_backup(vid.camera, 0);
|
if(dim == 2) slide_backup(vid.camera, 0);
|
||||||
if(dim == 2) slide_backup(vid.depth, 0);
|
if(dim == 2) slide_backup(vid.depth, 0);
|
||||||
slide_backup(context_fog, false);
|
slide_backup(context_fog, false);
|
||||||
@ -135,6 +133,7 @@ auto hypcity_ah = arg::add3("-hypcity", enable)
|
|||||||
start_game();
|
start_game();
|
||||||
enable();
|
enable();
|
||||||
}
|
}
|
||||||
|
non_game_slide_scroll(mode);
|
||||||
}});
|
}});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -489,15 +489,12 @@ auto hooks =
|
|||||||
auto load = [] (string s, ld x, int y) {
|
auto load = [] (string s, ld x, int y) {
|
||||||
return [s, x, y] {
|
return [s, x, y] {
|
||||||
slide_backup(vid.cells_drawn_limit, 100);
|
slide_backup(vid.cells_drawn_limit, 100);
|
||||||
slide_backup(smooth_scrolling, true);
|
|
||||||
slide_backup(ray::max_cells, 999999);
|
slide_backup(ray::max_cells, 999999);
|
||||||
slide_backup(walking::on, true);
|
slide_backup(walking::on, true);
|
||||||
slide_backup(walking::eye_level, x);
|
slide_backup(walking::eye_level, x);
|
||||||
mapstream::loadMap(s);
|
mapstream::loadMap(s);
|
||||||
slide_backup(ray::fixed_map, true);
|
slide_backup(ray::fixed_map, true);
|
||||||
slide_backup(ray::max_iter_intra, y);
|
slide_backup(ray::max_iter_intra, y);
|
||||||
slide_backup(mapeditor::drawplayer, false);
|
|
||||||
slide_backup(playermoved, false);
|
|
||||||
#if CAP_VR
|
#if CAP_VR
|
||||||
slide_backup(vrhr::hsm, vrhr::eHeadset::holonomy);
|
slide_backup(vrhr::hsm, vrhr::eHeadset::holonomy);
|
||||||
slide_backup(vrhr::eyes, vrhr::eEyes::truesim);
|
slide_backup(vrhr::eyes, vrhr::eEyes::truesim);
|
||||||
@ -518,6 +515,7 @@ auto hooks =
|
|||||||
slide_action(mode, 'r', "run this visualization", loader);
|
slide_action(mode, 'r', "run this visualization", loader);
|
||||||
slidecommand = "portal options";
|
slidecommand = "portal options";
|
||||||
if(mode == tour::pmKey) pushScreen(intra::show_portals);
|
if(mode == tour::pmKey) pushScreen(intra::show_portals);
|
||||||
|
rogueviz::pres::non_game_slide_scroll(mode);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
@ -12,8 +12,6 @@ auto geoslide(eGeometry g, char canvas, int jhole, int jblock) {
|
|||||||
using namespace tour;
|
using namespace tour;
|
||||||
return [=] (presmode mode) {
|
return [=] (presmode mode) {
|
||||||
if(mode == pmStart) {
|
if(mode == pmStart) {
|
||||||
tour::slide_backup(mapeditor::drawplayer, false);
|
|
||||||
tour::slide_backup(smooth_scrolling, true);
|
|
||||||
stop_game();
|
stop_game();
|
||||||
set_geometry(g);
|
set_geometry(g);
|
||||||
if(g == gSphere) {
|
if(g == gSphere) {
|
||||||
@ -39,6 +37,7 @@ auto geoslide(eGeometry g, char canvas, int jhole, int jblock) {
|
|||||||
sightranges[gSol] = 4;
|
sightranges[gSol] = 4;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
rogueviz::pres::non_game_slide_scroll(mode);
|
||||||
if(mode == pmStop && jblock < 0)
|
if(mode == pmStop && jblock < 0)
|
||||||
pmodel = mdGeodesic;
|
pmodel = mdGeodesic;
|
||||||
slidecommand = "switch raycaster";
|
slidecommand = "switch raycaster";
|
||||||
|
@ -1400,6 +1400,7 @@ void nk_launch() {
|
|||||||
sightranges[geometry] = .5;
|
sightranges[geometry] = .5;
|
||||||
ray::max_cells = 600000;
|
ray::max_cells = 600000;
|
||||||
smooth_scrolling = 1;
|
smooth_scrolling = 1;
|
||||||
|
game_keys_scroll = true;
|
||||||
camera_speed = 10;
|
camera_speed = 10;
|
||||||
// panini_alpha = 1;
|
// panini_alpha = 1;
|
||||||
// fov = 150;
|
// fov = 150;
|
||||||
@ -1438,19 +1439,18 @@ void portal_slideshow(tour::ss::slideshow_callback cb) {
|
|||||||
setCanvas(mode, '0');
|
setCanvas(mode, '0');
|
||||||
if(youtube != "")
|
if(youtube != "")
|
||||||
slide_url(mode, 'y', "YouTube link", youtube);
|
slide_url(mode, 'y', "YouTube link", youtube);
|
||||||
|
non_game_slide_scroll(mode);
|
||||||
slide_action(mode, 'r', "run", [=] {
|
slide_action(mode, 'r', "run", [=] {
|
||||||
slide_backup(margin);
|
slide_backup(margin);
|
||||||
slide_backup(mapeditor::drawplayer);
|
slide_backup(mapeditor::drawplayer);
|
||||||
slide_backup(firstland);
|
slide_backup(firstland);
|
||||||
slide_backup(specialland);
|
slide_backup(specialland);
|
||||||
slide_backup(ray::max_cells, 600000);
|
slide_backup(ray::max_cells, 600000);
|
||||||
slide_backup(smooth_scrolling, 1);
|
|
||||||
slide_backup(camera_speed, 10);
|
slide_backup(camera_speed, 10);
|
||||||
slide_backup(ray::exp_decay_poly, 30);
|
slide_backup(ray::exp_decay_poly, 30);
|
||||||
slide_backup(ray::fixed_map, true);
|
slide_backup(ray::fixed_map, true);
|
||||||
slide_backup(ray::max_iter_iso, 80);
|
slide_backup(ray::max_iter_iso, 80);
|
||||||
slide_backup(vid.cells_drawn_limit, 100);
|
slide_backup(vid.cells_drawn_limit, 100);
|
||||||
slide_backup(mapeditor::drawplayer, false);
|
|
||||||
#if CAP_VR
|
#if CAP_VR
|
||||||
slide_backup(vrhr::hsm);
|
slide_backup(vrhr::hsm);
|
||||||
slide_backup(vrhr::eyes);
|
slide_backup(vrhr::eyes);
|
||||||
|
@ -819,7 +819,6 @@ slide dmv_slides[] = {
|
|||||||
ply_slide(mode, gCubeTiling, mdPerspective, false);
|
ply_slide(mode, gCubeTiling, mdPerspective, false);
|
||||||
if(!ply::staircase.available()) return;
|
if(!ply::staircase.available()) return;
|
||||||
if(mode == pmStart) {
|
if(mode == pmStart) {
|
||||||
tour::slide_backup(smooth_scrolling, true);
|
|
||||||
tour::slide_backup(sightranges[geometry], 200);
|
tour::slide_backup(sightranges[geometry], 200);
|
||||||
tour::slide_backup(vid.cells_drawn_limit, 200);
|
tour::slide_backup(vid.cells_drawn_limit, 200);
|
||||||
tour::slide_backup(camera_speed, 5);
|
tour::slide_backup(camera_speed, 5);
|
||||||
@ -831,6 +830,7 @@ slide dmv_slides[] = {
|
|||||||
|
|
||||||
// tour::slide_backup(vid.fov, 120);
|
// tour::slide_backup(vid.fov, 120);
|
||||||
}
|
}
|
||||||
|
non_game_slide_scroll(mode);
|
||||||
if(mode == pmKey) {
|
if(mode == pmKey) {
|
||||||
println(hlog, ggmatrix(currentmap->gamestart()));
|
println(hlog, ggmatrix(currentmap->gamestart()));
|
||||||
println(hlog, View);
|
println(hlog, View);
|
||||||
@ -923,12 +923,10 @@ slide dmv_slides[] = {
|
|||||||
set_geometry(gNil);
|
set_geometry(gNil);
|
||||||
start_game();
|
start_game();
|
||||||
rogueviz::rv_hook(hooks_drawcell, 100, rogueviz::nilcompass::draw_compass);
|
rogueviz::rv_hook(hooks_drawcell, 100, rogueviz::nilcompass::draw_compass);
|
||||||
tour::slide_backup(smooth_scrolling, true);
|
|
||||||
tour::slide_backup(mapeditor::drawplayer, false);
|
|
||||||
View = Id;
|
View = Id;
|
||||||
shift_view(ztangent(.5));
|
shift_view(ztangent(.5));
|
||||||
playermoved = false;
|
|
||||||
}
|
}
|
||||||
|
non_game_slide_scroll(mode);
|
||||||
if(mode == pmStart || mode == pmKey)
|
if(mode == pmStart || mode == pmKey)
|
||||||
rogueviz::nilcompass::zeroticks = ticks;
|
rogueviz::nilcompass::zeroticks = ticks;
|
||||||
}
|
}
|
||||||
@ -1205,15 +1203,13 @@ slide dmv_slides[] = {
|
|||||||
if(mode == pmStart) {
|
if(mode == pmStart) {
|
||||||
stop_game();
|
stop_game();
|
||||||
set_geometry(gNil);
|
set_geometry(gNil);
|
||||||
tour::slide_backup(mapeditor::drawplayer, false);
|
|
||||||
rogueviz::cylon::enable();
|
rogueviz::cylon::enable();
|
||||||
tour::slide_backup(smooth_scrolling, true);
|
|
||||||
tour::on_restore(nilv::set_flags);
|
tour::on_restore(nilv::set_flags);
|
||||||
tour::slide_backup(nilv::nilperiod, make_array(3, 3, 3));
|
tour::slide_backup(nilv::nilperiod, make_array(3, 3, 3));
|
||||||
nilv::set_flags();
|
nilv::set_flags();
|
||||||
start_game();
|
start_game();
|
||||||
playermoved = false;
|
|
||||||
}
|
}
|
||||||
|
non_game_slide_scroll(mode);
|
||||||
}},
|
}},
|
||||||
|
|
||||||
{"3D model (geodesic)", 999, LEGAL::NONE | QUICKGEO,
|
{"3D model (geodesic)", 999, LEGAL::NONE | QUICKGEO,
|
||||||
@ -1263,15 +1259,13 @@ slide dmv_slides[] = {
|
|||||||
set_geometry(gNil);
|
set_geometry(gNil);
|
||||||
check_cgi();
|
check_cgi();
|
||||||
cgi.require_shapes();
|
cgi.require_shapes();
|
||||||
tour::slide_backup(mapeditor::drawplayer, false);
|
|
||||||
tour::slide_backup(smooth_scrolling, true);
|
|
||||||
start_game();
|
start_game();
|
||||||
rogueviz::balls::initialize(1);
|
rogueviz::balls::initialize(1);
|
||||||
rogueviz::balls::balls.resize(3);
|
rogueviz::balls::balls.resize(3);
|
||||||
pmodel = mdEquidistant;
|
pmodel = mdEquidistant;
|
||||||
playermoved = false;
|
|
||||||
View = cspin(1, 2, M_PI/2);
|
View = cspin(1, 2, M_PI/2);
|
||||||
}
|
}
|
||||||
|
non_game_slide_scroll(mode);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -87,6 +87,11 @@ void non_game_slide(presmode mode) {
|
|||||||
no_other_hud(mode);
|
no_other_hud(mode);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void non_game_slide_scroll(presmode mode) {
|
||||||
|
non_game_slide(mode);
|
||||||
|
slide_backup(smooth_scrolling, true);
|
||||||
|
}
|
||||||
|
|
||||||
void white_screen(presmode mode, color_t col) {
|
void white_screen(presmode mode, color_t col) {
|
||||||
if(mode == pmStart) {
|
if(mode == pmStart) {
|
||||||
tour::slide_backup(backcolor, col);
|
tour::slide_backup(backcolor, col);
|
||||||
|
@ -218,11 +218,11 @@ auto hooks =
|
|||||||
slide_backup(ray::max_cells, 32768);
|
slide_backup(ray::max_cells, 32768);
|
||||||
slide_backup(ray::fixed_map, true);
|
slide_backup(ray::fixed_map, true);
|
||||||
#endif
|
#endif
|
||||||
slide_backup(smooth_scrolling, true);
|
|
||||||
slide_backup(camera_speed, .1);
|
slide_backup(camera_speed, .1);
|
||||||
enable();
|
enable();
|
||||||
start_game();
|
start_game();
|
||||||
}
|
}
|
||||||
|
rogueviz::pres::non_game_slide_scroll(mode);
|
||||||
if(mode == pmKey)
|
if(mode == pmKey)
|
||||||
edit_stretch();
|
edit_stretch();
|
||||||
}});
|
}});
|
||||||
@ -245,11 +245,11 @@ auto hooks =
|
|||||||
slide_backup(ray::fixed_map, true);
|
slide_backup(ray::fixed_map, true);
|
||||||
slide_backup(ray::want_use, 2);
|
slide_backup(ray::want_use, 2);
|
||||||
#endif
|
#endif
|
||||||
slide_backup(smooth_scrolling, true);
|
|
||||||
slide_backup(camera_speed, .1);
|
slide_backup(camera_speed, .1);
|
||||||
enable();
|
enable();
|
||||||
start_game();
|
start_game();
|
||||||
}
|
}
|
||||||
|
rogueviz::pres::non_game_slide_scroll(mode);
|
||||||
if(mode == pmKey)
|
if(mode == pmKey)
|
||||||
edit_stretch();
|
edit_stretch();
|
||||||
}});
|
}});
|
||||||
|
@ -230,6 +230,7 @@ function<void(presmode)> roguevizslide_action(char c, const T& t, const U& act)
|
|||||||
void compare_projections(presmode mode, eModel a, eModel b);
|
void compare_projections(presmode mode, eModel a, eModel b);
|
||||||
void no_other_hud(presmode mode);
|
void no_other_hud(presmode mode);
|
||||||
void non_game_slide(presmode mode);
|
void non_game_slide(presmode mode);
|
||||||
|
void non_game_slide_scroll(presmode mode);
|
||||||
void white_screen(presmode mode, color_t col = 0xFFFFFFFF);
|
void white_screen(presmode mode, color_t col = 0xFFFFFFFF);
|
||||||
void empty_screen(presmode mode, color_t col = 0xFFFFFFFF);
|
void empty_screen(presmode mode, color_t col = 0xFFFFFFFF);
|
||||||
void show_picture(presmode mode, string s);
|
void show_picture(presmode mode, string s);
|
||||||
|
@ -192,15 +192,13 @@ void snow_slide(vector<tour::slide>& v, string title, string desc, reaction_t t)
|
|||||||
|
|
||||||
if(mode == pmStart) {
|
if(mode == pmStart) {
|
||||||
stop_game();
|
stop_game();
|
||||||
tour::slide_backup(mapeditor::drawplayer, false);
|
|
||||||
tour::slide_backup<ld>(snow_lambda, 1);
|
tour::slide_backup<ld>(snow_lambda, 1);
|
||||||
tour::slide_backup(snow_color, 0xC0C0C0FF);
|
tour::slide_backup(snow_color, 0xC0C0C0FF);
|
||||||
tour::slide_backup(snow_intense, true);
|
tour::slide_backup(snow_intense, true);
|
||||||
tour::slide_backup(smooth_scrolling, true);
|
|
||||||
t();
|
t();
|
||||||
start_game();
|
start_game();
|
||||||
playermoved = false;
|
|
||||||
}
|
}
|
||||||
|
rogueviz::pres::non_game_slide_scroll(mode);
|
||||||
}}
|
}}
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -504,10 +504,8 @@ void slide_itri(tour::presmode mode, int id) {
|
|||||||
if(mode == pmStart) {
|
if(mode == pmStart) {
|
||||||
stop_game();
|
stop_game();
|
||||||
set_geometry(gNil);
|
set_geometry(gNil);
|
||||||
tour::slide_backup(mapeditor::drawplayer, false);
|
|
||||||
tour::slide_backup(on, true);
|
tour::slide_backup(on, true);
|
||||||
tour::slide_backup(net, id == 2 ? true : false);
|
tour::slide_backup(net, id == 2 ? true : false);
|
||||||
tour::slide_backup(smooth_scrolling, true);
|
|
||||||
tour::on_restore(nilv::set_flags);
|
tour::on_restore(nilv::set_flags);
|
||||||
if(id == 0)
|
if(id == 0)
|
||||||
tour::slide_backup(nilv::nilperiod, make_array(3, 3, 3));
|
tour::slide_backup(nilv::nilperiod, make_array(3, 3, 3));
|
||||||
@ -524,6 +522,7 @@ void slide_itri(tour::presmode mode, int id) {
|
|||||||
playermoved = false;
|
playermoved = false;
|
||||||
tour::on_restore(reset);
|
tour::on_restore(reset);
|
||||||
}
|
}
|
||||||
|
rogueviz::pres::non_game_slide_scroll(mode);
|
||||||
}
|
}
|
||||||
|
|
||||||
string cap = "Impossible architecture in Nil/";
|
string cap = "Impossible architecture in Nil/";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user