mirror of
https://github.com/thornAvery/kep-hack.git
synced 2025-09-16 18:30:50 +12:00
improvements to romviz.py
hg-commit-id: 7c93000d5ae5
This commit is contained in:
parent
237f289640
commit
3a5864fb13
|
@ -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")
|
||||
|
|
Loading…
Reference in a new issue