diff options
author | Bardur Arantsson <bardur@scientician.net> | 2014-06-26 07:36:44 +0200 |
---|---|---|
committer | Bardur Arantsson <bardur@scientician.net> | 2014-06-26 07:36:44 +0200 |
commit | 6c185caed15deb5f63253921a12fdc61b6afb656 (patch) | |
tree | 3cf187b84c293c807fd4b5fbf14d0dba8e67c707 /src/cmd4.cc | |
parent | ec23e119e24a32f4607dfdc0f43e8726febc4043 (diff) |
Remove unused screendump_aux
Diffstat (limited to 'src/cmd4.cc')
-rw-r--r-- | src/cmd4.cc | 147 |
1 files changed, 63 insertions, 84 deletions
diff --git a/src/cmd4.cc b/src/cmd4.cc index 9f1bab47..7a6fbe7c 100644 --- a/src/cmd4.cc +++ b/src/cmd4.cc @@ -3029,127 +3029,106 @@ void do_cmd_load_screen(void) /* - * Redefinable "save_screen" action - */ -void (*screendump_aux)(void) = NULL; - - - - - - -/* * Hack -- save a screen dump to a file */ void do_cmd_save_screen(void) { - /* Do we use a special screendump function ? */ - if (screendump_aux) - { - /* Dump the screen to a graphics file */ - (*screendump_aux)(); - } - - /* Dump the screen as text */ - else - { - int y, x; - int wid, hgt; + int y, x; + int wid, hgt; - byte a = 0; - char c = ' '; + byte a = 0; + char c = ' '; - FILE *fff; + FILE *fff; - char buf[1024]; + char buf[1024]; - /* Build the filename */ - path_build(buf, 1024, ANGBAND_DIR_USER, "dump.txt"); + /* Build the filename */ + path_build(buf, 1024, ANGBAND_DIR_USER, "dump.txt"); - /* File type is "TEXT" */ - FILE_TYPE(FILE_TYPE_TEXT); + /* File type is "TEXT" */ + FILE_TYPE(FILE_TYPE_TEXT); - /* Append to the file */ - fff = my_fopen(buf, "w"); + /* Append to the file */ + fff = my_fopen(buf, "w"); - /* Oops */ - if (!fff) return; + /* Oops */ + if (!fff) return; - /* Retrieve the current screen size */ - Term_get_size(&wid, &hgt); + /* Retrieve the current screen size */ + Term_get_size(&wid, &hgt); - /* Enter "icky" mode */ - character_icky = TRUE; + /* Enter "icky" mode */ + character_icky = TRUE; - /* Save the screen */ - Term_save(); + /* Save the screen */ + Term_save(); - /* Dump the screen */ - for (y = 0; y < hgt; y++) + /* Dump the screen */ + for (y = 0; y < hgt; y++) + { + /* Dump each row */ + for (x = 0; x < wid; x++) { - /* Dump each row */ - for (x = 0; x < wid; x++) - { - /* Get the attr/char */ - (void)(Term_what(x, y, &a, &c)); + /* Get the attr/char */ + (void)(Term_what(x, y, &a, &c)); - /* Dump it */ - buf[x] = c; - } + /* Dump it */ + buf[x] = c; + } - /* Terminate */ - buf[x] = '\0'; + /* Terminate */ + buf[x] = '\0'; - /* End the row */ - fprintf(fff, "%s\n", buf); - } + /* End the row */ + fprintf(fff, "%s\n", buf); + } - /* Skip a line */ - fprintf(fff, "\n"); + /* Skip a line */ + fprintf(fff, "\n"); - /* Dump the screen */ - for (y = 0; y < hgt; y++) + /* Dump the screen */ + for (y = 0; y < hgt; y++) + { + /* Dump each row */ + for (x = 0; x < wid; x++) { - /* Dump each row */ - for (x = 0; x < wid; x++) - { - /* Get the attr/char */ - (void)(Term_what(x, y, &a, &c)); + /* Get the attr/char */ + (void)(Term_what(x, y, &a, &c)); - /* Dump it */ - buf[x] = hack[a & 0x0F]; - } + /* Dump it */ + buf[x] = hack[a & 0x0F]; + } - /* Terminate */ - buf[x] = '\0'; + /* Terminate */ + buf[x] = '\0'; - /* End the row */ - fprintf(fff, "%s\n", buf); - } + /* End the row */ + fprintf(fff, "%s\n", buf); + } - /* Skip a line */ - fprintf(fff, "\n"); + /* Skip a line */ + fprintf(fff, "\n"); - /* Close it */ - my_fclose(fff); + /* Close it */ + my_fclose(fff); - /* Message */ - msg_print("Screen dump saved."); - msg_print(NULL); + /* Message */ + msg_print("Screen dump saved."); + msg_print(NULL); - /* Restore the screen */ - Term_load(); + /* Restore the screen */ + Term_load(); - /* Leave "icky" mode */ - character_icky = FALSE; - } + /* Leave "icky" mode */ + character_icky = FALSE; } |