mirror of
https://github.com/aseprite/aseprite.git
synced 2025-02-12 03:39:51 +00:00
Moved "ncolor" field in .ase format to next WORD position (the "unknown field" looks like a DWORD).
This commit is contained in:
parent
5c2d31f3fe
commit
65466cfe04
@ -71,9 +71,9 @@ WORD Speed (milliseconds between frame, like in FLC files)
|
||||
field from each frame header
|
||||
DWORD Set be 0
|
||||
DWORD Set be 0
|
||||
WORD Ignore this field
|
||||
DWORD Ignore this field
|
||||
WORD Number of colors (0 means 256 for old sprites)
|
||||
BYTE[96] For future (set to zero)
|
||||
BYTE[94] For future (set to zero)
|
||||
|
||||
|
||||
========================================
|
||||
|
@ -54,7 +54,7 @@ typedef struct ASE_Header
|
||||
ase_uint16 speed; /* deprecated, use "duration" of FrameHeader */
|
||||
ase_uint32 next;
|
||||
ase_uint32 frit;
|
||||
ase_uint16 unknown;
|
||||
ase_uint32 unknown;
|
||||
ase_uint16 ncolors;
|
||||
} ASE_Header;
|
||||
|
||||
@ -66,7 +66,7 @@ typedef struct ASE_FrameHeader
|
||||
ase_uint16 duration;
|
||||
} ASE_FrameHeader;
|
||||
|
||||
/* TODO warning: the writing routines aren't thread-safe */
|
||||
// TODO warning: the writing routines aren't thread-safe
|
||||
static ASE_FrameHeader *current_frame_header = NULL;
|
||||
static int chunk_type;
|
||||
static int chunk_start;
|
||||
@ -369,7 +369,7 @@ static bool ase_file_read_header(FILE *f, ASE_Header *header)
|
||||
header->speed = fgetw(f);
|
||||
header->next = fgetl(f);
|
||||
header->frit = fgetl(f);
|
||||
header->unknown = fgetw(f);
|
||||
header->unknown = fgetl(f);
|
||||
header->ncolors = fgetw(f);
|
||||
if (header->ncolors == 0) // 0 means 256 (old .ase files)
|
||||
header->ncolors = 256;
|
||||
@ -416,7 +416,7 @@ static void ase_file_write_header(FILE *f, ASE_Header *header)
|
||||
fputw(header->speed, f);
|
||||
fputl(header->next, f);
|
||||
fputl(header->frit, f);
|
||||
fputw(header->unknown, f);
|
||||
fputl(header->unknown, f);
|
||||
fputw(header->ncolors, f);
|
||||
|
||||
fseek(f, header->pos+header->size, SEEK_SET);
|
||||
|
Loading…
x
Reference in New Issue
Block a user