| 301 | |
| 302 | |
| 303 | void 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 | |
| 344 | void DECODE_COLOR() |
| 345 | { Uint8 *pSrc; |