diff options
author | Eugene Sandulenko | 2005-02-20 00:17:22 +0000 |
---|---|---|
committer | Eugene Sandulenko | 2005-02-20 00:17:22 +0000 |
commit | 27469a1896f08c6d32df1778dc7e9cce28c2bec4 (patch) | |
tree | 173e32cafae393fd7bcf2d7eb4e81932c5cd2b95 /gui | |
parent | 3184c2de34c89a1b380fffa9f9ac83f53dc062d7 (diff) | |
download | scummvm-rg350-27469a1896f08c6d32df1778dc7e9cce28c2bec4.tar.gz scummvm-rg350-27469a1896f08c6d32df1778dc7e9cce28c2bec4.tar.bz2 scummvm-rg350-27469a1896f08c6d32df1778dc7e9cce28c2bec4.zip |
Patch #1121337 (CGA rendering in early LEC titles).
Differences against patch:
o Updated documentation
o Fixed text colors
o Implemented Hercules dithering
Ditherers are based on loom ega and monkey ega, so for zak and mm they're
wrong, i.e. these games look better than with original ditherers.
TODO:
Proper ditherers for zak & MM
EGA ditherers for VGA SCUMM v5 games
svn-id: r16816
Diffstat (limited to 'gui')
-rw-r--r-- | gui/options.cpp | 30 | ||||
-rw-r--r-- | gui/options.h | 1 |
2 files changed, 30 insertions, 1 deletions
diff --git a/gui/options.cpp b/gui/options.cpp index da2fc3c084..41dbcae9ea 100644 --- a/gui/options.cpp +++ b/gui/options.cpp @@ -75,7 +75,7 @@ OptionsDialog::OptionsDialog(const String &domain, int x, int y, int w, int h) : Dialog(x, y, w, h), _domain(domain), _enableGraphicSettings(false), - _gfxPopUp(0), _fullscreenCheckbox(0), _aspectCheckbox(0), + _gfxPopUp(0), _renderModePopUp(0), _fullscreenCheckbox(0), _aspectCheckbox(0), _enableAudioSettings(false), _multiMidiCheckbox(0), _mt32Checkbox(0), _subCheckbox(0), _enableVolumeSettings(false), @@ -108,6 +108,19 @@ void OptionsDialog::open() { } } + _renderModePopUp->setSelected(0); + + if (ConfMan.hasKey("render_mode", _domain)) { + const Common::RenderModeDescription *p = Common::g_renderModes; + const Common::RenderMode renderMode = Common::parseRenderMode(ConfMan.get("render_mode", _domain)); + int sel = 0; + for (int i = 0; p->code; ++p, ++i) { + if (renderMode == p->id) + sel = i + 2; + } + _renderModePopUp->setSelected(sel); + } + #ifndef _WIN32_WCE // Fullscreen setting _fullscreenCheckbox->setState(ConfMan.getBool("fullscreen", _domain)); @@ -167,10 +180,14 @@ void OptionsDialog::close() { if ((int32)_gfxPopUp->getSelectedTag() >= 0) ConfMan.set("gfx_mode", _gfxPopUp->getSelectedString(), _domain); + + if ((int32)_renderModePopUp->getSelectedTag() >= 0) + ConfMan.set("render_mode", _renderModePopUp->getSelectedString(), _domain); } else { ConfMan.removeKey("fullscreen", _domain); ConfMan.removeKey("aspect_ratio", _domain); ConfMan.removeKey("gfx_mode", _domain); + ConfMan.removeKey("render_mode", _domain); } } @@ -240,6 +257,7 @@ void OptionsDialog::setGraphicSettingsState(bool enabled) { _enableGraphicSettings = enabled; _gfxPopUp->setEnabled(enabled); + _renderModePopUp->setEnabled(enabled); #ifndef _WIN32_WCE _fullscreenCheckbox->setEnabled(enabled); _aspectCheckbox->setEnabled(enabled); @@ -282,6 +300,16 @@ int OptionsDialog::addGraphicControls(GuiObject *boss, int yoffset) { gm++; } + // RenderMode popup + _renderModePopUp = new PopUpWidget(boss, x-5, yoffset, w+5, kLineHeight, "Render mode: ", 100); + yoffset += 16; + _renderModePopUp->appendEntry("<default>"); + _renderModePopUp->appendEntry(""); + const Common::RenderModeDescription *rm = Common::g_renderModes; + for (; rm->code; ++rm) { + _renderModePopUp->appendEntry(rm->description, rm->id); + } + // Fullscreen checkbox _fullscreenCheckbox = new CheckboxWidget(boss, x, yoffset, w, 16, "Fullscreen mode"); yoffset += 16; diff --git a/gui/options.h b/gui/options.h index 5b2e34ccea..497e216ed5 100644 --- a/gui/options.h +++ b/gui/options.h @@ -71,6 +71,7 @@ private: PopUpWidget *_gfxPopUp; CheckboxWidget *_fullscreenCheckbox; CheckboxWidget *_aspectCheckbox; + PopUpWidget *_renderModePopUp; // // Audio controls |