home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Gold Fish 1
/
GoldFishApril1994_CD2.img
/
d4xx
/
d433
/
gwin
/
exsrc.lzh
/
placeobject.c
< prev
next >
Wrap
C/C++ Source or Header
|
1991-01-12
|
785b
|
42 lines
#include "gwin.user.h"
main()
{
float x,y,xold,yold,event;
float c = 1.0;
char key = '\0';
ustart("high2",0.,640.,0.,400.);
upset("colo",1.0);
uprint(10.,90.,"Press left mouse button, hold, drag, release");
uset("comp");
uset("ncli");
uset("fill");
while (1==1){
while(key != 'a'){
ugrinc(&x,&y,&event,&key);
}
xold = x;
yold = y;
urect(xold,yold,xold+5.0,yold+5.0);
while(key != 'A'){
ugrinl(&x,&y,&event,&key);
urect(xold,yold,xold+5.0,yold+5.0);
urect(x,y,x+5.0,y+5.0);
xold = x;
yold = y;
}
uset("ncom");
urect(xold,yold,xold+5.0,yold+5.0);
uset("comp");
c += 1.0;
if(c > 14.0) c = 1.0;
upset("colo",c);
}
uend();
}