shithub: pokered

Download patch

ref: 6a8582e61f80c6ce49787c2c50fe6c36953fb95f
parent: d9fb7e59bdca8b0ee7d1327100d39bb28d013092
author: Bryan Bishop <kanzure@gmail.com>
date: Fri Jan 6 06:20:48 EST 2012

fix some python reserved names and variables

hg-commit-id: 712f1522dcc9


--- a/extras/analyze_texts.py
+++ b/extras/analyze_texts.py
@@ -89,20 +89,20 @@
     texts = {}
     for map_id in extract_maps.map_headers:
         if map_id in extract_maps.bad_maps: continue #skip
-        map = extract_maps.map_headers[map_id]
-        map["texts"] = {}
-        referenced_texts = map["referenced_texts"]
+        map2 = extract_maps.map_headers[map_id]
+        map2["texts"] = {}
+        referenced_texts = map2["referenced_texts"]
         should_be_total += len(referenced_texts)
-        texts_pointer = int(map["texts_pointer"], 16)
+        texts_pointer = int(map2["texts_pointer"], 16)
 
         for text_id in referenced_texts:
-            #print "Working on map id=" + str(map["id"]) + " and text id=" + str(text_id)
+            #print "Working on map id=" + str(map2["id"]) + " and text id=" + str(text_id)
             text_pointer = get_text_pointer(texts_pointer, text_id)
             commands = parse_text_script(text_pointer)
-            map["texts"][text_id] = commands
+            map2["texts"][text_id] = commands
 
-        texts[map_id] = map["texts"]
-        extract_maps.map_headers[map_id]["texts"] = map["texts"]
+        texts[map_id] = map2["texts"]
+        extract_maps.map_headers[map_id]["texts"] = map2["texts"]
     return texts
 
 if __name__ == "__main__":
--- a/extras/extract_maps.py
+++ b/extras/extract_maps.py
@@ -654,13 +654,13 @@
     if len(map_pointers) == 0: load_map_pointers()
 
     for map_id in map_pointers.keys():
-        map = map_pointers[map_id]
-        map_header = read_map_header(map["address"], map["bank"])
+        map2 = map_pointers[map_id]
+        map_header = read_map_header(map2["address"], map2["bank"])
 
         map_header["id"] = map_id
-        map_header["name"] = map["name"]
-        map_header["address"] = map["address"]
-        map_header["bank"] = map["bank"]
+        map_header["name"] = map2["name"]
+        map_header["address"] = map2["address"]
+        map_header["bank"] = map2["bank"]
 
         map_headers[map_id] = map_header