From cdd4b2c90bb7bcd020712fb76eb166645139be78 Mon Sep 17 00:00:00 2001 From: chirsz-ever Date: Thu, 25 Jun 2020 16:27:51 +0800 Subject: [PATCH] Fix bug of save points in 1-3 Now if you touch save point flag 2 in 1-3 works but not touch the flag 1 before, you will revival on the place of the flag 2 correctly after die --- README.md | 6 +++--- src/main.cpp | 12 ++++++------ 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 1c5966a..f319726 100644 --- a/README.md +++ b/README.md @@ -41,6 +41,6 @@ The following assumes that you are using TDM-GCC64 9.2 with DxLib version - [x] Use Unicode string literal, make the game's title displays normally on Windows with any character sets - [ ] fix bugs - - [ ] stars disappear in the begining of world 3 sometimes - - [ ] save points in world 3 works incorrectly - - [ ] super star in world 2-2 fly straight up + - [ ] stars disappear in the begining of 1-3 sometimes + - [x] save points in 1-3 works incorrectly + - [ ] super star in world 1-2-2 fly straight up diff --git a/src/main.cpp b/src/main.cpp index 1f8dc33..2552aca 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -635,7 +635,7 @@ drawarc((sa[t]-fx)/100+15-1,(sb[t]-fy)/100,10,10); } //中間 -if (stype[t]==500){ +if (stype[t]>=500 && stype[t]<510){ drawimage(grap[20][4],(sa[t]-fx)/100,(sb[t]-fy)/100); } }}//t @@ -1868,8 +1868,8 @@ if (stype[t]==105 && mzimen==0 && md>=0){ta[1]-=1000;ta[2]+=1000;sxtype[t]++;if if (stype[t]==300 && mtype==0 && mb=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; +if ((stype[t]>=500 && stype[t]<510) && mtype==0 && mhp>=1){ +tyuukan=stype[t]-500+1; sa[t]=-80000000; } @@ -3346,7 +3346,7 @@ if (stagedate[t][tt]>=1 && stagedate[t][tt]<=255)xx[10]=(int)stagedate[t][tt]; xx[21]=tt*29;xx[22]=t*29-12;xx[23]=xx[10]; if (xx[10]>=1 && xx[10]<=19 && xx[10]!=9){tyobi(tt*29,t*29-12,xx[10]);} if (xx[10]>=20 && xx[10]<=29){sra[srco]=xx[21]*100;srb[srco]=xx[22]*100;src[srco]=3000;srtype[srco]=0;srco++;if (srco>=srmax)srco=0;} -if (xx[10]==30){sa[sco]=xx[21]*100;sb[sco]=xx[22]*100;sc[sco]=3000;sd[sco]=6000;stype[sco]=500;sco++;if (sco>=smax)sco=0;} +if (xx[10]>=30 && xx[10]<40){sa[sco]=xx[21]*100;sb[sco]=xx[22]*100;sc[sco]=3000;sd[sco]=6000;stype[sco]=500+xx[10]-30;sco++;if (sco>=smax)sco=0;} if (xx[10]==40){sa[sco]=xx[21]*100;sb[sco]=xx[22]*100;sc[sco]=6000;sd[sco]=3000;stype[sco]=1;sco++;if (sco>=smax)sco=0;} if (xx[10]==41){sa[sco]=xx[21]*100+500;sb[sco]=xx[22]*100;sc[sco]=5000;sd[sco]=3000;stype[sco]=2;sco++;if (sco>=smax)sco=0;} @@ -3368,7 +3368,7 @@ if (xx[10]==99){sa[sco]=xx[21]*100;sb[sco]=xx[22]*100;sc[sco]=3000;sd[sco]=(12-t if (tyuukan>=1){ xx[17]=0; for (t=0;t=1){ +if ((stype[t]>=500 && stype[t]<510) && tyuukan>=1){ fx=sa[t]-fxmax/2;fzx=fx; ma=sa[t]-fx; mb=sb[t]-fy; @@ -3727,7 +3727,7 @@ byte stagedatex[17][1001]={// { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,97, 0, 0, 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