diff options
author | sluicebox | 2019-09-25 21:00:48 -0700 |
---|---|---|
committer | sluicebox | 2019-09-25 21:00:48 -0700 |
commit | 999f813dc353f351ce27aeb555ae81789ad449f3 (patch) | |
tree | d0341ba74695f20cd11721d57661d120768255db /engines/sci/graphics | |
parent | 5726bc6e8037505ed6e9e95da86b16a483de8977 (diff) | |
download | scummvm-rg350-999f813dc353f351ce27aeb555ae81789ad449f3.tar.gz scummvm-rg350-999f813dc353f351ce27aeb555ae81789ad449f3.tar.bz2 scummvm-rg350-999f813dc353f351ce27aeb555ae81789ad449f3.zip |
SCI32: Add QFG4 character import message box
Adds the ScummVM message box explaining saved character files
to the QFG4 import character screen.
Diffstat (limited to 'engines/sci/graphics')
-rw-r--r-- | engines/sci/graphics/frameout.cpp | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/engines/sci/graphics/frameout.cpp b/engines/sci/graphics/frameout.cpp index 99fd8e62cb..e20166b8ee 100644 --- a/engines/sci/graphics/frameout.cpp +++ b/engines/sci/graphics/frameout.cpp @@ -269,6 +269,7 @@ void GfxFrameout::kernelDeleteScreenItem(const reg_t object) { #pragma mark Planes void GfxFrameout::kernelAddPlane(const reg_t object) { + Plane *plane = _planes.findByObject(object); if (plane != nullptr) { plane->update(object); @@ -277,6 +278,29 @@ void GfxFrameout::kernelAddPlane(const reg_t object) { plane = new Plane(object); addPlane(plane); } + + // Detect the QFG4 import character dialog, disable the Change Directory + // button, and display a message box explaining how to import saved + // character files in ScummVM. SCI16 games are handled by kDrawControl. + if (g_sci->inQfGImportRoom()) { + // kAddPlane is called several times, this detects the second call + // which is for the import character dialog. If changeButton:value + // is non-zero then the dialog is initializing. If the button isn't + // disabled then we havne't displayed the message box yet. There + // are multiple changeButtons because the script clones the object. + SegManager *segMan = g_sci->getEngineState()->_segMan; + Common::Array<reg_t> changeDirButtons = _segMan->findObjectsByName("changeButton"); + for (uint i = 0; i < changeDirButtons.size(); ++i) { + if (readSelectorValue(segMan, changeDirButtons[i], SELECTOR(value))) { + // disable Change Directory button by setting state to zero + if (readSelectorValue(segMan, changeDirButtons[i], SELECTOR(state))) { + writeSelectorValue(segMan, changeDirButtons[i], SELECTOR(state), 0); + g_sci->showQfgImportMessageBox(); + break; + } + } + } + } } void GfxFrameout::kernelUpdatePlane(const reg_t object) { |