[xiph-commits] r9653 - trunk/planarity

xiphmont at svn.xiph.org xiphmont at svn.xiph.org
Sat Jul 30 03:57:13 PDT 2005


Author: xiphmont
Date: 2005-07-30 03:57:11 -0700 (Sat, 30 Jul 2005)
New Revision: 9653

Modified:
   trunk/planarity/finish.c
   trunk/planarity/gamestate.c
   trunk/planarity/gamestate.h
   trunk/planarity/version.h
Log:
Fix inter-board scoring bug; the score calculation is valid during gameplay, but it was wrong between boards (when the finish-board dialog was up)



Modified: trunk/planarity/finish.c
===================================================================
--- trunk/planarity/finish.c	2005-07-30 10:29:03 UTC (rev 9652)
+++ trunk/planarity/finish.c	2005-07-30 10:57:11 UTC (rev 9653)
@@ -215,7 +215,7 @@
     cairo_select_font_face (c, "Arial",
 			    CAIRO_FONT_SLANT_NORMAL,
 			    CAIRO_FONT_WEIGHT_BOLD);
-    snprintf(buffer,160,"Total score: %d",get_initial_intersections()+time_bonus);
+    snprintf(buffer,160,"Total score: %d",get_raw_score());
     render_text_centered(c,buffer, w/2,y);
 
   }

Modified: trunk/planarity/gamestate.c
===================================================================
--- trunk/planarity/gamestate.c	2005-07-30 10:29:03 UTC (rev 9652)
+++ trunk/planarity/gamestate.c	2005-07-30 10:57:11 UTC (rev 9653)
@@ -236,6 +236,10 @@
   return score + initial_intersections-get_num_intersections();
 }
 
+int get_raw_score(){
+  return score;
+}
+
 int get_initial_intersections(){
   return initial_intersections;
 }

Modified: trunk/planarity/gamestate.h
===================================================================
--- trunk/planarity/gamestate.h	2005-07-30 10:29:03 UTC (rev 9652)
+++ trunk/planarity/gamestate.h	2005-07-30 10:57:11 UTC (rev 9653)
@@ -23,3 +23,4 @@
 extern time_t get_elapsed();
 extern void set_timer(time_t off);
 extern int get_initial_intersections();
+extern int get_raw_score();

Modified: trunk/planarity/version.h
===================================================================
--- trunk/planarity/version.h	2005-07-30 10:29:03 UTC (rev 9652)
+++ trunk/planarity/version.h	2005-07-30 10:57:11 UTC (rev 9653)
@@ -1,2 +1,2 @@
 /* DO NOT EDIT: Automated versioning hack [Thu Jul 21 05:46:15 EDT 2005] */
-/* DO NOT EDIT: Automated versioning hack [Sat Jul 30 06:28:05 EDT 2005] */
+/* DO NOT EDIT: Automated versioning hack [Sat Jul 30 06:56:05 EDT 2005] */



More information about the commits mailing list