DZB: Implement group sea floor properties
@@ -586,7 +586,9 @@ class Group:
self.is_water = False
self.is_lava = False
self.unused_1 = False
- self.sound_id = 0
+ self.sea_floor_room_index = 0
+ self.is_inner_sea_floor = False
+ self.is_outer_edge_sea_floor = False
self.unused_2 = 0
def read(self, offset):
@@ -626,7 +628,9 @@ class Group:
self.is_water = (bitfield & 0x00000100) != 0
self.is_lava = (bitfield & 0x00000200) != 0
self.unused_1 = (bitfield & 0x00000400) != 0
- self.sound_id = (bitfield & 0x0007F800) >> 11
+ self.sea_floor_room_index = (bitfield & 0x0001F800) >> 11
+ self.is_inner_sea_floor = (bitfield & 0x00020000) != 0
+ self.is_outer_edge_sea_floor = (bitfield & 0x00040000) != 0
self.unused_2 = (bitfield & 0xFFF80000) >> 19
def save_changes(self):
@@ -659,7 +663,9 @@ class Group:
bitfield |= (self.is_water << 8) & 0x00000100
bitfield |= (self.is_lava << 9) & 0x00000200
bitfield |= (self.unused_1 << 10) & 0x00000400
- bitfield |= (self.sound_id << 11) & 0x0007F800
+ bitfield |= (self.sea_floor_room_index << 11) & 0x0001F800
+ bitfield |= (self.is_inner_sea_floor << 17) & 0x00020000
+ bitfield |= (self.is_outer_edge_sea_floor << 18) & 0x00040000
bitfield |= (self.unused_2 << 19) & 0xFFF80000
write_u32(self.dzb_data, self.offset+0x30, bitfield)
