OSDN Git Service

ゲームに関係しない箇所での乱数の消費を避けるように修正
authorHabu <habu@users.sourceforge.jp>
Fri, 7 Mar 2014 13:26:39 +0000 (22:26 +0900)
committerHabu <habu@users.sourceforge.jp>
Fri, 7 Mar 2014 13:26:39 +0000 (22:26 +0900)
 - セーブファイルのロード時に無駄な荒野生成をしていた箇所を削除
   (荒野マップデータはすぐにセーブファイルから上書きされる)
 - セーブ時にXOR用初期バイトと生成に乱数を消費していた箇所を
   Rand_externalを使用するように修正

src/load.c
src/save.c

index 40028ed..760524d 100644 (file)
@@ -3432,16 +3432,6 @@ if (arg_fiddle) note("アイテムの記録をロードしました");
        if (arg_fiddle) note("Loaded Object Memory");
 #endif
 
-
-       /* Init the wilderness seeds */
-       for (i = 0; i < max_wild_x; i++)
-       {
-               for (j = 0; j < max_wild_y; j++)
-               {
-                       wilderness[j][i].seed = randint0(0x10000000);
-               }
-       }
-
        /* 2.1.3 or newer version */
        {
                u16b max_towns_load;
index bf40ea0..3e463c4 100644 (file)
@@ -1245,7 +1245,7 @@ static bool wr_savefile_new(void)
        xor_byte = 0;
 
        /* Initial value of xor_byte */
-       tmp8u = (byte)randint0(256);
+       tmp8u = (byte)Rand_external(256);
        wr_byte(tmp8u);