ScummVM API documentation
game_info.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 ULTIMA8_GAMES_GAMEINFO_H
23 #define ULTIMA8_GAMES_GAMEINFO_H
24 
25 #include "ultima/shared/std/string.h"
26 
27 namespace Ultima {
28 namespace Ultima8 {
29 
30 class IDataSource;
31 
33 struct GameInfo {
34  GameInfo();
35 
36  Std::string _name;
37 
38  enum GameType {
39  GAME_UNKNOWN = 0,
40  GAME_U8,
41  GAME_REMORSE,
42  GAME_REGRET
43  } _type;
44 
45  // Usecode coff variant
46  enum GameUsecodeOffsetVariant {
47  GAME_UC_DEFAULT, // Most versions of most games
48  GAME_UC_ORIG, // Original (pre-patch) CD versions of Crusader games
49  GAME_UC_DEMO, // Crusader: No Remorse or No Regret Demos
50  GAME_UC_REM_ES, // Crusader: No Remorse Spanish
51  GAME_UC_REM_FR, // Crusader: No Remorse French
52  GAME_UC_REM_JA, // Crusader: No Remorse Japanese
53  GAME_UC_REG_DE // Crusader: No Regret German
54  } _ucOffVariant;
55 
59  int version;
60 
61  enum GameLanguage {
62  GAMELANG_UNKNOWN = 0,
63  GAMELANG_ENGLISH,
64  GAMELANG_FRENCH,
65  GAMELANG_GERMAN,
66  GAMELANG_SPANISH,
67  GAMELANG_JAPANESE
68  } _language;
69 
70  uint8 _md5[16];
71 
72  char getLanguageFileLetter() const;
73  char getLanguageUsecodeLetter() const;
74  Std::string getLanguage() const;
75  Std::string getGameTitle() const;
76  Std::string getPrintableVersion() const;
77 
78  Std::string getPrintDetails() const;
79  Std::string getPrintableMD5() const;
80 
81  bool match(GameInfo &other, bool ignoreMD5 = false) const;
82 
83  void save(Common::WriteStream *ws);
84  bool load(Common::SeekableReadStream *rs, uint32 /* version */);
85 };
86 
87 } // End of namespace Ultima8
88 } // End of namespace Ultima
89 
90 #endif
Definition: stream.h:77
Definition: stream.h:745
Definition: detection.h:27
Definition: string.h:30
int version
Definition: game_info.h:59
GameInfo contains detailed information about the game.
Definition: game_info.h:33