summaryrefslogtreecommitdiff
path: root/extras/crystal.py
diff options
context:
space:
mode:
authorBryan Bishop <kanzure@gmail.com>2012-05-26 23:13:48 -0500
committerBryan Bishop <kanzure@gmail.com>2012-05-26 23:13:48 -0500
commitfbaadd97ac995da8d0f3dcbe68e75eed7ba2569d (patch)
tree070b4bc391bc2d9839139d47c41af2ab1d75d2c8 /extras/crystal.py
parent3a614ddcea0656a3297af78f305de64de38c41a1 (diff)
some broken code
Diffstat (limited to 'extras/crystal.py')
-rw-r--r--extras/crystal.py20
1 files changed, 19 insertions, 1 deletions
diff --git a/extras/crystal.py b/extras/crystal.py
index fa509c97d..a437701d7 100644
--- a/extras/crystal.py
+++ b/extras/crystal.py
@@ -5020,9 +5020,11 @@ class Connection:
self.connected_map_width = connected_map_width
y_position_after_map_change = ord(rom[current_address])
+ yoffset = y_position_after_map_change
current_address += 1
x_position_after_map_change = ord(rom[current_address])
+ xoffset = x_position_after_map_change
current_address += 1
# in pokered these were called alignments? same thing?
@@ -5072,7 +5074,23 @@ class Connection:
elif ldirection == "south":
print "south.. dunno what to do?"
h = None
- p = 400
+ p = (xoffset - connection_strip_length + self.smh.width.byte) / 2
+ if xoffset == 0:
+ print "connection_strip_length: " + str(connection_strip_length)
+ print "strip_pointer = " + hex(strip_pointer)
+ print "other map height = " + str(connected_map_height)
+ print "other map width = " + str(connected_map_width)
+ o = "other map group_id="+hex(connected_map_group_id) + " map_id="+hex(connected_map_id)+" "+map_names[connected_map_group_id][connected_map_id]["label"] + " smh="+hex(connected_second_map_header.address)
+ o += " width="+str(connected_second_map_header.width.byte)+" height="+str(connected_second_map_header.height.byte)
+ print o
+ raise Exception, "south - xoffset is 0"
+
+ o = "current map group_id="+hex(self.map_group)+" map_id="+hex(self.map_id)+" "+map_names[self.map_group][self.map_id]["label"]+" smh="+hex(self.smh.address)
+ o += " width="+str(self.smh.width.byte)+" height="+str(self.smh.height.byte)
+ print o
+ #if not ((p % 0x4000) + 0x4000 == strip_pointer):
+ # p = 400
+
data = {
"strip_pointer": strip_pointer,
"strip_length": connection_strip_length,