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(); } }
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(); } }
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(); } }
task::task() { this->taskit = all_tasks.insert(all_tasks.end(), this); add_to_runqueue(); }
/* Put this task in the run queue. */ void task::add_to_runqueue() { this->runit = running_tasks.insert(running_tasks.end(), this); this->running = true; }
void delete_tasks () { for (task_iter i = m_tasks.begin(); i != m_tasks.end(); i++) delete *i; }