22#ifndef HOLLYWOOD_MONSTERS_GAMEPLAY_GAME_LOOP_H
23#define HOLLYWOOD_MONSTERS_GAMEPLAY_GAME_LOOP_H
25#include "common/array.h"
26#include "common/keyboard.h"
27#include "common/path.h"
28#include "common/str.h"
29#include "common/types.h"
31#include "hollywood/monsters/gameplay/hotspots.h"
40enum InventoryMediaId : int;
42extern const uint16 kGameplayVerbPanelStripXOffsets[9];
53 uint16 inventoryActionHandlerId;
55 byte primaryInventoryItem;
56 bool relationModeActive;
57 bool inventoryItemSelected;
63 bool visible()
const {
return verbPanelVisible || inventoryPanelVisible; }
65 bool verbPanelVisible;
66 bool inventoryPanelVisible;
88 virtual uint16 viewportXOffset()
const = 0;
89 virtual uint16 viewportYOffset()
const;
91 virtual void prepareGameplayLoop();
92 virtual void advanceGameplayLoop(uint32 deltaMillis) = 0;
93 virtual void drawGameplayFrame() = 0;
95 virtual void invalidatePresentationPalette();
97 virtual Common::Path optionsMenuSoundBank0ArchiveName()
const;
98 virtual bool optionsMenuSpeechPreviewSampleId(uint16 &sampleId)
const;
99 virtual void suspendAudioForOptionsMenu();
100 virtual void refreshTranslatedText();
101 virtual bool shouldExitGameplayLoop()
const;
102 virtual bool isInventoryPanelAvailable()
const;
103 virtual Common::String inventoryItemName(
byte owner,
byte itemId)
const;
104 virtual void beginSharedInventorySpeechLine(uint16 rowIndex,
byte frameIndex);
105 virtual byte randomSharedInventorySpeechFrame(
byte maxFrameIndex);
106 virtual void playSharedInventorySound(
byte sampleId);
107 virtual void showTravelScreenViewer();
109 virtual bool showInventoryMedia(InventoryMediaId mediaId);
110 virtual bool playSueTapeRecording();
128 void setCurrentStrip(
byte stripIndex);
130 byte currentStrip()
const {
return _currentStrip; }
137 void handleLeftClick();
138 void handleRightClick();
139 void enterKeyboardStripMode();
140 void leaveKeyboardStripMode();
141 void selectPreviousKeyboardStrip();
142 void selectNextKeyboardStrip();
143 void selectNextStrip();
144 void openVerbPanel();
145 void closeVerbPanel();
146 void openInventoryPanel();
147 void closeInventoryPanel();
148 void openOptionsMenu();
149 void updatePanelHover(uint32 deltaMillis);
150 void updatePanelFromMousePosition();
151 void selectPanelStrip(
byte stripIndex);
152 byte panelStripAt(uint16 cursorX, uint16 cursorY)
const;
153 byte inventoryPanelStripAt(uint16 cursorX, uint16 cursorY)
const;
154 uint inventoryPanelSlotAtPosition(uint16 cursorX, uint16 cursorY)
const;
155 byte inventoryItemAtPanelPosition(uint16 cursorX, uint16 cursorY)
const;
156 byte currentInventoryOwner()
const;
157 uint16 fixedInventoryActionHandler(
byte owner,
byte itemId,
byte stripIndex)
const;
158 uint16 dialogueInventoryRelationHandler(
byte primaryItemId,
byte secondaryItemId,
byte relationMode)
const;
159 bool scrollInventoryPanelPreviousPage();
160 bool scrollInventoryPanelNextPage();
161 bool isInventoryPanelOptionsButton(uint16 cursorX, uint16 cursorY)
const;
162 bool isInventoryPanelPreviousPageArrow(uint16 cursorX, uint16 cursorY)
const;
163 bool isInventoryPanelNextPageArrow(uint16 cursorX, uint16 cursorY)
const;
164 void updatePanelCaption();
165 void updateInventoryPanelCaption();
166 void syncPanelState();
169 void clearButtonLatches();
170 void syncHoverCaptionRelationContext();
171 void refreshHoverCaption();
177 bool _leftButtonDown;
178 bool _rightButtonDown;
179 bool _keyboardStripMode;
180 bool _restoreDefaultStripOnInventoryClose;
182 byte _primaryInventoryItem;
184 uint32 _panelHoverTimer;
Definition: game_loop.h:82
Definition: game_loop.h:123
Definition: hollywood.h:47
Definition: hotspots.h:62
Definition: hotspots.h:118
Definition: formatinfo.h:28
Definition: keyboard.h:294
Definition: game_loop.h:44
Definition: game_loop.h:60