diff options
author | Kari Salminen | 2007-06-20 22:54:51 +0000 |
---|---|---|
committer | Kari Salminen | 2007-06-20 22:54:51 +0000 |
commit | ae74b067561e72f2804b39eed0cc6279efc32580 (patch) | |
tree | b81160bfcbf711fdcf21ed051b625689e0dda6e8 /engines/agi/agi.cpp | |
parent | 9f1ec5cb7af887372e0ec75c1a668aa55000846f (diff) | |
download | scummvm-rg350-ae74b067561e72f2804b39eed0cc6279efc32580.tar.gz scummvm-rg350-ae74b067561e72f2804b39eed0cc6279efc32580.tar.bz2 scummvm-rg350-ae74b067561e72f2804b39eed0cc6279efc32580.zip |
Add an additional AGI screen for 256 color data (For use with AGI256 and AGI256-2).
svn-id: r27564
Diffstat (limited to 'engines/agi/agi.cpp')
-rw-r--r-- | engines/agi/agi.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/engines/agi/agi.cpp b/engines/agi/agi.cpp index a9f2696880..eebce5f841 100644 --- a/engines/agi/agi.cpp +++ b/engines/agi/agi.cpp @@ -412,6 +412,10 @@ int AgiEngine::agiInit() { if (getFeatures() & GF_AGDS) _game.gameFlags |= ID_AGDS; + // Make the 256 color AGI screen the default AGI screen when AGI256 or AGI256-2 is used + if (getFeatures() & (GF_AGI256 | GF_AGI256_2)) + _game.sbuf = _game.sbuf256c; + if (_game.gameFlags & ID_AMIGA) report("Amiga padded game detected.\n"); @@ -645,7 +649,10 @@ void AgiEngine::initialize() { _game.name[0] = '\0'; - _game.sbuf = (uint8 *)calloc(_WIDTH, _HEIGHT); + _game.sbufOrig = (uint8 *)calloc(_WIDTH, _HEIGHT * 2); // Allocate space for two AGI screens vertically + _game.sbuf16c = _game.sbufOrig + SBUF16_OFFSET; // Make sbuf16c point to the 16 color (+control line & priority info) AGI screen + _game.sbuf256c = _game.sbufOrig + SBUF256_OFFSET; // Make sbuf256c point to the 256 color AGI screen + _game.sbuf = _game.sbuf16c; // Make sbuf point to the 16 color (+control line & priority info) AGI screen by default _gfx->initVideo(); _sound->initSound(); @@ -673,7 +680,7 @@ AgiEngine::~AgiEngine() { delete _sound; _gfx->deinitVideo(); delete _sprites; - free(_game.sbuf); + free(_game.sbufOrig); _gfx->deinitMachine(); delete _rnd; delete _console; |