OSDN Git Service

視線の通るREMEMBER地形が暗いまま記憶された場合は暗暗色で表示するよう
authornothere <nothere@0568b783-4c39-0410-ac80-bf13821ea2a2>
Fri, 12 Dec 2003 17:19:34 +0000 (17:19 +0000)
committernothere <nothere@0568b783-4c39-0410-ac80-bf13821ea2a2>
Fri, 12 Dec 2003 17:19:34 +0000 (17:19 +0000)
に変更. また, 夜の広域マップはview_special_liteとview_granite_liteの
設定によって暗暗色で描画されるように変更.

src/cave.c
src/dungeon.c

index c1be0cc..1b5072c 100644 (file)
@@ -937,7 +937,14 @@ void map_info(int y, int x, byte *ap, char *cp, byte *tap, char *tcp)
 
                        if (p_ptr->wild_mode)
                        {
-                               /* Do nothing */
+                               /* Special lighting effects */
+                               /* Handle "night" */
+                               if (view_special_lite && !is_daytime())
+                               {
+                                       /* Use a darkly darkened colour/tile */
+                                       a = f_ptr->x_attr[F_LIT_DARKDARK];
+                                       c = f_ptr->x_char[F_LIT_DARKDARK];
+                               }
                        }
 
                        /* Mega-Hack -- Handle "in-sight" and "darkened" grids */
@@ -1022,8 +1029,8 @@ void map_info(int y, int x, byte *ap, char *cp, byte *tap, char *tcp)
                        if (p_ptr->wild_mode)
                        {
                                /* Special lighting effects */
-                               /* Handle "blind" */
-                               if (view_granite_lite && p_ptr->blind)
+                               /* Handle "blind" or "night" */
+                               if (view_granite_lite && (p_ptr->blind || !is_daytime()))
                                {
                                        /* Use a darkly darkened colour/tile */
                                        a = f_ptr->x_attr[F_LIT_DARKDARK];
@@ -1080,16 +1087,25 @@ void map_info(int y, int x, byte *ap, char *cp, byte *tap, char *tcp)
                                /* Handle "view_bright_lite" */
                                else if (view_bright_lite)
                                {
-                                       /* Not viewable */
-                                       if (!(c_ptr->info & CAVE_VIEW))
+                                       /* Not glowing */
+                                       if ((c_ptr->info & (CAVE_GLOW | CAVE_MNDK)) != CAVE_GLOW)
                                        {
-                                               /* Use a darkened colour/tile */
-                                               a = f_ptr->x_attr[F_LIT_DARK];
-                                               c = f_ptr->x_char[F_LIT_DARK];
+                                               if (have_flag(f_ptr->flags, FF_LOS))
+                                               {
+                                                       /* Use a darkly darkened colour/tile */
+                                                       a = f_ptr->x_attr[F_LIT_DARKDARK];
+                                                       c = f_ptr->x_char[F_LIT_DARKDARK];
+                                               }
+                                               else
+                                               {
+                                                       /* Use a darkened colour/tile */
+                                                       a = f_ptr->x_attr[F_LIT_DARK];
+                                                       c = f_ptr->x_char[F_LIT_DARK];
+                                               }
                                        }
 
-                                       /* Not glowing */
-                                       else if ((c_ptr->info & (CAVE_GLOW | CAVE_MNDK)) != CAVE_GLOW)
+                                       /* Not viewable */
+                                       else if (!(c_ptr->info & CAVE_VIEW))
                                        {
                                                /* Use a darkened colour/tile */
                                                a = f_ptr->x_attr[F_LIT_DARK];
index 46591e9..28d38e1 100644 (file)
@@ -4032,7 +4032,7 @@ msg_print("
        /*** Handle the wilderness/town (sunshine) ***/
 
        /* While in town/wilderness */
-       if (!dun_level && !p_ptr->inside_quest && !p_ptr->inside_battle && !p_ptr->inside_arena && !p_ptr->wild_mode)
+       if (!dun_level && !p_ptr->inside_quest && !p_ptr->inside_battle && !p_ptr->inside_arena)
        {
                /* Hack -- Daybreak/Nighfall in town */
                if (!(turn % ((TURNS_PER_TICK * TOWN_DAWN) / 2)))
@@ -4054,22 +4054,25 @@ msg_print("
                                msg_print("The sun has risen.");
 #endif
 
-                               /* Hack -- Scan the town */
-                               for (y = 0; y < cur_hgt; y++)
+                               if (!p_ptr->wild_mode)
                                {
-                                       for (x = 0; x < cur_wid; x++)
+                                       /* Hack -- Scan the town */
+                                       for (y = 0; y < cur_hgt; y++)
                                        {
-                                               /* Get the cave grid */
-                                               cave_type *c_ptr = &cave[y][x];
+                                               for (x = 0; x < cur_wid; x++)
+                                               {
+                                                       /* Get the cave grid */
+                                                       cave_type *c_ptr = &cave[y][x];
 
-                                               /* Assume lit */
-                                               c_ptr->info |= (CAVE_GLOW);
+                                                       /* Assume lit */
+                                                       c_ptr->info |= (CAVE_GLOW);
 
-                                               /* Hack -- Memorize lit grids if allowed */
-                                               if (view_perma_grids) c_ptr->info |= (CAVE_MARK);
+                                                       /* Hack -- Memorize lit grids if allowed */
+                                                       if (view_perma_grids) c_ptr->info |= (CAVE_MARK);
 
-                                               /* Hack -- Notice spot */
-                                               note_spot(y, x);
+                                                       /* Hack -- Notice spot */
+                                                       note_spot(y, x);
+                                               }
                                        }
                                }
                        }
@@ -4086,36 +4089,39 @@ msg_print("
                                msg_print("The sun has fallen.");
 #endif
 
-                               /* Hack -- Scan the town */
-                               for (y = 0; y < cur_hgt; y++)
+                               if (!p_ptr->wild_mode)
                                {
-                                       for (x = 0; x < cur_wid; x++)
+                                       /* Hack -- Scan the town */
+                                       for (y = 0; y < cur_hgt; y++)
                                        {
-                                               /* Get the cave grid */
-                                               cave_type *c_ptr = &cave[y][x];
-
-                                               /* Feature code (applying "mimic" field) */
-                                               feature_type *f_ptr = &f_info[get_feat_mimic(c_ptr)];
-
-                                               if (!is_mirror_grid(c_ptr) && !have_flag(f_ptr->flags, FF_QUEST_ENTER) &&
-                                                   !have_flag(f_ptr->flags, FF_ENTRANCE))
+                                               for (x = 0; x < cur_wid; x++)
                                                {
-                                                       /* Assume dark */
-                                                       c_ptr->info &= ~(CAVE_GLOW);
+                                                       /* Get the cave grid */
+                                                       cave_type *c_ptr = &cave[y][x];
 
-                                                       if (!have_flag(f_ptr->flags, FF_REMEMBER))
+                                                       /* Feature code (applying "mimic" field) */
+                                                       feature_type *f_ptr = &f_info[get_feat_mimic(c_ptr)];
+
+                                                       if (!is_mirror_grid(c_ptr) && !have_flag(f_ptr->flags, FF_QUEST_ENTER) &&
+                                                           !have_flag(f_ptr->flags, FF_ENTRANCE))
                                                        {
-                                                               /* Forget the normal floor grid */
-                                                               c_ptr->info &= ~(CAVE_MARK);
+                                                               /* Assume dark */
+                                                               c_ptr->info &= ~(CAVE_GLOW);
+
+                                                               if (!have_flag(f_ptr->flags, FF_REMEMBER))
+                                                               {
+                                                                       /* Forget the normal floor grid */
+                                                                       c_ptr->info &= ~(CAVE_MARK);
 
-                                                               /* Hack -- Notice spot */
-                                                               note_spot(y, x);
+                                                                       /* Hack -- Notice spot */
+                                                                       note_spot(y, x);
+                                                               }
                                                        }
                                                }
-                                       }
 
-                                       /* Glow deep lava and building entrances */
-                                       glow_deep_lava_and_bldg();
+                                               /* Glow deep lava and building entrances */
+                                               glow_deep_lava_and_bldg();
+                                       }
                                }
                        }