void DreamWebEngine::incRyanPage() { commandOnlyCond(31, 222); if (_mouseButton == _oldButton || !(_mouseButton & 1)) return; _vars._ryanPage = (_mouseX - (kInventx + 167)) / 18; delPointer(); fillRyan(); readMouse(); showPointer(); workToScreen(); delPointer(); }
void DreamWebEngine::swapWithInv() { ObjectRef subject; subject._type = _objectType; subject._index = _itemFrame; if (subject != _oldSubject || _commandType != 243) { if (subject == _oldSubject) _commandType = 243; _oldSubject = subject; commandWithOb(34, subject._type, subject._index); } if (_mouseButton == _oldButton || !(_mouseButton & 1)) return; byte prevType = _objectType; byte prevFrame = _itemFrame; ObjectRef objectId = findInvPos(); _itemFrame = objectId._index; _objectType = objectId._type; DynObject *object = getEitherAd(); object->mapad[0] = 20; object->mapad[1] = 255; byte prevType2 = _objectType; byte prevFrame2 = _itemFrame; _objectType = prevType; _itemFrame = prevFrame; delPointer(); object = getEitherAd(); object->mapad[0] = 4; object->mapad[1] = 255; object->mapad[2] = _lastInvPos; _objectType = prevType2; _itemFrame = prevFrame2; fillRyan(); readMouse(); showPointer(); workToScreen(); delPointer(); }
void DreamWebEngine::outOfInv() { ObjectRef subject = findInvPos(); if (subject._index == 255) { blank(); return; } if (_mouseButton == 2) { reExFromInv(); return; } if (subject != _oldSubject || _commandType != 221) { if (subject == _oldSubject) _commandType = 221; _oldSubject = subject; commandWithOb(36, subject._type, subject._index); } if (_mouseButton == _oldButton || !(_mouseButton & 1)) return; delPointer(); _pickUp = 1; subject = findInvPos(); _objectType = subject._type; _itemFrame = subject._index; assert(subject._type == kExObjectType); DynObject *object = getExAd(subject._index); object->mapad[0] = 20; object->mapad[1] = 255; fillRyan(); readMouse(); showPointer(); inToInv(); workToScreen(); delPointer(); }
void DreamWebEngine::inToInv() { if (!_pickUp) { outOfInv(); return; } ObjectRef subject = findInvPos(); if (subject._index != 255) { swapWithInv(); return; } subject._type = _objectType; subject._index = _itemFrame; if (subject != _oldSubject || _commandType != 220) { if (subject == _oldSubject) _commandType = 220; _oldSubject = subject; commandWithOb(35, subject._type, subject._index); } if (_mouseButton == _oldButton || !(_mouseButton & 1)) return; // notletgo2 delPointer(); DynObject *object = getExAd(_itemFrame); object->mapad[0] = 4; object->mapad[1] = 255; object->mapad[2] = _lastInvPos; _pickUp = 0; fillRyan(); readMouse(); showPointer(); outOfInv(); workToScreen(); delPointer(); }
void DreamWebEngine::swapWithOpen() { ObjectRef subject; subject._type = _objectType; subject._index = _itemFrame; if (subject != _oldSubject || _commandType != 242) { if (subject == _oldSubject) _commandType = 242; _oldSubject = subject; commandWithOb(34, subject._type, subject._index); } if (_mouseButton == _oldButton || !(_mouseButton & 1)) return; if (isItWorn(getEitherAd())) { wornError(); return; } delPointer(); if (_itemFrame == _openedOb && _objectType == _openedType) { errorMessage1(); return; } if (!checkObjectSize()) return; byte prevType = _objectType; byte prevFrame = _itemFrame; ObjectRef objectId = findOpenPos(); _objectType = objectId._type; _itemFrame = objectId._index; if (_objectType != kExObjectType) { assert(objectId._type == kFreeObjectType); _itemFrame = transferToEx(objectId._index); _objectType = kExObjectType; } DynObject *object = getEitherAd(); object->mapad[0] = 20; object->mapad[1] = 255; byte prevType2 = _objectType; byte prevFrame2 = _itemFrame; _objectType = prevType; _itemFrame = prevFrame; object = getEitherAd(); object->mapad[0] = _openedType; object->mapad[1] = _openedOb; object->mapad[2] = _lastInvPos; object->mapad[3] = _realLocation; _objectType = prevType2; _itemFrame = prevFrame2; fillOpen(); fillRyan(); underTextLine(); readMouse(); useOpened(); showPointer(); workToScreen(); delPointer(); }
void DreamWebEngine::openInv() { _invOpen = 1; printMessage(80, 58 - 10, 61, 240, (240 & 1)); fillRyan(); _commandType = 255; }