[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Enigma-cvs] enigma/src levels.hh,1.3,1.4
From: |
Ralf Westram <address@hidden> |
Subject: |
[Enigma-cvs] enigma/src levels.hh,1.3,1.4 |
Date: |
Mon, 27 Oct 2003 11:55:24 +0000 |
Update of /cvsroot/enigma/enigma/src
In directory subversions:/tmp/cvs-serv13239/src
Modified Files:
levels.hh
Log Message:
- LevelInfo holds new fields from new index format
Index: levels.hh
===================================================================
RCS file: /cvsroot/enigma/enigma/src/levels.hh,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** levels.hh 22 Oct 2003 21:38:44 -0000 1.3
--- levels.hh 27 Oct 2003 11:55:22 -0000 1.4
***************
*** 51,83 ****
{
// Variables.
- string filename; // Filename of the level _without_ extension
- string name; // Complete name of the level
- string author; // Author of the level
GameType type;
! int best_time; // Best time in seconds
! int revision; // Revision # of this level
! string hint1, hint2; // Hints for solving this level
// Methods
! enum { DEFAULT_TIME = 99*60+59 };
! LevelInfo(const string &fn,
! const string &n,
! const string &a,
! const string &rev,
! GameType gt,
! int par_time = DEFAULT_TIME
! )
! : filename(fn), name(n), author(a), type(gt), best_time(par_time)
{
- revision = atoi(rev.c_str());
- if (revision<1) revision = 1;
}
! LevelInfo() {
! best_time = DEFAULT_TIME;
! type = GAMET_ENIGMA;
! revision = 0;
! }
};
--- 51,90 ----
{
// Variables.
GameType type;
! string filename; // Filename of the level _without_ extension
! string name; // Complete name of the level
! string author; // Author of the level
! int revision; // Revision # of this level
! bool has_easymode; // whether level has an easymode
! int best_time; // Best time in seconds
! int best_moves; // Least moves to solve level
! string hint1, hint2; // Hints for solving this level
// Methods
! enum { DEFAULT_TIME = 99*60+59 };
! LevelInfo(GameType gt,
! const string &fn,
! const string &n,
! const string &a,
! int rev,
! bool easy,
! int par_time,
! int par_moves,
! const string& h1,
! const string& h2)
! : type(gt), filename(fn), name(n), author(a), revision(rev),
! has_easymode(easy),
! best_time(par_time == -1 ? DEFAULT_TIME : par_time),
! best_moves(par_moves), hint1(h1), hint2(h2)
{
}
! LevelInfo() {
! type = GAMET_ENIGMA;
! revision = 0;
! has_easymode = false;
! best_time = DEFAULT_TIME;
! }
};
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Enigma-cvs] enigma/src levels.hh,1.3,1.4,
Ralf Westram <address@hidden> <=