ScummVM API documentation
hacks.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 MTROPOLIS_HACKS_H
23 #define MTROPOLIS_HACKS_H
24 
25 #include "common/rect.h"
26 #include "common/ptr.h"
27 #include "common/hashmap.h"
28 
29 namespace MTropolis {
30 
31 class AssetHooks;
32 class ModifierHooks;
33 class SaveLoadHooks;
34 class SceneTransitionHooks;
35 class StructuralHooks;
36 class SaveLoadMechanismHooks;
37 struct IAutoSaveProvider;
38 struct MTropolisGameDescription;
39 
40 struct Hacks {
41  Hacks();
42  ~Hacks();
43 
44  void addStructuralHooks(uint32 guid, const Common::SharedPtr<StructuralHooks> &hooks);
45  void addModifierHooks(uint32 guid, const Common::SharedPtr<ModifierHooks> &hooks);
46  void addAssetHooks(const Common::SharedPtr<AssetHooks> &hooks);
47  void addSceneTransitionHooks(const Common::SharedPtr<SceneTransitionHooks> &hooks);
48  void addSaveLoadHooks(const Common::SharedPtr<SaveLoadHooks> &hooks);
49  void addSaveLoadMechanismHooks(const Common::SharedPtr<SaveLoadMechanismHooks> &hooks);
50 
51  bool ignoreMismatchedProjectNameInObjectLookups;
52  bool removeQuickTimeEdits;
53  bool ignoreMToonMaintainRateFlag;
54  bool allowAssetsFromOtherScenes;
55  bool mtiVariableReferencesHack;
56  bool mtiSceneReturnHack;
57  bool mtiHispaniolaDamagedStringHack;
58 
59  bool ignoreSceneUnloads;
60 
61  uint midiVolumeScale; // 256 = 1.0
62 
63  uint32 minTransitionDuration;
64 
65  Common::Point reportDisplaySize; // If X or Y is non-zero, report this as the display size
66  Common::Point mainWindowOffset; // Coordinate offset of the main window
67 
70  Common::SharedPtr<StructuralHooks> defaultStructuralHooks;
75 };
76 
77 namespace HackSuites {
78 
79 void addObsidianQuirks(const MTropolisGameDescription &desc, Hacks &hacks);
80 void addObsidianBugFixes(const MTropolisGameDescription &desc, Hacks &hacks);
81 void addObsidianAutoSaves(const MTropolisGameDescription &desc, Hacks &hacks, IAutoSaveProvider *autoSaveProvider);
82 void addObsidianSaveMechanism(const MTropolisGameDescription &desc, Hacks &hacks);
83 void addObsidianImprovedWidescreen(const MTropolisGameDescription &desc, Hacks &hacks);
84 
85 void addMTIQuirks(const MTropolisGameDescription &desc, Hacks &hacks);
86 
87 } // End of namespace HackSuites
88 
89 } // End of namespace MTropolis
90 
91 #endif
Definition: array.h:52
Definition: hashmap.h:85
Definition: rect.h:45
Definition: detection.h:202
Definition: actions.h:25
Definition: saveload.h:64
Definition: hacks.h:40
Definition: ptr.h:159