21 #ifndef SCUMM_INSANE_MORTIMER_MOVIE_H 22 #define SCUMM_INSANE_MORTIMER_MOVIE_H 24 #include "common/array.h" 25 #include "common/rect.h" 26 #include "common/str.h" 29 class SeekableReadStream;
38 class SmushDeltaBlocksDecoder;
41 int x, y, width, height;
61 enum Condition { kAtGate, kHasStones, kHostilesRemain, kAnimalsRemain, kDamaged, kOutOfGuesses, kConditionCount };
64 bool conditions[kConditionCount] = {};
65 bool matches(uint code)
const;
74 enum { kScreenWidth = 640, kScreenHeight = 480 };
85 virtual bool advance(
bool renderFrame =
true);
86 void setBackground(
const byte *pixels);
88 const byte *pixels()
const {
return _pixels.begin(); }
89 const byte *palette()
const {
return _palette; }
90 uint frame()
const {
return _nextFrame ? _nextFrame - 1 : 0; }
91 uint frameCount()
const {
return _frames.size(); }
92 bool started()
const {
return _nextFrame != 0; }
93 uint frameRate()
const {
return _frameRate; }
96 bool soundEnabled(uint index)
const {
return _soundEnabled[index]; }
101 virtual void handleAction(
const byte *data, uint32 size);
102 virtual bool skipObject(uint16 a, uint16 b)
const {
return false; }
103 virtual int objectScale(byte codec)
const;
111 uint32 offset = 0, size = 0;
112 uint16 skipA = 0xffff, skipB = 0;
113 int x = 0, y = 0, width = 0, height = 0, scale = 1;
115 bool transparent =
false;
116 byte remap[256] = {};
120 bool fail(
const char *message);
121 void handlePalette(
const byte *data, uint32 size);
122 bool decodeObject(Object &
object);
133 Object _storedObject;
136 byte _palette[768], _initialPalette[768], _remap[256];
137 int16 _paletteDelta[768];
138 int32 _shiftedPalette[768];
139 int _decoderWidth, _decoderHeight;
140 bool _doubled, _initialDoubled, _storeNext;
141 uint _nextFrame, _frameRate;
147 void reset()
override;
152 void handleAction(
const byte *data, uint32 size)
override;
153 bool skipObject(uint16 a, uint16 b)
const override;
154 bool toggle(uint16
id)
const {
return id > 0 &&
id <= 1024 && _toggles[
id - 1]; }
155 void setToggle(uint16
id,
bool value) {
if (
id > 0 &&
id <= 1024) _toggles[
id - 1] = value; }
Definition: algorithm.h:29
Definition: formatinfo.h:28