Exemplo n.º 1
0
void
sim_engine_run (SIM_DESC sd,
		int next_cpu_nr, /* ignore  */
		int nr_cpus, /* ignore  */
		int siggnal) /* ignore  */
{
  bu32 ticks;
  SIM_CPU *cpu;

  SIM_ASSERT (STATE_MAGIC (sd) == SIM_MAGIC_NUMBER);

  cpu = STATE_CPU (sd, 0);

  while (1)
    {
      step_once (cpu);
      /* Process any events -- can't use tickn because it may
         advance right over the next event.  */
      for (ticks = 0; ticks < CYCLE_DELAY; ++ticks)
	if (sim_events_tick (sd))
	  sim_events_process (sd);
    }
}
Exemplo n.º 2
0
	// Makes a series of processing steps.
	void ai::path::step(const game::actor_ref & actor, unsigned count) {
		unsigned remaining_steps = (count == 0) ? step_count_ : count;
		while (remaining_steps-- > 0 && !step_once(actor)) ;
	}