GameInfo.h

Go to the documentation of this file.
00001 /*
00002 Copyright (C) 2003-2006 The Pentagram team
00003 
00004 This program is free software; you can redistribute it and/or
00005 modify it under the terms of the GNU General Public License
00006 as published by the Free Software Foundation; either version 2
00007 of the License, or (at your option) any later version.
00008 
00009 This program is distributed in the hope that it will be useful,
00010 but WITHOUT ANY WARRANTY; without even the implied warranty of
00011 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00012 GNU General Public License for more details.
00013 
00014 You should have received a copy of the GNU General Public License
00015 along with this program; if not, write to the Free Software
00016 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
00017 */
00018 
00019 #ifndef GAMEINFO_H
00020 #define GAMEINFO_H
00021 
00022 class IDataSource;
00023 class ODataSource;
00024 
00026 struct GameInfo {
00027         GameInfo();
00028 
00029         Pentagram::istring name;
00030 
00031         enum GameType {
00032                 GAME_UNKNOWN = 0,
00033                 GAME_U8,
00034                 GAME_REMORSE,
00035                 GAME_REGRET,
00036                 GAME_PENTAGRAM_MENU
00037         } type;
00038 
00042         int version;
00043 
00044         enum GameLanguage {
00045                 GAMELANG_UNKNOWN = 0,
00046                 GAMELANG_ENGLISH,
00047                 GAMELANG_FRENCH,
00048                 GAMELANG_GERMAN,
00049                 GAMELANG_SPANISH,
00050                 GAMELANG_JAPANESE
00051         } language;
00052 
00053         uint8 md5[16];
00054 
00055         char getLanguageFileLetter() const;
00056         char getLanguageUsecodeLetter() const;
00057         std::string getLanguage() const;
00058         std::string getGameTitle() const;
00059         std::string getPrintableVersion() const;
00060 
00061         std::string getPrintDetails() const;
00062         std::string getPrintableMD5() const;
00063 
00064         bool match(GameInfo& other, bool ignoreMD5=false) const;
00065 
00066         void save(ODataSource* ods);
00067         bool load(IDataSource* ids, uint32 version);
00068 };
00069 
00070 #endif

Generated on Fri Jul 27 22:27:15 2007 for pentagram by  doxygen 1.4.7