summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xCHANGELOG.TXT9
-rwxr-xr-xVERSION.TXT2
-rw-r--r--effects.h49
-rw-r--r--global.h3
-rw-r--r--main.cpp4
-rw-r--r--towernbullet.h4
6 files changed, 56 insertions, 15 deletions
diff --git a/CHANGELOG.TXT b/CHANGELOG.TXT
index 13fc4f9..ab75159 100755
--- a/CHANGELOG.TXT
+++ b/CHANGELOG.TXT
@@ -1,12 +1,15 @@
===================================================================
Next version:
-0.7.1-2_PR
+0.7.1-3_PR
TODOs:
-Bullet die effect (Resource is ready now), apply it to Wave of
-Photon.
Try fake multi-thread effect loading.
+New levels.
Pre-Released versions:
+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.
+
0.7.1-1_PR (b64)
New level: Wave of Photon. A lazy level again. Despite of a new
class, it's a copy of "photon school".
diff --git a/VERSION.TXT b/VERSION.TXT
index 671ef84..da34005 100755
--- a/VERSION.TXT
+++ b/VERSION.TXT
@@ -1 +1 @@
-0.7.1-1_PR (b64) \ No newline at end of file
+0.7.1-2_PR (b65) \ No newline at end of file
diff --git a/effects.h b/effects.h
index 0443754..d37eb90 100644
--- a/effects.h
+++ b/effects.h
@@ -32,11 +32,11 @@ void SCEffect_Attatch()
bullet[i].sccolor=0x80FFFFFF;
}
}
-void SCEffect_Process()
+void SCEffect_Process(int i)
{
- for (int i=1;i<=bulcnt;++i)
- {
- if (!bullet[i].exist||bullet[i].bullettype!=254)continue;//If this bullet doesn't exist or is not of this type, do not render it.
+ //for (int i=1;i<=bulcnt;++i)
+ //{
+ if (!bullet[i].exist||bullet[i].bullettype!=254)return;//If this bullet doesn't exist or is not of this type, do not render it.
if (!DisablePlayer)
{
if (LOWFPS)
@@ -60,7 +60,6 @@ void SCEffect_Process()
}
double dis=GetDist(bullet[i].bulletpos,playerpos);//Get distance between player and bullet
if (GETA(bullet[i].sccolor)<=0x0A||bullet[i].bulletpos.x<=-10||bullet[i].bulletpos.x>=800||bullet[i].bulletpos.y<=-10||bullet[i].bulletpos.y>=600)
- //If collision is detected or the bullet flys out of screen, delete it.
{
bullet[i].exist=false;
bullet[i].bulletpos.x=bullet[i].bulletpos.y=0;
@@ -77,8 +76,7 @@ void SCEffect_Process()
bulletspr[grey]->SetColor(bullet[i].sccolor);
bulletspr[grey]->RenderEx(bullet[i].bulletpos.x+2.4,bullet[i].bulletpos.y+2.4,0,0.2,0);
}
- }
-
+ //}
}
void BulletEffect_Attatch(int n)
{
@@ -95,3 +93,40 @@ void BulletEffect_Process(int n)
if (bullet[n].effbrk<=0)
bullet[n].scale-=0.04,bullet[n].effbrk=17;
}
+int BulletEffect_Death(Bullet a,DWORD color)
+{
+ int i;
+ if (bulcnt==0)
+ bulcnt=i=1;
+ else
+ {
+ for (i=1;i<=bulcnt;++i)
+ if (!bullet[i].exist)break;
+ if (i>bulcnt)bulcnt=i;
+ }
+ bullet[i].exist=true;
+ bullet[i].bullettype=253;
+ bullet[i].bulletpos.x=a.bulletpos.x;
+ bullet[i].bulletpos.y=a.bulletpos.y;
+ bullet[i].bulletdir.x=bullet[i].bulletdir.y=bullet[i].dist=0;
+ bullet[i].bulletspeed=0;
+ bullet[i].alterColor=circle;
+ bullet[i].scollable=false;
+ bullet[i].scale=1;
+ bullet[i].sccolor=SETA(color,0x80);
+ bullet[i].effbrk=7;
+ return i;
+}
+void BulletDeath_Process(int i)
+{
+ if (!bullet[i].exist)return;
+ if (LOWFPS)
+ bullet[i].effbrk-=17;
+ 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);
+ 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 860569e..12686d3 100644
--- a/global.h
+++ b/global.h
@@ -64,7 +64,7 @@ Text:blnsns.png
"Multiplier bonus!" 0,235,163,21
*/
enum TColors
-{green=0,blue,yellow,purple,red,white,dblue,orange,grey,COLOR_COUNT};
+{green=0,blue,yellow,purple,red,white,dblue,orange,grey,circle,COLOR_COUNT};
hgeSprite *bulletspr[COLOR_COUNT],*towerspr[COLOR_COUNT];
const double zero=1e-5;
vector2d playerpos;
@@ -487,6 +487,7 @@ TextureRect GetTextureRect(int type,TColors color)
case dblue:return TextureRect(24,0,24,24);
case orange:return TextureRect(72,0,24,24);
case grey:return TextureRect(96,0,24,24);
+ case circle:return TextureRect(24,24,24,24);
}
}
if (type==1)
diff --git a/main.cpp b/main.cpp
index 7670dca..76688a0 100644
--- a/main.cpp
+++ b/main.cpp
@@ -579,12 +579,14 @@ bool FrameFunc()
case 7:ProcessBullet7(i);break;
case 8:ProcessBullet8(i);break;
case 9:ProcessBullet9(i);break;
+ case 253:BulletDeath_Process(i);break;
+ case 254:SCEffect_Process(i);break;
case 255:ProcessBullet255(i);break;
}
}
for (int i=1;i<=nonamecnt;++i)if (noname[i].Exist())noname[i].Process();
ProcessPlayer();
- SCEffect_Process();
+ //SCEffect_Process();
RefreshScore();
{
if (ATarg.visible)ATarg.TargFollowPlayer(),ATarg.TargRender();
diff --git a/towernbullet.h b/towernbullet.h
index 3f48557..09d60e0 100644
--- a/towernbullet.h
+++ b/towernbullet.h
@@ -1938,7 +1938,7 @@ public:
}
void Update()
{
- ProcessBullet2(hbul);
+ ProcessBullet2(hbul,false);
brk+=hge->Timer_GetDelta();
if (brk>blim)
{
@@ -1946,7 +1946,7 @@ public:
for (int i=0;i<200;++i)
{
if (trail[i])
- if (bullet[trail[i]].lifetime>ml)bullet[trail[i]].exist=false,trail[i]=0;
+ if (bullet[trail[i]].lifetime>ml)BulletEffect_Death(bullet[trail[i]],0x8000CCFF),bullet[trail[i]].exist=false,trail[i]=0;
}
rad+=pi/16.0f;
vector2d uv=ToUnitCircle(vector2d(1,-k));uv.Swap();