@@ -197,7 +197,7 @@ void SS2()
197197 Uint16 Lines, Count;
198198
199199 pSrc=flc.pChunk +6 ;
200- pDst=(Uint8*)flc.mainscreen ->pixels ;
200+ pDst=(Uint8*)flc.mainscreen ->pixels + flc. offset ;
201201 ReadU16 (&Lines, pSrc);
202202 pSrc+=2 ;
203203 while (Lines--) {
@@ -257,7 +257,7 @@ void DECODE_BRUN()
257257
258258 HeightCount=flc.HeaderHeight ;
259259 pSrc=flc.pChunk +6 ;
260- pDst=(Uint8*)flc.mainscreen ->pixels ;
260+ pDst=(Uint8*)flc.mainscreen ->pixels + flc. offset ;
261261 while (HeightCount--) {
262262 pTmpDst=pDst;
263263 PacketsCount=*(pSrc++);
@@ -291,7 +291,7 @@ void DECODE_LC()
291291 int PacketsCount;
292292
293293 pSrc=flc.pChunk +6 ;
294- pDst=(Uint8*)flc.mainscreen ->pixels ;
294+ pDst=(Uint8*)flc.mainscreen ->pixels + flc. offset ;
295295
296296 ReadU16 (&tmp, pSrc);
297297 pSrc+=2 ;
@@ -355,7 +355,7 @@ void DECODE_COPY()
355355{ Uint8 *pSrc, *pDst;
356356 int Lines = flc.screen_h ;
357357 pSrc=flc.pChunk +6 ;
358- pDst=(Uint8*)flc.mainscreen ->pixels ;
358+ pDst=(Uint8*)flc.mainscreen ->pixels + flc. offset ;
359359 while (Lines-- > 0 ) {
360360 memcpy (pDst, pSrc, flc.screen_w );
361361 pSrc+=flc.screen_w ;
@@ -366,7 +366,7 @@ void DECODE_COPY()
366366void BLACK ()
367367{ Uint8 *pDst;
368368 int Lines = flc.screen_h ;
369- pDst=(Uint8*)flc.mainscreen ->pixels ;
369+ pDst=(Uint8*)flc.mainscreen ->pixels + flc. offset ;
370370 while (Lines-- > 0 ) {
371371 memset (pDst, 0 , flc.screen_w );
372372 pDst+=flc.mainscreen ->pitch ;
@@ -489,6 +489,7 @@ void FlcMain(void (*frameCallBack)())
489489{ flc.quit =false ;
490490 SDL_Event event;
491491 FlcInitFirstFrame ();
492+ flc.offset = flc.dy *flc.mainscreen ->pitch + flc.mainscreen ->format ->BytesPerPixel *flc.dx ;
492493 while (!flc.quit ) {
493494 if (frameCallBack) (*frameCallBack)();
494495 flc.FrameCount ++;
0 commit comments