正文
增加 6 行删除 6 行
5 行未改动6789101112131499 行未改动11411511611711811912012112260 行未改动1831841851861871881891901919 行未改动2012022032042052062072082093 行未改动21321421521621721821922022122223 行未改动5 行未改动#include<thread>#include<random>#include<chrono>#define stdFallingSpeed 7.5//单位px#define prepTime 2000#define frameTime 10#define myWHITE ((Color){255,255,255})#define myBLUE ((Color){10,195,255})99 行未改动void setParameter(double X,double Y,double Speed,int downTime,int dLine,Color c1=myBLUE,Color c2=myWHITE){nowX=X,nowY=Y,speed=Speed,downMoment=prepTime+downTime;decisionLine=dLine;showTime=downMoment-frameTime*DLine[decisionLine].giveY()*1.0/(speed*stdFallingSpeed);//暂未适配非水平判定线fillCol=c1,lineCol=c2;}void showNote(){60 行未改动[](){while(nowNote<=noteCnt){printf("");//由于未知原因,删去这行会导致整个循环不执行if(note[nowNote].giveShowTime()<=calDurationMilliSec(nowTime,startTime)){printf("nowNote:%d nowTime:%d showTime:%d\n",nowNote,calDurationMilliSec(nowTime,startTime),note[nowNote].giveShowTime());note[nowNote].showNote();9 行未改动int main(){initgraph(960,720,EX_SHOWCONSOLE);width=getwidth(),height=getheight();DLine[0].setParameter(0,480,width,480,0,myGOLD);lineCnt=1;for(int i=1;i<=5;i++){3 行未改动note[i*6-2].setParameter(720,0,1,i*600-200,0);note[i*6-1].setParameter(560,0,1,i*600-100,0);note[i*6].setParameter(400,0,1,i*600,0);noteCnt+=6;}startTime=steady_clock::now();getTime();render.rend();render.noteControl();23 行未改动5 行未改动6789101112131499 行未改动11411511611711811912012112260 行未改动1831841851861871881891901919 行未改动2012022032042052062072082093 行未改动21321421521621721821922022122223 行未改动5 行未改动#include<thread>#include<random>#include<chrono>#define stdFallingSpeed 7.5//单位px#define prepTime 2000#define frameTime 10#define myWHITE ((Color){255,255,255})#define myBLUE ((Color){10,195,255})99 行未改动void setParameter(double X,double Y,double Speed,int downTime,int dLine,Color c1=myBLUE,Color c2=myWHITE){nowX=X,nowY=Y,speed=Speed,downMoment=prepTime+downTime;decisionLine=dLine;showTime=downMoment-frameTime*DLine[decisionLine].giveY()*1.0/(speed*stdFallingSpeed);//暂未适配非水平判定线fillCol=c1,lineCol=c2;}void showNote(){60 行未改动[](){while(nowNote<=noteCnt){printf("");//由于未知原因,删去这行会导致整个循环不执行if(note[nowNote].giveShowTime()<=calDurationMilliSec(nowTime,startTime)){printf("nowNote:%d nowTime:%d showTime:%d\n",nowNote,calDurationMilliSec(nowTime,startTime),note[nowNote].giveShowTime());note[nowNote].showNote();9 行未改动int main(){initgraph(960,720,EX_SHOWCONSOLE);width=getwidth(),height=getheight();DLine[0].setParameter(0,480,width,480,0,myGOLD);lineCnt=1;for(int i=1;i<=5;i++){3 行未改动note[i*6-2].setParameter(720,0,1,i*600-200,0);note[i*6-1].setParameter(560,0,1,i*600-100,0);note[i*6].setParameter(400,0,1,i*600,0);noteCnt+=6;}startTime=steady_clock::now();getTime();render.rend();render.noteControl();23 行未改动