home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
FM Towns: Free Software Collection 5
/
FREESOFT.BIN
/
fb386
/
t_slot3
/
slot3.bas
< prev
next >
Wrap
BASIC Source File
|
1992-08-19
|
10KB
|
262 lines
1000 '********************************************************************
1010 '** **
1020 '** スロットマシーン「ボル」3号 **
1030 '** F-BASIC386 V1.1 L21D By.佐藤 智和 **
1040 '** **
1050 '********************************************************************
1060 'SPRITE 0
1070 '0~124 チェリー 7 タウンズ ベル すいか 爆弾 みかん BIG
1080 SCREEN@2:CLS:PALETTE 255,0,1
1090 FOR K=0 TO 360 STEP 20
1100 S=3.14!*K/180:X=SIN(S)*128:Y=COS(S)*30
1110 CIRCLE(X+320,Y+256),30,7,,,,F
1120 NEXT
1130 CIRCLE(320,256),80,7,.5!,,,F
1140 SYMBOL(192,240),"MARUTOMO",2,2,7,,XOR,1
1150 FOR K=0 TO 255 STEP 3
1160 PALETTE 255,[K,K,K],1
1170 NEXT
1180 WAIT 100
1190 FOR K=255 TO 0 STEP -3
1200 PALETTE 255,[K,K,K],1
1210 NEXT
1220 CLS:PALETTE 255,7,1
1230 '本体
1240 CLEAR ,,256,500000:DEFINT A-Y:ON ERROR GOTO *ERR
1250 DIM GE(255),MARK(8191),KATA(48),ENA(3,5),GA(61440),賞金(13)
1260 MODE=8:DEF SPRITE 99,0:LOAD@"FM_1.FMB"
1270 SCREEN@1:SPRITE ON:SPRITE SCREEN (32,0)
1280 VIEW(0,0)-(511,255):WINDOW(0,0)-(511,255)
1290 LOAD@"SLOT1.TIF",(320,0)
1300 GET@(384,0)-(448,127),MARK,[255,0,255]
1310 PUT@(384,0)-(448,127),MARK,PSET,[0,0,0,1]
1320 GET@A(320,0)-(351,127),MARK
1330 GET@A(352,0)-(383,127),MARK,4096
1340 FOR X1=0 TO 3
1350 FOR Y1=0 TO 7
1360 FOR X2=0 TO 1
1370 GET@A(320+X1*32+X2*16,Y1*16)-(335+X1*32+X2*16,Y1*16+15),GE
1380 DEF SPRITE 0,(X2+Y1*2+X1*16)*4,GE,1
1390 NEXT X2,Y1,X1
1400 DEF SPRITE 1,0,(0,511-16),128,2,2
1410 CLS:LOAD@"SLOT32K.TIF",(32,16)
1420 FOR Y1=0 TO 1:FOR X1=0 TO 2
1430 FOR Y2=0 TO 3:FOR X2=0 TO 1
1440 X3=X1*64+80+X2*16:Y3=Y1*192-16+Y2*16
1450 GET@A(X3,Y3-16)-(X3+15,Y3+15-16),GE
1460 DEF SPRITE 0,256+4*(X2+Y2*2+X1*8+Y1*24),GE,1
1470 NEXT X2,Y2
1480 X3=X1*64+48:Y3=Y1+Y1*191+480 AND 511
1490 DEF SPRITE 1,6+J*8,(X3,Y3),256+4*(X1*8+Y1*24),2,4
1500 SPRITE 0,6+J*8,1
1510 J=J+1
1520 NEXT X1,Y1
1530 GET@A(0,0)-(15,15),GA
1540 FOR I=0 TO 9:DEF SPRITE 0,I*4+600,GA,1:NEXT
1550 DEF SPRITE 1,54,(224,144-16),192,2,2
1560 DEF SPRITE 1,58,(232,100-16),176,2,2
1570 DEF SPRITE 1,62,( 48,240-16),600,10,1
1580 DEF SPRITE 1,4,(120,184-16),148,1,1
1590 DEF SPRITE 1,5,(40,184-16),144,1,1
1600 SPRITE 0,4,1
1610 SPRITE 0,5,1
1620 SPRITE 0,54,1:SPRITE 0,62,1:I=0
1630 RESTORE 1740
1640 FOR X1=48 TO 239 STEP 64:FOR Y1=0 TO 511 STEP 32
1650 READ KATA(I/4)
1660 DEF SPRITE 1,100+I,(X1,(Y1-16) AND 511),KATA(I/4)*16,2,2,1
1670 SPRITE 0,100+I,1:I=I+4
1680 NEXT:NEXT
1690 FOR X1=0 TO 13
1700 READ 賞金(X1)
1710 NEXT
1720 COIN=30:GOSUB *SYCOIN
1730 '0>チェリー 1>7 2>タウンズ 3>ベル 4>すいか 5>爆弾 6>みかん 7>BIG
1740 DATA 5,6,2,1,2,3,4,5,6,7,0,6,5,4,3,4
1750 DATA 0,3,6,1,6,7,3,4,5,3,6,2,4,6,4,5
1760 DATA 6,2,7,1,6,5,6,2,3,0,4,3,7,5,6,4
1770 '賞金 ,77BI,ベベBI,すすBI,ババBI,チェ*2,**
1780 DATA 7,50,20,18,13,10,8,30,25 ,15 ,9 ,12 ,6 ,3
1790 MOUSE 0:MOUSE 4,0,32,240,239
1800 MOUSE 2,A$,A$,8,1:SPRITE 0,0,1:MOUSE 1,128,128,0
1810 XX=X:YY=Y:X=MOUSE(0):Y=MOUSE(1):M1=MOUSE(2,0):M2=MOUSE(2,1)
1820 SPRITE 6,0,X-XX,Y-YY
1830 IF M1=0 THEN 1890
1840 IF X>215 AND Y>32 AND Y<64 THEN *END
1850 IF X>215 AND Y>64 AND Y<96 THEN GOSUB *HELP
1860 IF X>215 AND Y>96 AND Y<128 THEN GOSUB *CDPLAY
1870 IF X>220 AND Y>132 AND Y<164 AND C1<>3 THEN GOSUB *COIN
1880 IF X<24 AND Y>208 AND C1 THEN *MAWARU
1890 IF X>220 AND Y>132 AND Y<164 THEN SPRITE 1,0,176 ELSE SPRITE 1,0,128
1900 GOTO 1810
1910 *COIN
1920 IF COIN<=0 THEN RETURN
1930 SPRITE 0,58,1:SPRITE 1,0,128
1940 FOR I=0 TO 46:SPRITE 6,58,0,1:WAIT 1:NEXT:SPRITE 6,58,0,-47
1950 SPRITE 0,58,0
1960 PLAY "V8@65O4C32O6F8","V8@65O4E32O6A8"
1970 COIN=COIN-1:C1=C1+1:CO1=223:CO2=255:CO3=0:GOSUB *SYCOIN
1980 C3=4-C1
1990 PAINT@(52,C3*32+7-16),7-NN*7
2000 PAINT@(52,192-C3*32+7-16),7-NN*7
2010 PAINT@(52,C3*32+24-16),7-NN*7
2020 PAINT@(52,192-C3*32+24-16),7-NN*7
2030 FOR I=0 TO 1
2040 IF C1=3 THEN C2=I*4
2050 IF C1=2 THEN C2=1+I*2
2060 IF C1=1 THEN C2=2
2070 PAINT@(33+32,C2*32+48-16),[CO1,CO2,CO3]
2080 IF C2=0 OR C2=1 THEN C2=1-C2
2090 IF C2=3 OR C2=4 THEN C2=7-C2
2100 PAINT@(81+48,C2*16+80-16),[CO1,CO2,CO3]
2110 IF C2=1 OR C2=3 THEN C2=4-C2
2120 PAINT@(190,C2*16+80-16),[CO1,CO2,CO3]
2130 IF C2<>1 AND C2<>3 THEN PAINT@(245,C2*16+64),[CO1,CO2,CO3]:GOTO 2150
2140 C2=C2/3:PAINT@(251,64+96*C2-16),[CO1,CO2,CO3]
2150 IF CCC2 THEN C2=CC2
2160 NEXT
2170 IF NN=0 THEN WHILE MOUSE(2,0)=-1:WEND
2180 RETURN
2190 *MAWARU
2200 FOR FUJ=0 TO 2
2210 LINE(80+64*FUJ,32)-STEP(31,127),PSET,7,BF
2220 NEXT
2230 X2=2:SPRITE 6,5,32:SPRITE 0,4,0
2240 Y1=0:X1=16:XX=SPRITE(0,6):YY=SPRITE(0,7)
2250 SPRITE 6,,,Y1
2260 Y1=Y1+MODE AND 511
2270 SPRITE 6,5,X1:X2=X2+1
2280 IF X2=0 THEN X1=16
2290 IF X2=10 THEN X1=-16:X2=-10
2300 IF X2=-6 OR X2=4 THEN SPRITE 0,4,1 ELSE SPRITE 0,4,0
2310 XX=X:YY=Y:X=MOUSE(0):Y=MOUSE(1):M1=MOUSE(2,0)
2320 SPRITE 6,0,X-XX,Y-YY
2330 IF M1=0 OR Y<213 THEN 2380
2340 IF X> 32 AND X< 80 AND ST(0)=0 THEN ST=0:GOSUB *STOP
2350 IF X> 98 AND X<144 AND ST(1)=0 THEN ST=1:GOSUB *STOP
2360 IF X>160 AND X<208 AND ST(2)=0 THEN ST=2:GOSUB *STOP
2370 IF ST(3) THEN *HANDAN
2380 GOTO 2250
2390 *STOP
2400 PLAY "V8@65O3C32O5F8","V8@65O3E32O5A8"
2410 ST(ST)=1:LL=0
2420 FOR I=0 TO 15
2430 SPRITE 0,100+I*4+ST*64,0
2440 X3=ST*64+80:Y3=SPRITE(100+I*4+ST*64,7)+INT(Y1/32)*32 AND 511
2450 IF I=0 THEN ENB(ST)=INT(Y1/32)*32
2460 IF Y3<0 OR Y3>148 THEN 2500
2470 PUT@A(X3,Y3)-(X3+31,Y3+31),MARK,,,,,KATA(ST*16+I)*1024
2480 IF Y3<30 OR Y3>140 THEN 2500
2490 ENA(ST,Y3/32-1)=KATA(ST*16+I):LL=LL+1
2500 NEXT
2510 IF ST(0) AND ST(1) AND ST(2) THEN ST(3)=1
2520 RETURN
2530 *PPP
2540 FOR I=0 TO 9
2550 SPRITE 0,4,1:WAIT 10:SPRITE 0,4,0:WAIT 10:COIN=COIN+1:GOSUB *SYCOIN
2560 PLAY "V8@65O5E32C8","V8@65O5G32E8"
2570 NEXT
2580 PLAY OFF
2590 RETURN
2600 *RETU
2610 SPRITE 6,,,0
2620 FOR I=0 TO 2
2630 FOR I2=0 TO 15
2640 SPRITE 6,100+I2*4+I*64,0,ENB(I)
2650 SPRITE 0,100+I2*4+I*64,1
2660 NEXT:NEXT
2670 C1=0:ST(0)=0:ST(1)=0:ST(2)=0:ST(3)=0
2680 X1=0:Y1=0:X2=0:Y2=0:X3=0:Y3=0:SPRITE 0,5,1
2690 SPRITE 6,5,40-SPRITE(5,6)
2700 FOR C1=1 TO 3:NN=1:CO1=128:CO2=255:CO3=128:GOSUB 1980:NEXT
2710 C1=0:NN=0
2720 GOTO 1810
2730 *SYCOIN
2740 IF SY THEN 2770
2750 IF COIN>999 THEN SY=1
2760 LINE(259,205-16)-(284,220-16),PSET,0,BF
2770 IF SY THEN SYMBOL(264,206-16),"∽",1,1,6:COIN=1000:RETURN
2780 SYMBOL(259,206-16),RIGHT$(" "+STR$(COIN),3),1,1,4
2790 RETURN
2800 *金
2810 CC2=C2:CCC2=1
2820 FOR I2=0 TO 賞金(中(2))-1
2830 PLAY "V8@65O4E32C8","V8@65O5G32E8"
2840 CO1=255:CO2=0:CO3=255:COIN=COIN+1:C1=0:NN=1:C2=CC2
2850 GOSUB 2030
2860 CO1=240:CO2=255:CO3=0:GOSUB *SYCOIN:C2=CC2
2870 GOSUB 2030
2880 NEXT
2890 PLAY OFF:CCC2=0
2900 RETURN
2910 *HANDAN
2920 LL=0:SPRITE 0,5,0
2930 IF X2=-6 OR X2=4 THEN GOSUB *PPP
2940 IF C1=0 THEN PLAY "V8@11O4C4":GOTO *RETU
2950 左(1)=ENA(0,1):左(2)=ENA(0,2):左(3)=ENA(0,3)
2960 中(1)=ENA(1,1):中(2)=ENA(1,2):中(3)=ENA(1,3)
2970 右(1)=ENA(2,1):右(2)=ENA(2,2):右(3)=ENA(2,3)
2980 左=2:中=2:右=2:C2=2:CCC1=C1:GOSUB *KEN:C1=CCC1
2990 IF C1=1 THEN 3050
3000 左=1:中=1:右=1:C2=1:CCC1=C1:GOSUB *KEN
3010 左=3:中=3:右=3:C2=3:GOSUB *KEN:C1=CCC1
3020 IF C1=2 THEN 3050
3030 左=1:中=2:右=3:C2=0:CCC1=C1:GOSUB *KEN
3040 左=3:中=2:右=1:C2=4:GOSUB *KEN:C1=CCC1
3050 IF 当た=0 THEN PLAY "V8@11O4C4" ELSE 当た=0
3060 GOTO *RETU
3070 '0>チェリー 1>7 2>タウンズ 3>ベル 4>すいか 5>爆弾 6>みかん 7>BIG
3080 *KEN
3090 IF 左(左)=中(中) AND 中(中)=右(右) THEN 当た=1:GOSUB *金:GOTO 3150
3100 IF 左(左)=1 AND 中(中)=1 AND 右(右)=7 THEN 当た=1:中(2)=8:GOSUB *金
3110 IF 左(左)=5 AND 中(中)=5 AND 右(右)=7 THEN 当た=1:中(2)=11:GOSUB *金
3120 IF 左(左)=3 AND 中(中)=3 AND 右(右)=7 THEN 当た=1:中(2)=9:GOSUB *金
3130 IF 左(左)=4 AND 中(中)=4 AND 右(右)=7 THEN 当た=1:中(2)=10:GOSUB *金
3140 IF 左(左)=0 AND 中(中)=0 THEN 当た=1:中(2)=12:GOSUB *金
3150 RETURN
3160 *CDPLAY
3170 CDD=1-CDD
3180 IF CDD=1 THEN CD PLAY
3190 IF CDD=0 THEN CD STOP
3200 RETURN
3210 *ERR
3215 SCREEN@1
3220 IF ERL=3180 THEN RESUME 3200
3230 IF ERL=1260 THEN RESUME NEXT
3240 SPRITE OFF:PRINT ERL;"行でエラー";ERR;"発生":BEEP
3250 END
3260 *END
3270 CLS
3280 SPRITE OFF:MOUSE 5
3290 END
3300 *HELP
3310 SPRITE 0,0,0:SPRITE 0,4,0:SPRITE 0,5,0:SPRITE 0,62,0
3320 SPRITE 0,54,0:SPRITE 0,58,0:SPRITE 6,,250
3330 FOR I=0 TO 5:SPRITE 0,6+I*8,0:NEXT
3340 GET@A(32,0)-(287,239),GA
3350 CLS
3360 FOR I1=0 TO 6
3370 FOR I2=0 TO 2
3380 PUT@A(I2*30+30,I1*31+16)-(I2*30+61,I1*31+47),MARK,,.8!,.8!,,1024*I1
3390 SYMBOL(120,I1*32+16),RIGHT$(STR$(賞金(I1)),2)+" コイン",.5!,1,7
3400 NEXT:NEXT
3410 P(0)=7:P(1)=1:P(2)=3:P(3)=4:P(4)=5
3420 FOR I1=0 TO 4
3430 FOR I2=0 TO 2
3440 IF I2=2 THEN PL=7*1024 ELSE PL=1024*P(I1)
3450 PUT@A(160+I2*30,I1*31+16)-(191+I2*30,I1*31+47),MARK,,.8!,.8!,,PL
3460 SYMBOL(250,I1*31+16),RIGHT$(STR$(賞金(I1+7)),2)+" コイン",.5!,1,7
3470 NEXT:NEXT
3480 PUT@A(160,I1*31+16)-(191,I1*31+47),MARK,,.8!,.8!
3490 PUT@A(190,I1*31+16)-(221,I1*31+47),MARK,,.8!,.8!
3500 LINE(220,I1*31+16)-(245,I1*31+41),PSET,7,BF
3510 SYMBOL(250,I1*31+16),RIGHT$(STR$(賞金(I1+8)),2)+" コイン",.5!,1,7
3520 SYMBOL(160,210),"もどるときは左クリック",.9!,1,7,,,9
3530 WHILE MOUSE(2,0)=0:WEND
3540 WHILE MOUSE(2,0)=-1:WEND
3550 CLS:PUT@A(32,0)-(287,239),GA
3560 SPRITE 0,0,1:SPRITE 0,4,1:SPRITE 0,5,1:SPRITE 0,62,1
3570 SPRITE 0,54,1:SPRITE 0,58,0:SPRITE 6,,0
3580 FOR I=0 TO 5:SPRITE 0,6+I*8,1:NEXT
3590 RETURN