diff --git a/src/app/zelda3/dungeon/room.cc b/src/app/zelda3/dungeon/room.cc index aa5fd1c2..1987973b 100644 --- a/src/app/zelda3/dungeon/room.cc +++ b/src/app/zelda3/dungeon/room.cc @@ -31,12 +31,12 @@ void Room::LoadHeader() { auto header_location = core::SnesToPc(address); - bg2_ = (Background2)((rom()->data()[header_location] >> 5) & 0x07); + bg2_ = (z3_dungeon_background2)((rom()->data()[header_location] >> 5) & 0x07); // collision = (CollisionKey)((rom()->data()[header_location] >> 2) & 0x07); is_light_ = ((rom()->data()[header_location]) & 0x01) == 1; if (is_light_) { - bg2_ = Background2::DarkRoom; + bg2_ = z3_dungeon_background2::DarkRoom; } palette = ((rom()->data()[header_location + 1] & 0x3F)); diff --git a/src/app/zelda3/dungeon/room.h b/src/app/zelda3/dungeon/room.h index 388b3a75..9cf2de7c 100644 --- a/src/app/zelda3/dungeon/room.h +++ b/src/app/zelda3/dungeon/room.h @@ -159,19 +159,19 @@ class Room : public SharedRom { int64_t room_size_pointer_; std::array blocks_; - std::array chest_list_; std::array background_bmps_; std::vector sprites_; std::vector staircase_rooms_vec_; - Background2 bg2_; + z3_dungeon_background2 bg2_; z3_dungeon_destination pits_; z3_dungeon_destination stair1_; z3_dungeon_destination stair2_; z3_dungeon_destination stair3_; z3_dungeon_destination stair4_; + std::array chest_list_; std::vector chests_in_room_; std::vector tile_objects_; diff --git a/src/app/zelda3/dungeon/room_object.h b/src/app/zelda3/dungeon/room_object.h index 536e8651..497bbe4e 100644 --- a/src/app/zelda3/dungeon/room_object.h +++ b/src/app/zelda3/dungeon/room_object.h @@ -28,18 +28,6 @@ SubtypeInfo FetchSubtypeInfo(uint16_t object_id); enum class SpecialObjectType { Chest, BigChest, InterroomStairs }; -enum Background2 { - Off, - Parallax, - Dark, - OnTop, - Translucent, - Addition, - Normal, - Transparent, - DarkRoom -}; - enum Sorting { All = 0, Wall = 1, @@ -87,34 +75,7 @@ class RoomObject : public SharedRom { ox_(x), oy_(y), width_(16), - height_(16), - unique_id_(0) {} - - void GetObjectSize() { - previous_size_ = size_; - size_ = 1; - GetBaseSize(); - UpdateSize(); - size_ = 2; - GetSizeSized(); - UpdateSize(); - size_ = previous_size_; - } - - void GetBaseSize() { - base_width_ = width_; - base_height_ = height_; - } - - void GetSizeSized() { - size_height_ = height_ - base_height_; - size_width_ = width_ - base_width_; - } - - void UpdateSize() { - width_ = 8; - height_ = 8; - } + height_(16) {} void AddTiles(int nbr, int pos) { for (int i = 0; i < nbr; i++) { @@ -135,10 +96,6 @@ class RoomObject : public SharedRom { protected: bool all_bgs_ = false; bool lit_ = false; - bool deleted_ = false; - bool show_rectangle_ = false; - bool diagonal_fix_ = false; - bool selected_ = false; int16_t id_; uint8_t x_; @@ -153,15 +110,8 @@ class RoomObject : public SharedRom { int width_; int height_; - int base_width_; - int base_height_; - int size_width_; - int size_height_; - int tile_index_ = 0; int offset_x_ = 0; int offset_y_ = 0; - int preview_id_ = 0; - int unique_id_ = 0; std::string name_; diff --git a/src/incl/dungeon.h b/src/incl/dungeon.h index c40e712d..9bc649a6 100644 --- a/src/incl/dungeon.h +++ b/src/incl/dungeon.h @@ -18,8 +18,8 @@ struct z3_object_door { struct z3_dungeon_destination { uint8_t index; - uint8_t target = 0; - uint8_t target_layer = 0; + uint8_t target; + uint8_t target_layer; }; struct z3_staircase { @@ -29,18 +29,30 @@ struct z3_staircase { }; struct z3_chest { - uint8_t x = 0; - uint8_t y = 0; - uint8_t item = 0; - bool picker = false; - bool big_chest = false; + uint8_t x; + uint8_t y; + uint8_t item; + bool picker; + bool big_chest; }; struct z3_chest_data { - uchar id; + uint8_t id; bool size; }; +enum z3_dungeon_background2 { + Off, + Parallax, + Dark, + OnTop, + Translucent, + Addition, + Normal, + Transparent, + DarkRoom +}; + #ifdef __cplusplus } #endif