15 |
GNU General Public License for more details. |
GNU General Public License for more details. |
16 |
|
|
17 |
You should have received a copy of the GNU General Public License |
You should have received a copy of the GNU General Public License |
18 |
along with Adonthell; if not, write to the Free Software |
along with Adonthell; if not, write to the Free Software |
19 |
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
20 |
*/ |
*/ |
21 |
|
|
43 |
#define DAYS_PER_WEEK 7 |
#define DAYS_PER_WEEK 7 |
44 |
#endif // SWIG |
#endif // SWIG |
45 |
|
|
46 |
namespace event |
namespace events |
47 |
{ |
{ |
48 |
/** |
/** |
49 |
* Keeps track of the time the player spent within the game so far. This |
* Keeps track of the time the player spent within the game so far. This |
56 |
public: |
public: |
57 |
|
|
58 |
/** |
/** |
59 |
* Update the %game date. Whenever a minute of %gametime has |
* Update the %game date. Whenever a minute of %gametime has |
60 |
* passed, a time event will be raised. |
* passed, a time event will be raised. |
61 |
*/ |
*/ |
62 |
static void update (); |
static void update (); |
63 |
|
|
64 |
/** |
/** |
66 |
* @return %gametime in seconds since start of the game. |
* @return %gametime in seconds since start of the game. |
67 |
*/ |
*/ |
68 |
static u_int32 time () |
static u_int32 time () |
69 |
{ |
{ |
70 |
return Time; |
return Time; |
71 |
} |
} |
72 |
|
|
73 |
/** |
/** |
115 |
* @param out stream to write the state to |
* @param out stream to write the state to |
116 |
*/ |
*/ |
117 |
static void put_state (base::ogzstream & out); |
static void put_state (base::ogzstream & out); |
118 |
|
|
119 |
private: |
private: |
120 |
#ifndef SWIG |
#ifndef SWIG |
121 |
// number of game time seconds before a time event will be raised |
// number of game time seconds before a time event will be raised |
126 |
|
|
127 |
// number of game cycles since the last 1/10 gametime minute passed |
// number of game cycles since the last 1/10 gametime minute passed |
128 |
static double Ticks; |
static double Ticks; |
129 |
|
|
130 |
// how many game cycles make one second of game time |
// how many game cycles make one second of game time |
131 |
static float Scale; |
static float Scale; |
132 |
#endif // SWIG |
#endif // SWIG |