home *** CD-ROM | disk | FTP | other *** search
- 2
- 0
- 0
- 0
- IHEIGHT=40
- IWIDTH=40
- 0.
- 1.
- 2. Initialize = RunStop(0), ; unclick Run button~PixNumFrames(2),~pixactive(1), pixsize(2), pixon,~PixLoad(-1, "hivprot", "", "gif", 1) ; load a background~pixactive(2), pixcopy(1), pixactive(1),~V0.(int(ran*PixFrameWidth/2)), ; starting X~V1.(int(ran*PixFrameHeight/2)), ; starting Y~v2.(1), v3.(1), v8.(5), ; starting direction~Ex(me+1), ; load the shape index~PixShapeSet(1, 1, 2, rgb(128,255,0)),~PixPatternSet(0, rgb(255,128,0), rgb(0,0,0)),~TxtLabel("Buttons Flip Bkgn")~ToolTip(,"Left-Right Speed","Up-Down Speed","Left-Right Flip", "Up-Down Flip")~goto(me+2), ~
- 3. Set Shape Array = put(0, 9001),~put(1, 11001), ; R~put(2, 11000), ; L~put(4, 11003), ; B~put(5, 11009), ; BR~put(6, 11007), ; BL~put(8, 11002), ; T~put(9, 11008), ; TR~put(10,11006) ; TL~
- 4. Draw Shape = pixactive(1), PixAutoRepaint(0)~x.(v0), y.(v1), s.(v8),~e.(Edge(v0, v1, iWidth, iHeight, PixFrameWidth, PixFrameHeight)), ; check edges~v2.(iif( e and 3, iif(e and 1, -1, 1), v2)), ; direction flags~v3.(iif( e and 12, iif(e and 4, -1, 1),v3)),~v0.(v0+(in1*v2)), v1.(v1+(in2*v3)), ; update x,y position~v8.( iif(in1, iif(v2>0, 1, 2),0) + ; shape index~ iif(in2, iif(v3>0, 4, 8),0)),~PixCombine(2,, x, y, iWidth, iHeight, x, y), ; erase the old shape~ex(me+1) ; run the image flipper~PixShape(v0, v1, iWidth, iHeight, get(v8)), ; draw new shape~out(e), ; output flags if direction changed~PixRepaint, PixAutoRepaint(1)
- 5. Image Flipper = Switch(((e and 3) > 0) and in3, me+1, 0), ; East West flip~Switch(((e and 12) > 0) and in4, me+2, 0) ; North South flip
- 6. East West Flip = pixactive(2), Pixflip(2), ; flip the background image~pixactive(1), pixflip(2) ; flip the foreground (could just copy)
- 7. North South Flip = Pixactive(2), Pixflip(1), ; flip the background image~pixactive(1), pixflip(1) ; flip the foreground (could just copy)
- 8.
- 9.
- 10.
- 11.
- 12.
- 13.
- 14.
- 15.
- 16.
- 17.
- 18.
- 19.
- 20.
- 21.
- 22.
- 23.
- 24.
- 25.
- 26.
- 27.
- 28.
- 29.
- 30.
- 31.
- 32.
- 33.
- 34.
- 35.
- 36.
- 37.
- 38.
- 39.
- 40.
- 41.
- 42.
- 43.
- 44.
- 45.
- 46.
- 47.
- 48.
- 49.
- 50.
- 51.
- 52.
- 53.
- 54.
- 55.
- 56.
- 57.
- 58.
- 59.
- 60.
- 61.
- 62.
- 63.
- 64.
- 65.
- 66.
- 67.
- 68.
- 69.
- 70.
- 71.
- 72.
- 73.
- 74.
- 75.
- 76.
- 77.
- 78.
- 79.
- 80.
- 81.
- 82.
- 83.
- 84.
- 85.
- 86.
- 87.
- 88.
- 89.
- 90.
- 91.
- 92.
- 93.
- 94.
- 95.
- 96.
- 97.
- 98.
- 99.
- 100.
- 101.
- 102.
- 103.
- 104.
- 105.
- 106.
- 107.
- 108.
- 109.
- 110.
- 111.
- 112.
- 113.
- 114.
- 115.
- 116.
- 117.
- 118.
- 119.
- 120.
- 121.
- 122.
- 123.
- 124.
- 125.
- 126.
- 127.
-