We now have a full map that's basically the same mapping system from Roguish. There's a bug right now where it needs you to move once to calc the light and it's not being centered, but it does work.

This commit is contained in:
Zed A. Shaw 2025-02-07 19:32:00 -05:00
parent 55b67dcf5d
commit d798d154ae
22 changed files with 1270 additions and 47 deletions

View file

@ -73,21 +73,3 @@ bool TileMap::INVARIANT() {
dbc::check(matrix::width($tile_ids) == $width, "$tile_ids has wrong width");
return true;
}
std::wstring TileMap::minimap(size_t x, size_t y) {
string result;
for(matrix::box it{$tile_ids, x, y, 5}; it.next();) {
const TileCell &cell = $display[it.y][it.x];
if(it.x == x && it.y == y) {
result += "@";
} else {
result += cell.display;
}
if(it.x == it.right - 1) result += "\n";
}
std::wstring_convert<std::codecvt_utf8_utf16<wchar_t>> $converter;
return $converter.from_bytes(result);
}