diff options
author | yenatch <yenatch@gmail.com> | 2013-06-12 23:31:21 -0400 |
---|---|---|
committer | yenatch <yenatch@gmail.com> | 2013-06-12 23:31:21 -0400 |
commit | a923bf768ae2307d2ed2bc289c98e07a8de77084 (patch) | |
tree | 20b8042fc2e6b723f8d9c9f4467a7da942ec0bc1 /extras | |
parent | 6ba758aa53bbf14e2c152fd88f786a501f6bb029 (diff) | |
parent | 723645b47011e2f7522bbcbb8304ffdc3bf774c1 (diff) |
Merge branch 'master' of github.com:kanzure/pokecrystal
Conflicts:
extras/gfx.py
Diffstat (limited to 'extras')
-rw-r--r-- | extras/overworldripper.py | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/extras/overworldripper.py b/extras/overworldripper.py new file mode 100644 index 000000000..7148db6fd --- /dev/null +++ b/extras/overworldripper.py @@ -0,0 +1,13 @@ +import gfx + +def rip_sprites_from_bank(bank, offset=0): + file_handler = open("../gfx/overworld/bank" + str(hex(bank))[2:] + ".asm", "w") + for sprite in range(0 + offset, 256 + offset): + filename = "../gfx/overworld/" + str(sprite).zfill(3) + ".2bpp" + gfx.get_uncompressed_gfx((bank * 0x4000 + ((sprite - offset) * 4 * 0x10)), 4, filename) + gfx.to_png(filename) + file_handler.write("INCBIN \"" + filename[3:] + "\"\n") + file_handler.close() + +rip_sprites_from_bank(0x30) +rip_sprites_from_bank(0x31, offset=256)
\ No newline at end of file |