[Scummvm-git-logs] scummvm master -> 19ae219e47af41dd1b908bfeeab36de3f73c3aba
neuromancer
noreply at scummvm.org
Thu Aug 15 08:39:57 UTC 2024
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:
678380b6bd HYPNO: use frame limiter for arcade sequences
19ae219e47 FREESCAPE: added some missing sounds in eclipse
Commit: 678380b6bde51e28f5eb3d134388d124c43e0774
https://github.com/scummvm/scummvm/commit/678380b6bde51e28f5eb3d134388d124c43e0774
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2024-08-15T10:41:11+02:00
Commit Message:
HYPNO: use frame limiter for arcade sequences
Changed paths:
engines/hypno/arcade.cpp
diff --git a/engines/hypno/arcade.cpp b/engines/hypno/arcade.cpp
index cbd025040fd..84fad5d4177 100644
--- a/engines/hypno/arcade.cpp
+++ b/engines/hypno/arcade.cpp
@@ -22,6 +22,7 @@
#include "common/tokenizer.h"
#include "common/events.h"
#include "graphics/cursorman.h"
+#include "graphics/framelimiter.h"
#include "hypno/grammar.h"
#include "hypno/hypno.h"
@@ -279,6 +280,7 @@ void HypnoEngine::runArcade(ArcadeShooting *arc) {
_objMissesAllowed[1] = arc->objMissesAllowed[1];
debugC(1, kHypnoDebugArcade, "Using frame delay: %d", arc->frameDelay);
+ Graphics::FrameLimiter limiter(g_system, 1000.0 / arc->frameDelay);
Common::Event event;
while (!shouldQuit()) {
@@ -555,7 +557,9 @@ void HypnoEngine::runArcade(ArcadeShooting *arc) {
drawAmmo();
}
- g_system->delayMillis(arc->frameDelay);
+ limiter.delayBeforeSwap();
+ drawScreen();
+ limiter.startFrame();
}
// Deallocate shoots
@@ -631,7 +635,6 @@ void HypnoEngine::drawCursorArcade(const Common::Point &mousePos) {
else
changeCursor("arcade");
- g_system->copyRectToScreen(_compositeSurface->getPixels(), _compositeSurface->pitch, 0, 0, _screenW, _screenH);
}
bool HypnoEngine::clickedPrimaryShoot(const Common::Point &mousePos) { return true; }
Commit: 19ae219e47af41dd1b908bfeeab36de3f73c3aba
https://github.com/scummvm/scummvm/commit/19ae219e47af41dd1b908bfeeab36de3f73c3aba
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2024-08-15T10:41:11+02:00
Commit Message:
FREESCAPE: added some missing sounds in eclipse
Changed paths:
engines/freescape/games/eclipse/eclipse.cpp
engines/freescape/games/eclipse/eclipse.h
engines/freescape/games/eclipse/zx.cpp
diff --git a/engines/freescape/games/eclipse/eclipse.cpp b/engines/freescape/games/eclipse/eclipse.cpp
index 189d96c41de..385a6bd1dd4 100644
--- a/engines/freescape/games/eclipse/eclipse.cpp
+++ b/engines/freescape/games/eclipse/eclipse.cpp
@@ -39,8 +39,11 @@ EclipseEngine::EclipseEngine(OSystem *syst, const ADGameDescription *gd) : Frees
_soundIndexFall = 3;
_soundIndexClimb = 4;
_soundIndexMenu = -1;
- _soundIndexStart = -1;
- _soundIndexAreaChange = -1;
+ _soundIndexStart = 9;
+ _soundIndexAreaChange = 5;
+
+ _soundIndexStartFalling = -1;
+ _soundIndexEndFalling = -1;
_soundIndexNoShield = -1;
_soundIndexNoEnergy = -1;
@@ -128,7 +131,10 @@ bool EclipseEngine::checkIfGameEnded() {
if (_gameStateControl == kFreescapeGameStatePlaying) {
if (_hasFallen && _avoidRenderingFrames == 0) {
_hasFallen = false;
- playSoundFx(4, false);
+ if (isDOS())
+ playSoundFx(4, false);
+ else
+ playSound(_soundIndexStartFalling, false);
// If shield is less than 11 after a fall, the game ends
if (_gameStateVars[k8bitVariableShield] > 15 + 11) {
@@ -263,11 +269,7 @@ void EclipseEngine::gotoArea(uint16 areaID, int entranceID) {
_yaw = 180;
_pitch = 0;
- if (isSpectrum())
- playSound(7, true);
- else
- playSound(9, true);
-
+ playSound(_soundIndexStart, true);
if (isEclipse2()) {
_yaw = 120;
_gameStateControl = kFreescapeGameStateStart;
@@ -280,10 +282,7 @@ void EclipseEngine::gotoArea(uint16 areaID, int entranceID) {
else
_pitch = 10;
} else {
- if (isSpectrum())
- playSound(7, false);
- else
- playSound(5, false);
+ playSound(_soundIndexAreaChange, false);
}
_gfx->_keyColor = 0;
diff --git a/engines/freescape/games/eclipse/eclipse.h b/engines/freescape/games/eclipse/eclipse.h
index cfebe43daac..31605e38085 100644
--- a/engines/freescape/games/eclipse/eclipse.h
+++ b/engines/freescape/games/eclipse/eclipse.h
@@ -55,6 +55,9 @@ public:
uint32 _initialEnergy;
uint32 _initialShield;
+ int _soundIndexStartFalling;
+ int _soundIndexEndFalling;
+
bool _resting;
int _lastThirtySeconds;
int _lastSecond;
diff --git a/engines/freescape/games/eclipse/zx.cpp b/engines/freescape/games/eclipse/zx.cpp
index 8cae05ec0c6..41b62c48e82 100644
--- a/engines/freescape/games/eclipse/zx.cpp
+++ b/engines/freescape/games/eclipse/zx.cpp
@@ -37,8 +37,11 @@ void EclipseEngine::initZX() {
_soundIndexFall = 3;
_soundIndexClimb = 4;
_soundIndexMenu = -1;
- _soundIndexStart = -1;
- _soundIndexAreaChange = -1;
+ _soundIndexStart = 7;
+ _soundIndexAreaChange = 7;
+
+ _soundIndexStartFalling = 6;
+ _soundIndexEndFalling = 5;
_soundIndexNoShield = 8;
_soundIndexNoEnergy = -1;
More information about the Scummvm-git-logs
mailing list