home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Club Amiga de Montreal - CAM
/
CAM_CD_1.iso
/
files
/
487.lha
/
FileID_v1.30
/
fi_iff.h
< prev
next >
Wrap
Text File
|
1991-03-11
|
8KB
|
253 lines
/**************************************************
*
* fi_IFF.h
*
* IFF file manipulation code header file
*
* Copyright(c), 1990, 1991 Lloyd B. Eldred
* & Fredrick R Homan
**************************************************/
typedef unsigned char UBYTE; /* 8 bits unsigned */
typedef unsigned short UWORD; /* 16 bits unsigned */
typedef short WORD; /* 16 bits signed */
typedef long LONG; /* 32 bits signed */
typedef unsigned long ULONG;
typedef struct {
UWORD w,h;
WORD x,y;
UBYTE nPlanes;
UBYTE masking;
UBYTE compression;
UBYTE pad1;
UWORD transparentColor;
UBYTE xAspect, yAspect;
WORD pageWidth, pageHeight;
} BitMapHeader;
#define GIF 1
#define IFF 2
#define ANIM 3
#define HIRES 0x8000
#define LACE 0x4
#define HAM 0x800
#define HALFBRITE 0x80
#define TRUE 1
#define FALSE 0
#define is_odd(number) (number & 0x1)
#define MakeID(a,b,c,d) ( (LONG)(a)<<24L | (LONG)(b)<<16L | (c)<<8 | (d))
/*****************************************************************/
/* IFF Groups */
/*****************************************************************/
#define ID_FORM MakeID('F','O','R','M')
#define ID_PROP MakeID('P','R','O','P')
#define ID_LIST MakeID('L','I','S','T')
#define ID_CAT MakeID('C','A','T',' ')
void IFF_FORM(FILE *,LONG);
void IFF_PROP(FILE *,LONG);
void IFF_LIST(FILE *,LONG);
void IFF_CAT(FILE *,LONG);
/***************************************************************/
/* FORM type handling */
/***************************************************************/
#define ID_ILBM MakeID('I','L','B','M')
#define ID_ANIM MakeID('A','N','I','M')
#define ID_SMUS MakeID('S','M','U','S')
#define ID_8SVX MakeID('8','S','V','X')
#define ID_ANBM MakeID('A','N','B','M')
#define ID_ACBM MakeID('A','C','B','M')
void IFF_ILBM(FILE *,LONG);
void IFF_ANIM(FILE *,LONG);
void IFF_SMUS(FILE *,LONG);
void IFF_8SVX(FILE *,LONG);
void IFF_ANBM(FILE *,LONG);
void IFF_ACBM(FILE *,LONG);
/*************************************************************/
/* Chunks that can appear anywhere */
/*************************************************************/
#define ID_NAME MakeID('N','A','M','E')
#define ID_copyright MakeID('(','c',')',' ')
#define ID_AUTH MakeID('A','U','T','H')
#define ID_ANNO MakeID('A','N','N','O')
void IFF_NAME(FILE *,LONG);
void IFF_copyright(FILE *,LONG);
void IFF_AUTH(FILE *,LONG);
void IFF_ANNO(FILE *,LONG);
/*************************************************************/
/* Chunks that are generally ILBM (pic) Chunks */
/*************************************************************/
#define ID_BMHD MakeID('B','M','H','D')
#define ID_CAMG MakeID('C','A','M','G')
#define ID_CMAP MakeID('C','M','A','P')
#define ID_GRAB MakeID('G','R','A','B')
#define ID_DEST MakeID('D','E','S','T')
#define ID_SPRT MakeID('S','P','R','T')
#define ID_BODY MakeID('B','O','D','Y')
#define ID_CRNG MakeID('C','R','N','G')
#define ID_CCRT MakeID('C','C','R','T')
#define ID_DPPS MakeID('D','P','P','S')
#define ID_DPPV MakeID('D','P','P','V')
#define ID_DGVW MakeID('D','G','V','W')
#define ID_BHSM MakeID('B','H','S','M')
#define ID_BHCP MakeID('B','H','C','P')
#define ID_BHBA MakeID('B','H','B','A')
#define ID_ABIT MakeID('A','B','I','T')
void IFF_BMHD(FILE *,LONG,BitMapHeader *);
long IFF_CAMG(FILE *,LONG);
void IFF_CMAP(FILE *,LONG);
void IFF_GRAB(FILE *,LONG);
void IFF_DEST(FILE *,LONG);
void IFF_SPRT(FILE *,LONG);
void IFF_BODY(FILE *,LONG);
void IFF_CRNG(FILE *,LONG);
void IFF_CCRT(FILE *,LONG);
void IFF_DPPS(FILE *,LONG);
void IFF_DPPV(FILE *,LONG);
void IFF_DGVW(FILE *,LONG);
void IFF_BHSM(FILE *,LONG);
void IFF_BHCP(FILE *,LONG);
void IFF_BHBA(FILE *,LONG);
void IFF_ABIT(FILE *,LONG);
/************************************************************/
/* Useful chunks for SMUS files */
/************************************************************/
#define ID_SHDR MakeID('S','H','D','R')
#define ID_INS1 MakeID('I','N','S','1')
#define ID_INST MakeID('I','N','S','T')
#define ID_TRAK MakeID('T','R','A','K')
#define ID_IRev MakeID('I','R','e','v')
#define ID_BIAS MakeID('B','I','A','A')
#define ID_SNX1 MakeID('S','N','X','1')
void IFF_SHDR(FILE *,LONG);
void IFF_INS1(FILE *,LONG);
void IFF_INST(FILE *,LONG);
void IFF_TRAK(FILE *,LONG);
void IFF_IRev(FILE *,LONG);
void IFF_BIAS(FILE *,LONG);
void IFF_SNX1(FILE *,LONG);
/************************************************************/
/* Useful chunks for 8SVX Sampled sounds */
/************************************************************/
#define ID_VHDR MakeID('V','H','D','R')
#define ID_ATAK MakeID('A','T','A','K')
#define ID_RLSE MakeID('R','L','S','E')
#define ID_CHAN MakeID('C','H','A','N')
#define ID_PAN MakeID('P','A','N',' ')
void IFF_VHDR(FILE *,LONG);
void IFF_ATAK(FILE *,LONG);
void IFF_RLSE(FILE *,LONG);
void IFF_CHAN(FILE *,LONG);
void IFF_PAN(FILE *,LONG);
/************************************************************/
/* Useful chunks for non-picture files (headers in general) */
/************************************************************/
#define ID_ANHD MakeID('A','N','H','D')
#define ID_DLTA MakeID('D','L','T','A')
#define ID_FSQN MakeID('F','S','Q','N')
void IFF_ANHD(FILE *,LONG);
void IFF_DLTA(FILE *,LONG);
void IFF_FSQN(FILE *,LONG);
/*************************************************************/
/* Miscellaneous IFF utility functions */
/*************************************************************/
void IFF_ID(FILE *, char *);
LONG IFF_size(FILE *);
void IFF_GotoEnd(FILE *, LONG);
/***********************************************************/
/* IFF2.c headers */
/***********************************************************/
#define ID_FTXT MakeID('F','T','X','T')
#define ID_CHRS MakeID('C','H','R','S')
#define ID_FONS MakeID('F','O','N','S')
#define ID_AIFF MakeID('A','I','F','F')
#define ID_BANK MakeID('B','A','N','K')
#define ID_HEAD MakeID('H','E','A','D')
#define ID_MIDI MakeID('M','I','D','I')
#define ID_PGTB MakeID('P','G','T','B')
#define ID_SYTH MakeID('S','Y','T','H')
#define ID_WORD MakeID('W','O','R','D')
#define ID_C100 MakeID('C','1','0','0')
#define ID_PDEF MakeID('P','D','E','F')
#define ID_SHAK MakeID('S','H','A','K')
#define ID_VDEO MakeID('V','D','E','O')
#define ID_SAMP MakeID('S','A','M','P')
#define ID_TDDD MakeID('T','D','D','D')
#define ID_SC3D MakeID('S','C','3','D')
#define ID_TEXT MakeID('T','E','X','T')
#define ID_FNTR MakeID('F','N','T','R')
#define ID_FNTV MakeID('F','N','T','V')
#define ID_GSCR MakeID('G','S','C','R')
#define ID_PICS MakeID('P','I','C','S')
#define ID_PLBM MakeID('P','L','B','M')
#define ID_USCR MakeID('U','S','C','R')
#define ID_UVOX MakeID('U','V','O','X')
#define ID_CLIP MakeID('C','L','I','P')
#define ID_ARC MakeID('A','R','C',' ')
#define ID_ATXT MakeID('A','T','X','T')
#define ID_PTXT MakeID('P','T','X','T')
#define ID_RGBX MakeID('R','G','B','X')
#define ID_CDAT MakeID('C','D','A','T')
#define ID_MSMP MakeID('M','S','M','P')
#define ID_FIGR MakeID('F','I','G','R')
#define ID_MOVI MakeID('M','O','V','I')
void IFF_FTXT(FILE *,LONG);
void IFF_CHRS(FILE *,LONG);
void IFF_FONS(FILE *,LONG);
void IFF_AIFF(FILE *,LONG);
void IFF_BANK(FILE *,LONG);
void IFF_HEAD(FILE *,LONG);
void IFF_MIDI(FILE *,LONG);
void IFF_PGTB(FILE *,LONG);
void IFF_SYTH(FILE *,LONG);
void IFF_WORD(FILE *,LONG);
void IFF_C100(FILE *,LONG);
void IFF_PDEF(FILE *,LONG);
void IFF_SHAK(FILE *,LONG);
void IFF_VDEO(FILE *,LONG);
void IFF_SAMP(FILE *,LONG);
void IFF_TDDD(FILE *,LONG);
void IFF_SC3D(FILE *,LONG);
void IFF_TEXT(FILE *,LONG);
void IFF_FNTR(FILE *,LONG);
void IFF_FNTV(FILE *,LONG);
void IFF_GSCR(FILE *,LONG);
void IFF_PICS(FILE *,LONG);
void IFF_PLBM(FILE *,LONG);
void IFF_USCR(FILE *,LONG);
void IFF_UVOX(FILE *,LONG);
void IFF_CLIP(FILE *,LONG);
void IFF_ARC(FILE *,LONG);
void IFF_ATXT(FILE *,LONG);
void IFF_PTXT(FILE *,LONG);
void IFF_RGBX(FILE *,LONG);
void IFF_CDAT(FILE *,LONG);
void IFF_MSMP(FILE *,LONG);
void IFF_FIGR(FILE *,LONG);
void IFF_MOVI(FILE *,LONG);