summaryrefslogtreecommitdiff
path: root/crystal.py
diff options
context:
space:
mode:
authorBryan Bishop <kanzure@gmail.com>2012-03-12 03:17:39 -0500
committerBryan Bishop <kanzure@gmail.com>2012-03-12 03:17:39 -0500
commitc414f7f208f81a0e469711ed0c7f74704442355e (patch)
treeed978804429cbbdfdbc2e5b74e538576d46a520a /crystal.py
parent3e09fca53930e0563e77b8ee96ae3199d8f3b410 (diff)
fix calculate_pointer again
original-commit-id: 8cfa4bee12b21f7af94bd368165b3b599d18997c
Diffstat (limited to 'crystal.py')
-rw-r--r--crystal.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/crystal.py b/crystal.py
index 095aec3..d778d33 100644
--- a/crystal.py
+++ b/crystal.py
@@ -366,7 +366,7 @@ def calculate_bank(address):
def calculate_pointer(short_pointer, bank=None):
"""calculates the full address given a 4-byte pointer and bank byte"""
short_pointer = int(short_pointer)
- if short_pointer > 0x4000:
+ if 0x4000 <= short_pointer <= 0x7fff:
short_pointer -= 0x4000
bank = int(bank)
else:
@@ -2885,7 +2885,7 @@ def parse_people_event_bytes(some_bytes, address=None, map_group=None, map_id=No
script = parse_script_engine_script_at(ptr_address, map_group=map_group, map_id=map_id)
extra_portion = {
"script_address": ptr_address,
- #"script": script,
+ "script": script,
"event_type": "script",
}
if is_give_item: