Advertisement
lovejoy777

DEMO 09

Jan 16th, 2024
1,562
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
FreeBasic 4.15 KB | Source Code | 0 0
  1.    10 REM ******************************
  2.    20 REM *        AGON LIGHT 2        *
  3.    30 REM *      BBC BASIC MODE 8      *
  4.    40 REM *          DEMO 09           *
  5.    50 REM *         320 X 240          *
  6.    60 REM *     DRAW & SCALE TEXT1     *
  7.    70 REM *       BY LOVEJOY777        *
  8.    80 REM ******************************
  9.    90 :
  10.   100 VDU 22,8 : REM SET SCREEN MODE.
  11.   110 VDU 23,1,0 : REM DISABLE TEXT CURSOR.
  12.   120 VDU 12 : REM SAME AS CLS.
  13.   130 VDU 16 : REM SAME AS CLG.
  14.   140 VDU 18,0,10 : REM SAME AS GCOL.
  15.   150 SW% = 1280 : SH%=1024 : REM SCREEN WIDTH & HEIGHT IN GRAPHICAL UNITS.
  16.   160 SC=1.0 : REM ASSIGN FLOAT FOR SCALE.
  17.   170 SF=0.4 : REM ASSIGN FLOAT FOR SCALE FACTOR.
  18.   180 AX%=SW%/2-32 : AY%=SH%/2-8 : REM ASSIGN VARS FOR A's X & Y START COORDS (center).
  19.   190 :
  20.   300 REM **** SCALE UP, POSITION & DRAWING LOOP ****
  21.   310 FOR SU% = 1 TO 35 : REM LOOP FOR SCALE UP & COLOUR.
  22.   320  SC=SC+SF : REM INCREASE SIZE BY SCALING FACTOR EACH LOOP.
  23.   330  VDU 16 : REM CLEAR GRAPHICS EACH LOOP.
  24.   340  AX%=AX%-13 : REM MOVE A's X POSITION LEFT 13 UNITS EACH LOOP (keep the text central ish..).
  25.   350  GX%=AX%+16*SC : GY%=AY% : REM VARS FOR G X & Y (16 pixels * scaling after A).
  26.   360  OX%=GX%+16*SC : OY%=GY% : REM VARS FOR for O X & Y (16 pixels * scaling after G).
  27.   370  NX%=OX%+16*SC : NY%=OY% : REM VARS FOR N X & Y (16 pixels * scaling after O).
  28.   400  PROC_DRAW_A
  29.   410  PROC_DRAW_G
  30.   420  PROC_DRAW_O
  31.   430  PROC_DRAW_N
  32.   440  VDU 18,0,SU% : REM SAME AS GCOL (use scale up loop number to set colour).
  33.   450  ANYKEY%=INKEY(5) : REM DELAY (can speed up by pressing any key).
  34.   460 NEXT SU% : REM NEXT SCALE UP  LOOP.
  35.   470 END : REM **** END PROGRAM ****
  36.   480 :
  37.   500 REM ********** PROCS **********
  38.  1000 :
  39.  2000 REM **** DRAW AGON ****.
  40.  2010 DEF PROC_DRAW_A : REM **** DRAW A ****.
  41.  2020 MOVE AX%+1*SC,AY%+2*SC : DRAW AX%+1*SC,AY%+6*SC : DRAW AX%+3*SC,AY%+6*SC
  42.  2030 DRAW AX%+3*SC,AY%+8*SC : DRAW AX%+5*SC,AY%+8*SC : DRAW AX%+5*SC,AY%+10*SC
  43.  2040 DRAW AX%+7*SC,AY%+10*SC : DRAW AX%+7*SC,AY%+12*SC : DRAW AX%+9*SC,AY%+12*SC : DRAW AX%+9*SC,AY%+14*SC
  44.  2050 DRAW AX%+11*SC,AY%+14*SC : DRAW AX%+11*SC,AY%+16*SC : DRAW AX%+15*SC,AY%+16*SC
  45.  2060 DRAW AX%+15*SC,AY%+0*SC : DRAW AX%+13*SC,AY%+0*SC : DRAW AX%+13*SC,AY%+2*SC
  46.  2070 DRAW AX%+11*SC,AY%+2*SC : DRAW AX%+11*SC,AY%+8*SC : DRAW AX%+9*SC,AY%+8*SC
  47.  2080 DRAW AX%+9*SC,AY%+6*SC : DRAW AX%+7*SC,AY%+6*SC : DRAW AX%+7*SC,AY%+4*SC
  48.  2090 DRAW AX%+5*SC,AY%+4*SC : DRAW AX%+5*SC,AY%+2*SC : DRAW AX%+1*SC,AY%+2*SC
  49.  2100 ENDPROC : REM END DRAW A.
  50.  2110 :
  51.  3010 DEF PROC_DRAW_G : REM **** DRAW G ****.
  52.  3020 MOVE GX%+1*SC,GY%+2*SC : DRAW GX%+1*SC,GY%+16*SC : DRAW GX%+15*SC,GY%+16*SC
  53.  3030 DRAW GX%+15*SC,GY%+13*SC : DRAW GX%+4*SC,GY%+13*SC : DRAW GX%+4*SC,GY%+5*SC
  54.  3040 DRAW GX%+11*SC,GY%+5*SC : DRAW GX%+11*SC,GY%+9*SC : DRAW GX%+13*SC,GY%+9*SC : DRAW GX%+13*SC,GY%+11*SC
  55.  3050 DRAW GX%+15*SC,GY%+11*SC : DRAW GX%+15*SC,GY%+2*SC : DRAW GX%+13*SC,GY%+2*SC
  56.  3060 DRAW GX%+13*SC,GY%+0*SC : DRAW GX%+11*SC,GY%+0*SC : DRAW GX%+11*SC,GY%+2*SC: DRAW GX%+1*SC,GY%+2*SC
  57.  3100 ENDPROC : REM END DRAW G.
  58.  3110 :
  59.  4010 DEF PROC_DRAW_O : REM **** DRAW O ****.
  60.  4020 MOVE OX%+1*SC,OY%+2*SC : DRAW OX%+1*SC,OY%+16*SC : DRAW OX%+15*SC,OY%+16*SC
  61.  4030 DRAW OX%+15*SC,OY%+2*SC : DRAW OX%+1*SC,OY%+2*SC
  62.  4040 MOVE OX%+4*SC,OY%+5*SC
  63.  4050 DRAW OX%+4*SC,OY%+13*SC : DRAW OX%+12*SC,OY%+13*SC : DRAW OX%+12*SC,OY%+5*SC : DRAW OX%+4*SC,OY%+5*SC
  64.  4100 ENDPROC : REM END DRAW O.
  65.  4110 :
  66.  5010 DEF PROC_DRAW_N : REM **** DRAW N ****.
  67.  5020 MOVE NX%+1*SC,NY%+2*SC : DRAW NX%+1*SC,NY%+16*SC : DRAW NX%+3*SC,NY%+16*SC
  68.  5030 DRAW NX%+3*SC,NY%+15*SC : DRAW NX%+5*SC,NY%+15*SC : DRAW NX%+5*SC,NY%+13*SC
  69.  5040 DRAW NX%+7*SC,NY%+13*SC : DRAW NX%+7*SC,NY%+11*SC : DRAW NX%+9*SC,NY%+11*SC : DRAW NX%+9*SC,NY%+9*SC
  70.  5050 DRAW NX%+12*SC,NY%+9*SC : DRAW NX%+12*SC,NY%+16*SC : DRAW NX%+15*SC,NY%+16*SC
  71.  5060 DRAW NX%+15*SC,NY%+0*SC : DRAW NX%+13*SC,NY%+0*SC : DRAW NX%+13*SC,NY%+1*SC
  72.  5070 DRAW NX%+11*SC,NY%+1*SC : DRAW NX%+11*SC,NY%+3*SC : DRAW NX%+9*SC,NY%+3*SC
  73.  5080 DRAW NX%+9*SC,NY%+5*SC : DRAW NX%+7*SC,NY%+5*SC : DRAW NX%+7*SC,NY%+7*SC
  74.  5090 DRAW NX%+4*SC,NY%+7*SC : DRAW NX%+4*SC,NY%+2*SC : DRAW NX%+1*SC,NY%+2*SC
  75.  5100 ENDPROC : REM END DRAW N.
Tags: agon light
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement