From d343f0964bc42e670ea4a7c245a0e5e3af11b19e Mon Sep 17 00:00:00 2001 From: deskull Date: Sun, 3 Mar 2019 20:49:37 +0900 Subject: [PATCH] =?utf8?q?[Refactor]=20#37353=20prt=5Fstate()=20=E6=95=B4?= =?utf8?q?=E7=90=86=E3=80=82=20/=20Refactor=20prt=5Fstate().?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- src/view-mainwindow.c | 43 +++---------------------------------------- 1 file changed, 3 insertions(+), 40 deletions(-) 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")); -- 2.11.0