summaryrefslogtreecommitdiff
path: root/include/sprite.h
blob: 6a8b620bc6cfbca4b7289061e4169157864406a6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#ifndef SPRITE_H
#define SPRITE_H

#include "global.h"

typedef struct {
    u8 index;
    u8 duration;
    union {
        u8 raw;
        struct {
            u8 unk : 6;
            u8 hFlip : 1;
            u8 vFlip : 1;
        } PACKED b;
    } PACKED spriteSettings;
    union {
        u8 raw;
        struct {
            u8 extraFrameIndex : 6;
            u8 unk : 1;
            u8 endOfAnimation : 1;
        } PACKED b;
    } PACKED frameSettings;
} PACKED Frame;

typedef struct {
    u8 numGfxTiles;
    u16 gfxTileIndex;
} FrameGfxData;

typedef struct {
    u16 palette;
    u8 animIndex;
    u8 unk;
} SpriteLoadData;

#endif // SPRITE_H