[Scummvm-git-logs] scummvm master -> b19adc3e6f14d2bc49d62e56951a0e76d4c2eb09
neuromancer
noreply at scummvm.org
Thu Jun 4 20:29:03 UTC 2026
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://api.github.com/repos/scummvm/scummvm .
Summary:
b19adc3e6f SCUMM: RA1: allow torpedo shooting in some levels
Commit: b19adc3e6f14d2bc49d62e56951a0e76d4c2eb09
https://github.com/scummvm/scummvm/commit/b19adc3e6f14d2bc49d62e56951a0e76d4c2eb09
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2026-06-04T22:28:40+02:00
Commit Message:
SCUMM: RA1: allow torpedo shooting in some levels
Changed paths:
engines/scumm/insane/rebel1/iact.cpp
engines/scumm/insane/rebel1/rebel.cpp
engines/scumm/insane/rebel1/rebel.h
engines/scumm/insane/rebel1/runlevels.cpp
engines/scumm/smush/rebel/smush_player_ra1.cpp
diff --git a/engines/scumm/insane/rebel1/iact.cpp b/engines/scumm/insane/rebel1/iact.cpp
index 71106907a37..7065bdc8a8b 100644
--- a/engines/scumm/insane/rebel1/iact.cpp
+++ b/engines/scumm/insane/rebel1/iact.cpp
@@ -1869,10 +1869,10 @@ void InsaneRebel1::updateGameOp0BPhysics() {
_vm->_smushVideoShouldFinish = true;
}
- // Level 4 Phase 2: enable torpedo mode at frame 0x3E and finish as
- // soon as the torpedo registers a hit. The DOS loop exits on killCount.
+ // Level 4 Phase 2: enable torpedo mode at frontend/movie frame 0x3E and
+ // finish as soon as the torpedo registers a hit. The DOS loop exits on killCount.
if (_currentLevel == 3 && _levelGameplayPhase == 2) {
- if (_frameCounter == 0x3E)
+ if (_currentSmushFrame == 0x3E)
_gameplayFlags75ff |= 2;
if (_killCount > 0)
_vm->_smushVideoShouldFinish = true;
@@ -1912,11 +1912,11 @@ void InsaneRebel1::updateGameOp0BPhysics() {
_vm->_smushVideoShouldFinish = true;
}
- // Level 15 Phase 2: enable torpedo at frame 0x18A, expose the protected
- // target IDs used by the original flow, and finish when
+ // Level 15 Phase 2: enable torpedo at frontend/movie frame 0x18A, expose
+ // the protected target IDs used by the original flow, and finish when
// g_gameplayPhaseFlags & 2 becomes set.
if (_currentLevel == 14 && _levelGameplayPhase == 2) {
- if (_frameCounter == 0x18A) {
+ if (_currentSmushFrame == 0x18A) {
// Original writes the 16-bit flags word: g_hudDisableFlags |= 0x210.
// Low byte bit 0x10 suppresses normal hit feedback in the torpedo phase;
// high byte bit 0x02 switches targeting/shot rendering to torpedoes.
diff --git a/engines/scumm/insane/rebel1/rebel.cpp b/engines/scumm/insane/rebel1/rebel.cpp
index eb886e24bae..c61b0c8aa65 100644
--- a/engines/scumm/insane/rebel1/rebel.cpp
+++ b/engines/scumm/insane/rebel1/rebel.cpp
@@ -309,6 +309,7 @@ InsaneRebel1::InsaneRebel1(ScummEngine_v7 *scumm) : Insane(), _vm(scumm) {
_deathTimer = 0;
_screenFlash = 0;
_frameCounter = 0;
+ _currentSmushFrame = 0;
_screenShakeEnabled = false;
memset(_screenFlashBasePalette, 0, sizeof(_screenFlashBasePalette));
_screenFlashBasePaletteValid = false;
@@ -474,6 +475,10 @@ InsaneRebel1::InsaneRebel1(ScummEngine_v7 *scumm) : Insane(), _vm(scumm) {
_vm->_system->getEventManager()->getEventDispatcher()->registerObserver(this, 1, false);
}
+void InsaneRebel1::setCurrentSmushFrame(int32 frame) {
+ _currentSmushFrame = frame;
+}
+
InsaneRebel1::~InsaneRebel1() {
_vm->_system->getEventManager()->getEventDispatcher()->unregisterObserver(this);
terminateAudio();
diff --git a/engines/scumm/insane/rebel1/rebel.h b/engines/scumm/insane/rebel1/rebel.h
index 1db04a43a5b..781d916bc74 100644
--- a/engines/scumm/insane/rebel1/rebel.h
+++ b/engines/scumm/insane/rebel1/rebel.h
@@ -111,6 +111,7 @@ public:
// gamepad/joystick input continues through the joystick path.
bool isTouchscreenActive() const;
void setFrameHasGameChunk(bool hasGameChunk) { _frameHasGameChunk = hasGameChunk; }
+ void setCurrentSmushFrame(int32 frame);
int getCurrentLevel() const { return _currentLevel; }
int getLevelGameplayPhase() const { return _levelGameplayPhase; }
uint16 getActiveGameOpcode() const { return _activeGameOpcode; }
@@ -490,6 +491,7 @@ private:
int16 _deathTimer; // 0x756A: death animation countdown (30 on death)
int16 _screenFlash; // 0x7736: screen flash timer on hit
uint32 _frameCounter; // Gameplay handler frame accumulator
+ int32 _currentSmushFrame; // Current frontend/movie frame (original DAT_7740)
bool _screenShakeEnabled; // 0x41AC: when true, SetCameraOffset adds ±2 random jitter
byte _screenFlashBasePalette[0x300];
bool _screenFlashBasePaletteValid;
diff --git a/engines/scumm/insane/rebel1/runlevels.cpp b/engines/scumm/insane/rebel1/runlevels.cpp
index 8ef89b85847..11499e20973 100644
--- a/engines/scumm/insane/rebel1/runlevels.cpp
+++ b/engines/scumm/insane/rebel1/runlevels.cpp
@@ -210,6 +210,7 @@ void InsaneRebel1::resetLevelDamageState() {
void InsaneRebel1::resetLevelFrameState() {
_frameCounter = 0;
+ _currentSmushFrame = 0;
_gameCounter = 0;
_activeGameOpcode = 0;
_gameLatch5D = 0;
@@ -578,8 +579,8 @@ bool InsaneRebel1::runLevel4() {
return false;
if (_health >= 0 && shieldGeneratorsDestroyed) {
- // Phase 2: torpedo run. The DOS loop enables torpedo mode at frame
- // 0x3E and exits early as soon as killCount becomes nonzero.
+ // Phase 2: torpedo run. The DOS loop enables torpedo mode at
+ // frontend/movie frame 0x3E and exits early as soon as killCount becomes nonzero.
_activeGameOpcode = 0;
_gameLatch5D = 0;
_gameLatch5F = 0;
@@ -1448,7 +1449,7 @@ bool InsaneRebel1::runLevel15() {
return false;
// Phase 2: final approach and torpedo shot. The DOS flow enables
- // torpedo mode at frame 0x18A and completes only after object-state
+ // torpedo mode at frontend/movie frame 0x18A and completes only after object-state
// bit 0x7602 & 2 is set by the exhaust-port hit.
_activeGameOpcode = 0;
_gameLatch5D = 0;
diff --git a/engines/scumm/smush/rebel/smush_player_ra1.cpp b/engines/scumm/smush/rebel/smush_player_ra1.cpp
index 54d4f029003..9b24d8248fa 100644
--- a/engines/scumm/smush/rebel/smush_player_ra1.cpp
+++ b/engines/scumm/smush/rebel/smush_player_ra1.cpp
@@ -904,6 +904,7 @@ void SmushPlayerRebel1::handleFrame(int32 frameSize, Common::SeekableReadStream
bool preserveFrameHistory = false;
if (_insane) {
InsaneRebel1 *rebel1 = static_cast<InsaneRebel1 *>(_insane);
+ rebel1->setCurrentSmushFrame(_frame);
bool interactive = rebel1->isInteractiveVideoActive();
const bool frameHasGameChunk = interactive && ra1FrameHasGameChunk(b, frameSize);
rebel1->setFrameHasGameChunk(frameHasGameChunk);
More information about the Scummvm-git-logs
mailing list