summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBardur Arantsson <bardur@scientician.net>2015-12-11 08:09:30 +0100
committerBardur Arantsson <bardur@scientician.net>2015-12-11 08:09:30 +0100
commit15a80ee3ec9d463dbae71415ba4469814fb76109 (patch)
treee0291aef7747c4ee005800577f8c75215fb76f0e
parent839db5c5b54f8885fa6e675060f987c3c6e1e2d6 (diff)
Clean up indentation
-rw-r--r--src/files.cc139
1 files changed, 68 insertions, 71 deletions
diff --git a/src/files.cc b/src/files.cc
index 85a813b..765ea65 100644
--- a/src/files.cc
+++ b/src/files.cc
@@ -4455,105 +4455,102 @@ static void center_string(char *buf, cptr str)
*/
static void print_tomb(void)
{
- /* Print the text-tombstone */
- {
- cptr p;
-
- char tmp[160];
-
- char buf[1024];
- char dummy[80];
+ cptr p;
- FILE *fp;
-
- time_t ct = time(nullptr);
+ char tmp[160];
+ char buf[1024];
+ char dummy[80];
- /* Clear screen */
- Term_clear();
+ FILE *fp;
- /* Build the filename */
- path_build(buf, 1024, ANGBAND_DIR_FILE, "dead.txt");
+ time_t ct = time(nullptr);
- /* Open the News file */
- fp = my_fopen(buf, "r");
- /* Dump */
- if (fp)
- {
- int i = 0;
+ /* Clear screen */
+ Term_clear();
- /* Dump the file to the screen */
- while (0 == my_fgets(fp, buf, 1024))
- {
- /* Display and advance */
- display_message(0, i++, strlen(buf), TERM_WHITE, buf);
- }
+ /* Build the filename */
+ path_build(buf, 1024, ANGBAND_DIR_FILE, "dead.txt");
- /* Close */
- my_fclose(fp);
- }
+ /* Open the News file */
+ fp = my_fopen(buf, "r");
+ /* Dump */
+ if (fp)
+ {
+ int i = 0;
- /* King or Queen */
- if (total_winner || (p_ptr->lev > PY_MAX_LEVEL))
+ /* Dump the file to the screen */
+ while (0 == my_fgets(fp, buf, 1024))
{
- p = "Magnificent";
+ /* Display and advance */
+ display_message(0, i++, strlen(buf), TERM_WHITE, buf);
}
- /* Normal */
- else
- {
- p = cp_ptr->titles[(p_ptr->lev - 1) / 5];
- }
+ /* Close */
+ my_fclose(fp);
+ }
- center_string(buf, player_name);
- put_str(buf, 6, 11);
- center_string(buf, "the");
- put_str(buf, 7, 11);
+ /* King or Queen */
+ if (total_winner || (p_ptr->lev > PY_MAX_LEVEL))
+ {
+ p = "Magnificent";
+ }
- center_string(buf, p);
- put_str(buf, 8, 11);
+ /* Normal */
+ else
+ {
+ p = cp_ptr->titles[(p_ptr->lev - 1) / 5];
+ }
+ center_string(buf, player_name);
+ put_str(buf, 6, 11);
- center_string(buf, spp_ptr->title);
- put_str(buf, 10, 11);
+ center_string(buf, "the");
+ put_str(buf, 7, 11);
- (void)sprintf(tmp, "Level: %d", (int)p_ptr->lev);
- center_string(buf, tmp);
- put_str(buf, 11, 11);
+ center_string(buf, p);
+ put_str(buf, 8, 11);
- (void)sprintf(tmp, "Exp: %ld", (long)p_ptr->exp);
- center_string(buf, tmp);
- put_str(buf, 12, 11);
- (void)sprintf(tmp, "AU: %ld", (long)p_ptr->au);
- center_string(buf, tmp);
- put_str(buf, 13, 11);
+ center_string(buf, spp_ptr->title);
+ put_str(buf, 10, 11);
- (void)sprintf(tmp, "Killed on Level %d", dun_level);
- center_string(buf, tmp);
- put_str(buf, 14, 11);
+ (void)sprintf(tmp, "Level: %d", (int)p_ptr->lev);
+ center_string(buf, tmp);
+ put_str(buf, 11, 11);
+ (void)sprintf(tmp, "Exp: %ld", (long)p_ptr->exp);
+ center_string(buf, tmp);
+ put_str(buf, 12, 11);
- if (strlen(died_from) > 24)
- {
- strncpy(dummy, died_from, 24);
- dummy[24] = '\0';
- (void)sprintf(tmp, "by %s.", dummy);
- }
- else
- (void)sprintf(tmp, "by %s.", died_from);
+ (void)sprintf(tmp, "AU: %ld", (long)p_ptr->au);
+ center_string(buf, tmp);
+ put_str(buf, 13, 11);
- center_string(buf, tmp);
- put_str(buf, 15, 11);
+ (void)sprintf(tmp, "Killed on Level %d", dun_level);
+ center_string(buf, tmp);
+ put_str(buf, 14, 11);
- (void)sprintf(tmp, "%-.24s", ctime(&ct));
- center_string(buf, tmp);
- put_str(buf, 17, 11);
+ if (strlen(died_from) > 24)
+ {
+ strncpy(dummy, died_from, 24);
+ dummy[24] = '\0';
+ (void)sprintf(tmp, "by %s.", dummy);
}
+ else
+ (void)sprintf(tmp, "by %s.", died_from);
+
+ center_string(buf, tmp);
+ put_str(buf, 15, 11);
+
+
+ (void)sprintf(tmp, "%-.24s", ctime(&ct));
+ center_string(buf, tmp);
+ put_str(buf, 17, 11);
}