X-Git-Url: https://jxself.org/git/?a=blobdiff_plain;ds=sidebyside;f=score.c;h=bf47792a5125ab833fdd9deb6c2cf42c00598e9f;hb=fef9657e3e00d952571bf96797ad716d00affeff;hp=b1e0d7af13f4e615bdbe4c0e46b6c63afb63bd37;hpb=e6f183ba7f4e0d7e12d7cdc848d204e308840f9c;p=open-adventure.git diff --git a/score.c b/score.c index b1e0d7a..bf47792 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(ARB_259); 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(ARB_242); if(score+game.saved+1 >= mxscor && game.saved != 0) - RSPEAK(143); + RSPEAK(ARB_143); SETPRM(1,score,mxscor); SETPRM(3,game.turns,game.turns); - RSPEAK(262); + RSPEAK(ARB_262); 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(ARB_263); exit(0); } } - RSPEAK(265); - RSPEAK(264); + RSPEAK(ARB_265); + RSPEAK(ARB_264); exit(0); }