Performance* PerformanceManager::getSong(const String& name, int instrumentType) { if (performances != NULL) { for (int i = 0; i < performances->size(); ++i) { Performance* ret = performances->get(i); if (ret->isMusic() && ret->getName() == name && ret->getInstrumentAudioId() == instrumentType) return ret; } } return NULL; }
Performance* PerformanceManager::getDance(const String& name) { if (performances != NULL) { for (int i = 0; i < performances->size(); ++i) { Performance* ret = performances->get(i); if (ret->isDance() && ret->getName() == name) return ret; } } return NULL; }