Subversion Repositories shark

Compare Revisions

Ignore whitespace Rev 1373 → Rev 1372

/demos/trunk/astro/astro.c
24,8 → 24,6
 
rock_ini rock_new;
 
extern volatile int shark_running;
 
TASK shot(int i)
{
int x, y; /* shot graphic position */
373,8 → 371,9
soft_task_def_usemath(ms);
pid = task_create("Astro", astro, &ms, NULL);
if (pid == NIL) {
FB26_close(FRAME_BUFFER_DEVICE);
perror("Could not create task <astro>");
shark_running = 0;
sys_end();
} else
task_activate(pid);
 
385,8 → 384,9
hard_task_def_usemath(mp);
pid = task_create("Taken", look, &mp, NULL);
if (pid == NIL) {
FB26_close(FRAME_BUFFER_DEVICE);
perror("Could not create task <Taken>");
shark_running = 0;
sys_end();
} else
task_activate(pid);
 
400,8 → 400,9
hard_task_def_usemath(mp);
pid_TL = task_create("TurnLeft", turn, &mp, NULL);
if (pid_TL == NIL) {
FB26_close(FRAME_BUFFER_DEVICE);
perror("Could not create task <Turn L>");
shark_running = 0;
sys_end();
}
 
incr = - ASTRO_GRAD_INC;
414,8 → 415,9
hard_task_def_usemath(mp);
pid_TR = task_create("TurnRight", turn, &mp, NULL);
if (pid_TR == NIL) {
FB26_close(FRAME_BUFFER_DEVICE);
perror("Could not create task <Turn R>");
shark_running = 0;
sys_end();
}
 
incr = ASTRO_VEL_INC;
428,8 → 430,9
hard_task_def_usemath(mp);
pid_SU = task_create("SpeedUP", speed, &mp, NULL);
if (pid_SU == NIL) {
FB26_close(FRAME_BUFFER_DEVICE);
perror("Could not create task <Speed UP>");
shark_running = 0;
sys_end();
}
 
incr = - ASTRO_VEL_INC;
442,8 → 445,9
hard_task_def_usemath(mp);
pid_SD = task_create("SpeedDOWN", speed, &mp, NULL);
if (pid_SD == NIL) {
FB26_close(FRAME_BUFFER_DEVICE);
perror("Could not create task <Speed DOWN>");
shark_running = 0;
sys_end();
}
 
incr = 0;
456,8 → 460,9
hard_task_def_usemath(mp);
pid_SZ = task_create("SpeedZERO", speed, &mp, NULL);
if (pid_SZ == NIL) {
FB26_close(FRAME_BUFFER_DEVICE);
perror("Could not create task <Speed ZERO>");
shark_running = 0;
sys_end();
}
 
hard_task_default_model(mp);
467,8 → 472,9
hard_task_def_usemath(mp);
pid = task_create("MoveAstro", move, &mp, NULL);
if (pid == NIL) {
FB26_close(FRAME_BUFFER_DEVICE);
perror("Could not create task <MoveAstro>");
shark_running = 0;
sys_end();
} else
task_activate(pid);
 
483,8 → 489,9
hard_task_def_usemath(mp);
pid_FL = task_create("FlipAstro", turn, &mp, NULL);
if (pid_FL == NIL) {
FB26_close(FRAME_BUFFER_DEVICE);
perror("Could not create task <Flip Astro>");
shark_running = 0;
sys_end();
}
#endif
}