22#ifndef HOLLYWOOD_RUNAWAY_UI_H
23#define HOLLYWOOD_RUNAWAY_UI_H
25#include "common/random.h"
26#include "hollywood/runaway/audio.h"
27#include "hollywood/runaway/detection.h"
28#include "hollywood/runaway/font.h"
29#include "hollywood/runaway/graphics.h"
30#include "hollywood/runaway/inventory.h"
37 enum Type { kNone, kRoom, kExamineItem, kCombine, kSkipSpeech, kOpenMenu, kChooseDialogue };
39 RunawayVerb verb = kVerbWalk;
41 byte item = 0, target = 0;
44 _audio(mixer), _inventory(inventory), _strings(strings), _random(
"runaway-ui") {}
46 bool load(RunawayGameType game,
byte chapter);
47 bool loadChapter(
byte chapter);
48 void update(uint32 now,
Common::Point mouse,
byte roomHotspot,
bool blocked,
bool speaking,
49 bool inventoryPresentation =
false,
byte speechFrame = 0,
bool roomHasVerbs =
true,
50 byte actionCursor = 0,
bool preferLook =
false);
52 Command click(
bool right);
53 void toggleInventory();
55 bool inventoryOpen()
const {
return _inventoryOpen; }
56 bool busy()
const {
return _pickupItem != 0; }
57 RunawayVerb verb()
const {
return _verb; }
58 byte hovered()
const {
return _hovered; }
59 void captureState(RunawaySaveState &state)
const;
60 void restoreState(
const RunawaySaveState &state, uint32 now);
61 void setPointerSound(
bool enabled) { _pointerSound = enabled; }
69 bool overButton()
const;
70 bool overOptions()
const;
71 bool inViewport()
const;
72 void setInventoryOpen(
bool open);
73 void setVerb(RunawayVerb verb,
byte actionCursor = 0);
79 RunawayInventory &_inventory;
80 const RunawayStrings &_strings;
86 RunawayAnimation _portrait, _idlePortrait;
90 RunawayVerb _verb = kVerbWalk;
91 byte _cursorType = 0, _previousCursor = 0, _actionCursor = 0;
92 bool _preferLook =
false;
93 byte _hovered = 0, _buttonFrame = 0, _optionsFrame = 0, _pickupItem = 0;
94 bool _inventoryOpen =
false, _enteredInventory =
false, _returnAfterPickup =
false;
95 bool _inventoryPresentation =
false;
96 bool _roomHasVerbs =
true;
97 bool _pointerSound =
true;
98 bool _pickupSoundPlayed =
false;
99 bool _blocked =
false, _speaking =
false, _cursorPushed =
false;
100 uint32 _now = 0, _buttonTick = 0, _verbStarted = 0, _portraitTick = 0;
101 uint32 _blinkUntil = 0, _idleStarted = 0, _lastInteraction = 0, _pickupStarted = 0;
Definition: managed_surface.h:51
Definition: inventory.h:41