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

Function FlcDoOneFrame

src/Engine/Flc.cpp:395–445  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

393
394
395void FlcDoOneFrame()
396{ int ChunkCount;
397 ChunkCount=flc.FrameChunks;
398 flc.pChunk=flc.pMembuf;
399 if ( SDL_LockSurface(flc.mainscreen) < 0 )
400 return;
401 // if (!ChunkCount) printf("Empty frame! %d\n", flc.FrameCount); // this is normal and used for delays
402 while(ChunkCount--) {
403 ReadU32(&flc.ChunkSize, flc.pChunk+0);
404 ReadU16(&flc.ChunkType, flc.pChunk+4);
405
406#ifdef DEBUG
407 printf("flc.ChunkSize: %d\n", flc.ChunkSize);
408 printf("flc.ChunkType: %d aka %x\n", flc.ChunkType, flc.ChunkType);
409 if (flc.DelayOverride) printf("DelayOverride: %d\n", flc.DelayOverride);
410#endif
411
412 switch(flc.ChunkType) {
413 case 4:
414 COLORS256();
415 break;
416 case 7:
417 SS2();
418 break;
419 case 11:
420 DECODE_COLOR();
421 break;
422 case 12:
423 DECODE_LC();
424 break;
425 case 13:
426 BLACK();
427 break;
428 case 15:
429 DECODE_BRUN();
430 break;
431 case 16:
432 DECODE_COPY();
433 break;
434 case 18:
435#ifdef DEBUG
436 printf("Chunk 18 not yet done.\n");
437#endif
438 break;
439 default:
440 Log(LOG_WARNING) << "Ieek an non implemented chunk type:" << flc.ChunkType;
441 }
442 flc.pChunk+=flc.ChunkSize;
443 }
444 SDL_UnlockSurface(flc.mainscreen);
445} /* FlcDoOneFrame */
446
447void SDLWaitFrame(void)
448{

Callers 1

FlcMainFunction · 0.85

Calls 7

COLORS256Function · 0.85
SS2Function · 0.85
DECODE_COLORFunction · 0.85
DECODE_LCFunction · 0.85
BLACKFunction · 0.85
DECODE_BRUNFunction · 0.85
DECODE_COPYFunction · 0.85

Tested by

no test coverage detected