22#ifndef HOLLYWOOD_RUNAWAY_PRESENTATION_H
23#define HOLLYWOOD_RUNAWAY_PRESENTATION_H
25#include "common/random.h"
26#include "common/language.h"
27#include "common/ustr.h"
28#include "hollywood/runaway/audio.h"
29#include "hollywood/runaway/graphics.h"
30#include "hollywood/runaway/speech.h"
31#include "hollywood/scene_text_store.h"
47 void processPresentationInput(uint32 now);
57 bool _active =
false, _wasVisible =
false;
61 virtual void skipPresentation(uint32 now) = 0;
62 virtual void skipPresentationSpeech(uint32 now) {}
63 virtual bool clickSkipsPresentation()
const {
return false; }
66 bool _skipRequested =
false, _skipSpeechRequested =
false;
72 void start(uint32 now) { _started = _now = now; }
73 void update(uint32 now) { _now = now; }
74 bool finished()
const;
79 uint32 _started = 0, _now = 0;
85 _audio(mixer), _random(
"runawayInterrogation"), _speech(_audio, _random, RunawaySpeech::kTextLipSync) {}
87 void start(uint32 now);
88 void update(uint32 now);
92 bool finished()
const {
return _phrase >= _phraseCount; }
93 bool speaking()
const {
return _row != 0; }
105 uint _frames[3] = {};
107 byte _speakers[4] = {}, _phrase = 0, _phraseCount = 0;
108 uint16 _row = 0, _lastRow = 0, _sample = 0;
109 uint32 _now = 0, _lastTick[3] = {};
116 void start(uint32 now);
117 void update(uint32 now);
118 void skip(uint32 now);
120 bool finished()
const {
return _stage == kFinished; }
123 void skipPresentation(uint32 now)
override { skip(now); }
124 bool clickSkipsPresentation()
const override {
return true; }
126 enum Stage { kOutside, kSlideshow, kCard, kFinished };
127 void nextSlide(uint32 now);
134 uint _frames[7] = {};
135 bool _active[7] = {};
136 Stage _stage = kOutside;
137 uint _screenshot = 0;
138 uint32 _started = 0, _now = 0, _lastTick = 0;
139 uint32 _fadeStarted = 0, _fadeDuration = 0, _musicUntil = 0;
Definition: managed_surface.h:51
Definition: graphics.h:54
Definition: presentation.h:69
Definition: presentation.h:112
Definition: presentation.h:82
Definition: presentation.h:50
Definition: presentation.h:42
Definition: scene_text_store.h:64
Language
Definition: language.h:45
Definition: algorithm.h:29