summaryrefslogtreecommitdiff
path: root/include/sprite.h
diff options
context:
space:
mode:
authorscnorton <scnorton@biociphers.org>2017-06-27 15:01:18 -0400
committerscnorton <scnorton@biociphers.org>2017-06-27 15:01:18 -0400
commit00c7dee919c8f93b8519a7eede2c41ba2ddcaf08 (patch)
tree5707f8764920abcd4cffca84c675e5c53c32559d /include/sprite.h
parent3d9eb18add0d8a9eb5bfa77fc64cd7b1f37fea5d (diff)
parent06b6cada0ddedc62063171703ba6607019751a9a (diff)
Merge branch 'master' into pokemon_data
Diffstat (limited to 'include/sprite.h')
-rw-r--r--include/sprite.h27
1 files changed, 25 insertions, 2 deletions
diff --git a/include/sprite.h b/include/sprite.h
index dd9d5efb7..a65e71bd9 100644
--- a/include/sprite.h
+++ b/include/sprite.h
@@ -5,11 +5,18 @@
struct SpriteSheet
{
- const u8 *data;
+ const u8 *data; // Raw uncompressed pixel data
u16 size;
u16 tag;
};
+struct CompressedSpriteSheet
+{
+ const u8 *data; // LZ77 compressed pixel data
+ u16 size; // Uncompressed size of pixel data
+ u16 tag;
+};
+
struct SpriteFrameImage
{
u8 *data;
@@ -20,7 +27,13 @@ struct SpriteFrameImage
struct SpritePalette
{
- const u16 *data;
+ const u16 *data; // Raw uncompressed palette data
+ u16 tag;
+};
+
+struct CompressedSpritePalette
+{
+ const u8 *data; // LZ77 compressed palette data
u16 tag;
};
@@ -60,6 +73,8 @@ union AnimCmd
#define ANIMCMD_FRAME(...) \
{.frame = {__VA_ARGS__}}
+#define ANIMCMD_LOOP(_count) \
+ {.loop = {.type = -3, .count = _count}}
#define ANIMCMD_JUMP(_target) \
{.jump = {.type = -2, .target = _target}}
#define ANIMCMD_END \
@@ -99,8 +114,16 @@ union AffineAnimCmd
#define AFFINEANIMCMD_FRAME(_xScale, _yScale, _rotation, _duration) \
{.frame = {.xScale = _xScale, .yScale = _yScale, .rotation = _rotation, .duration = _duration}}
+#define AFFINEANIMCMD_LOOP(_count) \
+ {.loop = {.type = AFFINEANIMCMDTYPE_LOOP, .count = _count}}
+#define AFFINEANIMCMD_JUMP(_target) \
+ {.jump = {.type = AFFINEANIMCMDTYPE_JUMP, .target = _target}}
#define AFFINEANIMCMD_END \
{.type = AFFINEANIMCMDTYPE_END}
+#define AFFINEANIMCMD_LOOP(_count) \
+ {.loop = {.type = AFFINEANIMCMDTYPE_LOOP, .count = _count}}
+#define AFFINEANIMCMD_JUMP(_target) \
+ {.jump = {.type = AFFINEANIMCMDTYPE_JUMP, .target = _target}}
struct AffineAnimState
{