Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- declare (mx,my,open,hbr,napr,win,lvn) byte
- declare gi byte
- use pole.plm
- use save.plm
- newgame: procedure(nt)
- declare nt byte
- call loadlevel(nt)
- call drawpole
- napr=1
- win=0
- hbr=0
- open=0
- call save
- end
- canw: procedure(a) byte
- declare a byte
- if (a=0)or(a=2)or(a=9)or(a=11)or(a=3) then return 1
- else return 0
- end
- fallman: procedure
- declare (i,a) byte
- a=getelem(mx,my)
- do while canw(a)=1
- call showman
- call pause
- call hideman
- my=my+1
- a=getelem(mx,my)
- end
- my=my-1
- end
- use stone.plm
- teleport: procedure(x,y)
- declare (i,j,k,x,y) byte
- do k=0 to 10
- call setelem(mx,my,k)
- call pause
- end
- call setelem(mx,my,3)
- do i=0 to 19
- do j=0 to 14
- if (getelem(i,j)=3) then do
- if (mx<>i)or(my<>j) then do
- x=i
- y=j
- end
- end
- end
- end
- do k=0 to 10
- call setelem(x,y,k)
- call pause
- end
- call setelem(x,y,3)
- mx=x
- my=y
- call showman
- end
- checkf: procedure
- declare a byte
- a=getelem(mx,my)
- if a=9 then do
- call setelem(mx,my,0)
- call showman
- call sekira
- end
- if a=2 then do
- call setelem(mx,my,0)
- call showman
- call beep
- call pause
- call pause
- call pause
- call beep
- open=1
- end
- if a=3 then call teleport(mx,my)
- if (a=11)and(open=1) then win=1
- if getelem(mx,my+1)=10 then do
- call showman
- call beep
- call newgame(lvn)
- end
- end
- use walk.plm
- play: procedure(n)
- declare (n,pu) byte
- lvn=n
- call newgame(n)
- call gotoxy(13,3)
- if napr=1 then call putstr(.('-->',0))
- else call putstr(.('<--',0))
- call gotoxy(200,200)
- do while win=0
- pu=getch
- if pu=50 then call newgame(lvn)
- if pu=51 then call save
- if pu=52 then call load
- if hbr=0 then call walkwo(pu)
- else call walkwi(pu)
- call gotoxy(13,3)
- if napr=1 then call putstr(.('-->',0))
- else call putstr(.('<--',0))
- call gotoxy(200,200)
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement