Commit Graph

1269 Commits

Author SHA1 Message Date
dannye
2ca31f660b New sfx names 2015-10-14 16:44:53 -05:00
yenatch
680bb02d29 Merge pull request #92 from yenatch/master
Make gfx.py more extensible.
2015-08-29 14:05:35 -04:00
yenatch
3a6ef54a5e Don't error on extra args in export_2bpp_to_png. 2015-08-29 10:55:21 -07:00
yenatch
c7c5be19fe Add the current address to the output of Decompressed.command_list. 2015-08-16 20:22:22 -07:00
yenatch
6ffb47f1af Stop short wherever possible, and fix lookback index selection. 2015-08-16 20:21:30 -07:00
yenatch
5ad74a89ae Merge pull request #91 from yenatch/master
Fix event flags, and read them only if necessary.
2015-07-22 02:47:11 -04:00
yenatch
8c8868813a Fix event flags, and read them only if necessary.
Event flags are enumerated using macros defined outside of event_flags.asm, so parse the macros too.
2015-07-21 23:40:33 -07:00
yenatch
bf76a6b84a Merge remote-tracking branch 'origin/master' 2015-06-28 23:18:57 -07:00
yenatch
b6500c8620 Fix get_pic_animation.
Fixes aec2e7ff.
2015-06-28 23:15:49 -07:00
Bryan Bishop
a43ba61bd6 Merge pull request #89 from yenatch/master
Fix a modulo by 0 on a default argument to condense_tiles_to_map.
2015-05-06 19:09:48 -05:00
yenatch
661004c969 remove yaml
remove yaml

undoes parts of 0182bcaf8f
2015-05-06 16:50:42 -07:00
yenatch
c6dcd9b9be Fix a modulo by 0 on a default argument to condense_tiles_to_map. 2015-04-21 09:49:02 -07:00
Bryan Bishop
46492bd907 Merge pull request #86 from yenatch/master
Refactor the LZ tools and fix BSSReader's eval shenanigans.
2015-03-12 12:03:17 -05:00
yenatch
8d86abe882 hotfix: gfx.py doesn't need baserom.gbc to work 2015-03-11 22:43:04 -07:00
yenatch
68eae566ec Merge remote-tracking branch 'origin/master'
Conflicts:
	pokemontools/gfx.py
2015-02-11 14:22:50 -08:00
yenatch
fb23f2754c Split the lz compression tools out of gfx.py. 2015-02-07 13:11:38 -08:00
yenatch
36f7ee513e Refactor the compressor again.
This is a little closer to the target compressor than before.
2015-02-07 13:06:08 -08:00
yenatch
78aa4f00be Pointless whitespace tweaks. 2015-02-07 12:40:15 -08:00
yenatch
aec2e7ff64 Refactor get_pic_animation. 2015-02-07 12:36:22 -08:00
Bryan Bishop
2c2ceb7456 Merge pull request #87 from Sanqui/master
Fix parsing arguments, fixes `make pngs` for pokecrystal
2015-01-28 13:10:57 -06:00
IIMarckus
f5248045ac redrle: reduce code duplication. 2015-01-08 03:14:58 -07:00
IIMarckus
fa0761ea70 redrle: Add a -r flag to compress by rows (matching GF's behavior). 2015-01-08 02:14:42 -07:00
Sanky
2e76f276d0 Fix parsing arguments 2014-12-19 21:39:56 +01:00
yenatch
0182bcaf8f Read gfx.yaml for graphics conversion options.
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.
2014-12-03 20:10:47 -08:00
yenatch
41df23fce3 Refactor the Decompressed class and dump/convert pic animations. 2014-11-22 13:57:22 -08:00
yenatch
145269cdb7 Left a scalpel in the patient.
"whoops"
2014-11-02 00:14:05 -07:00
yenatch
ca42efaa0d More lenient palette handling.
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.
2014-11-01 21:11:49 -07:00
yenatch
0dd6b20b2f BSSReader: Fix eval inserting __builtins__ into self.constants.
Eval should really not be used in the first place, but at least it works again.

Fixes 82b78e5c79, which replaced the constants_to_dict method with BSSReader.
2014-11-01 20:42:41 -07:00
yenatch
85e0e2af68 Refactor the de/compressor.
Speed, readability, accuracy and compression are all improved.

Also fix an off-by-one error in repeat commands in the compressor.
2014-10-28 22:00:52 -07:00
yenatch
074f8dfdf4 audio: Expose header reads via separate functions. 2014-10-28 21:59:07 -07:00
yenatch
aff76027a0 Fix the output of PointerLabelParam.to_asm.
Accidentally forgot to zfill either half of pointer_part, which would return malformed addresses.

Fixes de39f7c6ff.
2014-10-28 21:53:08 -07:00
Bryan Bishop
4d9fd56593 Merge pull request #83 from yenatch/fix-map-editor
Fix the map editor.
2014-10-02 23:21:17 -05:00
yenatch
c9d9a16fd6 map_editor: Fix automatic graphics decompression. 2014-10-02 23:47:00 -04:00
yenatch
0a68945a48 Merge remote-tracking branch 'origin/master' into fix-map-editor 2014-10-02 23:30:28 -04:00
yenatch
5cce990140 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.
2014-10-02 23:22:03 -04:00
yenatch
82b78e5c79 BSSReader now reads constants and variables.
This lets the map editor do cool things.
2014-10-02 23:21:54 -04:00
Bryan Bishop
c3da5178f5 Merge pull request #82 from yenatch/master
Rewrite scan_includes.py. Add include paths.
2014-09-24 15:26:59 -05:00
yenatch
31f843814c Add docstrings for IncludeReader methods. 2014-09-24 12:54:44 -07:00
yenatch
c9e7f22f8f Rewrite scan_includes.py. Add include paths. 2014-09-24 12:07:21 -07:00
Bryan Bishop
a87f66964c Merge pull request #81 from yenatch/master
Event commands "name" and "trainerclassname" take another argument.
2014-07-23 00:31:46 -05:00
yenatch
702f1f1102 Event commands "name" and "trainerclassname" take another argument. 2014-07-22 22:24:23 -07:00
Bryan Bishop
e0bbcbce7a Merge pull request #80 from yenatch/master
loadwilddata takes 3 params, and fix engine flag parsing.
2014-07-22 23:44:39 -05:00
yenatch
b639b0d3bf Merge remote-tracking branch 'kanzure/master' 2014-07-22 21:25:00 -07:00
yenatch
fb0029a78c Event command loadwilddata takes a third argument. 2014-07-22 21:24:08 -07:00
yenatch
9c7bce4ce7 The checkflag command family uses engine flags. 2014-07-22 21:22:20 -07:00
Bryan Bishop
3f27ebff7c Merge pull request #79 from dannye/master
Update Red music commands
2014-06-24 20:16:19 -05:00
yenatch
007151b05a gfx: Let .wxh filename arguments exceed 9.
Nothing needs this yet, but chances are it'll happen.
2014-06-15 16:27:46 -07:00
U-Fish-PC\Daniel
47a56912ea Update Red music commands 2014-06-10 12:36:51 -04:00
Bryan Bishop
10fb7465e4 Merge pull request #78 from yenatch/master
Refactor gfx.py with bytearrays, fix graphics dumps, rewrite the compressor.
2014-06-02 20:54:20 -05:00
yenatch
73aaa4a570 Merge remote-tracking branch 'yenatch/master'
Conflicts:
	pokemontools/gfx.py
2014-06-02 17:59:49 -07:00