OSDN Git Service

鏡のタイルもlighting effectに対応。
authormogami <mogami@0568b783-4c39-0410-ac80-bf13821ea2a2>
Sun, 3 Feb 2002 19:57:35 +0000 (19:57 +0000)
committermogami <mogami@0568b783-4c39-0410-ac80-bf13821ea2a2>
Sun, 3 Feb 2002 19:57:35 +0000 (19:57 +0000)
use_lighting 変数(かつての、use_transparency)は完全に意味がなくなったので廃止。

lib/pref/graf-xxx.prf
src/cave.c
src/externs.h
src/main-dos.c
src/main-win.c
src/main-x11.c
src/variable.c

index dcd105f..4ba2323 100644 (file)
@@ -3859,10 +3859,12 @@ F:192:0xD0/0x94
 F:193:0x81:0x9E
 
 #Swamp
-F:194:207/146
+F:194:0xCF/0x92
 
 #Mirror
-F:195:203/152
+#F:195:0xCB/0x98
+F:195:0xDB/0x8C
+
 
 # Object attr/char definitions
 
index 35f92cb..995c01f 100644 (file)
@@ -635,44 +635,45 @@ static bool feat_supports_lighting(byte feat)
 
        switch (feat)
        {
-               case FEAT_FLOOR:
-               case FEAT_INVIS:
-               case FEAT_GLYPH:
-               case FEAT_LESS:
-               case FEAT_MORE:
-               case FEAT_LESS_LESS:
-               case FEAT_MORE_MORE:
-               case FEAT_SECRET:
-               case FEAT_RUBBLE:
-               case FEAT_MAGMA:
-               case FEAT_QUARTZ:
-               case FEAT_MAGMA_H:
-               case FEAT_QUARTZ_H:
-               case FEAT_MAGMA_K:
-               case FEAT_QUARTZ_K:
-               case FEAT_WALL_EXTRA:
-               case FEAT_WALL_INNER:
-               case FEAT_WALL_OUTER:
-               case FEAT_WALL_SOLID:
-               case FEAT_PERM_EXTRA:
-               case FEAT_PERM_INNER:
-               case FEAT_PERM_OUTER:
-               case FEAT_PERM_SOLID:
-               case FEAT_MINOR_GLYPH:
-               case FEAT_DEEP_WATER:
-               case FEAT_SHAL_WATER:
-               case FEAT_DEEP_LAVA:
-               case FEAT_SHAL_LAVA:
-               case FEAT_DARK_PIT:
-               case FEAT_DIRT:
-               case FEAT_GRASS:
-               case FEAT_FLOWER:
-               case FEAT_DEEP_GRASS:
-               case FEAT_TREES:
-               case FEAT_MOUNTAIN:
-                       return TRUE;
-               default:
-                       return FALSE;
+       case FEAT_FLOOR:
+       case FEAT_INVIS:
+       case FEAT_GLYPH:
+       case FEAT_LESS:
+       case FEAT_MORE:
+       case FEAT_LESS_LESS:
+       case FEAT_MORE_MORE:
+       case FEAT_SECRET:
+       case FEAT_RUBBLE:
+       case FEAT_MAGMA:
+       case FEAT_QUARTZ:
+       case FEAT_MAGMA_H:
+       case FEAT_QUARTZ_H:
+       case FEAT_MAGMA_K:
+       case FEAT_QUARTZ_K:
+       case FEAT_WALL_EXTRA:
+       case FEAT_WALL_INNER:
+       case FEAT_WALL_OUTER:
+       case FEAT_WALL_SOLID:
+       case FEAT_PERM_EXTRA:
+       case FEAT_PERM_INNER:
+       case FEAT_PERM_OUTER:
+       case FEAT_PERM_SOLID:
+       case FEAT_MINOR_GLYPH:
+       case FEAT_DEEP_WATER:
+       case FEAT_SHAL_WATER:
+       case FEAT_DEEP_LAVA:
+       case FEAT_SHAL_LAVA:
+       case FEAT_DARK_PIT:
+       case FEAT_DIRT:
+       case FEAT_GRASS:
+       case FEAT_FLOWER:
+       case FEAT_DEEP_GRASS:
+       case FEAT_TREES:
+       case FEAT_MOUNTAIN:
+       case FEAT_MIRROR:
+               return TRUE;
+       default:
+               return FALSE;
        }
 }
 
@@ -897,7 +898,7 @@ void map_info(int y, int x, byte *ap, char *cp)
                        a = f_ptr->x_attr;
 
                        /* Special lighting effects */
-                       if (view_special_lite && (!p_ptr->wild_mode) && ((a == TERM_WHITE) || use_lighting))
+                       if (view_special_lite && (!p_ptr->wild_mode) && ((a == TERM_WHITE) || use_graphics))
                        {
                                /* Handle "blind" */
                                if (p_ptr->blind)
@@ -909,7 +910,7 @@ void map_info(int y, int x, byte *ap, char *cp)
                                                        /* Use darkened colour */
                                                        a = lighting_colours[a][1];
                                                }
-                                               else if (use_lighting && feat_supports_lighting(feat))
+                                               else if (use_graphics && feat_supports_lighting(feat))
                                                {
                                                        /* Use a dark tile */
                                                        c++;
@@ -917,7 +918,7 @@ void map_info(int y, int x, byte *ap, char *cp)
                                        }
                                        else
                                        {
-                                               if (use_lighting)
+                                               if (use_graphics)
                                                {
                                                        /* Use a dark tile */
                                                        c++;
@@ -943,7 +944,7 @@ void map_info(int y, int x, byte *ap, char *cp)
                                                                /* Use lightened colour */
                                                                a = lighting_colours[a][0];
                                                        }
-                                                       else if (use_lighting &&
+                                                       else if (use_graphics &&
                                                                 feat_supports_lighting(feat))
                                                        {
                                                                /* Use a brightly lit tile */
@@ -955,7 +956,7 @@ void map_info(int y, int x, byte *ap, char *cp)
                                                        /* Torch lite */
                                                        if (view_yellow_lite)
                                                        {
-                                                               if (use_lighting)
+                                                               if (use_graphics)
                                                                {
                                                                        /* Use a brightly lit tile */
                                                                        c += 2;
@@ -980,7 +981,7 @@ void map_info(int y, int x, byte *ap, char *cp)
                                                        /* Use darkened colour */
                                                        a = lighting_colours[a][1];
                                                }
-                                               else if (use_lighting && feat_supports_lighting(feat))
+                                               else if (use_graphics && feat_supports_lighting(feat))
                                                {
                                                        /* Use a dark tile */
                                                        c++;
@@ -988,7 +989,7 @@ void map_info(int y, int x, byte *ap, char *cp)
                                        }
                                        else
                                        {
-                                               if (use_lighting)
+                                               if (use_graphics)
                                                {
                                                        /* Use a dark tile */
                                                        c++;
@@ -1014,7 +1015,7 @@ void map_info(int y, int x, byte *ap, char *cp)
                                                                /* Use darkened colour */
                                                                a = lighting_colours[a][1];
                                                        }
-                                                       else if (use_lighting && feat_supports_lighting(feat))
+                                                       else if (use_graphics && feat_supports_lighting(feat))
                                                        {
                                                                /* Use a dark tile */
                                                                c++;
@@ -1022,7 +1023,7 @@ void map_info(int y, int x, byte *ap, char *cp)
                                                }
                                                else
                                                {
-                                                       if (use_lighting)
+                                                       if (use_graphics)
                                                        {
                                                                /* Use a dark tile */
                                                                c++;
@@ -1085,7 +1086,7 @@ void map_info(int y, int x, byte *ap, char *cp)
                                                /* Use darkened colour */
                                                a = lighting_colours[a][1];
                                        }
-                                       else if (use_lighting && feat_supports_lighting(feat))
+                                       else if (use_graphics && feat_supports_lighting(feat))
                                        {
                                                /* Use a dark tile */
                                                c++;
@@ -1096,14 +1097,14 @@ void map_info(int y, int x, byte *ap, char *cp)
                                else if (c_ptr->info & (CAVE_LITE | CAVE_MNLT))
                                {
                                        /* Torch lite */
-                                       if (view_yellow_lite && !p_ptr->wild_mode && ((use_lighting && feat_supports_lighting(feat)) || is_ascii_graphics(c,a)))
+                                       if (view_yellow_lite && !p_ptr->wild_mode && ((use_graphics && feat_supports_lighting(feat)) || is_ascii_graphics(c,a)))
                                        {
                                                if (is_ascii_graphics(c,a))
                                                {
                                                        /* Use lightened colour */
                                                        a = lighting_colours[a][0];
                                                }
-                                               else if (use_lighting &&
+                                               else if (use_graphics &&
                                                                feat_supports_lighting(c_ptr->feat))
                                                {
                                                        /* Use a brightly lit tile */
@@ -1113,7 +1114,7 @@ void map_info(int y, int x, byte *ap, char *cp)
                                }
 
                                /* Handle "view_bright_lite" */
-                               else if (view_bright_lite && !p_ptr->wild_mode && ((use_lighting && feat_supports_lighting(feat)) || is_ascii_graphics(c,a)))
+                               else if (view_bright_lite && !p_ptr->wild_mode && ((use_graphics && feat_supports_lighting(feat)) || is_ascii_graphics(c,a)))
                                {
                                        /* Not viewable */
                                        if (!(c_ptr->info & CAVE_VIEW))
@@ -1123,7 +1124,7 @@ void map_info(int y, int x, byte *ap, char *cp)
                                                        /* Use darkened colour */
                                                        a = lighting_colours[a][1];
                                                }
-                                               else if (use_lighting && feat_supports_lighting(feat))
+                                               else if (use_graphics && feat_supports_lighting(feat))
                                                {
                                                        /* Use a dark tile */
                                                        c++;
@@ -1143,13 +1144,13 @@ void map_info(int y, int x, byte *ap, char *cp)
                        }
                        /* Special lighting effects */
                        else if (view_granite_lite && !p_ptr->wild_mode &&
-                          (((a == TERM_WHITE) && !use_lighting) ||
-                          (use_lighting && feat_supports_lighting(c_ptr->feat))))
+                          (((a == TERM_WHITE) && !use_graphics) ||
+                          (use_graphics && feat_supports_lighting(c_ptr->feat))))
                        {
                                /* Handle "blind" */
                                if (p_ptr->blind)
                                {
-                                       if (use_lighting)
+                                       if (use_graphics)
                                        {
                                                /* Use a dark tile */
                                                c++;
@@ -1167,7 +1168,7 @@ void map_info(int y, int x, byte *ap, char *cp)
                                        /* Torch lite */
                                        if (view_yellow_lite && !p_ptr->wild_mode)
                                        {
-                                               if (use_lighting)
+                                               if (use_graphics)
                                                {
                                                        /* Use a brightly lit tile */
                                                        c += 2;
@@ -1186,7 +1187,7 @@ void map_info(int y, int x, byte *ap, char *cp)
                                        /* Not viewable */
                                        if (!(c_ptr->info & CAVE_VIEW))
                                        {
-                                               if (use_lighting)
+                                               if (use_graphics)
                                                {
                                                        /* Use a dark tile */
                                                        c++;
@@ -1201,7 +1202,7 @@ void map_info(int y, int x, byte *ap, char *cp)
                                        /* Not glowing */
                                        else if (!(c_ptr->info & CAVE_GLOW))
                                        {
-                                               if (use_lighting)
+                                               if (use_graphics)
                                                {
                                                        /* Use a lit tile */
                                                }
@@ -1224,7 +1225,7 @@ void map_info(int y, int x, byte *ap, char *cp)
                                                /* Check for "local" illumination */
                                                if (!(cave[yy][xx].info & CAVE_GLOW))
                                                {
-                                                       if (use_lighting)
+                                                       if (use_graphics)
                                                        {
                                                                /* Use a lit tile */
                                                        }
index dfc2133..6bc2eb3 100644 (file)
@@ -491,7 +491,6 @@ extern bool left_hander;
 extern bool preserve_mode;
 extern bool autoroller;
 extern bool autochara;
-extern bool use_lighting;
 extern bool can_save;
 extern s16b spell_exp[64];
 extern s16b weapon_exp[5][64];
index 8e80115..6291095 100644 (file)
@@ -1813,10 +1813,6 @@ static bool init_graphics(void)
                         */
                        ANGBAND_GRAF = get_config_string(section, "graf-mode", "old");
 
-                       /* Use transparent blits */
-                       if (streq(ANGBAND_GRAF, "new"))
-                               use_lighting = TRUE;
-
                        /* Select the bitmap pallete */
                        set_palette_range(tiles_pallete, 0, COLOR_OFFSET - 1, 0);
 
index b7282f9..79dc19d 100644 (file)
@@ -1397,8 +1397,6 @@ static bool init_graphics(void)
                        name = "16X16.BMP";
 
                        ANGBAND_GRAF = "new";
-
-                       use_lighting = TRUE;
                }
                else
                {
@@ -1883,9 +1881,6 @@ static errr Term_xtra_win_react(void)
        /* Handle "arg_graphics" */
        if (use_graphics != arg_graphics)
        {
-               /* Switch off transparency */
-               use_lighting = FALSE;
-
                /* Initialize (if needed) */
                if (arg_graphics && !init_graphics())
                {
index be60b0c..c750dd5 100644 (file)
@@ -3094,8 +3094,6 @@ errr init_x11(int argc, char *argv[])
                        /* Use graphics */
                        use_graphics = TRUE;
 
-                       use_lighting = TRUE;
-
                        pict_wid = pict_hgt = 16;
 
                        ANGBAND_GRAF = "new";
@@ -3111,8 +3109,6 @@ errr init_x11(int argc, char *argv[])
                                /* Use graphics */
                                use_graphics = TRUE;
 
-                               use_lighting = TRUE;
-
                                pict_wid = pict_hgt = 8;
 
                                ANGBAND_GRAF = "old";
index 73398bc..9fb738f 100644 (file)
@@ -1141,8 +1141,6 @@ bool autoroller;
 bool autochara;
 
 
-bool use_lighting = FALSE;    /* Use lighting effects of tiles */
-
 bool can_save = FALSE;        /* Game can be saved */
 
 s16b spell_exp[64];           /* mahou keikenchi */