void ScummEngine_v60he::o60_setState() { int state = pop(); int obj = pop(); if (state & 0x8000) { state &= 0x7FFF; putState(obj, state); if (_game.heversion >= 72) removeObjectFromDrawQue(obj); } else { putState(obj, state); markObjectRectAsDirty(obj); if (_bgNeedsRedraw) clearDrawObjectQueue(); } }
void ClientState::putProjectPersistent(const std::string& scope, const std::string& name, const json::Value& value) { json::Object stateContainer; putState(scope, std::make_pair(name, value), &stateContainer); putProjectPersistent(stateContainer); }
void ClientState::putTemporary(const std::string& scope, const std::string& name, const json::Value& value) { json::Object stateContainer ; putState(scope, std::make_pair(name, value), &stateContainer); putTemporary(stateContainer); }
void ScummEngine_v0::o_pickupObject() { int obj = fetchScriptByte(); if (!obj) obj = _cmdObject; /* Don't take an object twice */ if (whereIsObject(obj) == WIO_INVENTORY) return; addObjectToInventory(obj, _roomResource); markObjectRectAsDirty(obj); putOwner(obj, VAR(VAR_EGO)); putState(obj, getState(obj) | kObjectState_08 | kObjectStateUntouchable); clearDrawObjectQueue(); runInventoryScript(1); }
void ScummEngine_v70he::o70_pickupObject() { int obj, room; room = pop(); obj = pop(); if (room == 0) room = getObjectRoom(obj); addObjectToInventory(obj, room); putOwner(obj, VAR(VAR_EGO)); if (_game.heversion <= 70) { putClass(obj, kObjectClassUntouchable, 1); putState(obj, 1); markObjectRectAsDirty(obj); clearDrawObjectQueue(); } runInventoryScript(obj); /* Difference */ }
void ScummEngine_v4::o4_pickupObject() { int obj = getVarOrDirectWord(PARAM_1); if (obj < 1) { error("pickupObjectOld received invalid index %d (script %d)", obj, vm.slot[_currentScript].number); } if (getObjectIndex(obj) == -1) return; if (whereIsObject(obj) == WIO_INVENTORY) // Don't take an object twice return; // debug(0, "adding %d from %d to inventoryOld", obj, _currentRoom); addObjectToInventory(obj, _roomResource); markObjectRectAsDirty(obj); putOwner(obj, VAR(VAR_EGO)); putClass(obj, kObjectClassUntouchable, 1); putState(obj, 1); clearDrawObjectQueue(); runInventoryScript(1); }
void ScummEngine_v2::o2_clearState08() { int obj = getActiveObject(); putState(obj, getState(obj) & ~kObjectState_08); markObjectRectAsDirty(obj); clearDrawObjectQueue(); }
void ScummEngine_v2::clearStateCommon(byte type) { int obj = getActiveObject(); putState(obj, getState(obj) & ~type); }