ScummVM API documentation
amazon_game.h
1 /* ScummVM - Graphic Adventure Engine
2  *
3  * ScummVM is the legal property of its developers, whose names
4  * are too numerous to list here. Please refer to the COPYRIGHT
5  * file distributed with this source distribution.
6  *
7  * This program is free software: you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation, either version 3 of the License, or
10  * (at your option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with this program. If not, see <http://www.gnu.org/licenses/>.
19  *
20  */
21 
22 #ifndef ACCESS_AMAZON_GAME_H
23 #define ACCESS_AMAZON_GAME_H
24 
25 #include "access/access.h"
26 #include "access/amazon/amazon_logic.h"
27 
28 namespace Access {
29 
30 namespace Amazon {
31 
32 class AmazonEngine;
33 
34 class AmazonEngine : public AccessEngine {
35 private:
36  byte _tileData[1455];
37  Common::Array<CellIdent> _chapterCells;
38 
42  void setupGame();
43 
47  void configSelect();
48 
49  void initVariables();
50  void initObjects();
51  void calcIQ();
52  void helpTitle();
53  void drawHelpText(const Common::String &msg);
54  void loadEstablish(int estabIndex);
55  void doEstablish(int screenId, int estabIndex);
56 
57 protected:
61  void playGame() override;
62 
66  void synchronize(Common::Serializer &s) override;
67 public:
68  InactivePlayer _inactive;
69  bool _charSegSwitch;
70  byte _help1[366];
71  byte _help2[366];
72  byte _help3[366];
73  byte *_helpTbl[3];
74 
75  // Fields that are mapped to flags
76  int &_guardLocation;
77  int &_guardFind;
78  int &_helpLevel;
79  int &_jasMayaFlag;
80  int &_moreHelp;
81  int &_flashbackFlag;
82  int &_riverFlag;
83  int &_aniOutFlag;
84  int &_badEnd;
85  int &_noHints;
86  int &_aniFlag;
87  int &_allenFlag;
88  int &_noSound;
89 
90  // Saved fields
91  int _chapter;
92  int _rawInactiveX;
93  int _rawInactiveY;
94  int _inactiveYOff;
95 
96  // Other game specific fields
97  Ant *_ant;
98  Cast *_cast;
99  Guard *_guard;
100  Jungle *_jungle;
101  Opening *_opening;
102  Plane *_plane;
103  River *_river;
104  int _hintLevel;
105  int _updateChapter;
106  int _oldTitleChapter;
107  int _iqValue;
108 public:
109  AmazonEngine(OSystem *syst, const AccessGameDescription *gameDesc);
110 
111  ~AmazonEngine() override;
112 
113  void dead(int deathId) override;
114 
118  void freeInactivePlayer();
119 
120  void drawHelp(const Common::String str);
121 
122  void establish(int esatabIndex, int sub) override;
123 
124  void tileScreen();
125  void updateSummary(int chap);
126  void establishCenter(int screenId, int esatabIndex);
127 
131  void startChapter(int chapter);
132 };
133 
134 } // End of namespace Amazon
135 
136 } // End of namespace Access
137 
138 #endif /* ACCESS_ACCESS_H */
Definition: detection.h:35
Definition: str.h:59
Definition: amazon_logic.h:80
Definition: access.h:84
Definition: array.h:52
void synchronize(Common::Serializer &s) override
Definition: amazon_logic.h:159
Definition: amazon_game.h:34
Definition: amazon_logic.h:241
Definition: amazon_logic.h:152
Definition: serializer.h:79
void startChapter(int chapter)
Definition: amazon_logic.h:214
Definition: amazon_logic.h:95
Definition: amazon_logic.h:128
Definition: system.h:161
Definition: access.h:62
Definition: amazon_logic.h:113