OSDN Git Service

[Refactor] #37353 グローバル変数 dungeon_type を他の慣例に従い dungeon_idx に改名。 / Rename dungeon_typ...
[hengband/hengband.git] / src / rooms-normal.c
index 21a2746..6c48844 100644 (file)
@@ -18,8 +18,8 @@ bool build_type1(void)
 \r
        cave_type *c_ptr;\r
 \r
-       bool curtain = (d_info[dungeon_type].flags1 & DF1_CURTAIN) &&\r
-               one_in_((d_info[dungeon_type].flags1 & DF1_NO_CAVE) ? 48 : 512);\r
+       bool curtain = (d_info[dungeon_idx].flags1 & DF1_CURTAIN) &&\r
+               one_in_((d_info[dungeon_idx].flags1 & DF1_NO_CAVE) ? 48 : 512);\r
 \r
        /* Pick a room size */\r
        y1 = randint1(4);\r
@@ -47,7 +47,7 @@ bool build_type1(void)
        }\r
 \r
        /* Choose lite or dark */\r
-       light = ((dun_level <= randint1(25)) && !(d_info[dungeon_type].flags1 & DF1_DARKNESS));\r
+       light = ((dun_level <= randint1(25)) && !(d_info[dungeon_idx].flags1 & DF1_DARKNESS));\r
 \r
 \r
        /* Get corner values */\r
@@ -163,8 +163,8 @@ bool build_type1(void)
        /* Hack -- Occasional divided room */\r
        else if (one_in_(50))\r
        {\r
-               bool curtain2 = (d_info[dungeon_type].flags1 & DF1_CURTAIN) &&\r
-                       one_in_((d_info[dungeon_type].flags1 & DF1_NO_CAVE) ? 2 : 128);\r
+               bool curtain2 = (d_info[dungeon_idx].flags1 & DF1_CURTAIN) &&\r
+                       one_in_((d_info[dungeon_idx].flags1 & DF1_NO_CAVE) ? 2 : 128);\r
 \r
                if (randint1(100) < 50)\r
                {\r
@@ -216,7 +216,7 @@ bool build_type2(void)
        if (!find_space(&yval, &xval, 11, 25)) return FALSE;\r
 \r
        /* Choose lite or dark */\r
-       light = ((dun_level <= randint1(25)) && !(d_info[dungeon_type].flags1 & DF1_DARKNESS));\r
+       light = ((dun_level <= randint1(25)) && !(d_info[dungeon_idx].flags1 & DF1_DARKNESS));\r
 \r
        /* Determine extents of the first room */\r
        y1a = yval - randint1(4);\r
@@ -341,7 +341,7 @@ bool build_type3(void)
 \r
 \r
        /* Choose lite or dark */\r
-       light = ((dun_level <= randint1(25)) && !(d_info[dungeon_type].flags1 & DF1_DARKNESS));\r
+       light = ((dun_level <= randint1(25)) && !(d_info[dungeon_idx].flags1 & DF1_DARKNESS));\r
 \r
        /* For now, always 3x3 */\r
        wx = wy = 1;\r
@@ -532,9 +532,9 @@ bool build_type3(void)
                        /* Sometimes shut using secret doors */\r
                        if (one_in_(3))\r
                        {\r
-                               int door_type = ((d_info[dungeon_type].flags1 & DF1_CURTAIN) &&\r
-                                       one_in_((d_info[dungeon_type].flags1 & DF1_NO_CAVE) ? 16 : 256)) ? DOOR_CURTAIN :\r
-                                       ((d_info[dungeon_type].flags1 & DF1_GLASS_DOOR) ? DOOR_GLASS_DOOR : DOOR_DOOR);\r
+                               int door_type = ((d_info[dungeon_idx].flags1 & DF1_CURTAIN) &&\r
+                                       one_in_((d_info[dungeon_idx].flags1 & DF1_NO_CAVE) ? 16 : 256)) ? DOOR_CURTAIN :\r
+                                       ((d_info[dungeon_idx].flags1 & DF1_GLASS_DOOR) ? DOOR_GLASS_DOOR : DOOR_DOOR);\r
 \r
                                place_secret_door(yval, x1a - 1, door_type);\r
                                place_secret_door(yval, x2a + 1, door_type);\r
@@ -595,7 +595,7 @@ bool build_type4(void)
        if (!find_space(&yval, &xval, 11, 25)) return FALSE;\r
 \r
        /* Choose lite or dark */\r
-       light = ((dun_level <= randint1(25)) && !(d_info[dungeon_type].flags1 & DF1_DARKNESS));\r
+       light = ((dun_level <= randint1(25)) && !(d_info[dungeon_idx].flags1 & DF1_DARKNESS));\r
 \r
        /* Large room */\r
        y1 = yval - 4;\r
@@ -773,9 +773,9 @@ bool build_type4(void)
                        /* Occasionally, some Inner rooms */\r
                        if (one_in_(3))\r
                        {\r
-                               int door_type = ((d_info[dungeon_type].flags1 & DF1_CURTAIN) &&\r
-                                       one_in_((d_info[dungeon_type].flags1 & DF1_NO_CAVE) ? 16 : 256)) ? DOOR_CURTAIN :\r
-                                       ((d_info[dungeon_type].flags1 & DF1_GLASS_DOOR) ? DOOR_GLASS_DOOR : DOOR_DOOR);\r
+                               int door_type = ((d_info[dungeon_idx].flags1 & DF1_CURTAIN) &&\r
+                                       one_in_((d_info[dungeon_idx].flags1 & DF1_NO_CAVE) ? 16 : 256)) ? DOOR_CURTAIN :\r
+                                       ((d_info[dungeon_idx].flags1 & DF1_GLASS_DOOR) ? DOOR_GLASS_DOOR : DOOR_DOOR);\r
 \r
                                /* Long horizontal walls */\r
                                for (x = xval - 5; x <= xval + 5; x++)\r
@@ -850,9 +850,9 @@ bool build_type4(void)
                /* Four small rooms. */\r
                case 5:\r
                {\r
-                       int door_type = ((d_info[dungeon_type].flags1 & DF1_CURTAIN) &&\r
-                               one_in_((d_info[dungeon_type].flags1 & DF1_NO_CAVE) ? 16 : 256)) ? DOOR_CURTAIN :\r
-                               ((d_info[dungeon_type].flags1 & DF1_GLASS_DOOR) ? DOOR_GLASS_DOOR : DOOR_DOOR);\r
+                       int door_type = ((d_info[dungeon_idx].flags1 & DF1_CURTAIN) &&\r
+                               one_in_((d_info[dungeon_idx].flags1 & DF1_NO_CAVE) ? 16 : 256)) ? DOOR_CURTAIN :\r
+                               ((d_info[dungeon_idx].flags1 & DF1_GLASS_DOOR) ? DOOR_GLASS_DOOR : DOOR_DOOR);\r
 \r
                        /* Inner "cross" */\r
                        for (y = y1; y <= y2; y++)\r
@@ -916,7 +916,7 @@ bool build_type11(void)
        int light = FALSE;\r
 \r
        /* Occasional light */\r
-       if ((randint1(dun_level) <= 15) && !(d_info[dungeon_type].flags1 & DF1_DARKNESS)) light = TRUE;\r
+       if ((randint1(dun_level) <= 15) && !(d_info[dungeon_idx].flags1 & DF1_DARKNESS)) light = TRUE;\r
 \r
        rad = randint0(9);\r
 \r
@@ -971,7 +971,7 @@ bool build_type12(void)
        h4 = randint1(32) - 16;\r
 \r
        /* Occasional light */\r
-       if ((randint1(dun_level) <= 5) && !(d_info[dungeon_type].flags1 & DF1_DARKNESS)) light = TRUE;\r
+       if ((randint1(dun_level) <= 5) && !(d_info[dungeon_idx].flags1 & DF1_DARKNESS)) light = TRUE;\r
 \r
        rad = randint1(9);\r
 \r