OSDN Git Service

城のダンジョン(NO_CAVE)で、部屋の配置法を変更。find_space()内で配置位置の候補の中から常に真ん中の1つを選ぶ事で、フロアがかなり秩序立った配置になるよ...
authormogami <mogami@0568b783-4c39-0410-ac80-bf13821ea2a2>
Thu, 16 Oct 2003 19:03:49 +0000 (19:03 +0000)
committermogami <mogami@0568b783-4c39-0410-ac80-bf13821ea2a2>
Thu, 16 Oct 2003 19:03:49 +0000 (19:03 +0000)
src/rooms.c

index b783f40..eec7f4b 100644 (file)
@@ -373,8 +373,19 @@ static bool find_space(int *y, int *x, int height, int width)
                return FALSE;
        }
 
-       /* Choose a random one */
-       pick = randint1(candidates);
+       /* Normal dungeon */
+       if (!(d_info[dungeon_type].flags1 & DF1_NO_CAVE))
+       {
+               /* Choose a random one */
+               pick = randint1(candidates);
+       }
+
+       /* NO_CAVE dungeon (Castle) */
+       else
+       {
+               /* Always choose the center one */
+               pick = candidates/2 + 1;
+       }
 
        /* Pick up the choosen location */
        for (block_y = dun->row_rooms - blocks_high; block_y >= 0; block_y--)