[Scummvm-git-logs] scummvm master -> 554f923c2e792ce635fbc9d5d428fbdc8f449f2e
neuromancer
noreply at scummvm.org
Tue Jun 14 10:52:57 UTC 2022
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:
d393affc34 HYPNO: fixed several corner cases in video sequences and improved debugging in boyz
554f923c2e HYPNO: removed useless _civiliansShoot state variable in boyz
Commit: d393affc34149a31e6d4596e19a2861bc2c51822
https://github.com/scummvm/scummvm/commit/d393affc34149a31e6d4596e19a2861bc2c51822
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2022-06-14T12:53:17+02:00
Commit Message:
HYPNO: fixed several corner cases in video sequences and improved debugging in boyz
Changed paths:
engines/hypno/boyz/arcade.cpp
diff --git a/engines/hypno/boyz/arcade.cpp b/engines/hypno/boyz/arcade.cpp
index 588e76e87a6..e8285212894 100644
--- a/engines/hypno/boyz/arcade.cpp
+++ b/engines/hypno/boyz/arcade.cpp
@@ -219,6 +219,9 @@ void BoyzEngine::drawHealth() {
return;
float w = float(_health) / float(_maxHealth);
+ if (w <= 0 || _healthBar[_currentActor].w - 3 <= 0 || _healthBar[_currentActor].h / 2 <= 0)
+ return;
+
Common::Rect healthBarBox(0, 0, int((_healthBar[_currentActor].w - 3) * w), _healthBar[_currentActor].h / 2);
uint32 c = kHypnoColorWhiteOrBlue; // white
@@ -358,6 +361,7 @@ bool BoyzEngine::checkTransition(ArcadeTransitions &transitions, ArcadeShooting
_background->decoder->forceSeekToFrame(at.jumpToTime);
_masks->decoder->forceSeekToFrame(at.jumpToTime);
} else if (at.loseLevel) {
+ debugC(1, kHypnoDebugArcade, "Losing level in transition at %d", _background->decoder->getCurFrame());
_health = 0;
} else
error ("Invalid transition at %d", ttime);
@@ -611,24 +615,25 @@ bool BoyzEngine::shoot(const Common::Point &mousePos, ArcadeShooting *arc, bool
incFriendliesEncountered();
uint32 idx = _shoots[i].warningVideoIdx;
- idx = idx == 0 ? 2 : idx;
- Common::String filename = _warningVideosDay[idx];
- _civiliansShoot++;
+ if (idx > 0) {
+ Common::String filename = _warningVideosDay[idx];
+ _civiliansShoot++;
- _background->decoder->pauseVideo(true);
- MVideo video(filename, Common::Point(0, 0), false, true, false);
- disableCursor();
- runIntro(video);
- // Should be currentPalette?
- loadPalette(arc->backgroundPalette);
- _background->decoder->pauseVideo(false);
- updateScreen(*_background);
- drawScreen();
- if (!_music.empty())
- playSound(_music, 0, arc->musicRate); // restore music
-
- hitPlayer();
+ _background->decoder->pauseVideo(true);
+ MVideo video(filename, Common::Point(0, 0), false, true, false);
+ disableCursor();
+ runIntro(video);
+ // Should be currentPalette?
+ loadPalette(arc->backgroundPalette);
+ _background->decoder->pauseVideo(false);
+ updateScreen(*_background);
+ drawScreen();
+ if (!_music.empty())
+ playSound(_music, 0, arc->musicRate); // restore music
+ hitPlayer();
+ }
+ debugC(1, kHypnoDebugArcade, "Jumping to %d", _shoots[i].explosionFrames[0].start - 3);
_background->decoder->forceSeekToFrame(_shoots[i].explosionFrames[0].start - 3);
_masks->decoder->forceSeekToFrame(_shoots[i].explosionFrames[0].start - 3);
@@ -753,6 +758,8 @@ void BoyzEngine::missedTarget(Shoot *s, ArcadeShooting *arc) {
debugC(1, kHypnoDebugArcade, "Jumping to end of level");
_skipLevel = true;
} else if (s->missedAnimation == uint32(-1000)) {
+ if (_background->decoder->getCurFrame() > int(s->explosionFrames[0].start))
+ return; // Too late for this
_health = 0;
} else {
int missedAnimation = s->missedAnimation;
Commit: 554f923c2e792ce635fbc9d5d428fbdc8f449f2e
https://github.com/scummvm/scummvm/commit/554f923c2e792ce635fbc9d5d428fbdc8f449f2e
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2022-06-14T12:53:17+02:00
Commit Message:
HYPNO: removed useless _civiliansShoot state variable in boyz
Changed paths:
engines/hypno/boyz/arcade.cpp
engines/hypno/boyz/boyz.cpp
engines/hypno/hypno.h
diff --git a/engines/hypno/boyz/arcade.cpp b/engines/hypno/boyz/arcade.cpp
index e8285212894..73b3fd9803f 100644
--- a/engines/hypno/boyz/arcade.cpp
+++ b/engines/hypno/boyz/arcade.cpp
@@ -617,7 +617,6 @@ bool BoyzEngine::shoot(const Common::Point &mousePos, ArcadeShooting *arc, bool
uint32 idx = _shoots[i].warningVideoIdx;
if (idx > 0) {
Common::String filename = _warningVideosDay[idx];
- _civiliansShoot++;
_background->decoder->pauseVideo(true);
MVideo video(filename, Common::Point(0, 0), false, true, false);
diff --git a/engines/hypno/boyz/boyz.cpp b/engines/hypno/boyz/boyz.cpp
index ceffbf07291..bf55f42ed88 100644
--- a/engines/hypno/boyz/boyz.cpp
+++ b/engines/hypno/boyz/boyz.cpp
@@ -70,7 +70,6 @@ BoyzEngine::BoyzEngine(OSystem *syst, const ADGameDescription *gd) : HypnoEngine
_crosshairsPalette = nullptr;
_lastLevel = 0;
_previousHealth = 0;
- _civiliansShoot = 0;
_selectedCorrectBox = 0;
_flashbackMode = false;
diff --git a/engines/hypno/hypno.h b/engines/hypno/hypno.h
index 02b252efde7..b73e72b7339 100644
--- a/engines/hypno/hypno.h
+++ b/engines/hypno/hypno.h
@@ -629,7 +629,6 @@ public:
ScriptMode _currentMode;
uint32 _currentActor;
uint32 _currentWeapon;
- uint32 _civiliansShoot;
Common::Array<Filename> _warningVideosDay;
Common::Array<Filename> _warningVideosNight;
Common::Array<Filename> _warningAlarmVideos;
More information about the Scummvm-git-logs
mailing list