[Scummvm-git-logs] scummvm master -> 3b005ac8903507d47b13add8ae851c96448795ae

bgK bastien.bouclet at gmail.com
Wed Mar 18 19:41:51 UTC 2020


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

Summary:
366793db22 MOHAWK: RIVEN: Optimize image decoding
3b005ac890 MOHAWK: RIVEN: Refresh cursor on mouse-down


Commit: 366793db22b61af0bfcb6cf8dde17f4079f7a923
    https://github.com/scummvm/scummvm/commit/366793db22b61af0bfcb6cf8dde17f4079f7a923
Author: Michael Ball (ballm4788 at gmail.com)
Date: 2020-03-18T20:40:32+01:00

Commit Message:
MOHAWK: RIVEN: Optimize image decoding

This mitigates long load times between cards on low-power devices
by streaming from memory. Code courtesy of Bastien Bouclet (bgK).

Changed paths:
    engines/mohawk/riven_graphics.cpp


diff --git a/engines/mohawk/riven_graphics.cpp b/engines/mohawk/riven_graphics.cpp
index e83ca08370..eb72d3a9c3 100644
--- a/engines/mohawk/riven_graphics.cpp
+++ b/engines/mohawk/riven_graphics.cpp
@@ -29,6 +29,7 @@
 #include "mohawk/riven_video.h"
 
 #include "common/system.h"
+#include "common/memstream.h"
 
 #include "engines/util.h"
 
@@ -354,7 +355,11 @@ RivenGraphics::~RivenGraphics() {
 }
 
 MohawkSurface *RivenGraphics::decodeImage(uint16 id) {
-	MohawkSurface *surface = _bitmapDecoder->decodeImage(_vm->getResource(ID_TBMP, id));
+	Common::SeekableReadStream *resourceStream = _vm->getResource(ID_TBMP, id);
+	Common::SeekableReadStream *memResourceStream = resourceStream->readStream(resourceStream->size());
+	delete resourceStream;
+
+	MohawkSurface *surface = _bitmapDecoder->decodeImage(memResourceStream);
 	surface->convertToTrueColor();
 	return surface;
 }


Commit: 3b005ac8903507d47b13add8ae851c96448795ae
    https://github.com/scummvm/scummvm/commit/3b005ac8903507d47b13add8ae851c96448795ae
Author: Michael Ball (ballm4788 at gmail.com)
Date: 2020-03-18T20:40:32+01:00

Commit Message:
MOHAWK: RIVEN: Refresh cursor on mouse-down

This fixes an issue in the 3DS backend where the cursor would not
update until after the transition was complete.

Changed paths:
    engines/mohawk/riven_card.cpp


diff --git a/engines/mohawk/riven_card.cpp b/engines/mohawk/riven_card.cpp
index 08bbc1c379..1a8438af5a 100644
--- a/engines/mohawk/riven_card.cpp
+++ b/engines/mohawk/riven_card.cpp
@@ -928,6 +928,7 @@ RivenHotspot *RivenCard::getCurHotspot() const {
 
 RivenScriptPtr RivenCard::onMouseDown(const Common::Point &mouse) {
 	RivenScriptPtr script = onMouseMove(mouse);
+	updateMouseCursor();
 
 	_pressedHotspot = _hoveredHotspot;
 




More information about the Scummvm-git-logs mailing list