home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
FM Towns: Free Software Collection 3
/
FREEWARE.BIN
/
fb386
/
meet
/
s_move.bas
next >
Wrap
BASIC Source File
|
1980-01-02
|
3KB
|
84 lines
1000 '
1010 ' SUPER 大戦略
1020 ' 移動型 EDITOR
1030 ' FOR FM-TOWNS
1040 '
1050 ' 注、PARAM.DATを書き込み可にしておくこと。
1060 '
1070 SCREEN@ 0:CLS:COLOR 7,0,7,0:DEFINT A-Z:WIDTH 80,25:CONSOLE 0,24,2
1080 DEF FNDATA(X,I)=ASC(MID$(MOVE$(I),X,1))
1090 DIM DAT$(10),MOVE$(13),MOVE1$(13)
1110 OPEN "PARAM.DAT" FOR INPUT AS #1
1120 DAT$(0)=INPUT$(22,1)
1130 FOR I=0 TO 13
1140 MOVE$(I)=INPUT$(16,1)
1150 NEXT
1160 DAT$(1)=INPUT$(16,1)
1170 FOR I=0 TO 13
1180 MOVE1$(I)=INPUT$(10,1)
1190 NEXT
1200 DAT$(2)=INPUT$(255,1)
1201 DAT$(3)=INPUT$(197,1):CLOSE #1
1205 CLS:X=0:Y=0
1210 PRINT" 道路平地 森 川 海 砂漠荒地 山 橋 沼地要塞都市空港首都"
1220 PRINT" SAVE"
1225 *MAIN
1230 FOR I=1 TO 13
1240 LOCATE 2,I+2:PRINT MID$(MOVE1$(I),1,4)
1250 NEXT
1251 FOR I=0 TO 13
1252 LOCATE 9+I*4,1:PRINT USING"##%";ASC(MID$(DAT$(2),I+21,1))
1253 NEXT
1260 FOR I=1 TO 13
1270 FOR J=0 TO 13
1280 LOCATE 8+J*4,I+2:A=FNDATA(J+1,I-1)
1290 IF A=255 PRINT "----" ELSE PRINT USING" # ";A
1300 NEXT
1310 NEXT
1320 K$=""
1330 WHILE K$<>" "
1340 X1=5+X*4+(X=0)*4:LOCATE X1+(Y=0),Y+2+(Y=0):PRINT"*"
1350 K$=INPUT$(1)
1360 VX=(ASC(K$)=29 AND X>0)-(ASC(K$)=28 AND X<14)
1370 VY=(ASC(K$)=30 AND Y>0)-(ASC(K$)=31 AND Y<13)
1380 IF X=0 OR Y=0 IF VX<>0 OR VY<>0 LOCATE X1+(Y=0),Y+2+(Y=0):PRINT" ":GOTO *A ELSE GOTO *A
1381 IF(VX<>0OR VY<>0)AND FNDATA(X,Y-1)<255LOCATE X1,Y+2:PRINT" ":GOTO *A
1385 IF(VX<>0OR VY<>0)AND FNDATA(X,Y-1)=255LOCATE X1,Y+2:PRINT"-"
1390 *A:X=X+VX:Y=Y+VY
1400 WEND
1420 IF X=0 AND Y=0 THEN *END
1425 IF X=0 THEN *NAME
1426 IF Y=0 THEN *DEFF
1430 LOCATE 0,18:INPUT "消費移動力(進入できないなら255)";MOV
1435 LOCATE 0,18:PRINT STRING$(255," ")
1440 IF (MOV>0 AND MOV<10)OR MOV=255 ELSE *MAIN
1450 MID$(MOVE$(Y-1),X,1)=CHR$(MOV)
1460 GOTO *MAIN
1470 *NAME
1480 LOCATE 0,18:LINE INPUT "名前(4文字)";NA$
1483 LOCATE 0,18:PRINT STRING$(255," ")
1485 IF NA$="" GOTO *MAIN
1490 NA$=LEFT$(NA$+" ",4)
1500 MID$(MOVE1$(Y),1,4)=NA$
1510 GOTO *MAIN
1520 *DEFF
1530 LOCATE 0,18:INPUT "防御";A
1535 LOCATE 0,18:PRINT STRING$(255," ")
1540 IF A<0 OR A>99 THEN *MAIN
1550 MID$(DAT$(2),X+20,1)=CHR$(A)
1560 GOTO *MAIN
2890 *END '--------------------------------------------------
2900 KILL "PARAM.DAT"
2910 OPEN "PARAM.DAT" FOR OUTPUT AS #1
2920 PRINT #1,DAT$(0);
2930 FOR I=0 TO 13
2940 PRINT #1,MOVE$(I);
2950 NEXT
2960 PRINT #1,DAT$(1);
2970 FOR I=0 TO 13
2980 PRINT #1,MOVE1$(I);
2990 NEXT
3000 PRINT #1,DAT$(2);
3001 PRINT #1,DAT$(3);
3070 CLOSE #1