aboutsummaryrefslogtreecommitdiff
path: root/engines/kyra/kyra_rpg.cpp
diff options
context:
space:
mode:
authorathrxx2012-02-21 21:14:28 +0100
committerathrxx2012-02-21 21:48:46 +0100
commit66da4777d476c6a9fc2a13351e3b30afc748fd94 (patch)
treee501a86f10aa7f1a39420d08a529f492c7abe95c /engines/kyra/kyra_rpg.cpp
parent3c1e2686b8e8ad36f1cdc3bb2afebd7f9de72845 (diff)
downloadscummvm-rg350-66da4777d476c6a9fc2a13351e3b30afc748fd94.tar.gz
scummvm-rg350-66da4777d476c6a9fc2a13351e3b30afc748fd94.tar.bz2
scummvm-rg350-66da4777d476c6a9fc2a13351e3b30afc748fd94.zip
KYRA: (EOB) - implement EGA mode (hi res dithering) for EOB II
(also fix various thing connected to CGA/EGA modes)
Diffstat (limited to 'engines/kyra/kyra_rpg.cpp')
-rw-r--r--engines/kyra/kyra_rpg.cpp17
1 files changed, 14 insertions, 3 deletions
diff --git a/engines/kyra/kyra_rpg.cpp b/engines/kyra/kyra_rpg.cpp
index 1e3890b124..121731e394 100644
--- a/engines/kyra/kyra_rpg.cpp
+++ b/engines/kyra/kyra_rpg.cpp
@@ -41,13 +41,17 @@ KyraRpgEngine::KyraRpgEngine(OSystem *system, const GameFlags &flags) : KyraEngi
_currentLevel = 0;
- _vmpPtr = 0;
_vcnBlocks = 0;
_vcfBlocks = 0;
_vcnTransitionMask = 0;
_vcnShift = 0;
_vcnColTable = 0;
+ _vcnBlockWidth = 4;
+ _vcnBlockHeight = 8;
+ _vcnFlip0 = 0;
+ _vcnFlip1 = 1;
_vmpPtr = 0;
+ _vmpSize = 0;
_blockBrightness = _wllVcnOffset = 0;
_blockDrawingBuffer = 0;
_sceneWindowBuffer = 0;
@@ -167,10 +171,17 @@ Common::Error KyraRpgEngine::init() {
_wllWallFlags = new uint8[256];
memset(_wllWallFlags, 0, 256);
+ if (_flags.gameID == GI_EOB2 && _configRenderMode == Common::kRenderEGA) {
+ _vcnBlockWidth <<= 1;
+ _vcnBlockHeight <<= 1;
+ SWAP(_vcnFlip0, _vcnFlip1);
+ }
+
_blockDrawingBuffer = new uint16[1320];
memset(_blockDrawingBuffer, 0, 1320 * sizeof(uint16));
- _sceneWindowBuffer = new uint8[21120];
- memset(_sceneWindowBuffer, 0, 21120);
+ uint32 swbSize = 22 * _vcnBlockWidth * 2 * 15 * _vcnBlockHeight;
+ _sceneWindowBuffer = new uint8[swbSize];
+ memset(_sceneWindowBuffer, 0, swbSize);
_lvlShapeTop = new int16[18];
memset(_lvlShapeTop, 0, 18 * sizeof(int16));