ScummVM API documentation
detection.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 ULTIMA_DETECTION
23 #define ULTIMA_DETECTION
24 
25 #include "engines/advancedDetector.h"
26 
27 namespace Ultima {
28 
29 enum GameId {
30  GAME_AKALABETH,
31  GAME_ULTIMA1,
32  GAME_ULTIMA2,
33  GAME_ULTIMA3,
34  GAME_ULTIMA4,
35  GAME_ULTIMA5,
36  GAME_ULTIMA6,
37  GAME_SAVAGE_EMPIRE,
38  GAME_MARTIAN_DREAMS,
39  GAME_ULTIMA_UNDERWORLD1,
40  GAME_ULTIMA_UNDERWORLD2,
41  GAME_ULTIMA7,
42  GAME_ULTIMA8,
43  GAME_CRUSADER_REG,
44  GAME_CRUSADER_REM
45  // There is no ultima game after Ultima 8. Nope.. none at all.
46 };
47 
48 enum UltimaGameFeatures {
49  GF_VGA_ENHANCED = 1 << 0
50 };
51 
52 // Custom game detector flags used by Ultima engines
53 enum UltimaGameFlags {
54  // Usecode variants (used by Crusader games)
55  ADGF_USECODE_MASK = (0xF | ADGF_DEMO), // Mask of flags data used for usecode variants
56  ADGF_USECODE_DEFAULT = 0, // Default usecode tables (latest/gog editions of game)
57  ADGF_USECODE_DEMO = ADGF_DEMO, // Demo versions of each game (re-use demo flag)
58  ADGF_USECODE_ORIG = 1, // Original (eg, 1.01) CD version
59  ADGF_USECODE_ES = 2, // Spanish version of game
60  ADGF_USECODE_DE = 3, // German version of game
61  ADGF_USECODE_FR = 4, // French version of game
62  ADGF_USECODE_JA = 5 // Japanese version of game
63 };
64 
66  AD_GAME_DESCRIPTION_HELPERS(desc);
67 
68  ADGameDescription desc;
69  GameId gameId;
70  uint32 features;
71 };
72 
73 #define GAMEOPTION_ORIGINAL_SAVELOAD GUIO_GAMEOPTIONS1
74 #define GAMEOPTION_FRAME_SKIPPING GUIO_GAMEOPTIONS2
75 #define GAMEOPTION_FRAME_LIMITING GUIO_GAMEOPTIONS3
76 #define GAMEOPTION_CHEATS GUIO_GAMEOPTIONS4
77 #define GAMEOPTION_HIGH_RESOLUTION GUIO_GAMEOPTIONS5
78 #define GAMEOPTION_FOOTSTEP_SOUNDS GUIO_GAMEOPTIONS6
79 #define GAMEOPTION_JUMP_TO_MOUSE GUIO_GAMEOPTIONS7
80 #define GAMEOPTION_FONT_REPLACEMENT GUIO_GAMEOPTIONS8
81 #define GAMEOPTION_FONT_ANTIALIASING GUIO_GAMEOPTIONS9
82 #define GAMEOPTION_CAMERA_WITH_SILENCER GUIO_GAMEOPTIONS10
83 #define GAMEOPTION_ALWAYS_CHRISTMAS GUIO_GAMEOPTIONS11
84 
85 } // End of namespace Ultima
86 
87 class UltimaMetaEngineDetection : public AdvancedMetaEngineDetection<Ultima::UltimaGameDescription> {
88  static const DebugChannelDef debugFlagList[];
89 
90 public:
92  ~UltimaMetaEngineDetection() override {}
93 
94  const char *getName() const override {
95  return "ultima";
96  }
97 
98  const char *getEngineName() const override {
99  return "Ultima";
100  }
101 
102  const char *getOriginalCopyright() const override {
103  return "Ultima Games (C) 1980-1995 Origin Systems Inc.";
104  }
105 
106  const DebugChannelDef *getDebugChannels() const override {
107  return debugFlagList;
108  }
109 };
110 
111 #endif
Definition: advancedDetector.h:604
const char * getEngineName() const override
Definition: detection.h:98
Definition: advancedDetector.h:163
const char * getName() const override
Definition: detection.h:94
Definition: detection.h:65
const DebugChannelDef * getDebugChannels() const override
Definition: detection.h:106
Definition: detection.h:27
Definition: debug-channels.h:36
const char * getOriginalCopyright() const override
Definition: detection.h:102
Definition: detection.h:87
Add "-demo" to gameid.
Definition: advancedDetector.h:156