diff options
author | Bardur Arantsson <bardur@scientician.net> | 2015-12-13 17:10:05 +0100 |
---|---|---|
committer | Bardur Arantsson <bardur@scientician.net> | 2015-12-28 16:04:45 +0100 |
commit | af1b22bc057519500c58e4e87b60fefdec6f8d35 (patch) | |
tree | 348a0470843cab1f684d07dcda0738fdb172e17d /src/files.cc | |
parent | d10adaf65d299c3b4c2f4fa25c48b2dfabb7a0c8 (diff) |
Remove get_month_name()
Use simple numbered days instead and remove START_{DAY,YEAR} since
they are no longer used.
Diffstat (limited to 'src/files.cc')
-rw-r--r-- | src/files.cc | 18 |
1 files changed, 4 insertions, 14 deletions
diff --git a/src/files.cc b/src/files.cc index 765ea658..f91b51a8 100644 --- a/src/files.cc +++ b/src/files.cc @@ -2215,7 +2215,7 @@ void display_player(int mode) c_put_str(TERM_L_BLUE, deity_info[p_ptr->pgod].name, 7, 9); /* Age, Height, Weight, Social */ - prt_num("Age ", (int)p_ptr->age + bst(YEAR, turn - (START_DAY * 10)), 2, 32, TERM_L_BLUE, " "); + prt_num("Age ", (int)p_ptr->age + bst(YEAR, turn), 2, 32, TERM_L_BLUE, " "); prt_num("Height ", (int)p_ptr->ht, 3, 32, TERM_L_BLUE, " "); prt_num("Weight ", (int)p_ptr->wt, 4, 32, TERM_L_BLUE, " "); prt_num("Social Class ", (int)p_ptr->sc, 5, 32, TERM_L_BLUE, " "); @@ -2750,17 +2750,7 @@ errr file_character(cptr name, bool_ full) /* Date */ { - char buf2[20]; - u32b days = bst(DAY, turn - (START_DAY * 10)); - - strnfmt(buf2, 20, get_day(bst(YEAR, START_DAY * 10) + START_YEAR)); - fprintf(fff, "\n\n You started your adventure the %s of the %s year of the third age.", - get_month_name(bst(DAY, START_DAY * 10), wizard, FALSE), buf2); - - strnfmt(buf2, 20, get_day(bst(YEAR, turn) + START_YEAR)); - fprintf(fff, "\n %s the %s of the %s year of the third age.", - (death ? "You ended your adventure" : "It is currently"), - get_month_name(bst(DAY, turn), wizard, FALSE), buf2); + u32b days = bst(DAY, turn); fprintf(fff, (death ? "\n Your adventure lasted %ld day%s." : "\n You have been adventuring for %ld day%s."), (long int) days, (days == 1) ? "" : "s"); @@ -5182,7 +5172,7 @@ static errr top_twenty(void) the_score.gold[9] = '\0'; /* Save the current turn */ - sprintf(the_score.turns, "%9lu", (long)turn - (START_DAY * 10L)); + sprintf(the_score.turns, "%9lu", (long)turn); the_score.turns[9] = '\0'; /* Save the date in standard form (8 chars) */ @@ -5283,7 +5273,7 @@ static errr predict_score(void) the_score.gold[9] = '\0'; /* Save the current turn */ - sprintf(the_score.turns, "%9lu", (long)turn - (START_DAY * 10L)); + sprintf(the_score.turns, "%9lu", (long)turn); the_score.turns[9] = '\0'; /* Hack -- no time needed */ |