Eliminate globals.
[open-adventure.git] / score.c
diff --git a/score.c b/score.c
index ef80e68df7c8a4c0c4b4ec16c33b409d996c2ec9..d0915b28887aedf3e832785daf86b7513fdb68bf 100644 (file)
--- a/score.c
+++ b/score.c
@@ -7,7 +7,8 @@
  */
 
 void score(long MODE) {
-       /* <0 if scoring, >0 if quitting, =0 if died or won */
+/* arg is <0 if scoring, >0 if quitting, =0 if died or won */
+       long MXSCOR = 0;
 
 /*  The present scoring algorithm is as follows:
  *     Objective:          Points:        Present total possible:
@@ -88,7 +89,12 @@ L20020: MXSCOR=MXSCOR+45;
 
 /*  Return to score command if that's where we came from. */
 
-       if(MODE < 0) return;
+       if(MODE < 0) {
+               SETPRM(1,SCORE,MXSCOR);
+               SETPRM(3,game.turns,game.turns);
+               RSPEAK(259);
+               return;
+       }
 
 /*  that should be good enough.  Let's tell him all about it. */