22 #ifndef NANCY_ACTION_SECONDARYMOVIE_H 23 #define NANCY_ACTION_SECONDARYMOVIE_H 25 #include "common/ptr.h" 27 #include "engines/nancy/action/actionrecord.h" 28 #include "engines/nancy/movieplayer.h" 33 class InteractiveVideo;
48 static const byte kMovieSceneChange = 5;
49 static const byte kMovieNoSceneChange = 6;
51 static const byte kPlayerCursorAllowed = 1;
52 static const byte kNoPlayerCursorAllowed = 2;
54 static const byte kPlayMovieForward = 1;
55 static const byte kPlayMovieReverse = 2;
72 uint16 startFrame = 0;
79 uint16 stayWeight = 0;
87 void onPause(
bool pause)
override;
90 void execute()
override;
92 bool getIsFinished()
const {
return _isFinished; }
104 byte _videoPlaytype = kVideoPlaytypeAuto;
106 uint16 _videoFormat = kLargeVideoFormat;
107 uint16 _videoSceneChange = kMovieNoSceneChange;
108 byte _playerCursorAllowed = kPlayerCursorAllowed;
109 byte _playDirection = kPlayMovieForward;
110 uint16 _firstFrame = 0;
111 uint16 _lastFrame = 0;
113 uint16 _hideOnFinish = 0;
116 uint16 _playStyle = 1;
127 bool _interactiveFlag =
false;
141 bool _isRandom =
false;
144 uint16 _randomPlayerCursorAllowed = kPlayerCursorAllowed;
153 uint16 _talkSceneID = kNoScene;
155 uint16 _talkCursorType = 0;
160 enum RandomChainState { kRandomPlaying, kRandomPaused };
161 int _activeSequenceIndex = -1;
162 RandomChainState _randomChainState = kRandomPlaying;
163 uint32 _randomPauseEndTime = 0;
164 bool _randomStopRequested =
false;
168 bool _isHovered =
false;
169 bool _playingSecondary =
false;
176 bool _secondaryRewinding =
false;
177 int _rewindFrame = 0;
178 uint32 _rewindLastFrameTime = 0;
179 uint32 _rewindFrameDelay = 66;
182 void stopRandom() { _randomStopRequested =
true; }
185 void playRandomSequence();
187 bool isViewportRelative()
const override {
return true; }
189 bool survivesSceneChange(
bool nextSceneIsNoArt)
const override;
195 CursorManager::CursorType getHoverCursor()
const override;
196 bool cursorSetFromScript()
const override {
return _isRandom && _talkSceneID != kNoScene; }
202 return _isRandom ?
"PlayRandomMovie" :
"PlaySecondaryMovie";
218 void applyStartingRandomSequence();
224 bool activateRandomSequence(
int index);
227 bool activateSecondaryMovie();
230 void beginSecondaryRewind();
237 bool isTalkable()
const {
return _isRandom && _talkSceneID != kNoScene && !_secondaryMovie.name.
empty(); }
242 int rollNextSequence();
253 void resolveSentinelFrames();
256 int _curViewportFrame = -1;
257 bool _isFinished =
false;
268 void execute()
override;
270 enum RandomMovieControlMode : byte {
272 kStopAfterSequence = 1,
277 Common::String getRecordTypeName()
const override {
return "PlayRandomMovieControl"; }
279 byte _mode = kStopNow;
286 #endif // NANCY_ACTION_SECONDARYMOVIE_H Definition: managed_surface.h:51
Definition: commontypes.h:213
static String format(MSVC_PRINTF const char *fmt,...) GCC_PRINTF(1
Definition: commontypes.h:165
Definition: movieplayer.h:56
Definition: secondarymovie.h:46
Definition: serializer.h:80
Definition: commontypes.h:185
Definition: actionrecord.h:161
Definition: secondarymovie.h:121
bool empty() const
Definition: path.h:353
Definition: secondarymovie.h:57
Definition: secondarymovie.h:64
Definition: actionrecord.h:98
Definition: secondarymovie.h:70
Definition: commontypes.h:282
Definition: secondarymovie.h:263
Definition: commontypes.h:180
Definition: actionmanager.h:32