X-Git-Url: https://jxself.org/git/?a=blobdiff_plain;f=score.c;h=645a35e96a132345e6dd512496d87c9adad9d193;hb=51a88bec4dd66a95f0c17d1cc8c78bb11fc0c92e;hp=734ea196ebad7fae0fc8a9af59dc890895ae07f1;hpb=14486d67d447afc40a3c57362a9e37324992452f;p=open-adventure.git diff --git a/score.c b/score.c index 734ea19..645a35e 100644 --- a/score.c +++ b/score.c @@ -8,7 +8,8 @@ */ void score(enum termination mode) -/* mode is 'report' if scoring, 'quit' if quitting, 'end' if died or won */ +/* mode is 'scoregame' if scoring, 'quitgame' if quitting, 'endgame' if died + * or won */ { long score = 0, mxscor = 0; @@ -40,7 +41,7 @@ void score(enum termination mode) if(i > CHEST)k=16; if(game.prop[i] >= 0) score += 2; - if(game.place[i] == 3 && game.prop[i] == 0) + if(game.place[i] == LOC_BUILDING && game.prop[i] == 0) score += k-2; mxscor += k; } @@ -74,7 +75,7 @@ void score(enum termination mode) mxscor += 45; /* Did he come to Witt's End as he should? */ - if(game.place[MAGZIN] == 108) + if(game.place[MAGZIN] == LOC_WITTSEND) score += 1; mxscor += 1; @@ -109,7 +110,7 @@ void score(enum termination mode) SETPRM(1,score,mxscor); SETPRM(3,game.turns,game.turns); RSPEAK(TOTAL_SCORE); - for (long i=1; i<=CLSSES; i++) { + for (long i=1; i<=(long)CLSSES; i++) { if(CVAL[i] >= score) { newspeak(class_messages[i]); i=CVAL[i]+1-score;