[Scummvm-git-logs] scummvm master -> e7a181c26af4bfa341aa6e7c702f2f814593446a
mduggan
noreply at scummvm.org
Thu Dec 26 20:34:11 UTC 2024
This automated email contains information about 3 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
c03d39aa33 DGDS: Add debug command to show hot areas and their status
0af6afc963 DGDS: Name run type 1 more usefully
e7a181c26a DGDS: More Willy Beamish fixes
Commit: c03d39aa336966d40fc20fc7f0419f0b9c57003d
https://github.com/scummvm/scummvm/commit/c03d39aa336966d40fc20fc7f0419f0b9c57003d
Author: Matthew Duggan (mgithub at guarana.org)
Date: 2024-12-27T07:32:24+11:00
Commit Message:
DGDS: Add debug command to show hot areas and their status
Also check inRect before checking hot area conditions during mouse move and
click. This way around is be more efficient and functionally identical, even
though the originals do it the other way around.
Changed paths:
engines/dgds/console.cpp
engines/dgds/console.h
engines/dgds/dgds.cpp
engines/dgds/dgds.h
engines/dgds/game_palettes.h
engines/dgds/scene.cpp
engines/dgds/scene.h
diff --git a/engines/dgds/console.cpp b/engines/dgds/console.cpp
index 4b7b117ecf6..0bdafb919ba 100644
--- a/engines/dgds/console.cpp
+++ b/engines/dgds/console.cpp
@@ -52,6 +52,7 @@ Console::Console(DgdsEngine *vm) : _vm(vm) {
registerCmd("scene", WRAP_METHOD(Console, cmdScene));
registerCmd("scriptdump", WRAP_METHOD(Console, cmdScriptDump));
registerCmd("trigger", WRAP_METHOD(Console, cmdTrigger));
+ registerCmd("hotarea", WRAP_METHOD(Console, cmdSetHotAreaDebug));
}
bool Console::cmdFileInfo(int argc, const char **argv) {
@@ -495,4 +496,20 @@ bool Console::cmdScriptDump(int argc, const char **argv) {
return true;
}
+bool Console::cmdSetHotAreaDebug(int argc, const char **argv) {
+ if (argc > 1) {
+ debugPrintf("Usage: %s\n", argv[0]);
+ debugPrintf("Toggle whether to show debug boxes around scene hot areas\n");
+ return true;
+ }
+
+ DgdsEngine *engine = DgdsEngine::getInstance();
+
+ bool enabled = engine->getDebugShowHotAreas();
+ debugPrintf("Turned %s hot area debug\n", enabled ? "OFF" : "ON");
+ engine->setDebugShowHotAreas(!enabled);
+ return true;
+}
+
+
} // End of namespace Dgds
diff --git a/engines/dgds/console.h b/engines/dgds/console.h
index c912e61e09b..5ce6b730677 100644
--- a/engines/dgds/console.h
+++ b/engines/dgds/console.h
@@ -45,6 +45,7 @@ private:
void printOp(int indent, const char *text);
bool cmdScriptDump(int argc, const char **argv);
bool cmdTrigger(int argc, const char **argv);
+ bool cmdSetHotAreaDebug(int argc, const char **argv);
DgdsEngine *_vm;
};
diff --git a/engines/dgds/dgds.cpp b/engines/dgds/dgds.cpp
index 435b5e01bb9..f97d5077fbc 100644
--- a/engines/dgds/dgds.cpp
+++ b/engines/dgds/dgds.cpp
@@ -89,7 +89,8 @@ DgdsEngine::DgdsEngine(OSystem *syst, const ADGameDescription *gameDesc)
_random("dgds"), _currentCursor(-1), _menuToTrigger(kMenuNone), _isLoading(true), _flipMode(false),
_rstFileName(nullptr), _difficulty(1), _menu(nullptr), _adsInterp(nullptr), _isDemo(false),
_dragonArcade(nullptr), _chinaTank(nullptr), _chinaTrain(nullptr), _skipNextFrame(false),
- _gameId(GID_INVALID), _thisFrameMs(0), _lastGlobalFade(-1), _lastGlobalFadedPal(0) {
+ _gameId(GID_INVALID), _thisFrameMs(0), _lastGlobalFade(-1), _lastGlobalFadedPal(0),
+ _debugShowHotAreas(false) {
_platform = gameDesc->platform;
_gameLang = gameDesc->language;
@@ -729,6 +730,9 @@ Common::Error DgdsEngine::run() {
bool haveActiveDialog = _scene->checkDialogActive();
+ if (_debugShowHotAreas)
+ _scene->drawDebugHotAreas(&_compositionBuffer);
+
if (getGameId() == GID_WILLY) {
_scene->drawVisibleHeads(&_compositionBuffer);
_scene->drawAndUpdateDialogs(&_compositionBuffer);
diff --git a/engines/dgds/dgds.h b/engines/dgds/dgds.h
index 1813b7562cd..45e23f5aa49 100644
--- a/engines/dgds/dgds.h
+++ b/engines/dgds/dgds.h
@@ -182,6 +182,8 @@ private:
int16 _lastGlobalFade; // Only used in Willy Beamish
uint _lastGlobalFadedPal;
+ bool _debugShowHotAreas;
+
public:
DgdsEngine(OSystem *syst, const ADGameDescription *gameDesc);
virtual ~DgdsEngine();
@@ -271,6 +273,9 @@ public:
void enableKeymapper();
void disableKeymapper();
+ void setDebugShowHotAreas(bool enable) { _debugShowHotAreas = enable; }
+ bool getDebugShowHotAreas() const { return _debugShowHotAreas; }
+
private:
Common::Error syncGame(Common::Serializer &s);
diff --git a/engines/dgds/game_palettes.h b/engines/dgds/game_palettes.h
index 505baffd197..643b908d69c 100644
--- a/engines/dgds/game_palettes.h
+++ b/engines/dgds/game_palettes.h
@@ -61,6 +61,8 @@ public:
uint getCurPalNum() const { return _curPalNum; }
+ const DgdsPal &getCurPal() const { return _curPal; }
+
private:
ResourceManager *_resourceMan;
Decompressor *_decompressor;
diff --git a/engines/dgds/scene.cpp b/engines/dgds/scene.cpp
index 5144382d981..c64b42f95f9 100644
--- a/engines/dgds/scene.cpp
+++ b/engines/dgds/scene.cpp
@@ -37,6 +37,7 @@
#include "dgds/globals.h"
#include "dgds/inventory.h"
#include "dgds/debug_util.h"
+#include "dgds/game_palettes.h"
namespace Dgds {
@@ -739,8 +740,15 @@ Dialog *SDSScene::loadDialogData(uint16 num) {
DgdsEngine *engine = DgdsEngine::getInstance();
ResourceManager *resourceManager = engine->getResourceManager();
Common::SeekableReadStream *dlgFile = resourceManager->getResource(filename);
- if (!dlgFile)
- error("Dialog file %s not found", filename.c_str());
+ if (!dlgFile) {
+ //
+ // This happens for example if debug mode clicks have been enabled in
+ // Willy Beamish, as the debug dialogs were not included in the retail
+ // version.
+ //
+ warning("Dialog file %s not found", filename.c_str());
+ return nullptr;
+ }
DgdsChunkReader chunk(dlgFile);
Decompressor *decompressor = engine->getDecompressor();
@@ -1523,14 +1531,14 @@ void SDSScene::updateHotAreasFromDynamicRects() {
HotArea *SDSScene::findAreaUnderMouse(const Common::Point &pt) {
for (auto &item : DgdsEngine::getInstance()->getGDSScene()->getGameItems()) {
- if (item._inSceneNum == _num && checkConditions(item.enableConditions)
- && _isInRect(pt, item._rect)) {
+ if (item._inSceneNum == _num && _isInRect(pt, item._rect)
+ && checkConditions(item.enableConditions)) {
return &item;
}
}
for (auto &area : _hotAreaList) {
- if (checkConditions(area.enableConditions) && _isInRect(pt, area._rect)) {
+ if (_isInRect(pt, area._rect) && checkConditions(area.enableConditions)) {
return &area;
}
}
@@ -1647,6 +1655,22 @@ void SDSScene::activateChoice() {
_shouldClearDlg = true;
}
+void SDSScene::drawDebugHotAreas(Graphics::ManagedSurface *dst) const {
+ const DgdsPal &pal = DgdsEngine::getInstance()->getGamePals()->getCurPal();
+ byte redish = pal.findBestColor(0xff, 0, 0);
+ byte greenish = pal.findBestColor(0, 0xff, 0);
+
+ for (const auto &area : _hotAreaList) {
+ bool enabled = checkConditions(area.enableConditions);
+ uint32 color = enabled ? greenish : redish;
+ g_system->getPaletteManager();
+ const Common::Rect &r = area._rect.toCommonRect();
+ dst->drawLine(r.left, r.top, r.right, r.top, color);
+ dst->drawLine(r.left, r.top, r.left, r.bottom, color);
+ dst->drawLine(r.left, r.bottom, r.right, r.bottom, color);
+ dst->drawLine(r.right, r.top, r.right, r.bottom, color);
+ }
+}
GDSScene::GDSScene() : _defaultMouseCursor(0), _defaultMouseCursor2(0), _invIconNum(0), _invIconMouseCursor(0), _defaultOtherMouseCursor(0) {
}
diff --git a/engines/dgds/scene.h b/engines/dgds/scene.h
index 3f7b0b94a91..0d34d27c435 100644
--- a/engines/dgds/scene.h
+++ b/engines/dgds/scene.h
@@ -335,6 +335,7 @@ public:
void updateHotAreasFromDynamicRects();
void setDynamicSceneRect(int16 num, int16 x, int16 y, int16 width, int16 height);
void setSceneNum(int16 num) { _num = num; }
+ void drawDebugHotAreas(Graphics::ManagedSurface *dst) const;
protected:
HotArea *findAreaUnderMouse(const Common::Point &pt);
Commit: 0af6afc9639d498dd4e3e38d563b31eb9a3a95c1
https://github.com/scummvm/scummvm/commit/0af6afc9639d498dd4e3e38d563b31eb9a3a95c1
Author: Matthew Duggan (mgithub at guarana.org)
Date: 2024-12-27T07:32:24+11:00
Commit Message:
DGDS: Name run type 1 more usefully
Changed paths:
engines/dgds/ads.cpp
engines/dgds/scene_op.h
engines/dgds/ttm.h
diff --git a/engines/dgds/ads.cpp b/engines/dgds/ads.cpp
index dc4bf2b0611..1de9cbd334f 100644
--- a/engines/dgds/ads.cpp
+++ b/engines/dgds/ads.cpp
@@ -375,7 +375,7 @@ bool ADSInterpreter::logicOpResult(uint16 code, const TTMEnviro *env, const TTMS
case 0x1070: // WHILE RUNNING
case 0x1370: // IF_RUNNING, 2 params
debugN(10, "ADS 0x%04x: %s running env %d seq %d (%s)", code, optype, envNum, seqNum, tag);
- return seq->_runFlag == kRunType1 || seq->_runFlag == kRunTypeMulti || seq->_runFlag == kRunTypeTimeLimited;
+ return seq->_runFlag == kRunTypeKeepGoing || seq->_runFlag == kRunTypeMulti || seq->_runFlag == kRunTypeTimeLimited;
case 0x1080:
case 0x1090:
warning("Unimplemented IF/WHILE operation 0x%x", code);
@@ -607,7 +607,7 @@ bool ADSInterpreter::handleOperation(uint16 code, Common::SeekableReadStream *sc
_currentTTMSeq = seq;
if (runCount == 0) {
- seq->_runFlag = kRunType1;
+ seq->_runFlag = kRunTypeKeepGoing;
} else if (runCount < 0) {
// Negative run count sets the cut time
seq->_timeCut = DgdsEngine::getInstance()->getThisFrameMs() + (-runCount * MS_PER_FRAME);
@@ -873,7 +873,7 @@ bool ADSInterpreter::run() {
seq->_lastFrame = -1;
int sflag = seq->_scriptFlag;
TTMRunType rflag = seq->_runFlag;
- if (sflag == 6 || (rflag != kRunType1 && rflag != kRunTypeTimeLimited && rflag != kRunTypeMulti && rflag != kRunTypePaused)) {
+ if (sflag == 6 || (rflag != kRunTypeKeepGoing && rflag != kRunTypeTimeLimited && rflag != kRunTypeMulti && rflag != kRunTypePaused)) {
if (sflag != 6 && sflag != 5 && rflag == kRunTypeFinished) {
seq->_runFlag = kRunTypeStopped;
}
diff --git a/engines/dgds/scene_op.h b/engines/dgds/scene_op.h
index 086ef7214c6..33325d80eda 100644
--- a/engines/dgds/scene_op.h
+++ b/engines/dgds/scene_op.h
@@ -60,13 +60,13 @@ enum SceneOpCode {
kSceneOpFreeTalkData = 26, // args: tds num to free
// Dragon-specific opcodes
- kSceneOpPasscode = 100, // args: none.
- kSceneOpMeanwhile = 101, // args: none. Clears screen and displays "meanwhile".
- kSceneOpOpenGameOverMenu = 102, // args: none.
+ kSceneOpPasscode = 100, // args: none.
+ kSceneOpMeanwhile = 101, // args: none. Clears screen and displays "meanwhile".
+ kSceneOpOpenGameOverMenu = 102, // args: none.
kSceneOpTiredDialog = 103, // args: none. Something about "boy am I tired"?
kSceneOpArcadeTick = 104, // args: none. Called in arcade post-tick.
- kSceneOpDrawDragonCountdown1 = 105, // args: none. Draw special countdown number at 141, 56
- kSceneOpDrawDragonCountdown2 = 106, // args: none. Draw some number at 250, 42
+ kSceneOpDrawDragonCountdown1 = 105, // args: none. Draw special countdown number at 141, 56
+ kSceneOpDrawDragonCountdown2 = 106, // args: none. Draw some number at 250, 42
kSceneOpOpenPlaySkipIntroMenu = 107, // args: none. DRAGON: Show menu 50, the "Play Introduction" / "Skip Introduction" menu.
kSceneOpOpenBetterSaveGameMenu = 108, // args: none. DRAGON: Show menu 46, the "Before arcade maybe you better save your game" menu.
diff --git a/engines/dgds/ttm.h b/engines/dgds/ttm.h
index f4a1f321659..d0c6228002f 100644
--- a/engines/dgds/ttm.h
+++ b/engines/dgds/ttm.h
@@ -72,7 +72,7 @@ public:
enum TTMRunType {
kRunTypeStopped = 0,
- kRunType1 = 1,
+ kRunTypeKeepGoing = 1,
kRunTypeMulti = 2,
kRunTypeTimeLimited = 3,
kRunTypeFinished = 4,
Commit: e7a181c26af4bfa341aa6e7c702f2f814593446a
https://github.com/scummvm/scummvm/commit/e7a181c26af4bfa341aa6e7c702f2f814593446a
Author: Matthew Duggan (mgithub at guarana.org)
Date: 2024-12-27T07:32:24+11:00
Commit Message:
DGDS: More Willy Beamish fixes
* Hook up ADS variable globals so correct scripts can run
* Hack "running" status of scripts so that delayed is not running
Changed paths:
engines/dgds/ads.cpp
engines/dgds/ads.h
engines/dgds/globals.cpp
engines/dgds/globals.h
engines/dgds/ttm.cpp
diff --git a/engines/dgds/ads.cpp b/engines/dgds/ads.cpp
index 1de9cbd334f..1c43841464e 100644
--- a/engines/dgds/ads.cpp
+++ b/engines/dgds/ads.cpp
@@ -20,6 +20,7 @@
*/
#include "dgds/ads.h"
+#include "dgds/globals.h"
namespace Dgds {
@@ -187,7 +188,7 @@ void ADSInterpreter::findUsedSequencesForSegment(int idx) {
}
}
if (!already_added) {
- debug(10, "ADS seg no %d (idx %d) uses seq %d %d", segno, idx, envno, seqno);
+ debug(10, "ADS seg no %d (idx %d) uses env %d seq %d", segno, idx, envno, seqno);
_adsData->_usedSeqs[idx].push_back(seq);
}
}
@@ -344,6 +345,8 @@ bool ADSInterpreter::logicOpResult(uint16 code, const TTMEnviro *env, const TTMS
assert(seq || (code & 0xFF) >= 0x80);
+ Globals *globals = DgdsEngine::getInstance()->getGameGlobals();
+
switch (code) {
case 0x1010: // WHILE paused
case 0x1310: // IF paused, 2 params
@@ -390,24 +393,29 @@ bool ADSInterpreter::logicOpResult(uint16 code, const TTMEnviro *env, const TTMS
debugN(10, "ADS 0x%04x: if detail >= %d", code, arg);
return true;
//return ((int)DgdsEngine::getInstance()->getDetailLevel() >= arg);
- case 0x13A0: // IF _adsVariable[0] <=
+ //
+ // NOTE: The globals for the following ops use the numbers from Willy
+ // Beamish (0x4F, 0x50). If these ops are used in any of the other newer
+ // games (Quarky or Johnny Castaway) they may need updating.
+ //
+ case 0x13A0: // IF some_ads_variable[0] <=
debugN(10, "ADS 0x%04x: if adsVariable[0] <= %d", code, arg);
- return _adsData->_adsVariable[0] <= arg;
+ return globals->getGlobal(0x50) <= arg;
case 0x13A1: // IF some_ads_variable[1] <=
debugN(10, "ADS 0x%04x: if adsVariable[1] <= %d", code, arg);
- return _adsData->_adsVariable[1] <= arg;
+ return globals->getGlobal(0x4F) <= arg;
case 0x13B0: // IF some_ads_variable[0] >
debugN(10, "ADS 0x%04x: if adsVariable[0] > %d", code, arg);
- return _adsData->_adsVariable[0] > arg;
+ return globals->getGlobal(0x50) > arg;
case 0x13B1: // IF some_ads_variable[1] >
debugN(10, "ADS 0x%04x: if adsVariable[1] > %d", code, arg);
- return _adsData->_adsVariable[1] > arg;
+ return globals->getGlobal(0x4F) > arg;
case 0x13C0: // IF some_ads_variable[0] ==
debugN(10, "ADS 0x%04x: if adsVariable[0] == %d", code, arg);
- return _adsData->_adsVariable[0] == arg;
+ return globals->getGlobal(0x50) == arg;
case 0x13C1: // IF some_ads_variable[1] ==
debugN(10, "ADS 0x%04x: if adsVariable[1] == %d", code, arg);
- return _adsData->_adsVariable[1] == arg;
+ return globals->getGlobal(0x4F) == arg;
default:
error("Not an ADS logic op: %04x, how did we get here?", code);
}
@@ -786,21 +794,56 @@ int16 ADSInterpreter::getStateForSceneOp(uint16 segnum) {
int idx = getArrIndexOfSegNum(segnum);
if (idx < 0)
return 0;
- if (!(_adsData->_state[idx] & 4)) {
- for (const Common::SharedPtr<TTMSeq> &seq: _adsData->_usedSeqs[idx]) {
- if (!seq)
- return 0;
- if (seq->_runFlag != kRunTypeStopped && !seq->_selfLoop)
- return 1;
+
+ // Slightly different implementation after Dragon.
+ // Finished is also a "stopped" state in HoC+
+ if (DgdsEngine::getInstance()->getGameId() == GID_DRAGON) {
+ if (!(_adsData->_state[idx] & 4)) {
+ for (const Common::SharedPtr<TTMSeq> &seq: _adsData->_usedSeqs[idx]) {
+ if (!seq)
+ error("getStateForSceneOp: used seq for seg %d should not be null", segnum);
+ if (seq->_runFlag != kRunTypeStopped && !seq->_selfLoop)
+ return 1;
+ }
+ return 0;
+ }
+ } else if (DgdsEngine::getInstance()->getGameId() == GID_HOC) {
+ int state = (_adsData->_state[idx] & 0xfff7);
+ if (state != 4 && state != 1) {
+ for (const Common::SharedPtr<TTMSeq> &seq: _adsData->_usedSeqs[idx]) {
+ if (!seq)
+ error("getStateForSceneOp: used seq for seg %d should not be null", segnum);
+ if (seq->_runFlag != kRunTypeStopped && seq->_runFlag != kRunTypeFinished && !seq->_selfLoop)
+ return 1;
+ }
+ return 0;
+ }
+ } else { // WILLY+
+ int state = (_adsData->_state[idx] & 0xfff7);
+ if (state != 4 && state != 1) {
+ for (const Common::SharedPtr<TTMSeq> &seq: _adsData->_usedSeqs[idx]) {
+ if (!seq)
+ error("getStateForSceneOp: used seq for seg %d should not be null", segnum);
+ //
+ // TODO: This last check is a bit of a guess to make Willy Beamish work correctly.
+ // It seems to need sequences to return false from this function even when they
+ // are delayed. Eg, outside the house (HE.ADS, scene 10), seq 20 (willy scratching
+ // his leg) runs and repeats randomly every 400 to 900 frames, but the door hot area
+ // is not active if that script is "running".
+ //
+ if (seq->_runFlag != kRunTypeStopped && seq->_runFlag != kRunTypeFinished && !seq->_selfLoop && seq->_timeNext <= DgdsEngine::getInstance()->getThisFrameMs())
+ return 1;
+ }
+ return 0;
}
- return 0;
}
+
return 1;
}
int ADSInterpreter::getArrIndexOfSegNum(uint16 segnum) {
- int32 startoff = _adsData->scr->pos();
+ const int32 startoff = _adsData->scr->pos();
int result = -1;
for (int i = 0; i < _adsData->_maxSegments; i++) {
_adsData->scr->seek(_adsData->_segments[i]);
diff --git a/engines/dgds/ads.h b/engines/dgds/ads.h
index 6ecc0c91123..9115c46f213 100644
--- a/engines/dgds/ads.h
+++ b/engines/dgds/ads.h
@@ -37,7 +37,6 @@ public:
for (int i = 0; i < ARRAYSIZE(_segments); i++)
_segments[i] = -1;
- ARRAYCLEAR(_adsVariable);
ARRAYCLEAR(_countdown);
ARRAYCLEAR(_charWhile);
}
@@ -57,7 +56,6 @@ public:
bool _hitTTMOp0110;
bool _hitBranchOp;
int16 _runningSegmentIdx;
- int16 _adsVariable[2];
Common::Error syncState(Common::Serializer &s);
};
diff --git a/engines/dgds/globals.cpp b/engines/dgds/globals.cpp
index c9d1d12d1a4..bd942ef2146 100644
--- a/engines/dgds/globals.cpp
+++ b/engines/dgds/globals.cpp
@@ -319,7 +319,7 @@ public:
int16 oldVal = get();
if (val != oldVal) {
val = CLIP(val, (int16)0, (int16)10);
- warning("TODO: Implement set function for willy global 0x02 val %d.", val);
+ error("TODO: Implement set function for willy global 0x02 val %d.", val);
return RWI16Global::set(val);
}
return oldVal;
@@ -329,12 +329,13 @@ public:
WillyGlobals::WillyGlobals(Clock &clock) : Globals(clock),
_unk2(4), _unk3(0), _invDrawTimeSkipButtons(0), _hideMouseCursor(0), _unk74(0), _unk75(300),
- _palFade(255), _droppedItemNum(0), _unk79(0), _unk80(0), _unk81(3), _unk82(1) {
+ _palFade(255), _droppedItemNum(0), _characterStance(0), _characterPos(0), _unk81(3),
+ _unk82(1) {
_globals.push_back(new DetailLevelROGlobal(0x53));
- _globals.push_back(new RWI16Global(0x52, &_unk82));
- _globals.push_back(new RWI16Global(0x51, &_unk81));
- _globals.push_back(new RWI16Global(0x50, &_unk80));
- _globals.push_back(new RWI16Global(0x4F, &_unk79));
+ _globals.push_back(new RWI16Global(0x52, &_unk82)); // Maybe text speed?
+ _globals.push_back(new RWI16Global(0x51, &_unk81)); // Maybe difficulty?
+ _globals.push_back(new RWI16Global(0x50, &_characterPos)); // ads variable 0 - character position?
+ _globals.push_back(new RWI16Global(0x4F, &_characterStance)); // ads varaible 1 - character stance?
_globals.push_back(new RWI16Global(0x4E, &_droppedItemNum));
_globals.push_back(new RWI16Global(0x4D, &_palFade));
_globals.push_back(new PaletteFadeGlobal(0x4C, &_palFade));
@@ -356,8 +357,8 @@ Common::Error WillyGlobals::syncState(Common::Serializer &s) {
s.syncAsSint16LE(_unk75);
s.syncAsSint16LE(_palFade);
s.syncAsSint16LE(_droppedItemNum);
- s.syncAsSint16LE(_unk79);
- s.syncAsSint16LE(_unk80);
+ s.syncAsSint16LE(_characterStance);
+ s.syncAsSint16LE(_characterPos);
s.syncAsSint16LE(_unk81);
s.syncAsSint16LE(_unk82);
diff --git a/engines/dgds/globals.h b/engines/dgds/globals.h
index 443e4e70916..f99ecc7be9c 100644
--- a/engines/dgds/globals.h
+++ b/engines/dgds/globals.h
@@ -215,8 +215,8 @@ private:
int16 _unk75;
int16 _palFade;
int16 _droppedItemNum;
- int16 _unk79;
- int16 _unk80;
+ int16 _characterStance;
+ int16 _characterPos;
int16 _unk81;
int16 _unk82;
diff --git a/engines/dgds/ttm.cpp b/engines/dgds/ttm.cpp
index 8259db92b57..5e4d76fb1de 100644
--- a/engines/dgds/ttm.cpp
+++ b/engines/dgds/ttm.cpp
@@ -1048,13 +1048,13 @@ bool TTMInterpreter::handleOperation(TTMEnviro &env, TTMSeq &seq, uint16 op, byt
seq._drawColFG, plotClippedPoint, &clipSurf);
break;
}
- case 0xb000:
+ case 0xb000: // INIT CREDITS SCRLL
if (seq._executed) // this is a one-shot op
break;
env._creditScrollMeasure = doOpInitCreditScroll(env._scriptShapes[seq._currentBmpId].get());
env._creditScrollYOffset = 0;
break;
- case 0xb010: {
+ case 0xb010: { // DRAW CREDITS SCROLL
const Image *img = env._scriptShapes[seq._currentBmpId].get();
if (img && img->isLoaded()) {
bool finished = doOpCreditsScroll(env._scriptShapes[seq._currentBmpId].get(), ivals[0], env._creditScrollYOffset,
More information about the Scummvm-git-logs
mailing list