Encapsulate object-state state tests and setttings in macros.
[open-adventure.git] / score.c
diff --git a/score.c b/score.c
index d3eeb0aa7848d9d448a5460eea09c05acb6dbc41..ed9cdeda34263281610372603e9da659ff906979 100644 (file)
--- a/score.c
+++ b/score.c
@@ -50,7 +50,7 @@ int score(enum termination mode)
                 k = 16;
             if (game.objects[i].prop > STATE_NOTFOUND)
                 score += 2;
-            if (game.objects[i].place == LOC_BUILDING && game.objects[i].prop == STATE_FOUND)
+            if (game.objects[i].place == LOC_BUILDING && PROP_IS_FOUND(i))
                 score += k - 2;
             mxscor += k;
         }
@@ -96,7 +96,7 @@ int score(enum termination mode)
 
     /* Deduct for hints/turns/saves. Hints < 4 are special; see database desc. */
     for (int i = 0; i < NHINTS; i++) {
-        if (game.hinted[i])
+        if (game.hints[i].used)
             score = score - hints[i].penalty;
     }
     if (game.novice)