[Scummvm-git-logs] scummvm master -> d40e408fc8a977d8ba44c5684459a315eab8b974
fracturehill
noreply at scummvm.org
Fri Jan 5 22:43:12 UTC 2024
This automated email contains information about 4 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
0d6f44f0eb NANCY: Improve support for nancy7 save menu
5361a7fa1e NANCY: Swap inverted rotation cursors
a5ebc7cb8a NANCY: Fix AddInventoryNoHS record
d40e408fc8 NANCY: Fix nancy6 caption
Commit: 0d6f44f0eb78e2717f5e4323c96b443bd9cec951
https://github.com/scummvm/scummvm/commit/0d6f44f0eb78e2717f5e4323c96b443bd9cec951
Author: Kaloyan Chehlarski (strahy at outlook.com)
Date: 2024-01-05T23:42:02+01:00
Commit Message:
NANCY: Improve support for nancy7 save menu
The nancy7 (and only nancy7) save menu has two extra
strings in the LOAD chunk: one for the text that will appear
when a save slot is empty, and a default save prefix when
the player inputs an empty save name. Both of these are
now correctly loaded and used.
Changed paths:
engines/nancy/enginedata.cpp
engines/nancy/enginedata.h
engines/nancy/state/loadsave.cpp
diff --git a/engines/nancy/enginedata.cpp b/engines/nancy/enginedata.cpp
index e46823127fa..04e930ef631 100644
--- a/engines/nancy/enginedata.cpp
+++ b/engines/nancy/enginedata.cpp
@@ -487,6 +487,8 @@ LOAD::LOAD(Common::SeekableReadStream *chunkStream) :
readRect(s, _cancelButtonDisabledSrc);
readFilename(s, _gameSavedPopup, kGameTypeNancy3);
+ readFilename(s, _emptySaveText, kGameTypeNancy7);
+ readFilename(s, _defaultSaveNamePrefix, kGameTypeNancy7);
s.skip(16, kGameTypeNancy3);
}
}
diff --git a/engines/nancy/enginedata.h b/engines/nancy/enginedata.h
index 29d6c02e762..cf053a71bca 100644
--- a/engines/nancy/enginedata.h
+++ b/engines/nancy/enginedata.h
@@ -292,6 +292,8 @@ struct LOAD : public EngineData {
Common::Rect _cancelButtonDisabledSrc;
Common::Path _gameSavedPopup;
+ Common::String _emptySaveText;
+ Common::String _defaultSaveNamePrefix;
// Common::Rect _gameSavedBounds
};
diff --git a/engines/nancy/state/loadsave.cpp b/engines/nancy/state/loadsave.cpp
index e09f3896918..4d8911a80dc 100644
--- a/engines/nancy/state/loadsave.cpp
+++ b/engines/nancy/state/loadsave.cpp
@@ -177,7 +177,11 @@ void LoadSaveMenu::init() {
_filenameStrings[i] = desc.getDescription();
} else {
// If no valid save, copy over the empty save string
- _filenameStrings[i] = g_nancy->getStaticData().emptySaveText;
+ if (_loadSaveData->_emptySaveText.size()) {
+ _filenameStrings[i] = _loadSaveData->_emptySaveText;
+ } else {
+ _filenameStrings[i] = g_nancy->getStaticData().emptySaveText;
+ }
}
}
@@ -493,8 +497,40 @@ void LoadSaveMenu::save() {
// Improvement: not providing a name doesn't result in the
// savefile being named "--- Empty ---" or "Nothing Saved Here".
// Instead, we use ScummVM's built-in save name generator
- g_nancy->saveGameState(_selectedSave + 1, _enteredString.size() ? _enteredString :
- _filenameStrings[_selectedSave].equals(g_nancy->getStaticData().emptySaveText) ? Common::String() : _filenameStrings[_selectedSave], false);
+
+ // This does not apply to nancy7, where a default name is provided in
+ // the LOAD chunk, and has a number appended to the end
+
+ Common::String finalDesc = _enteredString;
+ if (!finalDesc.size()) {
+ if (_loadSaveData->_defaultSaveNamePrefix.size()) {
+ if (_filenameStrings[_selectedSave].equals(_loadSaveData->_emptySaveText)) {
+ uint suffixNum = 1;
+ for (int i = 1; i < g_nancy->getMetaEngine()->getMaximumSaveSlot(); ++i) {
+ if (i == _selectedSave + 1) {
+ continue;
+ }
+
+ SaveStateDescriptor desc = g_nancy->getMetaEngine()->querySaveMetaInfos(ConfMan.getActiveDomainName().c_str(), i);
+ if (desc.getDescription().substr(0, _loadSaveData->_defaultSaveNamePrefix.size()).equals(Common::U32String(_loadSaveData->_defaultSaveNamePrefix))) {
+ if (desc.getDescription().substr(_loadSaveData->_defaultSaveNamePrefix.size(), 1).asUint64() == suffixNum) {
+ ++suffixNum;
+ } else {
+ break;
+ }
+ }
+ }
+
+ finalDesc = _loadSaveData->_defaultSaveNamePrefix + ('0' + suffixNum);
+ }
+ } else {
+ if (!_filenameStrings[_selectedSave].equals(g_nancy->getStaticData().emptySaveText)) {
+ finalDesc = _filenameStrings[_selectedSave];
+ }
+ }
+ }
+
+ g_nancy->saveGameState(_selectedSave + 1, finalDesc, false);
// Feed the new name back into the list of saves
SaveStateDescriptor desc = g_nancy->getMetaEngine()->querySaveMetaInfos(ConfMan.getActiveDomainName().c_str(), _selectedSave + 1);
Commit: 5361a7fa1e566c3953caf89d1ebeb10ce654d5ff
https://github.com/scummvm/scummvm/commit/5361a7fa1e566c3953caf89d1ebeb10ce654d5ff
Author: Kaloyan Chehlarski (strahy at outlook.com)
Date: 2024-01-05T23:42:03+01:00
Commit Message:
NANCY: Swap inverted rotation cursors
Swapped the cursors used when a scene has inverted
360-degree rotation (so, when the player is rotating
around an object instead of in place; e.g. nancy6 scene 2200),
so that they're now correct.
Changed paths:
engines/nancy/cursor.h
diff --git a/engines/nancy/cursor.h b/engines/nancy/cursor.h
index 1d8205488eb..eccfd2df450 100644
--- a/engines/nancy/cursor.h
+++ b/engines/nancy/cursor.h
@@ -49,8 +49,8 @@ public:
kMoveDown = 11, // Used for movement
kRotateLeft = 12, // Used in 360 scenes in nancy6 and up
kRotateRight = 13, // Used in 360 scenes in nancy6 and up
- kInvertedRotateLeft = 14, // Used in 360 scenes with inverted rotation; nancy6 and up
- kInvertedRotateRight = 15, // Used in 360 scenes with inverted rotation; nancy6 and up
+ kInvertedRotateRight = 14, // Used in 360 scenes with inverted rotation; nancy6 and up
+ kInvertedRotateLeft = 15, // Used in 360 scenes with inverted rotation; nancy6 and up
kNormalArrow,
kHotspotArrow
};
Commit: a5ebc7cb8a95d9f2eca6fb25add8449d6672b388
https://github.com/scummvm/scummvm/commit/a5ebc7cb8a95d9f2eca6fb25add8449d6672b388
Author: Kaloyan Chehlarski (strahy at outlook.com)
Date: 2024-01-05T23:42:03+01:00
Commit Message:
NANCY: Fix AddInventoryNoHS record
Fixed an issue where AddInventoryNoHS would force an
item to be forever held by the player, if it is already in
the player's inventory prior to the record's execution.
Changed paths:
engines/nancy/action/inventoryrecords.cpp
diff --git a/engines/nancy/action/inventoryrecords.cpp b/engines/nancy/action/inventoryrecords.cpp
index 003db016df8..9bc1001ea1a 100644
--- a/engines/nancy/action/inventoryrecords.cpp
+++ b/engines/nancy/action/inventoryrecords.cpp
@@ -46,12 +46,20 @@ void AddInventoryNoHS::execute() {
// Currently holding another item
if (_forceCursor) {
NancySceneState.addItemToInventory(NancySceneState.getHeldItem());
- NancySceneState.setHeldItem(_itemID);
+ if (NancySceneState.hasItem(_itemID) == g_nancy->_true) {
+ NancySceneState.removeItemFromInventory(_itemID, true);
+ } else {
+ NancySceneState.setHeldItem(_itemID);
+ }
} else {
NancySceneState.addItemToInventory(_itemID);
}
} else {
- NancySceneState.setHeldItem(_itemID);
+ if (NancySceneState.hasItem(_itemID) == g_nancy->_true) {
+ NancySceneState.removeItemFromInventory(_itemID, true);
+ } else {
+ NancySceneState.setHeldItem(_itemID);
+ }
}
} else {
if (NancySceneState.hasItem(_itemID) == g_nancy->_false) {
Commit: d40e408fc8a977d8ba44c5684459a315eab8b974
https://github.com/scummvm/scummvm/commit/d40e408fc8a977d8ba44c5684459a315eab8b974
Author: Kaloyan Chehlarski (strahy at outlook.com)
Date: 2024-01-05T23:42:22+01:00
Commit Message:
NANCY: Fix nancy6 caption
Changed the execution of Conversation records in nancy6
and up, so that the kBegin state falls through to the kRun
one and submits its caption to the Textbox immediately.
This fixes the text displayed in nancy6 scene 1299, where
a subsequent TextboxWrite record overwrites the
Conversation caption with a longer one.
Changed paths:
engines/nancy/action/conversation.cpp
diff --git a/engines/nancy/action/conversation.cpp b/engines/nancy/action/conversation.cpp
index 58b581dfb05..7db7a081637 100644
--- a/engines/nancy/action/conversation.cpp
+++ b/engines/nancy/action/conversation.cpp
@@ -157,10 +157,17 @@ void ConversationSound::execute() {
// Do not draw first frame since video won't be loaded yet
g_nancy->_graphicsManager->suppressNextDraw();
- // Do not fall through to give the execution one loop for event flag changes
- // This fixes TVD scene 750
- break;
+ if (g_nancy->getGameType() < kGameTypeNancy6) {
+ // Do not fall through to give the execution one loop for event flag changes
+ // This fixes TVD scene 750
+ break;
+ }
+
+ // However, nancy6 scene 1299 requires us to fall through in order to get the correct caption.
+ // By that point Conversation scenes weren't the tangled mess they were in earlier games,
+ // so hopefully this won't break anything
}
+ // fall through
case kRun:
if (!_hasDrawnTextbox) {
_hasDrawnTextbox = true;
More information about the Scummvm-git-logs
mailing list