summaryrefslogtreecommitdiff
path: root/pokemontools/gfx.py
AgeCommit message (Collapse)Author
2014-06-15gfx: Let .wxh filename arguments exceed 9.yenatch
Nothing needs this yet, but chances are it'll happen.
2014-06-02Merge remote-tracking branch 'yenatch/master'yenatch
Conflicts: pokemontools/gfx.py
2014-06-02Rewrite the lz compressor.yenatch
2014-05-03gfx.py: Forgot to add rom_offset.yenatch
2014-05-02Refactor gfx.py to use bytearrays. Fix some graphics dumping functions.yenatch
2014-04-19Transpose images by height from 2bpp to png and width from png to 2bpp.yenatch
Transposing non-square images would work over the expected width, rather than the current width (the expected height). This never came up since transposed images are typically square.
2014-04-16gfx: Don't try to load baserom.gbc unless it's actually being used.yenatch
This prevented pokered from building if the file "baserom.gbc" did not exist.
2014-04-15gfx: Decompress graphics that can be converted to png.yenatch
Before, converting a .2bpp.lz file required calling decompress and convert_to_png on the compressed and decompressed files respectively. gfx.py unlz {}.lz gfx.py png {} Putting a .lz file into convert_to_png would raise an exception. Instead, passing compressed graphics into convert_to_png will decompress them first. This skips the (now optional) manual decompress step.
2014-04-15gfx: Transpose blocks of images instead of only the first block.yenatch
This allows transposed images to be grouped together (e.g. animations).
2014-04-05gfx: Don't pad images smaller than a tile.yenatch
Also fix a bug where images smaller than a tile are not converted at all.
2014-04-05Add "norepeat" and "arrange" image attributes.yenatch
Eliminates repeated tiles and also spits out a tilemap respectively. One-way for now. Likely to be used in pokered, but useful in its own right.
2014-03-28gfx: Redo command-line interface, format handling, filename arguments.yenatch
- Use argparse and less redundant commands. - Make .lz independent of content. Allows tilemaps to not be images. - Add .[w]x[h] filename argument for transposed images. - Add .interleave filename argument for 8x16 sprites. - Refactor some conversion code.
2014-03-23gfx: Prefer heights not divisible by 8, rather than forcing them.yenatch
Some images do not occupy a full tile. In pokered, gfx/minimize_pic.1bpp is 8x5. This is still rectangular. Previously, converting this image would cause an error.
2014-03-23gfx: Read image metadata from filenames where applicable.yenatch
png has some incompatibilities with 2bpp. Among them: - 2bpp is tiled, and can be arranged arbitrarily - 2bpp does not have associated palette data - png must be rectangular - png must have specific dimensions The requirements for an image vary, and are unwritten. One conversion method will not work for all images. To resolve these conflicts metadata can be attached to images and related data. So as to not create additional files without changing the file content, the filename is used. Usage: metadata is defined as pseudoextensions. .w<width> - force width to <width> px .h<height> - force height to <height> px .t<num> - pad the image by <num> tiles so the resulting png can be rectangular - remove said tiles when converting back to 2bpp Example: gfx/title/logo.w160.t4.{lz,2bpp,png} - width 160px - pad by 4 tiles
2013-12-29gfx: touch exported lz files so they don't get remadeyenatch
2013-12-21gfx: 1bpp-to-png optionyenatch
2013-12-19gfx: use RGB asm macros for .pal filesyenatch
simpler to edit by hand than bin dumps
2013-11-18Merge pull request #56 from kanzure/map-editor-stuffBryan Bishop
Remove globals from the map editor
2013-11-18gfx: fix misuse of export_2bpp_to_pngyenatch
2013-11-18Merge branch 'master' of github.com:kanzure/pokemon-reverse-engineering-toolsyenatch
2013-11-18gfx: make sure rectangular images are also divisible into 8x8 tilesyenatch
2013-11-18gfx: direct png-to-1bppyenatch
2013-11-18gfx: rewrite lz commands and commentsyenatch
2013-11-18gfx: 1bpp-to-pngyenatch
also dont assume any dimension matches in png conversion
2013-11-18gfx: rewrite lotsyenatch
2013-11-17change RomStr usage in gfx.py to use RomStr.loadBryan Bishop
2013-11-17refactor png-to-2bpp conversionyenatch
2013-11-17gfx: 1bpp<->2bpp conversionyenatch
this is the simplest way to support 1bpp without rewriting a lot
2013-11-17be sure to import romstr into gfx.pyBryan Bishop
2013-11-17make gfx.py not depend on crystal.pyBryan Bishop
2013-09-01move mkdir_p out of gfx.py and into helpers.pyBryan Bishop
It seems that mkdir_p is unused at the moment.
2013-09-01import syntax in gfx.pyBryan Bishop
2013-08-03fix path walking in gfx.pyBryan Bishop
2013-08-03make a basic python moduleBryan Bishop