23 #ifndef ULTIMA8_ULTIMA8 24 #define ULTIMA8_ULTIMA8 26 #include "common/events.h" 27 #include "common/random.h" 28 #include "common/stream.h" 29 #include "graphics/screen.h" 30 #include "ultima/shared/std/containers.h" 31 #include "ultima/ultima8/usecode/intrinsics.h" 32 #include "ultima/ultima8/misc/common_types.h" 33 #include "ultima/ultima8/games/game_info.h" 34 #include "ultima/ultima8/gfx/render_surface.h" 35 #include "ultima/ultima8/metaengine.h" 36 #include "ultima/detection.h" 56 class AvatarMoverProcess;
59 class ConfigFileManager;
62 #define GAME_IS_U8 (Ultima8Engine::get_instance()->getGameInfo()->_type == GameInfo::GAME_U8) 63 #define GAME_IS_REMORSE (Ultima8Engine::get_instance()->getGameInfo()->_type == GameInfo::GAME_REMORSE) 64 #define GAME_IS_REGRET (Ultima8Engine::get_instance()->getGameInfo()->_type == GameInfo::GAME_REGRET) 65 #define GAME_IS_CRUSADER (GAME_IS_REMORSE || GAME_IS_REGRET) 66 #define GAME_IS_DEMO (Ultima8Engine::get_instance()->getGameInfo()->_ucOffVariant == GameInfo::GAME_UC_DEMO) 83 bool _fontAntialiasing;
110 bool _inBetweenFrame;
111 uint32 _priorFrameCounterTime;
117 int32 _animationRate;
121 bool _avatarInStasis;
122 bool _paintEditorItems;
128 unsigned int _inversion;
129 bool _crusaderTeleporting;
130 uint32 _moveKeyFrame;
136 void showSplashScreen();
151 void setupCoreGumps();
156 void handleDelayedEvents();
185 void changeVideoMode(
int width,
int height);
201 void handleActionDown(KeybindingAction action);
202 void handleActionUp(KeybindingAction action);
206 static const int U8_DEFAULT_SCREEN_WIDTH = 320;
207 static const int U8_DEFAULT_SCREEN_HEIGHT = 200;
208 static const int CRUSADER_DEFAULT_SCREEN_WIDTH = 640;
209 static const int CRUSADER_DEFAULT_SCREEN_HEIGHT = 480;
211 static const int U8_HIRES_SCREEN_WIDTH = 640;
212 static const int U8_HIRES_SCREEN_HEIGHT = 400;
213 static const int CRUSADER_HIRES_SCREEN_WIDTH = 1024;
214 static const int CRUSADER_HIRES_SCREEN_HEIGHT = 768;
216 INTRINSIC(I_getCurrentTimerTick);
217 INTRINSIC(I_setAvatarInStasis);
218 INTRINSIC(I_getAvatarInStasis);
219 INTRINSIC(I_getTimeInGameHours);
220 INTRINSIC(I_getTimeInMinutes);
221 INTRINSIC(I_getTimeInSeconds);
222 INTRINSIC(I_setTimeInGameHours);
223 INTRINSIC(I_avatarCanCheat);
224 INTRINSIC(I_getCrusaderTeleporting);
225 INTRINSIC(I_setCrusaderTeleporting);
226 INTRINSIC(I_clrCrusaderTeleporting);
227 INTRINSIC(I_makeAvatarACheater);
228 INTRINSIC(I_closeItemGumps);
229 INTRINSIC(I_setCruStasis);
230 INTRINSIC(I_clrCruStasis);
231 INTRINSIC(I_moveKeyDownRecently);
233 void setAvatarInStasis(
bool stat) {
234 _avatarInStasis = stat;
236 bool isAvatarInStasis()
const {
237 return _avatarInStasis;
239 void toggleAvatarInStasis() {
240 _avatarInStasis = !_avatarInStasis;
242 bool isPaintEditorItems()
const {
243 return _paintEditorItems;
245 void togglePaintEditorItems() {
246 _paintEditorItems = !_paintEditorItems;
248 bool isShowTouchingItems()
const {
249 return _showTouching;
251 void toggleShowTouchingItems() {
252 _showTouching = !_showTouching;
255 bool isCrusaderTeleporting()
const {
256 return _crusaderTeleporting;
258 void setCrusaderTeleporting(
bool flag) {
259 _crusaderTeleporting = flag;
261 void setCruStasis(
bool flag) {
264 bool isCruStasis()
const {
269 bool moveKeyDownRecently();
271 uint32 getGameTimeInSeconds();
276 Gump *getDesktopGump() {
279 Gump *getGump(uint16 gumpid);
286 return _avatarMoverProcess;
290 return _randomSource;
340 bool newGame(
int saveSlot = -1);
346 unsigned int getInversion()
const {
349 void setInversion(
unsigned int i) {
350 _inversion = i & 0xFFFF;
353 return (_inversion >= 0x4000 && _inversion < 0xC000);
356 bool areCheatsEnabled()
const {
357 return _cheatsEnabled;
359 void setCheatMode(
bool enabled) {
360 _cheatsEnabled = enabled;
362 bool hasCheated()
const {
368 bool isInterpolationEnabled()
const {
Definition: audio_mixer.h:36
Common::Error saveGameStream(Common::WriteStream *stream, bool isAutosave) override
EngineFeature
Definition: engine.h:253
Common::Error loadGameStream(Common::SeekableReadStream *stream) override
Definition: object_manager.h:38
void pauseEngineIntern(bool pause) override
Common::Error saveGameState(int slot, const Common::String &desc, bool isAutosave=false) override
Definition: render_surface.h:40
Definition: font_manager.h:41
const GameInfo * getGameInfo() const
Get current GameInfo struct.
Definition: ultima8.h:188
Definition: detection.h:65
bool canLoadGameStateCurrently(Common::U32String *msg=nullptr) override
Definition: ultima8.h:311
Definition: avatar_mover_process.h:37
Definition: game_data.h:51
bool hasFeature(EngineFeature f) const override
void applyGameSettings() override
Definition: detection.h:27
Definition: uc_machine.h:41
Definition: palette_manager.h:34
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:37
Definition: game_map_gump.h:38
Definition: config_file_manager.h:34
void syncSoundSettings() override
Definition: paletteman.h:47
GameInfo contains detailed information about the game.
Definition: game_info.h:33
Definition: inverter_gump.h:36
bool canSaveGameStateCurrently(Common::U32String *msg=nullptr) override
Language
Definition: language.h:45