diff options
Diffstat (limited to 'backends/PalmOS/Src/arm/decompressrle0.cpp')
-rwxr-xr-x | backends/PalmOS/Src/arm/decompressrle0.cpp | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/backends/PalmOS/Src/arm/decompressrle0.cpp b/backends/PalmOS/Src/arm/decompressrle0.cpp new file mode 100755 index 0000000000..d6ac2d6c80 --- /dev/null +++ b/backends/PalmOS/Src/arm/decompressrle0.cpp @@ -0,0 +1,27 @@ +#include "native.h" +#include "endianutils.h" + +#define MAIN_TYPE CompressType +#include "macros.h" + +UInt32 Screen_decompressRLE0(void *userData68KP) { +// import variables + SETPTR (uint8 * ,src ); + SET32 (uint32 ,compSize); + SETPTR (uint8 * ,dest ); +// end of import + + uint8 *srcBufEnd = src + compSize; + while (src < srcBufEnd) { + uint8 color = *src++; + if (color) { + *dest++ = color; + } else { + uint8 skip = *src++; + MemSet(dest, skip, 0); + dest += skip; + } + } + + return 0; +} |