Skip to content

Commit

Permalink
bug: ascii gas offset fix
Browse files Browse the repository at this point in the history
  • Loading branch information
goblinhack committed Jul 7, 2023
1 parent ff192a2 commit 10e92f5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/level_display_ascii_gas.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ void Level::display_ascii_gas(point tl, point br, int16_t minx, int16_t miny, in
}

point p(x, y);
int tx = tl.x + (p.x - minx);
int ty = tl.y + (p.y - miny);
int tx = tl.x + (p.x - minx) - (MAP_BORDER_ROCK - 1);
int ty = tl.y + (p.y - miny) - (MAP_BORDER_ROCK - 1);

ascii_set(TILE_LAYER_FG_1, tx, ty, UNICODE_BLOCK);

Expand Down
3 changes: 3 additions & 0 deletions src/thing_display_ascii.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -569,6 +569,9 @@ void Thing::blit_ascii(point tl, point br, point p, bool left_bar)
return;
}

//
// If this code changes make sure and update gas, lasers and projectiles for ascii mode.
//
int x = tl.x + (p.x - level->minx) - (MAP_BORDER_ROCK - 1);
int y = tl.y + (p.y - level->miny) - (MAP_BORDER_ROCK - 1);

Expand Down

0 comments on commit 10e92f5

Please sign in to comment.