#include <stdlib.h>
#include <string.h>
#include <stdint.h>
#include <limits.h>
Go to the source code of this file.
|
#define | read_int32be(x) (signed)(((x)[0]<<(8*3)) | ((x)[1]<<(8*2)) | ((x)[2]<<(8*1)) | ((x)[3]<<(8*0))) |
|
#define | read_int24be(x) (signed)(((x)[0]<<(8*2)) | ((x)[1]<<(8*1)) | ((x)[2]<<(8*0))) |
|
#define | read_int16be(x) (signed)(((x)[0]<<(8*1)) | ((x)[1]<<(8*0))) |
|
#define | read_int8be(x) (signed)(((x)[0]<<(8*0))) |
|
#define | read_int32le(x) (signed)(((x)[0]<<(8*0)) | ((x)[1]<<(8*1)) | ((x)[2]<<(8*2)) | ((x)[3]<<(8*3))) |
|
#define | read_int24le(x) (signed)(((x)[0]<<(8*0)) | ((x)[1]<<(8*1)) | ((x)[2]<<(8*2))) |
|
#define | read_int16le(x) (signed)(((x)[0]<<(8*0)) | ((x)[1]<<(8*1))) |
|
#define | read_int8le(x) (signed)(((x)[0]<<(8*0))) |
|
#define | read_uint32be(x) (unsigned)(((x)[0]<<(8*3)) | ((x)[1]<<(8*2)) | ((x)[2]<<(8*1)) | ((x)[3]<<(8*0))) |
|
#define | read_uint24be(x) (unsigned)(((x)[0]<<(8*2)) | ((x)[1]<<(8*1)) | ((x)[2]<<(8*0))) |
|
#define | read_uint16be(x) (unsigned)(((x)[0]<<(8*1)) | ((x)[1]<<(8*0))) |
|
#define | read_uint8be(x) (unsigned)(((x)[0]<<(8*0))) |
|
#define | read_uint32le(x) (unsigned)(((x)[0]<<(8*0)) | ((x)[1]<<(8*1)) | ((x)[2]<<(8*2)) | ((x)[3]<<(8*3))) |
|
#define | read_uint24le(x) (unsigned)(((x)[0]<<(8*0)) | ((x)[1]<<(8*1)) | ((x)[2]<<(8*2))) |
|
#define | read_uint16le(x) (unsigned)(((x)[0]<<(8*0)) | ((x)[1]<<(8*1))) |
|
#define | read_uint8le(x) (unsigned)(((x)[0]<<(8*0))) |
|
|
enum | IFFDrawDirection { IFFDIRECTION_NORTHEAST = 1,
IFFDIRECTION_SOUTHEAST = 4,
IFFDIRECTION_NORTHWEST = 16,
IFFDIRECTION_SOUTHWEST = 64
} |
|
enum | IFFDrawZoom { IFFZOOM_FAR = 1,
IFFZOOM_MIDDLE,
IFFZOOM_CLOSE
} |
|
enum | IFFSpriteFlags { IFFSPRITE_FLAG_COLOR = 1,
IFFSPRITE_FLAG_ZBUFFER = 2,
IFFSPRITE_FLAG_ALPHA = 4
} |
|
enum | IFFLanguage {
IFFLANG_DEFAULT = 0,
IFFLANG_EN_US = 1,
IFFLANG_EN_INTERNATIONAL = 2,
IFFLANG_FRENCH = 3,
IFFLANG_GERMAN = 4,
IFFLANG_ITALIAN = 5,
IFFLANG_SPANISH = 6,
IFFLANG_DUTCH = 7,
IFFLANG_DANISH = 8,
IFFLANG_SWEDISH = 9,
IFFLANG_NORWEGIAN = 10,
IFFLANG_FINNISH = 11,
IFFLANG_HEBREW = 12,
IFFLANG_RUSSIAN = 13,
IFFLANG_PORTUGUESE = 14,
IFFLANG_JAPANESE = 15,
IFFLANG_POLISH = 16,
IFFLANG_CHINESE_SIMPLIFIED = 17,
IFFLANG_CHINESE_TRADITIONAL = 18,
IFFLANG_THAI = 19,
IFFLANG_KOREAN = 20
} |
|
|
int | iff_depalette (IFFSprite *Sprite, const IFFPalette *Palette) |
|
int | iff_create (IFFFile *IFFFileInfo) |
|
int | iff_read_header (IFFFile *IFFFileInfo, const uint8_t *Buffer, unsigned FileSize) |
|
IFFChunk * | iff_add_chunk (IFFFile *IFFFileInfo) |
|
int | iff_read_chunk (IFFChunk *ChunkInfo, const uint8_t *Buffer, unsigned MaxChunkSize) |
|
int | iff_parse_chunk (IFFChunk *ChunkInfo, const uint8_t *Buffer) |
|
int | iff_enumerate_chunks (IFFFile *IFFFileInfo, const uint8_t *Buffer, unsigned BufferSize) |
|
IFFChunk * | iff_find_chunk (IFFFile *IFFFileInfo, const char *Type, int ChunkID) |
|
void | iff_free_chunk (IFFChunk *ChunkInfo) |
|
void | iff_delete_chunk (IFFFile *IFFFileInfo, int Position) |
|
void | iff_delete (IFFFile *IFFFileInfo) |
|
|
static const uint8_t | Header_IFF [] = "IFF FILE 2.5:TYPE FOLLOWED BY SIZE\0 JAMIE DOORNBOS & MAXIS 1" |
|
#define read_int16be |
( |
|
x) | |
(signed)(((x)[0]<<(8*1)) | ((x)[1]<<(8*0))) |
#define read_int16le |
( |
|
x) | |
(signed)(((x)[0]<<(8*0)) | ((x)[1]<<(8*1))) |
#define read_int24be |
( |
|
x) | |
(signed)(((x)[0]<<(8*2)) | ((x)[1]<<(8*1)) | ((x)[2]<<(8*0))) |
#define read_int24le |
( |
|
x) | |
(signed)(((x)[0]<<(8*0)) | ((x)[1]<<(8*1)) | ((x)[2]<<(8*2))) |
#define read_int32be |
( |
|
x) | |
(signed)(((x)[0]<<(8*3)) | ((x)[1]<<(8*2)) | ((x)[2]<<(8*1)) | ((x)[3]<<(8*0))) |
#define read_int32le |
( |
|
x) | |
(signed)(((x)[0]<<(8*0)) | ((x)[1]<<(8*1)) | ((x)[2]<<(8*2)) | ((x)[3]<<(8*3))) |
#define read_int8be |
( |
|
x) | |
(signed)(((x)[0]<<(8*0))) |
#define read_int8le |
( |
|
x) | |
(signed)(((x)[0]<<(8*0))) |
#define read_uint16be |
( |
|
x) | |
(unsigned)(((x)[0]<<(8*1)) | ((x)[1]<<(8*0))) |
#define read_uint16le |
( |
|
x) | |
(unsigned)(((x)[0]<<(8*0)) | ((x)[1]<<(8*1))) |
#define read_uint24be |
( |
|
x) | |
(unsigned)(((x)[0]<<(8*2)) | ((x)[1]<<(8*1)) | ((x)[2]<<(8*0))) |
#define read_uint24le |
( |
|
x) | |
(unsigned)(((x)[0]<<(8*0)) | ((x)[1]<<(8*1)) | ((x)[2]<<(8*2))) |
#define read_uint32be |
( |
|
x) | |
(unsigned)(((x)[0]<<(8*3)) | ((x)[1]<<(8*2)) | ((x)[2]<<(8*1)) | ((x)[3]<<(8*0))) |
#define read_uint32le |
( |
|
x) | |
(unsigned)(((x)[0]<<(8*0)) | ((x)[1]<<(8*1)) | ((x)[2]<<(8*2)) | ((x)[3]<<(8*3))) |
#define read_uint8be |
( |
|
x) | |
(unsigned)(((x)[0]<<(8*0))) |
#define read_uint8le |
( |
|
x) | |
(unsigned)(((x)[0]<<(8*0))) |
Enumerator |
---|
IFFDIRECTION_NORTHEAST |
|
IFFDIRECTION_SOUTHEAST |
|
IFFDIRECTION_NORTHWEST |
|
IFFDIRECTION_SOUTHWEST |
|
Enumerator |
---|
IFFZOOM_FAR |
|
IFFZOOM_MIDDLE |
|
IFFZOOM_CLOSE |
|
Enumerator |
---|
IFFLANG_DEFAULT |
|
IFFLANG_EN_US |
|
IFFLANG_EN_INTERNATIONAL |
|
IFFLANG_FRENCH |
|
IFFLANG_GERMAN |
|
IFFLANG_ITALIAN |
|
IFFLANG_SPANISH |
|
IFFLANG_DUTCH |
|
IFFLANG_DANISH |
|
IFFLANG_SWEDISH |
|
IFFLANG_NORWEGIAN |
|
IFFLANG_FINNISH |
|
IFFLANG_HEBREW |
|
IFFLANG_RUSSIAN |
|
IFFLANG_PORTUGUESE |
|
IFFLANG_JAPANESE |
|
IFFLANG_POLISH |
|
IFFLANG_CHINESE_SIMPLIFIED |
|
IFFLANG_CHINESE_TRADITIONAL |
|
IFFLANG_THAI |
|
IFFLANG_KOREAN |
|
Enumerator |
---|
IFFSPRITE_FLAG_COLOR |
|
IFFSPRITE_FLAG_ZBUFFER |
|
IFFSPRITE_FLAG_ALPHA |
|
int iff_create |
( |
IFFFile * |
IFFFileInfo) | |
|
void iff_delete |
( |
IFFFile * |
IFFFileInfo) | |
|
void iff_delete_chunk |
( |
IFFFile * |
IFFFileInfo, |
|
|
int |
Position |
|
) |
| |
int iff_enumerate_chunks |
( |
IFFFile * |
IFFFileInfo, |
|
|
const uint8_t * |
Buffer, |
|
|
unsigned |
BufferSize |
|
) |
| |
IFFChunk* iff_find_chunk |
( |
IFFFile * |
IFFFileInfo, |
|
|
const char * |
Type, |
|
|
int |
ChunkID |
|
) |
| |
void iff_free_chunk |
( |
IFFChunk * |
ChunkInfo) | |
|
int iff_parse_chunk |
( |
IFFChunk * |
ChunkInfo, |
|
|
const uint8_t * |
Buffer |
|
) |
| |
int iff_read_chunk |
( |
IFFChunk * |
ChunkInfo, |
|
|
const uint8_t * |
Buffer, |
|
|
unsigned |
MaxChunkSize |
|
) |
| |
int iff_read_header |
( |
IFFFile * |
IFFFileInfo, |
|
|
const uint8_t * |
Buffer, |
|
|
unsigned |
FileSize |
|
) |
| |
const uint8_t Header_IFF[] = "IFF FILE 2.5:TYPE FOLLOWED BY SIZE\0 JAMIE DOORNBOS & MAXIS 1" |
|
static |