File: game_timer.h

package info (click to toggle)
epiphany 0.7.0%2B0-3
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd, stretch
  • size: 7,528 kB
  • ctags: 1,027
  • sloc: cpp: 6,404; ansic: 141; makefile: 78; sh: 7
file content (49 lines) | stat: -rw-r--r-- 1,363 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
/***************************************************************************
                          game_time.h  -  description
                             -------------------
    begin                : Mon Aug 12 2002
    copyright            : (C) 2002 by Giuseppe D'Aqui'
    email                : kumber@tiscalinet.it
 ***************************************************************************/

/***************************************************************************
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License, Version 2, as published by  *
 *   the Free Software Foundation.                                   *
 *                                                                         *
 ***************************************************************************/

#include "dephine.h"

#ifndef GAME_TIMER_H
#define GAME_TIMER_H


class Game_Timer
{
private:
	//total countdown time
	Uint32 m_total_time;
	//last acquired time
	Uint32 m_last_time;
public:
	Game_Timer(Uint32 total_time = 0);
	
	void update();
	
	void start();
	
	void set_total_time(Uint32 total_time);
	
	bool is_zero();
	
	const char* get_time_string();
	
	Uint32 get_time();
	


};

#endif //GAME_TIMER_H