/[enigma]/enigma/src/options.cc
ViewVC logotype

Diff of /enigma/src/options.cc

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.17 by dheck, Wed Jun 18 18:19:20 2003 UTC revision 1.18 by dheck, Thu Jun 19 22:18:25 2003 UTC
# Line 111  options::SetLevelStatus(const string &le Line 111  options::SetLevelStatus(const string &le
111      }      }
112  }  }
113    
114  void  bool
115  options::SetLevelTime(const string &pack, const string &level, int difficulty, int time)  options::SetLevelTime(const string &pack, const string &level, int difficulty, int time)
116  {  {
117      SetLevelFinished(pack, level, difficulty);      SetLevelFinished(pack, level, difficulty);
# Line 119  options::SetLevelTime(const string &pack Line 119  options::SetLevelTime(const string &pack
119    
120      assert(stat);      assert(stat);
121    
122        bool new_record = false;
123    
124      if (difficulty == enigma::DIFFICULTY_EASY) {      if (difficulty == enigma::DIFFICULTY_EASY) {
125          if (stat->par_easy > time || stat->par_easy == -1) {          if (stat->par_easy > time || stat->par_easy == -1) {
126              stat->par_easy     = time;              stat->par_easy     = time;
127              LevelStatusChanged = true;              LevelStatusChanged = true;
128                new_record = true;
129          }          }
130      }      }
131      else if (difficulty == enigma::DIFFICULTY_HARD) {      else if (difficulty == enigma::DIFFICULTY_HARD) {
132          if (stat->par_hard > time || stat->par_hard == -1) {          if (stat->par_hard > time || stat->par_hard == -1) {
133              stat->par_hard     = time;              stat->par_hard     = time;
134              LevelStatusChanged = true;              LevelStatusChanged = true;
135                new_record = true;
136          }          }
137      }      }
138        return new_record;
139  }  }
140    
141  void  void

Legend:
Removed from v.1.17  
changed lines
  Added in v.1.18

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26