Commit Graph

1180 Commits

Author SHA1 Message Date
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
yenatch b07f9c7f76 Rewrite the lz compressor. 2014-06-02 17:57:43 -07:00
yenatch 20c718fbfd gfx.py: Forgot to add rom_offset. 2014-05-03 23:14:43 -04:00
yenatch df7acdb50f Refactor gfx.py to use bytearrays. Fix some graphics dumping functions. 2014-05-02 19:52:24 -04:00
Bryan Bishop c2c45d61eb Merge pull request #74 from yenatch/master
Transpose images by height from 2bpp to png and width from png to 2bpp.
2014-04-28 18:42:30 -05:00
Bryan Bishop b52ee5629b Merge pull request #75 from mintpeter/master
Make extract_maps.py Python 3 compatible
2014-04-28 14:54:47 -05:00
Zack Marvel c70144ddb8 Add import to extract_maps.py for print_function 2014-04-28 15:50:35 -04:00
Zack Marvel 4d168d0535 Change print statements in extract_maps.py for Python 3 compatibility 2014-04-28 15:31:44 -04:00
yenatch 9007b587a3 Transpose images by height from 2bpp to png and width from png to 2bpp.
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-19 02:54:21 -04:00
yenatch 698b0fc7e6 gfx: Don't try to load baserom.gbc unless it's actually being used.
This prevented pokered from building if the file "baserom.gbc" did not exist.
2014-04-16 01:37:48 -04:00
Bryan Bishop 1840111de5 Merge pull request #72 from yenatch/pics
pokered: pic de/compression.
2014-04-14 23:28:22 -05:00
yenatch ac2df6b844 gfx: Decompress graphics that can be converted to png.
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-15 00:17:25 -04:00
yenatch 69f622a171 gfx: Transpose blocks of images instead of only the first block.
This allows transposed images to be grouped together (e.g. animations).
2014-04-15 00:06:05 -04:00
yenatch 345c792b69 Clearer explanation for porting https://github.com/magical/pokemon-sprites-rby to python 2.7. 2014-04-14 14:24:05 -04:00
yenatch c9b6df3193 Optimize pic compression to be 50% faster. 2014-04-06 19:37:23 -04:00
yenatch 5188de5a4e gfx: Don't pad images smaller than a tile.
Also fix a bug where images smaller than a tile are not converted at all.
2014-04-05 16:24:04 -04:00
yenatch 1c349f84a3 Add "norepeat" and "arrange" image attributes.
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-04-05 01:37:05 -04:00
yenatch 21f44b754c 1:1 conversion for pics. 2014-04-05 00:07:48 -04:00
yenatch 01ceb31ea4 pokered: pic de/compression. 2014-04-03 04:17:51 -04:00
Bryan Bishop b73c309666 Merge pull request #71 from yenatch/gfx
Image metadata and simpler gfx.py usage
2014-03-31 13:30:01 -05:00
Bryan Bishop e58ded6011 Merge pull request #70 from yenatch/master
Straightforward label handling in crystal.py.
2014-03-29 14:54:25 -05:00
yenatch 791a029262 gfx: Redo command-line interface, format handling, filename arguments.
- 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-28 02:03:58 -04:00
yenatch b3e6867581 gfx: Prefer heights not divisible by 8, rather than forcing them.
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-23 19:30:59 -04:00
yenatch 12d8bb11e8 gfx: Read image metadata from filenames where applicable.
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
2014-03-23 19:30:25 -04:00
yenatch 1129d71e2c get_label_for: Return a label or None.
Don't return an address and call it a label.
2014-03-23 02:19:38 -04:00
yenatch 943e7b704f get_ram_label: Setup wram labels if they haven't been already. 2014-03-23 02:14:46 -04:00
yenatch de39f7c6ff PointerLabelParam: Return valid (or at least informative) arguments.
PointerLabelParam.to_asm() returns a label by default.

If no label exists, instead return a bank and address.
This will not compile (maybe it ought to), but it
simplifies debugging.
2014-03-23 02:12:26 -04:00
Bryan Bishop 7598acb0cc Merge pull request #69 from yenatch/master
Macro handling in read_bss_sections.
2014-03-06 23:31:35 -06:00
yenatch da0ccc6e1d Refactor read_bss_sections into a class.
- Pass a constants dict into eval instead of using globals
- Read same-line labels and tokens
2014-03-07 00:23:05 -05:00
yenatch f300444ca1 wram: Interpret rgbasm macros and fix token logic.
This doesn't read same-line tokens after labels yet.
2014-03-05 03:13:09 -05:00
Bryan Bishop c9f9d7f280 Merge pull request #68 from yenatch/master
crystal: use a 16-bit PokemonParam for event scripting command `cry`
2014-02-06 20:22:02 -06:00
yenatch 657a27badb crystal: use a 16-bit PokemonParam for event scripting command cry
fixes 2a44f6e4
2014-02-06 21:18:40 -05:00
Bryan Bishop 6e6028ae3e Merge pull request #66 from yenatch/noise
Dump and format all types of sound data correctly.
2014-02-06 19:03:21 -06:00
Bryan Bishop 31ec935141 Merge pull request #67 from yenatch/merge-old-commits
Merge some older commits that never made it into pull requests
2014-02-06 19:02:31 -06:00
yenatch b18976e8ed Merge branch 'kanzure/master' into merge-old-commits
Conflicts:
	pokemontools/map_editor.py
2014-02-06 19:58:21 -05:00
yenatch 8b72eedc2c audio: Import sound names outside of functions 2014-02-06 19:53:21 -05:00
yenatch b89a36e9a2 audio: Docstrings for functions that didn't have any. 2014-02-06 19:49:44 -05:00
yenatch 00d2cbc4eb labels: exported labels are labels too 2014-02-06 19:00:50 -05:00
yenatch 7571be9e6f crystal: unknownmusic0xdf -> togglesfx 2014-02-06 18:59:38 -05:00
yenatch c723f32d11 audio: Don't use underscores in base labels 2014-02-06 18:40:11 -05:00