mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2024-11-23 21:07:17 +00:00
rogueviz::magiccube:: minor improvements
This commit is contained in:
parent
40e7f80ca9
commit
83943bb968
@ -26,8 +26,10 @@ void build(crystal::coord co, int at) {
|
||||
setdist(c, 7, NULL);
|
||||
if(twos == 0)
|
||||
c->landparam = back;
|
||||
else if(twos == 1)
|
||||
else if(twos == 1) {
|
||||
c->landparam = magiccolors[index];
|
||||
if(WDIM == 3) c->wall = waWaxWall;
|
||||
}
|
||||
|
||||
println(hlog, co, " twos = ", twos, " index = ", index, " set = ", format("%06X", c->landparam));
|
||||
|
||||
@ -63,6 +65,10 @@ bool magic_markers(cell *c, const transmatrix& V) {
|
||||
if(vizid != &magic) return false;
|
||||
timerghost = false;
|
||||
if(c->landparam == back) {
|
||||
if(GDIM == 2) {
|
||||
auto co = crystal::get_coord(c->master);
|
||||
for(int a=0; a<S7/2; a++) if(co[a] >= 6 || co[a] <= -6) c->landparam = 0;
|
||||
}
|
||||
if(GDIM == 2)
|
||||
for(int i=0; i<S7; i++) {
|
||||
cell *c2 = c->move(i);
|
||||
@ -135,6 +141,7 @@ bool magic_rotate(cell *c) {
|
||||
for(int i=0; i<crystal::get_dim(); i++) {
|
||||
if(co[i] == 0) zeros.push_back(i);
|
||||
else if(co[i] == 2 || co[i] == -2) ;
|
||||
else if(co[i] == 4 || co[i] == -4) ;
|
||||
else return false;
|
||||
}
|
||||
println(hlog, "zeros = ", zeros);
|
||||
|
Loading…
Reference in New Issue
Block a user