OSDN Git Service

[Feature] #41179 いくつかの処理にput_version()適用、まだ一部問題ある上、未適用のspoil_mon_desc()でcorrupt確認中. /
authordeskull <deskull@users.sourceforge.jp>
Mon, 18 Jan 2021 12:20:13 +0000 (21:20 +0900)
committerdeskull <deskull@users.sourceforge.jp>
Mon, 18 Jan 2021 12:20:13 +0000 (21:20 +0900)
put_version () is applied to some processes, there are still some problems, and corruption is being confirmed with unapplied spoil_mon_desc ().

src/wizard/fixed-artifacts-spoiler.c
src/wizard/items-spoiler.c
src/wizard/monster-info-spoiler.c
src/wizard/wizard-special-process.c
src/wizard/wizard-spoiler.c

index c33794d..554f444 100644 (file)
@@ -70,8 +70,10 @@ void spoiler_outlist(concptr header, concptr *list, char separator)
  */
 static void print_header(void)
 {
-    char buf[80];
-    sprintf(buf, "Artifact Spoilers for Hengband Version %d.%d.%d", FAKE_VER_MAJOR - 10, FAKE_VER_MINOR, FAKE_VER_PATCH);
+    char buf[180];
+    char title[180];
+    put_version(title);
+    sprintf(buf, "Artifact Spoilers for Hengband Version %s", title);
     spoiler_underline(buf);
 }
 
index ab1f7d6..77b5b65 100644 (file)
@@ -99,7 +99,9 @@ void spoil_obj_desc(player_type *player_ptr, concptr fname)
         return;
     }
 
-    fprintf(spoiler_file, "Spoiler File -- Basic Items (Hengband %d.%d.%d.%d)\n\n\n", FAKE_VER_MAJOR - 10, FAKE_VER_MINOR, FAKE_VER_PATCH, FAKE_VER_EXTRA);
+    char title[200];
+    put_version(title);
+    fprintf(spoiler_file, "Spoiler File -- Basic Items (%s)\n\n\n", title);
     fprintf(spoiler_file, "%-37s%8s%7s%5s %40s%9s\n", "Description", "Dam/AC", "Wgt", "Lev", "Chance", "Cost");
     fprintf(spoiler_file, "%-37s%8s%7s%5s %40s%9s\n", "-------------------------------------", "------", "---", "---", "----------------", "----");
     int n = 0;
index 239f798..b2c1b81 100644 (file)
@@ -172,7 +172,9 @@ void spoil_mon_info(player_type *player_ptr, concptr fname)
         return;
     }
 
-    sprintf(buf, "Monster Spoilers for Hengband Version %d.%d.%d\n", FAKE_VER_MAJOR - 10, FAKE_VER_MINOR, FAKE_VER_PATCH);
+    char title[200];
+    put_version(title);
+    sprintf(buf, "Monster Spoilers for %s\n", title);
     spoil_out(buf);
     spoil_out("------------------------------------------\n\n");
 
index f04cd16..16833ea 100644 (file)
@@ -495,7 +495,9 @@ void wiz_dump_options(void)
             exist[ot_ptr->o_set][ot_ptr->o_bit] = i + 1;
     }
 
-    fprintf(fff, "[Option bits usage on Hengband %d.%d.%d]\n\n", FAKE_VER_MAJOR - 10, FAKE_VER_MINOR, FAKE_VER_PATCH);
+    char title[200];
+    put_version(title);
+    fprintf(fff, "[Option bits usage on %s\n]", title);
     fputs("Set - Bit (Page) Option Name\n", fff);
     fputs("------------------------------------------------\n", fff);
     for (int i = 0; i < NUM_O_SET; i++) {
index 6d1de8c..c30faf2 100644 (file)
@@ -92,8 +92,11 @@ static void spoil_mon_evol(player_type *player_ptr, concptr fname)
         return;
     }
 
-    sprintf(buf, "Monster Spoilers for Hengband Version %d.%d.%d\n", FAKE_VER_MAJOR - 10, FAKE_VER_MINOR, FAKE_VER_PATCH);
+    char title[200];
+    put_version(title);
+    sprintf(buf, "Monster Spoilers for %s\n", title);
     spoil_out(buf);
+
     spoil_out("------------------------------------------\n\n");
     C_MAKE(evol_tree, max_r_idx, int *);
     C_MAKE(*evol_tree, max_r_idx * (max_evolution_depth + 1), int);