chore: Refactor room object loading and drawing methods

This commit is contained in:
scawful
2024-08-21 00:09:57 -04:00
parent 4baa302f40
commit 3b5e4cd791
4 changed files with 74 additions and 35 deletions

View File

@@ -5,6 +5,25 @@ namespace app {
namespace zelda3 {
namespace dungeon {
ObjectOption operator|(ObjectOption lhs, ObjectOption rhs) {
return static_cast<ObjectOption>(static_cast<int>(lhs) |
static_cast<int>(rhs));
}
ObjectOption operator&(ObjectOption lhs, ObjectOption rhs) {
return static_cast<ObjectOption>(static_cast<int>(lhs) &
static_cast<int>(rhs));
}
ObjectOption operator^(ObjectOption lhs, ObjectOption rhs) {
return static_cast<ObjectOption>(static_cast<int>(lhs) ^
static_cast<int>(rhs));
}
ObjectOption operator~(ObjectOption option) {
return static_cast<ObjectOption>(~static_cast<int>(option));
}
SubtypeInfo FetchSubtypeInfo(uint16_t object_id) {
SubtypeInfo info;
@@ -31,7 +50,7 @@ SubtypeInfo FetchSubtypeInfo(uint16_t object_id) {
return info;
}
void RoomObject::DrawTile(Tile t, int xx, int yy,
void RoomObject::DrawTile(gfx::Tile16 t, int xx, int yy,
std::vector<uint8_t>& current_gfx16,
std::vector<uint8_t>& tiles_bg1_buffer,
std::vector<uint8_t>& tiles_bg2_buffer,