⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 main.cpp

📁 一个出人意料的仿玛丽游戏
💻 CPP
📖 第 1 页 / 共 5 页
字号:
if (t3==xx[22] && xx[15]==0){
if (ttype[t]!=7 && ttype[t]!=110 && ttype[t]!=117){
if (!(ttype[t]==114)){// && txtype[t]==1)){
if (ta[t]>=-20000){
//if (ma+mnobia>xx[8] && ma<xx[8]+xx[2] && mb+mnobib>xx[9]+xx[1]/2-xx[0] &&){
if (ma+mnobia>xx[8] && ma<xx[8]+xx[2] && mb+mnobib>xx[9]+xx[1]/2-xx[0] && mb<xx[9]+xx[2] && mc>=0){
ma=xx[8]-mnobia;mc=0;xx[16]=1;
//if (ttype[t]!=4){ma=xx[8]-mnobia;mc=0;xx[16]=1;}
//if (ttype[t]==4){ma=xx[8]-mnobia;mc=-mc*4/4;}
}
if (ma+mnobia>xx[8]+xx[2] && ma<xx[8]+xx[1] && mb+mnobib>xx[9]+xx[1]/2-xx[0] && mb<xx[9]+xx[2] && mc<=0){
ma=xx[8]+xx[1];mc=0;xx[16]=1;//end();
//if (ttype[t]!=4){ma=xx[8]+xx[1];mc=0;xx[16]=1;}
//if (ttype[t]==4){ma=xx[8]+xx[1];mc=-mc*4/4;}
}
}}}
}

}//t3
}//!

}// && ttype[t]<50

if (ttype[t]==800){
//if (xx[0]+xx[2]>=-xx[14] && xx[0]<=fxmax+xx[14] && xx[1]+xx[3]>=-10-9000 && xx[1]<=fymax+10000){
if (mb>xx[9]-xx[0]*2-2000 && mb<xx[9]+xx[1]-xx[0]*2+2000 && ma+mnobia>xx[8]-400 && ma<xx[8]+xx[1]){
ta[t]=-800000;ot(oto[4]);
}}

//寱偲偭偰僋儕傾
if (ttype[t]==140){
if (mb>xx[9]-xx[0]*2-2000 && mb<xx[9]+xx[1]-xx[0]*2+2000 && ma+mnobia>xx[8]-400 && ma<xx[8]+xx[1]){
ta[t]=-800000;//ot(oto[4]);
sracttype[20]=1;sron[20]=1;
StopSoundMem(oto[0]);mtype=301;mtm=0;ot(oto[16]);

}}


//摿庩揑
if (ttype[t]==100){//xx[9]+xx[1]+3000<mb && // && mb>xx[9]-xx[0]*2
if (mb>xx[9]-xx[0]*2-2000 && mb<xx[9]+xx[1]-xx[0]*2+2000 && ma+mnobia>xx[8]-400 && ma<xx[8]+xx[1] && md<=0){
if (txtype[t]==0)tb[t]=mb+fy-1200-xx[1];
}

if (txtype[t]==1){
if (xx[17]==1){
if (ma+mnobia>xx[8]-400 && ma<xx[8]+xx[1]/2-1500){ta[t]+=3000;}
else if (ma+mnobia>=xx[8]+xx[1]/2-1500 && ma<xx[8]+xx[1]){ta[t]-=3000;}
}}

if (xx[17]==1 && txtype[t]==0){
ot(oto[4]);
eyobi(ta[t]+10,tb[t],0,-800,0,40,3000,3000,0,16);
ttype[t]=3;
}
}//100

//揋弌尰
if (ttype[t]==101){//xx[9]+xx[1]+3000<mb && // && mb>xx[9]-xx[0]*2
if (xx[17]==1){
ot(oto[8]);
ttype[t]=3;
abrocktm[aco]=16;
if (txtype[t]==0)ayobi(ta[t],tb[t],0,0,0,0,0);
if (txtype[t]==1)ayobi(ta[t],tb[t],0,0,0,4,0);
if (txtype[t]==3)ayobi(ta[t],tb[t],0,0,0,101,0);
if (txtype[t]==4){abrocktm[aco]=20;ayobi(ta[t]-400,tb[t]-1600,0,0,0,6,0);}
if (txtype[t]==10)ayobi(ta[t],tb[t],0,0,0,101,0);
}
}//101

//偍偄偟偄偒偺偙弌尰
if (ttype[t]==102){
if (xx[17]==1){
ot(oto[8]);
ttype[t]=3;abrocktm[aco]=16;
if (txtype[t]==0)ayobi(ta[t],tb[t],0,0,0,100,0);
if (txtype[t]==2)ayobi(ta[t],tb[t],0,0,0,100,2);
if (txtype[t]==3)ayobi(ta[t],tb[t],0,0,0,102,1);
}}//102

//傑偢偄偒偺偙弌尰
if (ttype[t]==103){
if (xx[17]==1){
ot(oto[8]);
ttype[t]=3;abrocktm[aco]=16;ayobi(ta[t],tb[t],0,0,0,100,1);
}}//103


//埆僗僞乕弌偟
if (ttype[t]==104){
if (xx[17]==1){
ot(oto[8]);
ttype[t]=3;abrocktm[aco]=16;ayobi(ta[t],tb[t],0,0,0,110,0);
}}//104




//撆偒偺偙検嶻
if (ttype[t]==110){
if (xx[17]==1){
ttype[t]=111;thp[t]=999;
}}//110
if (ttype[t]==111 && ta[t]-fx>=0){
thp[t]++;if (thp[t]>=16){thp[t]=0;
ot(oto[8]);
abrocktm[aco]=16;ayobi(ta[t],tb[t],0,0,0,102,1);
}}


//僐僀儞検嶻
if (ttype[t]==112){
if (xx[17]==1){
ttype[t]=113;thp[t]=999;titem[t]=0;
}}//110
if (ttype[t]==113 && ta[t]-fx>=0){
if (titem[t]<=19)thp[t]++;
if (thp[t]>=3){thp[t]=0;titem[t]++;
ot(oto[4]);
eyobi(ta[t]+10,tb[t],0,-800,0,40,3000,3000,0,16);
//ttype[t]=3;
}}


//塀偟撆偒偺偙
if (ttype[t]==114){
if (xx[17]==1){
if (txtype[t]==0){
ot(oto[8]);ttype[t]=3;
abrocktm[aco]=16;ayobi(ta[t],tb[t],0,0,0,102,1);
}
if (txtype[t]==2){ot(oto[4]);eyobi(ta[t]+10,tb[t],0,-800,0,40,3000,3000,0,16);ttype[t]=115;txtype[t]=0;}
if (txtype[t]==10){
if (stageonoff==1){ttype[t]=130;stageonoff=0;ot(oto[13]);txtype[t]=2;for (t=0;t<amax;t++){if (atype[t]==87 || atype[t]==88){if (axtype[t]==105){axtype[t]=110;}}}}
else{ot(oto[4]);eyobi(ta[t]+10,tb[t],0,-800,0,40,3000,3000,0,16);ttype[t]=3;}
}

}
}//114


//傕傠偄僽儘僢僋
if (ttype[t]==115){

}//115


//P僗僀僢僠
if (ttype[t]==116){
if (xx[17]==1){
ot(oto[8]);
//ot(oto[13]);
ttype[t]=3;//abrocktm[aco]=18;ayobi(ta[t],tb[t],0,0,0,104,1);
tyobi(ta[t]/100,(tb[t]/100)-29,400);
}}//116


//僼傽僀傾僶乕嫮壔
if (ttype[t]==124){
if (xx[17]==1){
ot(oto[13]);
for (t=0;t<amax;t++){if (atype[t]==87 || atype[t]==88){if (axtype[t]==101){axtype[t]=120;}}}
ttype[t]=3;
}}

//ON僗僀僢僠
if (ttype[t]==130){
if (xx[17]==1){
if (txtype[t]!=1){
stageonoff=0;ot(oto[13]);
}}}
else if (ttype[t]==131){
if (xx[17]==1 && txtype[t]!=2){
stageonoff=1;ot(oto[13]);
if (txtype[t]==1){
for (t=0;t<amax;t++){if (atype[t]==87 || atype[t]==88){if (axtype[t]==105){axtype[t]=110;}}}
bxtype[3]=105;
}
}}

//僸儞僩
if (ttype[t]==300){
if (xx[17]==1){
ot(oto[15]);
if (txtype[t]<=100){
tmsgtype=1;tmsgtm=15;tmsgy=300+(txtype[t]-1);tmsg=(txtype[t]);
}
if (txtype[t]==540){
tmsgtype=1;tmsgtm=15;tmsgy=400;tmsg=100;txtype[t]=541;
}}
}//300


if (ttype[t]==301){
if (xx[17]==1){
ot(oto[3]);
eyobi(ta[t]+1200,tb[t]+1200,300,-1000,0,160,1000,1000,1,120);eyobi(ta[t]+1200,tb[t]+1200,-300,-1000,0,160,1000,1000,1,120);eyobi(ta[t]+1200,tb[t]+1200,240,-1400,0,160,1000,1000,1,120);eyobi(ta[t]+1200,tb[t]+1200,-240,-1400,0,160,1000,1000,1,120);
brockbreak(t);
}}//300


}
else if (mtype==1){
if (ma+mnobia>xx[8] && ma<xx[8]+xx[1] && mb+mnobib>xx[9] && mb<xx[9]+xx[1]){

ot(oto[3]);
eyobi(ta[t]+1200,tb[t]+1200,300,-1000,0,160,1000,1000,1,120);
eyobi(ta[t]+1200,tb[t]+1200,-300,-1000,0,160,1000,1000,1,120);
eyobi(ta[t]+1200,tb[t]+1200,240,-1400,0,160,1000,1000,1,120);
eyobi(ta[t]+1200,tb[t]+1200,-240,-1400,0,160,1000,1000,1,120);
brockbreak(t);

}}


//ONOFF
if (ttype[t]==130 && stageonoff==0){ttype[t]=131;}
if (ttype[t]==131 && stageonoff==1){ttype[t]=130;}

//僸儞僩
if (ttype[t]==300){
if (txtype[t]>=500 && ta[t]>=-6000){// && ta[t]>=-6000){
if (txtype[t]<=539)txtype[t]++;
if (txtype[t]>=540){ta[t]-=500;}
}}//300


}}//僽儘僢僋







//暻
for (t=0;t<smax;t++){
if (sa[t]-fx+sc[t]>=-12000 && sa[t]-fx<=fxmax){
xx[0]=200;xx[1]=2400;xx[2]=1000;xx[7]=0;

xx[8]=sa[t]-fx;xx[9]=sb[t]-fy;
if ((stype[t]<=99 || stype[t]==200) && mtype<10){

//偍偪傞僽儘僢僋
if (stype[t]==51){
if (ma+mnobia>xx[8]+xx[0]+3000 && ma<xx[8]+sc[t]-xx[0] && mb+mnobib>xx[9]+3000 && sgtype[t]==0){
if (sxtype[t]==0){
sgtype[t]=1;sr[t]=0;
}}
if (ma+mnobia>xx[8]+xx[0]+1000 && ma<xx[8]+sc[t]-xx[0] && mb+mnobib>xx[9]+3000 && sgtype[t]==0){
if ((sxtype[t]==10) && sgtype[t]==0){
sgtype[t]=1;sr[t]=0;
}}

if ((sxtype[t]==1) && sb[27]>=25000 && sa[27]>ma+mnobia && t!=27 && sgtype[t]==0){
sgtype[t]=1;sr[t]=0;
}
if (sxtype[t]==2 && sb[28]>=48000 && t!=28 && sgtype[t]==0 && mhp>=1){
sgtype[t]=1;sr[t]=0;
}
if ((sxtype[t]==3 && mb>=30000 || sxtype[t]==4 && mb>=25000) && sgtype[t]==0 && mhp>=1 && ma+mnobia>xx[8]+xx[0]+3000-300 && ma<xx[8]+sc[t]-xx[0]){
sgtype[t]=1;sr[t]=0;
if (sxtype[t]==4)sr[t]=100;
}

if (sgtype[t]==1 && sb[t]<=fymax+18000){
sr[t]+=120;if (sr[t]>=1600){sr[t]=1600;}
sb[t]+=sr[t];
if (ma+mnobia>xx[8]+xx[0] && ma<xx[8]+sc[t]-xx[0] && mb+mnobib>xx[9] && mb<xx[9]+sd[t]+xx[0]){
mhp--;xx[7]=1;
}}
}

//偍偪傞僽儘僢僋2
if (stype[t]==52){
if (sgtype[t]==0 && ma+mnobia>xx[8]+xx[0]+2000 && ma<xx[8]+sc[t]-xx[0]-2500 && mb+mnobib>xx[9]-3000){
sgtype[t]=1;sr[t]=0;
}
if (sgtype[t]==1){
sr[t]+=120;if (sr[t]>=1600){sr[t]=1600;}
sb[t]+=sr[t];
}
}



//捠忢抧柺
if (xx[7]==0){
if (ma+mnobia>xx[8]+xx[0] && ma<xx[8]+sc[t]-xx[0] && mb+mnobib>xx[9] && mb+mnobib<xx[9]+xx[1] && md>=-100){mb=sb[t]-fy-mnobib+100;md=0;mzimen=1;}
if (ma+mnobia>xx[8]-xx[0] && ma<xx[8]+xx[2] && mb+mnobib>xx[9]+xx[1]*3/4 && mb<xx[9]+sd[t]-xx[2]){ma=xx[8]-xx[0]-mnobia;mc=0;}
if (ma+mnobia>xx[8]+sc[t]-xx[0] && ma<xx[8]+sc[t]+xx[0] && mb+mnobib>xx[9]+xx[1]*3/4 && mb<xx[9]+sd[t]-xx[2]){ma=xx[8]+sc[t]+xx[0];mc=0;}
if (ma+mnobia>xx[8]+xx[0]*2 && ma<xx[8]+sc[t]-xx[0]*2 && mb>xx[9]+sd[t]-xx[1] && mb<xx[9]+sd[t]+xx[0]){
mb=xx[9]+sd[t]+xx[0];if (md<0){md=-md*2/3;}
}
}//xx[7]

//擖傞搚娗
if (stype[t]==50){
if (ma+mnobia>xx[8]+2800 && ma<xx[8]+sc[t]-3000 && mb+mnobib>xx[9]-1000 && mb+mnobib<xx[9]+xx[1]+3000 && mzimen==1 && actaon[3]==1 && mtype==0){
//旘傃弌偟
if (sxtype[t]==0){
mtype=100;mtm=0;ot(oto[7]);mxtype=0;
}
//晛捠
if (sxtype[t]==1){
mtype=100;mtm=0;ot(oto[7]);mxtype=1;
}
//晛捠
if (sxtype[t]==2){
mtype=100;mtm=0;ot(oto[7]);mxtype=2;
}
if (sxtype[t]==5){
mtype=100;mtm=0;ot(oto[7]);mxtype=5;
}
// 儖乕僾
if (sxtype[t]==6){
mtype=100;mtm=0;ot(oto[7]);mxtype=6;
}
}}//50

//擖傞搚娗(嵍偐傜)
if (stype[t]==40){
if (ma+mnobia>xx[8]-300 && ma<xx[8]+sc[t]-1000 && mb>xx[9]+1000 && mb+mnobib<xx[9]+xx[1]+4000 && mzimen==1 && actaon[4]==1 && mtype==0){//end();
//旘傃弌偟
if (sxtype[t]==0){
mtype=500;mtm=0;ot(oto[7]);//mxtype=1;
mtype=100;mxtype=10;
}

if (sxtype[t]==2){
mxtype=3;
mtm=0;ot(oto[7]);//mxtype=1;
mtype=100;
}
// 儖乕僾
if (sxtype[t]==6){
mtype=3;mtm=0;ot(oto[7]);mxtype=6;
}
}}//40




}//stype
else{
if (ma+mnobia>xx[8]+xx[0] && ma<xx[8]+sc[t]-xx[0] && mb+mnobib>xx[9] && mb<xx[9]+sd[t]+xx[0]){
if (stype[t]==100){
if (sxtype[t]==0 || sxtype[t]==1 && ttype[1]!=3){
ayobi(sa[t]+1000,32000,0,0,0,3,0);sa[t]=-800000000;ot(oto[10]);
}
}
if (stype[t]==101){ayobi(sa[t]+6000,-4000,0,0,0,3,1);sa[t]=-800000000;ot(oto[10]);}
if (stype[t]==102){
if (sxtype[t]==0){
for (t3=0;t3<=3;t3++){ayobi(sa[t]+t3*3000,-3000,0,0,0,0,0);}
}
if (sxtype[t]==1 && mb>=16000){ayobi(sa[t]+1500,44000,0,-2000,0,4,0);}
else if (sxtype[t]==2){ayobi(sa[t]+4500,30000,0,-1600,0,5,0);ot(oto[10]);sxtype[t]=3;sa[t]-=12000;}
else if (sxtype[t]==3){sa[t]+=12000;sxtype[t]=4;}
else if (sxtype[t]==4){ayobi(sa[t]+4500,30000,0,-1600,0,5,0);ot(oto[10]);sxtype[t]=5;sxtype[t]=0;}

else if (sxtype[t]==7){mainmsgtype=1;}
else if (sxtype[t]==8){ayobi(sa[t]-5000-3000*1,26000,0,-1600,0,5,0);ot(oto[10]);}
else if (sxtype[t]==9){for (t3=0;t3<=2;t3++){ayobi(sa[t]+t3*3000+3000,48000,0,-6000,0,3,0);}}
if (sxtype[t]==10){sa[t]-=5*30*100;stype[t]=101;}

if (sxtype[t]==12){
for (t3=1;t3<=3;t3++){ayobi(sa[t]+t3*3000-1000,40000,0,-2600,0,9,0);}
}

//僗僋儘乕儖徚偟
if (sxtype[t]==20){
scrollx=0;
}

//僋儕傾
if (sxtype[t]==30){sa[t]=-80000000;md=0;
StopSoundMem(oto[0]);mtype=302;mtm=0;ot(oto[16]);
}

if (sxtype[t]!=3 && sxtype[t]!=4 && sxtype[t]!=10){sa[t]=-800000000;}
}

if (stype[t]==103){
if (sxtype[t]==0){
amsgtm[aco]=10;amsgtype[aco]=50;ayobi(sa[t]+9000,sb[t]+2000,0,0,0,79,0);sa[t]=-800000000;
}

if (sxtype[t]==1 && ttype[6]<=6){
amsgtm[aco]=10;amsgtype[aco]=50;ayobi(sa[t]-12000,sb[t]+2000,0,0,0,79,0);sa[t]=-800000000;
txtype[9]=500;//ttype[9]=1;
}
}//103

if (stype[t]==104){
if (sxtype[t]==0){
ayobi(sa[t]+12000,sb[t]+2000+3000,0,0,0,79,0);
ayobi(sa[t]+12000,sb[t]+2000+3000,0,0,0,79,1);
ayobi(sa[t]+12000,sb[t]+2000+3000,0,0,0,79,2);
ayobi(sa[t]+12000,sb[t]+2000+3000,0,0,0,79,3);
ayobi(sa[t]+12000,sb[t]+2000+3000,0,0,0,79,4);
sa[t]=-800000000;
}}

if (stype[t]==105 && mzimen==0 && md>=0){ta[1]-=1000;ta[2]+=1000;sxtype[t]++;if (sxtype[t]>=3)sa[t]=-8000000;}


if (stype[t]==300 && mtype==0 && mb<xx[9]+sd[t]+xx[0]-3000 && mhp>=1){StopSoundMem(oto[0]);mtype=300;mtm=0;ma=sa[t]-fx-2000;ot(oto[11]);}

//拞娫僎乕僩
if (stype[t]==500 && mtype==0 && mhp>=1){
tyuukan+=1;
sa[t]=-80000000;
}

}

if (stype[t]==180){
sr[t]++;
if (sr[t]>=sgtype[t]){sr[t]=0;
ayobi(sa[t],30000,rand(600)-300,-1600-rand(900),0,84,0);
}
}

}
}}//暻










//僉乕擖椡弶婜壔
//for (t=0;t<=6;t++)
actaon[0]=0;actaon[4]=0;





//儕僼僩
for (t=0;t<srmax;t++){
xx[10]=sra[t];xx[11]=srb[t];xx[12]=src[t];xx[13]=srd[t];
xx[8]=xx[10]-fx;xx[9]=xx[11]-fy;
if (xx[8]+xx[12]>=-10-12000 && xx[8]<=fxmax+12100){
xx[0]=500;xx[1]=1200;xx[2]=1000;xx[7]=2000;
if (md>=100){xx[1]=900+md;}

//if (srtype[t]==1){xx[0]=600;}
if (md>xx[1])xx[1]=md+100;
//xx[18]=0;

srb[t]+=sre[t];
sre[t]+=srf[t];
//if (srf[t]>=500)srf[t]=0;




//摦偒
switch(sracttype[t]){

case 1:
if (sron[t]==1)srf[t]=60;
break;


case 2:
/*
if (sra[t]<=srmovep[t]-srmove[t])srmuki[t]=1;
if (sra[t]>=srmovep[t]+srmove[t])srmuki[t]=0;
*/
break;

case 3:
/*
if (srb[t]<=srmovep[t]-srmove[t])srmuki[t]=1;
if (srb[t]>=srmovep[t]+srmove[t])srmuki[t]=0;
*/
break;

/*
case 4:
if (srmove[t]==0){srmuki[t]=0;}else{srmuki[t]=1;}
if (sra[t]-fx<-1100-src[t]){sra[t]=fymax+fx+scrollx;}
if (sra[t]-fx>24000+scrollx){sra[t]=-1100-src[t]+fx;}
break;
*/

case 5:
if (srmove[t]==0){srmuki[t]=0;}else{srmuki[t]=1;}
if (srb[t]-fy<-2100){srb[t]=fymax+fy+scrolly+2000;}
if (srb[t]-fy>fymax+scrolly+2000){srb[t]=-2100+fy;}
break;

case 6:
if (sron[t]==1)srf[t]=40;
break;

case 7:
break;


}//sw

//if (srtype[t]==1){sre[10]=300;sre[11]=300;}

//忔偭偨偲偒
if (!(mztm>=1 && mztype==1 && actaon[3]==1) && mhp>=1){
if (ma+mnobia>xx[8]+xx[0] && ma<xx[8]+xx[12]-xx[0] && mb+mnobib>xx[9] && mb+mnobib<xx[9]+xx[1] && md>=-100){
mb=xx[9]-mnobib+100;
//if (sracttype[t]!=7)mzimen=1;

if (srtype[t]==1){sre[10]=900;sre[11]=900;}

if (srsp[t]!=12){
mzimen=1;md=0;
}else {
//偡傋傝
//md=0;mrzimen=1;mzimen=1;
md=-800;
}


/*
md=0;
if ((sracttype[t]==1 || sracttype[t]==6) && sron[t]==1)mb+=sre[t];

if (sracttype[t]==2 || sracttype[t]==4){
if (srmuki[t]==0)ma-=srsok[t];
if (srmuki[t]==1)ma+=srsok[t];
}
*/

//棊壓
if ((sracttype[t]==1) && sron[t]==0)sron[t]=1;

if (sracttype[t]==1 && sron[t]==1 || sracttype[t]==3 || sracttype[t]==5){
mb+=sre[t];
//if (srmuki[t]==0)
//if (srf[t]<0)
//if (srmuki[t]==1)
//if (srf[t]>0)
//mb+=srsok[t];
}

if (sracttype[t]==7){
if (actaon[2]!=1){md=-600;mb-=810;}
if (actaon[2]==1){mb-=400;md=-1400;mjumptm=10;}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -