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