void GfxFrameout::kernelAddPlane(reg_t object) { PlaneEntry newPlane; if (_planes.empty()) { // There has to be another way for sierra sci to do this or maybe script resolution is compiled into // interpreter (TODO) uint16 tmpRunningWidth = readSelectorValue(_segMan, object, SELECTOR(resX)); uint16 tmpRunningHeight = readSelectorValue(_segMan, object, SELECTOR(resY)); // The above can be 0 in SCI3 (e.g. Phantasmagoria 2) if (tmpRunningWidth > 0 && tmpRunningHeight > 0) { scriptsRunningWidth = tmpRunningWidth; scriptsRunningHeight = tmpRunningHeight; } _coordAdjuster->setScriptsResolution(scriptsRunningWidth, scriptsRunningHeight); } newPlane.object = object; newPlane.pictureId = 0xFFFF; newPlane.priority = readSelectorValue(_segMan, object, SELECTOR(priority)); newPlane.lastPriority = 0xFFFF; // hidden newPlane.planeOffsetX = 0; _planes.push_back(newPlane); kernelUpdatePlane(object); }
void GfxFrameout::kernelAddPlane(reg_t object) { PlaneEntry newPlane; if (_planes.empty()) { // There has to be another way for sierra sci to do this or maybe script resolution is compiled into // interpreter (TODO) uint16 scriptWidth = readSelectorValue(_segMan, object, SELECTOR(resX)); uint16 scriptHeight = readSelectorValue(_segMan, object, SELECTOR(resY)); // Phantasmagoria 2 doesn't specify a script width/height if (g_sci->getGameId() == GID_PHANTASMAGORIA2) { scriptWidth = 640; scriptHeight = 480; } assert(scriptWidth > 0 && scriptHeight > 0); _coordAdjuster->setScriptsResolution(scriptWidth, scriptHeight); } // 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 = -1; // hidden newPlane.planeOffsetX = 0; newPlane.planeOffsetY = 0; newPlane.pictureId = kPlanePlainColored; newPlane.planePictureMirrored = false; newPlane.planeBack = 0; _planes.push_back(newPlane); kernelUpdatePlane(object); }