ref: daf3930984690e8ce44b375dda35a9d725c0c1d2
parent: 17b5e86311e5dae4609818d6e1d63d23bc6815fa
author: yenatch <[email protected]>
date: Fri Jun 28 17:49:50 EDT 2013
crystal: wram label finding
--- a/extras/crystal.py
+++ b/extras/crystal.py
@@ -7353,15 +7353,15 @@
fh.close()
return True
-# TODO: implement get_ram_label
-# wram.asm integration would be nice
+from wram import wram_labels
def get_ram_label(address):
- """not implemented yet.. supposed to get a label for a particular RAM location
- like W_PARTYPOKE1HP"""
+ """returns a label assigned to a particular ram address"""
+ if address in wram_labels.keys():
+ return wram_labels[address][-1]
return None
def get_label_for(address):
- """returns a label assigned to a particular address"""
+ """returns a label assigned to a particular rom address"""
global all_labels
if address == None: