aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar chirs241097@gmail.com <chirs241097@gmail.com@c17bf020-1265-9734-9302-a83f62007ddb> 2014-07-04 00:17:07 +0000
committerGravatar chirs241097@gmail.com <chirs241097@gmail.com@c17bf020-1265-9734-9302-a83f62007ddb> 2014-07-04 00:17:07 +0000
commit8bbaaee3319d5490ac0d68c28d309b180ec07f28 (patch)
tree1db6d9ad7500d6c638803b4226f9261bd00ae397
parente2623a2ba1b5789ae299c29804697d004a8cd886 (diff)
downloadbullet-lab-remix-8bbaaee3319d5490ac0d68c28d309b180ec07f28.tar.xz
Change configuration and score file names. Files with their names begin
with "." may be annoying in Windows though... Fix the problem that in-game music won't be resumed when back from pause. Fix the problem that Multpo's won't be removed if a new game is created. Fix the problem that the first tip is not shown correctly if the game is restarted. (Probably) fixed the problem that the sound is played out of game. Prevent Multpo's from "escaping". This happens when fps is extremely low... Adding Multpo for Level2. Update CanonTechno.
-rwxr-xr-xChangeLog16
-rw-r--r--FAQ2
-rw-r--r--Readme2
-rw-r--r--Readme.zh2
-rwxr-xr-xVERSION2
-rw-r--r--global.h2
-rw-r--r--levels.h66
-rw-r--r--main.cpp34
-rw-r--r--menus.h2
-rw-r--r--scorec.h7
-rw-r--r--scoresystem.h14
11 files changed, 94 insertions, 55 deletions
diff --git a/ChangeLog b/ChangeLog
index b844a97..d8de95f 100755
--- a/ChangeLog
+++ b/ChangeLog
@@ -9,16 +9,28 @@ Tests.
Wishlist?
Known bugs:
-?
+HangUpText blinking still exists...
Wishlist:
-Make more data stored in score.cfg.
+Make more data stored in .blrscore.
In-game music bring back.
~~Now Playing(Music Room)~~
~~BLR script virtual machine~~(long long-term! probably the core
of next BLR.)
Pre-Released versions:
+0.9.5-0 (r95)
+Change configuration and score file names. Files with their names
+begin with "." may be annoying in Windows though...
+Fix the problem that in-game music won't be resumed when back from pause.
+Fix the problem that Multpo's won't be removed if a new game is created.
+Fix the problem that the first tip is not shown correctly if the game
+is restarted.
+(Probably) fixed the problem that the sound is played out of game.
+Prevent Multpo's from "escaping". This happens when fps is extremely low...
+Adding Multpo for Level2.
+Update CanonTechno.
+
0.9.2-0 (r94)
Mod, mod, mod...!
Assessment mode is mostly frozen now.
diff --git a/FAQ b/FAQ
index 516ebb1..aae8601 100644
--- a/FAQ
+++ b/FAQ
@@ -31,7 +31,7 @@ Q: (In Windows)
A: DirectX initialization failed.
If you get this message after changing an option, the cause might
be your option is not supported by your computer. You can purge
- the config file (back up your score and remove BLR.cfg) and
+ the config file (back up your score and remove .blrrc) and
restart the game.
If you get this message on the first startup, you are just unlucky.
HGE, which is the render engine used in BLR is really low-ended
diff --git a/Readme b/Readme
index 9698b0d..0066d82 100644
--- a/Readme
+++ b/Readme
@@ -120,7 +120,7 @@ Just extract all files in the archive somewhere, then start the only executable
file in it.
If, suddenly, you can't run it one day...
-Remove blr.cfg (remember to backup your score.cfg first!) then restart the game.
+Remove .blrrc then restart the game.
It will ask you for initial settings.
If this can't solve your problem, read FAQ.TXT for more.
diff --git a/Readme.zh b/Readme.zh
index ebac9f4..7f8bb01 100644
--- a/Readme.zh
+++ b/Readme.zh
@@ -102,7 +102,7 @@ GPU&VRAM: 非常快的渲染速度。
-全色盲(<-删除线)
如果有一天你突然无法运行它了…
-删掉blr.cfg(记得备份score.cfg!)然后重新运行。
+删掉.blrrc然后重新运行。
它会重新进行初始化设定。
如果这样无法解决你的问题,去看看FAQ.TXT。。。
diff --git a/VERSION b/VERSION
index 57cb6f3..f8a919d 100755
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-0.9.2-0 (r94) \ No newline at end of file
+0.9.5-0 (r95) \ No newline at end of file
diff --git a/global.h b/global.h
index e6ebb0a..1acc1e0 100644
--- a/global.h
+++ b/global.h
@@ -341,7 +341,7 @@ static const char* archive[]={
};
#endif
//static const char* GLOBAL_H_FN="global.h";
-static const char* BLRVERSION="0.9.2-0 (r94)";
+static const char* BLRVERSION="0.9.5-0 (r95)";
static const char *months="JanFebMarAprMayJunJulAugSepOctNovDec";
char *parseDate(const char *date)
{
diff --git a/levels.h b/levels.h
index 97d1801..2c45ecd 100644
--- a/levels.h
+++ b/levels.h
@@ -41,7 +41,7 @@ bool doneredir;
int pnt1,pnt2;
//Let's start now!
double towers[16];int tcnt;
-double dscroll,roll;
+double dscroll,roll,tbrk;
bool sout,tendone;bool dmt[16];
//static const char* LEVEL_H_FN="levels.h";
void Level1Part0(){++part;}
@@ -202,7 +202,7 @@ void Level2Part1()
CreateTower3_fixeddir(183.49,425,300,3,-pi);
CreateTower3_fixeddir(183.49,424,300,3,2.0f/3.0f*pi);
for (int i=0;i<6;++i)fakes[i]=CreateBullet6(400,300,0,999999999,1,1,false),bullet[fakes[i]].inv=true;
- ++part;
+ ++part;tbrk=0;
}
void Level2Part2()
{
@@ -215,10 +215,14 @@ void Level2Part2()
bullet[fakes[i]].bulletpos=vector2d(400+r*cos(base+i*pi/3.0f),300+r*sin(base+i*pi/3.0f));
if (L2D>=1.5)
{
- L2D=0;
+ L2D=0;tbrk+=1;
for (int i=0;i<6;++i)
- CreateBullet6(403+r*cos(base+i*pi/3.0f),303+r*sin(base+i*pi/3.0f),
- 2,0,1,6,true),clockrot=0;
+ {
+ CreateBullet6(403+r*cos(base+i*pi/3.0f),303+r*sin(base+i*pi/3.0f),2,0,1,6,true);
+ clockrot=0;
+ if(tbrk>=5)NewMultpo(vector2d(403+r*cos(base+i*pi/3.0f),303+r*sin(base+i*pi/3.0f)));
+ }
+ if(tbrk>=5)tbrk=0;
}
}
void Level2Part3()
@@ -226,7 +230,7 @@ void Level2Part3()
frameleft=AMinute;
for (int i=0;i<6;++i)bullet[fakes[i]].exist=false;
for (int i=0;i<6;++i)fakes[i]=CreateBullet7(400,300,0,999999999,false),bullet[fakes[i]].inv=true;
- whicnt=3;clockrot=deltarot=0;++part;
+ whicnt=3;clockrot=deltarot=0;++part;tbrk=0;
}
void Level2Part4()
{
@@ -239,10 +243,13 @@ void Level2Part4()
bullet[fakes[i]].bulletpos=vector2d(400+r*cos(base+i*pi/3.0f),300+r*sin(base+i*pi/3.0f));
if (L2D>=5)
{
- L2D=0;
+ L2D=0;tbrk+=1;
for (int i=0;i<6;++i)
- CreateBullet7(403+r*cos(base+i*pi/3.0f),303+r*sin(base+i*pi/3.0f),
- 2,0,true);
+ {
+ CreateBullet7(403+r*cos(base+i*pi/3.0f),303+r*sin(base+i*pi/3.0f),2,0,true);
+ if(tbrk>=5)NewMultpo(vector2d(403+r*cos(base+i*pi/3.0f),303+r*sin(base+i*pi/3.0f)));
+ }
+ if(tbrk>=5)tbrk=0;
}
}
void Level2Part5()
@@ -256,7 +263,7 @@ void Level2Part5()
ShowTip("You've got 5 seconds to choose a fine place...");
return;
}
- ++part;
+ ++part;tbrk=0;
}
Laser Lock;
void Level2Part6()
@@ -270,10 +277,13 @@ void Level2Part6()
bullet[fakes[i]].bulletpos=vector2d(400+r*cos(base+i*pi/3.0f),300+r*sin(base+i*pi/3.0f)),bullet[fakes[i]].inv=true;
if (L2D>=5)
{
- L2D=0;
+ L2D=0;tbrk+=1;
for (int i=0;i<6;++i)
- CreateBullet7(403+r*cos(base+i*pi/3.0f),303+r*sin(base+i*pi/3.0f),
- 2,0,true);
+ {
+ CreateBullet7(403+r*cos(base+i*pi/3.0f),303+r*sin(base+i*pi/3.0f),2,0,true);
+ if(tbrk>=5)NewMultpo(vector2d(403+r*cos(base+i*pi/3.0f),303+r*sin(base+i*pi/3.0f)));
+ }
+ if(tbrk>=5)tbrk=0;
}
if (frameleft<TenSeconds/20)++part,frameleft=AMinute;
}
@@ -289,10 +299,13 @@ void Level2Part7()
bullet[fakes[i]].bulletpos=vector2d(400+r*cos(base+i*pi/3.0f),300+r*sin(base+i*pi/3.0f)),bullet[fakes[i]].inv=true;
if (L2D>=5)
{
- L2D=0;
+ L2D=0;tbrk+=1;
for (int i=0;i<6;++i)
- CreateBullet7(403+r*cos(base+i*pi/3.0f),303+r*sin(base+i*pi/3.0f),
- 2,0,true);
+ {
+ CreateBullet7(403+r*cos(base+i*pi/3.0f),303+r*sin(base+i*pi/3.0f),2,0,true);
+ if(tbrk>=5)NewMultpo(vector2d(403+r*cos(base+i*pi/3.0f),303+r*sin(base+i*pi/3.0f)));
+ }
+ if(tbrk>=5)tbrk=0;
}
}
double L2D1;
@@ -301,7 +314,7 @@ void Level2Part8()
frameleft=ThirtySeconds;L2D1=0;
playerLockY=false;
for (int i=6;i<12;++i)fakes[i]=CreateBullet6(400,300,0,999999999,1,1,false),bullet[fakes[i]].inv=true;
- ++part;
+ ++part;tbrk=0;
}
void Level2Part9()
{
@@ -318,18 +331,24 @@ void Level2Part9()
bullet[fakes[i]].bulletpos=vector2d(400+r*cos(base2+i*pi/3.0f),300+r*sin(base2+i*pi/3.0f));
if (L2D1>=2)
{
- L2D1=0;
+ L2D1=0;tbrk+=1;
for (int i=0;i<6;++i)
- CreateBullet6(403+r*cos(base2+i*pi/3.0f),303+r*sin(base2+i*pi/3.0f),
- 2,0,1,6,true),clockrot=0;
+ {
+ CreateBullet6(403+r*cos(base2+i*pi/3.0f),303+r*sin(base2+i*pi/3.0f),2,0,1,6,true);
+ clockrot=0;
+ if(tbrk>=5)NewMultpo(vector2d(403+r*cos(base2+i*pi/3.0f),303+r*sin(base2+i*pi/3.0f)));
+ }
}
if (L2D>=5)
{
- L2D=0;
+ L2D=0;tbrk+=1;
for (int i=0;i<6;++i)
- CreateBullet7(403+r*cos(base+i*pi/3.0f),303+r*sin(base+i*pi/3.0f),
- 2,0,true);
+ {
+ CreateBullet7(403+r*cos(base+i*pi/3.0f),303+r*sin(base+i*pi/3.0f),2,0,true);
+ if(tbrk>=5)NewMultpo(vector2d(403+r*cos(base+i*pi/3.0f),303+r*sin(base+i*pi/3.0f)));
+ }
}
+ if(tbrk>=5)tbrk=0;
}
void Level3Part0()
{
@@ -1192,7 +1211,6 @@ void Level5Part6()
tbuls[j]=0;
}
}
-double tbrk;
void Level5Part7()
{
frameleft=ThirtySeconds;Dis8ref=true;tbrk=0;
diff --git a/main.cpp b/main.cpp
index f84d193..9f78873 100644
--- a/main.cpp
+++ b/main.cpp
@@ -532,11 +532,11 @@ bool ProcessCurCred()
else
{
Credits->SetTextureRect(4,209,230,76);
- Credits->Render(creditfly,330);
+ Credits->Render(creditfly-30,330);
Credits->SetTextureRect(9,290,140,47);
- Credits->Render(creditfly,400);
- vdig->printf(creditfly-20,240,HGETEXT_LEFT,"%s",BLRVERSION);
- bdig->printf(creditfly-20,310,HGETEXT_LEFT,"%s",BuiltDate);
+ Credits->Render(creditfly-30,400);
+ vdig->printf(creditfly-50,240,HGETEXT_LEFT,"%s",BLRVERSION);
+ bdig->printf(creditfly-50,310,HGETEXT_LEFT,"%s",BuiltDate);
}
if (credstop)credbrk+=hge->Timer_GetDelta();
if (credbrk>=4.5&&!creddone)creddone=true,credstop=false,creditacc=0,credbrk=0;
@@ -676,10 +676,11 @@ bool FrameFunc()
if(bullet){free(bullet);bullet=NULL;}
towcnt=bulcnt=0;whrcnt=12;skyactive=false;PlayerSplit=false;
score=0;Mult_Init();//Music_Init("./Resources/Music/CanonTechno.ogg");
- lpst=4625568;lped=9234584;//Music_Play();
+ lpst=4607901;lped=9215893;//Music_Play();
coll=semicoll=clrusg=0;playerLockX=playerLockY=false;
Lock.Init(2);IfShowTip=true;lsc=0;
clrrad=pi/2;clrrange=0;re.SetSeed(time(NULL));
+ FadeTip=false;memset(lasttip,0,sizeof(lasttip));
memset(tower,0,sizeof(tower));
Complete=false;
Current_Position=1;
@@ -693,11 +694,12 @@ bool FrameFunc()
level=-2,part=0;frms=0,averfps=0.0;bsscale=1;assetime=0;
if(bullet){free(bullet);bullet=NULL;}
towcnt=bulcnt=0;whrcnt=12;skyactive=false;PlayerSplit=false;
- score=0;Mult_Init();//Music_Init("./Resources/Music/CanonTechno.ogg");
- lpst=4625568;lped=9234584;//Music_Play();
+ score=0;Mult_Init();Music_Init("./Resources/Music/CanonTechno.ogg");
+ lpst=4607901;lped=9215893;Music_Play();
coll=semicoll=clrusg=0;playerLockX=playerLockY=false;
Lock.Init(2);IfShowTip=true;lsc=0;
clrrad=pi/2;clrrange=0;re.SetSeed(time(NULL));
+ FadeTip=false;memset(lasttip,0,sizeof(lasttip));
memset(tower,0,sizeof(tower));
Complete=false;
Current_Position=1;
@@ -711,10 +713,11 @@ bool FrameFunc()
if(bullet){free(bullet);bullet=NULL;}
towcnt=bulcnt=0;whrcnt=12;skyactive=false;PlayerSplit=false;
score=0;Mult_Init();//Music_Init("./Resources/Music/CanonTechno.ogg");
- lpst=4625568;lped=9234584;//Music_Play();
+ lpst=4607901;lped=9215893;//Music_Play();
coll=semicoll=clrusg=0;playerLockX=playerLockY=false;
Lock.Init(2);IfShowTip=true;lsc=0;
clrrad=pi/2;clrrange=0;re.SetSeed(time(NULL));
+ FadeTip=false;memset(lasttip,0,sizeof(lasttip));
memset(tower,0,sizeof(tower));
Complete=false;
Current_Position=1;
@@ -802,6 +805,7 @@ bool FrameFunc()
{
pauseMenu.Leave();
if(PMR==2)returnToTitleMenu.Init(-200),Current_Position=12;
+ else Music_Resume();
return false;
}
}
@@ -935,7 +939,7 @@ bool FrameFunc()
++part;
IfShowTip=true;
}
- if (shots)hge->Effect_Play(snd);
+ if (Current_Position==1&&shots)hge->Effect_Play(snd);
if(mainMenu.isActive())mainMenu.Render();
if(startMenu.isActive())startMenu.Render();
if(optionMenu.isActive())optionMenu.Render();
@@ -1136,14 +1140,14 @@ int main(int argc,char *argv[])
#ifdef WIN32
hge->System_SetState(HGE_ICON, MAKEINTRESOURCE(1));
#endif
- if((access("blr.cfg",0))==-1)
+ if((access(".blrrc",R_OK))==-1)
{
hge->System_Log("%s: Config file not found. Calling first startup.",MAIN_SRC_FN);
firststartup();
}
if(fFristStartUp)firststartup();
hge->System_Log("%s: Loading config file",MAIN_SRC_FN);
- freopen("blr.cfg","r",stdin);
+ freopen(".blrrc","r",stdin);
char tch=getchar();
if (tch!=';'){}
tch=getchar();
@@ -1207,7 +1211,7 @@ int main(int argc,char *argv[])
tch=getchar();
clrmode=tch;
fclose(stdin);
- if (AP_Update(plrspd,plrslospd,clrbns)>10000)Error("Invalid configuration!\nDelete blr.cfg and run the game again!");
+ if (AP_Update(plrspd,plrslospd,clrbns)>10000)Error("Invalid configuration!\nTry removing .blrrc and run the game again.");
hge->System_Log("%s: Loading Score file",MAIN_SRC_FN);
Score_Init();
#ifdef Debug
@@ -1218,6 +1222,7 @@ int main(int argc,char *argv[])
LE_Active=false;
if(hge->System_Initiate())
{
+ hge->System_Log("%s: Loading Resources...",MAIN_SRC_FN);
quad.tex=hge->Texture_Load("./Resources/b_null.png");
SprSheet=hge->Texture_Load("./Resources/ss.png");
TLeaf=hge->Texture_Load("./Resources/e_leaf.png");
@@ -1250,6 +1255,7 @@ int main(int argc,char *argv[])
quad.v[1].x=800; quad.v[1].y=0;
quad.v[2].x=800; quad.v[2].y=600;
quad.v[3].x=0; quad.v[3].y=600;
+ hge->System_Log("%s: Loading Fonts...",MAIN_SRC_FN);
#ifdef WIN32
if(!rbPanelFont.Init("C:/Windows/Fonts/cour.ttf",18))return 1;
#else
@@ -1302,8 +1308,8 @@ int main(int argc,char *argv[])
level=startLvl,part=startPrt;frms=0,averfps=0.0;bsscale=1;DBGColor=0xFF000000;
if(bullet){free(bullet);bullet=NULL;}
towcnt=bulcnt=0;whrcnt=12;skyactive=false;PlayerSplit=false;
- score=0;Mult_Init();//Music_Init("./Resources/Music/CanonTechno.ogg");
- lpst=4625568;lped=9234584;//Music_Play();
+ score=0;Mult_Init();Music_Init("./Resources/Music/CanonTechno.ogg");
+ lpst=4607901;lped=9215893;Music_Play();
coll=semicoll=clrusg=0;playerLockX=playerLockY=false;
Lock.Init(2);IfShowTip=true;lsc=0;
clrrad=pi/2;clrrange=0;re.SetSeed(time(NULL));
diff --git a/menus.h b/menus.h
index 5a27c82..cca8132 100644
--- a/menus.h
+++ b/menus.h
@@ -48,7 +48,7 @@ int AP_Update(int plrspd,int plrslospd,int clrbns)
}
void Options_Writeback()
{
- freopen("blr.cfg","w",stdout);
+ freopen(".blrrc","w",stdout);
printf(";CBL");
printf("%c",fpslvl==2?1:0);
printf("%c",tfs?1:0);
diff --git a/scorec.h b/scorec.h
index 3fe0b10..502d4d2 100644
--- a/scorec.h
+++ b/scorec.h
@@ -84,7 +84,7 @@ void PutTRecord(TRecord a)
}
void Score_Init()
{
- freopen("score.cfg","r",stdin);
+ freopen(".blrscore","r",stdin);
header=Getuint();
if (header!=0x3b424c53)//0x3b424c53=";BLS"
{
@@ -163,7 +163,7 @@ int CheckHighScore()
}
void Score_Write()
{
- freopen("score.cfg","w",stdout);
+ freopen(".blrscore","w",stdout);
Putuint(0x3b424c53);
Putuint(0xd1ffa0c0);
Putint(Ecnt);
@@ -185,7 +185,8 @@ void Score_Write()
}
void Score_Initailize()
{
- freopen("score.cfg","w",stdout);
+ if(access(".blrscore",R_OK)==0)return;
+ freopen(".blrscore","w",stdout);
Putuint(0x3b424c53);
Putuint(0xd1ffa0c0);Putuint(0);
Putuint(0xd1ffa0c1);Putuint(0);
diff --git a/scoresystem.h b/scoresystem.h
index 53ac222..31bd62b 100644
--- a/scoresystem.h
+++ b/scoresystem.h
@@ -30,26 +30,27 @@ private:
double Lifetime,LifeLim,speed;
vector2d position,direction;
int blinkbrk;
- bool Active,blnkshow;
+ bool Active,blnkshow,followplyr;
public:
bool IsActive(){return Active;}
void Init(double _lt,double _speed,vector2d _pos,vector2d _dir)
{
Lifetime=0;LifeLim=_lt;speed=_speed;position=_pos;direction=_dir;
Mult=new hgeSprite(SprSheet,0,272,48,48);Active=true;blinkbrk=0;blnkshow=true;
- Mult->SetHotSpot(24,24);
+ Mult->SetHotSpot(24,24);followplyr=false;
}
void Process()
{
- if (GetDist(playerpos,position)<=64)
+ if(GetDist(playerpos,position)<=64)followplyr=true;
+ if(followplyr)
{
direction=ToUnitCircle(playerpos-position);
speed=0.3;
}
- if (GetDist(playerpos,position)<=9)++mult,NewMT(),Active=false;
+ if(GetDist(playerpos,position)<=9)++mult,NewMT(),Active=false;
Lifetime+=hge->Timer_GetDelta();
- if (Lifetime>LifeLim)return (void)(Active=false);
- if (Lifetime>LifeLim*0.8)
+ if(Lifetime>LifeLim)return (void)(Active=false);
+ if(Lifetime>LifeLim*0.8)
{
if (!LOWFPS)++blinkbrk;else blinkbrk+=17;
if (blinkbrk>200)blinkbrk=0,blnkshow=!blnkshow;
@@ -86,6 +87,7 @@ void Mult_Init()
multbrk=TenSeconds;multbat=mult=1;valbrk=0;
MB=new hgeSprite(MultFnt->GetTexture(),0,235,163,21);
MB->SetHotSpot(81.5,10.5);
+ memset(Multpo,0,sizeof(Multpo));
}
double GetHscle()
{