int main(int argc) { Thing *one = getThing(false); Thing *two = getThing(true); int x = one->getX() + two->getX(); assert(x==3); delete two; delete one; assert(decon==2); return 0; }
int cache_flush(){ int i = 0; for( i=0; i<SECTORS; i++ ){ printf("Sector: %d\n", getThing(i)); } return _cache_flush(); }
void Menu::setupMenuObjects() { _activeMenuItem.reset(); for (int i = 0; i < kObjectNum; i++) { if (_vm->_objects[i]) _activeMenuItem.setupOption(getThing(i + 1), getThingChar(i + 1), "", true); } _activeMenuItem.display(); }
ItemPtr Tile::getGround() { ThingPtr firstObject = getThing(0); if(!firstObject) return nullptr; if(firstObject->isGround() && firstObject->isItem()) return firstObject->static_self_cast<Item>(); return nullptr; }
bool Tile::limitsFloorsView(bool isFreeView) { // ground and walls limits the view ThingPtr firstThing = getThing(0); if(isFreeView) { if(firstThing && !firstThing->isDontHide() && (firstThing->isGround() || firstThing->isOnBottom())) return true; } else if(firstThing && !firstThing->isDontHide() && (firstThing->isGround() || (firstThing->isOnBottom() && firstThing->blockProjectile()))) return true; return false; }
Item* Tile::getUseItem(int32_t index) const { const TileItemVector* items = getItemList(); if (!items || items->size() == 0) { return ground; } if (Thing* thing = getThing(index)) { return thing->getItem(); } return nullptr; }
bool Tile::isFullyOpaque() { ThingPtr firstObject = getThing(0); return firstObject && firstObject->isFullGround(); }