Age | Commit message (Collapse) | Author |
|
|
|
Keys count both as path nodes and attributes depending on context.
An example gfx.yaml:
```
gfx:
pics:
pal_file: normal.pal
pic_dimensions: yes
animate: yes
stupid_bitmask_hack: [dewgong, lugia]
pc:
literal_only: yes
```
Here, all graphics matching gfx/pics/.../*.png will use palette gfx/pics/.../normal.pal and be interpreted as animated pics. gfx/pc.2bpp will compress using only the `literal` command.
If gfx.yaml doesn't exist, current behavior is unchanged. Filename arguments override yaml.
|
|
|
|
"whoops"
|
|
Truncate colors in a palette beyond the limit of 4.
Make palette sorting more accurate by taking the sum of the hues rather than by luminance. Ultimately, palette order is up to the whim of whoever was drawing in the tile editor at the time, but this is a reasonable estimation.
|
|
Eval should really not be used in the first place, but at least it works again.
Fixes 82b78e5c7969aebb797f35a58577dd0afb2c2f38, which replaced the constants_to_dict method with BSSReader.
|
|
Speed, readability, accuracy and compression are all improved.
Also fix an off-by-one error in repeat commands in the compressor.
|
|
|
|
Accidentally forgot to zfill either half of pointer_part, which would return malformed addresses.
Fixes de39f7c6ff487f02d1914cc4a3260817287207c5.
|
|
Fix the map editor.
|
|
|
|
|
|
The map editor can now be invoked in ipython:
import extras.pokemontools.map_editor as ed
app = ed.init()
Then <app> can be modified on the fly to make up for lacking functionality.
Also see app.map.crop().
Now works with all maps in both Red and Crystal.
The version defaults to Crystal. To use with pokered, invoke from the command line:
python extras/pokemontools/map_editor.py red
Or in ipython:
import extras.pokemontools.map_editor as ed
app = ed.init(version='red')
Also displays connections, but they're unaligned.
|
|
This lets the map editor do cool things.
|
|
Rewrite scan_includes.py. Add include paths.
|
|
|
|
|
|
Event commands "name" and "trainerclassname" take another argument.
|
|
|
|
loadwilddata takes 3 params, and fix engine flag parsing.
|
|
|
|
|
|
|
|
Update Red music commands
|
|
Nothing needs this yet, but chances are it'll happen.
|
|
|
|
Refactor gfx.py with bytearrays, fix graphics dumps, rewrite the compressor.
|
|
Conflicts:
pokemontools/gfx.py
|
|
|
|
|
|
|
|
Transpose images by height from 2bpp to png and width from png to 2bpp.
|
|
Make extract_maps.py Python 3 compatible
|
|
|
|
|
|
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.
|
|
This prevented pokered from building if the file "baserom.gbc" did not exist.
|
|
pokered: pic de/compression.
|
|
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.
|
|
This allows transposed images to be grouped together (e.g. animations).
|
|
https://github.com/magical/pokemon-sprites-rby to python 2.7.
|
|
|
|
Also fix a bug where images smaller than a tile are not converted at all.
|
|
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.
|
|
|
|
|
|
Image metadata and simpler gfx.py usage
|
|
Straightforward label handling in crystal.py.
|
|
- 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.
|
|
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.
|