18,11 → 18,11 |
|
/** |
------------ |
CVS : $Id: fly.c,v 1.6 2004-04-19 13:54:16 giacomo Exp $ |
CVS : $Id: fly.c,v 1.7 2004-04-19 14:11:07 giacomo Exp $ |
|
File: $File$ |
Revision: $Revision: 1.6 $ |
Last update: $Date: 2004-04-19 13:54:16 $ |
Revision: $Revision: 1.7 $ |
Last update: $Date: 2004-04-19 14:11:07 $ |
------------ |
**/ |
|
88,7 → 88,7 |
int x, y; |
int ox, oy; |
int dx, dy, da; |
int teta, col; |
int teta, col,red; |
int outx, outy; |
double r; |
int i = (int)arg; |
96,7 → 96,8 |
x = ox = (XMIN+XMAX)/2; |
y = oy = (YMIN+YMAX)/2; |
teta = 0; |
col = 2 + i; /* colore fly */ |
red = 50+10*i; |
col = rgb16(red,0,50); /* colore fly */ |
|
while (1) { |
|
150,10 → 151,10 |
TIME seme; /* used to init the random seed */ |
|
/* The scenario */ |
grx_rect(XMIN-D-1, YMIN-D-1, XMAX+D+1, YMAX+D+1, 14); |
grx_text("Simulation of Random Flies", XMIN, YMENU+10, 13, 0); |
grx_text("SPACE create a fly" , XMIN, YMENU+20, 12, 0); |
grx_text("ESC exit to DOS" , XMIN, YMENU+30, 12, 0); |
grx_rect(XMIN-D-1, YMIN-D-1, XMAX+D+1, YMAX+D+1, rgb16(255,255,255)); |
grx_text("Simulation of Random Flies", XMIN, YMENU+10, rgb16(255,255,255), 0); |
grx_text("SPACE create a fly" , XMIN, YMENU+20, rgb16(255,255,255), 0); |
grx_text("ESC exit to DOS" , XMIN, YMENU+30, rgb16(255,255,255), 0); |
|
/* The program waits a space to create a fly */ |
c = keyb_getch(BLOCK); |