summaryrefslogtreecommitdiff
path: root/crystal.py
diff options
context:
space:
mode:
Diffstat (limited to 'crystal.py')
-rw-r--r--crystal.py10
1 files changed, 7 insertions, 3 deletions
diff --git a/crystal.py b/crystal.py
index 2077c37..4353ad5 100644
--- a/crystal.py
+++ b/crystal.py
@@ -145,12 +145,16 @@ def load_rom(filename="../baserom.gbc"):
elif os.lstat(filename).st_size != len(rom):
return direct_load_rom(filename)
+def direct_load_asm(filename="../main.asm"):
+ """returns asm source code (AsmList) from a file"""
+ asm = open(filename, "r").read().split("\n")
+ asm = AsmList(asm)
+ return asm
def load_asm(filename="../main.asm"):
- """loads the asm source code into memory"""
+ """returns asm source code (AsmList) from a file (uses a global)"""
global asm
- asm = open(filename, "r").read().split("\n")
- asm = AsmList(asm)
+ asm = direct_load_asm(filename=filename)
return asm
def grouper(some_list, count=2):