ScummVM API documentation
settings.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 BLADERUNNER_SETTINGS_H
23 #define BLADERUNNER_SETTINGS_H
24 
25 namespace BladeRunner {
26 
27 class BladeRunnerEngine;
28 class SaveFileReadStream;
29 class SaveFileWriteStream;
30 
31 class Settings {
32  static const int kAmmoTypesCount = 3;
33 
34  BladeRunnerEngine *_vm;
35 
36  int _chapter;
37  int _scene;
38  int _set;
39  int _unk0;
40  float _gamma;
41 
42  bool _chapterChanged;
43  int _newChapter;
44  int _newScene;
45  int _newSet;
46 
47  bool _startingGame;
48  bool _loadingGame;
49 
50  // int _unk1;
51 
52  int _fullHDFrames;
53  int _mst3k;
54 
55  int _difficulty;
56  int _playerAgenda;
57 
58  int _ammoType;
59  int _ammoAmounts[kAmmoTypesCount];
60 
61  bool _learyMode;
62 
63 public:
65 
66  void reset();
67 
68  void setGamma(float gamma) {
69  _gamma = gamma;
70  }
71 
72  void setNewSetAndScene(int set, int scene) {
73  _newSet = set;
74  _newScene = scene;
75  }
76 
77  void clearNewSetAndScene() {
78  _newSet = -1;
79  _newScene = -1;
80  }
81 
82  int getNewScene() const {
83  return _newScene;
84  }
85 
86  int getNewSet() const {
87  return _newSet;
88  }
89 
90  int getScene() const {
91  return _scene;
92  }
93 
94  int getSet() const {
95  return _set;
96  }
97 
98  int getChapter() const {
99  return _chapter;
100  }
101 
102  void setChapter(int newChapter) {
103  _chapterChanged = true;
104  _newChapter = newChapter;
105  }
106 
107  void setLoadingGame() {
108  _loadingGame = true;
109  }
110 
111  bool isLoadingGame() const {
112  return _loadingGame;
113  }
114 
115  void setStartingGame() {
116  _startingGame = true;
117  }
118 
119  bool openNewScene();
120 
121  static int getAmmoTypesCount();
122  int getAmmoType() const;
123  void setAmmoType(int ammoType);
124  int getAmmo(int ammoType) const;
125  void addAmmo(int ammoType, int ammo);
126  void decreaseAmmo();
127 
128  int getDifficulty() const;
129  void setDifficulty(int difficulty);
130 
131  int getPlayerAgenda() const;
132  void setPlayerAgenda(int agenda);
133 
134  bool getLearyMode() const;
135  void setLearyMode(bool learyMode);
136 
137  void save(SaveFileWriteStream &f);
138  void load(SaveFileReadStream &f);
139 };
140 
141 } // End of namespace BladeRunner
142 
143 #endif
Definition: savefile.h:88
Definition: actor.h:31
Definition: savefile.h:113
Definition: bladerunner.h:113
Definition: settings.h:31