22 #ifndef BLADERUNNER_VQA_PLAYER_H 23 #define BLADERUNNER_VQA_PLAYER_H 25 #include "bladerunner/vqa_decoder.h" 27 #include "audio/audiostream.h" 28 #include "audio/mixer.h" 30 #include "graphics/surface.h" 35 kLoopSetModeJustStart = 0,
36 kLoopSetModeEnqueue = 1,
37 kLoopSetModeImmediate = 2
40 class BladeRunnerEngine;
56 static const uint32 kVqaFrameTimeDiff = 4000;
57 static const int kMaxAudioPreloadedFrames = 15;
76 int _repeatsCountQueued;
79 int _lastAudioFrameSuccessfullyQueued;
82 int _repeatsCountInitial;
84 uint32 _frameNextTime;
89 bool _specialPS15GlitchFix;
90 bool _specialUG18DoNotRepeatLastLoop;
92 void (*_callbackLoopEnded)(
void *,
int frame,
int loopId);
103 _audioStream(
nullptr),
110 _repeatsCountQueued(-1),
112 _lastAudioFrameSuccessfullyQueued(-1),
114 _repeatsCountInitial(-1),
117 _audioStarted(
false),
118 _specialPS15GlitchFix(
false),
119 _specialUG18DoNotRepeatLastLoop(
false),
120 _callbackLoopEnded(
nullptr),
121 _callbackData(
nullptr) { }
132 int update(
bool forceDraw =
false,
bool advanceFrame =
true,
bool useTime =
true,
Graphics::Surface *customSurface =
nullptr);
133 void updateZBuffer(
ZBuffer *zbuffer);
134 void updateView(
View *view);
136 void updateLights(
Lights *lights);
138 bool setBeginAndEndFrame(
int begin,
int end,
int repeatsCount,
int loopSetMode,
void(*callback)(
void *,
int,
int),
void *callbackData);
139 bool setLoop(
int loopId,
int repeatsCount,
int loopSetMode,
void(*callback)(
void*,
int,
int),
void *callbackData);
141 bool seekToFrame(
int frame);
143 bool getCurrentBeginAndEndFrame(
int frame,
int *begin,
int *end);
144 int getLoopBeginFrame(
int loopId);
145 int getLoopEndFrame(
int loopId);
147 int getLoopIdTarget()
const {
return _loopIdTarget; };
149 int getFrameCount()
const;
151 int getQueuedAudioFrames()
const;
SoundType
Definition: mixer.h:62
Definition: vqa_player.h:45
Definition: audiostream.h:50
Definition: debugger.h:56
Definition: audiostream.h:370
Definition: vqa_decoder.h:55
Definition: bladerunner.h:113
Definition: screen_effects.h:39