mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2024-11-23 21:07:17 +00:00
ads-game:: new view modes are now available in the menu
This commit is contained in:
parent
971ce2aade
commit
4e7b95e346
@ -246,6 +246,14 @@ auto shot_hooks =
|
||||
param_i(talpha, "ds_talpha")
|
||||
-> editable(0, 255, 16, "dS texture intensity", "", 't');
|
||||
|
||||
param_f(spacetime_step, "ads_spacetime_step")
|
||||
-> editable(0, 1, 0.05, "step size in the spacetime display", "", 's');
|
||||
|
||||
param_i(spacetime_qty, "ads_spacetime_qty")
|
||||
-> editable(0, 100, 5, "step quantity in the spacetime display", "", 'q');
|
||||
|
||||
addsaver(ghost_color, "color:ghost");
|
||||
|
||||
rsrc_config();
|
||||
});
|
||||
|
||||
|
@ -140,4 +140,7 @@ extern int use_duality;
|
||||
|
||||
ld spacetime_step = 0.1;
|
||||
int spacetime_qty = 30;
|
||||
|
||||
color_t ghost_color = 0x800080FF;
|
||||
|
||||
}}
|
||||
|
@ -77,6 +77,76 @@ void edit_particles() {
|
||||
dialog::display();
|
||||
}
|
||||
|
||||
void edit_view_mode() {
|
||||
cmode = sm::SIDE | sm::MAYDARK;
|
||||
gamescreen();
|
||||
|
||||
dialog::init(XLAT("spacetime views"), 0xC0C0FFFF, 150, 100);
|
||||
|
||||
dialog::addBoolItem(XLAT("view replay"), in_replay, 'r');
|
||||
dialog::add_action(switch_replay);
|
||||
|
||||
dialog::addBreak(100);
|
||||
|
||||
if(!main_rock) add_edit(auto_rotate);
|
||||
if(!main_rock) add_edit(auto_angle);
|
||||
|
||||
dialog::addBoolItem("view the current time", !in_spacetime() && which_cross == 0, 'z');
|
||||
dialog::add_action([] {
|
||||
switch_spacetime_to(false); which_cross = 0;
|
||||
});
|
||||
|
||||
dialog::addBoolItem("view the visible state", !in_spacetime() && which_cross == -1, 'x');
|
||||
dialog::add_action([] {
|
||||
switch_spacetime_to(false); which_cross = -1;
|
||||
});
|
||||
|
||||
dialog::addBoolItem("view the future", !in_spacetime() && which_cross == 1, 'c');
|
||||
dialog::add_action([] {
|
||||
switch_spacetime_to(false); which_cross = 1;
|
||||
});
|
||||
|
||||
dialog::addBoolItem("view the spacetime", in_spacetime() && pmodel == mdRelPerspective && !use_duality, 'v');
|
||||
dialog::add_action([] {
|
||||
switch_spacetime_to(true); pmodel = mdRelPerspective; use_duality = 0;
|
||||
});
|
||||
|
||||
if(main_rock) {
|
||||
dialog::addBoolItem("view the dual space", in_spacetime() && pmodel == mdPerspective, 'v');
|
||||
dialog::add_action([] {
|
||||
switch_spacetime_to(true);
|
||||
pmodel = mdPerspective;
|
||||
});
|
||||
}
|
||||
|
||||
else {
|
||||
dialog::addBoolItem("view the dual spacetime", in_spacetime() && use_duality == 1, 'b');
|
||||
dialog::add_action([] {
|
||||
switch_spacetime_to(true);
|
||||
use_duality = 1;
|
||||
});
|
||||
|
||||
dialog::addBoolItem("fake dual spacetime", in_spacetime() && use_duality == 2, 'n');
|
||||
dialog::add_action([] {
|
||||
switch_spacetime_to(true);
|
||||
use_duality = 2;
|
||||
});
|
||||
}
|
||||
|
||||
if(in_spacetime()) {
|
||||
add_edit(spacetime_step);
|
||||
add_edit(spacetime_qty);
|
||||
|
||||
if(main_rock) {
|
||||
dialog::addColorItem(XLAT("ultra-ideal ghost color"), ghost_color, 'X');
|
||||
dialog::add_action([] { dialog::openColorDialog(ghost_color); });
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
dialog::display();
|
||||
}
|
||||
|
||||
void game_menu() {
|
||||
cmode = sm::SIDE | sm::MAYDARK;
|
||||
gamescreen();
|
||||
@ -89,8 +159,9 @@ void game_menu() {
|
||||
add_edit(pause_speed);
|
||||
add_edit(view_proper_times);
|
||||
add_edit(DS_(time_unit));
|
||||
if(!main_rock) add_edit(auto_rotate);
|
||||
if(!main_rock) add_edit(auto_angle);
|
||||
|
||||
dialog::addItem(XLAT("set view mode"), 'v');
|
||||
dialog::add_action_push(edit_view_mode);
|
||||
|
||||
dialog::addItem(XLAT("particle/texture settings"), 'p');
|
||||
dialog::add_action_push(edit_particles);
|
||||
@ -107,11 +178,6 @@ void game_menu() {
|
||||
dialog::addItem(XLAT("recenter cheat"), 'C');
|
||||
dialog::add_action([] { current.T = Id; vctrV = Id; });
|
||||
|
||||
if(paused) {
|
||||
dialog::addBoolItem(XLAT("view replay"), in_replay, 'V');
|
||||
dialog::add_action(switch_replay);
|
||||
}
|
||||
|
||||
dialog::addItem("configure keys", 'k');
|
||||
dialog::add_action_push(multi::get_key_configurer(1, move_names, "Relative Hell keys"));
|
||||
|
||||
|
@ -50,9 +50,12 @@ void switch_spacetime() {
|
||||
check_cgi();
|
||||
cgi.require_basics();
|
||||
cgi.use_count++;
|
||||
vid.grid = true;
|
||||
stdgridcolor = 0xFFFFFFFF;
|
||||
|
||||
initcells();
|
||||
initgame();
|
||||
vid.fov = 150;
|
||||
models::desitter_projections = true;
|
||||
}
|
||||
|
||||
@ -61,6 +64,7 @@ void switch_spacetime() {
|
||||
variation = eVariation::bitruncated;
|
||||
swap(currentmap, map_hyp);
|
||||
pmodel = mdDisk;
|
||||
pconf.scale = .95;
|
||||
check_cgi();
|
||||
}
|
||||
|
||||
@ -77,11 +81,16 @@ void switch_spacetime() {
|
||||
NLP = Id;
|
||||
Duality = Id;
|
||||
for(int a=0; a<4; a++) for(int b=0; b<4; b++) Duality[a][b] = (a^2) == b;
|
||||
vid.fov = 150;
|
||||
vid.grid = false;
|
||||
slr::range_xy = 2;
|
||||
slr::range_z = 2;
|
||||
}
|
||||
|
||||
else if(hybri) {
|
||||
hybrid::switch_to_underlying();
|
||||
pmodel = mdDisk;
|
||||
pconf.scale = .95;
|
||||
}
|
||||
cgi.use_count++;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user