From: deskull Date: Sun, 3 Mar 2019 11:49:37 +0000 (+0900) Subject: [Refactor] #37353 prt_state() 整理。 / Refactor prt_state(). X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=d343f0964bc42e670ea4a7c245a0e5e3af11b19e;p=hengband%2Fhengband.git [Refactor] #37353 prt_state() 整理。 / Refactor prt_state(). --- diff --git a/src/view-mainwindow.c b/src/view-mainwindow.c index bc093fc4f..44bc04841 100644 --- a/src/view-mainwindow.c +++ b/src/view-mainwindow.c @@ -1050,60 +1050,23 @@ static void prt_state(void) break; } case ACTION_REST: - { - int i; - /* Start with "Rest" */ strcpy(text, _(" ", " ")); - /* Extensive (timed) rest */ - if (p_ptr->resting >= 1000) - { - i = p_ptr->resting / 100; - text[3] = '0'; - text[2] = '0'; - text[1] = '0' + (i % 10); - text[0] = '0' + (i / 10); - } - - /* Long (timed) rest */ - else if (p_ptr->resting >= 100) - { - i = p_ptr->resting; - text[3] = '0' + (i % 10); - i = i / 10; - text[2] = '0' + (i % 10); - text[1] = '0' + (i / 10); - } - - /* Medium (timed) rest */ - else if (p_ptr->resting >= 10) - { - i = p_ptr->resting; - text[3] = '0' + (i % 10); - text[2] = '0' + (i / 10); - } - - /* Short (timed) rest */ - else if (p_ptr->resting > 0) + if (p_ptr->resting > 0) { - i = p_ptr->resting; - text[3] = '0' + (i); + sprintf(text, "%4d", p_ptr->resting); } - - /* Rest until healed */ else if (p_ptr->resting == COMMAND_ARG_REST_FULL_HEALING) { text[0] = text[1] = text[2] = text[3] = '*'; } - - /* Rest until done */ else if (p_ptr->resting == COMMAND_ARG_REST_UNTIL_DONE) { text[0] = text[1] = text[2] = text[3] = '&'; } break; - } + case ACTION_LEARN: { strcpy(text, _("学習", "lear"));