void BTStatusBar::draw(BTBackgroundAndScreen *display) { XMLVector<BTPc*> &party = BTGame::getGame()->getParty(); XMLVector<BTStatusInfo*> &statusInfo = display->getDisplay()->getConfig()->statusInfo; if (statusInfo.size() == 0) return; SDL_Rect dst; int i; int xMult, yMult; display->getDisplay()->getMultiplier(xMult, yMult); for (i = 0; i < BT_PARTYSIZE; ++i) { SDL_Rect *dstOrig = display->getDisplay()->getConfig()->status[i]; dst.x = dstOrig->x * xMult; dst.y = dstOrig->y * yMult; dst.w = dstOrig->w * xMult; dst.h = dstOrig->h * yMult; display->clear(dst); } for (i = 0; i < party.size(); ++i) { SDL_Rect *dst = display->getDisplay()->getConfig()->status[i]; party[i]->serialize(this); for (int k = 0; k < statusInfo.size(); ++k) { statusInfo[k]->draw(*display, dst->x, dst->y, this); } removeLevel(); } }
void execute() { TXsheet *xsheet = TApp::instance()->getCurrentXsheet()->getXsheet(); CastSelection *castSelection = dynamic_cast<CastSelection *>(TSelection::getCurrent()); if (!castSelection) return; std::vector<TXshLevel *> levels; castSelection->getSelectedLevels(levels); if (levels.empty()) { DVGui::error("No level selected"); // E_NoSelectedLevel return; } int count = 0; for (int i = 0; i < (int)levels.size(); i++) if (removeLevel(levels[i])) count++; if (count == 0) return; TApp::instance()->getCurrentXsheet()->notifyXsheetChanged(); TApp::instance()->getCurrentScene()->notifyCastChange(); }
SkipList_Int2::~SkipList_Int2() { while (m_maxLevel > 0) removeLevel(); }
void SkipList_Int2::tryRemoveLevel() { if (m_size < (1 << (m_maxLevel - 1))) removeLevel(); }