[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Enigma-cvs] enigma/src levels.hh,1.8,1.9
From: |
Daniel Heck <address@hidden> |
Subject: |
[Enigma-cvs] enigma/src levels.hh,1.8,1.9 |
Date: |
Sun, 16 Nov 2003 18:36:01 +0000 |
Update of /cvsroot/enigma/enigma/src
In directory subversions:/tmp/cvs-serv31541/src
Modified Files:
levels.hh
Log Message:
- Removed LevelStatus::operator!=()
- Added LevelStatus::operator==()
- Removed get_best_times()
- Added LevelPack::get_status(), set_status(), get_par_time(),
get_par_holder(), get_best_user_time(), set_level_time(), is_solved()
Index: levels.hh
===================================================================
RCS file: /cvsroot/enigma/enigma/src/levels.hh,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** levels.hh 9 Nov 2003 12:03:18 -0000 1.8
--- levels.hh 16 Nov 2003 18:35:59 -0000 1.9
***************
*** 22,25 ****
--- 22,26 ----
#include <string>
+ #include "px/pxfwd.hh"
namespace levels
***************
*** 101,110 ****
struct LevelStatus {
LevelStatus(int easy=-1, int hard=-1, int fin=0, int solved_rev = 0);
! bool operator != (const LevelStatus& other) const;
// Variables.
! int time_easy, time_hard; // Best time in seconds (-1: use
level default)
! int finished; // Level solved? 0 =
no,1=easy,2=hard,3=easy&hard
! int solved_revision; // Revision # that was solved
};
--- 102,113 ----
struct LevelStatus {
LevelStatus(int easy=-1, int hard=-1, int fin=0, int solved_rev = 0);
! bool operator == (const LevelStatus& other) const;
// Variables.
!
! int time_easy; // user's best time in seconds (-1: NA)
! int time_hard; // user's best time in seconds (-1: NA)
! int finished; // Level solved? 0 =
no,1=easy,2=hard,3=easy&hard
! int solved_revision; // Revision # that was solved
};
***************
*** 114,152 ****
virtual ~LevelPack() {}
! //! Return level pack's name
virtual string get_name() const = 0;
! //! Return number of levels
virtual size_t size() const = 0;
! /* Load a level into the game engine */
virtual bool load_level (size_t index) = 0;
virtual const LevelInfo *get_info (size_t index) const = 0;
virtual px::Surface *load_preview (size_t /*index*/) { return 0; }
! //! Return revision number of level
virtual int get_revision_number(size_t index) const = 0;
! //! Return the preview version number (needed for Oxyd-levelpacks)
virtual int get_preview_version() const { return 1; }
! //! Return the default SoundSet (see options::SoundSet for meaning)
virtual int get_default_SoundSet() const = 0;
! //! returns true if it's a twoplayer levelpack, but has no it-yinyang
! // (needed to add it-yinyang to inventory if oxyd-linkgame is played
as single-player)
virtual bool needs_twoplayers() const = 0;
! // returns true if LevelPack may have previews
virtual bool may_have_previews() const = 0;
- };
! // sets best_par_time and best_user_time for current difficulty level (-1
if undefined)
! // (best_par_name != 0 -> is filled with par-player-name)
! void get_best_times(const LevelInfo *li, const LevelStatus *ls,
! int& best_par_time, int& best_user_time, string
*best_par_name);
}
#endif
--- 117,166 ----
virtual ~LevelPack() {}
! /* ---------- LevelPack interface ---------- */
!
! /*! Return level pack's name */
virtual string get_name() const = 0;
! /*! Return number of levels */
virtual size_t size() const = 0;
! /*! Load a level into the game engine */
virtual bool load_level (size_t index) = 0;
+ /*! Return the level information for level INDEX */
virtual const LevelInfo *get_info (size_t index) const = 0;
virtual px::Surface *load_preview (size_t /*index*/) { return 0; }
! /*! Return revision number of level INDEX. */
virtual int get_revision_number(size_t index) const = 0;
! /*! Return the preview version number (needed for Oxyd-levelpacks) */
virtual int get_preview_version() const { return 1; }
! /*! Return the default SoundSet (see options::SoundSet for meaning) */
virtual int get_default_SoundSet() const = 0;
! /*! returns true if it's a twoplayer levelpack, but has no
! it-yinyang (needed to add it-yinyang to inventory if
! oxyd-linkgame is played as single-player) */
virtual bool needs_twoplayers() const = 0;
! /*! Returns true if LevelPack may have previews */
virtual bool may_have_previews() const = 0;
! /* ---------- Helper methods ---------- */
!
! bool get_status (size_t index, LevelStatus &levelstat);
! void set_status (size_t index, const LevelStatus &levelstat);
! int get_par_time (size_t index, int difficulty);
! string get_par_holder (size_t index, int difficulty);
! int get_best_user_time (size_t index);
!
! /*! Save time required by user ; return true if new record. */
! bool set_level_time (size_t index, int difficulty, int time);
+ bool is_solved (size_t index, int difficulty);
+ };
}
#endif
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Enigma-cvs] enigma/src levels.hh,1.8,1.9,
Daniel Heck <address@hidden> <=