coastline 0.0.4
Loading...
Searching...
No Matches
rle.h File Reference
#include "common/types.h"
Include dependency graph for rle.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

s32 CompressRleChannels (u8 *dst, s32 dstSize, u8 *src, s32 srcSize, s32 channels)
 Compress interleaved data with run lengths, each channel on its own.
s32 DecompressInterleavedRle (u8 *dst, s32 dstSize, u8 *src, s32 channels)
 Expand the data CompressRleChannels() wrote, interleaving its channels again.

Function Documentation

◆ CompressRleChannels()

s32 CompressRleChannels ( u8 * dst,
s32 dstSize,
u8 * src,
s32 srcSize,
s32 channels )

Compress interleaved data with run lengths, each channel on its own.

Parameters
dstThe buffer to write.
dstSizeThe size of dst, in bytes.
srcThe interleaved data.
srcSizeThe size of src, in bytes.
channelsThe number of interleaved channels.
Returns
The size of the compressed data, or -1 when it does not fit in dst.
Ghidra address:
USA: 0x8021c878
Ghidra address:
Asia: 0x8021C3C8
Ghidra address:
EUR: 0x8021da78
Ghidra address:
JPN: 0x8021d348
Ghidra address:
BRD3D: 0x10034cc5
Ghidra address:
BRGlide: 0x1002e376

◆ DecompressInterleavedRle()

s32 DecompressInterleavedRle ( u8 * dst,
s32 dstSize,
u8 * src,
s32 channels )

Expand the data CompressRleChannels() wrote, interleaving its channels again.

Parameters
dstThe buffer to write.
dstSizeThe size of dst, which is not checked.
srcThe compressed data.
channelsThe number of interleaved channels.
Returns
The final channel's expanded byte count multiplied by the number of channels.
Ghidra address:
USA: 0x8021cb4c
Ghidra address:
Asia: 0x8021C69C
Ghidra address:
EUR: 0x8021dd4c
Ghidra address:
JPN: 0x8021d61c
Ghidra address:
BRD3D: 0x10034f08
Ghidra address:
BRGlide: 0x1002e5b9