mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-26 20:59:00 +00:00
MYST3: Add support for the sweeping counter
This commit is contained in:
parent
b13c379594
commit
f93bc935a3
@ -105,6 +105,12 @@ GameState::GameState(Myst3Engine *vm):
|
||||
VAR(70, SecondsCountdown, true)
|
||||
VAR(71, FrameCountdown, true)
|
||||
|
||||
VAR(79, SweepEnabled, true)
|
||||
VAR(80, SweepValue, true)
|
||||
VAR(81, SweepStep, true)
|
||||
VAR(82, SweepMin, true)
|
||||
VAR(83, SweepMax, true)
|
||||
|
||||
VAR(84, InputMousePressed, false)
|
||||
VAR(88, InputEscapePressed, false)
|
||||
VAR(89, InputTildePressed, false)
|
||||
@ -186,9 +192,9 @@ GameState::GameState(Myst3Engine *vm):
|
||||
VAR(167, MovieOverridePosU, true)
|
||||
VAR(168, MovieOverridePosV, true)
|
||||
VAR(169, MovieScale, true)
|
||||
VAR(170, MovieUnk170, true)
|
||||
VAR(171, MovieUnk171, true)
|
||||
VAR(172, MovieUnk172, true)
|
||||
VAR(170, MovieAdditiveBlending, true)
|
||||
VAR(171, MovieTransparency, true)
|
||||
VAR(172, MovieTransparencyVar, true)
|
||||
VAR(173, MoviePlayingVar, true)
|
||||
VAR(174, MovieStartSoundId, true)
|
||||
VAR(175, MovieStartSoundVolume, true)
|
||||
@ -577,6 +583,24 @@ void GameState::updateFrameCounters() {
|
||||
setSecondsCountdown(--secondsCountdown);
|
||||
|
||||
}
|
||||
|
||||
if (getSweepEnabled()) {
|
||||
if (getSweepValue() + getSweepStep() > getSweepMax()) {
|
||||
setSweepValue(getSweepMax());
|
||||
|
||||
if (getSweepStep() > 0) {
|
||||
setSweepStep(-getSweepStep());
|
||||
}
|
||||
} else if (getSweepValue() + getSweepStep() < getSweepMin()) {
|
||||
setSweepValue(getSweepMin());
|
||||
|
||||
if (getSweepStep() < 0) {
|
||||
setSweepStep(-getSweepStep());
|
||||
}
|
||||
} else {
|
||||
setSweepValue(getSweepValue() + getSweepStep());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
} /* namespace Myst3 */
|
||||
|
@ -85,6 +85,12 @@ public:
|
||||
DECLARE_VAR(70, SecondsCountdown)
|
||||
DECLARE_VAR(71, FrameCountdown)
|
||||
|
||||
DECLARE_VAR(79, SweepEnabled)
|
||||
DECLARE_VAR(80, SweepValue)
|
||||
DECLARE_VAR(81, SweepStep)
|
||||
DECLARE_VAR(82, SweepMin)
|
||||
DECLARE_VAR(83, SweepMax)
|
||||
|
||||
DECLARE_VAR(84, InputMousePressed)
|
||||
DECLARE_VAR(88, InputEscapePressed)
|
||||
DECLARE_VAR(89, InputTildePressed)
|
||||
@ -161,6 +167,9 @@ public:
|
||||
DECLARE_VAR(166, MovieOverridePosition)
|
||||
DECLARE_VAR(167, MovieOverridePosU)
|
||||
DECLARE_VAR(168, MovieOverridePosV)
|
||||
DECLARE_VAR(170, MovieAdditiveBlending)
|
||||
DECLARE_VAR(171, MovieTransparency)
|
||||
DECLARE_VAR(172, MovieTransparencyVar)
|
||||
DECLARE_VAR(173, MoviePlayingVar)
|
||||
DECLARE_VAR(174, MovieStartSoundId)
|
||||
DECLARE_VAR(175, MovieStartSoundVolume)
|
||||
|
Loading…
x
Reference in New Issue
Block a user