home *** CD-ROM | disk | FTP | other *** search
/ No Fragments Archive 10: Diskmags / nf_archive_10.iso / MAGS / ST_USER / 1990 / USERNV90.MSA / TEXT_SCREENFL.DOC < prev    next >
Text File  |  1990-05-24  |  5KB  |  99 lines

  1.                             MEMORY MISER
  2.  
  3.  
  4.               ++++++++++++++++++++++++++++++++++++++++++
  5. Screenfull is an exciting challenge for programmers - to write a program (or
  6. even just a subroutine) that will fit on one standard monitor or TV screen.
  7. That's about 22 lines. The program can be a game, utility, graphic designer,
  8. music and MIDI editor or even a business program, the choice is yours. You can
  9. also use any programming language such as Basic, C, Pascal, STOS or 68000
  10. machine code, but remember, the whole of the source code must fit onto one
  11. screen. Send your submissions in to the Disk Editor.
  12.               +++++++++++++++++++++++++++++++++++++++++++
  13.  
  14.  
  15. C. Warren of Bury St. Edmunds, Suffolk, supplies the first of our two
  16. Screenfull submissions and it's a useful GFA BASIC routine to switch the
  17. blitter on or off: "I recently bought a 520STE and immediately became annoyed
  18. that the blitter option could only be toggled from the Menu Bar. After scanning
  19. through my GFA BASIC 3.00 manual, I discovered XBIOS 64 - this controls and
  20. interrogates the blitter (if it exists).
  21.     "The code is incorporated into a Desk Accessory so that you can toggle the
  22. blitter on and off from within any GEM application. Select the desk accessory
  23. and an alert Box pops up giving you two choices: turn the blitter on, or turn
  24. it off. Make your choice and the accessory disappears.
  25.  
  26. ==============================================================================
  27. ' GFA BASIC Blitter Switcher 2.00  by C. Warren
  28. $m2500
  29. d%=1
  30. ap_id&=APPL_INIT()
  31. me_id&=MENU_REGISTER(ap_id&,"  Blit Switch")
  32. DO
  33.   ~EVNT_MESAG(0)
  34.   IF MENU(1)=40
  35.     ALERT 2,"Blitter Switch",d%," On | Off ",a%
  36.     SELECT a%
  37.     CASE 1
  38.       r%=XBIOS(64,-1) AND 2      !r%=non zero if blitter attached
  39.       IF r%
  40.         ~XBIOS(64,1)
  41.         d%=2
  42.       ELSE
  43.         ALERT 1,"Sorry, no blitter",1,"Shame!",dummy%
  44.       ENDIF
  45.     CASE 2
  46.       ~XBIOS(64,0)
  47.       d%=1
  48.     ENDSELECT
  49.   ENDIF
  50. LOOP
  51. ==============================================================================
  52.  
  53.     Paul J. Dixon provides the second of this month's Screenfull submissions
  54. and it's an interesting game called Bouncy Bouncy written in STOS. "This awe
  55. inspiring STOS Basic game is mind blowingly addictive in its simplicity. You
  56. must navigate your Mk II Bouncy Quasar Neutron Blaster (errm, a dot) through
  57. the ultrachromatic hyper-defence shields (some vertical lines) of the planet
  58. Hemmer. If you fail, those nasty Hemmeroids will destroy Mankind!
  59.     "The trouble is that your Bouncy Blaster was badly damaged when you were
  60. ambushed by piles of Hemmeroid fighters. The only thing left working is your
  61. longitudinal retro thruster, which in effect means you can only control whether
  62. you go up or down!
  63.     "So that's the scenario! How do you play it? Press D to select the
  64. difficulty level (the density of the defence shields), and S to select the
  65. speed. Press Space, a mouse key, or the joystick fire button to play. Your
  66. Bouncy Blaster will start bouncing all over the place - pressing Space, a mouse
  67. key or fire will reverse your up/down direction. To reverse your left right
  68. direction you must bounce off something! You'll soon develop the technique (try
  69. holding down a mouse button to travel horizontally). When you finish your time
  70. will be displayed.
  71.     "Here's the listing then! A little unreadable, but not bad for one
  72. screenful!"
  73.  
  74. ==============================================================================
  75. 10 DATA $700,$750,$770,$570,$75,$570,$770,$750
  76. 20 FOR c=3 TO 10 : READ rgb : COLOUR c,rgb : NEXT c
  77. 30 VOLUME 16 : CLICK OFF : CURS OFF : HIDE : KEY OFF : MODE 0 : REPEAT : GOSUB
  78. 140 : PEN 7 : PRINT STRING$(CHR$(206),39); : PEN 15 : CENTRE " Bouncy Bouncy!
  79. "
  80. 40 s=(3-diff)*30 : FOR x=8 TO 312 STEP 5 : INK ((x/5) MOD 8)+3 : DRAW x,9 TO
  81. x,199 : INK 0 : y=RND(190-s)+9 : DRAW x,y TO x,y+s : NEXT x
  82. 50 INK 13 : BOX 0,9 TO 319,199 : BOX 1,10 TO 318,198
  83. 60 x=6 : y=190 : xs=1 : ys=-1 : ox=x : oy=y
  84. 70 REPEAT : i=0 : a=ox : b=oy : GOSUB 130 : i=1 : a=x : b=y : GOSUB 130
  85. 80 IF POINT(x,y-1)<>0 OR POINT(x,y+2)<>0 THEN ys=-ys : NOISE 1,15
  86. 90 IF POINT(x-1,y)<>0 OR POINT(x+2,y)<>0 THEN xs=-xs : NOISE 1,15
  87. 100 IF INKEY$=" " OR FIRE OR MOUSE KEY THEN ys=-ys
  88. 110 FOR ps=1 TO (2-sp)*150 : NEXT ps
  89. 120 ox=x : oy=y : x=x+xs : y=y+ys : UNTIL x>313 : UNTIL FALSE
  90. 130 PLOT a,b,i : PLOT a+1,b,i : PLOT a,b+1,i : PLOT a+1,b+1,i : RETURN
  91. 140 PEN 7 : WINDOPEN 1,0,0,40,25,6 : PEN 15 : CURS OFF : TITLE " Bouncy Bouncy!
  92. " : LOCATE 0,4 : CENTRE "You took"+STR$(TIMER/50)+" seconds"
  93. 150 REPEAT : PEN 10 : LOCATE 10,13 : PRINT "D/ Difficulty :";diff+1; : LOCATE
  94. 10,15 : PRINT "S/ Speed      :";sp+1
  95. 160 i$=UPPER$(INKEY$) : IF i$="D" THEN diff=diff+1 : diff=diff MOD 3
  96. 170 IF i$="S" THEN sp=sp+1 : sp=sp MOD 3
  97. 180 UNTIL i$=" " OR FIRE OR MOUSE KEY : CLS : TIMER=0 : RETURN
  98. ==============================================================================
  99.