[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Pingus-CVS] CVS: Games/Pingus/src pingus_counter.cxx,1.11,1.12 time_dis
From: |
grumbel |
Subject: |
[Pingus-CVS] CVS: Games/Pingus/src pingus_counter.cxx,1.11,1.12 time_display.cxx,1.10,1.11 |
Date: |
28 Nov 2002 18:05:42 -0000 |
Update of /usr/local/cvsroot/Games/Pingus/src
In directory dark:/tmp/cvs-serv12251/src
Modified Files:
pingus_counter.cxx time_display.cxx
Log Message:
Gervases fixed font patch
Index: pingus_counter.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/pingus_counter.cxx,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- pingus_counter.cxx 17 Oct 2002 00:10:46 -0000 1.11
+++ pingus_counter.cxx 28 Nov 2002 18:05:40 -0000 1.12
@@ -33,7 +33,7 @@
: server(s),
background (PingusResource::load_surface("Buttons/info","core"))
{
- font = PingusResource::load_font("Fonts/pingus_small","fonts");
+ font = PingusResource::load_font("Fonts/pingus_small_fix_num","fonts");
}
void
@@ -46,7 +46,7 @@
World* world = server->get_world();
- snprintf(str, 128, _("Released: %3d/%3d Out: %3d Saved: %3d/%3d"),
+ snprintf(str, 128, _("Released:%3d/%-3d Out:%3d Saved:%3d/%-3d"),
world->get_pingus()->get_number_of_released(),
world->get_pingus()->get_number_of_allowed(),
world->get_pingus()->get_number_of_alive(),
Index: time_display.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/time_display.cxx,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- time_display.cxx 24 Oct 2002 15:32:48 -0000 1.10
+++ time_display.cxx 28 Nov 2002 18:05:40 -0000 1.11
@@ -32,7 +32,8 @@
: infinity_symbol(PingusResource::load_surface("misc/infinity", "core"))
{
//font = PingusResource::load_font("Fonts/numbers","fonts");
- font = PingusResource::load_font("Fonts/pingus_small","fonts");
+ //font = PingusResource::load_font("Fonts/pingus_small","fonts");
+ font = PingusResource::load_font("Fonts/pingus_small_fix_num","fonts");
}
void
@@ -54,18 +55,13 @@
//int millisecs = (((time_value * 100)) / game_speed) % 100;
int seconds = (time_value / game_speed % 60);
int minutes = (time_value / (60 * game_speed));
- char* p;
-
- snprintf(time_string, 8, "%2d:%2d", minutes, seconds);
- p = time_string;
+ // Stop displaying negative seconds, which can happen if armageddon is
+ // clicked with 1 second left.
+ if (seconds < 0)
+ seconds = 0;
- // Replace any space with a zero
- while (*p++)
- {
- if (*p == ' ')
- *p = '0';
- }
+ snprintf(time_string, 8, "%2d:%02d", minutes, seconds);
}
else
{
@@ -73,7 +69,7 @@
snprintf(time_string, 8, "%4d", time_value);
}
- font->print_right(CL_Display::get_width() - 5, 1, time_string);
+ font->print_right(CL_Display::get_width() - 5, 3, time_string);
}
UNUSED_ARG(gc);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Pingus-CVS] CVS: Games/Pingus/src pingus_counter.cxx,1.11,1.12 time_display.cxx,1.10,1.11,
grumbel <=
- Prev by Date:
[Pingus-CVS] CVS: Games/Pingus/data/data fonts.scr,1.16,1.17
- Next by Date:
[Pingus-CVS] CVS: Games/Pingus/data/images/fonts pingus_small4_fix_num.png,NONE,1.1 Makefile.am,1.4,1.5
- Previous by thread:
[Pingus-CVS] CVS: Games/Pingus/data/data fonts.scr,1.16,1.17
- Next by thread:
[Pingus-CVS] CVS: Games/Pingus/data/images/fonts pingus_small4_fix_num.png,NONE,1.1 Makefile.am,1.4,1.5
- Index(es):