void ScummEngine_v0::resetScummVars() { resetSentence(); VAR(VAR_EGO) = 3; // Setup light _currentLights = LIGHTMODE_actor_use_base_palette | LIGHTMODE_actor_use_colors | LIGHTMODE_room_lights_on; }
void ScummEngine_v0::switchActor(int slot) { resetSentence(); // actor switching only allowed during normal gamplay (not cutscene, ...) if (_currentMode != kModeNormal) return; VAR(VAR_EGO) = VAR(97 + slot); actorFollowCamera(VAR(VAR_EGO)); }
void ScummEngine_v0::o_cutscene() { vm.cutSceneData[0] = _currentMode; vm.cutSceneData[2] = _currentRoom; freezeScripts(0); setMode(kModeCutscene); _sentenceNum = 0; resetSentence(); vm.cutScenePtr[0] = 0; vm.cutSceneScript[0] = 0; }
void ScummEngine_v0::o_loadRoomWithEgo() { Actor_v0 *a; int obj, room, x, y, dir; obj = fetchScriptByte(); room = fetchScriptByte(); a = (Actor_v0 *)derefActor(VAR(VAR_EGO), "o_loadRoomWithEgo"); //0x634F if (a->_miscflags & kActorMiscFlagFreeze) { stopObjectCode(); return; } // The original interpreter sets the actors new room X/Y to the last rooms X/Y // This fixes a problem with MM: script 158 in room 12, the 'Oomph!' script // This scripts runs before the actor position is set to the correct room entry location a->putActor(a->getPos().x, a->getPos().y, room); _egoPositioned = false; startScene(a->_room, a, obj); getObjectXYPos(obj, x, y, dir); AdjustBoxResult r = a->adjustXYToBeInBox(x, y); x = r.x; y = r.y; a->putActor(x, y, _currentRoom); camera._dest.x = camera._cur.x = a->getPos().x; setCameraAt(a->getPos().x, a->getPos().y); setCameraFollows(a); _fullRedraw = true; resetSentence(); if (x >= 0 && y >= 0) { a->startWalkActor(x, y, -1); } }