summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xCHANGELOG.TXT9
-rwxr-xr-xVERSION.TXT2
-rw-r--r--levels.h53
-rw-r--r--main.cpp4
-rw-r--r--towernbullet.h91
5 files changed, 143 insertions, 16 deletions
diff --git a/CHANGELOG.TXT b/CHANGELOG.TXT
index 56b6c9f..b152580 100755
--- a/CHANGELOG.TXT
+++ b/CHANGELOG.TXT
@@ -1,8 +1,15 @@
===================================================================
Next version:
-0.8.x?
+??????
+New levels...
+Rename function entries for Level -1
+Add missing tips.
Pre-Released versions:
+0.8.0-0_PR (b74)
+New level Achromatopsia.
+Rename "Minesweeper"->"Spiky", add noname2pnt.
+
0.7.3-0_PR (b73)
This is a pre-release version of 0.7.2-2_PR.
This version is released to public for level previewing.
diff --git a/VERSION.TXT b/VERSION.TXT
index b54fdd8..2f082c4 100755
--- a/VERSION.TXT
+++ b/VERSION.TXT
@@ -1 +1 @@
-0.7.3-0_PR (b73) \ No newline at end of file
+0.8.0-0_PR (b74) \ No newline at end of file
diff --git a/levels.h b/levels.h
index 9959b01..9140091 100644
--- a/levels.h
+++ b/levels.h
@@ -3057,31 +3057,64 @@ void Level7Part30()
}
}
}
-void Level7Part31()//Minesweeper
+void Level7Part31()//Spiky
{
- frameleft=AMinute;
+ frameleft=AMinute+ThirtySeconds;
All2pnt();towcnt=0;
Lasercnt=0;
++part;avabrk=1;avacurbrk=0.5;
}
-void Level7Part32()//Minesweeper-child
+void Level7Part32()//Spiky-child
{
avacurbrk+=hge->Timer_GetDelta();
if (avacurbrk>avabrk)
{
- avacurbrk=0;avabrk=frameleft/(double)AMinute*0.7+0.3;
- for (int i=1;i<=nonamecnt+1;++i)
+ avacurbrk=0;avabrk=frameleft/(double)(AMinute+ThirtySeconds)*0.4+0.1;
+ for (int i=0;i<1000;++i)
{
if (!noname[i].Exist())
{
if (frameleft<TenSeconds)
- noname[i].Init(re.NextDouble(0,800),4,100,150,70,0x8033CCFF);
+ noname[i].Init(re.NextDouble(0,800),4,100,150,60,0x8033CCFF);
else if (frameleft<TwentySeconds)
- noname[i].Init(re.NextDouble(0,800),4,100,150,75,0x8033CCFF);
- else noname[i].Init(re.NextDouble(0,800),4,100,150,80,0x8033CCFF);
- if (i>nonamecnt)nonamecnt=i;break;
+ noname[i].Init(re.NextDouble(0,800),4,100,150,70,0x8033CCFF);
+ else noname[i].Init(re.NextDouble(0,800),4,100,150,75,0x8033CCFF);
+ break;
}
}
}
- for (int i=1;i<=nonamecnt;++i)if (noname[i].Exist())noname[i].Process();
+ for (int i=0;i<1000;++i)if (noname[i].Exist())noname[i].Process();
+}
+achromaGroup aca,acb;
+void Level7Part33()//Achromatopsia1
+{
+ frameleft=AMinute;for(int i=0;i<1000;++i)if(noname[i].Exist())noname[i].noname2pnt();
+ aca.Init(red,0.2);acb.Init(green,0.2);
+ ++part;avabrk=2.0f;avacurbrk=0;
+}
+void Level7Part34()//Achromatopsia1-child
+{
+ avacurbrk+=hge->Timer_GetDelta();
+ if (avacurbrk>avabrk)
+ {
+ avacurbrk=0;avabrk=2;
+ aca.Reverse();acb.Reverse();
+ }
+ aca.Update();acb.Update();
+}
+void Level7Part35()//Achromatopsia2
+{
+ frameleft=AMinute;
+ aca.Init(red,1);acb.Init(green,1);
+ ++part;avabrk=1.5f;avacurbrk=0;
+}
+void Level7Part36()//Achromatopsia2-child
+{
+ avacurbrk+=hge->Timer_GetDelta();
+ if (avacurbrk>avabrk)
+ {
+ avacurbrk=0;avabrk=2;
+ aca.Reverse();acb.Reverse();
+ }
+ aca.Update();acb.Update();
}
diff --git a/main.cpp b/main.cpp
index 5836fe5..1820ace 100644
--- a/main.cpp
+++ b/main.cpp
@@ -452,6 +452,10 @@ void CallLevels()
if (level==7&&part==30)Level7Part30();
if (level==7&&part==31)Level7Part31();
if (level==7&&part==32)Level7Part32();
+ if (level==7&&part==33)Level7Part33();
+ if (level==7&&part==34)Level7Part34();
+ if (level==7&&part==35)Level7Part35();
+ if (level==7&&part==36)Level7Part36();
if (level==1&&part==5)level=2,part=0;
if (level==2&&part==10)level=3,part=0;
if (level==3&&part==7)level=4,part=0;
diff --git a/towernbullet.h b/towernbullet.h
index fce9fdd..a9bae85 100644
--- a/towernbullet.h
+++ b/towernbullet.h
@@ -1529,12 +1529,35 @@ public:
done=false;
PMod=pmd;
r1lim=_r1lim;r2lim=_r2lim;boomlim=_boomlim;
- if (re.NextInt(0,99)>boomlim)
+ if (re.NextInt(0,100)>boomlim)
pos=re.NextInt(0,600);
else
pos=999;
untitledlas.SetTexture(SprSheet,0,264,248,8);
}
+ void noname2pnt()
+ {
+ if(!las)
+ CreateBullet255(untitledbul.bulletpos.x,untitledbul.bulletpos.y,10);
+ else
+ {
+ for (int i=0;i<60;++i)
+ {
+ double trad=(i/60.0f)*pi*2;
+ vector2d a;
+ if (!(i%PMod))
+ {
+ a.x=cos(trad)*range2;a.y=sin(trad)*range2;
+ }
+ else
+ {
+ a.x=cos(trad)*range1;a.y=sin(trad)*range1;
+ }
+ a=a+untitledbul.bulletpos;
+ CreateBullet255(a.x,a.y,10);
+ }
+ }
+ }
void Process()
{
if (!las)
@@ -1569,7 +1592,7 @@ public:
b.x=cos(trad)*(range1-10);b.y=sin(trad)*(range1-10);
}
for (int i=60;i<MaxRes;++i)untitledlas.InsPoint(a,b,color);
- }
+ }else
if (las)
{
untitledlas.RenCtr=vector2d(x+7.2,y+7.2);
@@ -1620,10 +1643,10 @@ public:
}
}
}noname[1000];
-int nonamecnt;
//"CTarg"
-struct SimpleBullet
+class SimpleBullet
{
+public:
TColors aC,aC2;
vector2d bulletpos;
int scollable,lastcoll;
@@ -2360,3 +2383,63 @@ public:
}
}
};
+class achromaGroup
+{
+private:
+ class achromaBullet:private SimpleBullet
+ {
+ private:
+ bool active;
+ double spd,acc,lim;
+ public:
+ bool isActive(){return active;}
+ void achromaInit(vector2d pos,TColors initcol,double _lim)
+ {
+ bulletpos=pos;spd=0;acc=0.0005;lim=_lim;rot=0;
+ lastcoll=0;aC=initcol;aC2=COLOR_COUNT;
+ active=true;
+ }
+ void Reverse()
+ {
+ spd=0;
+ if(aC==green)aC=red;
+ else if(aC==red)aC=green;
+ }
+ void achromaUpdate()
+ {
+ if(aC==red)lastcoll=1;//ignore coll for red.
+ bulletpos.y+=spd*(1000.0f/hge->Timer_GetFPS());
+ if(spd+acc*(1000.0f/hge->Timer_GetFPS())<lim)spd+=acc*(1000.0f/hge->Timer_GetFPS());
+ if(bulletpos.y>610)active=false;
+ Update_SimpBul();
+ }
+ }bullets[1000];
+public:
+ double crbrk,llim;TColors col;
+ void Init(TColors initcol,double _llim)
+ {
+ col=initcol;llim=_llim;
+ crbrk=re.NextDouble(0,frameleft/(double)(AMinute+ThirtySeconds))*(part==36?0.07:0.02)+0.03;
+ }
+ void Reverse()
+ {
+ if(col==red)col=green;
+ else if(col==green)col=red;
+ for(int i=0;i<500;++i)if(bullets[i].isActive())bullets[i].Reverse();
+ }
+ void Update()
+ {
+ crbrk-=hge->Timer_GetDelta();
+ if(crbrk<=0)
+ {
+ crbrk=re.NextDouble(0,frameleft/(double)AMinute)*(part==36?0.07:0.02)+0.03;
+ for(int i=0;i<500;++i)
+ if(!bullets[i].isActive())
+ {
+ bullets[i].achromaInit(vector2d(re.NextDouble(10,790),10),col,llim);
+ break;
+ }
+ }
+ for(int i=0;i<500;++i)if(bullets[i].isActive())bullets[i].achromaUpdate();
+ }
+};