Mercurial > hg > early-roguelike
changeset 69:88dc6813e36a
arogue5: update the score list before prompting to exit.
author | elwin |
---|---|
date | Sat, 11 Aug 2012 20:58:24 +0000 |
parents | 7a7fb9b810e1 |
children | b27bd9f8c7d0 |
files | arogue5/rip.c |
diffstat | 1 files changed, 13 insertions(+), 11 deletions(-) [+] |
line wrap: on
line diff
--- a/arogue5/rip.c Sat Aug 11 18:56:32 2012 +0000 +++ b/arogue5/rip.c Sat Aug 11 20:58:24 2012 +0000 @@ -472,6 +472,13 @@ } } + fseek(outf, 0L, 0); + /* + * Update the list file + */ + scoreout(top_ten, outf); + fclose(outf); + /* * SCOREIT -- rogue -s option. Never started curses if this option. * UPDATE -- network scoring update. Never started curses if this option. @@ -557,19 +564,14 @@ else printf("\n"); } } - if ((flags != SCOREIT) && (flags != UPDATE)) { - printf("\n[Press return to exit]"); - fflush(stdout); - fgets(prbuf,80,stdin); - } /* if (prflags == EDITSCORE) endwin(); */ /* End editing windowing */ } - fseek(outf, 0L, 0); - /* - * Update the list file - */ - scoreout(top_ten, outf); - fclose(outf); + + if ((flags != SCOREIT) && (flags != UPDATE)) { + printf("\n[Press return to exit]"); + fflush(stdout); + fgets(prbuf,80,stdin); + } } void writelog(unsigned long amount, int flags, short monst) {