1 // -----------------------------------------------
3 // -----------------------------------------------
4 // Statistics of gameplay for KBall
5 // -----------------------------------------------
8 // In loving memory of my father
9 // -----------------------------------------------
13 CGameStats::CGameStats()
18 CGameStats::~CGameStats()
23 void CGameStats::reset()
25 h
= s
= m
= score
= blost
= 0;
28 void CGameStats::print(BITMAP
*bmp
, int y
, int color
, int bg
, FONT
*f
)
30 //textprintf_ex(bmp, f, 0, y+=text_height(f)*2, color, bg, "Statistics");
32 textprintf_centre_ex(bmp
, f
, bmp
->w
/2, y
+=text_height(f
), color
, bg
, "TOTAL TIME");
33 textprintf_centre_ex(bmp
, f
, bmp
->w
/2, y
+=text_height(f
), color
, bg
, "%4d:%02d:%02d", h
,m
,s
);
35 textprintf_centre_ex(bmp
, f
, bmp
->w
/2, y
+=text_height(f
)*2, color
, bg
, "TOTAL SCORE");
36 textprintf_centre_ex(bmp
, f
, bmp
->w
/2, y
+=text_height(f
), color
, bg
, "%010ld", score
);
38 textprintf_centre_ex(bmp
, f
, bmp
->w
/2, y
+=text_height(f
)*2, color
, bg
, "BALLS LOST");
39 textprintf_centre_ex(bmp
, f
, bmp
->w
/2, y
+=text_height(f
), color
, bg
, "%3d", blost
);
42 void CGameStats::add_time(int h1
, int m1
, int s1
)