blob: 2ad28385e646f147cf89b08de40b2ac56eb54e96 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
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;
}
|