39 Uint8 *_videoFrameData;
41 Uint8 *_audioFrameData;
50 Uint32 _videoFrameSize;
51 Uint16 _videoFrameType;
55 Uint16 _delayOverride;
56 Uint32 _audioFrameSize;
57 Uint16 _audioFrameType;
59 void (*_frameCallBack)();
61 SDL_Surface *_mainScreen;
63 SDL_Color _colors[256];
70 bool _hasAudio, _useInternalAudio;
74 typedef struct AudioBuffer
83 typedef struct AudioData
86 AudioBuffer *loadingBuffer;
87 AudioBuffer *playingBuffer;
96 void readU16(Uint16 &dst,
const Uint8 *
const src);
97 void readU32(Uint32 &dst,
const Uint8 *
const src);
98 void readS16(Sint16 &dst,
const Sint8 *
const src);
99 void readS32(Sint32 &dst,
const Sint8 *
const src);
100 void readFileHeader();
102 bool isValidFrame(Uint8 *frameHeader, Uint32 &frameSize, Uint16 &frameType);
103 void decodeVideo(
bool skipLastFrame);
104 void decodeAudio(
int frames);
105 void waitForNextFrame(Uint32
delay);
109 void playVideoFrame();
118 void playAudioFrame(Uint16 sampleRate);
119 void initAudio(Uint16 format, Uint8 channels);
122 bool isEndOfFile(Uint8 *pos);
124 static void audioCallback(
void *userData, Uint8 *stream,
int len);
132 bool init(
const char *filename,
void(*frameCallBack)(),
Game *game,
bool useAudio,
int dx,
int dy);
134 void play(
bool skipLastFrame);
140 void delay(Uint32 milliseconds);
141 void setHeaderSpeed(
int speed);
void deInit()
Free memory, free love, etc.
Definition: FlcPlayer.cpp:173
void play(bool skipLastFrame)
Play the loaded file; set flc.mainScreen first!
Definition: FlcPlayer.cpp:192
Definition: FlcPlayer.h:33
void delay(Uint32 milliseconds)
Delay player at the end.
Definition: FlcPlayer.cpp:221
bool init(const char *filename, void(*frameCallBack)(), Game *game, bool useAudio, int dx, int dy)
Open FLC or FLI file, read header, prepare to play it.
Definition: FlcPlayer.cpp:100
The core of the game engine, manages the game's entire contents and structure.
Definition: Game.h:41
A display screen, handles rendering onto the game window.
Definition: Screen.h:38
Definition: BaseInfoState.cpp:40