diff options
-rw-r--r-- | common/util.h | 5 | ||||
-rw-r--r-- | engines/scumm/gfx.cpp | 10 | ||||
-rw-r--r-- | engines/scumm/gfx.h | 5 | ||||
-rw-r--r-- | engines/scumm/input.cpp | 2 | ||||
-rw-r--r-- | engines/scumm/scumm.cpp | 4 |
5 files changed, 13 insertions, 13 deletions
diff --git a/common/util.h b/common/util.h index 5837c8beab..cd890c970f 100644 --- a/common/util.h +++ b/common/util.h @@ -208,11 +208,6 @@ enum RenderMode { kRenderAmiga = 5 }; -enum HerculesDimensions { - kHercW = 720, - kHercH = 350 -}; - struct RenderModeDescription { const char *code; const char *description; diff --git a/engines/scumm/gfx.cpp b/engines/scumm/gfx.cpp index 2b0ded1c0a..f22547f193 100644 --- a/engines/scumm/gfx.cpp +++ b/engines/scumm/gfx.cpp @@ -722,11 +722,11 @@ void ScummEngine::drawStripToScreen(VirtScreen *vs, int x, int width, int top, i if (_renderMode == Common::kRenderHercA || _renderMode == Common::kRenderHercG) { ditherHerc(_compositeBuf, _herculesBuf, width, &x, &y, &width, &height); - src = _herculesBuf + x + y * Common::kHercW; - pitch = Common::kHercW; + src = _herculesBuf + x + y * kHercWidth; + pitch = kHercWidth; // center image on the screen - x += (Common::kHercW - _screenWidth * 2) / 2; // (720 - 320*2)/2 = 40 + x += (kHercWidth - _screenWidth * 2) / 2; // (720 - 320*2)/2 = 40 } else if (_useCJKMode && m == 2) { pitch *= m; x *= m; @@ -819,10 +819,10 @@ void ditherHerc(byte *src, byte *hercbuf, int srcPitch, int *x, int *y, int *wid int dsty = yo*2 - yo/4; for (int y1 = 0; y1 < heighto;) { - assert(dsty < Common::kHercH); + assert(dsty < kHercHeight); srcptr = src + y1 * srcPitch; - dstptr = hercbuf + dsty * Common::kHercW + xo * 2; + dstptr = hercbuf + dsty * kHercWidth + xo * 2; const int idx1 = (dsty % 7) % 2; for (int x1 = 0; x1 < widtho; x1++) { diff --git a/engines/scumm/gfx.h b/engines/scumm/gfx.h index af75a98731..4b44ddc376 100644 --- a/engines/scumm/gfx.h +++ b/engines/scumm/gfx.h @@ -32,6 +32,11 @@ namespace Scumm { class ScummEngine; +enum HerculesDimensions { + kHercWidth = 720, + kHercHeight = 350 +}; + /** Camera modes */ enum { kNormalCameraMode = 1, diff --git a/engines/scumm/input.cpp b/engines/scumm/input.cpp index 07c52578c3..5eea7acc6b 100644 --- a/engines/scumm/input.cpp +++ b/engines/scumm/input.cpp @@ -181,7 +181,7 @@ void ScummEngine::parseEvent(Common::Event event) { _mouse.y = event.mouse.y; if (_renderMode == Common::kRenderHercA || _renderMode == Common::kRenderHercG) { - _mouse.x -= (Common::kHercW - _screenWidth * 2) / 2; + _mouse.x -= (kHercWidth - _screenWidth * 2) / 2; _mouse.x >>= 1; _mouse.y = _mouse.y * 4 / 7; } else if (_useCJKMode && _textSurfaceMultiplier == 2) { diff --git a/engines/scumm/scumm.cpp b/engines/scumm/scumm.cpp index ed5537f409..7b136dc36d 100644 --- a/engines/scumm/scumm.cpp +++ b/engines/scumm/scumm.cpp @@ -564,7 +564,7 @@ ScummEngine::ScummEngine(OSystem *syst, const DetectorResult &dr) _herculesBuf = 0; if (_renderMode == Common::kRenderHercA || _renderMode == Common::kRenderHercG) { - _herculesBuf = (byte *)malloc(Common::kHercW * Common::kHercH); + _herculesBuf = (byte *)malloc(kHercWidth * kHercHeight); } // Add debug levels @@ -1140,7 +1140,7 @@ Common::Error ScummEngine::init() { // Initialize backend if (_renderMode == Common::kRenderHercA || _renderMode == Common::kRenderHercG) { - initGraphics(Common::kHercW, Common::kHercH, true); + initGraphics(kHercWidth, kHercHeight, true); } else { int screenWidth = _screenWidth; int screenHeight = _screenHeight; |