summaryrefslogtreecommitdiff
path: root/extras/romviz.py
diff options
context:
space:
mode:
authorKuroiIeWa5Da <tyuki@adu.me>2012-01-20 15:15:01 -0600
committerKuroiIeWa5Da <tyuki@adu.me>2012-01-20 15:15:01 -0600
commit6e48e6bbf7ba6639512de5bc474ee2c6b365c1b7 (patch)
treeac7bad18f9977edfd49803aeed72653f1b1315b5 /extras/romviz.py
parent6e679fd29ccfc10a6e20a869fdf10fd45c7293c1 (diff)
parent1326a261c9ce84fa9c5dd47086c31368ccf867f6 (diff)
merge
hg-commit-id: ea60b3417955
Diffstat (limited to 'extras/romviz.py')
-rw-r--r--extras/romviz.py28
1 files changed, 7 insertions, 21 deletions
diff --git a/extras/romviz.py b/extras/romviz.py
index de8eb596..eefdca30 100644
--- a/extras/romviz.py
+++ b/extras/romviz.py
@@ -20,26 +20,12 @@ 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("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 "Searching for incbin... for pos= " + hex(pos)
- #incbin_found = analyze_incbins.find_incbin_to_replace_for(pos)
- #if incbin_found == None:
- # im.putpixel((widthx, heighty), (0, 0, 0))
- #else:
- # im.putpixel((widthx, heighty), (255, 255, 255))
+im = Image.new("P", (width, height), 0)
+
+im.putpalette([
+ 0, 0, 0,
+ 126, 30, 156,
+])
print "drawing incbins..."
for incbin_key in analyze_incbins.processed_incbins:
@@ -50,6 +36,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), 1)
im.save("test.png")