aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/graphics
diff options
context:
space:
mode:
authorColin Snover2017-04-22 12:27:57 -0500
committerColin Snover2017-04-22 13:01:16 -0500
commitec12c5a342519c51a1db521111ee19d4a56970f6 (patch)
tree0d28adeeba64a3db9b70df45be4d5a27c18dd612 /engines/sci/graphics
parent3303a881397beff1753fba237a5da735de03edb5 (diff)
downloadscummvm-rg350-ec12c5a342519c51a1db521111ee19d4a56970f6.tar.gz
scummvm-rg350-ec12c5a342519c51a1db521111ee19d4a56970f6.tar.bz2
scummvm-rg350-ec12c5a342519c51a1db521111ee19d4a56970f6.zip
SCI: Move ScummVM save/restore to GuestAdditions and reimplement for SCI32
Diffstat (limited to 'engines/sci/graphics')
-rw-r--r--engines/sci/graphics/frameout.cpp83
-rw-r--r--engines/sci/graphics/frameout.h1
2 files changed, 0 insertions, 84 deletions
diff --git a/engines/sci/graphics/frameout.cpp b/engines/sci/graphics/frameout.cpp
index 5f96a8e1c9..47992763f1 100644
--- a/engines/sci/graphics/frameout.cpp
+++ b/engines/sci/graphics/frameout.cpp
@@ -127,95 +127,12 @@ void GfxFrameout::run() {
_planes.add(initPlane);
}
-// SCI32 actually did not clear anything at all it seems on restore. The scripts actually cleared up
-// planes + screen items right before restoring. And after restoring they sync'd its internal planes list
-// as well.
void GfxFrameout::clear() {
_planes.clear();
_visiblePlanes.clear();
_showList.clear();
}
-// This is what Game::restore does, only needed when our ScummVM dialogs are patched in
-// It actually does one pass before actual restore deleting screen items + planes
-// And after restore it does another pass adding screen items + planes.
-// Attention: at least Space Quest 6's option plane seems to stay in memory right from the start and is not re-created.
-void GfxFrameout::syncWithScripts(bool addElements) {
- EngineState *engineState = g_sci->getEngineState();
- SegManager *segMan = engineState->_segMan;
-
- // In case original save/restore dialogs are active, don't do anything
- if (ConfMan.getBool("originalsaveload"))
- return;
-
- // Get planes list object
- reg_t planesListObject = engineState->variables[VAR_GLOBAL][kGlobalVarPlanes];
- reg_t planesListElements = readSelector(segMan, planesListObject, SELECTOR(elements));
-
- List *planesList = segMan->lookupList(planesListElements);
- reg_t planesNodeObject = planesList->first;
-
- // Go through all elements of planes::elements
- while (!planesNodeObject.isNull()) {
- Node *planesNode = segMan->lookupNode(planesNodeObject);
- reg_t planeObject = planesNode->value;
-
- if (addElements) {
- // Add this plane object
- kernelAddPlane(planeObject);
- }
-
- reg_t planeCastsObject = readSelector(segMan, planeObject, SELECTOR(casts));
- reg_t setListElements = readSelector(segMan, planeCastsObject, SELECTOR(elements));
-
- // Now go through all elements of plane::casts::elements
- List *planeCastsList = segMan->lookupList(setListElements);
- reg_t planeCastsNodeObject = planeCastsList->first;
-
- while (!planeCastsNodeObject.isNull()) {
- Node *castsNode = segMan->lookupNode(planeCastsNodeObject);
- reg_t castsObject = castsNode->value;
-
- reg_t castsListElements = readSelector(segMan, castsObject, SELECTOR(elements));
-
- List *castsList = segMan->lookupList(castsListElements);
- reg_t castNodeObject = castsList->first;
-
- while (!castNodeObject.isNull()) {
- Node *castNode = segMan->lookupNode(castNodeObject);
- reg_t castObject = castNode->value;
-
- // read selector "-info-" of this object
- // TODO: Seems to have been changed for SCI3
- // Do NOT use getInfoSelector in here. SCI3 games did not use infoToa, but an actual selector.
- // Maybe that selector is just a straight copy, but it needs to get verified/checked.
- uint16 castInfoSelector = readSelectorValue(segMan, castObject, SELECTOR(_info_));
-
- if (castInfoSelector & kInfoFlagViewInserted) {
- if (addElements) {
- // Flag set, so add this screen item
- kernelAddScreenItem(castObject);
- } else {
- // Flag set, so delete this screen item
- kernelDeleteScreenItem(castObject);
- }
- }
-
- castNodeObject = castNode->succ;
- }
-
- planeCastsNodeObject = castsNode->succ;
- }
-
- if (!addElements) {
- // Delete this plane object
- kernelDeletePlane(planeObject);
- }
-
- planesNodeObject = planesNode->succ;
- }
-}
-
bool GfxFrameout::gameIsHiRes() const {
// QFG4 is always low resolution
if (g_sci->getGameId() == GID_QFG4) {
diff --git a/engines/sci/graphics/frameout.h b/engines/sci/graphics/frameout.h
index 9738203b74..208c5b439c 100644
--- a/engines/sci/graphics/frameout.h
+++ b/engines/sci/graphics/frameout.h
@@ -58,7 +58,6 @@ public:
bool _isHiRes;
void clear();
- void syncWithScripts(bool addElements); // this is what Game::restore does, only needed when our ScummVM dialogs are patched in
void run();
#pragma mark -