22 #ifndef SUPERNOVA_GAME_MANAGER_H 23 #define SUPERNOVA_GAME_MANAGER_H 25 #include "common/events.h" 26 #include "common/rect.h" 27 #include "common/keyboard.h" 28 #include "common/error.h" 29 #include "supernova/room.h" 30 #include "supernova/sound.h" 34 const int32 kMaxTimerValue = 0x7FFFFFFF;
36 enum EventFunction { kNoFn, kSupernovaFn, kGuardReturnedFn, kGuardWalkFn, kTaxiFn, kSearchStartFn, kSoberFn, kPyramidEndFn, kCaughtFn};
43 , _nullObject(nullObject)
44 , _inventoryScroll(inventoryScroll) {
45 for (
int i = 0; i < kMaxCarry; ++i)
46 _inventory[i] =
nullptr;
52 Object *
get(
int index)
const;
53 Object *
get(ObjectId id)
const;
54 int getSize()
const {
return _numObjects; }
57 Object *_inventory[kMaxCarry];
59 int &_inventoryScroll;
67 void setSize(
int x1,
int y1,
int x2,
int y2);
68 void setText(
const char *text);
69 void setTextPosition(
int x,
int y);
70 void setColor(
int bgColor,
int textColor,
int bgColorHighlighted,
int textColorHightlighted);
71 void setHighlight(
bool isHighlighted);
73 const char *getText()
const {
76 int getBackgroundColor()
const {
79 int getTextColor()
const {
85 bool isHighlighted()
const {
86 return _isHighlighted;
95 int _bgColorHighlighted;
97 int _textColorHighlighted;
107 virtual void updateEvents();
110 virtual void executeRoom();
114 static int guiCommands[];
115 static int guiStatusCommands[];
133 bool _animationEnabled;
134 byte _roomBrightness;
137 Object *_currentInputObject;
142 int32 _messageDuration;
143 int32 _animationTimer;
144 int _inventoryScroll;
150 int _currentSentence;
151 int _sentenceNumber[6];
158 void takeObject(
Object &obj);
159 void setObjectNull(
Object *&obj);
160 bool isNullObject(
Object *obj);
162 virtual void initState();
163 virtual void initRooms();
164 virtual void destroyRooms();
166 virtual bool canSaveGameStateCurrently();
167 virtual bool genericInteract(Action verb,
Object &obj1,
Object &obj2);
168 void getInput(
bool onlyKeys =
false);
169 void wait(
int ticks,
bool checkInput =
false,
bool waitForSpeech =
false);
170 bool waitOnInput(
int ticks, Common::KeyCode &keycode,
bool waitForSpeech =
false);
172 virtual void roomBrightness();
177 int invertSection(
int section);
178 virtual void drawMapExits();
180 void drawCommandBox();
181 void drawInventory();
183 void changeRoom(RoomId
id);
184 void resetInputState();
185 virtual void handleInput();
186 virtual void handleTime();
187 void pauseTimer(
bool pause);
188 virtual void loadTime();
189 virtual void saveTime();
190 void setAnimationTimer(
int ticks);
191 void dead(
int messageId);
192 int dialog(
int num, byte rowLength[6],
int text[6],
int number);
193 void sentence(
int number,
bool brightness);
194 void say(
int textId);
195 void say(
const char *text);
196 void reply(
int textId,
int aus1,
int aus2);
197 void reply(
const char *text,
int aus1,
int aus2);
198 void mousePosDialog(
int x,
int y);
199 virtual void takeMoney(
int amount);
204 #endif // SUPERNOVA_GAME_MANAGER_H Definition: supernova.h:61
Definition: game-manager.h:101
EventType
Definition: events.h:49
Definition: game-manager.h:63
uint32 CustomEventType
Definition: events.h:204
Definition: game-manager.h:39
Definition: keyboard.h:294
Definition: msn_def.h:210