First pass on boss randomization
This commit is contained in:
@@ -22,6 +22,17 @@ class RoomObject:
|
||||
def write_to_rom(self, rom):
|
||||
rom.write_bytes(snes_to_pc(self.address), self.data)
|
||||
|
||||
# subtype 3 only?
|
||||
def matches_oid(self, oid):
|
||||
my_oid = (self.data[2] << 4) | ((self.data[1] & 3) << 2) | (self.data[0] & 3)
|
||||
return my_oid == oid
|
||||
|
||||
@staticmethod
|
||||
def subtype3_factory(x, y, type_id):
|
||||
return RoomObject(None, [((x << 2) & 0xFC) | (type_id & 0x3),
|
||||
((y << 2) & 0xFC) | ((type_id >> 2) & 0x3),
|
||||
0xF0 | ((type_id >> 4) & 0xF)])
|
||||
|
||||
|
||||
class DoorObject:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user