diff options
author | Bryan Bishop <kanzure@gmail.com> | 2012-01-20 10:19:51 -0600 |
---|---|---|
committer | Bryan Bishop <kanzure@gmail.com> | 2012-01-20 10:19:51 -0600 |
commit | 3a5864fb1317c5ecb830aa8c046c2a4e4231fa7d (patch) | |
tree | 2ae99995fd07a6344358656464754def42e84673 /extras/romviz.py | |
parent | 237f2896402058b1ce94867436686b936a6a54c6 (diff) |
improvements to romviz.py
hg-commit-id: 7c93000d5ae5
Diffstat (limited to 'extras/romviz.py')
-rw-r--r-- | extras/romviz.py | 21 |
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") |