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 _showEditorItems;
125 bool _hackMoverEnabled;
129 unsigned int _inversion;
130 bool _crusaderTeleporting;
131 uint32 _moveKeyFrame;
137 void showSplashScreen();
152 void setupCoreGumps();
157 void handleDelayedEvents();
186 void changeVideoMode(
int width,
int height);
202 void handleActionDown(KeybindingAction action);
203 void handleActionUp(KeybindingAction action);
207 static const int U8_DEFAULT_SCREEN_WIDTH = 320;
208 static const int U8_DEFAULT_SCREEN_HEIGHT = 200;
209 static const int CRUSADER_DEFAULT_SCREEN_WIDTH = 640;
210 static const int CRUSADER_DEFAULT_SCREEN_HEIGHT = 480;
212 static const int U8_HIRES_SCREEN_WIDTH = 640;
213 static const int U8_HIRES_SCREEN_HEIGHT = 400;
214 static const int CRUSADER_HIRES_SCREEN_WIDTH = 1024;
215 static const int CRUSADER_HIRES_SCREEN_HEIGHT = 768;
217 INTRINSIC(I_getCurrentTimerTick);
218 INTRINSIC(I_setAvatarInStasis);
219 INTRINSIC(I_getAvatarInStasis);
220 INTRINSIC(I_getTimeInGameHours);
221 INTRINSIC(I_getTimeInMinutes);
222 INTRINSIC(I_getTimeInSeconds);
223 INTRINSIC(I_setTimeInGameHours);
224 INTRINSIC(I_avatarCanCheat);
225 INTRINSIC(I_getCrusaderTeleporting);
226 INTRINSIC(I_setCrusaderTeleporting);
227 INTRINSIC(I_clrCrusaderTeleporting);
228 INTRINSIC(I_makeAvatarACheater);
229 INTRINSIC(I_closeItemGumps);
230 INTRINSIC(I_setCruStasis);
231 INTRINSIC(I_clrCruStasis);
232 INTRINSIC(I_moveKeyDownRecently);
234 void setAvatarInStasis(
bool stat) {
235 _avatarInStasis = stat;
237 bool isAvatarInStasis()
const {
238 return _avatarInStasis;
240 bool isAvatarControlled()
const;
241 bool isShowEditorItems()
const {
242 return _showEditorItems;
244 void setShowEditorItems(
bool flag) {
245 _showEditorItems = flag;
247 bool isShowTouchingItems()
const {
248 return _showTouching;
250 void setShowTouchingItems(
bool flag) {
251 _showTouching = flag;
254 bool isHackMoverEnabled()
const {
255 return _hackMoverEnabled;
257 void setHackMoverEnabled(
bool flag) {
258 _hackMoverEnabled = flag;
261 bool isCrusaderTeleporting()
const {
262 return _crusaderTeleporting;
264 void setCrusaderTeleporting(
bool flag) {
265 _crusaderTeleporting = flag;
267 void setCruStasis(
bool flag) {
270 bool isCruStasis()
const {
275 bool moveKeyDownRecently();
277 uint32 getGameTimeInSeconds();
282 Gump *getDesktopGump() {
285 Gump *getGump(uint16 gumpid);
292 return _avatarMoverProcess;
296 return _randomSource;
346 bool newGame(
int saveSlot = -1);
352 unsigned int getInversion()
const {
355 void setInversion(
unsigned int i) {
356 _inversion = i & 0xFFFF;
359 return (_inversion >= 0x4000 && _inversion < 0xC000);
362 bool areCheatsEnabled()
const {
363 return _cheatsEnabled;
365 void setCheatMode(
bool enabled) {
366 _cheatsEnabled = enabled;
368 bool hasCheated()
const {
374 bool isInterpolationEnabled()
const {
Definition: audio_mixer.h:36
Common::Error saveGameStream(Common::WriteStream *stream, bool isAutosave) override
EngineFeature
Definition: engine.h:260
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:189
Definition: detection.h:65
bool canLoadGameStateCurrently(Common::U32String *msg=nullptr) override
Definition: ultima8.h:317
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