YAMLify section 11 (hints).
[open-adventure.git] / score.c
diff --git a/score.c b/score.c
index 3091413e36fde70bd0194f6b8b6e20fecf4d1c0a..8f91e44716ad0b6b95efeb6681fa0648d7399631 100644 (file)
--- a/score.c
+++ b/score.c
@@ -89,7 +89,7 @@ long score(enum termination mode)
     /* Deduct for hints/turns/saves. Hints < 4 are special; see database desc. */
     for (long i = 1; i <= HNTMAX; i++) {
         if (game.hinted[i])
-            score = score - HINTS[i][2];
+            score = score - hints[i-1].penalty;
     }
     if (game.novice)
         score -= 5;
@@ -120,9 +120,9 @@ void terminate(enum termination mode)
     SETPRM(3, game.turns, game.turns);
     RSPEAK(TOTAL_SCORE);
     for (long i = 1; i <= (long)CLSSES; i++) {
-        if (CVAL[i] >= points) {
-            speak(class_messages[i]);
-            i = CVAL[i] + 1 - points;
+        if (classes[i].threshold >= points) {
+            speak(classes[i].message);
+            i = classes[i].threshold + 1 - points;
             SETPRM(1, i, i);
             RSPEAK(NEXT_HIGHER);
             exit(0);