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

aquadran noreply at scummvm.org
Sat Jul 2 20:57:18 UTC 2022


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:
fde993bdf5 WINTERMUTE: WME3D: Restore original missing opcode for shadow image


Commit: fde993bdf58bf16c4122a328e2f74c265cdf6e1a
    https://github.com/scummvm/scummvm/commit/fde993bdf58bf16c4122a328e2f74c265cdf6e1a
Author: Paweł Kołodziejski (aquadran at gmail.com)
Date: 2022-07-02T22:57:14+02:00

Commit Message:
WINTERMUTE: WME3D: Restore original missing opcode for shadow image

Changed paths:
    engines/wintermute/base/base_game.cpp


diff --git a/engines/wintermute/base/base_game.cpp b/engines/wintermute/base/base_game.cpp
index b083db99312..9481feb9ec6 100644
--- a/engines/wintermute/base/base_game.cpp
+++ b/engines/wintermute/base/base_game.cpp
@@ -358,6 +358,11 @@ bool BaseGame::cleanup() {
 	_fontStorage->removeFont(_videoFont);
 	_videoFont = nullptr;
 
+	if (_shadowImage) {
+		_surfaceStorage->removeSurface(_shadowImage);
+		_shadowImage = nullptr;
+	}
+
 	for (uint32 i = 0; i < _quickMessages.size(); i++) {
 		delete _quickMessages[i];
 	}
@@ -794,6 +799,9 @@ TOKEN_DEF(SAVE_IMAGE)
 TOKEN_DEF(LOAD_IMAGE_X)
 TOKEN_DEF(LOAD_IMAGE_Y)
 TOKEN_DEF(LOAD_IMAGE)
+#ifdef ENABLE_WME3D
+TOKEN_DEF(SHADOW_IMAGE)
+#endif
 TOKEN_DEF(LOCAL_SAVE_DIR)
 TOKEN_DEF(RICH_SAVED_GAMES)
 TOKEN_DEF(SAVED_GAME_EXT)
@@ -833,6 +841,9 @@ bool BaseGame::loadBuffer(char *buffer, bool complete) {
 	TOKEN_TABLE(LOAD_IMAGE_X)
 	TOKEN_TABLE(LOAD_IMAGE_Y)
 	TOKEN_TABLE(LOAD_IMAGE)
+#ifdef ENABLE_WME3D
+	TOKEN_TABLE(SHADOW_IMAGE)
+#endif
 	TOKEN_TABLE(LOCAL_SAVE_DIR)
 	TOKEN_TABLE(COMPAT_KILL_METHOD_THREADS)
 	TOKEN_TABLE_END
@@ -898,6 +909,17 @@ bool BaseGame::loadBuffer(char *buffer, bool complete) {
 			break;
 
 
+#ifdef ENABLE_WME3D
+		case TOKEN_SHADOW_IMAGE:
+			if (_shadowImage) {
+				_surfaceStorage->removeSurface(_shadowImage);
+			}
+			_shadowImage = nullptr;
+
+			_shadowImage = _gameRef->_surfaceStorage->addSurface(params);
+			break;
+#endif
+
 		case TOKEN_CURSOR:
 			delete _cursor;
 			_cursor = new BaseSprite(_gameRef);
@@ -1033,7 +1055,9 @@ bool BaseGame::loadBuffer(char *buffer, bool complete) {
 	if (!_systemFont) {
 		_systemFont = _gameRef->_fontStorage->addFont("system_font.fnt");
 	}
-
+	if (!_shadowImage) {
+		_shadowImage = _gameRef->_surfaceStorage->addSurface("shadow.png");
+	}
 
 	if (cmd == PARSERR_TOKENNOTFOUND) {
 		_gameRef->LOG(0, "Syntax error in GAME definition");




More information about the Scummvm-git-logs mailing list