diff options
author | U-Fish-PC\Daniel <corrnondacqb@yahoo.com> | 2013-09-16 13:12:42 -0400 |
---|---|---|
committer | U-Fish-PC\Daniel <corrnondacqb@yahoo.com> | 2013-09-16 13:12:42 -0400 |
commit | 4000d7a23ab9a9d46bea6e937ab12d63c3194b89 (patch) | |
tree | d7f66337ea36fb300f7fc053ba572d05995b5a2f /extras/romviz.py | |
parent | 5537897109c43381c222fcab96b2db3b9d3ffe7d (diff) | |
parent | 11aa33e49c2c4a8c9c6033d62da43292283ff675 (diff) |
Merge branch 'master' into comments
Diffstat (limited to 'extras/romviz.py')
m--------- | extras | 0 | ||||
-rw-r--r-- | extras/romviz.py | 40 |
2 files changed, 0 insertions, 40 deletions
diff --git a/extras b/extras new file mode 160000 +Subproject 7aa016fb528bcc8dcb30c6a887957851623eccc diff --git a/extras/romviz.py b/extras/romviz.py deleted file mode 100644 index 3f07d65e..00000000 --- a/extras/romviz.py +++ /dev/null @@ -1,40 +0,0 @@ -#author: Bryan Bishop <kanzure@gmail.com> -#date: 2012-01-10 -#show me an image -import Image -from math import floor -import extract_maps -import analyze_incbins - -print "loading rom.." -extract_maps.load_rom() -#extract_maps.load_map_pointers() -#extract_maps.read_all_map_headers() - -print "analyzing incbins.." -analyze_incbins.load_asm() -analyze_incbins.isolate_incbins() -analyze_incbins.process_incbins() - -width = 1024 -height = 1024 - -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: - incbin = analyze_incbins.processed_incbins[incbin_key] - start = incbin["start"] - end = incbin["end"] - - for pos in range(start, end+1): - widthx = int(pos % width) - heighty = int(floor(pos / height)) - im.putpixel((widthx, heighty), 1) - -im.save("test.png") |