diff options
author | Eugene Sandulenko | 2005-03-02 21:46:51 +0000 |
---|---|---|
committer | Eugene Sandulenko | 2005-03-02 21:46:51 +0000 |
commit | 50f6eb740c488532e78f031f9e8b18f672fdff93 (patch) | |
tree | b446fbc4152a3ef45dbd96c4c7298a31fa22fecf | |
parent | 7a2a4f34dc823f04f3635fd57aaa3a23a859e563 (diff) | |
download | scummvm-rg350-50f6eb740c488532e78f031f9e8b18f672fdff93.tar.gz scummvm-rg350-50f6eb740c488532e78f031f9e8b18f672fdff93.tar.bz2 scummvm-rg350-50f6eb740c488532e78f031f9e8b18f672fdff93.zip |
Distinguish between green and amber hercules. Now specify it via hercGreen
and hercAmber. Updated documentation accordingly.
svn-id: r16975
-rw-r--r-- | common/util.cpp | 3 | ||||
-rw-r--r-- | common/util.h | 5 | ||||
-rw-r--r-- | gui/options.cpp | 4 | ||||
-rw-r--r-- | scumm/charset.cpp | 2 | ||||
-rw-r--r-- | scumm/gfx.cpp | 4 | ||||
-rw-r--r-- | scumm/input.cpp | 2 | ||||
-rw-r--r-- | scumm/palette.cpp | 6 | ||||
-rw-r--r-- | scumm/scumm.cpp | 9 | ||||
-rw-r--r-- | scumm/vars.cpp | 2 |
9 files changed, 22 insertions, 15 deletions
diff --git a/common/util.cpp b/common/util.cpp index f4d5c91779..af6edecdc2 100644 --- a/common/util.cpp +++ b/common/util.cpp @@ -223,7 +223,8 @@ const char *getPlatformDescription(Platform id) { const RenderModeDescription g_renderModes[] = { - {"hercules", "Hercules", kRenderHerc}, + {"hercGreen", "Hercules Green", kRenderHercG}, + {"hercAmber", "Hercules Amber", kRenderHercA}, {"cga", "CGA", kRenderCGA}, {"ega", "EGA", kRenderEGA}, {0, 0, kRenderDefault} diff --git a/common/util.h b/common/util.h index 173f2bf835..b18797f9e9 100644 --- a/common/util.h +++ b/common/util.h @@ -159,10 +159,11 @@ extern const char *getPlatformDescription(Platform id); * such low-level adapters as CGA or Hercules. */ enum RenderMode { - kRenderDefault = -1, + kRenderDefault = 0, kRenderEGA = 1, kRenderCGA = 2, - kRenderHerc = 3 + kRenderHercG = 3, + kRenderHercA = 4 }; enum HerculesDimesnions { diff --git a/gui/options.cpp b/gui/options.cpp index 41dbcae9ea..1c69f48efe 100644 --- a/gui/options.cpp +++ b/gui/options.cpp @@ -182,7 +182,7 @@ void OptionsDialog::close() { ConfMan.set("gfx_mode", _gfxPopUp->getSelectedString(), _domain); if ((int32)_renderModePopUp->getSelectedTag() >= 0) - ConfMan.set("render_mode", _renderModePopUp->getSelectedString(), _domain); + ConfMan.set("render_mode", Common::getRenderModeCode((Common::RenderMode)_renderModePopUp->getSelectedTag()), _domain); } else { ConfMan.removeKey("fullscreen", _domain); ConfMan.removeKey("aspect_ratio", _domain); @@ -303,7 +303,7 @@ int OptionsDialog::addGraphicControls(GuiObject *boss, int yoffset) { // RenderMode popup _renderModePopUp = new PopUpWidget(boss, x-5, yoffset, w+5, kLineHeight, "Render mode: ", 100); yoffset += 16; - _renderModePopUp->appendEntry("<default>"); + _renderModePopUp->appendEntry("<default>", Common::kRenderDefault); _renderModePopUp->appendEntry(""); const Common::RenderModeDescription *rm = Common::g_renderModes; for (; rm->code; ++rm) { diff --git a/scumm/charset.cpp b/scumm/charset.cpp index 818c1b16d4..52497aef14 100644 --- a/scumm/charset.cpp +++ b/scumm/charset.cpp @@ -1263,7 +1263,7 @@ void CharsetRenderer::translateColor() { _color = CGAtextColorMap[_color & 0x0f]; } - if (_vm->_renderMode == Common::kRenderHerc) { + if (_vm->_renderMode == Common::kRenderHercA || _vm->_renderMode == Common::kRenderHercG) { static byte HercTextColorMap[16] = {0, 15, 2, 15, 15, 5, 15, 15, 8, 15, 15, 15, 15, 15, 15, 15}; _color = HercTextColorMap[_color & 0x0f]; diff --git a/scumm/gfx.cpp b/scumm/gfx.cpp index f02372b1ff..790faffce2 100644 --- a/scumm/gfx.cpp +++ b/scumm/gfx.cpp @@ -232,7 +232,7 @@ void Gdi::init() { memset(_compositeBuf, CHARSET_MASK_TRANSPARENCY, size); memset(_textSurface.pixels, CHARSET_MASK_TRANSPARENCY, size); - if (_vm->_renderMode == Common::kRenderHerc) { + if (_vm->_renderMode == Common::kRenderHercA || _vm->_renderMode == Common::kRenderHercG) { _herculesBuf = (byte *)malloc(Common::kHercW * Common::kHercH); memset(_herculesBuf, CHARSET_MASK_TRANSPARENCY, Common::kHercW * Common::kHercH); } @@ -519,7 +519,7 @@ void Gdi::drawStripToScreen(VirtScreen *vs, int x, int width, int top, int botto if (_vm->_renderMode == Common::kRenderCGA) ditherCGA(_compositeBuf + x + y * _vm->_screenWidth, _vm->_screenWidth, x, y, width, height); - if (_vm->_renderMode == Common::kRenderHerc) { + if (_vm->_renderMode == Common::kRenderHercA || _vm->_renderMode == Common::kRenderHercG) { ditherHerc(_compositeBuf + x + y * _vm->_screenWidth, _herculesBuf, _vm->_screenWidth, &x, &y, &width, &height); // center image on the screen _vm->_system->copyRectToScreen(_herculesBuf + x + y * Common::kHercW, diff --git a/scumm/input.cpp b/scumm/input.cpp index d7d1f1c25c..ef5aa4bdb0 100644 --- a/scumm/input.cpp +++ b/scumm/input.cpp @@ -131,7 +131,7 @@ void ScummEngine::parseEvents() { _mouse.x = event.mouse.x; _mouse.y = event.mouse.y; - if (_renderMode == Common::kRenderHerc) { + if (_renderMode == Common::kRenderHercA || _renderMode == Common::kRenderHercG) { _mouse.x -= (Common::kHercW - _screenWidth * 2) / 2; _mouse.x /= 2; _mouse.y = _mouse.y * 4 / 7; diff --git a/scumm/palette.cpp b/scumm/palette.cpp index 9f0b0cd445..d6abd699f8 100644 --- a/scumm/palette.cpp +++ b/scumm/palette.cpp @@ -50,7 +50,11 @@ void ScummEngine::setupAmigaPalette() { void ScummEngine::setupHercPalette() { setPalColor( 0, 0, 0, 0); - setPalColor( 1, 0xAE, 0x69, 0x38); + + if (_renderMode == Common::kRenderHercA) + setPalColor( 1, 0xAE, 0x69, 0x38); + else + setPalColor( 1, 0x00, 0xFF, 0x00); // Setup cursor palette setPalColor( 7, 170, 170, 170); diff --git a/scumm/scumm.cpp b/scumm/scumm.cpp index 83d2d50a5a..8e49aed57f 100644 --- a/scumm/scumm.cpp +++ b/scumm/scumm.cpp @@ -1022,7 +1022,8 @@ ScummEngine::ScummEngine(GameDetector *detector, OSystem *syst, const ScummGameS _renderMode = Common::kRenderDefault; switch (_renderMode) { - case Common::kRenderHerc: + case Common::kRenderHercA: + case Common::kRenderHercG: if (_version > 2 && _gameId != GID_MONKEY_EGA) _renderMode = Common::kRenderDefault; break; @@ -1058,7 +1059,7 @@ ScummEngine::ScummEngine(GameDetector *detector, OSystem *syst, const ScummGameS } else if (_features & GF_NES) { _screenWidth = 256; _screenHeight = 240; - } else if (_renderMode == Common::kRenderHerc) { + } else if (_renderMode == Common::kRenderHercA || _renderMode == Common::kRenderHercG) { _features |= GF_DEFAULT_TO_1X_SCALER; _screenWidth = 320; _screenHeight = 200; @@ -1152,7 +1153,7 @@ int ScummEngine::init(GameDetector &detector) { // Initialize backend _system->beginGFXTransaction(); initCommonGFX(detector); - if (_renderMode == Common::kRenderHerc) { + if (_renderMode == Common::kRenderHercA || _renderMode == Common::kRenderHercG) { _system->initSize(Common::kHercW, Common::kHercH); _features |= GF_DEFAULT_TO_1X_SCALER; _system->setGraphicsMode("1x"); @@ -1317,7 +1318,7 @@ void ScummEngine::scummInit() { _shadowPalette[i] = i; if ((_features & GF_AMIGA) || (_features & GF_ATARI_ST)) setupAmigaPalette(); - else if (_renderMode == Common::kRenderHerc) + else if (_renderMode == Common::kRenderHercA || _renderMode == Common::kRenderHercG) setupHercPalette(); else if (_renderMode == Common::kRenderCGA) setupCGAPalette(); diff --git a/scumm/vars.cpp b/scumm/vars.cpp index 326739c339..0da5f29f44 100644 --- a/scumm/vars.cpp +++ b/scumm/vars.cpp @@ -560,7 +560,7 @@ void ScummEngine::initScummVars() { VAR(VAR_VIDEOMODE) = 82; else if (_renderMode == Common::kRenderCGA) VAR(VAR_VIDEOMODE) = 4; - else if (_renderMode == Common::kRenderHerc) + else if (_renderMode == Common::kRenderHercA || _renderMode == Common::kRenderHercG) VAR(VAR_VIDEOMODE) = 30; else if (_renderMode == Common::kRenderEGA) VAR(VAR_VIDEOMODE) = 13; |