mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2024-11-23 13:07:16 +00:00
qtm: more power
This commit is contained in:
parent
7dbbbb2dd9
commit
3daaaa6c6f
@ -28,6 +28,23 @@ color_t rainbow_color_at(hyperpoint h) {
|
||||
ld hue = atan2(h[0], h[1]) / TAU;
|
||||
return rainbow_color(sat, hue);
|
||||
}
|
||||
|
||||
int z_in_wall(int z) {
|
||||
if(qmode == 0) return 1;
|
||||
if(qmode == 1) {
|
||||
if(z == 0) return 2;
|
||||
return 1;
|
||||
}
|
||||
if(qmode == 2) {
|
||||
if(z) return 0;
|
||||
return 1;
|
||||
}
|
||||
if(qmode == 3) {
|
||||
if(among(z, 1, 3, 4)) return 0;
|
||||
return 1;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
void set_cell(cell *c) {
|
||||
if(mhybrid) {
|
||||
@ -38,14 +55,9 @@ void set_cell(cell *c) {
|
||||
c->landparam = c1->landparam;
|
||||
c->item = itNone;
|
||||
c->monst = moNone;
|
||||
if(qmode == 1) {
|
||||
if(hybrid::get_where(c).second == 0)
|
||||
c->landparam = 0xFFFFFF;
|
||||
}
|
||||
if(qmode == 2) {
|
||||
if(hybrid::get_where(c).second != 0)
|
||||
c->wall = waNone;
|
||||
}
|
||||
int zw = z_in_wall(hybrid::get_where(c).second);
|
||||
if(zw == 2) c->landparam = 0xFFFFFF;
|
||||
if(zw == 0) c->wall = waNone;
|
||||
}
|
||||
else {
|
||||
if(c->land == laHive) return;
|
||||
@ -67,9 +79,20 @@ void set_cell(cell *c) {
|
||||
}
|
||||
c->landparam = col;
|
||||
c->land = laHive;
|
||||
c->wall = (nil ? (c->master->zebraval & c->master->emeraldval & 1) : pseudohept(c)) ? waWaxWall : waNone;
|
||||
bool wallmap =
|
||||
(nil && nilv::nil_structure_index == 0) ? (c->master->zebraval & c->master->emeraldval & 1) :
|
||||
(nil && nilv::nil_structure_index == 2) ? (gmod(c->master->zebraval - c->master->emeraldval, 3) == 0) :
|
||||
pseudohept(c);
|
||||
c->wall = wallmap ? waWaxWall : waNone;
|
||||
c->item = itNone;
|
||||
c->monst = moNone;
|
||||
if(wallmap && nil) {
|
||||
int z = zgmod(c->master->fieldval, nilv::nilperiod[2]);
|
||||
int zw = z_in_wall(z);
|
||||
println(hlog, z, " -> ", zw);
|
||||
if(zw == 0) c->wall = waNone;
|
||||
if(zw == 2) c->landparam = 0xFFFFFF;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user