25 #include "mohawk/mohawk.h" 26 #include "common/rect.h" 36 kFeatureObjectMask = 0xff,
37 kFeatureOldSortForeground = 0x1000,
38 kFeatureOldDropSpot = 0x2000,
39 kFeatureOldNoClip = 0x4000,
40 kFeatureNewSortForeground = 0x4000,
41 kFeatureSortBackground = 0x8000,
42 kFeatureOldReset = 0x10000,
43 kFeatureOldDisable = 0x20000,
44 kFeatureOldAlternateScripts = 0x40000,
45 kFeatureOldDisableOnReset = 0x80000,
46 kFeatureDisableOnEnd = 0x100000,
47 kFeatureNewDisable = 0x200000,
48 kFeatureNewDisableOnReset = 0x400000,
49 kFeatureOldAdjustByPos = 0x800000,
50 kFeatureNewNoLoop = 0x800000,
51 kFeatureOldDisabled = 0x1000000,
52 kFeatureOldRandom = 0x2000000,
53 kFeatureNewClip = 0x2000000,
54 kFeatureSortStatic = 0x4000000,
55 kFeatureInternalRegion = 0x8000000,
56 kFeatureSortCheckRight = 0x10000000,
57 kFeatureSortCheckTop = 0x20000000,
58 kFeatureSortCheckLeft = 0x40000000,
59 kFeatureNewInternalTiming = 0x80000000
67 virtual void init() = 0;
68 virtual void shutdown() = 0;
69 virtual void update() = 0;
71 typedef void (
Module::*HotspotProc)(uint);
78 #define FEATURE_BITMAP_ITEMS 48 // this is 24 in old 80 uint16 bitmapIds[FEATURE_BITMAP_ITEMS];
86 uint16 compoundSHAPIndex;
112 virtual void resetFrame() = 0;
115 virtual void resetFeatureScript(uint16 enabled, uint16 scrbId);
116 virtual void resetFeature(
bool notifyDone, Module::FeatureProc doneProc, uint16 scrbId);
118 void hide(
bool clip);
127 Module::FeatureProc _drawProc;
128 Module::FeatureProc _moveProc;
129 Module::FeatureProc _doneProc;
130 Module::FeatureProc _frameProc;
131 Module::BooleanProc _timeProc;
136 uint16 _storedScrbId;
150 virtual void resetScript() = 0;
151 virtual void finishResetFeatureScript() = 0;
159 void resetFrame()
override;
160 void resetFeatureScript(uint16 enabled, uint16 scrbId)
override;
163 void resetScript()
override;
164 void finishResetFeatureScript()
override;
172 void resetFrame()
override;
173 void resetFeatureScript(uint16 enabled, uint16 scrbId)
override;
178 Module::PickupProc _pickupProc;
179 Module::FeatureProc _dropProc;
180 Module::FeatureProc _dragMoveProc;
181 Module::FeatureProc _oldMoveProc;
189 void resetScript()
override;
190 void finishResetFeatureScript()
override;
198 virtual void idleView();
200 void setModule(
Module *module);
201 Module *getCurrentModule() {
return _currentModule; }
205 void installBG(uint16
id);
207 void copyFadeColors(uint start, uint count);
209 uint16 getCompoundSHAPId(uint16 shapIndex);
211 void installGroupOfSCRBs(
bool main, uint base, uint size, uint count = 0);
212 virtual void freeScripts();
213 void installFeatureShapes(
bool regs, uint groupId, uint16 resourceBase);
214 void freeFeatureShapes();
216 uint16 getGroupFromBaseId(uint16 baseId);
217 void getnthScriptSetGroup(uint16 &scrbIndex, uint16 &shapIndex, uint16 scrbId);
220 Feature *getFeaturePtr(uint16
id);
221 uint16 getNewFeatureId();
222 void removeFeature(
Feature *feature,
bool free);
223 void insertUnderCursor(
Feature *feature);
227 uint32 _lastIdleTime;
229 virtual uint32 getTime() = 0;
239 uint16 _backgroundId;
241 Feature *_rootNode, *_cursorNode;
243 uint16 _numSCRBGroups;
244 uint16 _SCRBGroupBases[14];
245 uint16 _SCRBGroupSizes[14];
248 uint16 _compoundSHAPGroups[14];
253 virtual void finishDraw() { }
Definition: graphics.h:68
Definition: graphics.h:37