RenderWare V2.1

Previous Page Index Next Page

RwBool

RwWriteStreamChunkHeader(RwStream *stream, RwInt32 type,
RwInt32 size);

Description

Writes a chunk header to the stream.

Arguments

stream Stream to be written to.

type Type of chunk to write. (Usually a user chunk).

size The size of the chunk excluding the header and type (should be multiple of four).

Return Value

TRUE on success, FALSE otherwise.

Comments

This function can be used to add arbitrary data to a stream.

type should be rwCHUNKUSER+n where n is a number in the range (1 - 1000). All other chunk types are reserved for use by RenderWare.

bytes should correspond exactly to the number of bytes following the header, if this incorrect it will be impossible to skip over the chunk. bytes should also be a multiple of 4. This is important for platform independence where some architectures cannot access 32 bit quantities which cross 32 bit boundaries.

See Also

RwWriteStreamReal()

RwWriteStreamInt()

RwReadStreamReal()

RwReadStreamInt()