1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2026-05-18 04:02:07 +00:00

ru:: final_view

This commit is contained in:
Zeno Rogue
2026-04-16 23:54:07 +02:00
parent 4c6ae18b03
commit 5225a5baf2
2 changed files with 14 additions and 0 deletions
+13
View File
@@ -131,6 +131,8 @@ void compute_scrm() {
scrm.T[2][2] = 1;
}
bool final_view = false;
void render_room_walls(room *r) {
initquickqueue();
bool af = should_apply_fov();
@@ -142,6 +144,17 @@ void render_room_walls(room *r) {
if(af && !r->fov[y][x]) continue;
int c = r->block_at[y][x];
if(!af && final_view) {
int x1 = x-1, y1 = y-1, x2 = x+2, y2 = y+2;
if(c&4) x2++, y2++;
if(c&1) x1--, x2--;
if(c&2) y1--, y2--;
if(x1<0) x1=0; if(y1<0) y1=0; if(x2>room_x) x2=room_x; if(y2>room_y) y2=room_y;
for(int ax=x1; ax<x2; ax++) for(int ay=y1; ay<y2; ay++) if(walls[r->at(ax, ay)].flags & W_TRANS) goto ok;
continue;
}
ok:
// ld sx = 1.5;
// ld sy = 1.3;
+1
View File
@@ -98,6 +98,7 @@ void editmap_frame() {
dialog::display();
});
if(keypressed('f')) floodfill_pick(mousepx / block_x, mousepy / block_y);
if(keypressed('x')) final_view = !final_view;
if(keypressed('t')) { m.where = xy(mousepx, mousepy); m.vel = xy(0, 0); current_room->edited = true; m.existing = true; m.hp = m.max_hp(); }
}