OSDN Git Service

#37449 (2.2.0.78) 2.2.0.75より前のセーブファイルを読み込む処理と、ロード時のセーブデータバージョン表示を修正。 / Fix loading...
authorDeskull <desull@users.sourceforge.jp>
Sat, 2 Sep 2017 03:24:36 +0000 (12:24 +0900)
committerDeskull <desull@users.sourceforge.jp>
Sat, 2 Sep 2017 03:24:36 +0000 (12:24 +0900)
src/defines.h
src/load.c
src/save.c

index 858b6db..6bec0b7 100644 (file)
@@ -53,7 +53,7 @@
 #define FAKE_VER_MAJOR 12 /*!< ゲームのバージョン番号定義(メジャー番号 + 10) */
 #define FAKE_VER_MINOR 2 /*!< ゲームのバージョン番号定義(マイナー番号) */
 #define FAKE_VER_PATCH 0 /*!< ゲームのバージョン番号定義(パッチ番号) */
-#define FAKE_VER_EXTRA 77 /*!< ゲームのバージョン番号定義(エクストラ番号) */
+#define FAKE_VER_EXTRA 78 /*!< ゲームのバージョン番号定義(エクストラ番号) */
 
 
  /*!
index 11db047..8e213ef 100644 (file)
@@ -2372,9 +2372,9 @@ static void rd_messages(void)
 
        if (h_older_than(2, 2, 0, 75))
        {
-               s16b num;
+               u16b num;
                /* Total */
-               rd_s16b(&num);
+               rd_u16b(&num);
 
                /* Read the messages */
                for (i = 0; i < num; i++)
@@ -3298,12 +3298,6 @@ static errr rd_savefile_new_aux(void)
 #endif
 
 
-       /* Mention the savefile version */
-       note(format(
-                    _("バージョン %d.%d.%d のセーブ・ファイルをロード中...", "Loading a %d.%d.%d savefile..."),
-                    (z_major > 9) ? z_major - 10 : z_major, z_minor, z_patch));
-
-
        /* Strip the version bytes */
        strip_bytes(4);
 
@@ -3322,6 +3316,12 @@ static errr rd_savefile_new_aux(void)
        rd_byte(&h_ver_minor);
        rd_byte(&h_ver_major);
 
+       /* Mention the savefile version */
+       note(format(
+               _("バージョン %d.%d.%d.%d のセーブ・ファイルをロード中...", "Loading a %d.%d.%d.%d savefile..."),
+               (h_ver_major > 9) ? h_ver_major - 10 : h_ver_major, h_ver_minor, h_ver_patch, h_ver_extra));
+
+
        /* Operating system info */
        rd_u32b(&sf_system);
 
index 2179234..6220870 100644 (file)
@@ -2030,7 +2030,7 @@ bool load_player(void)
 
        /* Message */
 #ifdef JP
-       msg_format("エラー(%s)がバージョン%d.%d.%d 用セーブファイル読み込中に発生。",
+       msg_format("エラー(%s)がバージョン%d.%d.%d 用セーブファイル読み込中に発生。",
                   what, (z_major>9) ? z_major - 10 : z_major, z_minor, z_patch);
 #else
        msg_format("Error (%s) reading %d.%d.%d savefile.",