diff options
author | D G Turner | 2012-07-16 01:24:40 +0100 |
---|---|---|
committer | D G Turner | 2012-07-16 01:24:40 +0100 |
commit | e73dffa57cbe65ffb10af4f2a5b47f644269caab (patch) | |
tree | 191c3e8e2ebdf81dec58d4006a98ca20a688120b /engines/sci/graphics/frameout.cpp | |
parent | 9669b73ca811af9672215748e92acb3f77805b75 (diff) | |
parent | 1fffbe40ceb82bec77479c56176abeff0d2bd5e5 (diff) | |
download | scummvm-rg350-e73dffa57cbe65ffb10af4f2a5b47f644269caab.tar.gz scummvm-rg350-e73dffa57cbe65ffb10af4f2a5b47f644269caab.tar.bz2 scummvm-rg350-e73dffa57cbe65ffb10af4f2a5b47f644269caab.zip |
Merge branch 'master' into teenagentRefactor
Conflicts:
engines/teenagent/resources.cpp
Diffstat (limited to 'engines/sci/graphics/frameout.cpp')
-rw-r--r-- | engines/sci/graphics/frameout.cpp | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/engines/sci/graphics/frameout.cpp b/engines/sci/graphics/frameout.cpp index 5b857fe3d8..cb56e24de9 100644 --- a/engines/sci/graphics/frameout.cpp +++ b/engines/sci/graphics/frameout.cpp @@ -117,6 +117,8 @@ void GfxFrameout::showCurrentScrollText() { } } +extern void showScummVMDialog(const Common::String &message); + void GfxFrameout::kernelAddPlane(reg_t object) { PlaneEntry newPlane; @@ -131,10 +133,30 @@ void GfxFrameout::kernelAddPlane(reg_t object) { tmpRunningWidth = 320; tmpRunningHeight = 200; } + + // HACK: Phantasmagoria 1 sets a window size of 630x450. + // We can't set a width of 630, as that messes up the pitch, so we hack + // the internal script width here + if (g_sci->getGameId() == GID_PHANTASMAGORIA) { + tmpRunningWidth = 325; + } _coordAdjuster->setScriptsResolution(tmpRunningWidth, tmpRunningHeight); } + // Import of QfG character files dialog is shown in QFG4. + // Display additional popup information before letting user use it. + // For the SCI0-SCI1.1 version of this, check kDrawControl(). + if (g_sci->inQfGImportRoom() && !strcmp(_segMan->getObjectName(object), "DSPlane")) { + showScummVMDialog("Characters saved inside ScummVM are shown " + "automatically. Character files saved in the original " + "interpreter need to be put inside ScummVM's saved games " + "directory and a prefix needs to be added depending on which " + "game it was saved in: 'qfg1-' for Quest for Glory 1, 'qfg2-' " + "for Quest for Glory 2, 'qfg3-' for Quest for Glory 3. " + "Example: 'qfg2-thief.sav'."); + } + newPlane.object = object; newPlane.priority = readSelectorValue(_segMan, object, SELECTOR(priority)); newPlane.lastPriority = 0xFFFF; // hidden @@ -294,6 +316,10 @@ reg_t GfxFrameout::addPlaneLine(reg_t object, Common::Point startPoint, Common:: } void GfxFrameout::updatePlaneLine(reg_t object, reg_t hunkId, Common::Point startPoint, Common::Point endPoint, byte color, byte priority, byte control) { + // Check if we're asked to update a line that was never added + if (hunkId.isNull()) + return; + for (PlaneList::iterator it = _planes.begin(); it != _planes.end(); ++it) { if (it->object == object) { for (PlaneLineList::iterator it2 = it->lines.begin(); it2 != it->lines.end(); ++it2) { @@ -311,6 +337,10 @@ void GfxFrameout::updatePlaneLine(reg_t object, reg_t hunkId, Common::Point star } void GfxFrameout::deletePlaneLine(reg_t object, reg_t hunkId) { + // Check if we're asked to delete a line that was never added (happens during the intro of LSL6) + if (hunkId.isNull()) + return; + for (PlaneList::iterator it = _planes.begin(); it != _planes.end(); ++it) { if (it->object == object) { for (PlaneLineList::iterator it2 = it->lines.begin(); it2 != it->lines.end(); ++it2) { |