diff options
author | Bryan Bishop <kanzure@gmail.com> | 2013-09-01 02:27:44 -0500 |
---|---|---|
committer | Bryan Bishop <kanzure@gmail.com> | 2013-09-01 02:27:44 -0500 |
commit | e84a5b2062ff5e9b010447e3a3c78dd67a653166 (patch) | |
tree | 20c0ceb41513c1a3676e60a31d61b64e1bc2b854 /extras/romviz.py | |
parent | 4d6b8249698a8cd1ba42ee3517de08252c8062f2 (diff) |
make extras/ a submodule
Use pokemontools v1.3.0 and use the same preprocessor as the pokecrystal
project.
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 795cd58a70c80082003e40127241cfaefa0fae8 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") |