void DreamWebEngine::selectOpenOb() { uint8 slotSize, slotCount; getAnyAd(&slotSize, &slotCount); if (slotCount == 255) { // Can't open the object blank(); return; } if (_commandType != 224) { _commandType = 224; commandWithOb(38, _objectType, _command); } if (_mouseButton == _oldButton || !(_mouseButton & 1)) return; _openedOb = _command; _openedType = _objectType; createPanel(); showPanel(); showMan(); examIcon(); showExit(); openInv(); openOb(); underTextLine(); readMouse(); showPointer(); workToScreen(); delPointer(); }
void DreamWebEngine::inventory() { if (_vars._manDead == 1 || _vars._watchingTime != 0) { blank(); return; } commandOnlyCond(32, 239); if (_mouseButton == _oldButton) return; if (!(_mouseButton & 1)) // only on left mouse button return; _timeCount = 0; _pointerMode = 0; _inMapArea = 0; animPointer(); createPanel(); showPanel(); examIcon(); showMan(); showExit(); underTextLine(); _pickUp = 0; _invOpen = 2; openInv(); readMouse(); showPointer(); workToScreen(); delPointer(); _openedOb = 255; examineOb(false); }
void DreamWebEngine::wornError() { _commandType = 255; delPointer(); printMessage(76, 21, 57, 240, false); workToScreenM(); hangOnP(50); showPanel(); showMan(); examIcon(); _commandType = 255; workToScreenM(); }
void DreamWebEngine::cantDrop() { _commandType = 255; delPointer(); printMessage(76, 21, 24, 240, 240 & 1); workToScreenM(); hangOnP(50); showPanel(); showMan(); examIcon(); _commandType = 255; workToScreenM(); }
void DreamWebEngine::examineInventory() { commandOnlyCond(32, 249); if (!(_mouseButton & 1)) return; createPanel(); showPanel(); showMan(); showExit(); examIcon(); _pickUp = 0; _invOpen = 2; openInv(); workToScreenM(); }
void DreamWebEngine::setPickup() { if (_objectType != kSetObjectType1 && _objectType != kSetObjectType3) { // Object types 1 and 3 are excluded, so the resulting object is a DynObject uint8 dummy; DynObject *object = (DynObject *)getAnyAd(&dummy, &dummy); if (object->mapad[0] == 4) { blank(); return; } } else { blank(); return; } if (_commandType != 209) { _commandType = 209; commandWithOb(33, _objectType, _command); } if (_mouseButton != 1 || _mouseButton == _oldButton) return; createPanel(); showPanel(); showMan(); showExit(); examIcon(); _pickUp = 1; _invOpen = 2; if (_objectType != kExObjectType) { assert(_objectType == kFreeObjectType); _openedOb = 255; _itemFrame = transferToEx(_command); _objectType = kExObjectType; DynObject *object = getExAd(_itemFrame); object->mapad[0] = 20; object->mapad[1] = 255; } else { _itemFrame = _command; _openedOb = 255; } openInv(); workToScreenM(); }