OSDN Git Service

Merge pull request #3984 from habu1010/feature/fix-reset-recall-prompt
authorHabu <habu1010+github@gmail.com>
Thu, 2 May 2024 11:40:17 +0000 (20:40 +0900)
committerGitHub <noreply@github.com>
Thu, 2 May 2024 11:40:17 +0000 (20:40 +0900)
[Fix] フロア・リセットで提示される階層の初期値がおかしい

src/birth/birth-wizard.cpp
src/core/asking-player.cpp

index ff8b02d..99bb9ae 100644 (file)
@@ -272,7 +272,7 @@ static bool let_player_build_character(PlayerType *player_ptr)
 
 static void display_initial_options(PlayerType *player_ptr)
 {
-    uint16_t expfact = get_expfact(player_ptr) - 100;
+    const auto expfact_mod = static_cast<int>(get_expfact(player_ptr)) - 100;
     int16_t adj[A_MAX];
     for (int i = 0; i < A_MAX; i++) {
         adj[i] = rp_ptr->r_adj[i] + cp_ptr->c_adj[i] + ap_ptr->a_adj[i];
@@ -282,7 +282,7 @@ static void display_initial_options(PlayerType *player_ptr)
     put_str("                                   ", 3, 40);
     put_str(_("修正の合計値", "Your total modification"), 3, 40);
     put_str(_("腕力 知能 賢さ 器用 耐久 魅力 経験 ", "Str  Int  Wis  Dex  Con  Chr   EXP "), 4, 40);
-    strnfmt(buf, sizeof(buf), "%+3d  %+3d  %+3d  %+3d  %+3d  %+3d %+4d%% ", adj[0], adj[1], adj[2], adj[3], adj[4], adj[5], expfact);
+    strnfmt(buf, sizeof(buf), "%+3d  %+3d  %+3d  %+3d  %+3d  %+3d %+4d%% ", adj[0], adj[1], adj[2], adj[3], adj[4], adj[5], expfact_mod);
     c_put_str(TERM_L_BLUE, buf, 5, 40);
 
     put_str("HD ", 6, 40);
index 3332111..8a4d701 100644 (file)
@@ -291,7 +291,7 @@ bool input_check_strict(PlayerType *player_ptr, std::string_view prompt, EnumCla
     auto &rfu = RedrawingFlagsUpdater::get_instance();
     if (auto_more) {
         rfu.set_flag(SubWindowRedrawingFlag::MESSAGE);
-        handle_stuff(player_ptr);
+        window_stuff(player_ptr);
         num_more = 0;
     }
 
@@ -301,7 +301,7 @@ bool input_check_strict(PlayerType *player_ptr, std::string_view prompt, EnumCla
     if (mode.has_not(UserCheck::NO_HISTORY) && player_ptr->playing) {
         message_add(buf);
         rfu.set_flag(SubWindowRedrawingFlag::MESSAGE);
-        handle_stuff(player_ptr);
+        window_stuff(player_ptr);
     }
 
     bool flag = false;