[Scummvm-git-logs] scummvm master -> db4376ffeb558bf8b21eae37c6ddbc381f783729
mgerhardy
martin.gerhardy at gmail.com
Wed Jan 13 21:20:32 UTC 2021
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:
0f1ef89842 TWINE: refactored holomap loop
1b67a288ab TWINE: added basic support for dotemu enhanced version file paths
8e73626566 TWINE: implemented missing script opscode 0x06
db4376ffeb TWINE: some scenes are not stored in the savegame
Commit: 0f1ef89842768479181b0c46ae1d372c8975cc34
https://github.com/scummvm/scummvm/commit/0f1ef89842768479181b0c46ae1d372c8975cc34
Author: Martin Gerhardy (martin.gerhardy at gmail.com)
Date: 2021-01-13T22:08:47+01:00
Commit Message:
TWINE: refactored holomap loop
Changed paths:
engines/twine/holomap.cpp
engines/twine/holomap.h
diff --git a/engines/twine/holomap.cpp b/engines/twine/holomap.cpp
index c2eb570724..ff2a20ed77 100644
--- a/engines/twine/holomap.cpp
+++ b/engines/twine/holomap.cpp
@@ -263,6 +263,165 @@ int sub_2654F(int a1, int a2)
#endif
+void Holomap::renderLocations(int xRot, int yRot, int zRot, bool lower) {
+ int n = 0;
+ for (int locationIdx = 0; locationIdx < NUM_LOCATIONS; ++locationIdx) {
+ if ((_engine->_gameState->holomapFlags[locationIdx] & 0x80) || locationIdx == _engine->_scene->currentSceneIdx) {
+ uint8 flags = _engine->_gameState->holomapFlags[locationIdx] & 1;
+ if (locationIdx == _engine->_scene->currentSceneIdx) {
+ flags |= 2u; // model type
+ }
+#if 0
+ const Location &loc = _locations[locationIdx];
+ _engine->_renderer->setBaseRotation(angles);
+ _engine->_renderer->getBaseRotationPosition(loc.x, loc.y, loc.z);
+ int32 v20 = _engine->_renderer->destX;
+ int32 v19 = _engine->_renderer->destZ;
+ int32 v18 = _engine->_renderer->destY;
+ _engine->_renderer->getBaseRotationPosition(v9, v4);
+ _engine->_renderer->setBaseRotation(v4);
+ _engine->_renderer->baseRotPosX = 0;
+ _engine->_renderer->baseRotPosY = 0;
+ _engine->_renderer->baseRotPosZ = 9500;
+ _engine->_renderer->getBaseRotationPosition(v10, v4);
+ int32 v21 = _engine->_renderer->destY;
+ _engine->_renderer->getBaseRotationPosition(v11, v4);
+ if (lower) {
+ if (v21 > _engine->_renderer->destY) {
+ continue;
+ }
+ } else {
+ if (v21 < _engine->_renderer->destY) {
+ continue;
+ }
+ }
+
+ DrawListStruct &drawList = _engine->_redraw->drawList[n];
+ drawList.posValue = locationIdx;
+ drawList.y = v18; // ? TODO
+ drawList.z = v19;
+ drawList.x = v20;
+ drawList.y = v21;
+ drawList.field_A = flags;
+#endif
+ ++n;
+ }
+ }
+ // TODO: sort drawlist (for what? y?)
+#if 0
+ for (int v13 = 0; v13 < n; ++v13) {
+ const DrawListStruct &drawList = _engine->_redraw->drawList[n];
+ const uint8 flags = drawList.field_A;
+ const uint8* bodyPtr = nullptr;
+ if (flags < 2u) {
+ if (flags == 1) {
+ bodyPtr = _engine->_resources->holomapArrowPtr;
+ }
+ } else {
+ if (flags <= 2u) {
+ bodyPtr = _engine->_resources->holomapTwinsenModelPtr;
+ } else {
+ if (flags == 3) {
+ bodyPtr = _engine->_resources->holomapTwinsenArrowPtr;
+ }
+ }
+ }
+ if (bodyPtr != nullptr) {
+ _engine->_renderer->renderIsoModel(x, y, z, angleX, angleY, angleZ, bodyPtr);
+ }
+ }
+
+ _engine->_renderer->setCameraAngle();
+
+ _engine->_renderer->baseRotPosX = 0;
+ _engine->_renderer->baseRotPosY = 0;
+ _engine->_renderer->baseRotPosZ = 9500;
+ v12 = -256;
+ v1 = videoPtr1;
+ v2 = videoPtr2; // holomap surface - 748 * 4 == 4488 (size of that buffer)
+ v3 = videoPtr11; // rotated x and y positions sorted
+ do {
+ v13 = 0;
+ while (1) {
+ v7 = v2 + 2; // rot y
+ v8 = v2 + 4; // rot z
+ if (v13 >= 1024) {// 1024 == 360 degree
+ break;
+ }
+ destZ = *(_WORD *)v7;
+ v4 = *(_WORD *)v8;
+ destX = *(_WORD *)v2;
+ destY = v4;
+ v2 += 6; // advance to next entry in holomap surface surface coordinates
+ sub_2654F(v8, v0);
+ if (v12 != 256) {
+ *(_WORD *)v3 = destY;
+ v5 = v3 + 2;
+ *(_WORD *)v5 = (v1 - videoPtr1) >> 1;
+ v3 = v5 + 2;
+ }
+ _engine->_renderer->projectPositionOnScreen(v0);
+ *(_WORD *)v1 = _engine->_renderer->projPosX;
+ v6 = v1 + 2;
+ v13 += 32;
+ *(_WORD *)v6 = _engine->_renderer->projPosY;
+ v1 = v6 + 6;
+ }
+ destZ = *(_WORD *)v7;
+ destY = *(_WORD *)v8;
+ destX = *(_WORD *)v2;
+ v2 += 6;
+ sub_2654F(v8, v0);
+ _engine->_renderer->projectPositionOnScreen(v0);
+ *(_WORD *)v1 = _engine->_renderer->projPosX;
+ v10 = v1 + 2;
+ v12 += 32;
+ *(_WORD *)v10 = _engine->_renderer->projPosY;
+ v1 = v10 + 6;
+ } while (v12 <= 256);
+ qsort(videoPtr11, 512, 4, sortHolomapSurfaceCoordsByX);
+
+ v1 = 0;
+ do { // y
+ v2 = videoPtr1 + 2 * *(_WORD *)(v1 + videoPtr11 + 2);
+ backDialogueBoxRight = *(_WORD *)v2;
+ backDialogueBoxBottom = *(_WORD *)(v2 + 2);
+ back2DialogueBoxRight = *(_WORD *)(v2 + 264);
+ back2DialogueBoxBottom = *(_WORD *)(v2 + 266);
+ back3DialogueBoxRight = *(_WORD *)(v2 + 8);
+ back3DialogueBoxBottom = *(_WORD *)(v2 + 10);
+ if (sub_26DAB(v0)) {
+ word_4B776 = *(_WORD *)(v2 + 4);
+ word_4B778 = *(_WORD *)(v2 + 6);
+ word_4B77C = *(_WORD *)(v2 + 268);
+ word_4B77E = *(_WORD *)(v2 + 270);
+ word_4B782 = *(_WORD *)(v2 + 12);
+ word_4B784 = *(_WORD *)(v2 + 14);
+ sub_2E894(); // handles polyTab, polyTab2, circleBuffer, maybe model rendering?
+ sub_2F1D1(v0); // some kind of blitting?
+ }
+ backDialogueBoxRight = *(_WORD *)(v2 + 264);
+ backDialogueBoxBottom = *(_WORD *)(v2 + 266);
+ back2DialogueBoxRight = *(_WORD *)(v2 + 272);
+ back2DialogueBoxBottom = *(_WORD *)(v2 + 274);
+ back3DialogueBoxRight = *(_WORD *)(v2 + 8);
+ back3DialogueBoxBottom = *(_WORD *)(v2 + 10);
+ v3 = sub_26DAB(v0);
+ if (v3) {
+ word_4B776 = *(_WORD *)(v2 + 268);
+ word_4B778 = *(_WORD *)(v2 + 270);
+ word_4B77C = *(_WORD *)(v2 + 276);
+ word_4B77E = *(_WORD *)(v2 + 278);
+ word_4B782 = *(_WORD *)(v2 + 12);
+ word_4B784 = *(_WORD *)(v2 + 14);
+ sub_2E894();
+ LOBYTE(v3) = sub_2F1D1(v0); // some kind of blitting?
+ }
+ v1 += 4;
+ } while (v1 != 4 * 512);
+#endif
+}
+
void Holomap::processHolomap() {
ScopedEngineFreeze freeze(_engine);
@@ -339,181 +498,28 @@ void Holomap::processHolomap() {
redraw = true;
}
- if (rotate && xRot == _locations[currentLocation].x && yRot == _locations[currentLocation].y) {
- rotate = false;
- }
-
if (redraw) {
redraw = false;
-#if 0
- _engine->_interface->blitBox(rect, _engine->workVideoBuffer, _engine->frontVideoBuffer);
- _engine->_renderer->setCameraAngle();
- _engine->_renderer->setLightVector(v0);
-#endif
- int n = 0;
- for (int locationIdx = 0; locationIdx < NUM_LOCATIONS; ++locationIdx) {
- if ((_engine->_gameState->holomapFlags[locationIdx] & 0x80) || locationIdx == _engine->_scene->currentSceneIdx) {
- uint8 flags = _engine->_gameState->holomapFlags[locationIdx] & 1;
- if (locationIdx == _engine->_scene->currentSceneIdx) {
- flags |= 2u; // model type
- }
-#if 0
- const Location &loc = _locations[locationIdx];
- _engine->_renderer->setBaseRotation(angles);
- _engine->_renderer->getBaseRotationPosition(loc.x, loc.y, loc.z);
- int32 v20 = _engine->_renderer->destX;
- int32 v19 = _engine->_renderer->destZ;
- int32 v18 = _engine->_renderer->destY;
- _engine->_renderer->getBaseRotationPosition(v9, v4);
- _engine->_renderer->setBaseRotation(v4);
- _engine->_renderer->baseRotPosX = 0;
- _engine->_renderer->baseRotPosY = 0;
- _engine->_renderer->baseRotPosZ = 9500;
- _engine->_renderer->getBaseRotationPosition(v10, v4);
- int32 v21 = _engine->_renderer->destY;
- _engine->_renderer->getBaseRotationPosition(v11, v4);
- if (a4) {
- if (v21 > _engine->_renderer->destY) {
- continue;
- }
- } else {
- if (v21 < _engine->_renderer->destY) {
- continue;
- }
- }
-
- DrawListStruct &drawList = _engine->_redraw->drawList[n];
- drawList.posValue = locationIdx;
- drawList.y = v18; // ? TODO
- drawList.z = v19;
- drawList.x = v20;
- drawList.y = v21;
- drawList.field_A = flags;
-#endif
- ++n;
- }
- }
- // TODO: sort drawlist (for what? y?)
-#if 0
- for (int v13 = 0; v13 < n; ++v13) {
- const DrawListStruct &drawList = _engine->_redraw->drawList[n];
- const uint8 flags = drawList.field_A;
- const uint8* bodyPtr = nullptr;
- if (flags < 2u) {
- if (flags == 1) {
- bodyPtr = _engine->_resources->holomapArrowPtr;
- }
- } else {
- if (flags <= 2u) {
- bodyPtr = _engine->_resources->holomapTwinsenModelPtr;
- } else {
- if (flags == 3) {
- bodyPtr = _engine->_resources->holomapTwinsenArrowPtr;
- }
- }
- }
- if (bodyPtr != nullptr) {
- _engine->_renderer->renderIsoModel(x, y, z, angleX, angleY, angleZ, bodyPtr);
- }
+ const Common::Rect rect(170, 0, 470, 330);
+ _engine->_interface->drawSplittedBox(rect, 0);
+ _engine->_renderer->setBaseRotation(xRot, yRot, 0);
+ _engine->_renderer->setLightVector(xRot, yRot, 0);
+ renderLocations(xRot, yRot, 0, false);
+ _engine->_renderer->setBaseRotation(xRot, yRot, 0);
+ renderLocations(xRot, yRot, 0, true);
+ if (rotate) {
+ _engine->_menu->drawBox(300, 170, 340, 210);
}
+ _engine->copyBlockPhys(rect);
+ }
- _engine->_renderer->setCameraAngle();
-
- _engine->_renderer->baseRotPosX = 0;
- _engine->_renderer->baseRotPosY = 0;
- _engine->_renderer->baseRotPosZ = 9500;
- v12 = -256;
- v1 = videoPtr1;
- v2 = videoPtr2; // holomap surface - 748 * 4 == 4488 (size of that buffer)
- v3 = videoPtr11; // rotated x and y positions sorted
- do {
- v13 = 0;
- while (1) {
- v7 = v2 + 2; // rot y
- v8 = v2 + 4; // rot z
- if (v13 >= 1024) {// 1024 == 360 degree
- break;
- }
- destZ = *(_WORD *)v7;
- v4 = *(_WORD *)v8;
- destX = *(_WORD *)v2;
- destY = v4;
- v2 += 6; // advance to next entry in holomap surface surface coordinates
- sub_2654F(v8, v0);
- if (v12 != 256) {
- *(_WORD *)v3 = destY;
- v5 = v3 + 2;
- *(_WORD *)v5 = (v1 - videoPtr1) >> 1;
- v3 = v5 + 2;
- }
- _engine->_renderer->projectPositionOnScreen(v0);
- *(_WORD *)v1 = _engine->_renderer->projPosX;
- v6 = v1 + 2;
- v13 += 32;
- *(_WORD *)v6 = _engine->_renderer->projPosY;
- v1 = v6 + 6;
- }
- destZ = *(_WORD *)v7;
- destY = *(_WORD *)v8;
- destX = *(_WORD *)v2;
- v2 += 6;
- sub_2654F(v8, v0);
- _engine->_renderer->projectPositionOnScreen(v0);
- *(_WORD *)v1 = _engine->_renderer->projPosX;
- v10 = v1 + 2;
- v12 += 32;
- *(_WORD *)v10 = _engine->_renderer->projPosY;
- v1 = v10 + 6;
- } while (v12 <= 256);
- qsort(videoPtr11, 512, 4, sortHolomapSurfaceCoordsByX);
-
- v1 = 0;
- do { // y
- v2 = videoPtr1 + 2 * *(_WORD *)(v1 + videoPtr11 + 2);
- backDialogueBoxRight = *(_WORD *)v2;
- backDialogueBoxBottom = *(_WORD *)(v2 + 2);
- back2DialogueBoxRight = *(_WORD *)(v2 + 264);
- back2DialogueBoxBottom = *(_WORD *)(v2 + 266);
- back3DialogueBoxRight = *(_WORD *)(v2 + 8);
- back3DialogueBoxBottom = *(_WORD *)(v2 + 10);
- if (sub_26DAB(v0)) {
- word_4B776 = *(_WORD *)(v2 + 4);
- word_4B778 = *(_WORD *)(v2 + 6);
- word_4B77C = *(_WORD *)(v2 + 268);
- word_4B77E = *(_WORD *)(v2 + 270);
- word_4B782 = *(_WORD *)(v2 + 12);
- word_4B784 = *(_WORD *)(v2 + 14);
- sub_2E894(); // handles polyTab, polyTab2, circleBuffer, maybe model rendering?
- sub_2F1D1(v0); // some kind of blitting?
- }
- backDialogueBoxRight = *(_WORD *)(v2 + 264);
- backDialogueBoxBottom = *(_WORD *)(v2 + 266);
- back2DialogueBoxRight = *(_WORD *)(v2 + 272);
- back2DialogueBoxBottom = *(_WORD *)(v2 + 274);
- back3DialogueBoxRight = *(_WORD *)(v2 + 8);
- back3DialogueBoxBottom = *(_WORD *)(v2 + 10);
- v3 = sub_26DAB(v0);
- if (v3) {
- word_4B776 = *(_WORD *)(v2 + 268);
- word_4B778 = *(_WORD *)(v2 + 270);
- word_4B77C = *(_WORD *)(v2 + 276);
- word_4B77E = *(_WORD *)(v2 + 278);
- word_4B782 = *(_WORD *)(v2 + 12);
- word_4B784 = *(_WORD *)(v2 + 14);
- sub_2E894();
- LOBYTE(v3) = sub_2F1D1(v0); // some kind of blitting?
- }
- v1 += 4;
- } while (v1 != 4 * 512);
-
- if (v10) {
- blitRect();
- }
- _engine->_renderer->copyBlockPhys(v0);
-#endif
- // TODO
+ if (rotate && xRot == _locations[currentLocation].x && yRot == _locations[currentLocation].y) {
+ rotate = false;
}
+ // TODO: text afterwards on top (not before as it is currently implemented)?
+ // pos 0x140,0x19?
+
//_engine->_screens->copyScreen(_engine->workVideoBuffer, _engine->frontVideoBuffer);
//_engine->flip();
}
diff --git a/engines/twine/holomap.h b/engines/twine/holomap.h
index 60a15c7637..ea5aa9f166 100644
--- a/engines/twine/holomap.h
+++ b/engines/twine/holomap.h
@@ -58,6 +58,8 @@ private:
void drawHolomapLocation(int32 location);
int32 getNextHolomapLocation(int32 currentLocation, int32 dir) const;
+ void renderLocations(int xRot, int yRot, int zRot, bool lower);
+
public:
Holomap(TwinEEngine *engine);
Commit: 1b67a288abbed4e130fac8507d8f66940fcc0530
https://github.com/scummvm/scummvm/commit/1b67a288abbed4e130fac8507d8f66940fcc0530
Author: Martin Gerhardy (martin.gerhardy at gmail.com)
Date: 2021-01-13T22:08:47+01:00
Commit Message:
TWINE: added basic support for dotemu enhanced version file paths
Changed paths:
engines/twine/audio/music.cpp
engines/twine/audio/music.h
engines/twine/detection.cpp
engines/twine/detection.h
engines/twine/twine.cpp
diff --git a/engines/twine/audio/music.cpp b/engines/twine/audio/music.cpp
index 45e2372d61..b48e5f3c35 100644
--- a/engines/twine/audio/music.cpp
+++ b/engines/twine/audio/music.cpp
@@ -21,12 +21,14 @@
*/
#include "twine/audio/music.h"
+#include "audio/audiostream.h"
#include "audio/midiparser.h"
#include "audio/midiplayer.h"
#include "backends/audiocd/audiocd.h"
#include "common/debug.h"
#include "common/system.h"
#include "common/textconsole.h"
+#include "twine/detection.h"
#include "twine/resources/hqr.h"
#include "twine/resources/resources.h"
#include "twine/twine.h"
@@ -191,6 +193,17 @@ bool Music::playMidiMusic(int32 midiIdx, int32 loop) {
stopMidiMusic();
}
+ if (_engine->_gameFlags & TF_DOTEMU_ENHANCED) {
+ const Common::String &trackName = Common::String::format("lba1-%02i", midiIdx);
+ Audio::SeekableAudioStream *stream = Audio::SeekableAudioStream::openStreamFile(trackName);
+ if (stream != nullptr) {
+ const int volume = _engine->_system->getMixer()->getVolumeForSoundType(Audio::Mixer::kMusicSoundType);
+ _engine->_system->getMixer()->playStream(Audio::Mixer::kMusicSoundType, &_midiHandle,
+ Audio::makeLoopingAudioStream(stream, loop), volume);
+ return true;
+ }
+ }
+
int32 midiSize = HQR::getAllocEntry(&midiPtr, filename, midiIdx);
if (midiSize == 0) {
return false;
@@ -200,6 +213,10 @@ bool Music::playMidiMusic(int32 midiIdx, int32 loop) {
}
void Music::stopMidiMusic() {
+ if (_engine->_gameFlags & TF_DOTEMU_ENHANCED) {
+ _engine->_system->getMixer()->stopHandle(_midiHandle);
+ }
+
_midiPlayer.stop();
free(midiPtr);
midiPtr = nullptr;
diff --git a/engines/twine/audio/music.h b/engines/twine/audio/music.h
index 984e40eac3..e0e8109198 100644
--- a/engines/twine/audio/music.h
+++ b/engines/twine/audio/music.h
@@ -24,6 +24,7 @@
#define TWINE_MUSIC_H
#include "audio/midiplayer.h"
+#include "audio/mixer.h"
#include "common/scummsys.h"
namespace TwinE {
@@ -48,6 +49,7 @@ private:
/** Auxiliar midi pointer to */
uint8 *midiPtr = nullptr;
+ Audio::SoundHandle _midiHandle;
/** Track number of the current playing music */
int32 currentMusic = -1;
/**
diff --git a/engines/twine/detection.cpp b/engines/twine/detection.cpp
index d1c5994d48..801943353b 100644
--- a/engines/twine/detection.cpp
+++ b/engines/twine/detection.cpp
@@ -286,7 +286,7 @@ static const ADGameDescription twineGameDescriptions[] = {
AD_ENTRY1s("LBA.exe", "1f176b4329fbc7efc8f9f30f97013c5f", 1165728),
Common::EN_ANY,
Common::kPlatformWindows,
- ADGF_TESTING,
+ ADGF_TESTING | TwinE::TF_DOTEMU_ENHANCED,
GUIO1(GUIO_NONE)
},
{
@@ -295,7 +295,7 @@ static const ADGameDescription twineGameDescriptions[] = {
AD_ENTRY1s("LBA.exe", "1f176b4329fbc7efc8f9f30f97013c5f", 1165728),
Common::FR_FRA,
Common::kPlatformWindows,
- ADGF_TESTING,
+ ADGF_TESTING | TwinE::TF_DOTEMU_ENHANCED,
GUIO1(GUIO_NONE)
},
{
@@ -304,7 +304,7 @@ static const ADGameDescription twineGameDescriptions[] = {
AD_ENTRY1s("LBA.exe", "1f176b4329fbc7efc8f9f30f97013c5f", 1165728),
Common::DE_DEU,
Common::kPlatformWindows,
- ADGF_TESTING,
+ ADGF_TESTING | TwinE::TF_DOTEMU_ENHANCED,
GUIO1(GUIO_NONE)
},
{
@@ -313,7 +313,7 @@ static const ADGameDescription twineGameDescriptions[] = {
AD_ENTRY1s("LBA.exe", "1f176b4329fbc7efc8f9f30f97013c5f", 1165728),
Common::IT_ITA,
Common::kPlatformWindows,
- ADGF_TESTING,
+ ADGF_TESTING | TwinE::TF_DOTEMU_ENHANCED,
GUIO1(GUIO_NONE)
},
{
@@ -322,7 +322,7 @@ static const ADGameDescription twineGameDescriptions[] = {
AD_ENTRY1s("LBA.exe", "1f176b4329fbc7efc8f9f30f97013c5f", 1165728),
Common::ES_ESP,
Common::kPlatformWindows,
- ADGF_TESTING,
+ ADGF_TESTING | TwinE::TF_DOTEMU_ENHANCED,
GUIO1(GUIO_NONE)
},
diff --git a/engines/twine/detection.h b/engines/twine/detection.h
index 9fc439d93e..b255b46b84 100644
--- a/engines/twine/detection.h
+++ b/engines/twine/detection.h
@@ -34,7 +34,8 @@ enum TwineFeatureFlags {
TF_VERSION_EUROPE = (1 << 0),
TF_VERSION_USA = (1 << 1),
TF_VERSION_CUSTOM = (1 << 2),
- TF_USE_GIF = (1 << 3)
+ TF_USE_GIF = (1 << 3),
+ TF_DOTEMU_ENHANCED = (1 << 4)
};
} // End of namespace TwinE
diff --git a/engines/twine/twine.cpp b/engines/twine/twine.cpp
index e005bff76f..7ef8c74f26 100644
--- a/engines/twine/twine.cpp
+++ b/engines/twine/twine.cpp
@@ -116,6 +116,27 @@ TwinEEngine::TwinEEngine(OSystem *system, Common::Language language, uint32 flag
const Common::FSNode gameDataDir(ConfMan.get("path"));
SearchMan.addSubDirectoryMatching(gameDataDir, "fla");
SearchMan.addSubDirectoryMatching(gameDataDir, "vox");
+ if (flags & TF_DOTEMU_ENHANCED) {
+ SearchMan.addSubDirectoryMatching(gameDataDir, "resources/lba_files/hqr");
+ SearchMan.addSubDirectoryMatching(gameDataDir, "resources/lba_files/fla");
+ if (_gameLang == Common::Language::DE_DEU) {
+ SearchMan.addSubDirectoryMatching(gameDataDir, "resources/lba_files/vox/de_voice");
+ }
+ if (_gameLang == Common::Language::EN_ANY || _gameLang == Common::Language::EN_GRB || _gameLang == Common::Language::EN_USA) {
+ SearchMan.addSubDirectoryMatching(gameDataDir, "resources/lba_files/vox/en_voice");
+ }
+ if (_gameLang == Common::Language::FR_FRA) {
+ SearchMan.addSubDirectoryMatching(gameDataDir, "resources/lba_files/vox/fr_voice");
+ }
+#ifdef USE_MAD
+ SearchMan.addSubDirectoryMatching(gameDataDir, "resources/lba_files/music");
+ SearchMan.addSubDirectoryMatching(gameDataDir, "resources/lba_files/midi_mp3");
+#endif
+#ifdef USE_VORBIS
+ SearchMan.addSubDirectoryMatching(gameDataDir, "resources/lba_files/music/ogg");
+ SearchMan.addSubDirectoryMatching(gameDataDir, "resources/lba_files/midi_mp3/ogg");
+#endif
+ }
setDebugger(new TwinEConsole(this));
_actor = new Actor(this);
Commit: 8e73626566a317bc91ef07c01408c2d0a51ef183
https://github.com/scummvm/scummvm/commit/8e73626566a317bc91ef07c01408c2d0a51ef183
Author: Martin Gerhardy (martin.gerhardy at gmail.com)
Date: 2021-01-13T22:08:47+01:00
Commit Message:
TWINE: implemented missing script opscode 0x06
Changed paths:
engines/twine/script/script_move_v1.cpp
diff --git a/engines/twine/script/script_move_v1.cpp b/engines/twine/script/script_move_v1.cpp
index 7d8ecb0618..2a242336f8 100644
--- a/engines/twine/script/script_move_v1.cpp
+++ b/engines/twine/script/script_move_v1.cpp
@@ -155,8 +155,9 @@ static int32 mWAIT_ANIM(TwinEEngine *engine, MoveScriptContext &ctx) {
* @note Opcode @c 0x06
*/
static int32 mLOOP(TwinEEngine *engine, MoveScriptContext &ctx) {
- // TODO no params
- return -1;
+ ctx.actor->positionInMoveScript = 0;
+ ctx.stream.seek(0);
+ return 0;
}
/**
Commit: db4376ffeb558bf8b21eae37c6ddbc381f783729
https://github.com/scummvm/scummvm/commit/db4376ffeb558bf8b21eae37c6ddbc381f783729
Author: Martin Gerhardy (martin.gerhardy at gmail.com)
Date: 2021-01-13T22:13:51+01:00
Commit Message:
TWINE: some scenes are not stored in the savegame
Changed paths:
engines/twine/scene/gamestate.cpp
diff --git a/engines/twine/scene/gamestate.cpp b/engines/twine/scene/gamestate.cpp
index 59701a6302..0780661e47 100644
--- a/engines/twine/scene/gamestate.cpp
+++ b/engines/twine/scene/gamestate.cpp
@@ -227,6 +227,14 @@ bool GameState::saveGame(Common::WriteStream *file) {
Common::strlcpy(playerName, "TwinEngineSave", sizeof(playerName));
}
+ int32 sceneIdx = _engine->_scene->currentSceneIdx;
+ if (sceneIdx == Polar_Island_end_scene || sceneIdx == Citadel_Island_end_sequence_1 || sceneIdx == Citadel_Island_end_sequence_2 || sceneIdx == Credits_List_Sequence) {
+ /* inventoryMagicPoints = 0x50 */
+ /* herobehaviour = 0 */
+ /* newherox = 0xffff */
+ sceneIdx = Polar_Island_Final_Battle;
+ }
+
file->writeByte(0x03);
file->writeString(playerName);
file->writeByte('\0');
@@ -234,7 +242,7 @@ bool GameState::saveGame(Common::WriteStream *file) {
for (uint8 i = 0; i < NUM_GAME_FLAGS; ++i) {
file->writeByte(hasGameFlag(i));
}
- file->writeByte(_engine->_scene->currentSceneIdx);
+ file->writeByte(sceneIdx);
file->writeByte(gameChapter);
file->writeByte((byte)_engine->_actor->heroBehaviour);
file->writeByte(_engine->_scene->sceneHero->life);
@@ -261,6 +269,7 @@ bool GameState::saveGame(Common::WriteStream *file) {
file->write(inventoryFlags, NUM_INVENTORY_ITEMS);
file->writeByte(inventoryNumLeafs);
+ // TODO: writeUInt16LE in disassembly
file->writeByte(usingSabre ? 1 : 0);
file->writeByte(0);
More information about the Scummvm-git-logs
mailing list