sync on
set display mode 1024,768,32
autocam off
color backdrop 0
 
make_pacman()
 
do
sprite 1,200,200,30
play sprite 1,1,10,50
sync
loop
 
function make_pacman()
 
get image 1,0,0,1,1
ink rgb(255,255,0),0
box 0,0,1,1
get image 2,0,0,1,1
cls
make object sphere 1,1,30,30
position object 1,0,0,3
texture object 1,2
a=int(screen width()/3.0)
b=int(screen height()/3.0)
c=int(screen width()*2/3.0)
d=int(screen height()*2/3.0)
make object sphere 2,0.1
position object 2,.1,.2,2
texture object 2,1
create bitmap 1,screen width(),screen height()
set current bitmap 1
for n=1 to 10
make object triangle n+10,0,0,2,20,2*n,2,20,-2*n,2
texture object n+10,1
sync
get image 2+n,a,b,c,d,1
delete object n+10
next n
set current bitmap 0
delete object 1
delete object 2
cls
for n=1 to 10
sprite n,0,0,2+n
scale sprite n,30
paste sprite n,(sprite width(n)*n)-sprite width(n),0
if n=1 then size=sprite width(1)
delete sprite n
next n
get image 20,0,0,(size*10),size,1
save image "pacman.bmp",20
create animated sprite 1,"pacman.bmp",10,1,30
cls
endfunction