// ///////////////////////SET NonPlayble Characters and Items///////////////////////////////// void LvlScene::setNPC(QProgressDialog &progress) { int i=0; //QGraphicsItem * box; for(i=0; i<LvlData->npc.size(); i++) { //add NPC to scene placeNPC(LvlData->npc[i]); if(progress.wasCanceled()) //progress.setValue(progress.value()+1); /*else*/ return; } }
// ///////////////////////SET NonPlayble Characters and Items///////////////////////////////// void LvlScene::setNPC(QProgressDialog &progress) { int i=0; //QGraphicsItem * box; for(i=0; i<m_data->npc.size(); i++) { LevelNPC &npc = m_data->npc[i]; //add NPC to scene ItemNPC *n = placeNPC(npc); //FIXME: TEMPORARY, Remove this after removing of real-time PGE-FL <-> Scene synchronization Q_ASSERT(n); npc.contents = n->m_data.contents; npc.special_data = n->m_data.special_data; //------------------------------------------------------------------------------------------ qApp->processEvents(QEventLoop::ExcludeUserInputEvents); if(progress.wasCanceled()) return; } }