2 * Copyright (C) 2003 Robert Kooima
4 * NEVERPUTT is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published
6 * by the Free Software Foundation; either version 2 of the License,
7 * or (at your option) any later version.
9 * This program is distributed in the hope that it will be useful, but
10 * WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * General Public License for more details.
23 /*---------------------------------------------------------------------------*/
29 /*---------------------------------------------------------------------------*/
33 static const float *color
[5] = {
40 int i
= curr_player();
42 if ((Lhud_id
= gui_hstack(0)))
44 gui_label(Lhud_id
, curr_scr(), GUI_MED
, GUI_NE
, color
[i
], gui_wht
);
45 gui_label(Lhud_id
, "Score", GUI_SML
, 0, gui_wht
, gui_wht
);
46 gui_layout(Lhud_id
, -1, -1);
48 if ((Rhud_id
= gui_hstack(0)))
50 gui_label(Rhud_id
, curr_par(), GUI_MED
, 0, color
[i
], gui_wht
);
51 gui_label(Rhud_id
, "Par", GUI_SML
, GUI_NW
, gui_wht
, gui_wht
);
52 gui_layout(Rhud_id
, +1, -1);
54 if ((fps_id
= gui_count(0, 1000, GUI_SML
, GUI_SE
)))
55 gui_layout(fps_id
, -1, +1);
65 /*---------------------------------------------------------------------------*/
73 int now
= SDL_GetTicks();
77 fps
= count
* 1000 / (now
- then
);
81 gui_set_count(fps_id
, fps
);
85 if (config_get_d(CONFIG_FPS
))
92 /*---------------------------------------------------------------------------*/