[Scummvm-git-logs] scummvm master -> ef75492ca66c468e8394ee7a5db1fe90e5934eab

mduggan noreply at scummvm.org
Sun Jul 14 01:55:05 UTC 2024


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
ef75492ca6 DGDS: Actually render talking heads


Commit: ef75492ca66c468e8394ee7a5db1fe90e5934eab
    https://github.com/scummvm/scummvm/commit/ef75492ca66c468e8394ee7a5db1fe90e5934eab
Author: Matthew Duggan (mgithub at guarana.org)
Date: 2024-07-14T11:54:55+10:00

Commit Message:
DGDS: Actually render talking heads

Changed paths:
    engines/dgds/dgds.cpp
    engines/dgds/scene.cpp


diff --git a/engines/dgds/dgds.cpp b/engines/dgds/dgds.cpp
index 436c509fa27..903deb1f434 100644
--- a/engines/dgds/dgds.cpp
+++ b/engines/dgds/dgds.cpp
@@ -618,6 +618,7 @@ Common::Error DgdsEngine::run() {
 		bool haveActiveDialog = _scene->checkDialogActive();
 
 		_scene->drawAndUpdateDialogs(&_compositionBuffer);
+		_scene->drawVisibleHeads(&_compositionBuffer);
 
 		bool gameRunning = (!haveActiveDialog && _gameGlobals->getGlobal(0x57) /* TODO: && _dragItem == nullptr*/);
 		_clock.update(gameRunning);
diff --git a/engines/dgds/scene.cpp b/engines/dgds/scene.cpp
index e5065bbfcc3..5ea026e436a 100644
--- a/engines/dgds/scene.cpp
+++ b/engines/dgds/scene.cpp
@@ -1164,6 +1164,10 @@ bool SDSScene::loadTalkData(uint16 num) {
 			result = readTalkData(stream, _talkData.front());
 			_talkData.front()._num = num;
 			_version = oldVer;
+
+			Image *img = new Image(resourceManager, decompressor);
+			img->loadBitmap(_talkData.front()._bmpFile);
+			_talkData.front()._shape.reset(img);
 		}
 	}
 
@@ -1193,6 +1197,8 @@ void SDSScene::updateVisibleTalkers() {
 
 void SDSScene::drawHead(Graphics::ManagedSurface *dst, const TalkData &data, const TalkDataHead &head) {
 	uint drawtype = head._drawType ? head._drawType : 1;
+	if (!data._shape)
+		return;
 	switch (drawtype) {
 	case 1:
 		drawHeadType1(dst, head, *data._shape);




More information about the Scummvm-git-logs mailing list