Skip to content

Commit

Permalink
Reorgnized files
Browse files Browse the repository at this point in the history
  • Loading branch information
arucil committed Sep 25, 2018
1 parent fc4ed09 commit be138cf
Show file tree
Hide file tree
Showing 21 changed files with 212 additions and 3 deletions.
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/.idea
/bas
/dat
/bas_files
/dat_files
/cmake-build*
/gui_qt/build-*
/gui_qt/gui_qt.pro.user*
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
209 changes: 209 additions & 0 deletions bas_files/天虫总动员1.1.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,209 @@
0 :
1 REM [����]�ƶ�, [����]������׼��, [����]��ǰ��Ծ, [P]������Ծ, [�ո�]����, [M]��������, [L]˲��, [O]�������غ�
10 CLEAR:GRAPH
20 PRINT "���� ����ܶ�Աv1.10","1.˫�˶�ս","2.VS������"," "," ���¸�ʳ��Ʒ";
22 GOSUB 82:IF S$="b" THEN PL=0 ELSE IF S$="n" THEN PL=1 ELSE IF ASC(S$)=27 THEN END ELSE 22
24 IF PL THEN TEXT:PRINT "�Ѷ�1-5:";:INPUT "";ND:IF ND>5 OR ND<0 THEN 24
30 GRAPH:FOR N=0 TO 5:READ N$(N):HM(N)=100:H(N)=100:M(N)=50:NEXT N:P=3:L=3
40 DATA "JOE","KYO","IORI","����","����","����"
50 G=.2:PI=.017453:GOSUB 200:GOSUB 600:GOTO 100
70 R=POINT(Z,W):RETURN
71 LOCATE 1,1:PRINT SPC(20):LOCATE 1,1:RETURN
72 IF HX>1 AND HX<160 AND HY>1 AND HY<79.5 THEN BOX HX-1,HY-1,HX+1,HY+1,0,2
73 RETURN
74 X(E)=INT(X)+.5:Y(E)=INT(Y):VX(E)=VX:VY(E)=VY:D(E)=F:J(E)=J:RETURN
75 X=X(E):Y=Y(E):VX=VX(E):VY=VY(E):J=J(E):F=D(E):M=M(E):RETURN
80 IF PEEK(199)<128 THEN 73
82 S$="":S$=INKEY$:RETURN
83 BOX 1,0,159,15,1,0:RETURN
84 FOR B=1 TO 2000:NEXT B:GOSUB 80:RETURN
86 BK=1:GOSUB 700:BK=1:GOSUB 700:RETURN
87 LOCATE 1,1:PRINT N$(N);"-";Q;" HP:";(C>0)*INT(C);" ":RETURN
88 X=X(N):Y=Y(N):PF=D(N):RETURN
89 TD=TD+1:TD=TD*(TD<3):IF H(TD)<0 THEN 89 ELSE 1705
100 sleep 140:IF H(E)=-2 THEN GOSUB 600 ELSE GOSUB 560
110 IF PK THEN 1700 ELSE K=PEEK(191)
115 IF K=247 AND (M>0 OR F=-1) THEN FF=F:F=1:M=M-(M>0):GOSUB 840:JK=0:GOSUB 500:GOTO 100
120 IF K=127 AND (M>0 OR F=1) THEN FF=F:F=-1:M=M-(M>0):GOSUB 840:JK=0:GOSUB 500:GOTO 100
122 IF PEEK(195)=247 THEN PJ=-1:GOSUB 800:GOTO 100
125 IF PEEK(196)=247 THEN PJ=1:GOSUB 800:GOTO 100
142 IF PEEK(199)>128 AND PLK=0 THEN K=ASC(INKEY$)
145 IF K=111 THEN GOSUB 74:GOSUB 600
150 IF M>9 THEN IF K=13 THEN VX=F:VY=-1.1:195 ELSE IF K=112 THEN VX=F*.3:VY=-2.3:195
165 IF K=108 THEN 1600 ELSE IF K=109 THEN 180 ELSE IF K<>32 THEN 100
173 GOSUB 74:GOSUB 840:JK=0:SL=0:GOSUB 900:GOSUB 1000:GOSUB 600:sleep 500:GOTO 100
180 WA=(WA=0):GOSUB 71:IF WA THEN PRINT "����" ELSE PRINT "���Ͳ"
181 GOSUB 84:GOSUB 1200:GOTO 100
190 M=M-(M>0):GOSUB 840:JK=0:GOSUB 500:GOTO 100
195 M=M-12:GOSUB 1260:GOSUB 840:JK=0:GOSUB 520:GOTO 100
200 CLS:A=RND(1)*25:BOX 2,26+A,158,78,1,1
210 ELLIPSE RND(1)*80+40,26+A,RND(1)*60+10,RND(1)*7+3,1,RND(1)>.2
220 A=RND(1)*40+4:B=RND(1)*15+10:FOR N=1 TO A
230 ELLIPSE RND(1)*140+10,RND(1)*60,RND(1)*B+2,RND(1)*B+2,1,0:NEXT N:BOX 1,0,159,79,0,0
240 IF RND(1)>.7 THEN ELLIPSE 50+RND(1)*60,25+RND(1)*35,RND(1)*20+2,RND(1)*35+25,1,0
250 PRINT "�����ȷ��";:IF ASC(INKEY$)<>13 THEN 200
300 GOSUB 71:FOR N=0 TO 9
305 IF N>5 AND RND(1)>.8 THEN H(N)=1:GOTO 380
310 A=RND(1)*140+10:B=RND(1)*45+22:FOR C=0 TO N-1:IF ABS(X(C)-A)<12-(N>5)*8 THEN 310
320 NEXT C:Z=A:W=78:GOSUB 70:IF NOT R THEN 310
330 Z=A:W=B:GOSUB 70:IF RND(1)>.12 THEN IF NOT R THEN 370 ELSE 310
350 CIRCLE A,B,10-(N>5)*2,1,0:BOX A-4,B+3,A+4,B+4:GOSUB 390:GOTO 380
370 B=B+1:Z=A:W=B:GOSUB 70:IF NOT R THEN 370 ELSE B=B-3:GOSUB 390
380 NEXT N:SD=RND(1)>.5:RETURN
390 X=INT(A):Y=INT(B+3):X(N)=X:Y(N)=Y
394 IF N<6 THEN D(N)=SGN(RND(1)-.5):PF=D(N):GOSUB 400 ELSE GOSUB 450
395 RETURN
400 PC=1
410 PC=PC+1
420 PF=PF+(ABS(PF)<>1):IF X<1 OR Y<6 THEN 440
430 LINE X,Y-5,X+1,Y-4,PC:LINE X-1,Y-4,X,Y-3,PC:LINE X,Y-1,X,Y-2,PC:DRAW X-PF,Y-1,PC
440 PC=0:RETURN
450 BOX X(N)-1,Y(N)-5,X(N)+1,Y(N)-1,0,1:DRAW X(N),Y(N)-3:RETURN
500 A=0:FOR N=3 TO 5 STEP 2:Z=X+F:W=Y-N:GOSUB 70:A=A+R:NEXT N
510 PF=FF:GOSUB 400:PF=F:X=X+F*(FF=F)*(A=0):DI=1:GOSUB 400:GOSUB 1260:RETURN
520 VY=VY+G*(VY<2):Z=X+F:W=Y-3:GOSUB 70
525 IF R<=0 THEN 530
526 if x+f>=0 and y-1>=0 then DRAW X+F,Y-1,2
527 if x-f>=0 and y-1>=0 then DRAW X-F,Y-1,2
528 F=-F:VX=-VX*.5
530 IF VY>0 THEN 550
540 Z=X:W=Y-5:GOSUB 70:IF NOT R THEN VY=-VY
550 PF=F:GOSUB 400:X=X+VX:Y=Y+VY
555 IF X<2 OR X>158.5 OR Y>78.5-WT THEN 580 ELSE GOSUB 400
560 Z=X:W=Y:GOSUB 70:IF DI THEN VY=.8:DI=0
565 sleep 70:IF NOT R THEN 520
570 VX=0:VY=-G:Z=X:W=Y-1:GOSUB 70:IF NOT R THEN PF=F:GOSUB 400:Y=Y-1:GOSUB 400:GOTO 560
575 RETURN
580 IF VY>1 THEN Y=78.5-WT:GOSUB 400:VY=.5:GOTO 560
581 IF BK THEN B=N ELSE B=E
582 IF H(B)=-2 THEN 595
584 GOSUB 71:PRINT N$(B);"��ˮ��!";:H(B)=-2:X(B)=0:R=B:GOSUB 1450:GOSUB 84
595 GOSUB 71:R=1:GOTO 575
600 GOSUB 1500:GOSUB 80:WA=0:WG=(RND(1)-.5)/2.5:SD=(SD=0):GOSUB 1400
602 S(SD)=S(SD)+1:IF S(SD)>2 THEN S(SD)=0
603 E=S(SD)+SD*3:IF H(E)<0 THEN 602
610 HI=0:GOSUB 840:JK=0:IF PL THEN IF E<3 THEN PK=0 ELSE PK=1
611 GOSUB 80:GOSUB 71:PRINT N$(E);"׼��";:GOSUB 84
612 FOR N=0 TO 5:IF H(N)<-1 THEN 615 ELSE GOSUB 88:GOSUB 420
615 NEXT N:FOR N=0 TO 5:IF H(N)<-1 THEN 618 ELSE GOSUB 88:GOSUB 400
618 NEXT N
620 GOSUB 75:GOSUB 1200:RETURN
630 LINE X(E),7,X(E),10:LINE X(E)-1,9,X(E)+1,9
650 FOR N=SD*3 TO 2+SD*3:IF X(N)<160 THEN LINE X(N),7,X(N),10,H(N)>0
655 NEXT N:RETURN
690 IF PK THEN FOR I=1 TO 1200:NEXT I ELSE GOSUB 82
695 GOTO 612
700 A=E:FOR N=0 TO 5:IF H(N)=-2 THEN 725 ELSE E=N:GOSUB 75:DI=0
710 GOSUB 520:IF NOT R THEN 710 ELSE GOSUB 74
725 NEXT N
730 E=A:GOSUB 75:BK=0:RETURN
800 J=J-PJ*4:IF ABS(J)>90 THEN J=90*SGN(J)
810 GOSUB 840:MX=X+COS(J*PI)*10*SGN(F):MY=Y+SIN(J*PI)*10-4
820 IF MX>0 AND MY>0 THEN DRAW MX,MY,2
830 JK=1:RETURN
840 IF JK AND MX>0 AND MY>0 THEN DRAW MX,MY,2
850 RETURN
900 R=0:BOX 1,7,159,15,1,0:BOX 20,8,140,11,0,2
910 IF PEEK(192)=127 THEN R=R+1 ELSE 940
920 sleep 60:IF R>120 THEN 940 ELSE BOX 20,9,20+R,10,1:GOTO 910
940 IF WA THEN R=R*1.5
950 GOSUB 83:RETURN
1000 V=R/35+.5:WX=COS(J*PI)*V*SGN(F):WY=SIN(J*PI)*V
1005 HX=X:HY=Y-4:GOSUB 72:
1010 WY=WY+G/(1.2+(NOT WA)*1.8):WX=WX+WG*(NOT WA)/3:C=HX:D=HY
1020 GOSUB 72:HX=HX+WX:HY=HY+WY:GOSUB 72:sleep 90:SL=SL+1
1030 Z=HX:W=HY:IF SL>3 OR V>2 THEN GOSUB 70:GOTO 1040
1035 GOSUB 400:GOSUB 70:GOSUB 400
1040 IF HX<1 OR HY>79-WT OR HX>=159 THEN GOSUB 72:GOTO 1070
1050 IF WA AND SL>70 THEN A=8:DA=50:GOTO 1065
1060 IF NOT (R>0 AND HY>0) THEN 1010 ELSE GOSUB 72:IF WA THEN 1090 ELSE A=7:DA=45
1065 IF RND(1)<.02+(H(E)<30)*(30-H(E))/150 THEN A=A*1.7:DA=DA*2:GOSUB 71:PRINT "����һ��!"
1068 GOSUB 1080:SL=0:GOSUB 1100:GOSUB 86:GOSUB 1300:IF HI>IM THEN NM=E:IM=HI
1069 GOSUB 1400
1070 RETURN
1080 FOR N=1 TO 2:Z=(C+HX)/2:W=(D+HY)/2:GOSUB 70
1081 IF NOT R THEN C=Z:D=W ELSE HX=Z:HY=W
1082 NEXT N:HX=(HX+C)/2:HY=(HY+D)/2:RETURN
1090 B=0:Z=HX:W=D:GOSUB 70:B=B+(R>0):Z=C:W=HY:GOSUB 70:IF R>0 THEN B=B+2
1091 WX=WX*(1-(B<>2)*1.2):WY=WY*(1-(B<>1)*1.3)
1095 GOSUB 1080:GOSUB 72:GOTO 1020
1100 FOR I=1 TO 0 STEP -1:FOR N=1 TO A:CIRCLE HX,HY,N,1,I:PLAY "L64O1CG":sleep 40:NEXT N:NEXT I
1105 IF FM THEN LINE HX-1,HY+4,HX+1,HY+4:LINE HX,HY+3,HX,HY+6:FM=0
1110 FOR N=0 TO 5:IF H(N)=-2 THEN 1116
1115 X=X(N):Y=Y(N):PF=D(N):GOSUB 420
1116 NEXT N
1117 FOR N=0 TO 9:IF N<6 THEN IF H(N)=-2 THEN 1185
1120 B=SQR((X(N)+.5-HX)^2+(Y(N)-3-HY)^2)
1130 IF B>A+2 THEN 1180 ELSE IF N>5 THEN H(N)=H(N)+(H(N)=0)*2:GOTO 1185
1140 C=(A+2-B)/(A+2):VY(N)=(DA/18)*SGN(Y(N)-3.1-HY)*C:D(N)=SGN(X(N)-HX):VX(N)=C*D(N)
1150 Q=INT(DA*C+1):H(N)=H(N)-Q:HI=HI+Q:D=H(N):C=D+Q:GOSUB 87:GOSUB 84
1155 FOR C=D+Q-.1 TO D STEP -1:GOSUB 87:NEXT C
1160 GOSUB 84:GOSUB 71:IF H(N)<1 THEN H(N)=-1
1180 IF N<6 THEN GOSUB 88:GOSUB 400
1185 NEXT N
1190 FOR Q=6 TO 9:IF H(Q)=2 THEN DA=95:A=11:HX=X(Q):HY=Y(Q)-3:H(Q)=1:GOSUB 1100
1195 NEXT Q:RETURN
1200 BOX 0,0,159,16,1,0:BOX 11,2,12+HM(E)/2,5,0,2:BOX 83,2,84+M(E)/2,5,0,2
1230 BOX 134,2,156,5,0,2:LINE 145,3,145,4
1240 BOX 145,3,145+WG*50,4:GOSUB 1250:GOSUB 1260:GOSUB 630:RETURN
1250 BOX 11+HM(E)/2,3,11+H(E)/2,4,0,0:BOX 11,3,11+H(E)/2,4:RETURN
1260 BOX 83+M/2,3,83+M(E)/2,4,0,0:BOX 83,3,83+M/2,4:RETURN
1300 FOR O=0 TO 5
1310 IF H(O)=-1 THEN PRINT N$(O);"����!":R=O:GOSUB 1450 ELSE 1320
1315 GOSUB 84:GOSUB 71:H(O)=-2:A=6:DA=30
1318 HX=X(O):X(O)=320:HY=Y(O)-3:FM=1:GOSUB 1100:GOSUB 86:O=0
1320 NEXT O:RETURN
1400 IF P>0 AND L>0 THEN 1460 ELSE IF P=L THEN PRINT "��ô��ƽ��?":GOSUB 82:GOTO 1428
1420 IF P>0 THEN PRINT "KYO"; ELSE PRINT "����";
1425 PRINT "��ʤ��!":GOSUB 82:CLS:A=L>0:FOR N=A*3 TO A*3+2
1426 PRINT N$(N);:IF H(N)<0 THEN PRINT "����" ELSE PRINT " HP:";INT(H(N))
1427 NEXT N
1428 PRINT N$(NM);"�����";INT(IM);"������˺�.";" ��";INT(U/2+.6);"�غ�.";:GOSUB 82:CLEAR:GOTO 0
1450 IF R<3 THEN P=P-1 ELSE L=L-1
1460 RETURN
1500 U=U+1:IF U<25 THEN 1460 ELSE GOSUB 71:PRINT "��ˮ��!":D=78-WT:WT=WT+1:BOX 1,78,158,D,1,2
1510 FOR N=1 TO 158 STEP 2:DRAW N,D,1:DRAW N+1,D,0:NEXT N:BK=1:sleep 500:GOSUB 700:RETURN
1600 GOSUB 71:PRINT N$(E);"˲��!";:PF=F:GOSUB 400
1610 A=INT(RND(1)*159)+1.5:Z=A:W=77-WT:GOSUB 70
1615 IF NOT R THEN 1610
1620 X=A:Y=22:VY=1:PF=F:GOSUB 400:GOSUB 74:BK=1:GOSUB 700:GOSUB 600:GOTO 100
1700 SK=0:NB=1-(ND-1)/4
1701 sleep 50:Z=ABS(X-X(0)):W=ABS(X-X(1)):R=ABS(X-X(2)):IF Z>W THEN TD=1:Z=W ELSE TD=0
1702 IF Z>R THEN TD=2
1705 DX=X(TD):DY=Y(TD):TE=RND(1)*20+1:TF=SGN(X-DX+.1)
1706 IF RND(1)>.3 AND (X<10 OR X>150) AND TF=SGN(X-80) THEN TF=-TF
1708 FOR NN=1 TO TE:Z=X+TF:W=Y:GOSUB 70
1709 IF (Z<15 OR Z>145) AND TF=SGN(X-80) THEN NN=TE:GOTO 1720
1710 IF R>0 THEN 1716
1712 IF RND(1)*2>SK/5+.1+P% AND F=TF THEN NN=50:GOTO 1720
1714 Z=X+TF:W=77-WT:GOSUB 70:IF NOT R THEN NN=TE:GOTO 1720
1716 M=M-1:IF M<0 THEN NN=50:GOTO 1720
1718 FF=F:F=TF:GOSUB 500:GOSUB 560:IF H(E)=-2 THEN GOSUB 600
1720 P%=0:NEXT NN
1721 GOSUB 400:F=SGN(DX-X+.1):PF=F:GOSUB 400
1722 GOSUB 71:PRINT N$(E);"˼����":GOSUB 74
1723 IF SQR((DX-X)^2+(DY-Y)^2)<9 AND RND(1)>NB THEN P%=1:GOTO 1778
1724 IF (Y>70-WT OR WT>2) AND RND(1)>(78-WT-Y)*.15 AND ND>RND(1)*5 THEN 1600
1730 GG=WG*F/3
1731 WX=0:WY=0:SX=ABS(DX-X):SX=SX+(RND(1)-.5)*NB^2*36:A=1
1740 FOR TA=2.4 TO 0 STEP -.15-NB*.3
1745 A=2.4+SGN(2.4-A)*TA:T=A^2+GG*2*SX
1750 IF T>0 THEN T=(SQR(T)-A)/GG ELSE 1770
1753 C=SQR(23.1-A^2):IF NOT T THEN 1770
1755 D=((Y-DY+(RND(1)-.5)*NB*ABS(Y-DY)/1.2)+G/6*T^2)/T:IF ABS(D)>C THEN 1770
1760 GOSUB 1790
1770 NEXT TA
1775 IF WX<>0 AND WY<>0 THEN 1780
1778 IF M>0 AND RND(1)*ND*3+2>SK^2 THEN SK=SK+.5:GOSUB 1200:IF SK>.5 THEN 89 ELSE 1701
1779 IF RND(1)>NB/2 THEN 1600 ELSE GOSUB 600:GOTO 100
1780 GOSUB 83:SL=5:GOSUB 1005:GOSUB 600:GOTO 100
1790 TZ=A*F:TZZ=-D:Z=X:W=Y-4:NC=INT(NB*60)
1791 NA=0:FOR I=1 TO 60-NC:IF ABS(Z-79)>79.5 OR W>79 THEN I=61:GOTO 1797
1792 TZZ=TZZ+G/3:TZ=TZ+WG/3:Z=Z+TZ:W=W+TZZ
1793 GOSUB 70:IF NOT R OR W<16 THEN 1797 ELSE NA=1:I=61
1794 FOR O=0 TO 5:Q=SQR((Z-X(O))^2+(W-Y(O)+3)^2):IF H(O)<=0 THEN 1796
1795 IF Q<11-NB*7 AND O>2 THEN NA=2 ELSE IF Q<6+NB^2*24 AND O<3 AND NA<2 THEN NA=3
1796 NEXT O
1797 NEXT I:IF NA<2 AND RND(1)*8<SK/3+NB*3+SX/160+(D>2) THEN NA=3
1798 IF NA<3 THEN 1799 ELSE WX=A*F:WY=-D:TA=-1
1799 RETURN
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion gvb/runtime.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -799,7 +799,7 @@ inline void GVB::exe_open(Open *o1) {

evalPop(o1->fname);

string fname = "dat/" + m_top.sval;
string fname = "dat_files/" + m_top.sval;
auto sz = fname.size();
if (sz < 8 || (fname.back() | 32) != 't'
|| (fname[sz - 2] | 32) != 'a' || (fname[sz - 3] | 32) != 'd'
Expand Down

0 comments on commit be138cf

Please sign in to comment.