/* mouse2.c */ #define MAXX 639 #define MINX 0 #define MAXY 399 #define MINY 0 SHORT mx,my; mouse() { char button; struct IntuiMessage *BdMsg; APTR Maddress; button=1; while(button){ while (BdMsg = (struct IntuiMessage *)GetMsg(w->UserPort)){ Maddress = BdMsg->IAddress; mx = BdMsg->MouseX; my = BdMsg->MouseY; if (mx>MAXX) mx=MAXX; if (mxMAXY) my=MAXY; if (my