home *** CD-ROM | disk | FTP | other *** search
/ Amiga ISO Collection / AmigaUtilCD2.iso / Programming / Basic / BLITZBASIC2V1,6AGA2.DMS / in.adf / examples / blitzmode / qblits.bb2 < prev    next >
Unknown  |  1992-07-29  |  1.5 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 51 42 6c 69 |s using |the QBli|
|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| 32 27 20 68 65 72 65 20 | 74 6f 20 27 37 27 2e 20 |2' 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 32 29 00 |. balls.|ball(2).|
|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| 71 75 65 75 65 27 20 66 | 6f 72 20 74 68 65 20 71 |queue' f|or the q|
|00000240| 62 6c 69 74 20 63 6f 6d | 6d 61 6e 64 20 74 6f 20 |blit com|mand to |
|00000250| 6d 61 6b 65 20 75 73 65 | 20 6f 66 3a 00 3b 00 3b |make use| of:.;.;|
|00000260| 74 68 65 20 27 35 30 27 | 20 68 65 72 65 20 6d 65 |the '50'| here me|
|00000270| 61 6e 73 20 74 68 65 20 | 71 75 65 75 65 20 63 61 |ans the |queue ca|
|00000280| 6e 20 68 61 6e 64 6c 65 | 20 75 70 20 74 6f 20 35 |n handle| up to 5|
|00000290| 30 20 27 51 42 6c 69 74 | 73 27 00 3b 62 65 66 6f |0 'QBlit|s'.;befo|
|000002a0| 72 65 20 61 6e 20 27 55 | 6e 51 75 65 75 65 27 20 |re an 'U|nQueue' |
|000002b0| 69 73 20 6e 65 63 65 73 | 73 61 72 79 2e 00 3b 00 |is neces|sary..;.|
|000002c0| ca 01 20 30 2c 35 30 00 | 00 3b 69 6e 69 74 69 61 |.. 0,50.|.;initia|
|000002d0| 6c 69 7a 65 20 61 20 6c | 6f 72 2d 72 65 73 2c 20 |lize a l|or-res, |
|000002e0| 38 20 63 6f 6c 6f 75 72 | 20 62 69 74 6d 61 70 2e |8 colour| bitmap.|
|000002f0| 2e 2e 00 3b 00 d0 01 20 | 30 2c 33 32 30 2c 32 30 |...;... |0,320,20|
|00000300| 30 2c 33 00 00 3b 69 6e | 69 74 69 61 6c 69 7a 65 |0,3..;in|itialize|
|00000310| 20 61 20 73 6c 69 63 65 | 2c 20 61 6e 64 20 73 65 | a slice|, and se|
|00000320| 74 20 69 74 27 73 20 63 | 6f 6c 6f 75 72 20 70 61 |t it's c|olour pa|
|00000330| 6c 65 74 74 65 00 3b 00 | c8 01 20 30 2c 34 34 2c |lette.;.|.. 0,44,|
|00000340| 33 32 30 2c 32 30 30 2c | 24 66 66 66 30 2c 33 2c |320,200,|$fff0,3,|
|00000350| 38 2c 33 32 2c 33 32 30 | 2c 33 32 30 00 80 2c 20 |8,32,320|,320.., |
|00000360| ce 09 20 30 00 c8 04 20 | 30 00 00 3b 6e 6f 77 2c |.. 0... |0..;now,|
|00000370| 20 70 72 6f 63 65 73 73 | 20 61 6c 6c 20 62 61 6c | process| all bal|
|00000380| 6c 73 73 2e 2e 2e 00 3b | 00 3b 77 68 69 6c 65 20 |lss....;|.;while |
|00000390| 6d 6f 75 73 65 20 62 75 | 74 74 6f 6e 20 6e 6f 74 |mouse bu|tton not|
|000003a0| 20 68 69 74 2e 2e 00 3b | 00 80 0c 20 df 04 28 30 | hit...;|... ..(0|
|000003b0| 29 3d 30 00 00 20 20 3b | 73 74 61 72 74 20 61 74 |)=0.. ;|start at|
|000003c0| 20 66 69 72 73 74 20 69 | 74 65 6d 20 69 6e 20 6c | first i|tem in l|
|000003d0| 69 73 74 00 20 20 3b 00 | 20 20 c0 04 20 62 61 6c |ist. ;.| .. bal|
|000003e0| 6c 73 28 29 00 00 20 20 | 3b 77 61 69 74 20 66 6f |ls().. |;wait fo|
|000003f0| 72 20 76 65 72 74 69 63 | 61 6c 20 62 6c 61 6e 6b |r vertic|al blank|
|00000400| 00 20 20 3b 00 20 20 80 | 37 00 00 20 20 3b 75 6e |. ;. .|7.. ;un|
|00000410| 71 75 65 75 65 20 61 6c | 6c 20 70 72 65 76 69 6f |queue al|l previo|
|00000420| 75 73 6c 79 20 64 72 61 | 77 6e 20 73 68 61 70 65 |usly dra|wn shape|
|00000430| 73 00 20 20 3b 00 20 20 | ca 03 20 30 00 00 20 20 |s. ;. |.. 0.. |
|00000440| 3b 77 68 69 6c 65 20 6d | 6f 72 65 20 69 74 65 6d |;while m|ore item|
|00000450| 73 20 74 6f 20 63 6f 6d | 65 2e 2e 2e 00 20 20 3b |s to com|e.... ;|
|00000460| 00 20 20 80 0c 20 c0 03 | 28 62 61 6c 6c 73 28 29 |. .. ..|(balls()|
|00000470| 29 00 00 20 20 20 20 3b | 75 70 64 61 74 65 20 62 |).. ;|update b|
|00000480| 61 6c 6c 73 27 20 70 6f | 73 69 74 69 6f 6e 00 20 |alls' po|sition. |
|00000490| 20 20 20 3b 00 20 20 20 | 20 62 61 6c 6c 73 28 29 | ;. | balls()|
|000004a0| 5c 78 2b 62 61 6c 6c 73 | 28 29 5c 78 73 00 20 20 |\x+balls|()\xs. |
|000004b0| 20 20 62 61 6c 6c 73 28 | 29 5c 79 2b 62 61 6c 6c | balls(|)\y+ball|
|000004c0| 73 28 29 5c 79 73 00 00 | 20 20 20 20 3b 72 65 76 |s()\ys..| ;rev|
|000004d0| 65 72 73 65 20 64 69 72 | 65 63 74 69 6f 6e 20 69 |erse dir|ection i|
|000004e0| 66 20 62 61 6c 6c 20 67 | 65 74 73 20 74 6f 20 65 |f ball g|ets to e|
|000004f0| 64 67 65 20 6f 66 20 62 | 69 74 6d 61 70 00 20 20 |dge of b|itmap. |
|00000500| 20 20 3b 00 20 20 20 20 | 80 0b 20 62 61 6c 6c 73 | ;. |.. balls|
|00000510| 28 29 5c 78 3c 31 30 20 | 80 8a 20 62 61 6c 6c 73 |()\x<10 |.. balls|
|00000520| 28 29 5c 78 3e 32 39 30 | 20 80 21 20 62 61 6c 6c |()\x>290| .! ball|
|00000530| 73 28 29 5c 78 73 3d 2d | 62 61 6c 6c 73 28 29 5c |s()\xs=-|balls()\|
|00000540| 78 73 00 20 20 20 20 80 | 0b 20 62 61 6c 6c 73 28 |xs. .|. balls(|
|00000550| 29 5c 79 3c 31 30 20 80 | 8a 20 62 61 6c 6c 73 28 |)\y<10 .|. balls(|
|00000560| 29 5c 79 3e 31 37 30 20 | 80 21 20 62 61 6c 6c 73 |)\y>170 |.! balls|
|00000570| 28 29 5c 79 73 3d 2d 62 | 61 6c 6c 73 28 29 5c 79 |()\ys=-b|alls()\y|
|00000580| 73 00 00 20 20 20 20 3b | 64 72 61 77 20 62 61 6c |s.. ;|draw bal|
|00000590| 6c 73 20 69 6e 20 6e 65 | 77 20 70 6f 73 69 74 69 |ls in ne|w positi|
|000005a0| 6f 6e 00 20 20 20 20 3b | 00 20 20 20 20 ca 02 20 |on. ;|. .. |
|000005b0| 30 2c 30 2c 62 61 6c 6c | 73 28 29 5c 78 2c 62 61 |0,0,ball|s()\x,ba|
|000005c0| 6c 6c 73 28 29 5c 79 00 | 00 20 20 80 c1 00 80 c1 |lls()\y.|. .....|
|000005d0| 00 00 | |.. | |
+--------+-------------------------+-------------------------+--------+--------+