22 #ifndef VOYEUR_ANIMATION_H 23 #define VOYEUR_ANIMATION_H 25 #include "video/video_decoder.h" 26 #include "audio/audiostream.h" 27 #include "audio/mixer.h" 28 #include "common/array.h" 29 #include "common/list.h" 30 #include "common/rect.h" 31 #include "common/stream.h" 32 #include "voyeur/files.h" 61 int *_frameSoundSizes;
65 uint32 *_frameOffsets;
85 SoundFrame(
int offset,
int size);
90 const RL2FileHeader &_header;
97 ~RL2AudioTrack()
override;
100 bool isSeekable()
const override {
return true; }
108 RL2VideoTrack(
const RL2FileHeader &header, RL2AudioTrack *audioTrack,
110 ~RL2VideoTrack()
override;
112 uint16 getWidth()
const override;
113 uint16 getHeight()
const override;
117 int getCurFrame()
const override {
return _curFrame; }
118 int getFrameCount()
const override {
return _header._numFrames; }
120 const byte *getPalette()
const override { _dirtyPalette =
false;
return _header._palette; }
121 int getPaletteCount()
const {
return _header._colorCount; }
122 bool hasDirtyPalette()
const override {
return _dirtyPalette; }
124 void clearDirtyRects() { _dirtyRects.
clear(); }
125 void copyDirtyRectsToBuffer(uint8 *dst, uint pitch);
127 Common::Rational getFrameRate()
const override {
return _header.getFrameRate(); }
128 bool isSeekable()
const override {
return true; }
132 const RL2FileHeader &_header;
137 mutable bool _dirtyPalette;
142 uint32 *_frameOffsets;
146 void copyFrame(uint8 *data);
147 void rl2DecodeFrameWithTransparency(
int screenOffset);
148 void rl2DecodeFrameWithoutTransparency(
int screenOffset = -1);
149 void initBackSurface();
153 RL2AudioTrack *_audioTrack;
154 RL2VideoTrack *_videoTrack;
156 RL2FileHeader _header;
159 int _soundFrameNumber;
162 void clearDirtyRects();
163 void copyDirtyRectsToBuffer(uint8 *dst, uint pitch);
164 int getPaletteStart()
const {
return _paletteStart; }
165 const RL2FileHeader &getHeader() {
return _header; }
166 void readNextPacket()
override;
173 void close()
override;
176 bool loadRL2File(
const Common::Path &file,
bool palFlag);
177 bool loadVideo(
int videoId);
178 int getPaletteCount()
const {
return _header._colorCount; }
187 void play(
VoyeurEngine *vm,
int resourceOffset = 0, byte *frames =
nullptr, byte *imgPos =
nullptr);
188 RL2VideoTrack *getRL2VideoTrack() {
return _videoTrack; }
189 RL2AudioTrack *getRL2AudioTrack() {
return _audioTrack; }
Definition: animation.h:48
Definition: video_decoder.h:686
virtual uint32 numQueuedStreams() const =0
Definition: video_decoder.h:711
Definition: timestamp.h:83
Definition: rational.h:40
SoundType
Definition: mixer.h:62
Definition: video_decoder.h:53
Definition: audiostream.h:50
void clear()
Definition: list.h:206
Definition: audiostream.h:370
Definition: animation.h:38