crystal:: 3D mode works from the Rug menu, and linked to from its menu

This commit is contained in:
Zeno Rogue 2018-12-02 20:26:58 +01:00
parent e6a97b6914
commit 92eaf96930
3 changed files with 14 additions and 0 deletions

View File

@ -858,6 +858,12 @@ void show() {
dialog::addBreak(50);
dialog::addBoolItem("view coordinates in the cheat mode", view_coordinates, 'v');
dialog::add_action([]() { view_coordinates = !view_coordinates; });
if(geometry == gCrystal) {
dialog::addBoolItem("3D display", rug::rugged, 'r');
dialog::add_action([]() { pushScreen(rug::show); });
}
else
dialog::addBreak(100);
dialog::addBack();
dialog::display();
}

View File

@ -4154,6 +4154,7 @@ namespace crystal {
int dist_alt(cell *c);
int dist_relative(cell *c);
void show();
void init_rotation();
}
hyperpoint get_warp_corner(cell *c, int cid);

View File

@ -1396,6 +1396,13 @@ void init_model() {
qvalid = 0; dt = 0; queueiter = 0;
err_zero_current = err_zero;
if(geometry == gCrystal && surface::sh == surface::dsNone) {
surface::sh = surface::dsCrystal;
crystal::init_rotation();
good_shape = true;
return;
}
try {
buildRug();
while(good_shape && subdivide_further()) subdivide();