mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-24 19:45:07 +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/str-array.h"
|
||||
#include "common/memstream.h"
|
||||
#include "common/translation.h"
|
||||
#include "ultima/shared/early/ultima_early.h"
|
||||
#include "ultima/ultima4/ultima4.h"
|
||||
#include "ultima/ultima4/meta_engine.h"
|
||||
|
@ -54,7 +54,6 @@ public:
|
||||
* Return the extra GUI options used by the target.
|
||||
*/
|
||||
const ExtraGuiOptions getExtraGuiOptions(const Common::String &target) const override;
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@ -76,6 +76,7 @@ bool UltimaEngine::hasFeature(EngineFeature f) const {
|
||||
return
|
||||
(f == kSupportsReturnToLauncher) ||
|
||||
(f == kSupportsLoadingDuringRuntime) ||
|
||||
(f == kSupportsChangingOptionsDuringRuntime) ||
|
||||
(f == kSupportsSavingDuringRuntime);
|
||||
}
|
||||
|
||||
|
@ -143,6 +143,12 @@ static const ExtraGuiOption COMMON_OPTIONS[] = {
|
||||
"cheat",
|
||||
false
|
||||
},
|
||||
{
|
||||
_s("Enable high resolution"),
|
||||
_s("Enable a higher resolution for the game"),
|
||||
"usehighres",
|
||||
false
|
||||
},
|
||||
{ nullptr, nullptr, nullptr, false }
|
||||
};
|
||||
|
||||
|
@ -130,7 +130,8 @@ Ultima8Engine::Ultima8Engine(OSystem *syst, const Ultima::UltimaGameDescription
|
||||
_avatarInStasis(false), _cruStasis(false), _paintEditorItems(false), _inversion(0),
|
||||
_showTouching(false), _timeOffset(0), _hasCheated(false), _cheatsEnabled(false),
|
||||
_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;
|
||||
}
|
||||
|
||||
@ -584,11 +585,14 @@ void Ultima8Engine::paint() {
|
||||
|
||||
tpaint -= g_system->getMillis();
|
||||
|
||||
#ifdef DEBUG
|
||||
// Fill the screen with an annoying color so we can see fast area bugs
|
||||
Rect 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
|
||||
|
||||
_desktopGump->Paint(_screen, _lerpFactor, false);
|
||||
@ -602,12 +606,16 @@ void Ultima8Engine::paint() {
|
||||
}
|
||||
|
||||
void Ultima8Engine::GraphicSysInit() {
|
||||
if (ConfMan.hasKey("usehighres")) {
|
||||
_highRes = ConfMan.getBool("usehighres");
|
||||
}
|
||||
|
||||
if (GAME_IS_U8) {
|
||||
ConfMan.registerDefault("width", U8_DEFAULT_SCREEN_WIDTH);
|
||||
ConfMan.registerDefault("height", U8_DEFAULT_SCREEN_HEIGHT);
|
||||
ConfMan.registerDefault("width", _highRes ? U8_HIRES_SCREEN_WIDTH : U8_DEFAULT_SCREEN_WIDTH);
|
||||
ConfMan.registerDefault("height", _highRes ? U8_HIRES_SCREEN_HEIGHT : U8_DEFAULT_SCREEN_HEIGHT);
|
||||
} else {
|
||||
ConfMan.registerDefault("width", CRUSADER_DEFAULT_SCREEN_WIDTH);
|
||||
ConfMan.registerDefault("height", CRUSADER_DEFAULT_SCREEN_HEIGHT);
|
||||
ConfMan.registerDefault("width", _highRes ? CRUSADER_HIRES_SCREEN_WIDTH : CRUSADER_DEFAULT_SCREEN_WIDTH);
|
||||
ConfMan.registerDefault("height", _highRes ? CRUSADER_HIRES_SCREEN_HEIGHT : CRUSADER_DEFAULT_SCREEN_HEIGHT);
|
||||
}
|
||||
ConfMan.registerDefault("bpp", 16);
|
||||
|
||||
@ -1204,7 +1212,6 @@ void Ultima8Engine::applyGameSettings() {
|
||||
_frameLimit = ConfMan.getBool("frameLimit");
|
||||
_interpolate = ConfMan.getBool("interpolate");
|
||||
_cheatsEnabled = ConfMan.getBool("cheat");
|
||||
|
||||
}
|
||||
|
||||
void Ultima8Engine::openConfigDialog() {
|
||||
|
@ -106,6 +106,7 @@ private:
|
||||
int32 _lerpFactor; //!< Interpolation factor for this frame (0-256)
|
||||
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 _frameLimit; //!< Set to true to enable frame limiting (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_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_setAvatarInStasis);
|
||||
INTRINSIC(I_getAvatarInStasis);
|
||||
|
Loading…
x
Reference in New Issue
Block a user