home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 1 / amigaformatcd01.iso / demos / blitz_basic / blitzmode / bblits.bb2 < prev    next >
Unknown  |  1996-04-30  |  1.4 KB

open in: MacOS 8.1     |     Win98     |     DOS

view JSON data     |     view as text

This file was not able to be converted.
This format is not currently supported by dexvert.

ConfidenceProgramDetectionMatch TypeSupport
100% file data default



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 3b 00 3b 41 20 6c 69 74 | 74 6c 65 20 64 65 6d 6f |;.;A lit|tle demo|
|00000010| 20 6f 66 20 6d 6f 76 69 | 6e 67 20 74 68 69 6e 67 | of movi|ng thing|
|00000020| 73 20 75 73 69 6e 67 20 | 74 68 65 20 42 42 6c 69 |s using |the BBli|
|00000030| 74 20 63 6f 6d 6d 61 6e | 64 2e 2e 2e 00 00 3b 63 |t comman|d.....;c|
|00000040| 72 65 61 74 65 20 61 20 | 27 62 61 6c 6c 27 20 74 |reate a |'ball' t|
|00000050| 79 70 65 20 76 61 72 69 | 61 62 6c 65 00 3b 00 80 |ype vari|able.;..|
|00000060| 01 2e 62 61 6c 6c 00 78 | 2e 71 00 79 00 78 73 00 |..ball.x|.q.y.xs.|
|00000070| 79 73 00 80 02 20 80 01 | 00 00 3b 64 69 6d 65 6e |ys... ..|..;dimen|
|00000080| 73 69 6f 6e 20 61 20 27 | 6c 69 73 74 27 20 6f 66 |sion a '|list' of|
|00000090| 20 27 62 61 6c 6c 73 27 | 00 3b 00 3b 74 72 79 20 | 'balls'|.;.;try |
|000000a0| 69 6e 63 72 65 61 73 69 | 6e 67 20 74 68 65 20 27 |increasi|ng the '|
|000000b0| 31 27 20 68 65 72 65 20 | 74 6f 20 27 37 27 2e 20 |1' here |to '7'. |
|000000c0| 4e 6f 74 69 63 65 20 68 | 6f 77 20 74 68 69 6e 67 |Notice h|ow thing|
|000000d0| 73 00 3b 73 74 61 72 74 | 20 74 6f 20 66 6c 69 63 |s.;start| to flic|
|000000e0| 6b 65 72 3f 20 54 6f 20 | 6f 76 65 72 63 6f 6d 65 |ker? To |overcome|
|000000f0| 20 74 68 69 73 2c 20 79 | 6f 75 27 6c 6c 20 6e 65 | this, y|ou'll ne|
|00000100| 65 64 20 74 6f 20 75 73 | 65 00 3b 64 6f 75 62 6c |ed to us|e.;doubl|
|00000110| 65 20 62 75 66 66 65 72 | 69 6e 67 21 20 53 65 65 |e buffer|ing! See|
|00000120| 20 74 68 65 20 27 64 6f | 75 62 6c 65 62 75 66 66 | the 'do|ublebuff|
|00000130| 65 72 27 20 64 65 6d 6f | 21 00 3b 00 80 04 20 80 |er' demo|!.;... .|
|00000140| b3 20 62 61 6c 6c 73 2e | 62 61 6c 6c 28 31 29 00 |. balls.|ball(1).|
|00000150| 00 3b 6c 6f 61 64 20 69 | 6e 20 61 20 73 68 61 70 |.;load i|n a shap|
|00000160| 65 20 61 6e 64 20 69 74 | 27 73 20 70 61 6c 65 74 |e and it|'s palet|
|00000170| 74 65 00 3b 00 cd 01 20 | 30 2c 22 64 61 74 61 2f |te.;... |0,"data/|
|00000180| 62 61 6c 6c 22 2c 30 00 | 00 3b 6b 65 65 70 20 61 |ball",0.|.;keep a|
|00000190| 64 64 69 6e 67 20 69 74 | 65 6d 73 20 74 6f 20 6c |dding it|ems to l|
|000001a0| 69 73 74 20 75 6e 74 69 | 6c 20 6c 69 73 74 20 66 |ist unti|l list f|
|000001b0| 75 6c 6c 00 3b 00 80 0c | 20 c0 08 28 62 61 6c 6c |ull.;...| ..(ball|
|000001c0| 73 28 29 29 00 20 20 62 | 61 6c 6c 73 28 29 5c 78 |s()). b|alls()\x|
|000001d0| 3d bc 07 28 32 38 30 29 | 2b 31 30 2c bc 07 28 31 |=..(280)|+10,..(1|
|000001e0| 36 30 29 2b 31 30 2c 28 | bc 07 2d 2e 35 29 2a 38 |60)+10,(|..-.5)*8|
|000001f0| 2c 28 bc 07 2d 2e 35 29 | 2a 38 00 80 c1 00 00 3b |,(..-.5)|*8.....;|
|00000200| 6e 6f 77 2c 20 77 65 20 | 67 6f 20 69 6e 74 6f 20 |now, we |go into |
|00000210| 62 6c 69 74 7a 20 6d 6f | 64 65 00 3b 00 80 34 00 |blitz mo|de.;..4.|
|00000220| 00 3b 69 6e 69 74 69 61 | 6c 69 7a 65 20 61 20 27 |.;initia|lize a '|
|00000230| 62 75 66 66 65 72 27 20 | 66 6f 72 20 74 68 65 20 |buffer' |for the |
|00000240| 42 42 6c 69 74 20 63 6f | 6d 6d 61 6e 64 20 74 6f |BBlit co|mmand to|
|00000250| 20 6d 61 6b 65 20 75 73 | 65 20 6f 66 3a 00 3b 00 | make us|e of:.;.|
|00000260| c9 01 20 30 2c 31 36 33 | 38 34 00 00 3b 69 6e 69 |.. 0,163|84..;ini|
|00000270| 74 69 61 6c 69 7a 65 20 | 61 20 6c 6f 72 2d 72 65 |tialize |a lor-re|
|00000280| 73 2c 20 38 20 63 6f 6c | 6f 75 72 20 62 69 74 6d |s, 8 col|our bitm|
|00000290| 61 70 2e 2e 2e 00 3b 00 | d0 01 20 30 2c 33 32 30 |ap....;.|.. 0,320|
|000002a0| 2c 32 30 30 2c 33 00 00 | 3b 64 72 61 77 20 73 6f |,200,3..|;draw so|
|000002b0| 6d 65 20 73 74 75 66 66 | 20 74 6f 20 69 74 2e 2e |me stuff| to it..|
|000002c0| 2e 00 3b 00 80 16 20 6b | 3d 31 20 80 18 20 31 30 |..;... k|=1 .. 10|
|000002d0| 30 00 bb 85 20 bc 07 28 | 33 32 30 29 2c bc 07 28 |0... ..(|320),..(|
|000002e0| 32 30 30 29 2c bc 07 28 | 33 32 30 29 2c bc 07 28 |200),..(|320),..(|
|000002f0| 32 30 30 29 2c bc 07 28 | 37 29 2b 31 00 80 17 00 |200),..(|7)+1....|
|00000300| 00 3b 69 6e 69 74 69 61 | 6c 69 7a 65 20 61 20 73 |.;initia|lize a s|
|00000310| 6c 69 63 65 2c 20 61 6e | 64 20 73 65 74 20 69 74 |lice, an|d set it|
|00000320| 27 73 20 63 6f 6c 6f 75 | 72 20 70 61 6c 65 74 74 |'s colou|r palett|
|00000330| 65 00 3b 00 00 c7 82 20 | 30 2c 34 34 2c 32 30 30 |e.;.... |0,44,200|
|00000340| 2c 33 2c 38 2c 33 32 2c | 30 00 c7 86 20 30 2c 30 |,3,8,32,|0... 0,0|
|00000350| 00 c7 84 20 30 2c 30 00 | c7 83 20 30 00 00 3b 6e |... 0,0.|.. 0..;n|
|00000360| 6f 77 2c 20 70 72 6f 63 | 65 73 73 20 61 6c 6c 20 |ow, proc|ess all |
|00000370| 62 61 6c 6c 73 73 2e 2e | 2e 00 3b 00 3b 77 68 69 |ballss..|..;.;whi|
|00000380| 6c 65 20 6d 6f 75 73 65 | 20 62 75 74 74 6f 6e 20 |le mouse| button |
|00000390| 6e 6f 74 20 68 69 74 2e | 2e 00 3b 00 80 0c 20 df |not hit.|..;... .|
|000003a0| 04 28 30 29 3d 30 00 00 | 20 20 3b 73 74 61 72 74 |.(0)=0..| ;start|
|000003b0| 20 61 74 20 66 69 72 73 | 74 20 69 74 65 6d 20 69 | at firs|t item i|
|000003c0| 6e 20 6c 69 73 74 00 20 | 20 3b 00 20 20 c0 04 20 |n list. | ;. .. |
|000003d0| 62 61 6c 6c 73 28 29 00 | 00 20 20 3b 77 61 69 74 |balls().|. ;wait|
|000003e0| 20 66 6f 72 20 76 65 72 | 74 69 63 61 6c 20 62 6c | for ver|tical bl|
|000003f0| 61 6e 6b 00 20 20 3b 00 | 20 20 80 37 00 00 20 20 |ank. ;.| .7.. |
|00000400| 3b 75 6e 62 75 66 66 65 | 72 20 61 6c 6c 20 70 72 |;unbuffe|r all pr|
|00000410| 65 76 69 6f 75 73 6c 79 | 20 64 72 61 77 6e 20 73 |eviously| drawn s|
|00000420| 68 61 70 65 73 00 20 20 | 3b 00 20 20 c9 03 20 30 |hapes. |;. .. 0|
|00000430| 00 00 20 20 3b 77 68 69 | 6c 65 20 6d 6f 72 65 20 |.. ;whi|le more |
|00000440| 69 74 65 6d 73 20 74 6f | 20 63 6f 6d 65 2e 2e 2e |items to| come...|
|00000450| 00 20 20 3b 00 20 20 80 | 0c 20 c0 03 28 62 61 6c |. ;. .|. ..(bal|
|00000460| 6c 73 28 29 29 00 00 20 | 20 20 20 3b 75 70 64 61 |ls()).. | ;upda|
|00000470| 74 65 20 62 61 6c 6c 73 | 27 20 70 6f 73 69 74 69 |te balls|' positi|
|00000480| 6f 6e 00 20 20 20 20 3b | 00 20 20 20 20 62 61 6c |on. ;|. bal|
|00000490| 6c 73 28 29 5c 78 2b 62 | 61 6c 6c 73 28 29 5c 78 |ls()\x+b|alls()\x|
|000004a0| 73 00 20 20 20 20 62 61 | 6c 6c 73 28 29 5c 79 2b |s. ba|lls()\y+|
|000004b0| 62 61 6c 6c 73 28 29 5c | 79 73 00 00 20 20 20 20 |balls()\|ys.. |
|000004c0| 3b 72 65 76 65 72 73 65 | 20 64 69 72 65 63 74 69 |;reverse| directi|
|000004d0| 6f 6e 20 69 66 20 62 61 | 6c 6c 20 67 65 74 73 20 |on if ba|ll gets |
|000004e0| 74 6f 20 65 64 67 65 20 | 6f 66 20 62 69 74 6d 61 |to edge |of bitma|
|000004f0| 70 00 20 20 20 20 3b 00 | 20 20 20 20 80 0b 20 62 |p. ;.| .. b|
|00000500| 61 6c 6c 73 28 29 5c 78 | 3c 31 30 20 80 8a 20 62 |alls()\x|<10 .. b|
|00000510| 61 6c 6c 73 28 29 5c 78 | 3e 32 39 30 20 80 21 20 |alls()\x|>290 .! |
|00000520| 62 61 6c 6c 73 28 29 5c | 78 73 3d 2d 62 61 6c 6c |balls()\|xs=-ball|
|00000530| 73 28 29 5c 78 73 00 20 | 20 20 20 80 0b 20 62 61 |s()\xs. | .. ba|
|00000540| 6c 6c 73 28 29 5c 79 3c | 31 30 20 80 8a 20 62 61 |lls()\y<|10 .. ba|
|00000550| 6c 6c 73 28 29 5c 79 3e | 31 37 30 20 80 21 20 62 |lls()\y>|170 .! b|
|00000560| 61 6c 6c 73 28 29 5c 79 | 73 3d 2d 62 61 6c 6c 73 |alls()\y|s=-balls|
|00000570| 28 29 5c 79 73 00 00 20 | 20 20 20 3b 64 72 61 77 |()\ys.. | ;draw|
|00000580| 20 62 61 6c 6c 73 20 69 | 6e 20 6e 65 77 20 70 6f | balls i|n new po|
|00000590| 73 69 74 69 6f 6e 00 20 | 20 20 20 3b 00 20 20 20 |sition. | ;. |
|000005a0| 20 c9 02 20 30 2c 30 2c | 62 61 6c 6c 73 28 29 5c | .. 0,0,|balls()\|
|000005b0| 78 2c 62 61 6c 6c 73 28 | 29 5c 79 00 00 20 20 80 |x,balls(|)\y.. .|
|000005c0| c1 00 80 c1 00 00 80 02 | 00 |........|. |
+--------+-------------------------+-------------------------+--------+--------+