23 #ifndef ULTIMA8_ULTIMA8 24 #define ULTIMA8_ULTIMA8 26 #include "common/random.h" 27 #include "common/stream.h" 28 #include "graphics/screen.h" 29 #include "ultima/detection.h" 30 #include "ultima/ultima8/games/game_info.h" 31 #include "ultima/ultima8/gfx/render_surface.h" 32 #include "ultima/ultima8/metaengine.h" 33 #include "ultima/ultima8/usecode/intrinsics.h" 53 class AvatarMoverProcess;
56 class ConfigFileManager;
58 #define GAME_IS_U8 (Ultima8Engine::get_instance()->getGameInfo()->_type == GameInfo::GAME_U8) 59 #define GAME_IS_REMORSE (Ultima8Engine::get_instance()->getGameInfo()->_type == GameInfo::GAME_REMORSE) 60 #define GAME_IS_REGRET (Ultima8Engine::get_instance()->getGameInfo()->_type == GameInfo::GAME_REGRET) 61 #define GAME_IS_CRUSADER (GAME_IS_REMORSE || GAME_IS_REGRET) 62 #define GAME_IS_DEMO (Ultima8Engine::get_instance()->getGameInfo()->_ucOffVariant == GameInfo::GAME_UC_DEMO) 79 bool _fontAntialiasing;
106 bool _inBetweenFrame;
107 uint32 _priorFrameCounterTime;
113 int32 _animationRate;
117 bool _avatarInStasis;
118 bool _showEditorItems;
121 bool _hackMoverEnabled;
125 unsigned int _inversion;
126 bool _crusaderTeleporting;
127 uint32 _moveKeyFrame;
133 void showSplashScreen();
148 void setupCoreGumps();
153 void handleDelayedEvents();
182 void changeVideoMode(
int width,
int height);
198 void handleActionDown(KeybindingAction action);
199 void handleActionUp(KeybindingAction action);
203 static const int U8_DEFAULT_SCREEN_WIDTH = 320;
204 static const int U8_DEFAULT_SCREEN_HEIGHT = 200;
205 static const int CRUSADER_DEFAULT_SCREEN_WIDTH = 640;
206 static const int CRUSADER_DEFAULT_SCREEN_HEIGHT = 480;
208 static const int U8_HIRES_SCREEN_WIDTH = 640;
209 static const int U8_HIRES_SCREEN_HEIGHT = 400;
210 static const int CRUSADER_HIRES_SCREEN_WIDTH = 1024;
211 static const int CRUSADER_HIRES_SCREEN_HEIGHT = 768;
213 INTRINSIC(I_getCurrentTimerTick);
214 INTRINSIC(I_setAvatarInStasis);
215 INTRINSIC(I_getAvatarInStasis);
216 INTRINSIC(I_getTimeInGameHours);
217 INTRINSIC(I_getTimeInMinutes);
218 INTRINSIC(I_getTimeInSeconds);
219 INTRINSIC(I_setTimeInGameHours);
220 INTRINSIC(I_avatarCanCheat);
221 INTRINSIC(I_getCrusaderTeleporting);
222 INTRINSIC(I_setCrusaderTeleporting);
223 INTRINSIC(I_clrCrusaderTeleporting);
224 INTRINSIC(I_makeAvatarACheater);
225 INTRINSIC(I_closeItemGumps);
226 INTRINSIC(I_setCruStasis);
227 INTRINSIC(I_clrCruStasis);
228 INTRINSIC(I_moveKeyDownRecently);
230 void setAvatarInStasis(
bool stat) {
231 _avatarInStasis = stat;
233 bool isAvatarInStasis()
const {
234 return _avatarInStasis;
236 bool isAvatarControlled()
const;
237 bool isShowEditorItems()
const {
238 return _showEditorItems;
240 void setShowEditorItems(
bool flag) {
241 _showEditorItems = flag;
243 bool isShowTouchingItems()
const {
244 return _showTouching;
246 void setShowTouchingItems(
bool flag) {
247 _showTouching = flag;
250 bool isHackMoverEnabled()
const {
251 return _hackMoverEnabled;
253 void setHackMoverEnabled(
bool flag) {
254 _hackMoverEnabled = flag;
257 bool isCrusaderTeleporting()
const {
258 return _crusaderTeleporting;
260 void setCrusaderTeleporting(
bool flag) {
261 _crusaderTeleporting = flag;
263 void setCruStasis(
bool flag) {
266 bool isCruStasis()
const {
271 bool moveKeyDownRecently();
273 uint32 getGameTimeInSeconds();
278 Gump *getDesktopGump() {
281 Gump *getGump(uint16 gumpid);
288 return _avatarMoverProcess;
292 return _randomSource;
342 bool newGame(
int saveSlot = -1);
348 unsigned int getInversion()
const {
351 void setInversion(
unsigned int i) {
352 _inversion = i & 0xFFFF;
355 return (_inversion >= 0x4000 && _inversion < 0xC000);
358 bool areCheatsEnabled()
const {
359 return _cheatsEnabled;
361 void setCheatMode(
bool enabled) {
362 _cheatsEnabled = enabled;
364 bool hasCheated()
const {
370 bool isInterpolationEnabled()
const {
Definition: audio_mixer.h:36
Common::Error saveGameStream(Common::WriteStream *stream, bool isAutosave) override
EngineFeature
Definition: engine.h:258
Common::Error loadGameStream(Common::SeekableReadStream *stream) override
Definition: object_manager.h:42
void pauseEngineIntern(bool pause) override
Common::Error saveGameState(int slot, const Common::String &desc, bool isAutosave=false) override
Definition: render_surface.h:37
Definition: font_manager.h:40
const GameInfo * getGameInfo() const
Get current GameInfo struct.
Definition: ultima8.h:185
Definition: detection.h:65
bool canLoadGameStateCurrently(Common::U32String *msg=nullptr) override
Definition: ultima8.h:313
Definition: avatar_mover_process.h:36
Definition: game_data.h:51
bool hasFeature(EngineFeature f) const override
void applyGameSettings() override
Definition: detection.h:27
Definition: uc_machine.h:42
Definition: palette_manager.h:39
Common::Error loadGameState(int slot) override
void initializePath(const Common::FSNode &gamePath) override
void setError(Common::Error &error)
void NORETURN_PRE error(MSVC_PRINTF const char *s,...) GCC_PRINTF(1
bool newGame(int saveSlot=-1)
Common::Error run() override
Definition: debugger.h:33
Definition: game_map_gump.h:38
Definition: config_file_manager.h:33
void syncSoundSettings() override
Definition: paletteman.h:47
GameInfo contains detailed information about the game.
Definition: game_info.h:38
Definition: inverter_gump.h:36
bool canSaveGameStateCurrently(Common::U32String *msg=nullptr) override
Language
Definition: language.h:45