X-Git-Url: https://jxself.org/git/?a=blobdiff_plain;f=score.c;h=a9ab765aed73e90261230c6f08f1a5e12ad853eb;hb=e34bd8acf631dd609b4b05252df3a1ea49e24c9b;hp=d49eff80338c2a816970b45b418b773ad39b8065;hpb=f1f7cfd4e95d7c7e0022a320e6979403fc0a096b;p=open-adventure.git diff --git a/score.c b/score.c index d49eff8..a9ab765 100644 --- a/score.c +++ b/score.c @@ -7,8 +7,9 @@ * scoring and wrap-up */ -void score(long mode) -/* mode is <0 if scoring, >0 if quitting, =0 if died or won */ +void score(enum termination mode) +/* mode is 'scoregame' if scoring, 'quitgame' if quitting, 'endgame' if died + * or won */ { long score = 0, mxscor = 0; @@ -54,7 +55,8 @@ void score(long mode) * mundane exits or 133, 134, 135 if he blew it (so to speak). */ score += (MAXDIE-game.numdie)*10; mxscor += MAXDIE*10; - if(mode == 0)score += 4; + if(mode == endgame) + score += 4; mxscor += 4; if(game.dflag != 0)score += 25; mxscor += 25; @@ -93,7 +95,7 @@ void score(long mode) score=score-game.trnluz-game.saved; /* Return to score command if that's where we came from. */ - if(mode < 0) { + if(mode == scoregame) { SETPRM(1,score,mxscor); SETPRM(3,game.turns,game.turns); RSPEAK(GARNERED_POINTS);