aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/gob/draw.cpp3
-rw-r--r--engines/gob/draw_fascin.cpp6
-rw-r--r--engines/gob/draw_v1.cpp8
-rw-r--r--engines/gob/draw_v2.cpp3
-rw-r--r--engines/gob/init_v1.cpp3
-rw-r--r--engines/gob/init_v2.cpp7
-rw-r--r--engines/gob/inter_bargon.cpp2
-rw-r--r--engines/gob/inter_v1.cpp5
-rw-r--r--engines/gob/mult_v1.cpp3
-rw-r--r--engines/gob/video.cpp6
-rw-r--r--engines/gob/video.h3
-rw-r--r--engines/gob/videoplayer.cpp3
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 &params) {
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);
}