diff --git a/src/app/gfx/bitmap.h b/src/app/gfx/bitmap.h index 53fdfc89..f35d37f1 100644 --- a/src/app/gfx/bitmap.h +++ b/src/app/gfx/bitmap.h @@ -306,8 +306,9 @@ class BitmapManager { if (it != bitmap_cache_.end()) { return it->second; } - throw std::runtime_error( - absl::StrCat("Bitmap with id ", id, " not found.")); + std::cout << absl::StrCat("Bitmap with id ", id, " not found.") + << std::endl; + return bitmap_cache_.begin()->second; } std::shared_ptr const &shared_bitmap(int id) { auto it = bitmap_cache_.find(id); diff --git a/src/app/zelda3/dungeon/room_object.h b/src/app/zelda3/dungeon/room_object.h index 25a07782..b32a2cce 100644 --- a/src/app/zelda3/dungeon/room_object.h +++ b/src/app/zelda3/dungeon/room_object.h @@ -76,18 +76,12 @@ class RoomObject : public SharedRom { height_(16), unique_id_(0) {} - virtual void Draw() { - // ... Draw function implementation here - } - void GetObjectSize() { previous_size_ = size_; size_ = 1; - // Draw(); GetBaseSize(); UpdateSize(); size_ = 2; - // Draw(); GetSizeSized(); UpdateSize(); size_ = previous_size_; @@ -172,7 +166,6 @@ class Subtype1 : public RoomObject { int tileCount) : RoomObject(id, x, y, size, layer), tile_count_(tileCount) { auto rom_data = rom()->data(); - name = Type1RoomObjectNames[id & 0xFF]; int pos = core::tile_address + static_cast( @@ -182,7 +175,7 @@ class Subtype1 : public RoomObject { sort = (Sorting)(Sorting::Horizontal | Sorting::Wall); } - void Draw() override { + void Draw() { for (int s = 0; s < size_ + (tile_count_ == 8 ? 1 : 0); s++) { for (int i = 0; i < tile_count_; i++) { // DrawTile(tiles[i], ((s * 2)) * 8, (i / 2) * 8); @@ -201,7 +194,6 @@ class Subtype2 : public RoomObject { Subtype2(int16_t id, uint8_t x, uint8_t y, uint8_t size, uint8_t layer) : RoomObject(id, x, y, size, layer) { auto rom_data = rom()->data(); - name = Type2RoomObjectNames[id & 0x7F]; int pos = core::tile_address + static_cast( @@ -211,7 +203,7 @@ class Subtype2 : public RoomObject { sort = (Sorting)(Sorting::Horizontal | Sorting::Wall); } - void Draw() override { + void Draw() { for (int i = 0; i < 8; i++) { // DrawTile(tiles[i], x_ * 8, (y_ + i) * 8); } @@ -228,7 +220,6 @@ class Subtype3 : public RoomObject { Subtype3(int16_t id, uint8_t x, uint8_t y, uint8_t size, uint8_t layer) : RoomObject(id, x, y, size, layer) { auto rom_data = rom()->data(); - name = Type3RoomObjectNames[id & 0xFF]; int pos = core::tile_address + static_cast( @@ -238,7 +229,7 @@ class Subtype3 : public RoomObject { sort = (Sorting)(Sorting::Horizontal | Sorting::Wall); } - void Draw() override { + void Draw() { for (int i = 0; i < 8; i++) { // DrawTile(tiles[i], x_ * 8, (y_ + i) * 8); } diff --git a/src/app/zelda3/overworld/overworld_map.h b/src/app/zelda3/overworld/overworld_map.h index 898948f1..f84e785c 100644 --- a/src/app/zelda3/overworld/overworld_map.h +++ b/src/app/zelda3/overworld/overworld_map.h @@ -123,7 +123,7 @@ class OverworldMap : public editor::context::GfxContext { int large_index_ = 0; // Quadrant ID [0-3] int world_ = 0; // World ID [0-2] int game_state_ = 0; // Game state [0-2] - int main_gfx_id_ = 0; // Spr Pal Modifier + int main_gfx_id_ = 0; // Main Gfx ID uint16_t message_id_ = 0; uint8_t area_graphics_ = 0;