Refactor dungeon room initialization for clarity and add unit tests for room loading functionality

This commit is contained in:
scawful
2024-11-08 00:18:33 -05:00
parent e196388f6c
commit 3d23922f71
2 changed files with 39 additions and 2 deletions

View File

@@ -72,7 +72,7 @@ absl::Status DungeonEditor::Update() {
absl::Status DungeonEditor::Initialize() {
auto dungeon_man_pal_group = rom()->palette_group().dungeon_main;
for (int i = 0; i < 0x100 + 40; i++) {
rooms_.emplace_back(zelda3::dungeon::Room(i));
rooms_.emplace_back(zelda3::dungeon::Room(/*room_id=*/i));
rooms_[i].LoadHeader();
rooms_[i].LoadRoomFromROM();
if (flags()->kDrawDungeonRoomGraphics) {
@@ -827,4 +827,4 @@ void DungeonEditor::DrawUsageGrid() {
} // namespace editor
} // namespace app
} // namespace yaze
} // namespace yaze