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