ratio
authornireco
Mon, 08 Dec 2008 23:00:23 +0000
changeset 326 b6bdc29bcf6e
parent 325 a19c78786d7f
child 327 09a3b5055862
ratio
src/Graphics.cc
--- a/src/Graphics.cc	Mon Dec 08 22:57:01 2008 +0000
+++ b/src/Graphics.cc	Mon Dec 08 23:00:23 2008 +0000
@@ -171,10 +171,19 @@
     ssdeaths << "Deaths:  " << p->getDeaths();
     getSimpleFont().draw(
         box_left + 20 + 100 * bar_length,
-        box_top + 40,
+        box_top + 30,
         ssdeaths.str(),
         get_gc()
     );
+
+    std::stringstream ssratio;
+    ssratio << "Ratio:  " << (p->getKills()+1) / (p->getDeaths()+1);
+    getSimpleFont().draw(
+        box_left + 20 + 100 * bar_length,
+        box_top + 50,
+        ssratio.str(),
+        get_gc()
+    );
     
 
     // Ammobar