MCPcopy Create free account
hub / github.com/OpenXcom/OpenXcom / DECODE_LC

Function DECODE_LC

src/Engine/Flc.cpp:303–342  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

301
302
303void DECODE_LC()
304{ Uint8 *pSrc, *pDst, *pTmpDst;
305 Sint8 CountData;
306 Uint8 CountSkip;
307 Uint8 Fill;
308 Uint16 Lines, tmp;
309 int PacketsCount;
310
311 pSrc=flc.pChunk+6;
312 pDst=(Uint8*)flc.mainscreen->pixels + flc.offset;
313
314 ReadU16(&tmp, pSrc);
315 pSrc+=2;
316 pDst+=tmp*flc.mainscreen->pitch;
317 ReadU16(&Lines, pSrc);
318 pSrc+=2;
319 while(Lines--) {
320 pTmpDst=pDst;
321 PacketsCount=*(pSrc++);
322 while(PacketsCount--) {
323 CountSkip=*(pSrc++);
324 pTmpDst+=CountSkip;
325 CountData=*(pSrc++);
326 if(CountData>0) {
327 while(CountData--) {
328 *(pTmpDst++)=*(pSrc++);
329 }
330 } else {
331 if(CountData<0) {
332 CountData=(0x100-CountData);
333 Fill=*(pSrc++);
334 while(CountData--) {
335 *(pTmpDst++)=Fill;
336 }
337 }
338 }
339 }
340 pDst+=flc.mainscreen->pitch;
341 }
342} /* DECODE_LC */
343
344void DECODE_COLOR()
345{ Uint8 *pSrc;

Callers 1

FlcDoOneFrameFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected