Example #1
0
void Bacon::Run()
{
	running = true;
	while (running)
	{
		//assert( !"NOTI" ); //What is this tomfoolery? Seriously. What is this?

		sf::Event Event;
        while(appWindow->GetEvent(Event))
        {
            if (Event.Type == sf::Event::Closed)
                Shutdown();
        }

		// tick each of our active tasks
		// note that we want the active appstate's tasks,
		// not a fixed list!
		task_list::iterator it;
		for( it = tasks.begin(); it != tasks.end(); it++ )
			(*it)->Tick();


		// call some python code; tick the physics; render the frame

		appWindow->Display();
	}
}
Example #2
0
void dump_tasks() {
  WARNING("---- %d Active Tasks ----\n", all_tasks.size());
  for (task_list::iterator task_it = all_tasks.begin();
      task_it != all_tasks.end(); task_it++) {
    (*task_it)->dump();
  }
}
Example #3
0
void abort_all_tasks()
{
    for (task_list::iterator task_it = all_tasks.begin();
         task_it != all_tasks.end();
         task_it = all_tasks.begin()) {
        (*task_it)->abort();
    }
}
Example #4
0
task::task()
{
    this->taskit = all_tasks.insert(all_tasks.end(), this);
    add_to_runqueue();
}
Example #5
0
/* Put this task in the run queue. */
void task::add_to_runqueue()
{
    this->runit = running_tasks.insert(running_tasks.end(), this);
    this->running = true;
}
Example #6
0
    void delete_tasks () {
	for (task_iter i = m_tasks.begin(); i != m_tasks.end(); i++)
	    delete *i;
    }