fixed issue with map not printing any room with number above 9

This commit is contained in:
2024-07-17 12:03:50 -04:00
parent 9c942338ed
commit 004c79f094

View File

@ -126,7 +126,8 @@ position_list game_map::get_available_around(const position &pos) const {
void game_map::print(output *out) const {
for (std::size_t i = 0; i < map.size(); ++i)
out->print_char(remap_index(i), map[i] <= 9 ? '.' : map[i],
out->print_char(remap_index(i),
map[i] <= MAX_ROOM_CNT ? '.' : map[i],
map[i] == '\\' || map[i] == '>' ||
map[i] == '<' ? COLOR_PAIR(COLOR_BLUE) : A_NORMAL);
}
@ -280,7 +281,7 @@ std::vector<game_map::room> game_map::distr_rooms(RNG *rng,
if (l == r) {
result.push_back({
0, rng->rand_under(ACTUAL_MAP_WIDTH -
room_dims[l].first.x + 1),
room_dims[l].first.x + 1),
room_dims[l].first.x,
room_dims[l].first.y, {0, 0}, {0, 0}});
continue;