mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-03 17:33:05 +00:00
ULTIMA8: Add engine option for high res mode
This commit is contained in:
parent
3f5e8f69b9
commit
0b4878c00e
@ -27,6 +27,7 @@
|
|||||||
#include "common/savefile.h"
|
#include "common/savefile.h"
|
||||||
#include "common/str-array.h"
|
#include "common/str-array.h"
|
||||||
#include "common/memstream.h"
|
#include "common/memstream.h"
|
||||||
|
#include "common/translation.h"
|
||||||
#include "ultima/shared/early/ultima_early.h"
|
#include "ultima/shared/early/ultima_early.h"
|
||||||
#include "ultima/ultima4/ultima4.h"
|
#include "ultima/ultima4/ultima4.h"
|
||||||
#include "ultima/ultima4/meta_engine.h"
|
#include "ultima/ultima4/meta_engine.h"
|
||||||
|
@ -54,7 +54,6 @@ public:
|
|||||||
* Return the extra GUI options used by the target.
|
* Return the extra GUI options used by the target.
|
||||||
*/
|
*/
|
||||||
const ExtraGuiOptions getExtraGuiOptions(const Common::String &target) const override;
|
const ExtraGuiOptions getExtraGuiOptions(const Common::String &target) const override;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -76,6 +76,7 @@ bool UltimaEngine::hasFeature(EngineFeature f) const {
|
|||||||
return
|
return
|
||||||
(f == kSupportsReturnToLauncher) ||
|
(f == kSupportsReturnToLauncher) ||
|
||||||
(f == kSupportsLoadingDuringRuntime) ||
|
(f == kSupportsLoadingDuringRuntime) ||
|
||||||
|
(f == kSupportsChangingOptionsDuringRuntime) ||
|
||||||
(f == kSupportsSavingDuringRuntime);
|
(f == kSupportsSavingDuringRuntime);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -143,6 +143,12 @@ static const ExtraGuiOption COMMON_OPTIONS[] = {
|
|||||||
"cheat",
|
"cheat",
|
||||||
false
|
false
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
_s("Enable high resolution"),
|
||||||
|
_s("Enable a higher resolution for the game"),
|
||||||
|
"usehighres",
|
||||||
|
false
|
||||||
|
},
|
||||||
{ nullptr, nullptr, nullptr, false }
|
{ nullptr, nullptr, nullptr, false }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -130,7 +130,8 @@ Ultima8Engine::Ultima8Engine(OSystem *syst, const Ultima::UltimaGameDescription
|
|||||||
_avatarInStasis(false), _cruStasis(false), _paintEditorItems(false), _inversion(0),
|
_avatarInStasis(false), _cruStasis(false), _paintEditorItems(false), _inversion(0),
|
||||||
_showTouching(false), _timeOffset(0), _hasCheated(false), _cheatsEnabled(false),
|
_showTouching(false), _timeOffset(0), _hasCheated(false), _cheatsEnabled(false),
|
||||||
_fontOverride(false), _fontAntialiasing(false), _audioMixer(0), _inverterGump(nullptr),
|
_fontOverride(false), _fontAntialiasing(false), _audioMixer(0), _inverterGump(nullptr),
|
||||||
_lerpFactor(256), _inBetweenFrame(false), _unkCrusaderFlag(false), _moveKeyFrame(0) {
|
_lerpFactor(256), _inBetweenFrame(false), _unkCrusaderFlag(false), _moveKeyFrame(0),
|
||||||
|
_highRes(false) {
|
||||||
_instance = this;
|
_instance = this;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -584,11 +585,14 @@ void Ultima8Engine::paint() {
|
|||||||
|
|
||||||
tpaint -= g_system->getMillis();
|
tpaint -= g_system->getMillis();
|
||||||
|
|
||||||
#ifdef DEBUG
|
|
||||||
// Fill the screen with an annoying color so we can see fast area bugs
|
|
||||||
Rect r;
|
Rect r;
|
||||||
_screen->GetSurfaceDims(r);
|
_screen->GetSurfaceDims(r);
|
||||||
_screen->Fill32(0xFF1010FF, 0, 0, r.width(), r.height());
|
if (_highRes)
|
||||||
|
_screen->Fill32(0, 0, 0, r.width(), r.height());
|
||||||
|
|
||||||
|
#ifdef DEBUG
|
||||||
|
// Fill the screen with an annoying color so we can see fast area bugs
|
||||||
|
_screen->Fill32(0xFF10FF10, 0, 0, r.width(), r.height());
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
_desktopGump->Paint(_screen, _lerpFactor, false);
|
_desktopGump->Paint(_screen, _lerpFactor, false);
|
||||||
@ -602,12 +606,16 @@ void Ultima8Engine::paint() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void Ultima8Engine::GraphicSysInit() {
|
void Ultima8Engine::GraphicSysInit() {
|
||||||
|
if (ConfMan.hasKey("usehighres")) {
|
||||||
|
_highRes = ConfMan.getBool("usehighres");
|
||||||
|
}
|
||||||
|
|
||||||
if (GAME_IS_U8) {
|
if (GAME_IS_U8) {
|
||||||
ConfMan.registerDefault("width", U8_DEFAULT_SCREEN_WIDTH);
|
ConfMan.registerDefault("width", _highRes ? U8_HIRES_SCREEN_WIDTH : U8_DEFAULT_SCREEN_WIDTH);
|
||||||
ConfMan.registerDefault("height", U8_DEFAULT_SCREEN_HEIGHT);
|
ConfMan.registerDefault("height", _highRes ? U8_HIRES_SCREEN_HEIGHT : U8_DEFAULT_SCREEN_HEIGHT);
|
||||||
} else {
|
} else {
|
||||||
ConfMan.registerDefault("width", CRUSADER_DEFAULT_SCREEN_WIDTH);
|
ConfMan.registerDefault("width", _highRes ? CRUSADER_HIRES_SCREEN_WIDTH : CRUSADER_DEFAULT_SCREEN_WIDTH);
|
||||||
ConfMan.registerDefault("height", CRUSADER_DEFAULT_SCREEN_HEIGHT);
|
ConfMan.registerDefault("height", _highRes ? CRUSADER_HIRES_SCREEN_HEIGHT : CRUSADER_DEFAULT_SCREEN_HEIGHT);
|
||||||
}
|
}
|
||||||
ConfMan.registerDefault("bpp", 16);
|
ConfMan.registerDefault("bpp", 16);
|
||||||
|
|
||||||
@ -1204,7 +1212,6 @@ void Ultima8Engine::applyGameSettings() {
|
|||||||
_frameLimit = ConfMan.getBool("frameLimit");
|
_frameLimit = ConfMan.getBool("frameLimit");
|
||||||
_interpolate = ConfMan.getBool("interpolate");
|
_interpolate = ConfMan.getBool("interpolate");
|
||||||
_cheatsEnabled = ConfMan.getBool("cheat");
|
_cheatsEnabled = ConfMan.getBool("cheat");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void Ultima8Engine::openConfigDialog() {
|
void Ultima8Engine::openConfigDialog() {
|
||||||
|
@ -106,6 +106,7 @@ private:
|
|||||||
int32 _lerpFactor; //!< Interpolation factor for this frame (0-256)
|
int32 _lerpFactor; //!< Interpolation factor for this frame (0-256)
|
||||||
bool _inBetweenFrame; //!< Set true if we are doing an inbetween frame
|
bool _inBetweenFrame; //!< Set true if we are doing an inbetween frame
|
||||||
|
|
||||||
|
bool _highRes; //!< Set to true to enable larger screen size
|
||||||
bool _frameSkip; //!< Set to true to enable frame skipping (default false)
|
bool _frameSkip; //!< Set to true to enable frame skipping (default false)
|
||||||
bool _frameLimit; //!< Set to true to enable frame limiting (default true)
|
bool _frameLimit; //!< Set to true to enable frame limiting (default true)
|
||||||
bool _interpolate; //!< Set to true to enable interpolation (default true)
|
bool _interpolate; //!< Set to true to enable interpolation (default true)
|
||||||
@ -216,6 +217,11 @@ public:
|
|||||||
static const int CRUSADER_DEFAULT_SCREEN_WIDTH = 640;
|
static const int CRUSADER_DEFAULT_SCREEN_WIDTH = 640;
|
||||||
static const int CRUSADER_DEFAULT_SCREEN_HEIGHT = 480;
|
static const int CRUSADER_DEFAULT_SCREEN_HEIGHT = 480;
|
||||||
|
|
||||||
|
static const int U8_HIRES_SCREEN_WIDTH = 640;
|
||||||
|
static const int U8_HIRES_SCREEN_HEIGHT = 400;
|
||||||
|
static const int CRUSADER_HIRES_SCREEN_WIDTH = 1024;
|
||||||
|
static const int CRUSADER_HIRES_SCREEN_HEIGHT = 768;
|
||||||
|
|
||||||
INTRINSIC(I_getCurrentTimerTick);
|
INTRINSIC(I_getCurrentTimerTick);
|
||||||
INTRINSIC(I_setAvatarInStasis);
|
INTRINSIC(I_setAvatarInStasis);
|
||||||
INTRINSIC(I_getAvatarInStasis);
|
INTRINSIC(I_getAvatarInStasis);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user