25 #include "common/stream.h" 26 #include "common/array.h" 27 #include "common/serializer.h" 29 #include "dgds/dialog.h" 30 #include "dgds/head.h" 31 #include "dgds/dgds_rect.h" 32 #include "dgds/minigames/shell_game.h" 33 #include "dgds/scene_condition.h" 34 #include "dgds/scene_op.h" 38 class ResourceManager;
54 uint16 _objInteractionRectNum;
91 MouseCursor(uint16 hotX, uint16 hotY) : _hot(hotX, hotY) {}
104 ObjectInteraction(uint16 dropped, uint16 target) : _droppedItemNum(dropped), _targetItemNum(target) {}
108 bool matches(uint16 droppedItemNum, uint16 targetItemNum)
const {
109 return (_droppedItemNum == 0xFFFF || _droppedItemNum == droppedItemNum)
110 && _targetItemNum == targetItemNum;
116 uint16 _droppedItemNum;
117 uint16 _targetItemNum;
123 SceneTrigger(uint16 num) : _num(num), _enabled(
false), _timesToCheckBeforeRunning(0) {}
129 uint16 _timesToCheckBeforeRunning;
131 uint16 getNum()
const {
return _num; }
142 PerSceneGlobal(uint16 num, uint16 scene) : _num(num), _sceneNo(scene), _val(0) {}
145 bool matches(uint16 num, uint16 scene)
const {
return num == _num && (_sceneNo == 0 || _sceneNo == scene); }
146 bool numMatches(uint16 num)
const {
return num == _num; }
168 bool isVersionOver(
const char *version)
const;
169 bool isVersionUnder(
const char *version)
const;
171 uint32 getMagic()
const {
return _magic; }
174 bool runPreTickOps() {
return runOps(_preTickOps); }
175 bool runPostTickOps() {
return runOps(_postTickOps); }
223 void runStartGameOps() { runOps(_startGameOps); }
224 void runQuitGameOps() { runOps(_quitGameOps); }
225 void runChangeSceneOps() { runOps(_onChangeSceneOps); }
227 int16 getGlobal(uint16 num)
const;
228 int16 setGlobal(uint16 num, int16 val);
233 int countItemsInInventory()
const;
239 void initIconSizes();
242 int16 getDefaultMouseCursor()
const {
return _defaultMouseCursor; }
243 int16 getDefaultMouseCursor2()
const {
return _defaultMouseCursor2; }
244 int16 getOtherDefaultMouseCursor()
const {
return _defaultOtherMouseCursor; }
245 uint16 getInvIconNum()
const {
return _invIconNum; }
246 int16 getInvIconMouseCursor()
const {
return _invIconMouseCursor; }
260 int16 _defaultMouseCursor;
261 int16 _defaultMouseCursor2;
263 int16 _invIconMouseCursor;
264 int16 _defaultOtherMouseCursor;
276 void runEnterSceneOps() { runOps(_enterSceneOps); }
277 void runLeaveSceneOps() { runOps(_leaveSceneOps); }
278 void checkTriggers();
280 int getNum()
const {
return _num; }
283 bool checkDialogActive();
286 bool checkForClearedDialogs();
294 void addInvButtonToHotAreaList();
295 void removeInvButtonFromHotAreaList();
299 const GameItem *getDragItem()
const {
return _dragItem; }
300 GameItem *getDragItem() {
return _dragItem; }
301 void setDragItem(
GameItem *item) { _dragItem = item; }
306 bool hasVisibleDialog();
307 bool hasVisibleOrOpeningDialog()
const;
312 void enableTrigger(uint16 num,
bool enable =
true);
314 Dialog *loadDialogData(uint16 num);
315 void freeDialogData(uint16 num);
316 bool loadTalkData(uint16 num);
317 void freeTalkData(uint16 num);
318 void updateVisibleTalkers();
319 void loadTalkDataAndSetFlags(uint16 talknum, uint16 headnum);
321 bool hasVisibleHead()
const;
324 void addAndShowTiredDialog();
328 void activateChoice();
329 bool isTriggerEnabled(uint16 num);
330 bool isLButtonDown()
const {
return _lbuttonDown; }
331 bool isRButtonDown()
const {
return _rbuttonDown; }
332 void showDialog(uint16 fileNum, uint16 dlgNum);
334 void updateHotAreasFromDynamicRects();
335 void setDynamicSceneRect(int16 num, int16 x, int16 y, int16 width, int16 height);
336 void setSceneNum(int16 num) { _num = num; }
342 Dialog *getVisibleDialog();
367 bool _shouldClearDlg;
372 static bool _dlgWithFlagLo8IsClosing;
373 static DialogFlags _sceneDialogFlags;
378 #endif // DGDS_SCENE_H Definition: managed_surface.h:51
Definition: serializer.h:79
Definition: dgds_rect.h:32
Definition: decompress.h:67
Definition: resource.h:49