[Scummvm-git-logs] scummvm master -> 528d7477e826c384ef660a17d343b28423023b50
fracturehill
noreply at scummvm.org
Wed Mar 22 18:18:10 UTC 2023
This automated email contains information about 5 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
1dea184830 NANCY: Fix map video looping
0546940929 NANCY: Remove ciftree warning in The Vampire Diaries
bee7cee29e NANCY: Clean up detection.cpp
b0c7e3f4c1 NANCY: Clean up TODOs
528d7477e8 NANCY: Pause map music in The Vampire Diares
Commit: 1dea184830c149b98883bae64c226e9ad76ce451
https://github.com/scummvm/scummvm/commit/1dea184830c149b98883bae64c226e9ad76ce451
Author: Kaloyan Chehlarski (strahy at outlook.com)
Date: 2023-03-22T20:07:36+02:00
Commit Message:
NANCY: Fix map video looping
Fixed the looping of the map video so the last frame doesn't get played
for double the time it should.
Changed paths:
engines/nancy/state/map.cpp
diff --git a/engines/nancy/state/map.cpp b/engines/nancy/state/map.cpp
index 71038c19e5d..5a12509b37d 100644
--- a/engines/nancy/state/map.cpp
+++ b/engines/nancy/state/map.cpp
@@ -129,7 +129,7 @@ void Map::MapViewport::init() {
void Map::MapViewport::updateGraphics() {
// TODO: One frame plays for longer than it should
if (_decoder.getFrameCount() > 1) {
- if (_decoder.atEnd()) {
+ if (_decoder.endOfVideo()) {
_decoder.rewind();
}
Commit: 0546940929690cae89d4bb5cf4df6f45976f63f6
https://github.com/scummvm/scummvm/commit/0546940929690cae89d4bb5cf4df6f45976f63f6
Author: Kaloyan Chehlarski (strahy at outlook.com)
Date: 2023-03-22T20:07:36+02:00
Commit Message:
NANCY: Remove ciftree warning in The Vampire Diaries
Changed paths:
engines/nancy/resource.cpp
diff --git a/engines/nancy/resource.cpp b/engines/nancy/resource.cpp
index 32c60e3e101..0f8f6d134d5 100644
--- a/engines/nancy/resource.cpp
+++ b/engines/nancy/resource.cpp
@@ -625,7 +625,9 @@ const CifTree *ResourceManager::findCifTree(const Common::String &name) const {
}
void ResourceManager::initialize() {
- loadCifTree("ciftree", "dat");
+ if (g_nancy->getGameType() != kGameTypeVampire) {
+ loadCifTree("ciftree", "dat");
+ }
}
bool ResourceManager::getCifInfo(const Common::String &name, CifInfo &info) const {
Commit: bee7cee29ec0ff7d43bc796ecb3cd20958303fdd
https://github.com/scummvm/scummvm/commit/bee7cee29ec0ff7d43bc796ecb3cd20958303fdd
Author: Kaloyan Chehlarski (strahy at outlook.com)
Date: 2023-03-22T20:07:36+02:00
Commit Message:
NANCY: Clean up detection.cpp
Removed a commented-out include and added some missing whitespaces.
Changed paths:
engines/nancy/detection.cpp
diff --git a/engines/nancy/detection.cpp b/engines/nancy/detection.cpp
index b00450b4f05..62e5476d4a7 100644
--- a/engines/nancy/detection.cpp
+++ b/engines/nancy/detection.cpp
@@ -22,7 +22,6 @@
#include "common/config-manager.h"
#include "engines/nancy/detection.h"
-//#include "engines/nancy/dialogs.h"
const char *const directoryGlobs[] = {
"game",
@@ -32,9 +31,9 @@ const char *const directoryGlobs[] = {
};
static const DebugChannelDef debugFlagList[] = {
- {Nancy::kDebugEngine, "Engine", "Engine debug level"},
- {Nancy::kDebugActionRecord, "ActionRecord", "Action Record debug level"},
- {Nancy::kDebugScene, "Scene", "Scene debug level"},
+ { Nancy::kDebugEngine, "Engine", "Engine debug level" },
+ { Nancy::kDebugActionRecord, "ActionRecord", "Action Record debug level" },
+ { Nancy::kDebugScene, "Scene", "Scene debug level" },
DEBUG_CHANNEL_END
};
Commit: b0c7e3f4c199f4387c6ffd0512d752f646339970
https://github.com/scummvm/scummvm/commit/b0c7e3f4c199f4387c6ffd0512d752f646339970
Author: Kaloyan Chehlarski (strahy at outlook.com)
Date: 2023-03-22T20:07:37+02:00
Commit Message:
NANCY: Clean up TODOs
Changed paths:
engines/nancy/action/actionmanager.cpp
engines/nancy/action/arfactory.cpp
engines/nancy/action/recordtypes.cpp
engines/nancy/action/recordtypes.h
engines/nancy/nancy.cpp
engines/nancy/state/map.cpp
engines/nancy/state/scene.cpp
engines/nancy/state/scene.h
diff --git a/engines/nancy/action/actionmanager.cpp b/engines/nancy/action/actionmanager.cpp
index e66e1e343ac..9b01acbb611 100644
--- a/engines/nancy/action/actionmanager.cpp
+++ b/engines/nancy/action/actionmanager.cpp
@@ -218,7 +218,6 @@ void ActionManager::processActionRecords() {
break;
case DependencyType::kElapsedPlayerTime:
- // TODO almost definitely wrong, as the original engine treats player time differently
if (NancySceneState._timers.playerTime >= dep.timeData) {
dep.satisfied = true;
}
diff --git a/engines/nancy/action/arfactory.cpp b/engines/nancy/action/arfactory.cpp
index 0ee115932c1..10cd067a177 100644
--- a/engines/nancy/action/arfactory.cpp
+++ b/engines/nancy/action/arfactory.cpp
@@ -37,7 +37,6 @@
namespace Nancy {
namespace Action {
-// TODO put this function in a subclass
ActionRecord *ActionManager::createActionRecord(uint16 type) {
type -= 0xA;
switch (type) {
diff --git a/engines/nancy/action/recordtypes.cpp b/engines/nancy/action/recordtypes.cpp
index 3bd8f839442..7729a7ad36c 100644
--- a/engines/nancy/action/recordtypes.cpp
+++ b/engines/nancy/action/recordtypes.cpp
@@ -409,7 +409,6 @@ void WinGame::execute() {
g_nancy->_sound->stopAndUnloadSpecificSounds();
g_nancy->setState(NancyState::kCredits, NancyState::kMainMenu);
- // TODO replace with destroy()?
NancySceneState.resetStateToInit();
_isDone = true;
}
diff --git a/engines/nancy/action/recordtypes.h b/engines/nancy/action/recordtypes.h
index 262682e75cf..33fa05e23c0 100644
--- a/engines/nancy/action/recordtypes.h
+++ b/engines/nancy/action/recordtypes.h
@@ -338,7 +338,6 @@ class PlayDigiSoundAndDie : public ActionRecord {
public:
void readData(Common::SeekableReadStream &stream) override;
void execute() override;
- // TODO subclass into Play and Stop (?)
SoundDescription _sound;
SceneChangeDescription _sceneChange;
diff --git a/engines/nancy/nancy.cpp b/engines/nancy/nancy.cpp
index 5888b9e927f..8faf56fbbb6 100644
--- a/engines/nancy/nancy.cpp
+++ b/engines/nancy/nancy.cpp
@@ -177,7 +177,6 @@ void NancyEngine::setState(NancyState::NancyState state, NancyState::NancyState
s->onStateExit();
}
- // TODO until the game's own menus are implemented we simply open the GMM
openMainMenuDialog();
if (shouldQuit()) {
diff --git a/engines/nancy/state/map.cpp b/engines/nancy/state/map.cpp
index 5a12509b37d..c6bfea97a55 100644
--- a/engines/nancy/state/map.cpp
+++ b/engines/nancy/state/map.cpp
@@ -127,7 +127,6 @@ void Map::MapViewport::init() {
}
void Map::MapViewport::updateGraphics() {
- // TODO: One frame plays for longer than it should
if (_decoder.getFrameCount() > 1) {
if (_decoder.endOfVideo()) {
_decoder.rewind();
diff --git a/engines/nancy/state/scene.cpp b/engines/nancy/state/scene.cpp
index 6b9de304881..7a80ed5b211 100644
--- a/engines/nancy/state/scene.cpp
+++ b/engines/nancy/state/scene.cpp
@@ -383,7 +383,6 @@ void Scene::synchronize(Common::Serializer &ser) {
ser.syncAsUint32LE((uint32 &)_flags.logicConditions[i].timestamp);
}
- // TODO hardcoded inventory size
auto &order = getInventoryBox()._order;
uint prevSize = getInventoryBox()._order.size();
getInventoryBox()._order.resize(g_nancy->getStaticData().numItems);
@@ -405,7 +404,6 @@ void Scene::synchronize(Common::Serializer &ser) {
getInventoryBox().onReorder();
}
- // TODO hardcoded inventory size
ser.syncArray(_flags.items.data(), g_nancy->getStaticData().numItems, Common::Serializer::Byte);
ser.syncAsSint16LE(_flags.heldItem);
g_nancy->_cursorManager->setCursorItemID(_flags.heldItem);
@@ -420,7 +418,6 @@ void Scene::synchronize(Common::Serializer &ser) {
g_nancy->setTotalPlayTime((uint32)_timers.lastTotalTime);
- // TODO hardcoded number of event flags
ser.syncArray(_flags.eventFlags.data(), g_nancy->getStaticData().numEventFlags, Common::Serializer::Byte);
ser.syncArray<uint16>(_flags.sceneHitCount, (uint16)2001, Common::Serializer::Uint16LE);
@@ -594,13 +591,6 @@ void Scene::load() {
}
void Scene::run() {
- if (_isComingFromMenu) {
- // TODO
- }
-
- _isComingFromMenu = false;
-
-
if (_gameStateRequested != NancyState::kNone) {
g_nancy->setState(_gameStateRequested);
diff --git a/engines/nancy/state/scene.h b/engines/nancy/state/scene.h
index cbcce1951b2..3efcacc1c4e 100644
--- a/engines/nancy/state/scene.h
+++ b/engines/nancy/state/scene.h
@@ -266,7 +266,6 @@ private:
State _state;
- bool _isComingFromMenu = true;
bool _shouldClearTextbox = true;
};
Commit: 528d7477e826c384ef660a17d343b28423023b50
https://github.com/scummvm/scummvm/commit/528d7477e826c384ef660a17d343b28423023b50
Author: Kaloyan Chehlarski (strahy at outlook.com)
Date: 2023-03-22T20:07:37+02:00
Commit Message:
NANCY: Pause map music in The Vampire Diares
The map music is now correctly paused when switching to a different
state, e.g. the help screen.
Changed paths:
engines/nancy/state/scene.cpp
diff --git a/engines/nancy/state/scene.cpp b/engines/nancy/state/scene.cpp
index 7a80ed5b211..424abc05a56 100644
--- a/engines/nancy/state/scene.cpp
+++ b/engines/nancy/state/scene.cpp
@@ -31,6 +31,7 @@
#include "engines/nancy/util.h"
#include "engines/nancy/state/scene.h"
+#include "engines/nancy/state/map.h"
#include "engines/nancy/ui/button.h"
#include "engines/nancy/ui/ornaments.h"
@@ -210,7 +211,13 @@ void Scene::popScene() {
}
void Scene::pauseSceneSpecificSounds() {
- // TODO missing if, same condition as the one in SoundManager::stopAndUnloadSpecificSounds
+ if (g_nancy->getGameType() == kGameTypeVampire && Nancy::State::Map::hasInstance()) {
+ // Don't stop the map sound in certain scenes
+ uint currentScene = _sceneState.currentScene.sceneID;
+ if (currentScene == 0 || (currentScene >= 15 && currentScene <= 27)) {
+ g_nancy->_sound->pauseSound(NancyMapState.getSound(), true);
+ }
+ }
for (uint i = 0; i < 10; ++i) {
g_nancy->_sound->pauseSound(i, true);
@@ -218,6 +225,14 @@ void Scene::pauseSceneSpecificSounds() {
}
void Scene::unpauseSceneSpecificSounds() {
+ if (g_nancy->getGameType() == kGameTypeVampire && Nancy::State::Map::hasInstance()) {
+ // Don't stop the map sound in certain scenes
+ uint currentScene = _sceneState.currentScene.sceneID;
+ if (currentScene == 0 || (currentScene >= 15 && currentScene <= 27)) {
+ g_nancy->_sound->pauseSound(NancyMapState.getSound(), false);
+ }
+ }
+
for (uint i = 0; i < 10; ++i) {
g_nancy->_sound->pauseSound(i, false);
}
More information about the Scummvm-git-logs
mailing list