- ’┌──────────────────┐
- ’│シュ-ティンク゛サンフ゜ル v1.1│
- ’└──────────────────┘
- ’スフ゜ライト ワリアテ
- ’ 0〜:Г myship
- ’ 8〜:↑ myshot
- ’ 16〜:Е enemy
- ’ 24〜:↓ enshot
- ’ 64〜:● explosion
- ’ 72〜:Н boss
- @INIT ’ショキカ
- CLEAR
- UNUSED=-4096
- PHASE=0
- STAGE=1
- PHASCNT=0
- ’カ゛メン
- ACLS
- BGMPLAY 23
- VISIBLE 0,1,0,0,0,0
- VSYNC 1
- ’フ゜レイヤ-
- SCORE=0: HISCORE=0
- MYX=120 : MYY=192 : MYSPD=3
- MYCNT=0 : MYSTAT=1
- SPSET 0,288,11,0,0,1
- SPOFS 0,MYX,MYY
- SPSET 1,289,11,0,0,1
- SPOFS 1,MYX,MYY+10
- ’ショット
- MSHMAX=4
- MSHCNT=0
- DIM MYSHOTX(4),MYSHOTY(4)
- FOR I=0 TO 3
- MYSHOTX(I) = UNUSED
- MYSHOTY(I) = 0
- SPSET I+8,223,12,0,0,1
- SPOFS I+8,-16,-16
- NEXT
- ’ハイケイ
- DIM STARX(16),STARY(16)
- DIM STARSPD(16)
- FOR I=0 TO 15
- STARX(I) = RND(256)
- STARY(I) = RND(192)
- STARSPD(I) = (RND(16)+1)/4
- NEXT
- ’テキ
- DIM ENMX(8),ENMY(8),ENMCNT(8),ENMHP(8)
- GENMCNT=0 : ENMMAX=8
- FOR I=0 TO 7
- ENMX(I) = UNUSED
- ENMY(I) = 0
- ENMHP(I) = 0
- SPSET I+16,178,11,0,0,1
- SPANIM I+16,3,4,0
- SPOFS I+16,-16,-16
- NEXT
- ’テキタ゛ン
- DIM ENSHOTX(32),ENSHOTY(32),ENSHDIR(32)
- ESHTCNT=0 : ESHTMAX=32
- FOR I=0 TO 31
- ENSHOTX(I) = UNUSED
- ENSHOTY(I) = 0
- SPSET I+24,214,0,0,0,1
- SPANIM I+24,2,4,0
- SPOFS I+24,-16,-16
- NEXT
- ’ハ゛クハツ
- DIM EXPX(4),EXPY(4),EXPCNT(4)
- GEXPCNT=0 : EXPMAX=4
- FOR I=0 TO 3
- EXPX(I) = UNUSED
- EXPY(I) = 0
- EXPCNT(I) = 0
- SPSET I+64,248,0,0,0,1
- SPOFS I+64,-16,-16
- NEXT
- ’ホ゛ス
- SPSET 72,340,11,0,0,1
- SPSET 73,341,11,0,0,1
- SPSET 74,342,11,0,0,1
- SPSET 75,343,11,0,0,1
- SPOFS 72,-16,-16
- SPOFS 73,-16,-16
- SPOFS 74,-16,-16
- SPOFS 75,-16,-16
- BOSSX=UNUSED
- BOSSY=0
- BOSSHP=60
- BOSSCNT=0
- VISIBLE 1,1,0,0,1,1
- @MAIN ’メインル-フ゜
- OLDBTN = BTN
- BTN = BUTTON()
- ON PHASE GOSUB @TITLE,@GAME,@BOSSSCN,@GAMEOVER
- PHASCNT=PHASCNT+1
- VSYNC 1
- GOTO @MAIN
- @ANYBTN
- R=0
- IF OLDBTN THEN RETURN
- IF BTN THEN R=BTN
- RETURN
- @TITLE
- GOSUB @ANYBTN
- LOCATE 6,4:PRINT”┗┫┻┻┓┨┻┏┓┛ ┣━ ┗┫┃┣┳┏┫”
- LOCATE 6,5:PRINT”┫┓┻┻┃┻┻┠━┛ ┯┓ ┫┓ ┛┻┳┠”
- LOCATE 6,6:PRINT”┓┻┻┻ ┻┻ ┛ ┛ ┓┻ ┛┻ ┻”
- LOCATE 6,7:PRINT”┃━┃┃ ┃┃ ┏━┏━ ┃━ ━ ┏━”
- LOCATE 9,17:PRINT”PUSH ANY BUTTON”
- IF PHASCNT<2 THEN RETURN
- IF R THEN PHASE = 1:BGMPLAY 23:PHASCNT=0:CLS
- RETURN
- @GAME
- IF PHASCNT<60 THEN LOCATE 11,11:PRINT ”STAGE ”;STAGE
- IF PHASCNT==60 THEN LOCATE 11,11:PRINT ” ”
- GOSUB @DISPBG
- GOSUB @DISPSCOR
- GOSUB @ENSHOT
- GOSUB @ENEMY
- GOSUB @MYSHOT
- GOSUB @MYSHIP
- GOSUB @EXPLSION
- IF PHASCNT==1200 THEN GOSUB @TOBOSS
- RETURN
- @TOBOSS
- PHASE=2
- PHASCNT=0
- BGMSTOP
- BOSSX=112
- BOSSY=-32
- BOSSHP=60+STAGE
- BOSSCNT=1
- TARGETX=112
- SPCHR 72,340
- SPCHR 73,341
- SPCHR 74,342
- SPCHR 75,343
- RETURN
- @BOSSSCN
- COLOR 13
- IF PHASCNT<60 THEN LOCATE 12,11:PRINT ”WARNING!!”
- IF PHASCNT==60 THEN LOCATE 12,11:PRINT ” ”
- COLOR 0
- IF PHASCNT==120 THEN BGMPLAY 13
- GOSUB @DISPBG
- GOSUB @DISPSCOR
- GOSUB @ENSHOT
- GOSUB @ENEMY
- GOSUB @MYSHOT
- GOSUB @MYSHIP
- GOSUB @EXPLSION
- GOSUB @BOSS
- RETURN
- @BOSS ’ホ゛ス
- IF BOSSHP==0 THEN @BOSSTHRU
- ’ホ゛スノ ウコ゛キ
- IF BOSSCNT%120==0 THEN TARGETX=RND(160)+32
- IF BOSSX>TARGETX THEN BOSSX=BOSSX-1
- IF BOSSX<TARGETX THEN BOSSX=BOSSX+1
- IF BOSSCNT<80 THEN BOSSY=BOSSY+1:GOTO @BOSHTHRU
- IF BOSSCNT%30==0 THEN GOSUB @BOSSSHOT
- @BOSHTHRU
- SPOFS 72,BOSSX,BOSSY
- SPOFS 73,BOSSX+16,BOSSY
- SPOFS 74,BOSSX,BOSSY+16
- SPOFS 75,BOSSX+16,BOSSY+16
- ’ハンテイ
- FOR I=0 TO 3
- IF BOSSX-8>MYSHOTX(I) THEN @BOSSJDNX
- IF BOSSX+24<MYSHOTX(I) THEN @BOSSJDNX
- IF BOSSY-8>MYSHOTY(I) THEN @BOSSJDNX
- IF BOSSY+8<MYSHOTY(I) THEN @BOSSJDNX
- BOSSHP=BOSSHP-1
- MYSHOTY(I)=-16
- SPOFS I+8,0,-16
- BEEP 0
- IF BOSSHP==0 THEN BOSSCNT=0:BGMSTOP:SCORE=SCORE+5000
- @BOSSJDNX
- NEXT
- @BOSSTHRU
- BOSSCNT=BOSSCNT+1
- IF BOSSHP==0 THEN GOSUB @BOSSEXP
- RETURN
- @BOSSSHOT
- DIR = (RND(256)-128)*PI()/512
- FOR I=0 TO STAGE
- IF I==6 THEN RETURN
- IF ENSHOTX(ESHTCNT)!=UNUSED THEN RETURN
- ENSHOTX(ESHTCNT)=BOSSX+8
- ENSHOTY(ESHTCNT)=BOSSY+8
- ENSHDIR(ESHTCNT)=(RND(256)-128)*PI()/512
- SPOFS ESHTCNT+24,ENSHOTX(ESHTCNT),ENSHOTY(ESHTCNT)
- ESHTCNT=ESHTCNT+1
- IF ESHTCNT>=ESHTMAX THEN ESHTCNT=0
- NEXT
- RETURN
- @BOSSEXP ’ホ゛ス キエル
- IF BOSSCNT<64 THEN BEEP 13
- IF BOSSCNT==1 THEN @BOSSEXP1
- IF BOSSCNT==16 THEN @BOSSEXP2
- IF BOSSCNT==32 THEN @BOSSEXP3
- IF BOSSCNT==48 THEN @BOSSEXP4
- IF BOSSCNT==64 THEN @BOSSCLR
- IF BOSSCNT==240 THEN PHASE=1:STAGE=STAGE+1:PHASCNT=0:BGMPLAY 23
- RETURN
- @BOSSEXP1
- SPCHR 72,352
- SPCHR 73,353
- SPCHR 74,354
- SPCHR 75,355
- RETURN
- @BOSSEXP2
- SPCHR 72,356
- SPCHR 73,357
- SPCHR 74,358
- SPCHR 75,359
- RETURN
- @BOSSEXP3
- SPCHR 72,360
- SPCHR 73,361
- SPCHR 74,362
- SPCHR 75,363
- RETURN
- @BOSSEXP4
- SPCHR 72,364
- SPCHR 73,365
- SPCHR 74,366
- SPCHR 75,367
- RETURN
- @BOSSCLR
- SPOFS 72,-16,-16
- SPOFS 73,-16,-16
- SPOFS 74,-16,-16
- SPOFS 75,-16,-16
- RETURN
- @GAMEOVER
- FOR I=0 TO 99
- SPCLR I
- NEXT
- GLINE MYX+8,MYY+8,RND(256),RND(256),RND(256)
- GCIRCLE MYX+8,MYY+8,RND(100)+2,RND(256)
- LOCATE 12,12:PRINT ”GAME OVER”
- GOSUB @ANYBTN
- IF R AND 16 THEN @INIT
- RETURN
- @DISPBG ’ハイケイ ヒョウシ゛
- FOR I=0 TO 7
- GPSET STARX(I),STARY(I),0
- STARY(I)=STARY(I)+STARSPD(I)
- GPSET STARX(I),STARY(I),STAGE
- IF STARY(I) > 192 THEN GOSUB @STARINIT
- NEXT
- RETURN
- @STARINIT ’ホシノイチ モト゛ス
- STARX(I) = RND(256)
- STARY(I) = 0
- STARSPD(I) = (RND(16)+1)/4
- RETURN
- @ENSHOT ’テキ ショット
- FOR I=0 TO 31
- IF ENSHOTX(I)==UNUSED THEN @ESHTHRU
- ENSHOTX(I)=ENSHOTX(I)+SIN(ENSHDIR(I))*2
- ENSHOTY(I)=ENSHOTY(I)+COS(ENSHDIR(I))*2
- SPOFS I+24,ENSHOTX(I),ENSHOTY(I),2
- IF ENSHOTX(I)>256 THEN ENSHOTX(I)=UNUSED
- IF ENSHOTX(I)<-16 THEN ENSHOTX(I)=UNUSED
- IF ENSHOTY(I)>192 THEN ENSHOTX(I)=UNUSED
- IF ENSHOTY(I)<-16 THEN ENSHOTX(I)=UNUSED
- @ESHTHRU
- NEXT
- RETURN
- @ENEMY ’テキ
- IF PHASE!=1 THEN @GENMTHRU
- IF MAINCNTL%64 THEN @GENMTHRU
- IF ENMX(GENMCNT)!=UNUSED THEN @GENMTHRU
- ENMX(GENMCNT) = RND(240)
- ENMY(GENMCNT) = -16
- ENMHP(GENMCNT)= STAGE
- ENMCNT(GENMCNT) = 0
- SPOFS GENMCNT+16,ENMX(GENMCNT),-16
- GENMCNT=GENMCNT+1
- IF GENMCNT>=ENMMAX THEN GENMCNT=0
- @GENMTHRU
- FOR I=0 TO 7
- IF ENMX(I)==UNUSED THEN @ENMTHRU
- ENMY(I) = ENMY(I)+0.75
- ENMCNT(I) = ENMCNT(I)+1
- IF ENMY(I)>192 THEN ENMX(I)=UNUSED
- IF ENMCNT(I)%60==0 THEN GOSUB @GENMSHOT
- ’ハンテイ
- J=0
- @ENMJUDGE
- IF MYSHOTX(J)==UNUSED THEN @ENMJDGNX
- IF ENMX(I)-8>MYSHOTX(J) THEN @ENMJDGNX
- IF ENMX(I)+8<MYSHOTX(J) THEN @ENMJDGNX
- IF ENMY(I)-8>MYSHOTY(J) THEN @ENMJDGNX
- IF ENMY(I)+8<MYSHOTY(J) THEN @ENMJDGNX
- ENMHP(I)=ENMHP(I)-1
- MYSHOTY(J)=-32
- SPOFS J+8,-32,0
- IF ENMHP(I)>0 THEN @ENMJDGNX
- P1=ENMX(I):P2=ENMY(I)
- GOSUB @GENEXP
- ENMX(I)=UNUSED
- SCORE=SCORE+200
- @ENMJDGNX
- J=J+1
- IF J<=3 THEN @ENMJUDGE
- SPOFS I+16,ENMX(I),ENMY(I),2
- @ENMTHRU
- NEXT
- RETURN
- @GENMSHOT ’テキタ゛ン ハッシャ
- FOR J=0 TO STAGE
- IF J==6 GOTO @ENSHTHRU
- IF ENSHOTX(ESHTCNT)!=UNUSED THEN @ENSHTHRU
- ENSHOTX(ESHTCNT)=ENMX(I)
- ENSHOTY(ESHTCNT)=ENMY(I)
- ENSHDIR(ESHTCNT)=RND(1024)*PI()/512
- SPOFS ESHTCNT+24,ENSHOTX(ESHTCNT),ENSHOTY(ESHTCNT)
- ESHTCNT=ESHTCNT+1
- IF ESHTCNT>=ESHTMAX THEN ESHTCNT=0
- @ENSHTHRU
- NEXT
- RETURN
- @GENEXP ’ハ゛クハツ セイセイ
- BEEP 11
- EXPX(GEXPCNT)=P1
- EXPY(GEXPCNT)=P2
- EXPCNT(GEXPCNT)=0
- SPOFS GEXPCNT+64,P1,P2
- SPANIM GEXPCNT+64,4,8,1
- GEXPCNT=GEXPCNT+1
- IF GEXPCNT>=EXPMAX THEN GEXPCNT=0
- RETURN
- @MYSHOT ’シ゛キ ショット
- FOR I=0 TO 3
- IF MYSHOTX(I)==UNUSED THEN @MYSHTHR
- MYSHOTY(I) = MYSHOTY(I)-8
- SPOFS I+8,MYSHOTX(I),MYSHOTY(I),2
- IF MYSHOTY(I) < -16 THEN GOSUB @RMVMYSHT
- @MYSHTHR
- NEXT
- RETURN
- @RMVMYSHT ’ショット ケス
- MYSHOTX(I) = UNUSED
- RETURN
- @EXPLSION ’ハ゛クハツ
- FOR I=0 TO 3
- IF EXPCNT(I) == 20 THEN SPOFS I+64,-16,-16
- EXPCNT(I)=EXPCNT(I)+1
- NEXT
- RETURN
- @DISPSCOR ’スコア ヒョウシ゛
- LOCATE 8,0
- PRINT ”SCORE:”;SCORE
- RETURN
- @MYSHIP ’フ゜レイヤ-
- IF MYCNT<24 THEN MYY=MYY-2
- IF MYCNT==128 THEN MYSTAT=0
- SPCHR 0,288:SPCHR 1,289
- IF BTN AND 1 THEN MYY=MYY-MYSPD
- IF BTN AND 2 THEN MYY=MYY+MYSPD
- IF BTN AND 4 THEN MYX=MYX-MYSPD:SPCHR 0,292:SPCHR 1,293
- IF BTN AND 8 THEN MYX=MYX+MYSPD:SPCHR 0,290:SPCHR 1,291
- IF MYX<0 THEN MYX=0
- IF MYX>239 THEN MYX=239
- IF MYY<0 THEN MYY=0
- IF MYY>175 THEN MYY=175
- IF MYCNT%4 THEN @GMSHTHRU
- IF BTN AND 16 THEN GOSUB @GENMYSHT
- @GMSHTHRU
- FOR I=0 TO 31
- IF ENSHOTX(I)==UNUSED THEN @ESJDTHRU
- IF ENSHOTX(I)<MYX-8 THEN @ESJDTHRU
- IF ENSHOTX(I)>MYX+8 THEN @ESJDTHRU
- IF ENSHOTY(I)<MYY-8 THEN @ESJDTHRU
- IF ENSHOTY(I)>MYY+8 THEN @ESJDTHRU
- GMOVFLG=TRUE
- PHASE=3
- BEEP 11
- BGMPLAY 6
- SPOFS 0,-16,-16
- SPOFS 1,-16,-16
- RETURN
- @ESJDTHRU
- NEXT
- SPOFS 0,MYX,MYY-5,2
- SPOFS 1,MYX,MYY+5,2
- MYCNT=MYCNT+1
- RETURN
- @GENMYSHT ’ショット セイセイ
- M=MSHCNT
- IF MYSHOTX(M)!=UNUSED THEN RETURN
- BEEP 9
- MYSHOTX(M)=MYX
- MYSHOTY(M)=MYY
- SPOFS M+8,MYX,MYY
- MSHCNT=MSHCNT+1
- IF MSHCNT>=MSHMAX THEN MSHCNT=0
- RETURN
- ’┌─────────────────────────┐
- ’│オワリ │
- ’└─────────────────────────┘