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:
parent
55b67dcf5d
commit
d798d154ae
22 changed files with 1270 additions and 47 deletions
18
tilemap.cpp
18
tilemap.cpp
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue