mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2024-11-27 06:27:17 +00:00
gamescreen updated in rogueviz
This commit is contained in:
parent
80cc89f6eb
commit
b2fb02f863
@ -216,7 +216,7 @@ bool draw_ply() {
|
||||
|
||||
void show() {
|
||||
cmode = sm::SIDE | sm::MAYDARK;
|
||||
gamescreen(0);
|
||||
gamescreen();
|
||||
dialog::init(XLAT("Ascending & Descending"), 0xFFFFFFFF, 150, 0);
|
||||
|
||||
dialog::addSelItem("advance", fts(advance), 'a');
|
||||
|
@ -199,7 +199,8 @@ bool hide_random = false;
|
||||
int last_seed = 0;
|
||||
|
||||
EX void show_menu() {
|
||||
gamescreen(1);
|
||||
cmode = sm::DARKEN;
|
||||
gamescreen();
|
||||
dialog::init(XLAT("dual geometry puzzles"));
|
||||
dialog::addHelp(XLAT("move both characters to marked squares at once!"));
|
||||
dialog::addBreak(100);
|
||||
|
@ -164,7 +164,7 @@ void edit_fifteen() {
|
||||
|
||||
auto ss = mapstream::save_start();
|
||||
ss->item = itGold;
|
||||
gamescreen(0);
|
||||
gamescreen();
|
||||
ss->item = itNone;
|
||||
|
||||
dialog::init("Fifteen Puzzle", iinf[itPalace].color, 150, 100);
|
||||
|
@ -388,7 +388,7 @@ namespace flocking {
|
||||
|
||||
void show() {
|
||||
cmode = sm::SIDE | sm::MAYDARK;
|
||||
gamescreen(0);
|
||||
gamescreen();
|
||||
dialog::init(XLAT("flocking"), iinf[itPalace].color, 150, 0);
|
||||
|
||||
dialog::addSelItem("initial speed", fts(ini_speed), 'i');
|
||||
|
@ -87,7 +87,7 @@ int editwhich = -1;
|
||||
|
||||
void show_graph() {
|
||||
cmode = sm::SIDE | sm::MAYDARK;
|
||||
gamescreen(0);
|
||||
gamescreen();
|
||||
dialog::init(XLAT("graph"));
|
||||
for(int i=0; i<isize(formula); i++) {
|
||||
if(editwhich == i) {
|
||||
|
@ -516,9 +516,8 @@ void go_discord() {
|
||||
void go_menu() {
|
||||
|
||||
getcstat = '-';
|
||||
cmode = 0;
|
||||
cmode = sm::SIDE | sm::DIALOG_STRICT_X;
|
||||
gamescreen(0);
|
||||
gamescreen();
|
||||
|
||||
dialog::init("HyperGo", iinf[itPalace].color, 150, 100);
|
||||
|
||||
|
@ -122,7 +122,7 @@ void advance_heat_wave() {
|
||||
|
||||
void show() {
|
||||
cmode = sm::SIDE | sm::MAYDARK;
|
||||
gamescreen(0);
|
||||
gamescreen();
|
||||
dialog::init(XLAT("heat transfer simulation"), 0xFFFFFFFF, 150, 0);
|
||||
add_edit(delta);
|
||||
add_edit(qsteps);
|
||||
|
@ -331,7 +331,7 @@ int current_index = -1;
|
||||
|
||||
void choose_projection() {
|
||||
cmode = sm::SIDE | sm::MAYDARK;
|
||||
gamescreen(0);
|
||||
gamescreen();
|
||||
dialog::init(XLAT("choose projection"), 0xFFFFFFFF, 150, 0);
|
||||
for(int i=0; i<isize(models_to_use); i++) {
|
||||
hypername = "";
|
||||
@ -355,7 +355,7 @@ void choose_projection() {
|
||||
|
||||
void show() {
|
||||
cmode = sm::SIDE | sm::MAYDARK;
|
||||
gamescreen(0);
|
||||
gamescreen();
|
||||
dialog::init(XLAT("hyperbolic analogs"), 0xFFFFFFFF, 150, 0);
|
||||
add_edit(prec);
|
||||
dialog::addItem("choose a projection", 'p');
|
||||
|
@ -230,7 +230,7 @@ void shift() {
|
||||
|
||||
void show() {
|
||||
cmode = sm::SIDE | sm::MAYDARK;
|
||||
gamescreen(0);
|
||||
gamescreen();
|
||||
dialog::init(XLAT("inner maps"), 0xFFFFFFFF, 150, 0);
|
||||
add_edit(texture_alpha);
|
||||
add_edit(inner_alpha);
|
||||
|
@ -472,7 +472,7 @@ void pick_algorithm() {
|
||||
dialog::addItem("visualize (fast)", 'b');
|
||||
dialog::add_action([] { nconf_prepare(true); popScreen(); });
|
||||
dialog::addSelItem("visualization speed", its(algo_speed), 'v');
|
||||
dialog::add_action([] { dialog::editNumber(algo_speed, 100, 1000000, 0.1, 10000, "", ""), dialog::scaleLog(), dialog::dialogflags = 0, dialog::numberdark = dialog::DONT_SHOW; });
|
||||
dialog::add_action([] { dialog::editNumber(algo_speed, 100, 1000000, 0.1, 10000, "", ""), dialog::scaleLog(), dialog::dialogflags = sm::NOSCR; });
|
||||
dialog::addBreak(50);
|
||||
dialog::addBoolItem_action("pretty corners", pretty, 'p');
|
||||
dialog::addBreak(50);
|
||||
@ -824,7 +824,7 @@ void ncee_work() {
|
||||
|
||||
calcparam();
|
||||
|
||||
if(ncee_map_prepared < 5) { cmode = sm::NORMAL; ncee_map_prepared++; if(ncee_map_prepared == 5) prepare_ncee_map(); gamescreen(2); return; }
|
||||
if(ncee_map_prepared < 5) { cmode = sm::NORMAL | sm::DARKEN; ncee_map_prepared++; if(ncee_map_prepared == 5) prepare_ncee_map(); gamescreen(); return; }
|
||||
|
||||
#if CAP_NCONF
|
||||
if(in_visualization)
|
||||
@ -907,7 +907,7 @@ void ncee() {
|
||||
if(uni == 's') show_mapping = !show_mapping;
|
||||
if(uni == 'g') show_mgrid = !show_mgrid;
|
||||
if(uni == 't') pushScreen(conf_shapes);
|
||||
if(uni == 'y') dialog::editNumber(mapping_split, 0, 1, 0.05, 0.75, "", ""), dialog::dialogflags = 0, dialog::numberdark = dialog::DONT_SHOW;
|
||||
if(uni == 'y') dialog::editNumber(mapping_split, 0, 1, 0.05, 0.75, "", ""), dialog::dialogflags = sm::NOSCR;
|
||||
if(uni == '-') {
|
||||
int x = (mousex - cd->xcenter - xc - x0) / siz;
|
||||
int y = (mousey - cd->ycenter - yc - y0) / siz;
|
||||
|
@ -184,7 +184,7 @@ void run() {
|
||||
cmode |= sm::SHOWCURSOR;
|
||||
if(aimspeed_mouse_x == 0 && aimspeed_mouse_y == 0)
|
||||
cmode |= sm::SHOWCURSOR;
|
||||
gamescreen(0);
|
||||
gamescreen();
|
||||
if(planning_mode && !view_replay) {
|
||||
curlev->draw_planning_screen();
|
||||
if(!holdmouse) {
|
||||
|
@ -1271,13 +1271,13 @@ void launch_solv() {
|
||||
|
||||
void show() {
|
||||
cmode = sm::SIDE | sm::MAYDARK;
|
||||
gamescreen(0);
|
||||
gamescreen();
|
||||
dialog::init(XLAT("notknot"), 0xFFFFFFFF, 150, 0);
|
||||
|
||||
dialog::addItem("available scenes", 'a');
|
||||
dialog::add_action_push([] {
|
||||
cmode = sm::SIDE | sm::MAYDARK;
|
||||
gamescreen(0);
|
||||
gamescreen();
|
||||
|
||||
dialog::init(XLAT("notknot scenes"), 0xFFFFFFFF, 150, 0);
|
||||
|
||||
|
@ -314,7 +314,7 @@ void add_model_settings() {
|
||||
auto cf = addHook(hooks_configfile, 100, [] {
|
||||
param_f(prec, "obj_prec")
|
||||
->editable(1, 100, 1, "3D model precision", "higher-precision models take more time to load and to render.", 'p')
|
||||
->set_sets([] { dialog::numberdark = dialog::DONT_SHOW; })
|
||||
->set_sets([] { cmode = sm::NOSCR; })
|
||||
;
|
||||
param_b(shift_to_ctr, "shift_to_ctr");
|
||||
});
|
||||
|
@ -290,7 +290,7 @@ void rugframe() {
|
||||
|
||||
void show() {
|
||||
cmode = sm::SIDE | sm::MAYDARK;
|
||||
gamescreen(0);
|
||||
gamescreen();
|
||||
dialog::init("Pentagonal Exploration");
|
||||
auto add_key = [] (char c, int a, int b) {
|
||||
dialog::addBoolItem(lalign(0, "based on {",a,",",b,"}"), global_v == a && global_w == b, c);
|
||||
|
@ -433,7 +433,7 @@ EX void compare() {
|
||||
|
||||
void choose_projection() {
|
||||
cmode = sm::SIDE | sm::MAYDARK;
|
||||
gamescreen(0);
|
||||
gamescreen();
|
||||
dialog::init(XLAT("choose projection"), 0xFFFFFFFF, 150, 0);
|
||||
dynamicval<int> di(index);
|
||||
for(int i=0; i<8; i++) {
|
||||
@ -450,7 +450,7 @@ void choose_projection() {
|
||||
|
||||
void choose_planet(texture::texture_data *& t) {
|
||||
cmode = sm::SIDE | sm::MAYDARK;
|
||||
gamescreen(0);
|
||||
gamescreen();
|
||||
dialog::init(XLAT("choose the planet"), 0xFFFFFFFF, 150, 0);
|
||||
for(auto opt: {&earth, &moon, &sun, &mars, &neptune}) {
|
||||
dialog::addSelItem(pname[opt], its(radius[opt]) + " km", key[opt]);
|
||||
@ -462,7 +462,7 @@ void choose_planet(texture::texture_data *& t) {
|
||||
|
||||
void show() {
|
||||
cmode = sm::SIDE | sm::MAYDARK;
|
||||
gamescreen(0);
|
||||
gamescreen();
|
||||
dialog::init(XLAT("projections between planets"), 0xFFFFFFFF, 150, 0);
|
||||
add_edit(alpha);
|
||||
add_edit(latit);
|
||||
|
@ -694,7 +694,7 @@ void run() {
|
||||
sprite_vertices.tvertices.clear();
|
||||
if(map_on) {
|
||||
render_room(current_room);
|
||||
gamescreen(0);
|
||||
gamescreen();
|
||||
}
|
||||
else {
|
||||
draw_room();
|
||||
|
@ -608,7 +608,8 @@ slide dmv_slides[] = {
|
||||
empty_screen(mode);
|
||||
show_picture(mode, "rogueviz/nil/penrose-triangle.png");
|
||||
add_stat(mode, [] {
|
||||
gamescreen(2);
|
||||
cmode |= sm::DARKEN;
|
||||
gamescreen();
|
||||
dialog::init();
|
||||
dialog::addBreak(400);
|
||||
dialog::addTitle("playing with impossibility", dialog::dialogcolor, 150);
|
||||
|
@ -323,7 +323,8 @@ void show_animation(presmode mode, string s, int sx, int sy, int frames, int fps
|
||||
}
|
||||
|
||||
void choose_presentation() {
|
||||
gamescreen(2);
|
||||
cmode = sm::NOSCR;
|
||||
gamescreen();
|
||||
|
||||
getcstat = ' ';
|
||||
|
||||
|
@ -111,7 +111,7 @@ int args() {
|
||||
|
||||
void show() {
|
||||
cmode = sm::SIDE | sm::MAYDARK;
|
||||
gamescreen(0);
|
||||
gamescreen();
|
||||
dialog::init(XLAT("random walk"), 0xFFFFFFFF, 150, 0);
|
||||
|
||||
dialog::addSelItem("step size", fts(step_size), 'd');
|
||||
|
@ -1062,7 +1062,7 @@ int readArgs() {
|
||||
void configure_edge_display() {
|
||||
cmode = sm::SIDE | sm::MAYDARK | sm::DIALOG_STRICT_X;
|
||||
static int mode = 0;
|
||||
gamescreen(0);
|
||||
gamescreen();
|
||||
dialog::init(XLAT("rogueviz edges"));
|
||||
for(int i=0; i<isize(edgetypes); i++) {
|
||||
auto t = edgetypes[i];
|
||||
@ -1122,7 +1122,7 @@ void search_marker() {
|
||||
|
||||
void showVertexSearch() {
|
||||
cmode = sm::SIDE | sm::MAYDARK | sm::DIALOG_STRICT_X;
|
||||
gamescreen(0); search_for = -1;
|
||||
gamescreen(); search_for = -1;
|
||||
|
||||
dialog::init(XLAT("vertex search"));
|
||||
dialog::v.clear();
|
||||
@ -1156,7 +1156,7 @@ void showVertexSearch() {
|
||||
void showMenu() {
|
||||
if(callhandlers(false, hooks_rvmenu_replace)) return;
|
||||
cmode = sm::SIDE | sm::MAYDARK | sm::DIALOG_STRICT_X;
|
||||
gamescreen(0);
|
||||
gamescreen();
|
||||
|
||||
dialog::init(XLAT("rogueviz configuration"));
|
||||
|
||||
|
@ -141,7 +141,7 @@ transmatrix try_harder_relative_matrix(cell *at, cell *from) {
|
||||
|
||||
void edit_segment(int aid) {
|
||||
cmode = sm::PANNING;
|
||||
gamescreen(0);
|
||||
gamescreen();
|
||||
dialog::init(XLAT("animation segment"), 0xFFFFFFFF, 150, 0);
|
||||
dialog::addSelItem("interval", fts(anims[aid].start_interval), 'i');
|
||||
edit_interval(anims[aid].start_interval);
|
||||
@ -181,7 +181,7 @@ void generate_trace();
|
||||
|
||||
void edit_step(animation& anim, int id) {
|
||||
cmode = 0;
|
||||
gamescreen(0);
|
||||
gamescreen();
|
||||
dialog::init(XLAT("animation step"), 0xFFFFFFFF, 150, 0);
|
||||
auto& f = anim.frames[id];
|
||||
dialog::addSelItem("title", f.title, 't');
|
||||
@ -268,7 +268,7 @@ void handle_animation(ld t);
|
||||
|
||||
void show() {
|
||||
cmode = 0;
|
||||
gamescreen(0);
|
||||
gamescreen();
|
||||
draw_crosshair();
|
||||
dialog::init(XLAT("smooth camera"), 0xFFFFFFFF, 150, 0);
|
||||
char key = 'A';
|
||||
|
@ -207,7 +207,7 @@ void snow_slide(vector<tour::slide>& v, string title, string desc, reaction_t t)
|
||||
|
||||
void show() {
|
||||
cmode = sm::SIDE | sm::MAYDARK;
|
||||
gamescreen(0);
|
||||
gamescreen();
|
||||
dialog::init(XLAT("snowballs"), 0xFFFFFFFF, 150, 0);
|
||||
|
||||
dialog::addSelItem("lambda", fts(snow_lambda), 'l');
|
||||
|
@ -1041,8 +1041,8 @@ namespace levelline {
|
||||
|
||||
void show() {
|
||||
if(levellines.size() == 0) create();
|
||||
gamescreen(0);
|
||||
cmode = sm::SIDE | sm::MAYDARK;
|
||||
gamescreen();
|
||||
dialog::init("level lines");
|
||||
char nx = 'a';
|
||||
for(auto &l : levellines) {
|
||||
|
@ -191,7 +191,7 @@ void make_staircase() {
|
||||
|
||||
void showMenu() {
|
||||
cmode = sm::SIDE | sm::MAYDARK;
|
||||
gamescreen(0);
|
||||
gamescreen();
|
||||
dialog::init(XLAT("Spiral Staircase"), iinf[itPalace].color, 150, 0);
|
||||
|
||||
add_edit(scurvature);
|
||||
|
@ -49,7 +49,7 @@ void sumotron_puzzle() {
|
||||
cmode = 0;
|
||||
if(dialog_shown) cmode = sm::SIDE | sm::DIALOG_STRICT_X | sm::MAYDARK;
|
||||
dynamicval<bool> dp(mapeditor::drawplayer, false);
|
||||
gamescreen(0);
|
||||
gamescreen();
|
||||
|
||||
initquickqueue();
|
||||
for(auto p: value) {
|
||||
|
@ -244,7 +244,7 @@ int readArgs() {
|
||||
|
||||
void show() {
|
||||
cmode = sm::SIDE | sm::MAYDARK;
|
||||
gamescreen(0);
|
||||
gamescreen();
|
||||
dialog::init(XLAT("sunflower spirals"), 0xFFFFFFFF, 150, 0);
|
||||
|
||||
dialog::addSelItem("density", fts(zdensity), 'd');
|
||||
|
Loading…
Reference in New Issue
Block a user