Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 10 REM ******************************
- 20 REM * AGON LIGHT 2 *
- 30 REM * DEMO 04 *
- 40 REM * BBC BASIC MODE 0 *
- 50 REM * User Defined Chars 3 *
- 60 REM * BY STEVE LOVEJOY *
- 70 REM ******************************
- 80 :
- 90 REM MAIN SETUP.
- 100 CLEAR
- 110 PROC_LOAD_VARS : REM CALL LOAD_VARS.
- 120 PROC_LOAD_CHARS : REM CALL LOAD_CHARS.
- 130 PROC_INIT : REM CALL INIT.
- 140 PROC_MAINLOOP : REM CALL MAIN LOOP.
- 150 VDU 30,17,15 : REM MOVES CURSOR HOME (TOP LEFT) <PIPE> 0,0) AND COLOUR WHITE.
- 160 END : REM END MAIN SETUP.
- 170 :
- 1000 DEF PROC_MAINLOOP : REM ****** MAIN LOOP ******
- 1010 CLS : REM CLEAR THE SCREEN.
- 1020 NX = 34 : REM SET X.
- 1030 NY = 27 : REM SET Y AT THE TOP OF THE SCREEN.
- 1040 :
- 1050 FOR J=1 TO 15 : REM LOOP FOR COLOUR CHANGE.
- 1060 REM CLS : REM CLEAR THE SCREEN BETWEEN EACH COLOUR CHANGE.
- 1070 COLOUR J : REM ASSIGN COLOUR OF J.
- 1080 PROC_DRAW_HUD : REM DRAW THE HUD (BORDER).
- 1110 PROC_DRAW_AGON(NX,NY) : REM THIS ALLOWS YOU TO MOVE THE AGON TEXT WITH CODE.
- 1120 PROC_DRAW_LIGHT(NX+2,NY+2) : REM THIS ALLOWS YOU TO MOVE THE LIGHT TEXT WITH CODE.
- 1130 ANYKEY%=INKEY(100) : REM DELAY
- 1140 NEXT J
- 1150 :
- 1200 ENDPROC : REM END MAIN_LOOP.
- 1210 :
- 2010 DEF PROC_INIT : REM ***** INIT ****
- 2020 MODE mode% : REM SETS SCREEN MODE FROM VARS.
- 2030 CLS : REM CLEAR TEXT SCREEN.
- 2040 CLG : REM CLEAR GRAPHICS SCREEN.
- 2050 PROC_HIDE_CURSOR : REM CALL HIDE_CURSOR.
- 2060 ENDPROC : REM END INIT
- 2070 :
- 5000 DEF PROC_HIDE_CURSOR : REM ******* HIDE_CURSOR *******
- 5010 VDU 23,1,0
- 5020 ENDPROC
- 5030 :
- 5040 DEF PROC_SHOW_CURSOR : REM ****** SHOW_CURSOR *******
- 5050 VDU 23,1,1
- 5050 ENDPROC
- 5070 :
- 7010 DEF PROC_LOAD_CHARS : REM ****** LOAD_CHARS TO MEMORY ******
- 7020 REM ASSIGN A to CHRS.
- 7030 VDU 23,201,0,0,0,0,1,1,7,7,23,202,30,30,126,126,254,254,254,254
- 7040 VDU 23,203,31,31,126,126,120,120,0,0,23,204,158,158,30,30,30,30,6,6
- 7070 REM ASSIGN G to CHARS.
- 7080 VDU 23,205,127,127,127,112,112,112,112,112,23,206,254,254,254,0,0,6,6,30
- 7090 VDU 23,207,112,112,112,127,127,127,0,0,23,208,30,30,30,254,254,254,24,24
- 7100 REM ASSIGN O to CHARS.
- 7110 VDU 23,209,127,127,127,112,112,112,112,112,23,210,254,254,254,14,14,14,14,14
- 7120 VDU 23,211,112,112,112,127,127,127,0,0,23,212,14,14,14,254,254,254,0,0
- 7130 REM ASSIGN N to CHARS.
- 7140 VDU 23,213,96,120,120,126,126,127,127,127,23,214,14,14,14,14,14,142,142,254
- 7150 VDU 23,215,127,113,113,112,112,112,0,0,23,216,254,254,254,126,126,30,30,6
- 7160 :
- 7170 REM ASSIGN L to CHRS.
- 7180 VDU 23,217,120,120,120,120,120,120,120,120,23,218,0,0,0,0,0,0,0,0
- 7190 VDU 23,219,120,120,120,127,127,127,0,0,23,220,0,0,0,254,254,254,0,0
- 7200 REM ASSIGN I to CHARS.
- 7210 VDU 23,221,127,127,127,3,3,3,3,3,23,222,254,254,254,192,192,192,192,192
- 7220 VDU 23,223,3,3,3,127,127,127,0,0,23,224,192,192,192,254,254,254,0,0
- 7230 REM ASSIGN H to CHARS.
- 7240 VDU 23,225,120,120,120,120,120,120,127,127,23,226,6,6,30,30,30,30,254,254
- 7250 VDU 23,227,127,127,120,120,120,120,96,96,23,228,254,254,30,30,30,30,0,0
- 7260 REM ASSIGN T to CHARS.
- 7270 VDU 23,229,127,127,127,3,3,3,3,3,23,230,254,254,254,192,192,192,192,192
- 7280 VDU 23,231,3,3,3,3,3,3,0,0,23,232,192,192,192,192,192,192,192,192
- 7290 :
- 7300 REM HUD CHARS.
- 7310 VDU 23,237,255,255,192,192,192,192,192,192 : REM TOP LEFT CORNER.
- 7320 VDU 23,238,255,255,3,3,3,3,3,3 : REM TOP RIGHT CORNER.
- 7330 VDU 23,239,192,192,192,192,192,192,255,255 : REM BOT LEFT CORNER.
- 7340 VDU 23,240,3,3,3,3,3,3,255,255 : REM BOT RIGHT CORNER.
- 7350 VDU 23,241,255,255,0,0,0,0,0,0 : REM TOP STRAIGHT.
- 7360 VDU 23,242,0,0,0,0,0,0,255,255 : REM BOT STRAIGHT.
- 7370 VDU 23,243,192,192,192,192,192,192,192,192 : REM LEFT STRAIGHT.
- 7380 VDU 23,244,3,3,3,3,3,3,3,3 : REM RIGHT STRAIGHT.
- 7390 :
- 7400 ENDPROC : REM END LOAD_CHARS.
- 7410 :
- 8000 DEF PROC_LOAD_VARS : REM **** LOAD_VARS *****
- 8010 REM GIVE COLOURS A NAME.
- 8020 COLBLACK% = 0
- 8030 COLRED% = 1
- 8040 COLGREEN% = 2
- 8050 COLYELLOW% = 3
- 8060 COLBLUE% = 4
- 8070 COLMAGENTA% = 5
- 8080 COLCYAN% = 6
- 8090 COLWHITE% = 7
- 8100 COLINTRED% = 9
- 8110 COLINTGREEN% = 10
- 8120 COLINTYELLOW% = 11
- 8130 COLINTBLUE% = 12
- 8140 COLINTMAGENTA% = 13
- 8150 COLINTCYAN% = 14
- 8160 COLINTWHITE% = 15
- 8170 mode% = 0 : REM SET MODE HERE.
- 8180 RT% = 31 : REM SET RIGHT TEXT.
- 8190 LT% = 2 : REM SET LEFT TEXT.
- 8200 T1X = 0 : REM TITLE TEXT AGON X.
- 8210 T1Y = 0 : REM TITLE TEXT AGON Y.
- 8220 T2X = 0 : REM TITLE TEXT LIGHT X.
- 8230 T2Y = 0 : REM TITLE TEXT LIGHT Y.
- 8240 :
- 8500 ENDPROC : REM END LOAD_VARS.
- 8510 :
- 9000 DEF PROC_DRAW_AGON(T1X,T1Y) : REM ****** DRAW_AGON ******
- 9010 REM FROM CUSTOM CHARS DEFINED PREVIOUSLY DISPLAYED AS (2x2) CHARS.
- 9020 REM AGON.
- 9030 VDU 31,T1X,T1Y,27,201,27,202,31,T1X,T1Y+1,27,203,27,204,31,T1X+2,T1Y,27,205,27,206,31,T1X+2,T1Y+1,27,207,27,208,31,T1X+4,T1Y,27,209,27,210
- 9040 VDU 31,T1X+4,T1Y+1,27,211,27,212,31,T1X+6,T1Y,27,213,27,214,31,T1X+6,T1Y+1,27,215,27,216
- 9050 ENDPROC : REM END DRAW_AGON.
- 9060 :
- 9070 DEF PROC_DRAW_LIGHT(T2X,T2Y) : REM ****** DRAW_LIGHT ******
- 9080 REM FROM CUSTOM CHARS DEFINED PREVIOUSLY DISPLAY L (2x2) CHARS.
- 9090 REM LIGHT.
- 9100 VDU 31,T2X,T2Y,27,217,27,218,31,T2X,T2Y+1,27,219,27,220,31,T2X+2,T2Y,27,221,27,222,31,T2X+2,T2Y+1,27,223,27,224,31,T2X+4,T2Y,27,205,27,206
- 9110 VDU 31,T2X+4,T2Y+1,27,207,27,208,31,T2X+6,T2Y,27,225,27,226,31,T2X+6,T2Y+1,27,227,27,228,31,T2X+8,T2Y,27,229,27,230,31,T2X+8,T2Y+1,27,231,27,232
- 9120 ENDPROC : REM END DRAW_LIGHT.
- 9130 :
- 9200 DEF PROC_DRAW_HUD : REM ***** DRAW_HUD *******
- 9210 VDU 31,0,0,27,237 : REM TL CORNER.
- 9220 FOR TB = 1 TO 78
- 9230 VDU 31,TB,0,27,241 : REM TOP BORDER.
- 9240 NEXT TB
- 9250 VDU 31,79,0,27,238 : REM TR CORNER.
- 9260 FOR LB = 1 TO 57
- 9270 VDU 31,0,LB,27,243 : REM LEFT BORDER.
- 9280 NEXT LB
- 9290 FOR RB = 1 TO 57
- 9300 VDU 31,79,RB,27,244 : REM RIGHT BORDER.
- 9310 NEXT RB
- 9320 VDU 31,0,57,27,239 : REM BL CORNER.
- 9330 FOR BB = 1 TO 78
- 9340 VDU 31,BB,57,27,242 : REM BOTTOM BORDER.
- 9350 NEXT BB
- 9360 VDU 31,79,57,27,240 : REM BR CORNER.
- 9400 ENDPROC : REM END DRAW_HUD.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement