[Scummvm-git-logs] scummvm master -> 0ad57d3c09fb21c5e2482c1eda51c03e349c39be
sdelamarre
noreply at scummvm.org
Fri Dec 16 21:27:44 UTC 2022
This automated email contains information about 3 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
353ae46508 GOB: add "ADIBODEM" (Adibou2 demo) directory in the search path
e79da632b6 GOB: fix the intro being skipped in some Adibou2 versions
0ad57d3c09 GOB: fix a black screen after the paint game in some Adibou2 versions
Commit: 353ae46508b21a23cb895f5aea115e08ce05160f
https://github.com/scummvm/scummvm/commit/353ae46508b21a23cb895f5aea115e08ce05160f
Author: Simon Delamarre (simon.delamarre14 at gmail.com)
Date: 2022-12-16T17:03:28+01:00
Commit Message:
GOB: add "ADIBODEM" (Adibou2 demo) directory in the search path
Changed paths:
engines/gob/init_v7.cpp
diff --git a/engines/gob/init_v7.cpp b/engines/gob/init_v7.cpp
index 0e3968cffa8..9076ca09aab 100644
--- a/engines/gob/init_v7.cpp
+++ b/engines/gob/init_v7.cpp
@@ -41,6 +41,9 @@ void Init_v7::initGame() {
// Add the application list directory
SearchMan.addSubDirectoryMatching(gameDataDir, "applis");
+ // Add the "ADIBODEM" directory sometimes found in demos
+ SearchMan.addSubDirectoryMatching(gameDataDir, "adibodem");
+
// Add additional applications directories (e.g. "Read/Count 4-5 years").
// We rely on the presence of an "intro_ap.itk" to determinate whether a subdirectory contains an applcation.
Common::FSList subdirs;
Commit: e79da632b6a7469aa902e14f05b477a333007710
https://github.com/scummvm/scummvm/commit/e79da632b6a7469aa902e14f05b477a333007710
Author: Simon Delamarre (simon.delamarre14 at gmail.com)
Date: 2022-12-16T22:27:08+01:00
Commit Message:
GOB: fix the intro being skipped in some Adibou2 versions
Changed paths:
engines/gob/inter_v7.cpp
diff --git a/engines/gob/inter_v7.cpp b/engines/gob/inter_v7.cpp
index c4ff100f538..ab916d5c7e7 100644
--- a/engines/gob/inter_v7.cpp
+++ b/engines/gob/inter_v7.cpp
@@ -594,6 +594,16 @@ void Inter_v7::o7_playVmdOrMusic() {
bool close = false;
if (props.lastFrame == -1) {
close = true;
+ } else if (props.lastFrame == -2) {
+ // TODO: when props.lastFrame == -2, the VMD seems to be loaded/played in two steps.
+ // First o7_playVmdOrMusic is called with props.firstFrame == -2, then later with
+ // props.firstFrame == -1.
+ // We simply ignore the first step for now, and play the whole video in the second step.
+ if (props.startFrame == -2)
+ return;
+
+ props.startFrame = 0;
+ props.lastFrame = -1;
} else if (props.lastFrame == -3) {
if (file.empty()) {
Commit: 0ad57d3c09fb21c5e2482c1eda51c03e349c39be
https://github.com/scummvm/scummvm/commit/0ad57d3c09fb21c5e2482c1eda51c03e349c39be
Author: Simon Delamarre (simon.delamarre14 at gmail.com)
Date: 2022-12-16T22:27:08+01:00
Commit Message:
GOB: fix a black screen after the paint game in some Adibou2 versions
Related to a weird video mode ("0x18"), in which some surfaces must not be reset when re-calling the initScreen() opcode.
Changed paths:
engines/gob/draw.h
engines/gob/draw_v7.cpp
engines/gob/inter_v7.cpp
diff --git a/engines/gob/draw.h b/engines/gob/draw.h
index 41a9acb21b4..d2f7aa4baa6 100644
--- a/engines/gob/draw.h
+++ b/engines/gob/draw.h
@@ -312,6 +312,8 @@ class Draw_v7 : public Draw_Playtoons {
public:
Draw_v7(GobEngine *vm);
~Draw_v7() override;
+
+ void initScreen() override;
void animateCursor(int16 cursor) override;
diff --git a/engines/gob/draw_v7.cpp b/engines/gob/draw_v7.cpp
index 762ab1e01ca..0fa7acad7ec 100644
--- a/engines/gob/draw_v7.cpp
+++ b/engines/gob/draw_v7.cpp
@@ -106,6 +106,32 @@ bool Draw_v7::loadCursorFromFile(int cursorIndex) {
return true;
}
+void Draw_v7::initScreen()
+{
+ _vm->_game->_preventScroll = false;
+
+ _scrollOffsetX = 0;
+ _scrollOffsetY = 0;
+
+ if (!_spritesArray[kBackSurface] || _vm->_global->_videoMode != 0x18) {
+ initSpriteSurf(kBackSurface, _vm->_video->_surfWidth, _vm->_video->_surfHeight, 0);
+ _backSurface = _spritesArray[kBackSurface];
+ _backSurface->clear();
+ }
+
+ if (!_spritesArray[kCursorSurface]) {
+ initSpriteSurf(kCursorSurface, 32, 16, 2);
+ _cursorSpritesBack = _spritesArray[kCursorSurface];
+ _cursorSprites = _cursorSpritesBack;
+ _scummvmCursor = _vm->_video->initSurfDesc(16, 16, SCUMMVM_CURSOR);
+ }
+
+ _spritesArray[kFrontSurface] = _frontSurface;
+ _spritesArray[kBackSurface ] = _backSurface;
+
+ _vm->_video->dirtyRectsAll();
+}
+
void Draw_v7::animateCursor(int16 cursor) {
if (!_cursorSprites)
return;
diff --git a/engines/gob/inter_v7.cpp b/engines/gob/inter_v7.cpp
index ab916d5c7e7..aa88f7059f6 100644
--- a/engines/gob/inter_v7.cpp
+++ b/engines/gob/inter_v7.cpp
@@ -485,7 +485,8 @@ void Inter_v7::o7_initScreen() {
if (videoMode == 0)
videoMode = 0x14;
- _vm->_video->clearScreen();
+ if (videoMode != 0x18)
+ _vm->_video->clearScreen();
if (videoMode == 0x13) {
@@ -540,25 +541,30 @@ void Inter_v7::o7_initScreen() {
_vm->_global->_mouseMaxY = (_vm->_video->_surfHeight + _vm->_video->_screenDeltaY) - offY - 1;
_vm->_global->_mouseMinY = _vm->_video->_screenDeltaY;
- _vm->_draw->closeScreen();
- _vm->_util->clearPalette();
- memset(_vm->_global->_redPalette, 0, 256);
- memset(_vm->_global->_greenPalette, 0, 256);
- memset(_vm->_global->_bluePalette, 0, 256);
-
- _vm->_video->_splitSurf.reset();
- _vm->_draw->_spritesArray[24].reset();
- _vm->_draw->_spritesArray[25].reset();
+ if (videoMode != 0x18)
+ {
+ _vm->_draw->closeScreen();
+ _vm->_util->clearPalette();
+ memset(_vm->_global->_redPalette, 0, 256);
+ memset(_vm->_global->_greenPalette, 0, 256);
+ memset(_vm->_global->_bluePalette, 0, 256);
+ _vm->_video->_splitSurf.reset();
+ _vm->_draw->_spritesArray[24].reset();
+ _vm->_draw->_spritesArray[25].reset();
+ }
_vm->_global->_videoMode = videoMode;
- _vm->_video->initPrimary(videoMode);
+ if (videoMode != 0x18)
+ _vm->_video->initPrimary(videoMode);
WRITE_VAR(15, _vm->_global->_fakeVideoMode);
_vm->_global->_setAllPalette = true;
_vm->_util->setMousePos(_vm->_global->_inter_mouseX,
_vm->_global->_inter_mouseY);
- _vm->_util->clearPalette();
+
+ if (videoMode != 0x18)
+ _vm->_util->clearPalette();
_vm->_draw->initScreen();
More information about the Scummvm-git-logs
mailing list