aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar chirs241097@gmail.com <chirs241097@gmail.com@c17bf020-1265-9734-9302-a83f62007ddb> 2014-03-25 02:41:54 +0000
committerGravatar chirs241097@gmail.com <chirs241097@gmail.com@c17bf020-1265-9734-9302-a83f62007ddb> 2014-03-25 02:41:54 +0000
commitfc8c1e6b20af4deb3fe755d776216d040a1621d2 (patch)
tree78e4041142f3b41a72eb493c7aee2bff6a4b6c32
parent7ab234b959f75aa6d063b61f8e2a98adf19f2ee6 (diff)
downloadbullet-lab-remix-fc8c1e6b20af4deb3fe755d776216d040a1621d2.tar.xz
Fix bugs in score file. Preparing for assessment mode.
-rwxr-xr-xCHANGELOG.TXT4
-rw-r--r--main.cpp3
-rw-r--r--menus.h28
-rw-r--r--scorec.h16
4 files changed, 28 insertions, 23 deletions
diff --git a/CHANGELOG.TXT b/CHANGELOG.TXT
index 2cfe05c..e5127bb 100755
--- a/CHANGELOG.TXT
+++ b/CHANGELOG.TXT
@@ -2,6 +2,7 @@
Next version:
0.8.2-0_PR (b78)
Todo's:
+Complete the game system.
Random segmentation fault in "Hyper-threading".(seen only once,
can not reproduce now...)
@@ -9,6 +10,9 @@ Pre-Released versions:
0.8.1-1_PR (b77)
All parts from level -1 to 7 are completed!
Fixed the crash in the mingw-w64 build.
+Complete GUI bring back.
+Fix a bug appeared after the cross-plantform port(when forked
+from BLRI).
0.8.1-0_PR (b76)
New level "Sink over the horizon".
diff --git a/main.cpp b/main.cpp
index 14f7e51..a9ed4c8 100644
--- a/main.cpp
+++ b/main.cpp
@@ -362,7 +362,7 @@ void RefreshScore()
void CallLevels()
{
//Use this to call level procedures.
- if ((mode==4||mode<=2)&&coll!=0){DeathGUI_Init();return;}
+ if ((mode==1)&&coll!=0){DeathGUI_Init();return;}
if (!IfCallLevel) return;
//Check Complete here
if (level==1&&part==0)Level1Part0();
@@ -554,6 +554,7 @@ void CallLevels()
if(mode==1&&restarts>2){CompleteGUI_Init();return;}
level=-1,part=0;
}
+ if (level==-1&&part==22){CompleteGUI_Init();return;}
}
bool ProcessCurCred()
{
diff --git a/menus.h b/menus.h
index f616946..e00dbc4 100644
--- a/menus.h
+++ b/menus.h
@@ -23,8 +23,8 @@ void StartGUI_Init()
{
StartGUI=new hgeGUI();
StartGUI->AddCtrl(new hgeGUIMenuItem(1,fnt,snd,400,200,0.0f,"Classic"));
- StartGUI->AddCtrl(new hgeGUIMenuItem(2,fnt,snd,400,240,0.1f,"Not Available!!"));
- StartGUI->AddCtrl(new hgeGUIMenuItem(3,fnt,snd,400,280,0.2f,"Same as the second one"));
+ StartGUI->AddCtrl(new hgeGUIMenuItem(2,fnt,snd,400,240,0.1f,""));
+ StartGUI->AddCtrl(new hgeGUIMenuItem(3,fnt,snd,400,280,0.2f,"Assessment Mode"));
StartGUI->AddCtrl(new hgeGUIMenuItem(4,fnt,snd,400,320,0.3f,"Free Play Mode"));
StartGUI->AddCtrl(new hgeGUIMenuItem(5,fnt,snd,400,360,0.4f,"Back"));
StartGUI->SetCursor(spr);
@@ -132,10 +132,8 @@ void DeathGUI_Init()
DeathGUI->AddCtrl(new hgeGUIMenuItem(2,fnt,snd,400,200,0.1f,ds1));
switch (mode)
{
- case 1:sprintf(ds2,"Difficulty: Normal");break;
- case 2:sprintf(ds2,"Difficulty: Extreme");break;
+ case 1:sprintf(ds2,"Mode: Classic");break;
case 3:sprintf(ds2,"What Happened?! You died in Free Play Mode?!");break;
- case 4:sprintf(ds2,"Difficulty: Easy");break;
}
DeathGUI->AddCtrl(new hgeGUIMenuItem(3,fnt,snd,400,240,0.2f,ds2));
sprintf(ds3,"Average FPS: %.2f",averfps);
@@ -229,6 +227,10 @@ char *getRank()
static char retval[256];
//stub!
//sprintf something to retval
+ if(level<=3)sprintf(retval,"Try more...");
+ if(level<=6)sprintf(retval,"Still need more effort!");
+ if(level==7)sprintf(retval,"You've done it!");
+ if(level==-1)sprintf(retval,"Why do you come to Earth?");
return retval;
}
void CompleteGUI_Init()
@@ -253,9 +255,7 @@ void CompleteGUI_Init()
CompleteGUI->AddCtrl(new hgeGUIMenuItem(3,fnt,snd,400,200,0.1f,hs7));
switch (mode)
{
- case 1:
- case 2:
- case 4:sprintf(hs2,"Restarts %d",restarts);break;
+ case 1:sprintf(hs2,"Restarts %d",restarts);break;
case 3:sprintf(hs2,"Collisions %d",coll);break;
}
CompleteGUI->AddCtrl(new hgeGUIMenuItem(4,fnt,snd,400,240,0.2f,hs2));
@@ -351,9 +351,9 @@ void HSDetGUI_Init()
{
sprintf(HSDetstr[1],"No. %d of Extreme Mode",detv);
#ifdef WIN32
- sprintf(HSDetstr[2],"Scored %I64d by %s",NRec[detv].score,NRec[detv].name);
+ sprintf(HSDetstr[2],"Scored %I64d by %s",ExRec[detv].score,ExRec[detv].name);
#else
- sprintf(HSDetstr[2],"Scored %lld by %s",NRec[detv].score,NRec[detv].name);
+ sprintf(HSDetstr[2],"Scored %lld by %s",ExRec[detv].score,ExRec[detv].name);
#endif
sprintf(HSDetstr[3],"Restarts %d",ExRec[detv].rescol);
sprintf(HSDetstr[4],"Semi-Collisions %d",ExRec[detv].scoll);
@@ -372,9 +372,9 @@ void HSDetGUI_Init()
{
sprintf(HSDetstr[1],"No. %d of Free Play Mode",detv);
#ifdef WIN32
- sprintf(HSDetstr[2],"Scored %I64d by %s",NRec[detv].score,NRec[detv].name);
+ sprintf(HSDetstr[2],"Scored %I64d by %s",FPMRec[detv].score,FPMRec[detv].name);
#else
- sprintf(HSDetstr[2],"Scored %lld by %s",NRec[detv].score,NRec[detv].name);
+ sprintf(HSDetstr[2],"Scored %lld by %s",FPMRec[detv].score,FPMRec[detv].name);
#endif
sprintf(HSDetstr[3],"Collisions %d",FPMRec[detv].rescol);
sprintf(HSDetstr[4],"Semi-Collisions %d",FPMRec[detv].scoll);
@@ -509,9 +509,9 @@ void HighScoreGUI_Init()
HighScoreGUI=new hgeGUI();
Current_Position=8;
HighScoreGUI->AddCtrl(new hgeGUIMenuItem(1,fnt,snd,350,200,0.0f,"View Highscores && Records for..."));
- HighScoreGUI->AddCtrl(new hgeGUIMenuItem(2,fnt,snd,400,240,0.1f,"Easy"));
+ HighScoreGUI->AddCtrl(new hgeGUIMenuItem(2,fnt,snd,400,240,0.1f,"Classic"));
HighScoreGUI->AddCtrl(new hgeGUIMenuItem(3,fnt,snd,400,280,0.2f,"Normal"));
- HighScoreGUI->AddCtrl(new hgeGUIMenuItem(4,fnt,snd,400,320,0.3f,"Extreme"));
+ HighScoreGUI->AddCtrl(new hgeGUIMenuItem(4,fnt,snd,400,320,0.3f,"Assessment Mode"));
HighScoreGUI->AddCtrl(new hgeGUIMenuItem(5,fnt,snd,400,360,0.4f,"Free Play Mode"));
HighScoreGUI->AddCtrl(new hgeGUIMenuItem(6,fnt,snd,400,400,0.5f,"Back"));
HighScoreGUI->EnableCtrl(1,false);
diff --git a/scorec.h b/scorec.h
index ed4a1b7..e5ceb9a 100644
--- a/scorec.h
+++ b/scorec.h
@@ -49,14 +49,14 @@ void Putint(int a)
void Putll(unsigned long long a)
{
unsigned long long c1,c2,c3,c4,c5,c6,c7,c8;
- c1=a&0xFF00000000000000;c1>>=44LL;
- c2=a&0x00FF000000000000;c2>>=40LL;
- c3=a&0x0000FF0000000000;c3>>=36LL;
- c4=a&0x000000FF00000000;c4>>=32LL;
- c5=a&0x00000000FF000000;c5>>=24LL;
- c6=a&0x0000000000FF0000;c6>>=16LL;
- c7=a&0x000000000000FF00;c7>>=8LL;
- c8=a&0x00000000000000FF;
+ c1=a&0xFF00000000000000LL;c1>>=44LL;
+ c2=a&0x00FF000000000000LL;c2>>=40LL;
+ c3=a&0x0000FF0000000000LL;c3>>=36LL;
+ c4=a&0x000000FF00000000LL;c4>>=32LL;
+ c5=a&0x00000000FF000000LL;c5>>=24LL;
+ c6=a&0x0000000000FF0000LL;c6>>=16LL;
+ c7=a&0x000000000000FF00LL;c7>>=8LL;
+ c8=a&0x00000000000000FFLL;
printf("%c%c%c%c%c%c%c%c",(int)c1,(int)c2,(int)c3,(int)c4,(int)c5,(int)c6,(int)c7,(int)c8);
}
TRecord GetTRecord()