18,11 → 18,11 |
|
/** |
------------ |
CVS : $Id: ball.c,v 1.3 2003-05-05 09:21:55 pj Exp $ |
CVS : $Id: ball.c,v 1.4 2004-04-17 17:16:46 giacomo Exp $ |
|
File: $File$ |
Revision: $Revision: 1.3 $ |
Last update: $Date: 2003-05-05 09:21:55 $ |
Revision: $Revision: 1.4 $ |
Last update: $Date: 2004-04-17 17:16:46 $ |
------------ |
**/ |
|
125,11 → 125,12 |
x = x0 + vx * tx; |
} |
|
mutex_lock(&mutex); |
task_nopreempt(); |
grx_disc(ox, oy, R, 0); |
task_preempt(); |
|
ox = x; |
oy = BALL_Y - y; |
mutex_unlock(&mutex); |
|
if (ballexit && i!=0xFFFF) { |
npc--; |
136,9 → 137,9 |
return 0; |
} |
|
mutex_lock(&mutex); |
task_nopreempt(); |
grx_disc(ox, oy, R, i); |
mutex_unlock(&mutex); |
task_preempt(); |
|
my_delay(); |
|
171,7 → 172,7 |
itoa(npc,palla_str+5); |
|
soft_task_default_model(mp); |
soft_task_def_level(mp,1); |
soft_task_def_level(mp,2); |
soft_task_def_ctrl_jet(mp); |
soft_task_def_arg(mp, (void *)rgb16(r,g,b)); |
soft_task_def_group(mp, BALL_GROUP); |
205,7 → 206,8 |
pid = task_create("pallaEDF", palla, &mp, NULL); |
if (pid == NIL) { |
sys_shutdown_message("Could not create task <pallaEDF>"); |
sys_end(); |
task_activate(shutdown_task_PID); |
return; |
} |
else |
task_activate(pid); |
220,8 → 222,6 |
{ |
grx_text("Noise", 0, 45 /*BALL_Y-BALL_HEIGHT-15*/, rgb16(0,0,255), black); |
grx_line(0,55,383,55,red); |
//grx_line(0,BALL_Y-BALL_HEIGHT-6,383,BALL_Y-BALL_HEIGHT-6,red); |
|
grx_rect(BALL_XMIN-R-1, BALL_Y-BALL_HEIGHT-R-1, |
BALL_XMAX+R+1, BALL_Y+R+1, rgb16(0,200,0)); |
} |
235,12 → 235,14 |
k.flag = 0; |
k.scan = KEY_SPC; |
k.ascii = ' '; |
keyb_hook(k,ballfun); |
k.status = KEY_PRESSED; |
keyb_hook(k,ballfun,FALSE); |
|
k.flag = 0; |
k.scan = KEY_BKS; |
k.ascii = ' '; |
keyb_hook(k,killball); |
k.status = KEY_PRESSED; |
keyb_hook(k,killball,FALSE); |
} |
|
/*--------------------------------------------------------------*/ |