1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-11-27 14:37:16 +00:00

rogueviz:: use enable_canvas

This commit is contained in:
Zeno Rogue 2021-09-30 10:49:12 +02:00
parent 2377ccb434
commit 402fabeefb
9 changed files with 20 additions and 20 deletions

View File

@ -45,7 +45,7 @@ void run_sb() {
stop_game(); stop_game();
crystal::set_crystal(6); crystal::set_crystal(6);
set_variation(eVariation::pure); set_variation(eVariation::pure);
firstland = specialland = laCanvas; enable_canvas();
patterns::whichCanvas = 'g'; patterns::whichCanvas = 'g';
patterns::canvasback = 0x101010; patterns::canvasback = 0x101010;
check_cgi(); check_cgi();

View File

@ -71,7 +71,7 @@ void run_cpick() {
stop_game(); stop_game();
crystal::set_crystal(6); crystal::set_crystal(6);
set_variation(eVariation::pure); set_variation(eVariation::pure);
firstland = specialland = laCanvas; enable_canvas();
patterns::whichCanvas = 'g'; patterns::whichCanvas = 'g';
patterns::canvasback = 0; patterns::canvasback = 0;
check_cgi(); check_cgi();
@ -205,7 +205,7 @@ void run_sb() {
stop_game(); stop_game();
crystal::set_crystal(6); crystal::set_crystal(6);
set_variation(eVariation::pure); set_variation(eVariation::pure);
firstland = specialland = laCanvas; enable_canvas();
patterns::whichCanvas = 'g'; patterns::whichCanvas = 'g';
patterns::canvasback = 0; patterns::canvasback = 0;
check_cgi(); check_cgi();
@ -240,7 +240,7 @@ void sync(int mode, flagtype flags) {
if(mode == pmStart) { if(mode == pmStart) {
crystal::compass_probability = 0; crystal::compass_probability = 0;
crystal::crystal_period = 0; crystal::crystal_period = 0;
firstland = specialland = laCanvas; enable_canvas();
mapeditor::drawplayer = (flags & PLAYER); mapeditor::drawplayer = (flags & PLAYER);
vid.smart_range_detail = 1; vid.smart_range_detail = 1;
vid.use_smart_range = 2; vid.use_smart_range = 2;
@ -404,7 +404,7 @@ auto explore_structure(int _shapeid) {
tour::slide_backup(smooth_scrolling, true); tour::slide_backup(smooth_scrolling, true);
stop_game(); stop_game();
set_geometry(geometry == gCrystal534 ? gCrystal534 : gCrystal344); set_geometry(geometry == gCrystal534 ? gCrystal534 : gCrystal344);
firstland = specialland = laCanvas; enable_canvas();
patterns::whichCanvas = ' '; patterns::whichCanvas = ' ';
shapeid = _shapeid; shapeid = _shapeid;
enable(); enable();
@ -441,7 +441,7 @@ void house(int sides, int shape = 10) {
else else
crystal::set_crystal(sides); crystal::set_crystal(sides);
set_variation(eVariation::pure); set_variation(eVariation::pure);
firstland = specialland = laCanvas; enable_canvas();
patterns::whichCanvas = ' '; patterns::whichCanvas = ' ';
shapeid = shape; shapeid = shape;
check_cgi(); check_cgi();

View File

@ -373,7 +373,7 @@ void enable() {
using rogueviz::rv_hook; using rogueviz::rv_hook;
vid.linequality = 4; vid.linequality = 4;
firstland = specialland = laCanvas; enable_canvas();
patterns::whichCanvas = 'F'; patterns::whichCanvas = 'F';
colortables['F'][0] = 0x80C080; colortables['F'][0] = 0x80C080;
@ -391,12 +391,12 @@ void enable() {
dual::switch_to(0); dual::switch_to(0);
set_geometry(gSphere); set_geometry(gSphere);
set_variation(eVariation::pure); set_variation(eVariation::pure);
firstland = specialland = laCanvas; enable_canvas();
dual::switch_to(1); dual::switch_to(1);
set_geometry(gNormal); set_geometry(gNormal);
set_variation(eVariation::pure); set_variation(eVariation::pure);
firstland = specialland = laCanvas; enable_canvas();
rv_hook(hooks_frame, 100, draw_earth); rv_hook(hooks_frame, 100, draw_earth);
rv_hook(hooks_drawcell, 100, restrict_cell); rv_hook(hooks_drawcell, 100, restrict_cell);

View File

@ -143,7 +143,7 @@ void magic(int sides) {
else else
crystal::set_crystal(sides); crystal::set_crystal(sides);
set_variation(eVariation::pure); set_variation(eVariation::pure);
firstland = specialland = laCanvas; enable_canvas();
patterns::whichCanvas = 'g'; patterns::whichCanvas = 'g';
patterns::canvasback = back; patterns::canvasback = back;
check_cgi(); check_cgi();

View File

@ -519,7 +519,7 @@ void pick_pattern() {
dialog::addItem("green football", 'g'); dialog::addItem("green football", 'g');
dialog::add_action([] { dialog::add_action([] {
chg_pattern([] { chg_pattern([] {
firstland = specialland = laCanvas; enable_canvas();
patterns::whichCanvas = 'B'; patterns::whichCanvas = 'B';
}); });
}); });
@ -530,7 +530,7 @@ void pick_pattern() {
gp::param.first = 9; gp::param.first = 9;
gp::param.second = 0; gp::param.second = 0;
set_variation(eVariation::goldberg); set_variation(eVariation::goldberg);
firstland = specialland = laCanvas; enable_canvas();
patterns::whichCanvas = 'F'; patterns::whichCanvas = 'F';
}); });
}); });
@ -539,7 +539,7 @@ void pick_pattern() {
dialog::add_action([] { dialog::add_action([] {
chg_pattern([] { chg_pattern([] {
set_geometry(gOctagon); set_geometry(gOctagon);
firstland = specialland = laCanvas; enable_canvas();
patterns::whichCanvas = 'T'; patterns::whichCanvas = 'T';
}); });
}); });
@ -572,7 +572,7 @@ void pick_pattern() {
set_variation(eVariation::pure); set_variation(eVariation::pure);
arcm::current.parse("4^5"); arcm::current.parse("4^5");
set_geometry(gArchimedean); set_geometry(gArchimedean);
firstland = specialland = laCanvas; enable_canvas();
patterns::whichCanvas = 'A'; patterns::whichCanvas = 'A';
}); });
}); });

View File

@ -27,7 +27,7 @@ auto geoslide(eGeometry g, char canvas, int jhole, int jblock) {
tour::slide_backup<ld>(sightranges[gSol], 7); tour::slide_backup<ld>(sightranges[gSol], 7);
tour::slide_backup<ld>(sightranges[gSpace435], 7); tour::slide_backup<ld>(sightranges[gSpace435], 7);
vid.texture_step = 4; vid.texture_step = 4;
firstland = specialland = laCanvas; enable_canvas();
tour::slide_backup(patterns::jhole, jhole); tour::slide_backup(patterns::jhole, jhole);
tour::slide_backup(patterns::rwalls, jhole); tour::slide_backup(patterns::rwalls, jhole);
tour::slide_backup(patterns::jblock, jblock); tour::slide_backup(patterns::jblock, jblock);

View File

@ -1397,7 +1397,7 @@ void nk_launch() {
margin = 4; margin = 4;
mapeditor::drawplayer = false; mapeditor::drawplayer = false;
stop_game(); stop_game();
firstland = specialland = laCanvas; enable_canvas();
set_geometry(gNotKnot); set_geometry(gNotKnot);
sightranges[geometry] = .5; sightranges[geometry] = .5;
ray::max_cells = 600000; ray::max_cells = 600000;

View File

@ -465,7 +465,7 @@ void enable_earth() {
texture::texture_aura = true; texture::texture_aura = true;
stop_game(); stop_game();
set_geometry(gSphere); set_geometry(gSphere);
firstland = specialland = laCanvas; enable_canvas();
patterns::whichCanvas = 'F'; patterns::whichCanvas = 'F';
start_game(); start_game();
texture::config.configname = "textures/earth.txc"; texture::config.configname = "textures/earth.txc";
@ -499,7 +499,7 @@ slide dmv_slides[] = {
{"Euclidean plane", 999, LEGAL::NONE | QUICKGEO, {"Euclidean plane", 999, LEGAL::NONE | QUICKGEO,
"The sum of angles of a triangle is 180 degrees.\n\n", "The sum of angles of a triangle is 180 degrees.\n\n",
[] (presmode mode) { [] (presmode mode) {
if(mode == pmStartAll) firstland = specialland = laCanvas; if(mode == pmStartAll) enable_canvas();
setCanvas(mode, 'F'); setCanvas(mode, 'F');
if(mode == pmStart) { if(mode == pmStart) {
stop_game(); stop_game();
@ -573,7 +573,7 @@ slide dmv_slides[] = {
"Hyperbolic geometry works the opposite way to spherical geometry." "Hyperbolic geometry works the opposite way to spherical geometry."
"In hyperbolic geometry, the sum of angles of a triangle is less than 180 degrees.\n\n", "In hyperbolic geometry, the sum of angles of a triangle is less than 180 degrees.\n\n",
[] (presmode mode) { [] (presmode mode) {
if(mode == pmStartAll) firstland = specialland = laCanvas; if(mode == pmStartAll) enable_canvas();
setCanvas(mode, 'F'); setCanvas(mode, 'F');
if(mode == pmStart) { if(mode == pmStart) {
stop_game(); stop_game();

View File

@ -378,7 +378,7 @@ auto hchook = addHook(hooks_drawcell, 100, draw_bird)
} }
in = true; in = true;
firstland = specialland = laCanvas; enable_canvas();
patterns::whichCanvas = 'r'; patterns::whichCanvas = 'r';
patterns::rwalls = 100; patterns::rwalls = 100;
mapeditor::drawplayer = false; mapeditor::drawplayer = false;