mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-20 19:21:46 +00:00
Hack for Launcher Scaler dropdown. Backends using the Launcher will need to implement the OSystem HAS_SCALER property. The global options dialog still needs doing.
svn-id: r12436
This commit is contained in:
parent
770d94b607
commit
eeab2bb3bf
3
NEWS
3
NEWS
@ -4,9 +4,10 @@ For a more comprehensive changelog for the latest experimental CVS code, see:
|
||||
0.5.7(CVS) (2003-??-??)
|
||||
New Games:
|
||||
- Added Broken Sword 1 engine, Cutscene support pending...
|
||||
- Added Broken Sword 2 engine. Cutscene support pending...
|
||||
- Added Broken Sword 2 engine.
|
||||
- Added Flight of the Amazon Queen engine
|
||||
- Added support for V1 SCUMM games 'Maniac Mansion' and 'Zak McKracken'
|
||||
- SCUMM game Full Throttle is now supported.
|
||||
|
||||
General:
|
||||
- Subtitles now default to disabled. '-n' option now enabled subtitles.
|
||||
|
@ -93,42 +93,6 @@ static const char USAGE_STRING[] =
|
||||
;
|
||||
#endif
|
||||
|
||||
struct GraphicsMode {
|
||||
const char *name;
|
||||
const char *description;
|
||||
int id;
|
||||
};
|
||||
|
||||
/**
|
||||
* List of graphic 'modes' we potentially support. Potentially because not all
|
||||
* backends actually support all the filters listed here. At this point only
|
||||
* the SDL backend supports all (except for the PalmOS ones of course).
|
||||
* @todo Remove this explicit list of graphic modes and rather extend the
|
||||
* OSystem API to allow querying a backend for the modes it supports.
|
||||
*/
|
||||
static const struct GraphicsMode gfx_modes[] = {
|
||||
{"normal", "Normal (no scaling)", GFX_NORMAL},
|
||||
{"1x", "Normal (no scaling)", GFX_NORMAL},
|
||||
#ifndef __PALM_OS__ // reduce contant data size
|
||||
{"2x", "2x", GFX_DOUBLESIZE},
|
||||
{"3x", "3x", GFX_TRIPLESIZE},
|
||||
{"2xsai", "2xSAI", GFX_2XSAI},
|
||||
{"super2xsai", "Super2xSAI", GFX_SUPER2XSAI},
|
||||
{"supereagle", "SuperEagle", GFX_SUPEREAGLE},
|
||||
{"advmame2x", "AdvMAME2x", GFX_ADVMAME2X},
|
||||
{"advmame3x", "AdvMAME3x", GFX_ADVMAME3X},
|
||||
{"hq2x", "HQ2x", GFX_HQ2X},
|
||||
{"hq3x", "HQ3x", GFX_HQ3X},
|
||||
{"tv2x", "TV2x", GFX_TV2X},
|
||||
{"dotmatrix", "DotMatrix", GFX_DOTMATRIX},
|
||||
#else
|
||||
{"flipping", "Page Flipping", GFX_FLIPPING},
|
||||
{"buffered", "Buffered", GFX_BUFFERED},
|
||||
{"wide", "Wide (HiRes+ only)", GFX_WIDE},
|
||||
#endif
|
||||
{0, 0, 0}
|
||||
};
|
||||
|
||||
GameDetector::GameDetector() {
|
||||
|
||||
// Graphics
|
||||
|
@ -24,6 +24,7 @@
|
||||
#define GAMEDETECTOR_H
|
||||
|
||||
#include "common/str.h"
|
||||
#include "common/scaler.h"
|
||||
|
||||
class Engine;
|
||||
class GameDetector;
|
||||
@ -54,6 +55,43 @@ struct GameSettings {
|
||||
uint32 features;
|
||||
};
|
||||
|
||||
struct GraphicsMode {
|
||||
const char *name;
|
||||
const char *description;
|
||||
int id;
|
||||
};
|
||||
|
||||
/**
|
||||
* List of graphic 'modes' we potentially support. Potentially because not all
|
||||
* backends actually support all the filters listed here. At this point only
|
||||
* the SDL backend supports all (except for the PalmOS ones of course).
|
||||
* @todo Remove this explicit list of graphic modes and rather extend the
|
||||
* OSystem API to allow querying a backend for the modes it supports.
|
||||
*/
|
||||
static const struct GraphicsMode gfx_modes[] = {
|
||||
{"normal", "Normal (no scaling)", GFX_NORMAL},
|
||||
{"1x", "Normal (no scaling)", GFX_NORMAL},
|
||||
#ifndef __PALM_OS__ // reduce contant data size
|
||||
{"2x", "2x", GFX_DOUBLESIZE},
|
||||
{"3x", "3x", GFX_TRIPLESIZE},
|
||||
{"2xsai", "2xSAI", GFX_2XSAI},
|
||||
{"super2xsai", "Super2xSAI", GFX_SUPER2XSAI},
|
||||
{"supereagle", "SuperEagle", GFX_SUPEREAGLE},
|
||||
{"advmame2x", "AdvMAME2x", GFX_ADVMAME2X},
|
||||
{"advmame3x", "AdvMAME3x", GFX_ADVMAME3X},
|
||||
{"hq2x", "HQ2x", GFX_HQ2X},
|
||||
{"hq3x", "HQ3x", GFX_HQ3X},
|
||||
{"tv2x", "TV2x", GFX_TV2X},
|
||||
{"dotmatrix", "DotMatrix", GFX_DOTMATRIX},
|
||||
#else
|
||||
{"flipping", "Page Flipping", GFX_FLIPPING},
|
||||
{"buffered", "Buffered", GFX_BUFFERED},
|
||||
{"wide", "Wide (HiRes+ only)", GFX_WIDE},
|
||||
#endif
|
||||
{0, 0, 0}
|
||||
};
|
||||
|
||||
|
||||
class GameDetector {
|
||||
typedef Common::String String;
|
||||
|
||||
|
@ -99,7 +99,8 @@ public:
|
||||
PROP_GET_FMOPL_EG_ENT,
|
||||
PROP_TOGGLE_ASPECT_RATIO,
|
||||
PROP_TOGGLE_MOUSE_GRAB,
|
||||
PROP_WANT_RECT_OPTIM
|
||||
PROP_WANT_RECT_OPTIM,
|
||||
PROP_HAS_SCALER
|
||||
};
|
||||
union Property {
|
||||
const char *caption;
|
||||
|
@ -73,10 +73,27 @@ void OptionsDialog::open() {
|
||||
setResult(0);
|
||||
|
||||
if (_fullscreenCheckbox) {
|
||||
// FIXME - disable GFX popup for now
|
||||
_gfxPopUp->setSelected(0);
|
||||
_gfxPopUp->setEnabled(false);
|
||||
|
||||
if (ConfMan.hasKey("gfx_mode", _domain)) {
|
||||
const GraphicsMode *gm = gfx_modes;
|
||||
String gfxMode = ConfMan.get("gfx_mode", _domain);
|
||||
int gfxCount = 1;
|
||||
while (gm->name) {
|
||||
OSystem::Property prop;
|
||||
prop.gfx_mode = gm->id;
|
||||
|
||||
if (g_system->property(OSystem::PROP_HAS_SCALER, &prop) != 0)
|
||||
gfxCount++;
|
||||
|
||||
if (scumm_stricmp(gm->name, gfxMode.c_str()) == 0)
|
||||
_gfxPopUp->setSelected(gfxCount);
|
||||
|
||||
gm++;
|
||||
}
|
||||
}
|
||||
|
||||
// Fullscreen setting
|
||||
_fullscreenCheckbox->setState(ConfMan.getBool("fullscreen", _domain));
|
||||
|
||||
@ -128,9 +145,13 @@ void OptionsDialog::close() {
|
||||
if (_enableGraphicSettings) {
|
||||
ConfMan.set("fullscreen", _fullscreenCheckbox->getState(), _domain);
|
||||
ConfMan.set("aspect_ratio", _aspectCheckbox->getState(), _domain);
|
||||
|
||||
if ((int32)_gfxPopUp->getSelectedTag() >= 0)
|
||||
ConfMan.set("gfx_mode", _gfxPopUp->getSelectedString(), _domain);
|
||||
} else {
|
||||
ConfMan.removeKey("fullscreen", _domain);
|
||||
ConfMan.removeKey("aspect_ratio", _domain);
|
||||
ConfMan.removeKey("gfx_mode", _domain);
|
||||
}
|
||||
}
|
||||
|
||||
@ -198,7 +219,7 @@ void OptionsDialog::handleCommand(CommandSender *sender, uint32 cmd, uint32 data
|
||||
void OptionsDialog::setGraphicSettingsState(bool enabled) {
|
||||
_enableGraphicSettings = enabled;
|
||||
|
||||
// _gfxPopUp->setEnabled(enabled);
|
||||
_gfxPopUp->setEnabled(enabled);
|
||||
_fullscreenCheckbox->setEnabled(enabled);
|
||||
_aspectCheckbox->setEnabled(enabled);
|
||||
}
|
||||
@ -225,28 +246,25 @@ void OptionsDialog::setVolumeSettingsState(bool enabled) {
|
||||
int OptionsDialog::addGraphicControls(GuiObject *boss, int yoffset) {
|
||||
const int x = 10;
|
||||
const int w = _w - 2 * 10;
|
||||
const GraphicsMode *gm = gfx_modes;
|
||||
|
||||
// The GFX mode popup
|
||||
// TODO - add an API to query the list of available GFX modes, and to get/set the mode
|
||||
_gfxPopUp = new PopUpWidget(boss, x-5, yoffset, w+5, kLineHeight, "Graphics mode: ", 100);
|
||||
yoffset += 16;
|
||||
|
||||
// FIXME: For the GlobalOptionsDialog, we don't want a <default> here;
|
||||
// rather, we want to setSelected to the current global
|
||||
_gfxPopUp->appendEntry("<default>");
|
||||
_gfxPopUp->appendEntry("");
|
||||
_gfxPopUp->appendEntry("Normal (no scaling)", GFX_NORMAL);
|
||||
_gfxPopUp->appendEntry("2x", GFX_DOUBLESIZE);
|
||||
_gfxPopUp->appendEntry("3x", GFX_TRIPLESIZE);
|
||||
_gfxPopUp->appendEntry("2xSAI", GFX_2XSAI);
|
||||
_gfxPopUp->appendEntry("Super2xSAI", GFX_SUPER2XSAI);
|
||||
_gfxPopUp->appendEntry("SuperEagle", GFX_SUPEREAGLE);
|
||||
_gfxPopUp->appendEntry("AdvMAME2x", GFX_ADVMAME2X);
|
||||
_gfxPopUp->appendEntry("AdvMAME3x", GFX_ADVMAME3X);
|
||||
_gfxPopUp->appendEntry("hq2x", GFX_HQ2X);
|
||||
_gfxPopUp->appendEntry("hq3x", GFX_HQ3X);
|
||||
_gfxPopUp->appendEntry("TV2x", GFX_TV2X);
|
||||
_gfxPopUp->appendEntry("DotMatrix", GFX_DOTMATRIX);
|
||||
while (gm->name) {
|
||||
OSystem::Property prop;
|
||||
prop.gfx_mode = gm->id;
|
||||
|
||||
if (g_system->property(OSystem::PROP_HAS_SCALER, &prop) != 0) {
|
||||
_gfxPopUp->appendEntry(gm->name, gm->id);
|
||||
|
||||
}
|
||||
|
||||
gm++;
|
||||
}
|
||||
|
||||
// Fullscreen checkbox
|
||||
_fullscreenCheckbox = new CheckboxWidget(boss, x, yoffset, w, 16, "Fullscreen mode");
|
||||
@ -333,7 +351,6 @@ GlobalOptionsDialog::GlobalOptionsDialog(GameDetector &detector)
|
||||
yoffset = vBorder;
|
||||
yoffset = addGraphicControls(tab, yoffset);
|
||||
|
||||
|
||||
//
|
||||
// 2) The audio tab
|
||||
//
|
||||
|
@ -991,7 +991,9 @@ void ScummEngine::launch() {
|
||||
if (_saveLoadFlag != 2 || !loadState(_saveLoadSlot, _saveLoadCompatible)) {
|
||||
int args[16];
|
||||
memset(args, 0, sizeof(args));
|
||||
args[0] = _bootParam;
|
||||
args[0] = _bootParam;
|
||||
|
||||
_saveLoadFlag = 0;
|
||||
if (_gameId == GID_MANIAC && _version == 1 && _demoMode)
|
||||
runScript(9, 0, 0, args);
|
||||
else
|
||||
|
Loading…
x
Reference in New Issue
Block a user