📄 kota43a.pas
字号:
//if ((KEY1.PTrig1 or Key1.PTrig2 or Key1.PTrig3) = True)then
//begin
Level1 := 8;
//end;
//ImageDraw;
end;
procedure TForm1.BGMPlayerMenu;
var
iii : Integer;
begin
if (Level2 = 1)then
begin
cy := 0;
Level2 := 0;
end;
if (Key1.PUp = true)then cy := cy - 1;
if (key1.Pdown = true)then cy := cy + 1;
if ((Key1.PUp or key1.Pdown) = true)then STG1.EntrySound(10);
if (cy > 9)then cy := 9;
if (cy < 0)then cy := 0;
STG1.BackBuf.BltFast(Title,0,0,rect(0,300,300,600),0);
for iii := 0 to 19 do
AL.BlendRect(STG1.BackBuf,rect(iii*15,150+random(120),iii*15+5,300),84+(iii div 2),BM_ADD);
STG1.DrawFont(150,25,'BGM MODE',0);
STG1.DrawFont(150,80,'RETURN TO MENU',2);
STG1.DrawFont(150,100,'STAGE 1',0);
STG1.DrawFont(150,120,'STAGE 2',0);
STG1.DrawFont(150,140,'STAGE 3',0);
STG1.DrawFont(150,160,'STAGE 4',0);
STG1.DrawFont(150,180,'ENEMY TARGET',0);
STG1.DrawFont(150,200,'FINAL TARGET',0);
STG1.DrawFont(150,220,'PLAYER SELECT',0);
STG1.DrawFont(150,240,'FALLING SKY',0);
STG1.DrawFont(150,260,'END OF STORY',0);
for iii := 0 to 9 do
begin
AL.Blendrect(STG1.BackBuf,rect(iii*15,70+cy*20,iii*15+15,90+cy*20),44-iii,BM_ADD);
AL.Blendrect(STG1.BackBuf,rect(300-iii*15,70+cy*20,285-iii*15,90+cy*20),44-iii,BM_ADD);
end;
ImageDraw;
if ((Key1.Ptrig1 or Key1.Ptrig2 or Key1.Ptrig3)=True)then
case cy of
0 : begin
Level1 := 5;
Level2 := 0;
cy := 6;
end;
1 : BGMEnable('bgm\Stage1');
2 : BGMEnable('bgm\Stage2');
3 : BGMEnable('bgm\Stage3');
4 : BGMEnable('bgm\Stage4');
5 : BGMEnable('bgm\Boss');
6 : BGMEnable('bgm\Boss2');
7 : BGMEnable('bgm\select');
8 : BGMEnable('bgm\Title');
9 : BGMEnable('bgm\Ending');
end;
end;
//BackUp Save
procedure TForm1.BackupSave;
var
ff : FILE;
begin
AssignFile(ff,'BackUp.bak');
ReWrite(FF,1);
BlockWrite(ff,STG1.PD[0].SLevel,4);
BlockWrite(ff,STG1.PD[0].SLevel,4);
CloseFile(ff);
end;
//PlayRecSelect
//---僉儍儔僙儗僋僩
procedure TForm1.PlayDataSelect;
var
jjj,aaa : Integer;
begin
if (level2 = 1)then
begin
BGMEnable('bgm\select');
level2 := 0;
cy := 0;
cx := 10;
stg1.LoadPlayData('PlayData\PlayData'+IntToStr(cy)+'.PDF',ppd);
aa1 := 0;
if (FileExists('PlayData\PlayData'+IntToStr(cy)+'.PDF') = True)then aa1 := 1;
end;
STG1.BackBuf.BltFast(Title,0,0,rect(0,300,300,600),0);
if (Key1.PDown = True)then cy := (cy + 1) mod 100;
if (Key1.PUp = True)then cy := (cy - 1 + 100) mod 100;
if (Key1.PRight = True)then cy := (cy + 10) mod 100;
if (Key1.PLeft = True)then cy := (cy - 10 + 100) mod 100;
if ((Key1.PUp or key1.Pdown or
Key1.PLeft or Key1.PRight) = true)then
begin
STG1.EntrySound(10);
cx := 10;
stg1.LoadPlayData('PlayData\PlayData'+IntToStr(cy)+'.PDF',ppd);
aa1 := 0;
if (FileExists('PlayData\PlayData'+IntToStr(cy)+'.PDF') = True)then aa1 := 1;
end;
if (cx > 0)then cx := cx - 1;
//僉儍儔夋憸
STG1.DrawFont(150,20,'SELECT PLAY DATA',0);
if (PlayRec = False)then STG1.DrawFont(150,40,'REPLAY MODE',0)
else STG1.DrawFont(150,40,'RECORD MODE',0);
STG1.DrawFont(150,270,'DATA NO '+IntToStr(cy),2);
AL.BlendRect(STG1.BackBuf,rect(0,50,300,200),23,BM_DEC);
if (aa1 = 1)then
begin
STG1.BackBuf.BltFast(Select1,0,50,rect(0 ,PPD.PlayerType*150,
300,PPD.PlayerType*150+150),DDBLTFAST_SRCCOLORKEY);
STG1.DrawFont(150,210,'NAME '+PPD.Name,0);
STG1.DrawFont(150,230,'LEVEL '+ans[(PPD.Dif+3)],0);
STG1.DrawFont(100,250,'SCORE ',0);
if (PlayRec = true)then STG1.DrawFont(80,195,'SAVE AS THIS DATA',3);
for jjj := 0 to 6 do
begin
aaa := (PPD.Score div trunc(power(10,jjj))) mod 10;
if (jjj > 3)then STG1.DrawBank(230-jjj*12,250,aaa+1,2,9,0)
else STG1.DrawBank(230-jjj*12,250,aaa+1,1,9,0);
end;
end
else
begin
STG1.DrawFont(150,125,'NO DATA',0);
if (PlayRec = False)then STG1.DrawFont(150,145,'CAN NOT REPLAY THIS DATA',3)
else STG1.DrawFont(150,145,'CREATE NEW PLAYDATA',3);
STG1.DrawFont(150,210,'NAME ---',0);
STG1.DrawFont(150,230,'LEVEL ---',0);
STG1.DrawFont(150,250,'SCORE ------',0);
end;
if (cx > 0)then Alph1.WindNoise(STG1.BackBuf,rect(0,50,300,200),cx*10);
if ((GetTickCount div 500) mod 2 = 1)then
begin
STG1.DrawBank(150,50,7,3,9,0);
STG1.DrawBank(150,200,8,3,9,0);
end;
if ((Key1.Ptrig1 or Key1.Ptrig2 or Key1.Ptrig3)=True) then
begin
//嵞惗
if ((SamplePlay = True)and(aa1 = 1))then
begin
StageNo := 1;
StageFile :='Stage1.stg';
PlayFrm := 0;
STG1.Dif := PPD.Dif;
STG1.PD[0].score := 0;
case PPD.playerType of //婡懱
0 : begin
STG1.PD[0].Speed1 := 5;
STG1.PD[0].Speed2 := 4;
end;
1 : begin
STG1.PD[0].Speed1 := 6;
STG1.PD[0].Speed2 := 5;
end;
2 : begin
STG1.PD[0].Speed1 := 5;
STG1.PD[0].Speed2 := 5;
end;
end;
STG1.PD[0].SelectNo := PPD.Playertype;
Level1 := 1;
Level2 := 1;
end;
//榐夋
if (PlayRec = True)then
begin
FedeOut;
RecNo := cy;
Level1 := 13;
Level2 := 0;
cy := 0; //昁梫曄悢弶婜壔
cx := 0;
aa1 := 0;
NameEnt[0] := ' ';
NameEnt[1] := ' ';
NameEnt[2] := ' ';
end;
end;
ImageDraw
end;
procedure TForm1.playerivent;
var
aaa,iii : Integer;
tempbuf : TDDDDSurface;
time1 : LongInt;
begin
tempbuf := TDDDDSurface.CreateOnSystemMemory(DDDD1,300,300,0);
tempbuf.BltFast(STG1.BackBuf,0,0,rect(0,0,300,300),DDBLTFAST_NOCOLORKEY);
aaa := STG1.mesivent - 249;
STG1.mesivent := 0;
//搊応
for iii := 1 to 20 do
begin
time1 := GetTickCount;
STG1.BackBuf.BltFast(tempbuf,0,0,rect(0,0,300,300),DDBLTFAST_NOCOLORKEY);
AL.AlphaBlendRect(stg1.backbuf,rect(0,230,300,300),0,iii*8,BM_DEC);
STG1.BackBuf.BltFast(STG1.Playchar,300-iii*15,70,
rect(0,STG1.PD[0].SelectNo*160,160,STG1.PD[0].SelectNo*160+160),DDBLTFAST_srcColorKey or DDBLTFAST_WAIT);
ImageDraw;
while((GetTickCount-Time1)<25) do;
end;
//1僐儅栚
STG1.BackBuf.BltFast(tempbuf,0,0,rect(0,0,300,300),DDBLTFAST_NOCOLORKEY);
STG1.BackBuf.BltFast(STG1.Playchar,0,70,
rect(0,STG1.PD[0].SelectNo*160,160,STG1.PD[0].SelectNo*160+160),DDBLTFAST_srcColorKey or DDBLTFAST_WAIT);
AL.AlphaBlendRect(stg1.backbuf,rect(0,230,300,300),0,160,BM_DEC);
AL.TextOut(stg1.backbuf,0,240,STG1.Playmes[aaa*5+1],$FFEEEE,14,[fsBOLD]);
AL.TextOut(stg1.backbuf,0,265,STG1.Playmes[aaa*5+2],$FFEEEE,14,[fsBOLD]);
ImageDraw;
sleep(1500);
if (STG1.Playmes[aaa*5+3] <> '')then
begin
STG1.BackBuf.BltFast(tempbuf,0,0,rect(0,0,300,300),DDBLTFAST_NOCOLORKEY);
STG1.BackBuf.BltFast(STG1.Playchar,0,70,
rect(0,STG1.PD[0].SelectNo*160,160,STG1.PD[0].SelectNo*160+160),DDBLTFAST_srcColorKey or DDBLTFAST_WAIT);
AL.AlphaBlendRect(stg1.backbuf,rect(0,230,300,300),0,160,BM_DEC);
AL.TextOut(stg1.backbuf,0,240,STG1.Playmes[aaa*5+3],$FFEEEE,14,[fsBOLD]);
AL.TextOut(stg1.backbuf,0,265,STG1.Playmes[aaa*5+4],$FFEEEE,14,[fsBOLD]);
ImageDraw;
sleep(1500);
end;
tempbuf.free;
end;
procedure Tform1.Startdemo;
var
iii,jjj,kkk,count : Integer;
temp,temp2,temp3,temp4 : TddddSurface;
lt : longint;
stx,sty,stax,stay,sta : array[0..50] of Integer;
bmx,bmy,bmax,bmay,bma : Integer;
xxx,yyy,aaa,ccc : Integer;
bx,by : Integer;
begin
temp := TddddSurface.CreateOnSystemMemory(dddd1,400,300,0);
temp.loadBMP('bmp\op10.bmp');
temp2 := TddddSurface.CreateOnSystemMemory(dddd1,300,100,0);
temp2.loadBMP('bmp\op12.bmp');
temp3 := TddddSurface.CreateOnSystemMemory(dddd1,300,900,0);
temp3.loadBMP('bmp\op11.bmp');
temp4 := TddddSurface.CreateOnSystemMemory(dddd1,300,300,0);
temp4.loadBMP('bmp\op13.bmp');
//弶婜壔
BgmEnable('bgm\title');
sleep(1500);
bx := 0; by := 0;bmx := 0;
count := 0;
Key1.GetKey;
for iii := 0 to 50 do
begin
stx[iii] := random(30000);
sty[iii] := random(30000);
stax[iii] := 1000;
stay[iii] := 0;
sta[iii] := random(5);
end;
bma := 0;
bmx := 0;bmy := 0;
//儊僀儞
while ((count < 870) and (Key1.AllTrig = false))do
begin
Key1.GetKey;
inc(count);
lt := GetTickCount;
al.FillRect(stg1.backbuf,rect(0,0,300,300),0);
//攚宨
bx := bx + stax[1] div 10;
by := by + stay[1] div 20;
aaa := bx mod (300*1024);
STG1.BackBuf.BltFast(temp2,(aaa div 1024),150+(by div 1024),
rect(0,0,300-(bx div 1024),100),DDBLTFAST_NOCOLORKEY);
STG1.BackBuf.BltFast(temp2,0,150+(by div 1024),
rect(300-(bx div 1024),0,300,100),DDBLTFAST_NOCOLORKEY);
//惎昤夋
for iii := 0 to 50 do
begin
stx[iii] := stx[iii] + (stax[iii] * (sta[iii]+1) div 10);
sty[iii] := sty[iii] + (stay[iii] * (sta[iii]+1) div 10);
if (stx[iii] > 30000)then stx[iii] := 0;
if (sty[iii] > 30000)then sty[iii] := 0;
aaa := sta[iii] div 2;
STG1.BackBuf.BltFast(temp,stx[iii] div 100,sty[iii] div 100,
rect(200+aaa*8,230,208+aaa*8,238),DDBLTFAST_SRCCOLORKEY);
end;
//Level
stg1.PlaySE;
case count of
0..60 : begin
ccc := count;
for iii := 0 to 50 do stax[iii] := 4000;
xxx := 250 - ccc*4;
yyy := 200 - al.sinT2(count*10) div 5;
aaa := ccc and 1;
STG1.BackBuf.BltFast(temp,xxx,yyy,rect(100,0,200,100),DDBLTFAST_SRCCOLORKEY);
al.Blend(stg1.backbuf,xxx+80,yyy-10,temp,rect(aaa*100,100,100+aaa*100,200),BM_SCREEN);
if ((ccc mod 5) = 1)then
begin
bma := 1;
bmx := -200;
bmy := random(200)+50;
bmax := 80;
bmay := 0;
end;
end;
61..120 : begin //Player2
ccc := count - 60;
aaa := 31;
if (ccc < 30)then aaa := ccc;
STG1.BackBuf.bltfast(temp3,0,0,rect(0,300,300,600),DDBLTFAST_NOCOLORKEY);
AL.AlphaBlend(STG1.BackBuf,0,aaa*3+90,temp3,rect(0,600,300,750),aaa*8,BM_DEC);
end;
121..240 : begin
ccc := count - 120;
aaa := 31;
if (ccc < 30)then aaa := ccc;
if (ccc > 90)then aaa := 120-ccc;
STG1.BackBuf.bltfast(temp3,0,0,rect(0,300,300,600),DDBLTFAST_NOCOLORKEY);
AL.AlphaBlend(STG1.BackBuf,0,185,temp3,rect(0,600,300,750),255,BM_DEC);
AL.AlphaBlend(STG1.BackBuf,0,ccc-60,temp4,rect(150,0,300,300),aaa*8,BM_DEC);
end;
241..300 : begin
ccc := count - 240;
for iii := 0 to 50 do stay[iii] := 800;
xxx := 250 - ccc * 2;
yyy := -50 + al.sinT2(ccc*5) div 4;
aaa := ccc and 3;
STG1.BackBuf.BltFast(temp,xxx,yyy,rect(0,0,100,100),DDBLTFAST_SRCCOLORKEY);
if (ccc < 40)then
begin
al.Blend(stg1.backbuf,xxx-10,yyy+10,temp,rect(200+aaa*50,250,250+aaa*50,300),BM_SCREEN);
al.Blend(stg1.backbuf,xxx-10,yyy+40,temp,rect(200+aaa*50,250,250+aaa*50,300),BM_SCREEN);
end;
aaa := count and 1;
al.Blend(stg1.backbuf,xxx+80,yyy,temp,rect(aaa*100,100,100+aaa*100,200),BM_SCREEN);
if ((ccc mod 5) = 1)then
begin
bma := 1;
bmx := -200;
bmy := random(200)+50;
bmax := 80;
bmay := 0;
end;
end;
301..360 : begin //Player1
ccc := count - 300;
aaa := 31;
if (ccc < 30)then aaa := ccc;
STG1.BackBuf.bltfast(temp3,0,0,rect(0,0,300,300),DDBLTFAST_NOCOLORKEY);
AL.AlphaBlend(STG1.BackBuf,0,aaa*3+90,temp3,rect(0,750,300,900),aaa*8,BM_DEC);
end;
361..480 : begin
ccc := count - 360;
aaa := 31;
if (ccc < 30)then aaa := ccc;
if (ccc > 90)then aaa := 120-ccc;
STG1.BackBuf.bltfast(temp3,0,0,rect(0,0,300,300),DDBLTFAST_NOCOLORKEY);
AL.AlphaBlend(STG1.BackBuf,0,185,temp3,rect(0,750,300,900),255,BM_DEC);
AL.AlphaBlend(STG1.BackBuf,0,ccc-60,temp4,rect(0,0,150,300),aaa*8,BM_DEC);
end;
481..540 : begin
ccc := count - 480;
xxx := 300 - ccc*20;
yyy := 50;
aaa := ccc and 1;
STG1.BackBuf.BltFast(temp,xxx,yyy,rect(100,0,200,100),DDBLTFAST_SRCCOLORKEY);
al.Blend(stg1.backbuf,xxx+80,yyy-10,temp,rect(aaa*100,100,100+aaa*100,200),BM_SCREEN);
xxx := 170 - ccc*14;
yyy := 175;
STG1.BackBuf.BltFast(temp,xxx,yyy,rect(0,0,100,100),DDBLTFAST_SRCCOLORKEY);
al.Blend(stg1.backbuf,xxx+80,yyy,temp,rect(aaa*100,100,100+aaa*100,200),BM_SCREEN);
if ((ccc mod 5) = 1)then
begin
bma := 1;
bmx := -200;
bmy := random(200)+50;
bmax := 80;
bmay := 0;
end;
end;
541..600 : begin
ccc := count - 540;
xxx := ccc*4-100;
yyy := ccc*2;
if (ccc < 50)then STG1.BackBuf.BltFast(temp,xxx,yyy,rect(0,200,100,300),DDBLTFAST_SRCCOLORKEY);
if (ccc = 40)then stg1.EntryBom(xxx+50,yyy+50,0,0,7);
xxx := ccc*4-150;
yyy := ccc*2+30;
if (ccc < 50)then STG1.BackBuf.BltFast(temp,xxx,yyy,rect(0,200,100,300),DDBLTFAST_SRCCOLORKEY);
if (ccc = 40)then stg1.EntryBom(xxx+50,yyy+50,0,0,7);
stg1.MoveBom;
stg1.DrawBom;
end;
601..660 : begin
ccc := count - 600;
stg1.MoveBom;
stg1.DrawBom;
for iii := 0 to 50 do
begin
stax[iii] := al.CosT2(ccc*4)*4;
stay[iii] := al.SinT2(ccc*4)*4;
end;
end;
661..810 : begin
ccc := count - 660;
xxx := 125 - (ccc-150);
yyy := 150 - (ccc-150);
aaa := count mod 2;
STG1.BackBuf.BltFast(te
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -