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

neuromancer noreply at scummvm.org
Fri Jul 17 20:12:03 UTC 2026


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

Summary:
4d22148bf5 SCUMM: RA2: correctly show difficulty in the UI
15d41ba965 SCUMM: RA2: fixed decoding of codec37 variant
a198cc4351 SCUMM: RA2: fixes for L6


Commit: 4d22148bf56d66a3fb5b0c766a6957d6752ea73b
    https://github.com/scummvm/scummvm/commit/4d22148bf56d66a3fb5b0c766a6957d6752ea73b
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2026-07-17T22:11:12+02:00

Commit Message:
SCUMM: RA2: correctly show difficulty in the UI

Changed paths:
    engines/scumm/insane/rebel2/render.cpp


diff --git a/engines/scumm/insane/rebel2/render.cpp b/engines/scumm/insane/rebel2/render.cpp
index 76e006884d0..c5447b4de25 100644
--- a/engines/scumm/insane/rebel2/render.cpp
+++ b/engines/scumm/insane/rebel2/render.cpp
@@ -3040,10 +3040,7 @@ void InsaneRebel2::renderStatusBarSprites(byte *renderBitmap, int pitch, int wid
 			_viewX, statusBarY + _viewY, _smush_cockpitNut, 1);
 	}
 
-	int difficulty = _difficulty;
-	if (difficulty > 3)
-		difficulty = 3;
-	int difficultySprite = difficulty + 2;
+	int difficultySprite = MIN((int)_difficulty, 4) + 1;
 	if (numSprites > difficultySprite) {
 		renderNutSprite(renderBitmap, pitch, width, height,
 			_viewX, statusBarY + _viewY, _smush_cockpitNut, difficultySprite);


Commit: 15d41ba965530625d26d53cf2a25d57df67f35d9
    https://github.com/scummvm/scummvm/commit/15d41ba965530625d26d53cf2a25d57df67f35d9
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2026-07-17T22:11:12+02:00

Commit Message:
SCUMM: RA2: fixed decoding of codec37 variant

Changed paths:
    engines/scumm/smush/codec37.cpp
    engines/scumm/smush/codec37.h
    engines/scumm/smush/rebel/smush_player_ra2.cpp


diff --git a/engines/scumm/smush/codec37.cpp b/engines/scumm/smush/codec37.cpp
index 3fdb5f0e28e..cb3326797be 100644
--- a/engines/scumm/smush/codec37.cpp
+++ b/engines/scumm/smush/codec37.cpp
@@ -28,7 +28,8 @@
 
 namespace Scumm {
 
-SmushDeltaBlocksDecoder::SmushDeltaBlocksDecoder(int width, int height) {
+SmushDeltaBlocksDecoder::SmushDeltaBlocksDecoder(int width, int height, bool rebel2Variant) {
+	_rebel2Variant = rebel2Variant;
 	_width = width;
 	_height = height;
 	_frameSize = _width * _height;
@@ -475,7 +476,12 @@ void SmushDeltaBlocksDecoder::proc4WithFDFE(byte *dst, const byte *src, int32 ne
 			if (code == 0xFD) {
 				LITERAL_4X4(src, dst, pitch);
 			} else if (code == 0xFE) {
-				LITERAL_4X1(src, dst, pitch);
+				// RA2's codec37 variant uses 2x2 blocks here, not 4x1 lines.
+				if (_rebel2Variant) {
+					LITERAL_2X2(src, dst, pitch);
+				} else {
+					LITERAL_4X1(src, dst, pitch);
+				}
 			} else if (code == 0xFF) {
 				LITERAL_1X1(src, dst, pitch);
 			} else if (code == 0x00) {
diff --git a/engines/scumm/smush/codec37.h b/engines/scumm/smush/codec37.h
index c5ac882fd81..3cdc7fcafbc 100644
--- a/engines/scumm/smush/codec37.h
+++ b/engines/scumm/smush/codec37.h
@@ -39,9 +39,10 @@ private:
 	int _tableLastIndex;
 	int32 _frameSize;
 	int _width, _height;
+	bool _rebel2Variant;
 
 public:
-	SmushDeltaBlocksDecoder(int width, int height);
+	SmushDeltaBlocksDecoder(int width, int height, bool rebel2Variant = false);
 	~SmushDeltaBlocksDecoder();
 protected:
 	void makeTable(int, int);
diff --git a/engines/scumm/smush/rebel/smush_player_ra2.cpp b/engines/scumm/smush/rebel/smush_player_ra2.cpp
index f478984e1f7..8343288cef9 100644
--- a/engines/scumm/smush/rebel/smush_player_ra2.cpp
+++ b/engines/scumm/smush/rebel/smush_player_ra2.cpp
@@ -1076,7 +1076,7 @@ bool SmushPlayerRebel2::ra2DecodePlacedDeltaCodec(int codec, const uint8 *src, i
 			_ra2DeltaBlocksHeight = 0;
 		}
 		if (_deltaBlocksCodec == nullptr) {
-			_deltaBlocksCodec = new SmushDeltaBlocksDecoder(decodeWidth, decodeHeight);
+			_deltaBlocksCodec = new SmushDeltaBlocksDecoder(decodeWidth, decodeHeight, true);
 			_ra2DeltaBlocksWidth = decodeWidth;
 			_ra2DeltaBlocksHeight = decodeHeight;
 		}


Commit: a198cc4351483b6ab8ddb2b9de72f6f6056d231f
    https://github.com/scummvm/scummvm/commit/a198cc4351483b6ab8ddb2b9de72f6f6056d231f
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2026-07-17T22:11:12+02:00

Commit Message:
SCUMM: RA2: fixes for L6

Changed paths:
    engines/scumm/insane/rebel2/rebel.cpp
    engines/scumm/insane/rebel2/runlevels.cpp


diff --git a/engines/scumm/insane/rebel2/rebel.cpp b/engines/scumm/insane/rebel2/rebel.cpp
index 81fd27d02d2..79315879380 100644
--- a/engines/scumm/insane/rebel2/rebel.cpp
+++ b/engines/scumm/insane/rebel2/rebel.cpp
@@ -1082,7 +1082,10 @@ bool InsaneRebel2::notifyEvent(const Common::Event &event) {
 		switch (event.kbd.keycode) {
 		case Common::KEYCODE_ESCAPE:
 			if (splayer) {
-				if (_gameState == kStateGameplay && _rebelHandler != 0) {
+				// _gameplaySectionActive also covers a gameplay video's startup, before
+				// its first IACT sets _rebelHandler; otherwise ESC there skips the segment
+				// (e.g. spamming ESC after a Level 6 phase-2 death skipped phase 2).
+				if (_gameState == kStateGameplay && (_rebelHandler != 0 || _gameplaySectionActive)) {
 					debugC(DEBUG_INSANE, "ESC pressed during gameplay - opening global menu");
 					openGameplayMainMenu(splayer);
 				} else {
diff --git a/engines/scumm/insane/rebel2/runlevels.cpp b/engines/scumm/insane/rebel2/runlevels.cpp
index f7e62caca15..96da9fd3a58 100644
--- a/engines/scumm/insane/rebel2/runlevels.cpp
+++ b/engines/scumm/insane/rebel2/runlevels.cpp
@@ -867,6 +867,8 @@ int InsaneRebel2::runLevel6() {
 			playLevelRetryVariant(6, 1);
 			if (_vm->shouldQuit())
 				return kLevelQuit;
+			_playerShield = 255;  // full shield on retry (original resets damage before replaying)
+			_playerDamage = 0;
 			continue;
 		}
 
@@ -914,6 +916,8 @@ int InsaneRebel2::runLevel6() {
 			playLevelRetryVariant(6, 2);
 			if (_vm->shouldQuit())
 				return kLevelQuit;
+			_playerShield = 255;  // full shield on retry, as in phase 1
+			_playerDamage = 0;
 		}
 
 		break;  // Should only reach here on shouldQuit




More information about the Scummvm-git-logs mailing list