25 #include "mohawk/myst.h" 26 #include "mohawk/myst_scripts.h" 27 #include "mohawk/video.h" 29 #include "common/rect.h" 42 kMystAreaActionSwitch = 7,
43 kMystAreaImageSwitch = 8,
53 kMystSubimageEnableFlag = (1 << 0),
54 kMystHotspotEnableFlag = (1 << 1),
55 kMystUnknownFlag = (1 << 2),
56 kMystZipModeEnableFlag = (1 << 3)
65 void drawBoundingRect();
67 bool hasType(ResourceType type)
const {
return _type == type; }
69 virtual void drawDataToScreen() {}
70 virtual void handleCardChange() {}
74 void setEnabled(
bool enabled);
75 bool isDrawSubimages() {
return _flags & kMystSubimageEnableFlag; }
76 uint16 getDest() {
return _dest; }
77 virtual uint16 getImageSwitchVar() {
return 0xFFFF; }
78 bool unreachableZipDest();
79 bool canBecomeActive();
82 virtual void handleMouseUp();
83 virtual void handleMouseDown() {}
84 virtual void handleMouseDrag() {}
100 void handleMouseUp()
override;
114 void handleCardChange()
override;
116 void setDirection(int16 direction) { _direction = direction; }
117 void setBlocking(
bool blocking) { _playBlocking = blocking; }
118 void pauseMovie(
bool pause);
128 uint16 _playBlocking;
129 bool _playOnCardChange;
138 void drawDataToScreen()
override;
139 void handleCardChange()
override;
141 void handleMouseUp()
override;
142 void handleMouseDown()
override;
144 MystArea *getSubResource(uint16 index) {
return _subResources[index]; }
146 typedef void (
MystArea::*AreaHandler)();
148 void doSwitch(AreaHandler handler);
150 uint16 _actionSwitchVar;
165 void drawDataToScreen()
override;
166 void drawConditionalDataToScreen(uint16 state,
bool update =
true);
167 uint16 getImageSwitchVar()
override;
169 SubImage getSubImage(uint index)
const;
170 void setSubImageRect(uint index,
const Common::Rect &rect);
173 uint16 _imageSwitchVar;
184 void handleMouseDown()
override;
185 void handleMouseUp()
override;
186 void handleMouseDrag()
override;
188 uint16 getList1(uint16 index);
189 uint16 getList2(uint16 index);
190 uint16 getList3(uint16 index);
192 uint16 getStepsH() {
return _stepsH; }
193 uint16 getStepsV() {
return _stepsV; }
210 uint16 _mouseDownOpcode;
211 uint16 _mouseDragOpcode;
212 uint16 _mouseUpOpcode;
221 void handleMouseDown()
override;
222 void handleMouseUp()
override;
223 void handleMouseDrag()
override;
224 void setStep(uint16 step);
225 void setPosition(uint16 pos);
226 void restoreBackground();
234 uint16 _sliderHeight;
242 void drawFrame(uint16 frame);
244 void releaseLeverV();
245 uint16 getNumFrames() {
return _numFrames; }
259 void handleMouseUp()
override;
260 void handleMouseEnter();
261 void handleMouseLeave();
Definition: myst_areas.h:107
Definition: myst_areas.h:159
Definition: myst_areas.h:253
bool contains(int16 x, int16 y) const
Definition: rect.h:210
Definition: myst_areas.h:96
Definition: myst_areas.h:133
Definition: myst_areas.h:216
Definition: myst_areas.h:237
Definition: myst_areas.h:59
Definition: myst_areas.h:154
Definition: myst_areas.h:177