1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-11-23 21:07:17 +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();
crystal::set_crystal(6);
set_variation(eVariation::pure);
firstland = specialland = laCanvas;
enable_canvas();
patterns::whichCanvas = 'g';
patterns::canvasback = 0x101010;
check_cgi();

View File

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

View File

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

View File

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

View File

@ -519,7 +519,7 @@ void pick_pattern() {
dialog::addItem("green football", 'g');
dialog::add_action([] {
chg_pattern([] {
firstland = specialland = laCanvas;
enable_canvas();
patterns::whichCanvas = 'B';
});
});
@ -530,7 +530,7 @@ void pick_pattern() {
gp::param.first = 9;
gp::param.second = 0;
set_variation(eVariation::goldberg);
firstland = specialland = laCanvas;
enable_canvas();
patterns::whichCanvas = 'F';
});
});
@ -539,7 +539,7 @@ void pick_pattern() {
dialog::add_action([] {
chg_pattern([] {
set_geometry(gOctagon);
firstland = specialland = laCanvas;
enable_canvas();
patterns::whichCanvas = 'T';
});
});
@ -572,7 +572,7 @@ void pick_pattern() {
set_variation(eVariation::pure);
arcm::current.parse("4^5");
set_geometry(gArchimedean);
firstland = specialland = laCanvas;
enable_canvas();
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[gSpace435], 7);
vid.texture_step = 4;
firstland = specialland = laCanvas;
enable_canvas();
tour::slide_backup(patterns::jhole, jhole);
tour::slide_backup(patterns::rwalls, jhole);
tour::slide_backup(patterns::jblock, jblock);

View File

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

View File

@ -465,7 +465,7 @@ void enable_earth() {
texture::texture_aura = true;
stop_game();
set_geometry(gSphere);
firstland = specialland = laCanvas;
enable_canvas();
patterns::whichCanvas = 'F';
start_game();
texture::config.configname = "textures/earth.txc";
@ -499,7 +499,7 @@ slide dmv_slides[] = {
{"Euclidean plane", 999, LEGAL::NONE | QUICKGEO,
"The sum of angles of a triangle is 180 degrees.\n\n",
[] (presmode mode) {
if(mode == pmStartAll) firstland = specialland = laCanvas;
if(mode == pmStartAll) enable_canvas();
setCanvas(mode, 'F');
if(mode == pmStart) {
stop_game();
@ -573,7 +573,7 @@ slide dmv_slides[] = {
"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",
[] (presmode mode) {
if(mode == pmStartAll) firstland = specialland = laCanvas;
if(mode == pmStartAll) enable_canvas();
setCanvas(mode, 'F');
if(mode == pmStart) {
stop_game();

View File

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