mirror of
https://github.com/AppleCommander/bastools.git
synced 2024-12-21 23:29:31 +00:00
Only 1 depth charge redraws per loop.
This commit is contained in:
parent
ba55fc2aaf
commit
a35ab37419
@ -8,14 +8,12 @@
|
||||
|
||||
120 hcolor=3
|
||||
130 x=140:sd=0:s=sh
|
||||
140 di=0:mm=3:dim dx(mm),dy(mm),ds(mm),ox(mm),oy(mm),os(mm)
|
||||
140 di=1:mm=5:dim dx(mm),dy(mm),ds(mm),ox(mm),oy(mm),os(mm)
|
||||
150 for i=1 to mm:dx(i)=0:dy(i)=0:ds(i)=0:next i
|
||||
|
||||
200 xdraw s at x,10:ox=x:os=s
|
||||
210 for i=1 to mm
|
||||
220 ox(i)=dx(i):oy(i)=dy(i):os(i)=ds(i)
|
||||
230 if dx(i) then xdraw ds(i) at dx(i),dy(i)
|
||||
240 next i
|
||||
210 ox(di)=dx(di):oy(di)=dy(di):os(di)=ds(di)
|
||||
220 if dx(di) then xdraw ds(di) at dx(di),dy(di)
|
||||
|
||||
300 ky=peek(-16384):if ky < 128 then 400
|
||||
310 poke -16368,0
|
||||
@ -29,16 +27,14 @@
|
||||
410 if x < 10 then x=10
|
||||
420 if x > 270 then x=270
|
||||
|
||||
500 di=di+1:if di > mm then di = 1
|
||||
510 if not dx(di) then 600
|
||||
520 ds(di)=ds(di)+1:if ds(di) > dc+3 then ds(di)=dc
|
||||
530 dy(di)=dy(di)+2:if dy(di) > 160 then dx(di)=0:dy(di)=0:ds(di)=0
|
||||
500 if not dx(di) then 590
|
||||
510 ds(di)=ds(di)+1:if ds(di) > dc+3 then ds(di)=dc
|
||||
520 dy(di)=dy(di)+3:if dy(di) > 160 then dx(di)=0:dy(di)=0:ds(di)=0
|
||||
590 di=di+1:if di > mm then di = 1
|
||||
|
||||
600 xdraw os at ox,10
|
||||
610 for i=1 to mm
|
||||
620 if ox(i) then xdraw os(i) at ox(i),oy(i)
|
||||
630 next i
|
||||
640 goto 200
|
||||
600 if ox(di) then xdraw os(di) at ox(di),oy(di)
|
||||
610 xdraw os at ox,10
|
||||
620 goto 200
|
||||
|
||||
49999 end
|
||||
50000 $shape src="ships.st", poke=yes, init=yes, assign=(sb="sub-left", sh="ship-left", dc="depthcharge-1")
|
||||
|
Loading…
Reference in New Issue
Block a user