X-Git-Url: https://jxself.org/git/?a=blobdiff_plain;f=score.c;h=3f8d6a291d6e52af44895143814ead7aebc3f4ed;hb=a141f021d525c59da1909378fa628c8a4c9901d4;hp=b1e0d7af13f4e615bdbe4c0e46b6c63afb63bd37;hpb=e6f183ba7f4e0d7e12d7cdc848d204e308840f9c;p=open-adventure.git diff --git a/score.c b/score.c index b1e0d7a..3f8d6a2 100644 --- a/score.c +++ b/score.c @@ -1,6 +1,7 @@ #include #include "advent.h" #include "database.h" +#include "newdb.h" /* * scoring and wrap-up @@ -33,7 +34,7 @@ void score(long mode) /* First tally up the treasures. Must be in building and not broken. * Give the poor guy 2 points just for finding each treasure. */ for (i=MINTRS; i<=MAXTRS; i++) { - if(PTEXT[i] != 0) { + if(object_descriptions[i].inventory != 0) { k=12; if(i == CHEST)k=14; if(i > CHEST)k=16; @@ -95,29 +96,29 @@ void score(long mode) if(mode < 0) { SETPRM(1,score,mxscor); SETPRM(3,game.turns,game.turns); - RSPEAK(259); + RSPEAK(GARNERED_POINTS); return; } /* that should be good enough. Let's tell him all about it. */ if(score+game.trnluz+1 >= mxscor && game.trnluz != 0) - RSPEAK(242); + RSPEAK(TOOK_LONG); if(score+game.saved+1 >= mxscor && game.saved != 0) - RSPEAK(143); + RSPEAK(WITHOUT_SUSPENDS); SETPRM(1,score,mxscor); SETPRM(3,game.turns,game.turns); - RSPEAK(262); + RSPEAK(TOTAL_SCORE); for (i=1; i<=CLSSES; i++) { if(CVAL[i] >= score) { - SPEAK(CTEXT[i]); + newspeak(class_messages[i]); i=CVAL[i]+1-score; SETPRM(1,i,i); - RSPEAK(263); + RSPEAK(NEXT_HIGHER); exit(0); } } - RSPEAK(265); - RSPEAK(264); + RSPEAK(OFF_SCALE); + RSPEAK(NO_HIGHER); exit(0); }