Update CI workflow for Windows builds and refactor room object handling

- Modified the CI workflow to conditionally set up vcpkg and configure CMake based on the build type for Windows, enhancing build flexibility.
- Refactored the handling of staircase objects in the Room class to use initializer lists for improved clarity and consistency in object construction.
- Updated chest data handling to utilize modern C++ syntax for better readability.
This commit is contained in:
scawful
2025-09-26 11:19:24 -04:00
parent 132823701b
commit 7c90b2b6ba
2 changed files with 14 additions and 8 deletions

View File

@@ -528,15 +528,15 @@ void Room::HandleSpecialObjects(short oid, uint8_t posX, uint8_t posY, int& nbr_
if (nbr_of_staircase < 4) {
tile_objects_.back().set_options(ObjectOption::Stairs |
tile_objects_.back().options());
z3_staircases_.push_back(staircase(
z3_staircases_.push_back({
posX, posY,
absl::StrCat("To ", staircase_rooms_[nbr_of_staircase])
.data()));
.data()});
nbr_of_staircase++;
} else {
tile_objects_.back().set_options(ObjectOption::Stairs |
tile_objects_.back().options());
z3_staircases_.push_back(staircase(posX, posY, "To ???"));
z3_staircases_.push_back({posX, posY, "To ???"});
}
break;
}
@@ -624,7 +624,7 @@ void Room::LoadChests() {
}
chests_in_room_.emplace_back(
chest_data(rom_data[cpos + (i * 3) + 2], big));
chest_data{rom_data[cpos + (i * 3) + 2], big});
}
}
}