[Scummvm-git-logs] scummvm master -> 66a69367653e684e1a97482928c5958ec38b4fd3
mgerhardy
martin.gerhardy at gmail.com
Sat Jan 9 17:52:11 UTC 2021
This automated email contains information about 12 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
bbc6408c51 TWINE: debug logging
42f9d1c14c TWINE: no need to autosave if we just started a game or loaded a state
ba5ba08465 TWINE: replaced magic numbers
0e6441c4fc TWINE: improved lighting issue workaround and added debug logging
f217cb5f99 TWINE: prepare to reduce drawcalls
e6699247b6 TWINE: debug logging of unknown entries in fla file
cc58651e9a TWINE: format the file
99b6c029b9 TWINE: group booleans to reduce size
910a17f7b2 TWINE: removed unused member
5a0ef4805f TWINE: if voices are disabled, don't even start to read the first paragraph
437d0cc7bb TWINE: reduced updateScreen() calls
66a6936765 TWINE: attempt to fix issue #12037
Commit: bbc6408c51af8a6729e5039af70e6d357e586368
https://github.com/scummvm/scummvm/commit/bbc6408c51af8a6729e5039af70e6d357e586368
Author: Martin Gerhardy (martin.gerhardy at gmail.com)
Date: 2021-01-09T16:56:09+01:00
Commit Message:
TWINE: debug logging
Changed paths:
engines/twine/scene/scene.cpp
diff --git a/engines/twine/scene/scene.cpp b/engines/twine/scene/scene.cpp
index 00856d6b62..58a1dbce75 100644
--- a/engines/twine/scene/scene.cpp
+++ b/engines/twine/scene/scene.cpp
@@ -293,6 +293,7 @@ void Scene::changeScene() {
if (needChangeScene == LBA1SceneId::Citadel_Island_near_twinsens_house && _engine->_gameState->hasOpenedFunfrocksSafe()) {
needChangeScene = LBA1SceneId::Citadel_Island_Twinsens_house_destroyed;
}
+ debug(2, "Change scene to %i (currently in %i)", needChangeScene, currentSceneIdx);
// local backup previous scene
previousSceneIdx = currentSceneIdx;
Commit: 42f9d1c14c3d7cf5975a80d1bd19c787a2c77765
https://github.com/scummvm/scummvm/commit/42f9d1c14c3d7cf5975a80d1bd19c787a2c77765
Author: Martin Gerhardy (martin.gerhardy at gmail.com)
Date: 2021-01-09T16:58:07+01:00
Commit Message:
TWINE: no need to autosave if we just started a game or loaded a state
Changed paths:
engines/twine/scene/scene.cpp
diff --git a/engines/twine/scene/scene.cpp b/engines/twine/scene/scene.cpp
index 58a1dbce75..d957ae2c84 100644
--- a/engines/twine/scene/scene.cpp
+++ b/engines/twine/scene/scene.cpp
@@ -339,7 +339,7 @@ void Scene::changeScene() {
_engine->_renderer->setLightVector(alphaLight, betaLight, ANGLE_0);
- if (previousSceneIdx != needChangeScene) {
+ if (previousSceneIdx != -1 && previousSceneIdx != needChangeScene) {
_engine->_actor->previousHeroBehaviour = _engine->_actor->heroBehaviour;
_engine->_actor->previousHeroAngle = sceneHero->angle;
_engine->autoSave();
Commit: ba5ba08465d76ddfc8e87878ee544f1a9d2031f0
https://github.com/scummvm/scummvm/commit/ba5ba08465d76ddfc8e87878ee544f1a9d2031f0
Author: Martin Gerhardy (martin.gerhardy at gmail.com)
Date: 2021-01-09T17:00:33+01:00
Commit Message:
TWINE: replaced magic numbers
Changed paths:
engines/twine/scene/gamestate.cpp
diff --git a/engines/twine/scene/gamestate.cpp b/engines/twine/scene/gamestate.cpp
index 771e777d09..b89cbb96d2 100644
--- a/engines/twine/scene/gamestate.cpp
+++ b/engines/twine/scene/gamestate.cpp
@@ -108,8 +108,8 @@ void GameState::initEngineVars() {
debug(2, "Init engine variables");
_engine->_interface->resetClip();
- _engine->_scene->alphaLight = 896;
- _engine->_scene->betaLight = 950;
+ _engine->_scene->alphaLight = ANGLE_315;
+ _engine->_scene->betaLight = ANGLE_334;
initEngineProjections();
initGameStateVars();
initHeroVars();
Commit: 0e6441c4fc56b2d435edc6132ebbe86c265bb249
https://github.com/scummvm/scummvm/commit/0e6441c4fc56b2d435edc6132ebbe86c265bb249
Author: Martin Gerhardy (martin.gerhardy at gmail.com)
Date: 2021-01-09T17:16:25+01:00
Commit Message:
TWINE: improved lighting issue workaround and added debug logging
Changed paths:
engines/twine/scene/scene.cpp
diff --git a/engines/twine/scene/scene.cpp b/engines/twine/scene/scene.cpp
index d957ae2c84..3f0e24099c 100644
--- a/engines/twine/scene/scene.cpp
+++ b/engines/twine/scene/scene.cpp
@@ -137,12 +137,11 @@ bool Scene::loadSceneLBA1() {
_currentGameOverScene = stream.readByte();
stream.skip(4);
- alphaLight = stream.readUint16LE();
- betaLight = stream.readUint16LE();
-
// FIXME: Workaround to fix lighting issue - not using proper dark light
- alphaLight = ANGLE_315;
- betaLight = ANGLE_334;
+ // Using 1215 and 1087 as light vectors - scene 8
+ alphaLight = ClampAngle(stream.readUint16LE());
+ betaLight = ClampAngle(stream.readUint16LE());
+ debug(2, "Using %i and %i as light vectors", alphaLight, betaLight);
_sampleAmbiance[0] = stream.readUint16LE();
_sampleRepeat[0] = stream.readUint16LE();
@@ -374,6 +373,7 @@ void Scene::changeScene() {
_engine->_renderer->setLightVector(alphaLight, betaLight, ANGLE_0);
if (_sceneMusic != -1) {
+ debug(2, "Scene %i music track id: %i", currentSceneIdx, _sceneMusic);
_engine->_music->playTrackMusic(_sceneMusic);
}
}
Commit: f217cb5f99c0e9a7826298e59ce76a5facf2502a
https://github.com/scummvm/scummvm/commit/f217cb5f99c0e9a7826298e59ce76a5facf2502a
Author: Martin Gerhardy (martin.gerhardy at gmail.com)
Date: 2021-01-09T17:35:39+01:00
Commit Message:
TWINE: prepare to reduce drawcalls
Changed paths:
engines/twine/twine.cpp
engines/twine/twine.h
diff --git a/engines/twine/twine.cpp b/engines/twine/twine.cpp
index 02fbfcfc77..13212b4982 100644
--- a/engines/twine/twine.cpp
+++ b/engines/twine/twine.cpp
@@ -1042,11 +1042,11 @@ void TwinEEngine::flip() {
g_system->updateScreen();
}
-void TwinEEngine::copyBlockPhys(const Common::Rect &rect) {
- copyBlockPhys(rect.left, rect.top, rect.right, rect.bottom);
+void TwinEEngine::copyBlockPhys(const Common::Rect &rect, bool updateScreen) {
+ copyBlockPhys(rect.left, rect.top, rect.right, rect.bottom, updateScreen);
}
-void TwinEEngine::copyBlockPhys(int32 left, int32 top, int32 right, int32 bottom) {
+void TwinEEngine::copyBlockPhys(int32 left, int32 top, int32 right, int32 bottom, bool updateScreen) {
assert(left <= right);
assert(top <= bottom);
int32 width = right - left + 1;
@@ -1061,7 +1061,9 @@ void TwinEEngine::copyBlockPhys(int32 left, int32 top, int32 right, int32 bottom
return;
}
g_system->copyRectToScreen(frontVideoBuffer.getBasePtr(left, top), frontVideoBuffer.pitch, left, top, width, height);
- g_system->updateScreen();
+ if (updateScreen) {
+ g_system->updateScreen();
+ }
}
void TwinEEngine::crossFade(const Graphics::ManagedSurface &buffer, const uint32 *palette) {
diff --git a/engines/twine/twine.h b/engines/twine/twine.h
index debe32e7e1..1c7f784a3b 100644
--- a/engines/twine/twine.h
+++ b/engines/twine/twine.h
@@ -324,9 +324,10 @@ public:
* @param top top position to start copy
* @param right right position to start copy
* @param bottom bottom position to start copy
+ * @param updateScreen Perform blitting to screen if @c true, otherwise just prepare the blit
*/
- void copyBlockPhys(int32 left, int32 top, int32 right, int32 bottom);
- void copyBlockPhys(const Common::Rect &rect);
+ void copyBlockPhys(int32 left, int32 top, int32 right, int32 bottom, bool updateScreen = true);
+ void copyBlockPhys(const Common::Rect &rect, bool updateScreen = true);
/** Cross fade feature
* @param buffer screen buffer
Commit: e6699247b6ab4ad82b1b58f75b1161c47b846dfd
https://github.com/scummvm/scummvm/commit/e6699247b6ab4ad82b1b58f75b1161c47b846dfd
Author: Martin Gerhardy (martin.gerhardy at gmail.com)
Date: 2021-01-09T18:39:42+01:00
Commit Message:
TWINE: debug logging of unknown entries in fla file
Changed paths:
engines/twine/debugger/debug.cpp
engines/twine/flamovies.cpp
engines/twine/holomap.cpp
diff --git a/engines/twine/debugger/debug.cpp b/engines/twine/debugger/debug.cpp
index 66ace9af2e..4753038f56 100644
--- a/engines/twine/debugger/debug.cpp
+++ b/engines/twine/debugger/debug.cpp
@@ -429,6 +429,7 @@ void Debug::debugProcessWindow() {
debugDrawWindows();
for (;;) {
+ FrameMarker frame;
ScopedFPS scopedFps(25);
_engine->readKeys();
if (_engine->shouldQuit()) {
diff --git a/engines/twine/flamovies.cpp b/engines/twine/flamovies.cpp
index 93ed6e6222..c1e3d2a2ce 100644
--- a/engines/twine/flamovies.cpp
+++ b/engines/twine/flamovies.cpp
@@ -329,11 +329,13 @@ void FlaMovies::playFlaMovie(const char *flaName) {
flaHeaderData.numOfFrames = file.readUint32LE();
flaHeaderData.speed = file.readByte();
flaHeaderData.var1 = file.readByte();
+ debug(2, "Unknown byte in fla file: %i", flaHeaderData.var1);
flaHeaderData.xsize = file.readUint16LE();
flaHeaderData.ysize = file.readUint16LE();
samplesInFla = file.readUint16LE();
- file.skip(2);
+ const uint16 unk2 = file.readUint16LE();
+ debug(2, "Unknown uint16 in fla file: %i", unk2);
file.skip(4 * samplesInFla);
@@ -345,6 +347,7 @@ void FlaMovies::playFlaMovie(const char *flaName) {
ScopedKeyMap scopedKeyMap(_engine, cutsceneKeyMapId);
do {
+ FrameMarker frame;
ScopedFPS scopedFps(flaHeaderData.speed);
_engine->readKeys();
if (_engine->shouldQuit()) {
diff --git a/engines/twine/holomap.cpp b/engines/twine/holomap.cpp
index 72d6b9fa03..529a851cce 100644
--- a/engines/twine/holomap.cpp
+++ b/engines/twine/holomap.cpp
@@ -194,6 +194,7 @@ void Holomap::processHolomap() {
ScopedKeyMap holomapKeymap(_engine, holomapKeyMapId);
for (;;) {
+ FrameMarker frame;
ScopedFPS scopedFps;
_engine->_input->readKeys();
if (_engine->shouldQuit() || _engine->_input->toggleAbortAction()) {
Commit: cc58651e9a472ca2d651fdfa19ea8cf9a7a00ad0
https://github.com/scummvm/scummvm/commit/cc58651e9a472ca2d651fdfa19ea8cf9a7a00ad0
Author: Martin Gerhardy (martin.gerhardy at gmail.com)
Date: 2021-01-09T18:40:07+01:00
Commit Message:
TWINE: format the file
Changed paths:
engines/twine/resources/hqr.cpp
diff --git a/engines/twine/resources/hqr.cpp b/engines/twine/resources/hqr.cpp
index 836bd6ebdb..417f88d633 100644
--- a/engines/twine/resources/hqr.cpp
+++ b/engines/twine/resources/hqr.cpp
@@ -102,7 +102,7 @@ static int voxEntrySize(const char *filename, int32 index, int32 hiddenIndex) {
uint32 realSize = file.readUint32LE();
uint32 compSize = file.readUint32LE();
- // exist hidden entries
+ // exist hidden entries
for (int32 i = 0; i < hiddenIndex; i++) {
wrap(file.seek(offsetToData + compSize + 10)) // hidden entry
offsetToData = offsetToData + compSize + 10; // current hidden offset
Commit: 99b6c029b9095f44f60478bf1fb9aca722b94999
https://github.com/scummvm/scummvm/commit/99b6c029b9095f44f60478bf1fb9aca722b94999
Author: Martin Gerhardy (martin.gerhardy at gmail.com)
Date: 2021-01-09T18:40:35+01:00
Commit Message:
TWINE: group booleans to reduce size
Changed paths:
engines/twine/twine.h
diff --git a/engines/twine/twine.h b/engines/twine/twine.h
index 1c7f784a3b..78b8cc9991 100644
--- a/engines/twine/twine.h
+++ b/engines/twine/twine.h
@@ -86,6 +86,8 @@ struct ConfigFile {
bool Voice = true;
/** Enable/Disable game dialogues */
bool FlagDisplayText = false;
+ /** Flag to display game debug */
+ bool Debug = false;
/** Type of music file to be used */
MidiFileType MidiType = MIDIFILE_NONE;
/** *Game version */
@@ -98,8 +100,6 @@ struct ConfigFile {
int32 Movie = CONF_MOVIE_FLA;
/** Flag used to keep the game frames per second */
int32 Fps = 0;
- /** Flag to display game debug */
- bool Debug = false;
// these settings are not available in the original version
/** Use cross fade effect while changing images, or be as the original */
Commit: 910a17f7b2417f10eb4aad6f91e7a8ddbfc61dd8
https://github.com/scummvm/scummvm/commit/910a17f7b2417f10eb4aad6f91e7a8ddbfc61dd8
Author: Martin Gerhardy (martin.gerhardy at gmail.com)
Date: 2021-01-09T18:41:04+01:00
Commit Message:
TWINE: removed unused member
Changed paths:
engines/twine/text.h
diff --git a/engines/twine/text.h b/engines/twine/text.h
index 1940ef33ae..4c0974beb0 100644
--- a/engines/twine/text.h
+++ b/engines/twine/text.h
@@ -247,7 +247,6 @@ public:
// ---
int32 currDialTextEntry = 0; // ordered entry
- int32 nextDialTextEntry = 0; // ordered entry
Common::String currentVoxBankFile;
bool showDialogueBubble = true;
Commit: 5a0ef4805fddfcc627b4f8362b0a4bc4c7249091
https://github.com/scummvm/scummvm/commit/5a0ef4805fddfcc627b4f8362b0a4bc4c7249091
Author: Martin Gerhardy (martin.gerhardy at gmail.com)
Date: 2021-01-09T18:42:00+01:00
Commit Message:
TWINE: if voices are disabled, don't even start to read the first paragraph
Changed paths:
engines/twine/text.cpp
diff --git a/engines/twine/text.cpp b/engines/twine/text.cpp
index 7b1c7982b7..de85e2b773 100644
--- a/engines/twine/text.cpp
+++ b/engines/twine/text.cpp
@@ -91,6 +91,10 @@ bool Text::initVoxToPlay(int32 index) { // setVoxFileAtDigit
voxHiddenIndex = 0;
hasHiddenVox = false;
+ if (!_engine->cfgfile.Voice) {
+ return false;
+ }
+
Common::MemoryReadStream stream((const byte *)dialOrderPtr, dialOrderSize);
// choose right text from order index
for (int32 i = 0; i < numDialTextEntries; i++) {
Commit: 437d0cc7bbf8e40d7b696b5baa154b499c35ce16
https://github.com/scummvm/scummvm/commit/437d0cc7bbf8e40d7b696b5baa154b499c35ce16
Author: Martin Gerhardy (martin.gerhardy at gmail.com)
Date: 2021-01-09T18:42:25+01:00
Commit Message:
TWINE: reduced updateScreen() calls
Changed paths:
engines/twine/menu/menu.cpp
engines/twine/menu/menuoptions.cpp
engines/twine/renderer/redraw.cpp
engines/twine/renderer/screens.cpp
engines/twine/scene/gamestate.cpp
engines/twine/text.cpp
engines/twine/twine.cpp
engines/twine/twine.h
diff --git a/engines/twine/menu/menu.cpp b/engines/twine/menu/menu.cpp
index 3a1f53803e..9e0f78f9d7 100644
--- a/engines/twine/menu/menu.cpp
+++ b/engines/twine/menu/menu.cpp
@@ -406,6 +406,7 @@ int32 Menu::processMenu(MenuSettings *menuSettings) {
}
uint32 startMillis = _engine->_system->getMillis();
do {
+ FrameMarker frame;
ScopedFPS scopedFps;
const uint32 loopMillis = _engine->_system->getMillis();
_engine->readKeys();
@@ -721,6 +722,7 @@ bool Menu::init() {
}
EngineState Menu::run() {
+ FrameMarker frame;
ScopedFPS scopedFps;
_engine->_text->initTextBank(TextBankId::Options_and_menus);
@@ -772,6 +774,7 @@ int32 Menu::giveupMenu() {
int32 menuId;
do {
+ FrameMarker frame;
ScopedFPS scopedFps;
_engine->_text->initTextBank(TextBankId::Options_and_menus);
menuId = processMenu(localMenu);
@@ -999,6 +1002,7 @@ void Menu::processBehaviourMenu() {
#endif
ScopedKeyMap scopedKeyMap(_engine, uiKeyMapId);
while (_engine->_input->isActionActive(TwinEActionType::BehaviourMenu) || _engine->_input->isQuickBehaviourActionActive()) {
+ FrameMarker frame;
ScopedFPS scopedFps(50);
_engine->readKeys();
@@ -1139,6 +1143,7 @@ void Menu::processInventoryMenu() {
#endif
ScopedKeyMap scopedKeyMap(_engine, uiKeyMapId);
for (;;) {
+ FrameMarker frame;
ScopedFPS fps(66);
_engine->readKeys();
int32 prevSelectedItem = inventorySelectedItem;
diff --git a/engines/twine/menu/menuoptions.cpp b/engines/twine/menu/menuoptions.cpp
index ebf1b1b867..0a574fc4f1 100644
--- a/engines/twine/menu/menuoptions.cpp
+++ b/engines/twine/menu/menuoptions.cpp
@@ -262,6 +262,7 @@ bool MenuOptions::enterPlayerName(int32 textIdx) {
Common::fill(&_onScreenKeyboardDirty[0], &_onScreenKeyboardDirty[ARRAYSIZE(_onScreenKeyboardDirty)], 1);
ScopedFeatureState scopedVirtualKeyboard(OSystem::kFeatureVirtualKeyboard, true);
for (;;) {
+ FrameMarker frame;
ScopedFPS scopedFps;
Common::Event event;
while (g_system->getEventManager()->pollEvent(event)) {
diff --git a/engines/twine/renderer/redraw.cpp b/engines/twine/renderer/redraw.cpp
index 38dfbe8c72..78ddb65b82 100644
--- a/engines/twine/renderer/redraw.cpp
+++ b/engines/twine/renderer/redraw.cpp
@@ -766,7 +766,7 @@ void Redraw::drawBubble(int32 actorIdx) {
_engine->_grid->drawSprite(renderRect.left, renderRect.top, spritePtr);
if (_engine->_interface->textWindow.left <= _engine->_interface->textWindow.right && _engine->_interface->textWindow.top <= _engine->_interface->textWindow.bottom) {
- _engine->copyBlockPhys(renderRect);
+ _engine->copyBlockPhys(renderRect, true);
}
_engine->_interface->resetClip();
diff --git a/engines/twine/renderer/screens.cpp b/engines/twine/renderer/screens.cpp
index a9ced435c7..989d27b1e6 100644
--- a/engines/twine/renderer/screens.cpp
+++ b/engines/twine/renderer/screens.cpp
@@ -159,6 +159,7 @@ void Screens::adjustCrossPalette(const uint32 *pal1, const uint32 *pal2) {
const uint8 *pal2p = (const uint8 *)pal2;
uint8 *paletteOut = (uint8 *)pal;
do {
+ FrameMarker frame;
ScopedFPS scopedFps(50);
counter = 0;
@@ -201,6 +202,7 @@ void Screens::fadeToBlack(const uint32 *pal) {
void Screens::fadeToPal(const uint32 *pal) {
for (int32 i = 0; i <= 100; i += 3) {
+ FrameMarker frame;
ScopedFPS scopedFps(50);
adjustPalette(0, 0, 0, pal, i);
}
@@ -231,6 +233,7 @@ void Screens::setBackPal() {
void Screens::fadePalRed(const uint32 *pal) {
for (int32 i = 100; i >= 0; i -= 2) {
+ FrameMarker frame;
ScopedFPS scopedFps(50);
adjustPalette(0xFF, 0, 0, pal, i);
}
@@ -238,6 +241,7 @@ void Screens::fadePalRed(const uint32 *pal) {
void Screens::fadeRedPal(const uint32 *pal) {
for (int32 i = 0; i <= 100; i += 2) {
+ FrameMarker frame;
ScopedFPS scopedFps(50);
adjustPalette(0xFF, 0, 0, pal, i);
}
diff --git a/engines/twine/scene/gamestate.cpp b/engines/twine/scene/gamestate.cpp
index b89cbb96d2..0db6b83811 100644
--- a/engines/twine/scene/gamestate.cpp
+++ b/engines/twine/scene/gamestate.cpp
@@ -332,6 +332,7 @@ void GameState::processFoundItem(int32 item) {
ScopedKeyMap uiKeyMap(_engine, uiKeyMapId);
for (;;) {
+ FrameMarker frame;
ScopedFPS fps(66);
_engine->_interface->resetClip();
_engine->_redraw->currNumOfRedrawBox = 0;
@@ -392,6 +393,7 @@ void GameState::processFoundItem(int32 item) {
}
while (_engine->_text->playVoxSimple(_engine->_text->currDialTextEntry)) {
+ FrameMarker frame;
ScopedFPS scopedFps;
_engine->readKeys();
if (_engine->shouldQuit() || _engine->_input->toggleAbortAction()) {
@@ -426,6 +428,7 @@ void GameState::processGameChoices(int32 choiceIdx) {
// get right VOX entry index
if (_engine->_text->initVoxToPlay(choiceAnswer)) {
while (_engine->_text->playVoxSimple(_engine->_text->currDialTextEntry)) {
+ FrameMarker frame;
ScopedFPS scopedFps;
if (_engine->shouldQuit()) {
break;
@@ -467,6 +470,7 @@ void GameState::processGameoverAnimation() {
_engine->_interface->setClip(rect);
while (!_engine->_input->toggleAbortAction() && (_engine->lbaTime - startLbaTime) <= 500) {
+ FrameMarker frame;
ScopedFPS scopedFps(66);
_engine->readKeys();
if (_engine->shouldQuit()) {
diff --git a/engines/twine/text.cpp b/engines/twine/text.cpp
index de85e2b773..3cd47ad497 100644
--- a/engines/twine/text.cpp
+++ b/engines/twine/text.cpp
@@ -605,6 +605,7 @@ bool Text::displayText(int32 index, bool showText, bool playVox) {
ScopedKeyMap uiKeyMap(_engine, uiKeyMapId);
ProgressiveTextState textState = ProgressiveTextState::ContinueRunning;
for (;;) {
+ FrameMarker frame;
ScopedFPS scopedFps(66);
_engine->readKeys();
if (textState == ProgressiveTextState::ContinueRunning) {
@@ -631,6 +632,7 @@ bool Text::displayText(int32 index, bool showText, bool playVox) {
}
}
while (_engine->_text->playVoxSimple(_engine->_text->currDialTextEntry)) {
+ FrameMarker frame;
ScopedFPS scopedFps;
_engine->readKeys();
if (_engine->shouldQuit() || _engine->_input->toggleAbortAction()) {
diff --git a/engines/twine/twine.cpp b/engines/twine/twine.cpp
index 13212b4982..35ce5fcecf 100644
--- a/engines/twine/twine.cpp
+++ b/engines/twine/twine.cpp
@@ -106,6 +106,10 @@ ScopedFPS::~ScopedFPS() {
g_system->delayMillis(waitMillis);
}
+FrameMarker::~FrameMarker() {
+ g_system->updateScreen();
+}
+
TwinEEngine::TwinEEngine(OSystem *system, Common::Language language, uint32 flags, TwineGameType gameType)
: Engine(system), _gameType(gameType), _gameLang(language), _gameFlags(flags), _rnd("twine") {
// Add default file directories
@@ -673,6 +677,7 @@ void TwinEEngine::centerScreenOnActor() {
}
int32 TwinEEngine::runGameEngine() { // mainLoopInteration
+ FrameMarker frame;
_input->enableKeyMap(mainKeyMapId);
readKeys();
@@ -798,6 +803,7 @@ int32 TwinEEngine::runGameEngine() { // mainLoopInteration
_text->drawText(5, 446, "Pause"); // no key for pause in Text Bank
copyBlockPhys(5, 446, 100, 479);
do {
+ FrameMarker frameWait;
ScopedFPS scopedFps;
readKeys();
if (shouldQuit()) {
@@ -1008,6 +1014,7 @@ bool TwinEEngine::delaySkip(uint32 time) {
uint32 startTicks = _system->getMillis();
uint32 stopTicks = 0;
do {
+ FrameMarker frame;
ScopedFPS scopedFps;
readKeys();
if (_input->toggleAbortAction()) {
diff --git a/engines/twine/twine.h b/engines/twine/twine.h
index 78b8cc9991..31c042def9 100644
--- a/engines/twine/twine.h
+++ b/engines/twine/twine.h
@@ -174,6 +174,11 @@ public:
~ScopedFPS();
};
+class FrameMarker {
+public:
+ ~FrameMarker();
+};
+
class TwinEEngine : public Engine {
private:
int32 isTimeFreezed = 0;
@@ -326,8 +331,8 @@ public:
* @param bottom bottom position to start copy
* @param updateScreen Perform blitting to screen if @c true, otherwise just prepare the blit
*/
- void copyBlockPhys(int32 left, int32 top, int32 right, int32 bottom, bool updateScreen = true);
- void copyBlockPhys(const Common::Rect &rect, bool updateScreen = true);
+ void copyBlockPhys(int32 left, int32 top, int32 right, int32 bottom, bool updateScreen = false);
+ void copyBlockPhys(const Common::Rect &rect, bool updateScreen = false);
/** Cross fade feature
* @param buffer screen buffer
Commit: 66a69367653e684e1a97482928c5958ec38b4fd3
https://github.com/scummvm/scummvm/commit/66a69367653e684e1a97482928c5958ec38b4fd3
Author: Martin Gerhardy (martin.gerhardy at gmail.com)
Date: 2021-01-09T18:50:57+01:00
Commit Message:
TWINE: attempt to fix issue #12037
https://bugs.scummvm.org/ticket/12037
the unknown field in the fla file could be the midi track. This needs more feedback.
Changed paths:
engines/twine/flamovies.cpp
diff --git a/engines/twine/flamovies.cpp b/engines/twine/flamovies.cpp
index c1e3d2a2ce..9444c45a62 100644
--- a/engines/twine/flamovies.cpp
+++ b/engines/twine/flamovies.cpp
@@ -336,6 +336,7 @@ void FlaMovies::playFlaMovie(const char *flaName) {
samplesInFla = file.readUint16LE();
const uint16 unk2 = file.readUint16LE();
debug(2, "Unknown uint16 in fla file: %i", unk2);
+ _engine->_music->playMidiMusic(unk2);
file.skip(4 * samplesInFla);
More information about the Scummvm-git-logs
mailing list