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
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
yenatch
45833dcbaf
audio: Add a comment to generate_crystal_sfx_pointers output
2014-02-06 18:39:03 -05:00
yenatch
108086fcf3
audio: parse channel branches independently instead of running past the end
2014-02-06 18:13:03 -05:00
yenatch
527b9ac7ff
audio: Dump an unknown sound effect
2014-02-06 17:13:34 -05:00
yenatch
7b381c5461
audio: rework sfx dumps and fix incbin insertion
2014-02-06 16:56:22 -05:00
yenatch
d893d11212
audio: Use generate_label_asm instead of manually creating label asm
2014-02-06 05:31:17 -05:00
yenatch
c694af14c2
audio: Include unreferenced cries in dump_crystal_cries output
2014-02-06 05:27:01 -05:00
yenatch
7bc0473f5e
audio: Refactor output handling.
...
Drastically improves execution time.
2014-02-06 04:53:58 -05:00
yenatch
15eca02957
audio: Distinguish between sound and noise commands
...
sound takes a word for frequency, and noise takes a byte
2014-02-06 01:42:18 -05:00
yenatch
6a2a47074e
audio: Crystal sfx are in a separate clump
2014-02-05 22:57:39 -05:00
yenatch
fced980337
sfx_names: UnknownCb to UnknownCB
2014-02-05 22:41:37 -05:00
yenatch
9976bf57be
audio: Clean up output and fix sfx handling
2014-02-05 22:33:39 -05:00
yenatch
5272a1693f
sfx_names: 1St, 2Nd to 1st, 2nd
2014-02-05 22:31:54 -05:00
Bryan Bishop
61b83803be
Merge pull request #65 from yenatch/rgbasm-equs
...
preprocessor: rgbasm "EQUS" takes string literals
2014-01-22 07:12:22 -08:00
yenatch
89ca24a934
preprocessor: rgbasm "EQUS" takes string literals
2014-01-19 19:37:35 -05:00
Bryan Bishop
074e47aeea
Merge pull request #63 from yenatch/map-editor-saving
...
map_editor: allow saving new maps + save file dialog
2013-12-29 01:18:49 -08:00
yenatch
c234cdd903
gfx: touch exported lz files so they don't get remade
2013-12-29 04:13:56 -05:00
yenatch
51d6f1edca
map_editor: allow saving new maps + save file dialog
...
saves to newmap.asm by default
2013-12-29 03:59:35 -05:00