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[];
132 bool _animationEnabled;
133 byte _roomBrightness;
136 Object *_currentInputObject;
141 int32 _messageDuration;
142 int32 _animationTimer;
143 int _inventoryScroll;
149 int _currentSentence;
150 int _sentenceNumber[6];
157 void takeObject(
Object &obj);
158 void setObjectNull(
Object *&obj);
159 bool isNullObject(
Object *obj);
161 virtual void initState();
162 virtual void initRooms();
163 virtual void destroyRooms();
165 virtual bool canSaveGameStateCurrently();
166 virtual bool genericInteract(Action verb,
Object &obj1,
Object &obj2);
167 void getInput(
bool onlyKeys =
false);
168 void wait(
int ticks,
bool checkInput =
false,
bool waitForSpeech =
false);
169 bool waitOnInput(
int ticks, Common::KeyCode &keycode,
bool waitForSpeech =
false);
171 virtual void roomBrightness();
176 int invertSection(
int section);
177 virtual void drawMapExits();
179 void drawCommandBox();
180 void drawInventory();
182 void changeRoom(RoomId
id);
183 void resetInputState();
184 virtual void handleInput();
185 virtual void handleTime();
186 void pauseTimer(
bool pause);
187 virtual void loadTime();
188 virtual void saveTime();
189 void setAnimationTimer(
int ticks);
190 void dead(
int messageId);
191 int dialog(
int num, byte rowLength[6],
int text[6],
int number);
192 void sentence(
int number,
bool brightness);
193 void say(
int textId);
194 void say(
const char *text);
195 void reply(
int textId,
int aus1,
int aus2);
196 void reply(
const char *text,
int aus1,
int aus2);
197 void mousePosDialog(
int x,
int y);
198 virtual void takeMoney(
int amount);
203 #endif // SUPERNOVA_GAME_MANAGER_H Definition: supernova.h:61
Definition: game-manager.h:101
EventType
Definition: events.h:49
Definition: game-manager.h:63
Definition: game-manager.h:39
Definition: keyboard.h:294
Definition: msn_def.h:210