22 #ifndef TWINE_SCENE_GAMESTATE_H 23 #define TWINE_SCENE_GAMESTATE_H 25 #include "common/scummsys.h" 26 #include "twine/menu/menu.h" 27 #include "twine/shared.h" 32 enum MagicballStrengthType {
34 kYellowBallStrength = 3,
35 kGreenBallStrength = 4,
46 void initGameStateVars();
71 int16 _listFlagGame[NUM_GAME_FLAGS];
73 int16 _gameChapter = 0;
98 int16 getChapter()
const;
113 int16 _zlitosPieces = 0;
125 bool _endGameItems =
false;
133 uint8 _holomapFlags[MAX_HOLO_POS_2];
135 char _sceneName[30] {};
137 TextId _gameListChoice[10];
138 int32 _gameNbChoices = 0;
139 TextId _gameChoice = TextId::kNone;
141 void setDarts(int16 value) {
142 setGameFlag(InventoryItems::kiDart, value);
146 int16 old = _listFlagGame[InventoryItems::kiDart];
148 setGameFlag(InventoryItems::kiDart, old);
151 inline bool inventoryDisabled()
const {
152 return hasGameFlag(GAMEFLAG_INVENTORY_DISABLED) != 0;
155 inline bool hasOpenedFunfrocksSafe()
const {
156 return hasGameFlag(30) != 0;
160 inline bool hasArrivedHamalayi()
const {
161 return hasGameFlag(90) != 0;
164 inline bool hasItem(InventoryItems item)
const {
165 return hasGameFlag(item) != 0;
168 inline void giveItem(InventoryItems item) {
169 setGameFlag(item, 1);
172 inline void removeItem(InventoryItems item) {
173 setGameFlag(item, 0);
176 void clearGameFlags();
178 int16 hasGameFlag(uint8 index)
const;
180 void setGameFlag(uint8 index, int16 value);
182 int16 setKeys(int16 value);
183 int16 setGas(int16 value);
184 int16 setLeafs(int16 value);
185 int16 setKashes(int16 value);
186 int16 setZlitos(int16 value);
187 int16 setMagicPoints(int16 val);
188 int16 setMaxMagicPoints();
189 int16 setLeafBoxes(int16 val);
191 void handleLateGameItems();
193 void addGas(int16 value);
194 void addKeys(int16 val);
195 void addKashes(int16 val);
196 void addMagicPoints(int16 val);
197 void addLeafs(int16 val);
198 void addLeafBoxes(int16 val);
206 void doFoundObj(InventoryItems item);
212 void gameAskChoice(TextId choiceIdx);
214 void processGameoverAnimation();
int16 _magicBallCount
Definition: gamestate.h:105
int16 _magicBallType
Definition: gamestate.h:103
bool _usingSabre
Definition: gamestate.h:124
int16 _inventoryNumLeafs
Definition: gamestate.h:117
int16 _nbLittleKeys
Definition: gamestate.h:110
int16 _magicLevelIdx
Definition: gamestate.h:107
void setChapter(int16 chapter)
int16 _inventoryNumGas
Definition: gamestate.h:121
uint8 _inventoryFlags[NUM_INVENTORY_ITEMS]
Definition: gamestate.h:131
int16 _inventoryNumLeafsBox
Definition: gamestate.h:115
Definition: achievements_tables.h:27
Definition: gamestate.h:42
int16 _magicPoint
Definition: gamestate.h:119
int16 _magicBall
Definition: gamestate.h:101
int16 _goldPieces
Definition: gamestate.h:112