| Top |
| #define | G3D_IFF_MKID() |
| gboolean | g3d_iff_check () |
| gsize | g3d_iff_read_chunk () |
| gpointer | g3d_iff_handle_chunk () |
| gboolean | g3d_iff_chunk_matches () |
| gboolean | g3d_iff_read_ctnr () |
| gchar * | g3d_iff_id_to_text () |
| FILE * | g3d_iff_open () |
| int | g3d_iff_readchunk () |
| gboolean | (*G3DIffChunkCallback) () |
| #define | G3D_IFF_PAD1 |
| #define | G3D_IFF_PAD2 |
| #define | G3D_IFF_PAD4 |
| #define | G3D_IFF_PAD8 |
| #define | G3D_IFF_LE |
| #define | G3D_IFF_LEN16 |
| #define | G3D_IFF_SUBCHUNK_LEN16 |
| #define | g3d_iff_chunk_callback |
| G3DIffChunkInfo | |
| #define | g3d_iff_chunk_info |
| G3DIffGlobal | |
| #define | g3d_iff_gdata |
| G3DIffLocal | |
| #define | g3d_iff_ldata |
#define G3D_IFF_MKID(a,b,c,d)
Generate an IFF chunk identifier from character representation, e.g. G3D_IFF_MKID('F','O','R','M').
gboolean g3d_iff_check (G3DStream *stream,guint32 *id,gsize *len);
Checks a stream for a valid IFF signature and reads the top level container.
gsize g3d_iff_read_chunk (G3DStream *stream,guint32 *id,gsize *len,guint32 flags);
Reads one chunk header from an IFF file.
gpointer g3d_iff_handle_chunk (G3DIffGlobal *global,G3DIffLocal *plocal,G3DIffChunkInfo *chunks,guint32 flags);
Handle an IFF chunk based on chunk description.
gboolean g3d_iff_chunk_matches (guint32 id,gchar *tid);
Check whether id
and tid
match.
gboolean g3d_iff_read_ctnr (G3DIffGlobal *global,G3DIffLocal *local,G3DIffChunkInfo *chunks,guint32 flags);
Read subchunks in current chunk and handle them appropriately.
gchar *
g3d_iff_id_to_text (guint32 id);
Get the text representation of an IFF chunk identifier.
FILE * g3d_iff_open (const gchar *filename,guint32 *id,guint32 *len);
Opens an IFF file, checks it and reads its top level container.
int g3d_iff_readchunk (FILE *f,guint32 *id,guint32 *len,guint32 flags);
Reads one chunk header from an IFF file.
gboolean (*G3DIffChunkCallback) (G3DIffGlobal *global,G3DIffLocal *local);
IFF callback function prototype.
#define G3D_IFF_SUBCHUNK_LEN16 0x10
All chunks except the toplevel ones have 16-bit sizes.
#define g3d_iff_chunk_callback G3DIffChunkCallback
IFF chunk callback (deprecated).
typedef struct {
gchar *id;
gchar *description;
gboolean container;
G3DIffChunkCallback callback;
} G3DIffChunkInfo;
A chunk type description.
identifier of chunk |
||
human-readable description of chunk type |
||
TRUE if this chunk contains sub-chunks |
||
G3DIffChunkCallback |
function to be called if such a chunk is found |
typedef struct {
G3DContext *context;
G3DModel *model;
G3DStream *stream;
guint32 flags;
gpointer user_data;
FILE *f;
long int max_fpos;
} G3DIffGlobal;
The plugin-global data to be given to IFF callback functions.
G3DContext * |
a valid context |
|
G3DModel * |
a model |
|
G3DStream * |
the stream to read model from |
|
IFF flags |
||
to be used by plugin |
||
file to read model from (DEPRECATED) |
||
maximum file position (DEPRECATED) |
typedef struct {
guint32 id;
guint32 parent_id;
gpointer object;
gint32 level;
gpointer level_object;
gint32 nb;
gboolean finalize;
} G3DIffLocal;
The function-local data for IFF callback functions.
chunk identifier |
||
parent chunk identifier |
||
an object set by parent callbacks, may be NULL |
||
level of chunk |
||
object shared by callbacks on the same level, may be NULL |
||
number of bytes remaining in chunk, has to be decremented after correctly after reading from stream |
||
for container chunks the callback function is called before
and after processing possible sub-chunks, the second time |