diff options
author | Sven Hesse | 2011-02-02 16:48:04 +0000 |
---|---|---|
committer | Sven Hesse | 2011-02-02 16:48:04 +0000 |
commit | 076b9c9e534a1c83969a44d6893e56deffb4b6c1 (patch) | |
tree | 7e9fdca9f6e38c18f9fe0de2e2e5a267b48838dc /engines/gob | |
parent | e6f2f7e615ded18db50b878ac6cbe27b318d0218 (diff) | |
download | scummvm-rg350-076b9c9e534a1c83969a44d6893e56deffb4b6c1.tar.gz scummvm-rg350-076b9c9e534a1c83969a44d6893e56deffb4b6c1.tar.bz2 scummvm-rg350-076b9c9e534a1c83969a44d6893e56deffb4b6c1.zip |
GOB: Remove the vidMode parameter from Video::initSurfDesc
svn-id: r55727
Diffstat (limited to 'engines/gob')
-rw-r--r-- | engines/gob/draw.cpp | 3 | ||||
-rw-r--r-- | engines/gob/draw_fascin.cpp | 6 | ||||
-rw-r--r-- | engines/gob/draw_v1.cpp | 8 | ||||
-rw-r--r-- | engines/gob/draw_v2.cpp | 3 | ||||
-rw-r--r-- | engines/gob/init_v1.cpp | 3 | ||||
-rw-r--r-- | engines/gob/init_v2.cpp | 7 | ||||
-rw-r--r-- | engines/gob/inter_bargon.cpp | 2 | ||||
-rw-r--r-- | engines/gob/inter_v1.cpp | 5 | ||||
-rw-r--r-- | engines/gob/mult_v1.cpp | 3 | ||||
-rw-r--r-- | engines/gob/video.cpp | 6 | ||||
-rw-r--r-- | engines/gob/video.h | 3 | ||||
-rw-r--r-- | engines/gob/videoplayer.cpp | 3 |
12 files changed, 19 insertions, 33 deletions
diff --git a/engines/gob/draw.cpp b/engines/gob/draw.cpp index d9cd3fd83b..1f73e76497 100644 --- a/engines/gob/draw.cpp +++ b/engines/gob/draw.cpp @@ -327,8 +327,7 @@ void Draw::dirtiedRect(SurfacePtr surface, void Draw::initSpriteSurf(int16 index, int16 width, int16 height, int16 flags) { - _spritesArray[index] = - _vm->_video->initSurfDesc(_vm->_global->_videoMode, width, height, flags); + _spritesArray[index] = _vm->_video->initSurfDesc(width, height, flags); _spritesArray[index]->clear(); } diff --git a/engines/gob/draw_fascin.cpp b/engines/gob/draw_fascin.cpp index f83432df96..032a79c6cd 100644 --- a/engines/gob/draw_fascin.cpp +++ b/engines/gob/draw_fascin.cpp @@ -485,7 +485,7 @@ void Draw_Fascination::drawWin(int16 fct) { } if (found) { - tempSrf = _vm->_video->initSurfDesc(_vm->_global->_videoMode, width - left + 1, height - top + 1, 0); + tempSrf = _vm->_video->initSurfDesc(width - left + 1, height - top + 1, 0); tempSrf->blit(*_backSurface, left, top, width, height, 0, 0); int max = 0; @@ -739,7 +739,7 @@ int16 Draw_Fascination::openWin(int16 id) { _fascinWin[id].width = VAR((_winVarArrayWidth / 4) + id); _fascinWin[id].height = VAR((_winVarArrayHeight / 4) + id); - _fascinWin[id].savedSurface = _vm->_video->initSurfDesc(_vm->_global->_videoMode, _winMaxWidth + 7, _winMaxHeight, 0); + _fascinWin[id].savedSurface = _vm->_video->initSurfDesc(_winMaxWidth + 7, _winMaxHeight, 0); saveWin(id); WRITE_VAR((_winVarArrayStatus / 4) + id, VAR((_winVarArrayStatus / 4) + id) & 0xFFFFFFFE); @@ -961,7 +961,7 @@ void Draw_Fascination::activeWin(int16 id) { } } - tempSrf = _vm->_video->initSurfDesc(_vm->_global->_videoMode, _winMaxWidth + 7, _winMaxHeight, 0); + tempSrf = _vm->_video->initSurfDesc(_winMaxWidth + 7, _winMaxHeight, 0); tempSrf->blit(*_backSurface, _fascinWin[id].left, _fascinWin[id].top, _fascinWin[id].left + _fascinWin[id].width - 1, diff --git a/engines/gob/draw_v1.cpp b/engines/gob/draw_v1.cpp index e528b6ad86..2a70110eeb 100644 --- a/engines/gob/draw_v1.cpp +++ b/engines/gob/draw_v1.cpp @@ -44,13 +44,11 @@ Draw_v1::Draw_v1(GobEngine *vm) : Draw(vm) { } void Draw_v1::initScreen() { - _backSurface = _vm->_video->initSurfDesc(_vm->_global->_videoMode, 320, 200, 0); + _backSurface = _vm->_video->initSurfDesc(320, 200, 0); _frontSurface = _vm->_global->_primarySurfDesc; - _cursorSprites = - _vm->_video->initSurfDesc(_vm->_global->_videoMode, 32, 16, 2); - _scummvmCursor = - _vm->_video->initSurfDesc(_vm->_global->_videoMode, 16, 16, SCUMMVM_CURSOR); + _cursorSprites = _vm->_video->initSurfDesc(32, 16, 2); + _scummvmCursor = _vm->_video->initSurfDesc(16, 16, SCUMMVM_CURSOR); } void Draw_v1::closeScreen() { diff --git a/engines/gob/draw_v2.cpp b/engines/gob/draw_v2.cpp index 5eb6780468..15a8f7ff8e 100644 --- a/engines/gob/draw_v2.cpp +++ b/engines/gob/draw_v2.cpp @@ -59,8 +59,7 @@ void Draw_v2::initScreen() { initSpriteSurf(kCursorSurface, 32, 16, 2); _cursorSpritesBack = _spritesArray[kCursorSurface]; _cursorSprites = _cursorSpritesBack; - _scummvmCursor = - _vm->_video->initSurfDesc(_vm->_global->_videoMode, 16, 16, SCUMMVM_CURSOR); + _scummvmCursor = _vm->_video->initSurfDesc(16, 16, SCUMMVM_CURSOR); } _spritesArray[kFrontSurface] = _frontSurface; diff --git a/engines/gob/init_v1.cpp b/engines/gob/init_v1.cpp index 50db774734..af09626fe7 100644 --- a/engines/gob/init_v1.cpp +++ b/engines/gob/init_v1.cpp @@ -54,8 +54,7 @@ void Init_v1::initVideo() { _vm->_global->_pPaletteDesc->unused1 = _vm->_global->_unusedPalette1; _vm->_global->_pPaletteDesc->unused2 = _vm->_global->_unusedPalette2; - if (_vm->_global->_videoMode != 0) - _vm->_video->initSurfDesc(_vm->_global->_videoMode, 320, 200, PRIMARY_SURFACE); + _vm->_video->initSurfDesc(320, 200, PRIMARY_SURFACE); } } // End of namespace Gob diff --git a/engines/gob/init_v2.cpp b/engines/gob/init_v2.cpp index f89d5a8cfb..78be68d48c 100644 --- a/engines/gob/init_v2.cpp +++ b/engines/gob/init_v2.cpp @@ -44,8 +44,7 @@ void Init_v2::initVideo() { _vm->validateVideoMode(_vm->_global->_videoMode); _vm->_draw->_frontSurface = _vm->_global->_primarySurfDesc; - _vm->_video->initSurfDesc(_vm->_global->_videoMode, - _vm->_video->_surfWidth, _vm->_video->_surfHeight, PRIMARY_SURFACE); + _vm->_video->initSurfDesc(_vm->_video->_surfWidth, _vm->_video->_surfHeight, PRIMARY_SURFACE); _vm->_global->_mousePresent = 1; @@ -65,9 +64,7 @@ void Init_v2::initVideo() { _vm->_global->_pPaletteDesc->unused1 = _vm->_global->_unusedPalette1; _vm->_global->_pPaletteDesc->unused2 = _vm->_global->_unusedPalette2; - if (_vm->_global->_videoMode != 0) - _vm->_video->initSurfDesc(_vm->_global->_videoMode, _vm->_video->_surfWidth, - _vm->_video->_surfHeight, PRIMARY_SURFACE); + _vm->_video->initSurfDesc(_vm->_video->_surfWidth, _vm->_video->_surfHeight, PRIMARY_SURFACE); } } // End of namespace Gob diff --git a/engines/gob/inter_bargon.cpp b/engines/gob/inter_bargon.cpp index 5ed24c614e..9b26329bde 100644 --- a/engines/gob/inter_bargon.cpp +++ b/engines/gob/inter_bargon.cpp @@ -125,7 +125,7 @@ void Inter_Bargon::oBargon_intro2(OpGobParams ¶ms) { int16 comp[5] = { 0, 1, 2, 3, -1 }; static const char *sndFiles[] = {"1INTROII.snd", "2INTROII.snd", "1INTRO3.snd", "2INTRO3.snd"}; - surface = _vm->_video->initSurfDesc(_vm->_global->_videoMode, 320, 200, 0); + surface = _vm->_video->initSurfDesc(320, 200, 0); _vm->_video->drawPackedSprite("2ille.ims", *surface); _vm->_draw->_frontSurface->blit(*surface, 0, 0, 319, 199, 0, 0); _vm->_video->drawPackedSprite("2ille4.ims", *surface); diff --git a/engines/gob/inter_v1.cpp b/engines/gob/inter_v1.cpp index b8fb90034e..262fdc8045 100644 --- a/engines/gob/inter_v1.cpp +++ b/engines/gob/inter_v1.cpp @@ -351,9 +351,8 @@ void Inter_v1::o1_initCursor() { _vm->_draw->_cursorSprites = _vm->_draw->_cursorSpritesBack; _vm->_draw->_scummvmCursor = - _vm->_video->initSurfDesc(_vm->_global->_videoMode, - _vm->_draw->_cursorWidth, _vm->_draw->_cursorHeight, - SCUMMVM_CURSOR); + _vm->_video->initSurfDesc(_vm->_draw->_cursorWidth, + _vm->_draw->_cursorHeight, SCUMMVM_CURSOR); for (int i = 0; i < 40; i++) { _vm->_draw->_cursorAnimLow[i] = -1; diff --git a/engines/gob/mult_v1.cpp b/engines/gob/mult_v1.cpp index 4be0a49b45..165953f42b 100644 --- a/engines/gob/mult_v1.cpp +++ b/engines/gob/mult_v1.cpp @@ -316,8 +316,7 @@ void Mult_v1::playMultInit() { multObj.lastBottom = -1; } - _animSurf = _vm->_video->initSurfDesc(_vm->_global->_videoMode, - 320, 200, 0); + _animSurf = _vm->_video->initSurfDesc(320, 200, 0); _vm->_draw->_spritesArray[Draw::kAnimSurface] = _animSurf; _animSurf->blit(*_vm->_draw->_backSurface, 0, 0, 319, 199, 0, 0); diff --git a/engines/gob/video.cpp b/engines/gob/video.cpp index 28550b2f56..7b7295f25c 100644 --- a/engines/gob/video.cpp +++ b/engines/gob/video.cpp @@ -185,21 +185,19 @@ void Video::initPrimary(int16 mode) { _vm->_global->_oldMode = mode; if (mode != 3) { - initSurfDesc(mode, _surfWidth, _surfHeight, PRIMARY_SURFACE); + initSurfDesc(_surfWidth, _surfHeight, PRIMARY_SURFACE); if (!_vm->_global->_dontSetPalette) Video::setFullPalette(_vm->_global->_pPaletteDesc); } } -SurfacePtr Video::initSurfDesc(int16 vidMode, int16 width, int16 height, int16 flags) { +SurfacePtr Video::initSurfDesc(int16 width, int16 height, int16 flags) { SurfacePtr descPtr; if (flags & PRIMARY_SURFACE) assert((width == _surfWidth) && (height == _surfHeight)); - _vm->validateVideoMode(vidMode); - if (flags & PRIMARY_SURFACE) { _vm->_global->_primaryWidth = width; _vm->_global->_primaryHeight = height; diff --git a/engines/gob/video.h b/engines/gob/video.h index d4db72a54c..834582e026 100644 --- a/engines/gob/video.h +++ b/engines/gob/video.h @@ -108,8 +108,7 @@ public: int16 _screenDeltaY; void initPrimary(int16 mode); - SurfacePtr initSurfDesc(int16 vidMode, int16 width, - int16 height, int16 flags); + SurfacePtr initSurfDesc(int16 width, int16 height, int16 flags); void setSize(bool defaultTo1XScaler); diff --git a/engines/gob/videoplayer.cpp b/engines/gob/videoplayer.cpp index 72df4dca4f..88ca953474 100644 --- a/engines/gob/videoplayer.cpp +++ b/engines/gob/videoplayer.cpp @@ -158,8 +158,7 @@ int VideoPlayer::openVideo(bool primary, const Common::String &file, Properties if (ownSurf) { _vm->_draw->_spritesArray[properties.sprite] = - _vm->_video->initSurfDesc(_vm->_global->_videoMode, - screenSize ? _vm->_width : video->decoder->getWidth(), + _vm->_video->initSurfDesc(screenSize ? _vm->_width : video->decoder->getWidth(), screenSize ? _vm->_height : video->decoder->getHeight(), 0); } |