The OpenD Programming Language

IOCallbacks

Undocumented in source.

Members

Functions

peek_ubyte
ubyte peek_ubyte(void* userData, bool* err)

Read one ubyte from stream and do not advance the stream cursor. On error, return an error, the stream then is considered invalid.

readRIFFChunkHeader
void readRIFFChunkHeader(void* userData, uint chunkId, uint chunkSize, bool* err)

Read one Lthe two fields of a RIFF header: chunk ID and chunk size. On error, return values are undefined behaviour.

read_24bits_LE
uint read_24bits_LE(void* userData, bool* err)

Read one Little Endian 24-bit unsigned int from stream and advance the stream cursor. On error, return 0 and an error, stream is then considered invalid.

read_double_LE
double read_double_LE(void* userData, bool* err)

Read one Little Endian 64-bit float from stream and advance the stream cursor. On error, return double.nan and an error, stream is then considered invalid.

read_float_LE
float read_float_LE(void* userData, bool* err)

Read one Little Endian 32-bit float from stream and advance the stream cursor. On error, return float.nan and an error, stream is then considered invalid.

read_guid
ubyte[16] read_guid(void* userData, bool* err)

Reads a 16-byte UUID from the stream and advance cursor. On error, the stream is considered invalid, and the return value is undefined behaviour.

read_ubyte
ubyte read_ubyte(void* userData, bool* err)

Read one ubyte from stream and advance the stream cursor. On error, return 0 and an error, stream is then considered invalid.

read_uint_BE
uint read_uint_BE(void* userData, bool* err)

Read one Big Endian 32-bit unsigned int from stream and advance the stream cursor. On error, return 0 and an error, stream is then considered invalid.

read_uint_LE
uint read_uint_LE(void* userData, bool* err)

Read one Little Endian 32-bit unsigned int from stream and advance the stream cursor. On error, return 0 and an error, stream is then considered invalid.

read_ulong_BE
ulong read_ulong_BE(void* userData, bool* err)

Read one Big Endian 64-bit integer from stream and advance the stream cursor. On error, return 0 and an error, stream is then considered invalid.

read_ushort_LE
ushort read_ushort_LE(void* userData, bool* err)

Read one Little Endian ushort from stream and advance the stream cursor. On error, return 0 and an error, stream is then considered invalid.

writeRIFFChunkHeader
bool writeRIFFChunkHeader(void* userData, uint chunkId, uint chunkSize)

Write a RIFF header to stream and advance cursor.

write_24bits_LE
bool write_24bits_LE(void* userData, int value)

Write a Little Endian 24-bit signed int to stream and advance cursor.

write_byte
bool write_byte(void* userData, byte value)

Write a 8-bit signed int to stream and advance cursor.

write_double_LE
bool write_double_LE(void* userData, float value)

Write a Little Endian 64-bit double to stream and advance cursor.

write_float_LE
bool write_float_LE(void* userData, float value)

Write a Little Endian 32-bit float to stream and advance cursor.

write_short_LE
bool write_short_LE(void* userData, short value)

Write a 8-bit signed int to stream and advance cursor.

write_uint_BE
bool write_uint_BE(void* userData, uint value)

Write a Big Endian 32-bit unsigned int to stream and advance cursor.

write_uint_LE
bool write_uint_LE(void* userData, uint value)

Write a Little Endian 32-bit unsigned integer to stream and advance cursor.

write_ulong_BE
bool write_ulong_BE(void* userData, ulong value)

Write a Little Endian 64-bit unsigned integer to stream and advance cursor.

write_ulong_LE
bool write_ulong_LE(void* userData, ulong value)

Write a Little Endian 64-bit unsigned integer to stream and advance cursor.

write_ushort_LE
bool write_ushort_LE(void* userData, ushort value)

Write a Little Endian 16-bit unsigned integer to stream and advance cursor.

Meta