mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-01-18 21:23:03 +00:00
Archimedean menu now displays 'chessboard', 'three colors' and 'football' colorings when available
This commit is contained in:
parent
b43f4dabfa
commit
218709b899
@ -832,7 +832,7 @@ int archimedean_tiling::support_threecolor() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
int archimedean_tiling::support_threecolor_bitruncated() {
|
int archimedean_tiling::support_threecolor_bitruncated() {
|
||||||
for(int i: current.faces) if(i % 2) return 0;
|
for(int i: faces) if(i % 2) return 0;
|
||||||
return 2;
|
return 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1117,32 +1117,52 @@ void show() {
|
|||||||
if(spos < 0) spos = 0;
|
if(spos < 0) spos = 0;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
auto setcanvas = [] (char c) {
|
||||||
|
return [c] () {
|
||||||
|
stop_game();
|
||||||
|
firstland = specialland = laCanvas;
|
||||||
|
patterns::whichCanvas = c;
|
||||||
|
start_game();
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
if(archimedean) {
|
if(archimedean) {
|
||||||
dialog::addSelItem(XLAT("size of the world"), current.world_size(), 0);
|
dialog::addSelItem(XLAT("size of the world"), current.world_size(), 0);
|
||||||
dialog::addSelItem(XLAT("edge length"), current.get_class() == gcEuclid ? (fts(current.edgelength) + XLAT(" (arbitrary)")) : fts6(current.edgelength), 0);
|
dialog::addSelItem(XLAT("edge length"), current.get_class() == gcEuclid ? (fts(current.edgelength) + XLAT(" (arbitrary)")) : fts6(current.edgelength), 0);
|
||||||
|
|
||||||
dialog::addItem(XLAT("color by symmetries"), 't');
|
dialog::addItem(XLAT("color by symmetries"), 't');
|
||||||
dialog::add_action([] () {
|
dialog::add_action(setcanvas('A'));
|
||||||
firstland = specialland = laCanvas;
|
}
|
||||||
patterns::whichCanvas = 'A';
|
else {
|
||||||
restart_game();
|
dialog::addBreak(100);
|
||||||
});
|
dialog::addBreak(100);
|
||||||
|
dialog::addBreak(100);
|
||||||
}
|
}
|
||||||
else dialog::addBreak(100);
|
|
||||||
|
|
||||||
if(true) {
|
if(true) {
|
||||||
dialog::addItem(XLAT("color by sides"), 'u');
|
dialog::addItem(XLAT("color by sides"), 'u');
|
||||||
dialog::add_action([] () {
|
dialog::add_action(setcanvas('B'));
|
||||||
firstland = specialland = laCanvas;
|
|
||||||
patterns::whichCanvas = 'B';
|
|
||||||
restart_game();
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(geosupport_threecolor() == 2) {
|
||||||
|
dialog::addItem(XLAT("three colors"), 'w');
|
||||||
|
dialog::add_action(setcanvas('T'));
|
||||||
|
}
|
||||||
|
else if(geosupport_football() == 2) {
|
||||||
|
dialog::addItem(XLAT("football"), 'w');
|
||||||
|
dialog::add_action(setcanvas('F'));
|
||||||
|
}
|
||||||
|
else if(geosupport_chessboard()) {
|
||||||
|
dialog::addItem(XLAT("chessboard"), 'w');
|
||||||
|
dialog::add_action(setcanvas('c'));
|
||||||
|
}
|
||||||
|
else dialog::addBreak(100);
|
||||||
|
|
||||||
if(archimedean) {
|
if(archimedean) {
|
||||||
dialog::addSelItem(XLAT("variations"), gp::operation_name(), 'v');
|
dialog::addSelItem(XLAT("variations"), gp::operation_name(), 'v');
|
||||||
dialog::add_action(next_variation);
|
dialog::add_action(next_variation);
|
||||||
}
|
}
|
||||||
|
else dialog::addBreak(100);
|
||||||
}
|
}
|
||||||
|
|
||||||
dialog::addHelp();
|
dialog::addHelp();
|
||||||
|
1
hyper.h
1
hyper.h
@ -3597,6 +3597,7 @@ void queuechr(int x, int y, int shift, int size, char chr, int col, int frame =
|
|||||||
int zebra3(cell *c);
|
int zebra3(cell *c);
|
||||||
int geosupport_threecolor();
|
int geosupport_threecolor();
|
||||||
int geosupport_football();
|
int geosupport_football();
|
||||||
|
bool geosupport_chessboard();
|
||||||
bool ishex1(cell *c);
|
bool ishex1(cell *c);
|
||||||
namespace fieldpattern { int fieldval_uniq(cell *c); int fieldval_uniq_rand(cell *c, int d); }
|
namespace fieldpattern { int fieldval_uniq(cell *c); int fieldval_uniq_rand(cell *c, int d); }
|
||||||
bool warptype(cell *c);
|
bool warptype(cell *c);
|
||||||
|
Loading…
Reference in New Issue
Block a user