Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #LANG "deprecated"
- '#define __play__
- '#lang "fb"
- 'option gosub
- #ifndef __play__
- defint a-z
- #endif
- #ifdef __play__
- #include once "fbPlay.bas"
- #endif
- DIM As Integer GR(10,10)
- DIM As Integer SP(10,10)
- DIM As Integer SW(10,10)
- DIM As Integer SJ(10,10)
- DIM As Integer CL(20,20)
- DIM As Integer BX(10,10)
- DIM As Integer SH(20,20)
- DIM As Integer BB(10,10)
- DIM As Integer QW(30,30)
- DIM As Integer BM(20,20)
- DIM As Integer EN(10,10)
- redim shared key_map(0 to 255) as string
- dim shared as long key_ct=0,LF=0,D=0,A=0,R=0,A1=0,D1=0,A2=0,D2=0,DD=0,AA=0,DT=0,AT=0,A3=0,D3=0,D6=0,DR=0,A6=0,AR=0,A7=0,D7=0,IV=0,A4=0,D4=0,CT=0
- const key_quit=1
- const key_up=2
- const key_left=3
- const key_down=4
- const key_right=5
- const key_items=6
- const key_warp=7
- dim as long t=0
- dim as string C=""
- type screentype
- X as long
- Y as long
- Depth as long
- Pages as long
- end type
- dim Resolution as screentype
- Resolution.X=640
- Resolution.Y=480
- Resolution.Depth=4
- Resolution.Pages=8
- restore keys
- read key_ct
- for t=1 to key_ct
- read key_map(t)
- key_map(t)=ucase(key_map(t))
- next t
- keys:
- data 6
- data "Q"
- data "W"
- data "A"
- data "S"
- data "D"
- data "I"
- data "W"
- '0
- REM "SPARKED! BY TIM KEAL(13)"
- 'defint a-z
- 'SCREEN 0'
- ScreenRes Resolution.X,Resolution.Y,Resolution.Depth,Resolution.Pages
- '
- ':
- 'KEY OFF
- ':
- WIDTH 80
- ':
- COLOR 15,1
- ',1
- ':
- CLS
- ':
- RANDOMIZE TIMER
- LOCATE 5,34
- ':
- PRINT"S P A R K E D !"
- LOCATE 7,28
- ':
- PRINT"LEVEL 04: SPACE PAD"
- LOCATE 9,28
- ':
- PRINT"RATING: AS HARD AS ICE"
- LOCATE 15,1
- ':
- PRINT"PUSH THE <ENTER> KEY TO START"
- '1080
- ':
- do while INKEY<>CHR(13)
- ':
- loop
- ' THEN
- 'GOTO 1095
- 'GOTO 1080
- CLS
- 'DIM GR(10,10)
- ':
- 'DIM SP(10,10)
- 'DIM SW(10,10)
- ':
- 'DIM SJ(10,10)
- 'DIM CL(20,20)
- ':
- 'DIM BX(10,10)
- 'DIM SH(20,20)
- ':
- 'DIM BB(10,10)
- 'DIM QW(30,30)
- ':
- 'DIM BM(20,20)
- 'DIM EN(30,30)
- ':
- 'DIM WP(20,20)
- LF=10
- FOR D=1 TO 10
- FOR A=1 TO 10
- READ R
- GR(A,D)=R
- NEXT A
- NEXT D
- SCREEN 1
- ':
- CLS
- FOR D=1 TO 10
- FOR A=1 TO 10
- PSET(A,D),GR(A,D)
- NEXT A
- NEXT D
- A1=1
- ':
- D1=1
- ':
- A2=10
- ':
- D2=10
- GET(A1,D1)-(A2,D2),SP
- ':
- CLS
- FOR DD=1 TO 10
- FOR AA=1 TO 10
- READ R
- SJ(AA,DD)=R
- NEXT AA
- NEXT DD
- DT=20
- ':
- AT=20
- FOR DD=1 TO 10
- FOR AA=1 TO 10
- PSET(AA,DD),SJ(AA,DD)
- NEXT AA
- NEXT DD
- GET(A1,D1)-(A2,D2),SW
- ':
- CLS
- A1=1
- ':
- D1=1
- ':
- A2=10
- ':
- D2=10
- CIRCLE(11,11),10,2
- D1=1
- ':
- A1=1
- ':
- A2=21
- ':
- D2=20
- GET(A1,D1)-(A2,D2),CL
- ':
- CLS
- FOR DD=1 TO 10
- FOR AA=1 TO 10
- READ R
- BX(AA,DD)=R
- NEXT AA
- NEXT DD
- A1=1
- ':
- D1=1
- ':
- A2=10
- ':
- D2=10
- FOR DD=1 TO 10
- FOR AA=1 TO 10
- READ R
- BX(AA,DD)=R
- PSET(AA,DD),BX(AA,DD)
- NEXT AA
- NEXT DD
- GET(A1,D1)-(A2,D2),BX
- ':
- CLS
- A1=1
- ':
- D1=1
- ':
- A2=10
- ':
- D2=10
- FOR DD=1 TO 10
- FOR AA=1 TO 10
- READ R
- SH(AA,DD)=R
- PSET(AA,DD),SH(AA,DD)
- NEXT AA
- NEXT DD
- GET(A1,D1)-(A2,D2),SH
- ':
- CLS
- A1=1
- ':
- D1=1
- ':
- A2=10
- ':
- D2=10
- FOR DD=1 TO 10
- FOR AA=1 TO 10
- READ R
- BB(AA,DD)=R
- PSET(AA,DD),BB(AA,DD)
- NEXT AA
- NEXT DD
- GET(A1,D1)-(A2,D2),BB
- ':
- CLS
- A1=1
- ':
- D1=1
- ':
- A2=21
- ':
- D2=20
- CIRCLE(11,11),10,1
- PAINT(11,11),1
- GET(A1,D1)-(A2,D2),BM
- ':
- CLS
- A1=1
- ':
- D1=1
- ':
- A2=10
- ':
- D2=10
- FOR DD=1 TO 10
- FOR AA=1 TO 10
- READ R
- EN(AA,DD)=R
- PSET(AA,DD),EN(AA,DD)
- NEXT AA
- NEXT DD
- GET(A1,D1)-(A2,D2),EN
- ':
- CLS
- GOTO 14800
- DATA 0,0,3,3,3,3,3,3,0,0
- DATA 0,3,0,0,1,1,0,0,3,0
- DATA 0,3,0,1,1,1,1,0,3,0
- DATA 0,3,0,1,1,1,1,0,3,0
- DATA 0,0,3,3,3,3,3,3,0,0
- DATA 0,0,0,0,1,1,0,0,0,0
- DATA 0,0,0,1,0,0,1,0,0,0
- DATA 0,0,0,1,0,0,1,0,0,0
- DATA 0,0,2,2,0,0,2,2,0,0
- DATA 0,0,0,0,0,0,0,0,0,0
- DATA 0,0,3,3,3,3,3,3,0,0
- DATA 0,3,0,0,1,1,0,0,3,0
- DATA 0,3,0,1,1,1,1,0,3,0
- DATA 0,3,0,1,1,1,1,0,3,0
- DATA 0,0,3,3,3,3,3,3,0,0
- DATA 0,0,0,1,1,1,1,0,0,0
- DATA 0,0,1,0,0,0,0,1,0,0
- DATA 0,0,1,0,0,0,0,1,0,0
- DATA 0,2,2,0,0,0,0,2,2,0
- DATA 0,0,0,0,0,0,0,0,0,0
- DATA 0,1,1,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READ R
- QW(AR,DR)=R
- IF R=1 THEN
- PUT(A6,D6),BX
- END IF
- IF R=2 THEN
- PUT(A6,D6),BX
- END IF
- IF R=3 THEN
- PUT(A6,D6),SH
- END IF
- IF R=4 THEN
- PUT(A6,D6),BB
- END IF
- IF R=5 THEN
- PUT(A6,D6),BX
- END IF
- IF R=8 THEN
- PUT(A6,D6),BX
- END IF
- IF R=7 THEN
- PUT(A6,D6),EN
- END IF
- A6=A6+10
- ':
- NEXT AR
- ':
- A6=0
- D6=D6+10
- ':
- NEXT DR
- 'RETURN
- 15000 D7=D1*10
- ':
- A7=A1*10
- PUT(D7,A7),SP
- A3=A7-5
- ':
- D3=D7-5
- IF IV=3 THEN
- PUT(D3,A3),CL
- END IF
- 'FOR T=1 TO 100
- ':
- 'NEXT T
- ':
- PUT(D7,A7),SP,XOR
- ':
- IF IV=3 THEN
- PUT(D3,A3),CL,XOR
- END IF
- D4=INT(18*RND)
- ':
- A4=INT(30*RND)
- D4=(D4*10)
- ':
- A4=(A4*10)
- CT=CT+1
- ':
- IF CT>=200 THEN
- CT=20
- END IF
- IF IV=0 THEN
- LOCATE 1,30
- ':
- PRINT"---------"
- END IF
- IF IV=2 THEN
- LOCATE 1,30
- ':
- PRINT"SHIELD "
- END IF
- IF IV=3 THEN
- LOCATE 1,30
- ':
- PRINT"SHIELD ON"
- END IF
- IF IV=4 THEN
- LOCATE 1,30
- ':
- PRINT"BOMBS "
- END IF
- IF IV=5 THEN
- LOCATE 1,30
- ':
- PRINT"BOMBS ON "
- END IF
- LOCATE 1,3
- ':
- PRINT"LIFE:";LF
- 'END IF
- IF QW(D1+1,A1+1)=5 THEN
- LOCATE 1,3
- ':
- PRINT"(W)ARP TO NEXT LEVEL"
- END IF
- IF LF<0 THEN
- LOCATE 1,3
- ':
- PRINT"YOU LOSE!"
- END IF
- 15943
- C=INKEY
- IF QW(D1+1,A1+1)=5 AND ucase(C)=ucase(key_map(key_warp)) THEN
- RUN"SPARKY05"
- END IF
- IF LF<0 AND C=ucase(key_map(key_quit)) THEN
- WIDTH 80
- ':
- END
- END IF
- IF LF<0 AND ucase(C)<>ucase(key_map(key_quit)) THEN
- GOTO 15943
- END IF
- IF QW(D1+1,A1+1)=5 AND ucase(C)<>ucase(key_map(key_warp)) THEN
- GOTO 15943
- END IF
- IF QW(D1+1,A1+1)=3 THEN
- IV=3
- ':
- QW(D1+1,A1+1)=0
- #ifdef __play__
- PLAY"O1 C32"
- #endif
- PUT(D7,A7),SH,XOR
- END IF
- 'END IF
- IF QW(D1+1,A1+1)=8 THEN
- IV=0
- #ifdef __play__
- PLAY"O3 C32"
- #endif
- END IF
- IF QW(D1+1,A1+1)=4 THEN
- IV=5
- ':
- QW(D1+1,A1+1)=0
- #ifdef __play__
- PLAY"O1 C32"
- #endif
- PUT(D7,A7),BB,XOR
- END IF
- IF QW(D1+1,A1+1)=5 AND IV=5 THEN
- PUT(D3,A3),BM
- #ifdef __play__
- PLAY"O5 A32"
- #endif
- PUT(D3,A3),BM,XOR
- END IF
- IF QW(D1+1,A1+1)=7 THEN
- LF=LF+10
- #ifdef __play__
- PLAY"O4 A32"
- #endif
- PUT(D7,A7),EN,XOR
- QW(D1+1,A1+1)=0
- END IF
- IF QW(D1+1,A1+1)=6 AND IV=5 THEN
- PUT(D3,A3),BM
- #ifdef __play__
- PLAY"O5 A32"
- #endif
- PUT(D3,A3),BM,XOR
- QW(D1+1,A1+1)=0
- END IF
- IF QW(D1+1,A1+1)=6 AND IV<>5 AND IV<>3 THEN
- #ifdef __play__
- PLAY"O5 A32"
- #endif
- LF=LF-1
- END IF
- IF UCASE(C)=key_map(key_quit) THEN
- WIDTH 80
- CLS
- LOCATE 1,1
- END
- END IF
- IF UCASE(C)=key_map(key_up) AND A1>1 AND QW(D1+1,A1)<>1 AND QW(D1+1,A1)<>9 THEN
- A1=A1-1
- GOTO 16900
- END IF
- IF UCASE(C)=key_map(key_down) AND A1<16 AND QW(D1+1,A1+2)<>1 AND QW(D1+1,A1+2)<>9 THEN
- A1=A1+1
- GOTO 16900
- END IF
- IF UCASE(C)=key_map(key_right) AND D1<28 AND QW(D1+2,A1+1)<>1 AND QW(D1+2,A1+1)<>9 THEN
- D1=D1+1
- GOTO 16900
- END IF
- IF UCASE(C)=key_map(key_left) AND D1>1 AND QW(D1,A1+1)<>1 AND QW(D1,A1+1)<>9 THEN
- D1=D1-1
- GOTO 16900
- END IF
- IF UCASE(C)=key_map(key_items) AND IV=2 THEN
- IV=3
- GOTO 16900
- END IF
- IF UCASE(C)=key_map(key_items) AND IV=4 THEN
- IV=5
- GOTO 16900
- END IF
- IF UCASE(C)=key_map(key_items) AND IV=3 THEN
- IV=2
- GOTO 16900
- END IF
- IF UCASE(C)=key_map(key_items) AND IV=5 THEN
- IV=4
- GOTO 16900
- END IF
- GOTO 15000
- 16900:
- ':
- PUT(D7,A7),SW
- 'FOR T=1 TO 100
- ':
- 'NEXT T
- ':
- sleep 100
- PUT(D7,A7),SW,XOR
- GOTO 15000
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement