diff options
author | Bastien Bouclet | 2018-06-17 14:44:31 +0200 |
---|---|---|
committer | Bastien Bouclet | 2018-06-29 13:31:54 +0200 |
commit | 2e8d08c1d0d626b1dd9c69c951de07aec7fd4bb4 (patch) | |
tree | 9cef8c38650cd5605ac40cde4173e562ab890ebe /engines/mohawk/riven_card.cpp | |
parent | 0ca52f62a4b475081f77eb933934c8f3448f33e2 (diff) | |
download | scummvm-rg350-2e8d08c1d0d626b1dd9c69c951de07aec7fd4bb4.tar.gz scummvm-rg350-2e8d08c1d0d626b1dd9c69c951de07aec7fd4bb4.tar.bz2 scummvm-rg350-2e8d08c1d0d626b1dd9c69c951de07aec7fd4bb4.zip |
MOHAWK: RIVEN: Add a save button to the main menu
Diffstat (limited to 'engines/mohawk/riven_card.cpp')
-rw-r--r-- | engines/mohawk/riven_card.cpp | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/engines/mohawk/riven_card.cpp b/engines/mohawk/riven_card.cpp index 031a88163b..d2f8d4f42d 100644 --- a/engines/mohawk/riven_card.cpp +++ b/engines/mohawk/riven_card.cpp @@ -25,6 +25,7 @@ #include "mohawk/cursors.h" #include "mohawk/riven_graphics.h" #include "mohawk/riven_stack.h" +#include "mohawk/riven_stacks/aspit.h" #include "mohawk/riven_video.h" #include "mohawk/resource.h" @@ -81,6 +82,7 @@ void RivenCard::applyPatches(uint16 id) { } applyPropertiesPatch22118(globalId); + applyPropertiesPatchE2E(globalId); } void RivenCard::applyPropertiesPatch8EB7(uint32 globalId) { @@ -390,6 +392,50 @@ void RivenCard::applyPropertiesPatch22118(uint32 globalId) { } } +void RivenCard::applyPropertiesPatchE2E(uint32 globalId) { + // The main menu in the Myst 25th anniversary version is patched to include new items: + // - Save game + if (globalId == 0xE2E) { + uint16 patchData[] = { + 24, // blstId + 0xFFFF, // name + 485, // left + 311, // top + 602, // right + 326, // bottom + 0, // u0 + kRivenMainCursor, // cursor + 4, // index + 0xFFFF, // transition offset + 0, // flags + 2, // script count + + kMouseDownScript, // script type + 1, // command count + kRivenCommandRunExternal, // command type + 2, // argument count + RivenStacks::ASpit::kExternalSaveGame, // external command name id + 0, // external argument count + + kMouseInsideScript, // script type + 1, // command count + kRivenCommandChangeCursor, // command type + 1, // argument count + kRivenOpenHandCursor // cursor + }; + + // Script data is expected to be in big endian + for (uint i = 0; i < ARRAYSIZE(patchData); i++) { + patchData[i] = TO_BE_16(patchData[i]); + } + + // Add the new hotspot to the existing ones + Common::MemoryReadStream patchStream((const byte *)(patchData), ARRAYSIZE(patchData) * sizeof(uint16)); + RivenHotspot *newHotspot = new RivenHotspot(_vm, &patchStream); + _hotspots.push_back(newHotspot); + } +} + void RivenCard::enter(bool unkMovies) { setCurrentCardVariable(); |