enigma-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Enigma-cvs] enigma/src game.cc,1.52,1.53


From: Ralf Westram <address@hidden>
Subject: [Enigma-cvs] enigma/src game.cc,1.52,1.53
Date: Thu, 06 Nov 2003 07:19:28 +0000

Update of /cvsroot/enigma/enigma/src
In directory subversions:/tmp/cvs-serv13820/src

Modified Files:
        game.cc 
Log Message:
- compare user and par time and show different level-finish messages



Index: game.cc
===================================================================
RCS file: /cvsroot/enigma/enigma/src/game.cc,v
retrieving revision 1.52
retrieving revision 1.53
diff -C2 -d -r1.52 -r1.53
*** game.cc     3 Nov 2003 14:06:13 -0000       1.52
--- game.cc     6 Nov 2003 07:19:25 -0000       1.53
***************
*** 286,290 ****
                                         level_time))
              {
!                 display::GetStatusBar()->show_text("New best time!", 
display::TEXT_STATIC);
              } else {
                  display::GetStatusBar()->show_text("Level finished!", 
display::TEXT_STATIC);
--- 286,307 ----
                                         level_time))
              {
!                 const LevelStatus *stat = 
options::GetLevelStatus(level_pack->get_name(), info->filename);
!                 int                par_time, best_user_time;
!                 string             par_name;
! 
!                 get_best_times(info, stat, par_time, best_user_time, 
&par_name);
!                 if (par_time>0 && best_user_time <= par_time)
!                 {
!                     if (best_user_time == par_time) {
!                         string text = string("Exactly the par time by 
")+par_name;
!                         display::GetStatusBar()->show_text(text.c_str(), 
display::TEXT_SCROLLING);
!                     }
!                     else {
!                         display::GetStatusBar()->show_text("Great! A new par 
time!", display::TEXT_STATIC);
!                     }
!                 }
!                 else {
!                     display::GetStatusBar()->show_text("New best time!", 
display::TEXT_STATIC);
!                 }
              } else {
                  display::GetStatusBar()->show_text("Level finished!", 
display::TEXT_STATIC);





reply via email to

[Prev in Thread] Current Thread [Next in Thread]