X-Git-Url: https://jxself.org/git/?a=blobdiff_plain;f=score.c;h=24dcc0a29d7bcca580f720e052abed574953a58b;hb=dfff80faa8b5cf4cd286fee2d1ef5eebcdb49829;hp=4331f7f93bfecd6485eaa71e2c8fef1730a71c8e;hpb=20859304c0e13f4d7a61835fb6912735d98cd3b2;p=open-adventure.git diff --git a/score.c b/score.c index 4331f7f..24dcc0a 100644 --- a/score.c +++ b/score.c @@ -117,6 +117,9 @@ void terminate(enum termination mode) /* End of game. Let's tell him all about it. */ { int points = score(mode); +#if defined ADVENT_AUTOSAVE + autosave(); +#endif if (points + game.trnluz + 1 >= mxscor && game.trnluz != 0) rspeak(TOOK_LONG); @@ -126,13 +129,16 @@ void terminate(enum termination mode) for (int i = 1; i <= (int)NCLASSES; i++) { if (classes[i].threshold >= points) { speak(classes[i].message); - int nxt = classes[i].threshold + 1 - points; - rspeak(NEXT_HIGHER, nxt, nxt); + if (i < (int)NCLASSES) { + int nxt = classes[i].threshold + 1 - points; + rspeak(NEXT_HIGHER, nxt, nxt); + } else { + rspeak(NO_HIGHER); + } exit(EXIT_SUCCESS); } } rspeak(OFF_SCALE); - rspeak(NO_HIGHER); exit(EXIT_SUCCESS); }