Tons of edge work:

--Refactor of scrolling
--Addition of edge math
--Tied linking doors to DR Flag
--Fixed vanilla linking doors
This commit is contained in:
aerinon
2020-03-31 11:00:49 -06:00
parent 8ceb1f4585
commit c968621ba3
13 changed files with 559 additions and 418 deletions

View File

@@ -1188,15 +1188,24 @@ class Door(object):
if self.type == DoorType.Open:
bitmask = self.edge_id
bitmask += 0x10 * self.layer
bitmask += 0x20 * self.quadrant
bitmask += 0x80
if src.type == DoorType.Open:
bitmask += 0x20 * self.quadrant
fraction = 0x10 * multiply_lookup[src.edge_width][self.edge_width]
fraction += divisor_lookup[src.edge_width][self.edge_width]
return [self.roomIndex, bitmask, fraction]
else:
bitmask += 0x20 * self.quad_indicator()
return [self.roomIndex, bitmask]
def quad_indicator(self):
if self.direction in [Direction.North, Direction.South]:
return self.quadrant & 0x1
elif self.direction in [Direction.East, Direction.West]:
return (self.quadrant & 0x2) >> 1
return 0
def dir(self, direction, room, doorIndex, layer):
self.direction = direction
self.roomIndex = room