aboutsummaryrefslogtreecommitdiff
path: root/scumm
diff options
context:
space:
mode:
authorEugene Sandulenko2005-03-02 21:46:51 +0000
committerEugene Sandulenko2005-03-02 21:46:51 +0000
commit50f6eb740c488532e78f031f9e8b18f672fdff93 (patch)
treeb446fbc4152a3ef45dbd96c4c7298a31fa22fecf /scumm
parent7a2a4f34dc823f04f3635fd57aaa3a23a859e563 (diff)
downloadscummvm-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
Diffstat (limited to 'scumm')
-rw-r--r--scumm/charset.cpp2
-rw-r--r--scumm/gfx.cpp4
-rw-r--r--scumm/input.cpp2
-rw-r--r--scumm/palette.cpp6
-rw-r--r--scumm/scumm.cpp9
-rw-r--r--scumm/vars.cpp2
6 files changed, 15 insertions, 10 deletions
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;