From b27e54750928818c8f96edbb48b5f4817bd27ef2 Mon Sep 17 00:00:00 2001 From: Bryan Bishop Date: Wed, 20 Jun 2012 01:42:33 -0500 Subject: more de-dependency-looping original-commit-id: 1342ab67db4301563d317722d04fab9473411fda --- crystal.py | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) (limited to 'crystal.py') diff --git a/crystal.py b/crystal.py index 22bd6ec..97ca30c 100644 --- a/crystal.py +++ b/crystal.py @@ -302,15 +302,7 @@ def load_map_group_offsets(): map_group_offsets.append(offset) return map_group_offsets -def calculate_bank(address): - """you are too lazy to divide on your own?""" - if type(address) == str: - address = int(address, 16) - if 0x4000 <= address <= 0x7FFF: - raise Exception, "bank 1 does not exist" - return int(address) / 0x4000 - -from pointers import calculate_pointer +from pointers import calculate_bank, calculate_pointer def calculate_pointer_from_bytes_at(address, bank=False): """calculates a pointer from 2 bytes at a location -- cgit v1.2.3