% Mr. M

% December 20, 2000

% Munch Man!

var xm,ym,b:int

setscreen("graphics:vga")

% Draw buttons (db)

procedure db

locatexy(110,120)

put "Open"

drawbox(100,100,150,140,4)

locatexy(210,120)

put "Close"

drawbox(200,100,250,140,4)

locatexy(310,120)

put "Chew"

drawbox(300,100,350,140,4)

locatexy(410,120)

put "Quit"

drawbox(400,100,450,140,4)

end db

% Close the mouth

procedure cl

drawfilloval(320,240,20,20,14)

drawfilloval(330,250,5,5,0)

end cl

% Open the mouth

procedure op

drawfilloval(320,240,20,20,0)

drawfillarc(320,240,20,20,15,345,14)

drawfilloval(330,250,5,5,0)

end op

% Chew 5 times

procedure chew

for i:1..5

op

delay(250)

cl

delay(250)

end for

end chew

% Main program

db

loop

mousewhere(xm,ym,b)

if xm>100 and xm<150 and ym>100 and ym<140 and b=1 then

op

end if

if xm>200 and xm<250 and ym>100 and ym<140 and b=1 then

cl

end if

if xm>300 and xm<350 and ym>100 and ym<140 and b=1 then

chew

end if

if xm>400 and ym<450 and ym>100 and ym<140 and b=1 then

exit

end if

end loop

Hosted by www.Geocities.ws

1