wip repl
This commit is contained in:
parent
e862b02019
commit
0ed7fc4496
21 changed files with 1267 additions and 148 deletions
|
|
@ -8,6 +8,8 @@
|
|||
#define PXL8_ASE_CHUNK_LAYER 0x2004
|
||||
#define PXL8_ASE_CHUNK_OLD_PALETTE 0x0004
|
||||
#define PXL8_ASE_CHUNK_PALETTE 0x2019
|
||||
#define PXL8_ASE_CHUNK_TILESET 0x2023
|
||||
#define PXL8_ASE_CHUNK_USER_DATA 0x2020
|
||||
|
||||
typedef struct pxl8_ase_header {
|
||||
u32 file_size;
|
||||
|
|
@ -46,9 +48,25 @@ typedef struct pxl8_ase_cel {
|
|||
i16 y;
|
||||
u8 opacity;
|
||||
u16 cel_type;
|
||||
u16 width;
|
||||
u16 height;
|
||||
u8* pixel_data;
|
||||
|
||||
union {
|
||||
struct {
|
||||
u16 width;
|
||||
u16 height;
|
||||
u8* pixels;
|
||||
} image;
|
||||
|
||||
struct {
|
||||
u16 width;
|
||||
u16 height;
|
||||
u16 bits_per_tile;
|
||||
u32 tile_id_mask;
|
||||
u32 x_flip_mask;
|
||||
u32 y_flip_mask;
|
||||
u32 diag_flip_mask;
|
||||
u32* tiles;
|
||||
} tilemap;
|
||||
};
|
||||
} pxl8_ase_cel;
|
||||
|
||||
typedef struct pxl8_ase_layer {
|
||||
|
|
@ -75,8 +93,43 @@ typedef struct pxl8_ase_frame {
|
|||
i16 y;
|
||||
u16 duration;
|
||||
u8* pixels;
|
||||
u32 cel_count;
|
||||
pxl8_ase_cel* cels;
|
||||
} pxl8_ase_frame;
|
||||
|
||||
typedef struct pxl8_ase_property {
|
||||
char* name;
|
||||
u32 type;
|
||||
union {
|
||||
bool bool_val;
|
||||
i32 int_val;
|
||||
f32 float_val;
|
||||
char* string_val;
|
||||
};
|
||||
} pxl8_ase_property;
|
||||
|
||||
typedef struct pxl8_ase_user_data {
|
||||
char* text;
|
||||
u32 color;
|
||||
bool has_color;
|
||||
bool has_text;
|
||||
u32 property_count;
|
||||
pxl8_ase_property* properties;
|
||||
} pxl8_ase_user_data;
|
||||
|
||||
typedef struct pxl8_ase_tileset {
|
||||
u32 id;
|
||||
u32 flags;
|
||||
u32 tile_count;
|
||||
u16 tile_width;
|
||||
u16 tile_height;
|
||||
i16 base_index;
|
||||
char* name;
|
||||
u32 pixels_size;
|
||||
u8* pixels;
|
||||
pxl8_ase_user_data* tile_user_data;
|
||||
} pxl8_ase_tileset;
|
||||
|
||||
typedef struct pxl8_ase_file {
|
||||
u32 frame_count;
|
||||
pxl8_ase_frame* frames;
|
||||
|
|
@ -84,6 +137,8 @@ typedef struct pxl8_ase_file {
|
|||
u32 layer_count;
|
||||
pxl8_ase_layer* layers;
|
||||
pxl8_ase_palette palette;
|
||||
u32 tileset_count;
|
||||
pxl8_ase_tileset* tilesets;
|
||||
} pxl8_ase_file;
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue