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

Diff of /enigma/src/options.hh

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

revision 1.7 by mhawlisch, Wed Feb 26 16:15:44 2003 UTC revision 1.8 by reallysoft, Wed Apr 2 23:05:48 2003 UTC
# Line 5  Line 5 
5   * modify it under the terms of the GNU General Public License   * modify it under the terms of the GNU General Public License
6   * as published by the Free Software Foundation; either version 2   * as published by the Free Software Foundation; either version 2
7   * of the License, or (at your option) any later version.   * of the License, or (at your option) any later version.
8   *     *
9   * This program is distributed in the hope that it will be useful,   * This program is distributed in the hope that it will be useful,
10   * but WITHOUT ANY WARRANTY; without even the implied warranty of   * but WITHOUT ANY WARRANTY; without even the implied warranty of
11   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12   * GNU General Public License for more details.   * GNU General Public License for more details.
13   *     *
14   * You should have received a copy of the GNU General Public License along   * You should have received a copy of the GNU General Public License along
15   * with this program; if not, write to the Free Software Foundation, Inc.,   * with this program; if not, write to the Free Software Foundation, Inc.,
16   * 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.   * 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
# Line 23  Line 23 
23  namespace options  namespace options
24  {  {
25      using std::string;      using std::string;
26        
27      class OptionObserver {      class OptionObserver {
28      public:      public:
29          virtual ~OptionObserver() {}          virtual ~OptionObserver() {}
# Line 46  namespace options Line 46  namespace options
46      extern string LevelMusicFile;      extern string LevelMusicFile;
47      extern bool   SkipSolvedLevels;      extern bool   SkipSolvedLevels;
48    
49        extern bool LevelStatusChanged; // true if any LevelStatus differs from last saved state
50    
51      struct LevelStatus {      struct LevelStatus {
52          LevelStatus(int easy=-1, int hard=-1, int fin=0)          LevelStatus(int easy=-1, int hard=-1, int fin=0)
53              : par_easy(easy),              : par_easy(easy),
# Line 54  namespace options Line 56  namespace options
56          {}          {}
57          int par_easy, par_hard; // Best time in seconds (-1: use level default)          int par_easy, par_hard; // Best time in seconds (-1: use level default)
58          int finished;           // User completed this level?          int finished;           // User completed this level?
59                                  // 0=no,1=easy,2=hard,3=easy&hard                                  // 0 = no,1=easy,2=hard,3=easy&hard
60    
61            bool operator != (const LevelStatus& other) const {
62                return
63                    par_easy != other.par_easy ||
64                    par_hard != other.par_hard ||
65                    finished != other.finished;
66            }
67      };      };
68    
69      /* Get the status of a particular level in a particular pack.      /* Get the status of a particular level in a particular pack.
# Line 70  namespace options Line 79  namespace options
79    
80      void SetLevelTime(const string &pack, const string &level, int difficulty, int time);      void SetLevelTime(const string &pack, const string &level, int difficulty, int time);
81      void SetLevelFinished(const string &pack, const string &level, int difficulty);      void SetLevelFinished(const string &pack, const string &level, int difficulty);
82        
83      /* Save the current set of options to the user's configuration      /* Save the current set of options to the user's configuration
84         file. (Either ~/.enigmarc on Unix systems or ./enigmarc.lua on         file. (Either ~/.enigmarc on Unix systems or ./enigmarc.lua on
85         Win32. */         Win32. */

Legend:
Removed from v.1.7  
changed lines
  Added in v.1.8

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