Skip to content

Commit bf34af6

Browse files
committed
update readme and add mask chunk
1 parent d8b2531 commit bf34af6

File tree

2 files changed

+26
-3
lines changed

2 files changed

+26
-3
lines changed

README.md

Lines changed: 23 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,28 @@
11
# haxe-aseprite
22
Haxe parser for .ase and .aseprite files.
33

4-
This project was built for the Github Game jam. As it stands it has basic functionality for my needs HOWEVER! I would love to make the parser valid for all .aseprite files.
4+
haxe-aseprite was created for the GitHub GameOff. I've tested it for my needs however I would love for this to be feature complete. If you have access to aseprite files that break the parser send them my way!
55

6-
So please please message me or request a pull request!
6+
## Example Usage
7+
```haxe
8+
var file = Parser.parse(assetpack.getFile("mockup").toBytes(), function(bytes :Bytes, width :Int, height :Int, colorDepth :ColorDepth) {
9+
return Texture.fromBytes(bytes, width, height, colorDepth);
10+
});
11+
```
712

8-
Also if you're having any problems getting this going let me know about your project. Maybe we can make a tutorial together. Until then, happy coding. ^_^
13+
Chunk types tested -
14+
15+
- [x] OLD_PALETTE_CHUNK_A
16+
- [ ] OLD_PALETTE_CHUNK_B
17+
- [x] LAYER_CHUNK
18+
- [x] CEL_CHUNK
19+
- [ ] CEL_EXTRA_CHUNK
20+
- [x] COLOR_PROFILE_CHUNK
21+
- [ ] MASK_CHUNK
22+
- [ ] PATH_CHUNK
23+
- [x] FRAME_TAGS_CHUNK
24+
- [x] PALETTE_CHUNK
25+
- [ ] USER_DATA_CHUNK
26+
- [ ] SLICE_CHUNK
27+
28+
If you have a file that is not parsing properly or has additional chunk types not tested message me or create pull request.

Sources/aseprite/Parser.hx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,9 @@ class Parser
8080
case LAYER_CHUNK:
8181
sprite.layers.push(readLayer(reader));
8282

83+
case MASK_CHUNK:
84+
assert(false, "MASK_CHUNK");
85+
8386
case OLD_PALETTE_CHUNK_A:
8487
readOldPaletteA(reader);
8588

0 commit comments

Comments
 (0)