예제 #1
0
Event Event::doNextEvent(bool which)  //if which == true the player clicked yes
{
    if(which)
    {
        return loadEvent(yesEventNum);
    }
    else
    {
        return loadEvent(noEventNum);
    }
}
예제 #2
0
void Functionality::loadVectorsFromFile()
{
	EventStorage tempEvent;
	ifstream fileRead("EventStorage.txt");
	string eventStore;
	string tempPriority;

	while(getline(fileRead, eventStore))
	{
		if(eventStore.size() > 0)
		{
			if(eventStore[0] == '#')
			{
				loadEvent(tempEvent, eventStore.substr(1, eventStore.size() - 1));
				tempPriority = tempEvent.getPriority();
				if(tempPriority[0] == '1')
					highPriority.push_back(tempEvent);
				else
					if(tempPriority[0] == '2')
						normalPriority.push_back(tempEvent);
			}
		}
	}
	fileRead.close();
	if(highPriority.size() != 0)
		undoHighVector.push_back(highPriority);
	if(normalPriority.size() != 0)
		undoNormalVector.push_back(normalPriority);
}
예제 #3
0
void CWorld::LoadLOD()
{
	loadMob();	
	loadShop();
	loadSkill();
	loadSkillTree();
	loadArmorPreview();
	loadSSkill();
	loadAction();
	loadItemData();	
	loadSetItemData();
	loadAffinity();
	loadMakeItem();
	loadCatalog();
	loadEvent();
	loadNPCHelp();
	loadCombo();
	loadBigpet();
	loadRareOption();
	loadOption();
	loadTitleData();
	loadQuest();
	loadLacarette();
	loadZone();
	loadNotice();
	loadEntity();
	loadZoneData();
	loadTEventString();
	loadLevelUpGuide();
	loadChangeEquipment();
	LoadItemCollection();
	LoadItemCompose();
}
void QmlProfilerTimelineModel::announceFeatures(quint64 features)
{
    m_modelManager->announceFeatures(
                features, [this](const QmlEvent &event, const QmlEventType &type) {
        loadEvent(event, type);
    }, [this]() {
        finalize();
    });
}
예제 #5
0
// New event list from a glob
events *newEventList(glob_t *glb, stations * ss)
{
	events *evs;
	int j, file;

	evs = malloc(sizeof(events));
	evs->n = 0;
	evs->elist = NULL;

	/* Make event list */
	for (j = 0; j < glb->gl_pathc; j++) {
		glob_t *glbs = filelist(glb->gl_pathv[j],"*Z.SAC");

		if (collectorVerbose)
			fprintf(stdout, "%s: [ ] [   ] ", glb->gl_pathv[j]);
		
		event *ev = NULL;
		for (file = 0; file < glbs->gl_pathc; file++) {
			if (file == 0) {
				ev = loadEvent(glbs->gl_pathv[file]);
				if (ev == NULL) {
					fprintf(stderr, "Could not get event.\n");
					exit(-1);
				}
			}

			pick *p = loadPick(glbs->gl_pathv[file], ss);
			if (p != NULL) {
				addpick(ev, p);
				if (collectorVerbose) fprintf(stdout, ".");
			} else {
				if (collectorVerbose) fprintf(stdout, "x");
			}

		}


		if (ev->n != 0) {
			addev(evs, ev);
			if (collectorVerbose) fprintf(stdout, "\r%s: [A] [%03d] \n", glb->gl_pathv[j], ev->n);
		} else {
			killEvent(ev);
			if (collectorVerbose) fprintf(stdout, "\r%s: [D] [%03d] \n", glb->gl_pathv[j], ev->n);
		}
		
		glbs = killGlob(glbs);
	}

	calculateEventMean(evs);
	calculateResiduals(evs);

	return evs;
}
예제 #6
0
void PGM_KICAD::MacOpenFile( const wxString& aFileName )
{
#if defined(__WXMAC__)

    KICAD_MANAGER_FRAME* frame = (KICAD_MANAGER_FRAME*) App().GetTopWindow();

    frame->SetProjectFileName( aFileName );

    wxCommandEvent loadEvent( 0, wxID_ANY );

    frame->OnLoadProject( loadEvent );
#endif
}
예제 #7
0
파일: Info.cpp 프로젝트: VaysseB/openfluid
void Info::onIDViewSelectionChanged()
{
  m_SelectedUnitId.clear();
  mp_TreeViewIDs->get_selection()->selected_foreach_iter(
      sigc::mem_fun(*this, &Info::loadSelectedID));
  std::set<int>::iterator it;
  for (it = m_SelectedUnitId.begin(); it != m_SelectedUnitId.end(); it++)
  {
    loadInfo(*it, m_SelectedUnitId.size());
    loadInputData(*it, m_SelectedUnitId.size());
    //TODO les evenements à faire
    loadEvent(*it, m_SelectedUnitId.size());
  }
}
예제 #8
0
파일: Map.cpp 프로젝트: Puros/flare-engine
int Map::load(std::string filename) {
	FileParser infile;
	maprow *cur_layer = NULL;

	clearEvents();
	clearLayers();
	clearQueues();

	if (!infile.open("maps/" + filename))
		return 0;

	while (infile.next()) {
		if (infile.new_section) {

			// for sections that are stored in collections, add a new object here
			if (infile.section == "enemy")
				enemies.push(Map_Enemy());
			else if (infile.section == "enemygroup")
				enemy_groups.push(Map_Group());
			else if (infile.section == "npc")
				npcs.push(Map_NPC());
			else if (infile.section == "event")
				events.push_back(Map_Event());

		}
		if (infile.section == "header")
			loadHeader(infile);
		else if (infile.section == "layer")
			loadLayer(infile, &cur_layer);
		else if (infile.section == "enemy")
			loadEnemy(infile);
		else if (infile.section == "enemygroup")
			loadEnemyGroup(infile, &enemy_groups.back());
		else if (infile.section == "npc")
			loadNPC(infile);
		else if (infile.section == "event")
			loadEvent(infile);
	}

	infile.close();

	return 0;
}