[Scummvm-git-logs] scummvm master -> 511ff1a8c38f031c28248acad484c1a45f5e4615
fracturehill
noreply at scummvm.org
Sat Mar 4 00:11:40 UTC 2023
This automated email contains information about 6 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
5ab50f81c2 NANCY: Implement PushScene and PopScene action records
349b96534b NANCY: Implement BumpPlayerClock action record type
a6022cbea7 NANCY: Allow chaining of PrimaryVideos
d27293f113 NANCY: Correctly trigger action at end of secondary movie
d4980bd7d4 NANCY: Change #includes
511ff1a8c3 NANCY: Fix MSVC compiler warning
Commit: 5ab50f81c29e6719c11c0ebb8c6968c0b43c2faa
https://github.com/scummvm/scummvm/commit/5ab50f81c29e6719c11c0ebb8c6968c0b43c2faa
Author: Kaloyan Chehlarski (strahy at outlook.com)
Date: 2023-03-04T02:07:57+02:00
Commit Message:
NANCY: Implement PushScene and PopScene action records
Changed paths:
engines/nancy/action/recordtypes.cpp
engines/nancy/action/recordtypes.h
diff --git a/engines/nancy/action/recordtypes.cpp b/engines/nancy/action/recordtypes.cpp
index 99e69469921..4a2a498a58c 100644
--- a/engines/nancy/action/recordtypes.cpp
+++ b/engines/nancy/action/recordtypes.cpp
@@ -444,10 +444,20 @@ void PushScene::readData(Common::SeekableReadStream &stream) {
stream.skip(1);
}
+void PushScene::execute() {
+ NancySceneState.pushScene();
+ _isDone = true;
+}
+
void PopScene::readData(Common::SeekableReadStream &stream) {
stream.skip(1);
}
+void PopScene::execute() {
+ NancySceneState.popScene();
+ _isDone = true;
+}
+
void WinGame::readData(Common::SeekableReadStream &stream) {
stream.skip(1);
}
diff --git a/engines/nancy/action/recordtypes.h b/engines/nancy/action/recordtypes.h
index 6eeef3c0694..6699f893a2b 100644
--- a/engines/nancy/action/recordtypes.h
+++ b/engines/nancy/action/recordtypes.h
@@ -382,17 +382,19 @@ protected:
Common::String getRecordTypeName() const override { return "LoseGame"; }
};
-class PushScene : public Unimplemented {
+class PushScene : public ActionRecord {
public:
void readData(Common::SeekableReadStream &stream) override;
+ void execute() override;
protected:
Common::String getRecordTypeName() const override { return "PushScene"; }
};
-class PopScene : public Unimplemented {
+class PopScene : public ActionRecord {
public:
void readData(Common::SeekableReadStream &stream) override;
+ void execute() override;
protected:
Common::String getRecordTypeName() const override { return "PopScene"; }
Commit: 349b96534bf870cd09689e186c7b1d0995962051
https://github.com/scummvm/scummvm/commit/349b96534bf870cd09689e186c7b1d0995962051
Author: Kaloyan Chehlarski (strahy at outlook.com)
Date: 2023-03-04T02:07:57+02:00
Commit Message:
NANCY: Implement BumpPlayerClock action record type
Implemented the BumpPlayerClock action record, which changes
the in-game time.
Changed paths:
engines/nancy/action/recordtypes.cpp
engines/nancy/action/recordtypes.h
engines/nancy/state/scene.cpp
engines/nancy/state/scene.h
diff --git a/engines/nancy/action/recordtypes.cpp b/engines/nancy/action/recordtypes.cpp
index 4a2a498a58c..31469eb5730 100644
--- a/engines/nancy/action/recordtypes.cpp
+++ b/engines/nancy/action/recordtypes.cpp
@@ -337,7 +337,14 @@ void TextBoxClear::readData(Common::SeekableReadStream &stream) {
}
void BumpPlayerClock::readData(Common::SeekableReadStream &stream) {
- stream.skip(5);
+ _relative = (NancyFlag)stream.readByte();
+ _hours = stream.readUint16LE();
+ _minutes = stream.readUint16LE();
+}
+
+void BumpPlayerClock::execute() {
+ NancySceneState.setPlayerTime(_hours * 3600000 + _minutes * 60000, _relative);
+ finishExecution();
}
void SaveContinueGame::readData(Common::SeekableReadStream &stream) {
diff --git a/engines/nancy/action/recordtypes.h b/engines/nancy/action/recordtypes.h
index 6699f893a2b..f85e9ce1c3c 100644
--- a/engines/nancy/action/recordtypes.h
+++ b/engines/nancy/action/recordtypes.h
@@ -300,9 +300,14 @@ protected:
Common::String getRecordTypeName() const override { return "TextBoxClear"; }
};
-class BumpPlayerClock : public Unimplemented {
+class BumpPlayerClock : public ActionRecord {
public:
void readData(Common::SeekableReadStream &stream) override;
+ void execute() override;
+
+ NancyFlag _relative;
+ uint16 _hours;
+ uint16 _minutes;
protected:
Common::String getRecordTypeName() const override { return "BumpPlayerClock"; }
diff --git a/engines/nancy/state/scene.cpp b/engines/nancy/state/scene.cpp
index 152098df169..1083bb45eb0 100644
--- a/engines/nancy/state/scene.cpp
+++ b/engines/nancy/state/scene.cpp
@@ -211,6 +211,18 @@ void Scene::unpauseSceneSpecificSounds() {
}
}
+void Scene::setPlayerTime(Time time, NancyFlag relative) {
+ if (relative == kTrue) {
+ // Relative, add the specified time to current playerTime
+ _timers.playerTime += time;
+ } else {
+ // Absolute, maintain days but replace hours and minutes
+ _timers.playerTime = _timers.playerTime.getDays() * 86400000 + time;
+ }
+
+ _timers.playerTimeNextMinute = g_nancy->getTotalPlayTime() + g_nancy->_playerTimeMinuteLength;
+}
+
void Scene::addItemToInventory(uint16 id) {
_flags.items[id] = kTrue;
if (_flags.heldItem == id) {
diff --git a/engines/nancy/state/scene.h b/engines/nancy/state/scene.h
index eda65d3fa58..e999d00a0e9 100644
--- a/engines/nancy/state/scene.h
+++ b/engines/nancy/state/scene.h
@@ -125,6 +125,8 @@ public:
void pauseSceneSpecificSounds();
void unpauseSceneSpecificSounds();
+ void setPlayerTime(Time time, NancyFlag relative);
+
void addItemToInventory(uint16 id);
void removeItemFromInventory(uint16 id, bool pickUp = true);
int16 getHeldItem() const { return _flags.heldItem; }
Commit: a6022cbea737d57655efce302818bb8186f3fab7
https://github.com/scummvm/scummvm/commit/a6022cbea737d57655efce302818bb8186f3fab7
Author: Kaloyan Chehlarski (strahy at outlook.com)
Date: 2023-03-04T02:07:57+02:00
Commit Message:
NANCY: Allow chaining of PrimaryVideos
Added code to allow chaining of PrimaryVideos. This is used in
The Vampire Diaries.
Changed paths:
engines/nancy/action/primaryvideo.cpp
diff --git a/engines/nancy/action/primaryvideo.cpp b/engines/nancy/action/primaryvideo.cpp
index 7ab861e7c8a..f6e0e3b73fa 100644
--- a/engines/nancy/action/primaryvideo.cpp
+++ b/engines/nancy/action/primaryvideo.cpp
@@ -234,7 +234,13 @@ void PlayPrimaryVideoChan0::readData(Common::SeekableReadStream &stream) {
void PlayPrimaryVideoChan0::execute() {
PlayPrimaryVideoChan0 *activeVideo = NancySceneState.getActivePrimaryVideo();
if (activeVideo != this && activeVideo != nullptr) {
- return;
+ if (!activeVideo->_isDone) {
+ return;
+ } else {
+ // Chained videos, hide the previous one and start this
+ activeVideo->setVisible(false);
+ NancySceneState.setActivePrimaryVideo(this);
+ }
}
switch (_state) {
Commit: d27293f11364e64285913a3c96403bc9540fbce4
https://github.com/scummvm/scummvm/commit/d27293f11364e64285913a3c96403bc9540fbce4
Author: Kaloyan Chehlarski (strahy at outlook.com)
Date: 2023-03-04T02:07:57+02:00
Commit Message:
NANCY: Correctly trigger action at end of secondary movie
SecondaryMovie now enters the kActionTrigger state when the
source video runs out of frames.
Changed paths:
engines/nancy/action/secondarymovie.cpp
diff --git a/engines/nancy/action/secondarymovie.cpp b/engines/nancy/action/secondarymovie.cpp
index 14d89b67aeb..9abe56e2800 100644
--- a/engines/nancy/action/secondarymovie.cpp
+++ b/engines/nancy/action/secondarymovie.cpp
@@ -145,7 +145,8 @@ void PlaySecondaryMovie::updateGraphics() {
}
if ((_decoder.getCurFrame() == _lastFrame && _isReverse == kFalse) ||
- (_decoder.getCurFrame() == _firstFrame && _isReverse == kTrue)) {
+ (_decoder.getCurFrame() == _firstFrame && _isReverse == kTrue) ||
+ _decoder.atEnd()) {
if (!g_nancy->_sound->isSoundPlaying(_sound)) {
g_nancy->_sound->stopSound(_sound);
_decoder.stop();
Commit: d4980bd7d438740a22e994f1974b57d4477a6660
https://github.com/scummvm/scummvm/commit/d4980bd7d438740a22e994f1974b57d4477a6660
Author: Kaloyan Chehlarski (strahy at outlook.com)
Date: 2023-03-04T02:07:57+02:00
Commit Message:
NANCY: Change #includes
Changed paths:
engines/nancy/action/actionrecord.h
engines/nancy/action/recordtypes.h
engines/nancy/action/secondarymovie.h
engines/nancy/action/secondaryvideo.h
engines/nancy/action/sliderpuzzle.h
engines/nancy/action/staticbitmapanim.h
engines/nancy/action/telephone.h
diff --git a/engines/nancy/action/actionrecord.h b/engines/nancy/action/actionrecord.h
index 9f693be5699..a9e75ccad34 100644
--- a/engines/nancy/action/actionrecord.h
+++ b/engines/nancy/action/actionrecord.h
@@ -24,6 +24,7 @@
#include "engines/nancy/time.h"
#include "engines/nancy/cursor.h"
+#include "engines/nancy/commontypes.h"
namespace Common {
class SeekableReadStream;
diff --git a/engines/nancy/action/recordtypes.h b/engines/nancy/action/recordtypes.h
index f85e9ce1c3c..703fed1391e 100644
--- a/engines/nancy/action/recordtypes.h
+++ b/engines/nancy/action/recordtypes.h
@@ -22,7 +22,6 @@
#ifndef NANCY_ACTION_RECORDTYPES_H
#define NANCY_ACTION_RECORDTYPES_H
-#include "engines/nancy/commontypes.h"
#include "engines/nancy/renderobject.h"
#include "engines/nancy/action/actionrecord.h"
diff --git a/engines/nancy/action/secondarymovie.h b/engines/nancy/action/secondarymovie.h
index 62991e6e537..8f65b8cb0e2 100644
--- a/engines/nancy/action/secondarymovie.h
+++ b/engines/nancy/action/secondarymovie.h
@@ -23,7 +23,6 @@
#define NANCY_ACTION_SECONDARYMOVIE_H
#include "engines/nancy/video.h"
-#include "engines/nancy/commontypes.h"
#include "engines/nancy/renderobject.h"
#include "engines/nancy/action/actionrecord.h"
diff --git a/engines/nancy/action/secondaryvideo.h b/engines/nancy/action/secondaryvideo.h
index 56b02c01a1b..80ca02ebe0c 100644
--- a/engines/nancy/action/secondaryvideo.h
+++ b/engines/nancy/action/secondaryvideo.h
@@ -23,7 +23,6 @@
#define NANCY_ACTION_SECONDARYVIDEO_H
#include "engines/nancy/video.h"
-#include "engines/nancy/commontypes.h"
#include "engines/nancy/renderobject.h"
#include "engines/nancy/action/actionrecord.h"
diff --git a/engines/nancy/action/sliderpuzzle.h b/engines/nancy/action/sliderpuzzle.h
index 4add2baa4e2..dde39a2ac65 100644
--- a/engines/nancy/action/sliderpuzzle.h
+++ b/engines/nancy/action/sliderpuzzle.h
@@ -22,7 +22,6 @@
#ifndef NANCY_ACTION_SLIDERPUZZLE_H
#define NANCY_ACTION_SLIDERPUZZLE_H
-#include "engines/nancy/commontypes.h"
#include "engines/nancy/renderobject.h"
#include "engines/nancy/action/actionrecord.h"
diff --git a/engines/nancy/action/staticbitmapanim.h b/engines/nancy/action/staticbitmapanim.h
index b83973ec768..7b191c56a3c 100644
--- a/engines/nancy/action/staticbitmapanim.h
+++ b/engines/nancy/action/staticbitmapanim.h
@@ -22,7 +22,6 @@
#ifndef NANCY_ACTION_STATICBITMAPANIM_H
#define NANCY_ACTION_STATICBITMAPANIM_H
-#include "engines/nancy/commontypes.h"
#include "engines/nancy/renderobject.h"
#include "engines/nancy/action/actionrecord.h"
diff --git a/engines/nancy/action/telephone.h b/engines/nancy/action/telephone.h
index 593f91f6846..2c1fb90719a 100644
--- a/engines/nancy/action/telephone.h
+++ b/engines/nancy/action/telephone.h
@@ -22,7 +22,6 @@
#ifndef NANCY_ACTION_TELEPHONE_H
#define NANCY_ACTION_TELEPHONE_H
-#include "engines/nancy/commontypes.h"
#include "engines/nancy/renderobject.h"
#include "engines/nancy/action/actionrecord.h"
Commit: 511ff1a8c38f031c28248acad484c1a45f5e4615
https://github.com/scummvm/scummvm/commit/511ff1a8c38f031c28248acad484c1a45f5e4615
Author: Kaloyan Chehlarski (strahy at outlook.com)
Date: 2023-03-04T02:07:58+02:00
Commit Message:
NANCY: Fix MSVC compiler warning
Fixed a warning for a potentially uninitialized variable in primaryvideo.cpp
Changed paths:
engines/nancy/action/primaryvideo.cpp
diff --git a/engines/nancy/action/primaryvideo.cpp b/engines/nancy/action/primaryvideo.cpp
index f6e0e3b73fa..c5756a86199 100644
--- a/engines/nancy/action/primaryvideo.cpp
+++ b/engines/nancy/action/primaryvideo.cpp
@@ -416,7 +416,7 @@ void PlayPrimaryVideoChan0::addGoodbye() {
newResponse.text = g_nancy->getStaticData().goodbyeTexts[_goodbyeResponseCharacterID];
// Evaluate conditions to pick from the collection of replies
- uint sceneChangeID;
+ uint sceneChangeID = 0;
for (uint i = 0; i < res.sceneChanges.size(); ++i) {
const GoodbyeSceneChange &sc = res.sceneChanges[i];
if (sc.flagConditions.size() == 0) {
More information about the Scummvm-git-logs
mailing list