Home » Personal collection » Acorn ADFS disks » Greaseweazled » dfs_box04_disk02b_eug_scripts.adf » PT4/P/+BB3
PT4/P/+BB3
This website contains an archive of files for the Acorn Electron, BBC Micro, Acorn Archimedes, Commodore 16 and Commodore 64 computers, which Dominic Ford has rescued from his private collection of floppy disks and cassettes.
Some of these files were originally commercial releases in the 1980s and 1990s, but they are now widely available online. I assume that copyright over them is no longer being asserted. If you own the copyright and would like files to be removed, please contact me.
Tape/disk: | Home » Personal collection » Acorn ADFS disks » Greaseweazled » dfs_box04_disk02b_eug_scripts.adf |
Filename: | PT4/P/+BB3 |
Read OK: | ✔ |
File size: | 0BC7 bytes |
Load address: | 0000 |
Exec address: | FFFFFFFF |
Duplicates
There are 2 duplicate copies of this file in the archive:
- Personal collection » Acorn ADFS disks » Electron_User_Group » EUG_39.ADF » P/+BB3
- Personal collection » Acorn ADFS disks » Greaseweazled » dfs_box04_disk02b_eug_scripts.adf » PT4/P/+BB3
- Personal collection » Acorn hard disk » zipped_disks » elk03 » eug39/P/+BB3
File contents
[If ball is not in area containing blocks, don't check if its hit one!] 210 IF yball>80 THEN GOTO 330 [Move ball's position to integer variables for speed. Also set standard paint style as this is how blocks are removed] 220 xb%=xball DIV4:yb%=yball DIV8:PROCsetpaint(0) [Hit a block above? If so, remove it. This involves painting a black square on the screen, and setting in the block array that it has gone! Also make ball bounce off downwards...] 230 IF up AND yb%<>0 THEN IF block(xb%,yb%-1)=0THENup=FALSE: block(xb%,yb%-1)=1:?char=6:?xc=xb%:?yc=yb%-1:?xoff=0:?yoff=0: CALLdisplay [Hit block diagonally up and left?] 240 IF up AND left AND yb%<>0 AND xb%<>0 THEN IF block(xb%-1,yb%-1)=0 THENup=FALSE:left=FALSE:block(xb%-1,yb%-1)=1:?char=6:?xc=xb%-1: ?yc=yb%-1:?xoff=0:?yoff=0:CALLdisplay [Hit block diagonally up and right?] 250 IF up AND (NOT left) AND yb%<>0 AND xb%<19 THEN IF block(xb%+1,yb%-1)=0THENup=FALSE:left=TRUE:block(xb%+1,yb%-1)=1: ?char=6:?xc=xb%+1:?yc=yb%-1:?xoff=0:?yoff=0:CALLdisplay [Hit block down below ball?] 260 IF NOT up AND yb%<9 THEN IF block(xb%,yb%+1)=0THENup=TRUE: block(xb%,yb%+1)=1:?char=6:?xc=xb%:?yc=yb%+1:?xoff=0:?yoff=0: CALLdisplay [Hit block diagonally below and left?] 270 IF (NOT up) AND left AND xb%<>0 AND yb%<9 THEN IF block(xb%-1,yb%+1)=0 THENup=TRUE:left=FALSE:block(xb%-1,yb%+1)=1: ?char=6:?xc=xb%-1:?yc=yb%+1:?xoff=0:?yoff=0:CALLdisplay [Hit block diagonally below and right?] 280 IF (NOT up) AND (NOT left) AND xb%<19 AND yb%<9 THEN IF block(xb%+1,yb%+1)=0THENup=TRUE:left=TRUE:block(xb%+1,yb%+1)=1: ?char=6:?xc=xb%+1:?yc=yb%+1:?xoff=0:?yoff=0:CALLdisplay [If we are in row 10, we don't have to check blocks left or right, so we can skip these checks] 290 IF yb%>9 THEN GOTO 320 [Hit block to left?] 300 IF left AND xb%<>0 THEN IF block(xb%-1,yb%)=0THENleft=FALSE: block(xb%-1,yb%)=1:?char=6:?xc=xb%-1:?yc=yb%:?xoff=0:?yoff=0: CALLdisplay [Hit block to right?] 310 IF NOT left AND xb%<19 THEN IF block(xb%+1,yb%)=0THENleft=TRUE: block(xb%+1,yb%)=1:?char=6:?xc=xb%+1:?yc=yb%:?xoff=0:?yoff=0: CALLdisplay [Now that we've got block-hitting out of the way, we can go back to the EOR paint style, as thats how the bat and ball are drawn] 320 PROCsetpaint(3) [Is bat moving left?] 330 xnew=-1:IF INKEY(-98) AND xbat<>0 THEN xnew=xbat-0.5 [Is bat moving right?] 340 IF INKEY(-67) AND xbat<>18 THEN xnew=xbat+0.5 [Has bat moved at all? If xnew is still -1, the value it was set to in 330, clearly not!] 350 IF xnew=-1 THEN UNTIL FALSE [Remove old bat, which is two sprites wide] 360 ?char=4:?xc=INT(xbat):?yc=30:?xoff=(xbat*4)AND2:?yoff=0: CALLdisplay:?xc=?xc+1:?char=5:CALLdisplay [Draw new bat] 370 xbat=xnew 380 ?char=4:?xc=INT(xbat):?xoff=(xbat*4)AND2:CALLdisplay:?xc=?xc+1: ?char=5:CALLdisplay [That's it - we're done! Go round the whole loop again...] 390 UNTIL FALSE 400 END
00000000 5b 49 66 20 62 61 6c 6c 20 69 73 20 6e 6f 74 20 |[If ball is not | 00000010 69 6e 20 61 72 65 61 20 63 6f 6e 74 61 69 6e 69 |in area containi| 00000020 6e 67 20 62 6c 6f 63 6b 73 2c 20 64 6f 6e 27 74 |ng blocks, don't| 00000030 20 63 68 65 63 6b 20 69 66 20 69 74 73 20 68 69 | check if its hi| 00000040 74 20 6f 6e 65 21 5d 0d 0d 20 20 32 31 30 20 49 |t one!].. 210 I| 00000050 46 20 79 62 61 6c 6c 3e 38 30 20 54 48 45 4e 20 |F yball>80 THEN | 00000060 47 4f 54 4f 20 33 33 30 0d 0d 5b 4d 6f 76 65 20 |GOTO 330..[Move | 00000070 62 61 6c 6c 27 73 20 70 6f 73 69 74 69 6f 6e 20 |ball's position | 00000080 74 6f 20 69 6e 74 65 67 65 72 20 76 61 72 69 61 |to integer varia| 00000090 62 6c 65 73 20 66 6f 72 20 73 70 65 65 64 2e 20 |bles for speed. | 000000a0 41 6c 73 6f 20 73 65 74 20 73 74 61 6e 64 61 72 |Also set standar| 000000b0 64 0d 20 70 61 69 6e 74 20 73 74 79 6c 65 20 61 |d. paint style a| 000000c0 73 20 74 68 69 73 20 69 73 20 68 6f 77 20 62 6c |s this is how bl| 000000d0 6f 63 6b 73 20 61 72 65 20 72 65 6d 6f 76 65 64 |ocks are removed| 000000e0 5d 0d 0d 20 20 32 32 30 20 78 62 25 3d 78 62 61 |].. 220 xb%=xba| 000000f0 6c 6c 20 44 49 56 34 3a 79 62 25 3d 79 62 61 6c |ll DIV4:yb%=ybal| 00000100 6c 20 44 49 56 38 3a 50 52 4f 43 73 65 74 70 61 |l DIV8:PROCsetpa| 00000110 69 6e 74 28 30 29 0d 0d 5b 48 69 74 20 61 20 62 |int(0)..[Hit a b| 00000120 6c 6f 63 6b 20 61 62 6f 76 65 3f 20 49 66 20 73 |lock above? If s| 00000130 6f 2c 20 72 65 6d 6f 76 65 20 69 74 2e 20 54 68 |o, remove it. Th| 00000140 69 73 20 69 6e 76 6f 6c 76 65 73 20 70 61 69 6e |is involves pain| 00000150 74 69 6e 67 20 61 20 62 6c 61 63 6b 0d 20 73 71 |ting a black. sq| 00000160 75 61 72 65 20 6f 6e 20 74 68 65 20 73 63 72 65 |uare on the scre| 00000170 65 6e 2c 20 61 6e 64 20 73 65 74 74 69 6e 67 20 |en, and setting | 00000180 69 6e 20 74 68 65 20 62 6c 6f 63 6b 20 61 72 72 |in the block arr| 00000190 61 79 20 74 68 61 74 20 69 74 20 68 61 73 20 67 |ay that it has g| 000001a0 6f 6e 65 21 0d 20 41 6c 73 6f 20 6d 61 6b 65 20 |one!. Also make | 000001b0 62 61 6c 6c 20 62 6f 75 6e 63 65 20 6f 66 66 20 |ball bounce off | 000001c0 64 6f 77 6e 77 61 72 64 73 2e 2e 2e 5d 0d 0d 20 |downwards...].. | 000001d0 20 32 33 30 20 49 46 20 75 70 20 41 4e 44 20 79 | 230 IF up AND y| 000001e0 62 25 3c 3e 30 20 54 48 45 4e 20 49 46 20 62 6c |b%<>0 THEN IF bl| 000001f0 6f 63 6b 28 78 62 25 2c 79 62 25 2d 31 29 3d 30 |ock(xb%,yb%-1)=0| 00000200 54 48 45 4e 75 70 3d 46 41 4c 53 45 3a 0d 20 20 |THENup=FALSE:. | 00000210 20 20 20 20 62 6c 6f 63 6b 28 78 62 25 2c 79 62 | block(xb%,yb| 00000220 25 2d 31 29 3d 31 3a 3f 63 68 61 72 3d 36 3a 3f |%-1)=1:?char=6:?| 00000230 78 63 3d 78 62 25 3a 3f 79 63 3d 79 62 25 2d 31 |xc=xb%:?yc=yb%-1| 00000240 3a 3f 78 6f 66 66 3d 30 3a 3f 79 6f 66 66 3d 30 |:?xoff=0:?yoff=0| 00000250 3a 0d 20 20 20 20 20 20 43 41 4c 4c 64 69 73 70 |:. CALLdisp| 00000260 6c 61 79 0d 0d 5b 48 69 74 20 62 6c 6f 63 6b 20 |lay..[Hit block | 00000270 64 69 61 67 6f 6e 61 6c 6c 79 20 75 70 20 61 6e |diagonally up an| 00000280 64 20 6c 65 66 74 3f 5d 0d 0d 20 20 32 34 30 20 |d left?].. 240 | 00000290 49 46 20 75 70 20 41 4e 44 20 6c 65 66 74 20 41 |IF up AND left A| 000002a0 4e 44 20 79 62 25 3c 3e 30 20 41 4e 44 20 78 62 |ND yb%<>0 AND xb| 000002b0 25 3c 3e 30 20 54 48 45 4e 20 49 46 20 62 6c 6f |%<>0 THEN IF blo| 000002c0 63 6b 28 78 62 25 2d 31 2c 79 62 25 2d 31 29 3d |ck(xb%-1,yb%-1)=| 000002d0 30 0d 20 20 20 20 20 20 54 48 45 4e 75 70 3d 46 |0. THENup=F| 000002e0 41 4c 53 45 3a 6c 65 66 74 3d 46 41 4c 53 45 3a |ALSE:left=FALSE:| 000002f0 62 6c 6f 63 6b 28 78 62 25 2d 31 2c 79 62 25 2d |block(xb%-1,yb%-| 00000300 31 29 3d 31 3a 3f 63 68 61 72 3d 36 3a 3f 78 63 |1)=1:?char=6:?xc| 00000310 3d 78 62 25 2d 31 3a 0d 20 20 20 20 20 20 3f 79 |=xb%-1:. ?y| 00000320 63 3d 79 62 25 2d 31 3a 3f 78 6f 66 66 3d 30 3a |c=yb%-1:?xoff=0:| 00000330 3f 79 6f 66 66 3d 30 3a 43 41 4c 4c 64 69 73 70 |?yoff=0:CALLdisp| 00000340 6c 61 79 0d 0d 5b 48 69 74 20 62 6c 6f 63 6b 20 |lay..[Hit block | 00000350 64 69 61 67 6f 6e 61 6c 6c 79 20 75 70 20 61 6e |diagonally up an| 00000360 64 20 72 69 67 68 74 3f 5d 0d 0d 20 20 32 35 30 |d right?].. 250| 00000370 20 49 46 20 75 70 20 41 4e 44 20 28 4e 4f 54 20 | IF up AND (NOT | 00000380 6c 65 66 74 29 20 41 4e 44 20 79 62 25 3c 3e 30 |left) AND yb%<>0| 00000390 20 41 4e 44 20 78 62 25 3c 31 39 20 54 48 45 4e | AND xb%<19 THEN| 000003a0 20 49 46 0d 20 20 20 20 20 20 62 6c 6f 63 6b 28 | IF. block(| 000003b0 78 62 25 2b 31 2c 79 62 25 2d 31 29 3d 30 54 48 |xb%+1,yb%-1)=0TH| 000003c0 45 4e 75 70 3d 46 41 4c 53 45 3a 6c 65 66 74 3d |ENup=FALSE:left=| 000003d0 54 52 55 45 3a 62 6c 6f 63 6b 28 78 62 25 2b 31 |TRUE:block(xb%+1| 000003e0 2c 79 62 25 2d 31 29 3d 31 3a 0d 20 20 20 20 20 |,yb%-1)=1:. | 000003f0 20 3f 63 68 61 72 3d 36 3a 3f 78 63 3d 78 62 25 | ?char=6:?xc=xb%| 00000400 2b 31 3a 3f 79 63 3d 79 62 25 2d 31 3a 3f 78 6f |+1:?yc=yb%-1:?xo| 00000410 66 66 3d 30 3a 3f 79 6f 66 66 3d 30 3a 43 41 4c |ff=0:?yoff=0:CAL| 00000420 4c 64 69 73 70 6c 61 79 0d 0d 5b 48 69 74 20 62 |Ldisplay..[Hit b| 00000430 6c 6f 63 6b 20 64 6f 77 6e 20 62 65 6c 6f 77 20 |lock down below | 00000440 62 61 6c 6c 3f 5d 0d 0d 20 20 32 36 30 20 49 46 |ball?].. 260 IF| 00000450 20 4e 4f 54 20 75 70 20 41 4e 44 20 79 62 25 3c | NOT up AND yb%<| 00000460 39 20 54 48 45 4e 20 49 46 20 62 6c 6f 63 6b 28 |9 THEN IF block(| 00000470 78 62 25 2c 79 62 25 2b 31 29 3d 30 54 48 45 4e |xb%,yb%+1)=0THEN| 00000480 75 70 3d 54 52 55 45 3a 0d 20 20 20 20 20 20 62 |up=TRUE:. b| 00000490 6c 6f 63 6b 28 78 62 25 2c 79 62 25 2b 31 29 3d |lock(xb%,yb%+1)=| 000004a0 31 3a 3f 63 68 61 72 3d 36 3a 3f 78 63 3d 78 62 |1:?char=6:?xc=xb| 000004b0 25 3a 3f 79 63 3d 79 62 25 2b 31 3a 3f 78 6f 66 |%:?yc=yb%+1:?xof| 000004c0 66 3d 30 3a 3f 79 6f 66 66 3d 30 3a 0d 20 20 20 |f=0:?yoff=0:. | 000004d0 20 20 20 43 41 4c 4c 64 69 73 70 6c 61 79 0d 0d | CALLdisplay..| 000004e0 5b 48 69 74 20 62 6c 6f 63 6b 20 64 69 61 67 6f |[Hit block diago| 000004f0 6e 61 6c 6c 79 20 62 65 6c 6f 77 20 61 6e 64 20 |nally below and | 00000500 6c 65 66 74 3f 5d 0d 0d 20 20 32 37 30 20 49 46 |left?].. 270 IF| 00000510 20 28 4e 4f 54 20 75 70 29 20 41 4e 44 20 6c 65 | (NOT up) AND le| 00000520 66 74 20 41 4e 44 20 78 62 25 3c 3e 30 20 41 4e |ft AND xb%<>0 AN| 00000530 44 20 79 62 25 3c 39 20 54 48 45 4e 20 49 46 0d |D yb%<9 THEN IF.| 00000540 20 20 20 20 20 20 62 6c 6f 63 6b 28 78 62 25 2d | block(xb%-| 00000550 31 2c 79 62 25 2b 31 29 3d 30 20 54 48 45 4e 75 |1,yb%+1)=0 THENu| 00000560 70 3d 54 52 55 45 3a 6c 65 66 74 3d 46 41 4c 53 |p=TRUE:left=FALS| 00000570 45 3a 62 6c 6f 63 6b 28 78 62 25 2d 31 2c 79 62 |E:block(xb%-1,yb| 00000580 25 2b 31 29 3d 31 3a 0d 20 20 20 20 20 20 3f 63 |%+1)=1:. ?c| 00000590 68 61 72 3d 36 3a 3f 78 63 3d 78 62 25 2d 31 3a |har=6:?xc=xb%-1:| 000005a0 3f 79 63 3d 79 62 25 2b 31 3a 3f 78 6f 66 66 3d |?yc=yb%+1:?xoff=| 000005b0 30 3a 3f 79 6f 66 66 3d 30 3a 43 41 4c 4c 64 69 |0:?yoff=0:CALLdi| 000005c0 73 70 6c 61 79 0d 0d 5b 48 69 74 20 62 6c 6f 63 |splay..[Hit bloc| 000005d0 6b 20 64 69 61 67 6f 6e 61 6c 6c 79 20 62 65 6c |k diagonally bel| 000005e0 6f 77 20 61 6e 64 20 72 69 67 68 74 3f 5d 0d 0d |ow and right?]..| 000005f0 20 20 32 38 30 20 49 46 20 28 4e 4f 54 20 75 70 | 280 IF (NOT up| 00000600 29 20 41 4e 44 20 28 4e 4f 54 20 6c 65 66 74 29 |) AND (NOT left)| 00000610 20 41 4e 44 20 78 62 25 3c 31 39 20 41 4e 44 20 | AND xb%<19 AND | 00000620 79 62 25 3c 39 20 54 48 45 4e 20 49 46 0d 20 20 |yb%<9 THEN IF. | 00000630 20 20 20 20 62 6c 6f 63 6b 28 78 62 25 2b 31 2c | block(xb%+1,| 00000640 79 62 25 2b 31 29 3d 30 54 48 45 4e 75 70 3d 54 |yb%+1)=0THENup=T| 00000650 52 55 45 3a 6c 65 66 74 3d 54 52 55 45 3a 62 6c |RUE:left=TRUE:bl| 00000660 6f 63 6b 28 78 62 25 2b 31 2c 79 62 25 2b 31 29 |ock(xb%+1,yb%+1)| 00000670 3d 31 3a 0d 20 20 20 20 20 20 3f 63 68 61 72 3d |=1:. ?char=| 00000680 36 3a 3f 78 63 3d 78 62 25 2b 31 3a 3f 79 63 3d |6:?xc=xb%+1:?yc=| 00000690 79 62 25 2b 31 3a 3f 78 6f 66 66 3d 30 3a 3f 79 |yb%+1:?xoff=0:?y| 000006a0 6f 66 66 3d 30 3a 43 41 4c 4c 64 69 73 70 6c 61 |off=0:CALLdispla| 000006b0 79 0d 0d 5b 49 66 20 77 65 20 61 72 65 20 69 6e |y..[If we are in| 000006c0 20 72 6f 77 20 31 30 2c 20 77 65 20 64 6f 6e 27 | row 10, we don'| 000006d0 74 20 68 61 76 65 20 74 6f 20 63 68 65 63 6b 20 |t have to check | 000006e0 62 6c 6f 63 6b 73 20 6c 65 66 74 20 6f 72 20 72 |blocks left or r| 000006f0 69 67 68 74 2c 20 73 6f 0d 20 77 65 20 63 61 6e |ight, so. we can| 00000700 20 73 6b 69 70 20 74 68 65 73 65 20 63 68 65 63 | skip these chec| 00000710 6b 73 5d 0d 0d 20 20 32 39 30 20 49 46 20 79 62 |ks].. 290 IF yb| 00000720 25 3e 39 20 54 48 45 4e 20 47 4f 54 4f 20 33 32 |%>9 THEN GOTO 32| 00000730 30 0d 0d 5b 48 69 74 20 62 6c 6f 63 6b 20 74 6f |0..[Hit block to| 00000740 20 6c 65 66 74 3f 5d 0d 0d 20 20 33 30 30 20 49 | left?].. 300 I| 00000750 46 20 6c 65 66 74 20 41 4e 44 20 78 62 25 3c 3e |F left AND xb%<>| 00000760 30 20 54 48 45 4e 20 49 46 20 62 6c 6f 63 6b 28 |0 THEN IF block(| 00000770 78 62 25 2d 31 2c 79 62 25 29 3d 30 54 48 45 4e |xb%-1,yb%)=0THEN| 00000780 6c 65 66 74 3d 46 41 4c 53 45 3a 0d 20 20 20 20 |left=FALSE:. | 00000790 20 20 62 6c 6f 63 6b 28 78 62 25 2d 31 2c 79 62 | block(xb%-1,yb| 000007a0 25 29 3d 31 3a 3f 63 68 61 72 3d 36 3a 3f 78 63 |%)=1:?char=6:?xc| 000007b0 3d 78 62 25 2d 31 3a 3f 79 63 3d 79 62 25 3a 3f |=xb%-1:?yc=yb%:?| 000007c0 78 6f 66 66 3d 30 3a 3f 79 6f 66 66 3d 30 3a 0d |xoff=0:?yoff=0:.| 000007d0 20 20 20 20 20 20 43 41 4c 4c 64 69 73 70 6c 61 | CALLdispla| 000007e0 79 0d 0d 5b 48 69 74 20 62 6c 6f 63 6b 20 74 6f |y..[Hit block to| 000007f0 20 72 69 67 68 74 3f 5d 0d 0d 20 20 33 31 30 20 | right?].. 310 | 00000800 49 46 20 4e 4f 54 20 6c 65 66 74 20 41 4e 44 20 |IF NOT left AND | 00000810 78 62 25 3c 31 39 20 54 48 45 4e 20 49 46 20 62 |xb%<19 THEN IF b| 00000820 6c 6f 63 6b 28 78 62 25 2b 31 2c 79 62 25 29 3d |lock(xb%+1,yb%)=| 00000830 30 54 48 45 4e 6c 65 66 74 3d 54 52 55 45 3a 0d |0THENleft=TRUE:.| 00000840 20 20 20 20 20 20 62 6c 6f 63 6b 28 78 62 25 2b | block(xb%+| 00000850 31 2c 79 62 25 29 3d 31 3a 3f 63 68 61 72 3d 36 |1,yb%)=1:?char=6| 00000860 3a 3f 78 63 3d 78 62 25 2b 31 3a 3f 79 63 3d 79 |:?xc=xb%+1:?yc=y| 00000870 62 25 3a 3f 78 6f 66 66 3d 30 3a 3f 79 6f 66 66 |b%:?xoff=0:?yoff| 00000880 3d 30 3a 0d 20 20 20 20 20 20 43 41 4c 4c 64 69 |=0:. CALLdi| 00000890 73 70 6c 61 79 0d 0d 5b 4e 6f 77 20 74 68 61 74 |splay..[Now that| 000008a0 20 77 65 27 76 65 20 67 6f 74 20 62 6c 6f 63 6b | we've got block| 000008b0 2d 68 69 74 74 69 6e 67 20 6f 75 74 20 6f 66 20 |-hitting out of | 000008c0 74 68 65 20 77 61 79 2c 20 77 65 20 63 61 6e 20 |the way, we can | 000008d0 67 6f 20 62 61 63 6b 20 74 6f 0d 20 74 68 65 20 |go back to. the | 000008e0 45 4f 52 20 70 61 69 6e 74 20 73 74 79 6c 65 2c |EOR paint style,| 000008f0 20 61 73 20 74 68 61 74 73 20 68 6f 77 20 74 68 | as thats how th| 00000900 65 20 62 61 74 20 61 6e 64 20 62 61 6c 6c 20 61 |e bat and ball a| 00000910 72 65 20 64 72 61 77 6e 5d 0d 0d 20 20 33 32 30 |re drawn].. 320| 00000920 20 50 52 4f 43 73 65 74 70 61 69 6e 74 28 33 29 | PROCsetpaint(3)| 00000930 0d 0d 5b 49 73 20 62 61 74 20 6d 6f 76 69 6e 67 |..[Is bat moving| 00000940 20 6c 65 66 74 3f 5d 0d 0d 20 20 33 33 30 20 78 | left?].. 330 x| 00000950 6e 65 77 3d 2d 31 3a 49 46 20 49 4e 4b 45 59 28 |new=-1:IF INKEY(| 00000960 2d 39 38 29 20 41 4e 44 20 78 62 61 74 3c 3e 30 |-98) AND xbat<>0| 00000970 20 54 48 45 4e 20 78 6e 65 77 3d 78 62 61 74 2d | THEN xnew=xbat-| 00000980 30 2e 35 0d 0d 5b 49 73 20 62 61 74 20 6d 6f 76 |0.5..[Is bat mov| 00000990 69 6e 67 20 72 69 67 68 74 3f 5d 0d 0d 20 20 33 |ing right?].. 3| 000009a0 34 30 20 49 46 20 49 4e 4b 45 59 28 2d 36 37 29 |40 IF INKEY(-67)| 000009b0 20 41 4e 44 20 78 62 61 74 3c 3e 31 38 20 54 48 | AND xbat<>18 TH| 000009c0 45 4e 20 78 6e 65 77 3d 78 62 61 74 2b 30 2e 35 |EN xnew=xbat+0.5| 000009d0 0d 0d 5b 48 61 73 20 62 61 74 20 6d 6f 76 65 64 |..[Has bat moved| 000009e0 20 61 74 20 61 6c 6c 3f 20 49 66 20 78 6e 65 77 | at all? If xnew| 000009f0 20 69 73 20 73 74 69 6c 6c 20 2d 31 2c 20 74 68 | is still -1, th| 00000a00 65 20 76 61 6c 75 65 20 69 74 20 77 61 73 20 73 |e value it was s| 00000a10 65 74 20 74 6f 0d 20 69 6e 20 33 33 30 2c 20 63 |et to. in 330, c| 00000a20 6c 65 61 72 6c 79 20 6e 6f 74 21 5d 0d 0d 20 20 |learly not!].. | 00000a30 33 35 30 20 49 46 20 78 6e 65 77 3d 2d 31 20 54 |350 IF xnew=-1 T| 00000a40 48 45 4e 20 55 4e 54 49 4c 20 46 41 4c 53 45 0d |HEN UNTIL FALSE.| 00000a50 0d 5b 52 65 6d 6f 76 65 20 6f 6c 64 20 62 61 74 |.[Remove old bat| 00000a60 2c 20 77 68 69 63 68 20 69 73 20 74 77 6f 20 73 |, which is two s| 00000a70 70 72 69 74 65 73 20 77 69 64 65 5d 0d 0d 20 20 |prites wide].. | 00000a80 33 36 30 20 3f 63 68 61 72 3d 34 3a 3f 78 63 3d |360 ?char=4:?xc=| 00000a90 49 4e 54 28 78 62 61 74 29 3a 3f 79 63 3d 33 30 |INT(xbat):?yc=30| 00000aa0 3a 3f 78 6f 66 66 3d 28 78 62 61 74 2a 34 29 41 |:?xoff=(xbat*4)A| 00000ab0 4e 44 32 3a 3f 79 6f 66 66 3d 30 3a 0d 20 20 20 |ND2:?yoff=0:. | 00000ac0 20 20 20 43 41 4c 4c 64 69 73 70 6c 61 79 3a 3f | CALLdisplay:?| 00000ad0 78 63 3d 3f 78 63 2b 31 3a 3f 63 68 61 72 3d 35 |xc=?xc+1:?char=5| 00000ae0 3a 43 41 4c 4c 64 69 73 70 6c 61 79 0d 0d 5b 44 |:CALLdisplay..[D| 00000af0 72 61 77 20 6e 65 77 20 62 61 74 5d 0d 0d 20 20 |raw new bat].. | 00000b00 33 37 30 20 78 62 61 74 3d 78 6e 65 77 0d 20 20 |370 xbat=xnew. | 00000b10 33 38 30 20 3f 63 68 61 72 3d 34 3a 3f 78 63 3d |380 ?char=4:?xc=| 00000b20 49 4e 54 28 78 62 61 74 29 3a 3f 78 6f 66 66 3d |INT(xbat):?xoff=| 00000b30 28 78 62 61 74 2a 34 29 41 4e 44 32 3a 43 41 4c |(xbat*4)AND2:CAL| 00000b40 4c 64 69 73 70 6c 61 79 3a 3f 78 63 3d 3f 78 63 |Ldisplay:?xc=?xc| 00000b50 2b 31 3a 0d 20 20 20 20 20 20 3f 63 68 61 72 3d |+1:. ?char=| 00000b60 35 3a 43 41 4c 4c 64 69 73 70 6c 61 79 0d 0d 5b |5:CALLdisplay..[| 00000b70 54 68 61 74 27 73 20 69 74 20 2d 20 77 65 27 72 |That's it - we'r| 00000b80 65 20 64 6f 6e 65 21 20 47 6f 20 72 6f 75 6e 64 |e done! Go round| 00000b90 20 74 68 65 20 77 68 6f 6c 65 20 6c 6f 6f 70 20 | the whole loop | 00000ba0 61 67 61 69 6e 2e 2e 2e 5d 0d 0d 20 20 33 39 30 |again...].. 390| 00000bb0 20 55 4e 54 49 4c 20 46 41 4c 53 45 0d 20 20 34 | UNTIL FALSE. 4| 00000bc0 30 30 20 45 4e 44 0d |00 END.| 00000bc7