aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar chirs241097@gmail.com <chirs241097@gmail.com@c17bf020-1265-9734-9302-a83f62007ddb> 2014-02-21 14:47:28 +0000
committerGravatar chirs241097@gmail.com <chirs241097@gmail.com@c17bf020-1265-9734-9302-a83f62007ddb> 2014-02-21 14:47:28 +0000
commit6ee08bbdaee6355f80d4e048f2afecfd26ba8477 (patch)
treef1602560f1f127dc100e52a245c3d242e750f64a
parentc80fe050d6d175c5971a7b77e04a66a5ee161394 (diff)
downloadbullet-lab-remix-6ee08bbdaee6355f80d4e048f2afecfd26ba8477.tar.xz
M trunk/CHANGELOG.TXT
M trunk/VERSION.TXT M trunk/effects.h M trunk/global.h M trunk/levels.h M trunk/main.cpp M trunk/menus.h M trunk/towernbullet.h
-rwxr-xr-xCHANGELOG.TXT12
-rwxr-xr-xVERSION.TXT2
-rw-r--r--effects.h4
-rw-r--r--global.h3
-rw-r--r--levels.h46
-rw-r--r--main.cpp2
-rw-r--r--menus.h1
-rw-r--r--towernbullet.h38
8 files changed, 71 insertions, 37 deletions
diff --git a/CHANGELOG.TXT b/CHANGELOG.TXT
index ab75159..931b865 100755
--- a/CHANGELOG.TXT
+++ b/CHANGELOG.TXT
@@ -1,11 +1,19 @@
===================================================================
Next version:
-0.7.1-3_PR
+0.7.1-5_PR
TODOs:
-Try fake multi-thread effect loading.
New levels.
Pre-Released versions:
+0.7.1-4_PR (b67)
+New level (name and placement undetermined).
+Fix level transition mismatches.
+Improved accelerated bullets.
+
+0.7.1-3_PR (b66)
+Fix a few glitches. Removing some useless interfaces for BLR I.
+Change "Dangerous Target" for proper difficulty.
+
0.7.1-2_PR (b65)
Bullet death effect, applied to Wave of Photon. It seems buggy.
Fixed something left for debuging in the last commit.
diff --git a/VERSION.TXT b/VERSION.TXT
index da34005..185c66a 100755
--- a/VERSION.TXT
+++ b/VERSION.TXT
@@ -1 +1 @@
-0.7.1-2_PR (b65) \ No newline at end of file
+0.7.1-4_PR (b67) \ No newline at end of file
diff --git a/effects.h b/effects.h
index d37eb90..9967d78 100644
--- a/effects.h
+++ b/effects.h
@@ -125,8 +125,8 @@ void BulletDeath_Process(int i)
else
--bullet[i].effbrk;
if (GETA(bullet[i].sccolor)<=10)return (void)(bullet[i].exist=false);
- if (bullet[i].effbrk<=0)
- bullet[i].effbrk=7,bullet[i].scale+=0.05,bullet[i].sccolor=SETA(bullet[i].sccolor,GETA(bullet[i].sccolor)-3);
+ if (bullet[i].effbrk<=0&&Current_Position==1)
+ bullet[i].effbrk=7,bullet[i].scale+=0.1,bullet[i].sccolor=SETA(bullet[i].sccolor,GETA(bullet[i].sccolor)-6);
bulletspr[circle]->SetColor(bullet[i].sccolor);
bulletspr[circle]->RenderEx(bullet[i].bulletpos.x+7.2,bullet[i].bulletpos.y+7.2,0,0.6*bullet[i].scale);
}
diff --git a/global.h b/global.h
index 12686d3..2ba3178 100644
--- a/global.h
+++ b/global.h
@@ -92,7 +92,7 @@ struct Bullet
bool exist;
int whirem,whiskp,yelbrk;
int exp1,exp2;
- int lifetime;
+ double lifetime;
bool scollable;
double scale;int effbrk;
TColors alterColor;
@@ -269,7 +269,6 @@ int p2t1,p2t2,p2t3,p2t4;
int whicnt,whrcnt,shots,clrusg;
bool yelattrib;
bool Complete=false;
-bool Refliction=false;
double linerad=0;
double bsscale;
long long score,scminus;
diff --git a/levels.h b/levels.h
index e14cfc2..8eb7759 100644
--- a/levels.h
+++ b/levels.h
@@ -1915,7 +1915,7 @@ void Level6Part17()
if (rand()%100<80)
pnt=CreateBullet7(ATarg.targpos.x,ATarg.targpos.y,3,500);
else
- pnt=CreateBullet9(ATarg.targpos.x,ATarg.targpos.y,3,500,36,500);
+ pnt=CreateBullet6(ATarg.targpos.x,ATarg.targpos.y,4,1000);
bullet[pnt].dist=1;bullet[pnt].bulletdir=vector2d(0,0);
}
}
@@ -2563,6 +2563,7 @@ void Level7Part5()
}
if (tower[1].towertype==8)
{
+ BTarg.TargHide();
if (frameskips>TenSeconds/5)
{
frameskips=0;
@@ -2582,7 +2583,7 @@ void Level7Part5()
}
void Level7Part6()
{
- frameleft=AMinute;clrtime=2;
+ frameleft=AMinute;clrtime=2;towcnt=0;
DisableAllTower=false;
if (IfShowTip)
{
@@ -2700,13 +2701,52 @@ void Level7Part11()
{
if (rand()%100>49)b=vector2d(-10,rand()%580+10);else b=vector2d(810,rand()%580+10);
}
- wop[i].Init(a,b,1000+(AMinute-frameleft)/(double)AMinute*1000,0.02);
+ wop[i].Init(a,b,1+(AMinute-frameleft)/(double)AMinute,0.02);
break;
}
}
for (int i=0;i<100;++i)
if (wop[i].active)wop[i].Update();
}
+void Level7Part12()
+{
+ frameleft=AMinute;clrtime=2;towcnt=0;
+ DisableAllTower=false;
+ if (IfShowTip)
+ {
+ IfShowTip=false;
+ FadeTip=false;
+ Current_Position=2;
+ ShowTip("It's not really here!");
+ }
+ if (Current_Position==1)
+ {
+ ++part;All2pnt();avabrk=1.0f;avacurbrk=0;
+ }
+}
+void L7P13Creator(vector2d p,int cnt,TColors col)
+{
+ for (int i=0;i<cnt;++i)
+ {
+ int pnt=CreateBullet2(p.x,p.y,6,frameleft*pi/AMinute+i*(2*pi/cnt));
+ // ^
+ // Nowhere can be safe!
+ bullet[pnt].alterColor=col;
+ bullet[pnt].bulletaccel=-0.003;bullet[pnt].limv=((AMinute-frameleft)/(double)AMinute)+1.0f;
+ }
+}
+void Level7Part13()
+{
+ avacurbrk+=hge->Timer_GetDelta();
+ avabrk=(frameleft/(double)AMinute)*0.5f+0.5f;
+ if(avacurbrk>avabrk)
+ {
+ avacurbrk=0;
+ L7P13Creator(vector2d(400,250),60,red);
+ L7P13Creator(vector2d(350,336.6),60,green);
+ L7P13Creator(vector2d(450,336.6),60,blue);
+ }
+}
//vvvvvvvvvvvvvvvvvvvvvv Old Levels vvvvvvvvvvvvvvvvvvvvvv//
/*void Level1Part2()//Simple tower8-discard
{
diff --git a/main.cpp b/main.cpp
index 76688a0..18e1cd1 100644
--- a/main.cpp
+++ b/main.cpp
@@ -405,6 +405,8 @@ void CallLevels()
if (level==7&&part==9)Level7Part9();
if (level==7&&part==10)Level7Part10();
if (level==7&&part==11)Level7Part11();
+ if (level==7&&part==12)Level7Part12();
+ if (level==7&&part==13)Level7Part13();
/*if (level==1&&part==3)Level1Part3();
if (level==1&&part==4)Level1Part4();
if (level==1&&part==5)Level1Part5();
diff --git a/menus.h b/menus.h
index 6fb523c..4bd6c60 100644
--- a/menus.h
+++ b/menus.h
@@ -103,7 +103,6 @@ void StartGUI_FrameFnk()
memset(tower,0,sizeof(tower));
memset(bullet,0,sizeof(bullet));
Complete=false;
- Refliction=false;
Current_Position=1;
Level1Part1();
IfCallLevel=true;
diff --git a/towernbullet.h b/towernbullet.h
index 09d60e0..01c9570 100644
--- a/towernbullet.h
+++ b/towernbullet.h
@@ -346,16 +346,7 @@ void ProcessBullet1(int i)
void ProcessBullet2(int i)
{
if (!bullet[i].exist||bullet[i].bullettype!=2)return;//If this bullet doesn't exist or is not of this type, do not render it.
- if (LOWFPS)bullet[i].lifetime+=17;else ++bullet[i].lifetime;
- if (bullet[i].lifetime>=15000&&Refliction)
- {
- bullet[i].exist=false;
- bullet[i].bulletpos.x=bullet[i].bulletpos.y=0;
- bullet[i].bulletdir.x=bullet[i].bulletdir.y=0;
- bullet[i].dist=0;
- bullet[i].bullettype=0;
- return;
- }
+ if (Current_Position==1)bullet[i].lifetime+=hge->Timer_GetDelta();
if (!DisablePlayer)
{
/*if (LOWFPS)
@@ -371,7 +362,8 @@ void ProcessBullet2(int i)
//bullet[i].bulletpos.y-=bsscale*bullet[i].bulletspeed*(bullet[i].bulletdir.y)/20;//Process bullet's y coor.
}*/
//experimental new coor processing code, FPS independent
- if (bullet[i].bulletspeed<bullet[i].limv)bullet[i].bulletspeed+=bullet[i].bulletaccel*(1000.0f/hge->Timer_GetFPS());
+ if (bullet[i].bulletaccel>0&&bullet[i].bulletspeed<bullet[i].limv)bullet[i].bulletspeed+=bullet[i].bulletaccel*(1000.0f/hge->Timer_GetFPS());
+ if (bullet[i].bulletaccel<0&&bullet[i].bulletspeed>bullet[i].limv)bullet[i].bulletspeed+=bullet[i].bulletaccel*(1000.0f/hge->Timer_GetFPS());
bullet[i].bulletpos.x-=bsscale*bullet[i].bulletspeed*(bullet[i].bulletdir.x)/20*(1000.0f/hge->Timer_GetFPS());
bullet[i].bulletpos.y-=bsscale*bullet[i].bulletspeed*(bullet[i].bulletdir.y)/20*(1000.0f/hge->Timer_GetFPS());
}
@@ -379,18 +371,12 @@ void ProcessBullet2(int i)
double dis=GetDist(bullet[i].bulletpos,playerpos);//Get distance between player and bullet
if (bullet[i].bulletpos.x<=-25||bullet[i].bulletpos.x>=825||bullet[i].bulletpos.y<=-25||bullet[i].bulletpos.y>=625)
{
- if (Refliction)
- bullet[i].bulletdir.x=-bullet[i].bulletdir.x,
- bullet[i].bulletdir.y=-bullet[i].bulletdir.y;
- else
- {
- bullet[i].exist=false;
- bullet[i].bulletpos.x=bullet[i].bulletpos.y=-999;
- bullet[i].bulletdir.x=bullet[i].bulletdir.y=0;
- bullet[i].dist=0;
- bullet[i].bullettype=0;
- return;
- }
+ bullet[i].exist=false;
+ bullet[i].bulletpos.x=bullet[i].bulletpos.y=-999;
+ bullet[i].bulletdir.x=bullet[i].bulletdir.y=0;
+ bullet[i].dist=0;
+ bullet[i].bullettype=0;
+ return;
}
if (dis<=6&&clrrange<1e-5&&clrrad-pi/2<1e-7)
//If collision is detected or the bullet flys out of screen, delete it.
@@ -1915,9 +1901,8 @@ class WOP
{
private:
int trail[200];//Pointer to bullet[] in this trail
- double brk,blim,rad,k;//step break
+ double brk,blim,rad,k,ml;//step break
vector2d a,b;
- int ml;
Bullet hbul;//hidden header bullet, no col.
bool OutOfBound()
{
@@ -1929,7 +1914,7 @@ private:
}
public:
bool active;
- void Init(vector2d _a,vector2d _b,int _ml,double _bl)//ml=Max Length, bl=BLumia
+ void Init(vector2d _a,vector2d _b,double _ml,double _bl)//ml=Max Length, bl=BLumia
{
a=_a,b=_b,ml=_ml,blim=_bl;rad=0;
if (fabs(b.x-a.x)<1e-6)return;k=(b.y-a.y)/(b.x-a.x);
@@ -1938,6 +1923,7 @@ public:
}
void Update()
{
+ if (Current_Position!=1)return;
ProcessBullet2(hbul,false);
brk+=hge->Timer_GetDelta();
if (brk>blim)