aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar chirs241097@gmail.com <chirs241097@gmail.com@c17bf020-1265-9734-9302-a83f62007ddb> 2014-03-22 12:17:21 +0000
committerGravatar chirs241097@gmail.com <chirs241097@gmail.com@c17bf020-1265-9734-9302-a83f62007ddb> 2014-03-22 12:17:21 +0000
commitc37d62fd1b979bc6758ad72d12346baba0f9b69f (patch)
tree304f44610fded486b1e19a48ecc6cf1d22397498
parentc28783ee430b106b636bf636bddf0799126a19d5 (diff)
downloadbullet-lab-remix-c37d62fd1b979bc6758ad72d12346baba0f9b69f.tar.xz
Modify "Achromatopsia". Report build and version in the log file.
Fix crashes in mingw-64 build.
-rwxr-xr-xCHANGELOG.TXT3
-rw-r--r--levels.h8
-rw-r--r--main.cpp14
-rw-r--r--scoresystem.h2
-rw-r--r--towernbullet.h58
5 files changed, 68 insertions, 17 deletions
diff --git a/CHANGELOG.TXT b/CHANGELOG.TXT
index cc98a75..da257ad 100755
--- a/CHANGELOG.TXT
+++ b/CHANGELOG.TXT
@@ -17,11 +17,14 @@ New level "Double reflective".
Make point bullet additive blending.
Allow bullets to pause before being accelerated.
Modify "Gravity vortex".
+Modify "Achromatopsia". (Thanks to my classmate's advice...)
+Report build and version in the log file.
Add command line argument support. Use "--help" for usage.
Add freetype support to hge. It's still pretty buggy.
Add experimental support for cross compiling with mingw-w64.
(Mingw-w64 build might be the official build in the future.)
Fix blinking HangUpText.
+Fix crashes in mingw-64 build.
Change numeric characters to monospace.
Modify player speed settings.
Beewx still messes up memory... fixed now.
diff --git a/levels.h b/levels.h
index c304ab7..ab1f51d 100644
--- a/levels.h
+++ b/levels.h
@@ -3106,8 +3106,8 @@ achromaGroup aca,acb;
void Levelm1Part7()//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;
+ aca.Init(red,0.075);acb.Init(green,0.075);
+ ++part;avabrk=2.0f;avacurbrk=0;achromab=false;
}
void Levelm1Part8()//Achromatopsia1-child
{
@@ -3117,13 +3117,13 @@ void Levelm1Part8()//Achromatopsia1-child
avacurbrk=0;avabrk=2;
aca.Reverse();acb.Reverse();
}
- aca.Update();acb.Update();
+ aca.Update(1);acb.Update();
}
void Levelm1Part9()//Achromatopsia2
{
frameleft=AMinute;
aca.Init(red,1);acb.Init(green,1);
- ++part;avabrk=1.5f;avacurbrk=0;
+ ++part;avabrk=1.5f;avacurbrk=0;achromab=true;
}
void Levelm1Part10()//Achromatopsia2-child
{
diff --git a/main.cpp b/main.cpp
index 34a8d68..7f41e9f 100644
--- a/main.cpp
+++ b/main.cpp
@@ -832,12 +832,22 @@ int main(int argc,char *argv[])
hge->System_SetState(HGE_LOGFILE, "BLRLOG.txt");
hge->System_Log("%s: Bullet Lab Remix Log File",MAIN_SRC_FN);
#ifdef WIN32
+#ifdef MINGW_BUILD
+ hge->System_Log("%s: Build: MinGW_w64 cross build",MAIN_SRC_FN);
+#else
+ hge->System_Log("%s: Build: Win32 build",MAIN_SRC_FN);
+#endif
+#else
+ hge->System_Log("%s: Build: Unix build",MAIN_SRC_FN);
+#endif
+ hge->System_Log("%s: Version: %s",BLRVERSION);
+#ifdef WIN32
if (_mkdir("./Resources")!=0||_mkdir("./Resources/Music")!=0)
Error("Cannot decompress resources!\nDetailed Information: An error occured while creating folder.\n\nTry restarting the game.");
- hge->System_Log("Folders created successfully.");
+ hge->System_Log("%s: Folders created successfully.",MAIN_SRC_FN);
Expand("BLRData.dtp","Resources");
Expand("BLRMusic.dtp","Resources/Music");
- hge->System_Log("Resources decompressed successfully.");
+ hge->System_Log("%s: Resources decompressed successfully.",MAIN_SRC_FN);
#endif
hge->System_SetState(HGE_FRAMEFUNC, FrameFunc);
hge->System_SetState(HGE_FOCUSLOSTFUNC, Foclost);
diff --git a/scoresystem.h b/scoresystem.h
index afbeaac..0f7939d 100644
--- a/scoresystem.h
+++ b/scoresystem.h
@@ -120,7 +120,7 @@ void Mult_FrameFunc()
MultTimer.SetValue((double)multbrk/((double)TenSeconds/2.0f));
if (valbrk>30)valbrk=0;
MultTimer.Render(playerpos.x+8.4,playerpos.y+8.4);
- MB->SetColor(SETA(0x00FFFFFF,GetAlpha()));
+ MB->SetColor(SETA(0x00FFFFFF,0.8*GetAlpha()));
MB->RenderEx(playerpos.x+8.4,playerpos.y-26.4,0,GetHscle(),1.0f);
}
}
diff --git a/towernbullet.h b/towernbullet.h
index 59613f2..5d6ad95 100644
--- a/towernbullet.h
+++ b/towernbullet.h
@@ -2556,6 +2556,7 @@ public:
}
}
};
+bool achromab,achromaB[100];
class achromaGroup
{
private:
@@ -2598,26 +2599,63 @@ public:
{
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();
+ for(int i=0;i<1000;++i)if(bullets[i].isActive())bullets[i].Reverse();
}
void achroma2pnt()
{
- for(int i=0;i<500;++i)if(bullets[i].isActive())CreateBullet255(bullets[i].bulletpos.x,bullets[i].bulletpos.y,10);
+ for(int i=0;i<1000;++i)if(bullets[i].isActive())CreateBullet255(bullets[i].bulletpos.x,bullets[i].bulletpos.y,10);
}
- void Update()
+ void Update(int msk=0)
{
crbrk-=hge->Timer_GetDelta();
- if(crbrk<=0)
+ if(achromab)
+ {
+ if(crbrk<=0)
+ {
+ crbrk=re.NextDouble(0,frameleft/(double)AMinute)*(part==36?0.07:0.02)+0.03;
+ for(int i=0;i<1000;++i)
+ if(!bullets[i].isActive())
+ {
+ bullets[i].achromaInit(vector2d(re.NextDouble(10,790),-5),col,llim);
+ break;
+ }
+ }
+ for(int i=0;i<1000;++i)if(bullets[i].isActive())bullets[i].achromaUpdate();
+ }
+ else
{
- 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())
+ if(crbrk<=0)
{
- bullets[i].achromaInit(vector2d(re.NextDouble(10,790),10),col,llim);
- break;
+ crbrk=1;
+ if(msk)
+ {
+ memset(achromaB,0,sizeof(achromaB));
+ for(int i=0;i<80;++i)achromaB[i]=re.NextInt(0,1);
+ }
+ for(int i=0;i<80;++i)
+ {
+ if(achromaB[i]&&col==green)
+ {
+ for(int j=0;j<1000;++j)
+ if(!bullets[j].isActive())
+ {
+ bullets[j].achromaInit(vector2d(i*10,-5),col,llim);
+ break;
+ }
+ }
+ if(!achromaB[i]&&col==red)
+ {
+ for(int j=0;j<500;++j)
+ if(!bullets[j].isActive())
+ {
+ bullets[j].achromaInit(vector2d(i*10,-5),col,llim);
+ break;
+ }
+ }
+ }
}
+ for(int i=0;i<500;++i)if(bullets[i].isActive())bullets[i].achromaUpdate();
}
- for(int i=0;i<500;++i)if(bullets[i].isActive())bullets[i].achromaUpdate();
}
};
class yellowGroup