diff options
author | Bardur Arantsson <bardur@scientician.net> | 2012-06-26 19:29:01 +0200 |
---|---|---|
committer | Bardur Arantsson <bardur@scientician.net> | 2012-06-26 20:06:00 +0200 |
commit | 758e1f85d64024dce419cfe8a1cd3315b4b58b53 (patch) | |
tree | d4a38f4f6375fbc71bc3e53c97056ee144e69ce1 /src/main-win.c | |
parent | 67485c9c36e244861c6226a3854781d1dd16f3ca (diff) |
Remove "highscore_fd" global.
Diffstat (limited to 'src/main-win.c')
-rw-r--r-- | src/main-win.c | 66 |
1 files changed, 1 insertions, 65 deletions
diff --git a/src/main-win.c b/src/main-win.c index 1498672d..3674c88d 100644 --- a/src/main-win.c +++ b/src/main-win.c @@ -2939,71 +2939,7 @@ ofn.lStructSize = sizeof(OPENFILENAME); /* Score */ case IDM_FILE_SCORE: { - char buf[1024]; - - /* Paranoia */ - if (!initialized || character_icky || - !game_in_progress || !character_generated) - { - /* Can't happen but just in case */ - plog("You may not do that right now."); - - break; - } - - /* Build the pathname of the score file */ - path_build(buf, sizeof(buf), ANGBAND_DIR_USER, "scores.raw"); - - /* Hack - open the score file for reading */ - highscore_fd = fd_open(buf, O_RDONLY); - - /* Paranoia - No score file */ - if (highscore_fd < 0) - { - msg_print("Score file is not available."); - - break; - } - - /* Mega-Hack - prevent various functions XXX XXX XXX */ - initialized = FALSE; - - /* Save screen */ - screen_save(); - - /* Clear screen */ - Term_clear(); - - /* Prepare scores */ - if (game_in_progress && character_generated) - { - predict_score(); - } - -#if 0 /* I don't like this - pelpel */ - - /* Mega-Hack - No current player XXX XXX XXX XXX */ - else - { - display_scores_aux(0, MAX_HISCORES, -1, NULL); - } - -#endif - - /* Close the high score file */ - (void)fd_close(highscore_fd); - - /* Forget the fd */ - highscore_fd = -1; - - /* Restore screen */ - screen_load(); - - /* Hack - Flush it */ - Term_fresh(); - - /* Mega-Hack - We are ready again */ - initialized = TRUE; + predict_score_gui(&initialized, &game_in_progress); /* Done */ break; |