summaryrefslogtreecommitdiff
path: root/extras/romviz.py
diff options
context:
space:
mode:
Diffstat (limited to 'extras/romviz.py')
-rw-r--r--extras/romviz.py21
1 files changed, 8 insertions, 13 deletions
diff --git a/extras/romviz.py b/extras/romviz.py
index de8eb596..f3f733db 100644
--- a/extras/romviz.py
+++ b/extras/romviz.py
@@ -20,19 +20,14 @@ analyze_incbins.process_incbins()
width = 1024
height = 1024
-color_table = {}
-print "creating color table..."
-for value in range(0, 256):
- color_table[value] = (value, value, value)
+im = Image.new("P", (width, height))
-im = Image.new("RGB", (width, height))
-
-print "drawing base color..."
-for pos in range(0, len(extract_maps.rom)):
- widthx = pos % width
- heighty = floor(pos / height)
- #im.putpixel((widthx, heighty), color_table[ord(extract_maps.rom[pos])])
- im.putpixel((widthx, heighty), (0, 0, 0))
+#print "drawing base color..."
+#for pos in range(0, len(extract_maps.rom)):
+# widthx = pos % width
+# heighty = floor(pos / height)
+# #im.putpixel((widthx, heighty), color_table[ord(extract_maps.rom[pos])])
+# im.putpixel((widthx, heighty), (0, 0, 0))
#print "Searching for incbin... for pos= " + hex(pos)
#incbin_found = analyze_incbins.find_incbin_to_replace_for(pos)
@@ -50,6 +45,6 @@ for incbin_key in analyze_incbins.processed_incbins:
for pos in range(start, end+1):
widthx = pos % width
heighty = floor(pos / height)
- im.putpixel((widthx, heighty), (255, 0, 0))
+ im.putpixel((widthx, heighty), 255)
im.save("test.png")