OSDN Git Service

8x8タイルで、transparencyに対応。地形とアイテムやキャラクターが重なって表示される。
authormogami <mogami@0568b783-4c39-0410-ac80-bf13821ea2a2>
Mon, 28 Jan 2002 13:29:07 +0000 (13:29 +0000)
committermogami <mogami@0568b783-4c39-0410-ac80-bf13821ea2a2>
Mon, 28 Jan 2002 13:29:07 +0000 (13:29 +0000)
もしかして、黒っぽいアイテムやモンスターについてタイルを一部修正必要かも。

acconfig.h
configure.in
src/cave.c
src/main-x11.c

index d2134ea..f79b9ef 100644 (file)
@@ -11,3 +11,4 @@
 #undef X_LOCALE
 #undef CHUUKEI
 #undef WORLD_SCORE
+#undef USE_TRANSPARENCY
index 834a80c..03c409a 100644 (file)
@@ -42,6 +42,7 @@ AC_PATH_XTRA
 if test "$have_x" = yes; then
   LIBS="$LIBS -lX11"
   AC_DEFINE(USE_X11)
+  AC_DEFINE(USE_TRANSPARENCY)
   CFLAGS="$X_CFLAGS $CFLAGS"
   LDFLAGS="$X_LIBS $LDFLAGS"
   if test "$use_japanese" != no; then
index 67f74d2..44beb25 100644 (file)
@@ -870,6 +870,8 @@ void map_info(int y, int x, byte *ap, char *cp)
        byte a;
        byte c;
 
+       bool graf_new = (use_graphics && (strcmp(ANGBAND_GRAF, "new") == 0));
+
        /* Get the cave */
        c_ptr = &cave[y][x];
 
@@ -896,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_transparency))
+                       if (view_special_lite && (!p_ptr->wild_mode) && ((a == TERM_WHITE) || graf_new))
                        {
                                /* Handle "blind" */
                                if (p_ptr->blind)
@@ -908,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_transparency && feat_supports_lighting(feat))
+                                               else if (graf_new && feat_supports_lighting(feat))
                                                {
                                                        /* Use a dark tile */
                                                        c++;
@@ -916,7 +918,7 @@ void map_info(int y, int x, byte *ap, char *cp)
                                        }
                                        else
                                        {
-                                               if (use_transparency)
+                                               if (graf_new)
                                                {
                                                        /* Use a dark tile */
                                                        c++;
@@ -942,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_transparency &&
+                                                       else if (graf_new &&
                                                                 feat_supports_lighting(feat))
                                                        {
                                                                /* Use a brightly lit tile */
@@ -954,7 +956,7 @@ void map_info(int y, int x, byte *ap, char *cp)
                                                        /* Torch lite */
                                                        if (view_yellow_lite)
                                                        {
-                                                               if (use_transparency)
+                                                               if (graf_new)
                                                                {
                                                                        /* Use a brightly lit tile */
                                                                        c += 2;
@@ -979,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_transparency && feat_supports_lighting(feat))
+                                               else if (graf_new && feat_supports_lighting(feat))
                                                {
                                                        /* Use a dark tile */
                                                        c++;
@@ -987,7 +989,7 @@ void map_info(int y, int x, byte *ap, char *cp)
                                        }
                                        else
                                        {
-                                               if (use_transparency)
+                                               if (graf_new)
                                                {
                                                        /* Use a dark tile */
                                                        c++;
@@ -1013,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_transparency && feat_supports_lighting(feat))
+                                                       else if (graf_new && feat_supports_lighting(feat))
                                                        {
                                                                /* Use a dark tile */
                                                                c++;
@@ -1021,7 +1023,7 @@ void map_info(int y, int x, byte *ap, char *cp)
                                                }
                                                else
                                                {
-                                                       if (use_transparency)
+                                                       if (graf_new)
                                                        {
                                                                /* Use a dark tile */
                                                                c++;
@@ -1082,7 +1084,7 @@ void map_info(int y, int x, byte *ap, char *cp)
                                                /* Use darkened colour */
                                                a = lighting_colours[a][1];
                                        }
-                                       else if (use_transparency && feat_supports_lighting(feat))
+                                       else if (graf_new && feat_supports_lighting(feat))
                                        {
                                                /* Use a dark tile */
                                                c++;
@@ -1093,14 +1095,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_transparency || feat_supports_lighting(feat) || is_ascii_graphics(c,a)))
+                                       if (view_yellow_lite && !p_ptr->wild_mode && ((graf_new && 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_transparency &&
+                                               else if (graf_new &&
                                                                feat_supports_lighting(c_ptr->feat))
                                                {
                                                        /* Use a brightly lit tile */
@@ -1110,7 +1112,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_transparency || feat_supports_lighting(feat) || is_ascii_graphics(c,a)))
+                               else if (view_bright_lite && !p_ptr->wild_mode && ((graf_new && feat_supports_lighting(feat)) || is_ascii_graphics(c,a)))
                                {
                                        /* Not viewable */
                                        if (!(c_ptr->info & CAVE_VIEW))
@@ -1120,7 +1122,7 @@ void map_info(int y, int x, byte *ap, char *cp)
                                                        /* Use darkened colour */
                                                        a = lighting_colours[a][1];
                                                }
-                                               else if (use_transparency && feat_supports_lighting(feat))
+                                               else if (graf_new && feat_supports_lighting(feat))
                                                {
                                                        /* Use a dark tile */
                                                        c++;
@@ -1140,13 +1142,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_transparency) ||
-                          (use_transparency && feat_supports_lighting(c_ptr->feat))))
+                          (((a == TERM_WHITE) && !graf_new) ||
+                          (graf_new && feat_supports_lighting(c_ptr->feat))))
                        {
                                /* Handle "blind" */
                                if (p_ptr->blind)
                                {
-                                       if (use_transparency)
+                                       if (graf_new)
                                        {
                                                /* Use a dark tile */
                                                c++;
@@ -1164,7 +1166,7 @@ void map_info(int y, int x, byte *ap, char *cp)
                                        /* Torch lite */
                                        if (view_yellow_lite && !p_ptr->wild_mode)
                                        {
-                                               if (use_transparency)
+                                               if (graf_new)
                                                {
                                                        /* Use a brightly lit tile */
                                                        c += 2;
@@ -1183,7 +1185,7 @@ void map_info(int y, int x, byte *ap, char *cp)
                                        /* Not viewable */
                                        if (!(c_ptr->info & CAVE_VIEW))
                                        {
-                                               if (use_transparency)
+                                               if (graf_new)
                                                {
                                                        /* Use a dark tile */
                                                        c++;
@@ -1198,7 +1200,7 @@ void map_info(int y, int x, byte *ap, char *cp)
                                        /* Not glowing */
                                        else if (!(c_ptr->info & CAVE_GLOW))
                                        {
-                                               if (use_transparency)
+                                               if (graf_new)
                                                {
                                                        /* Use a lit tile */
                                                }
@@ -1221,7 +1223,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_transparency)
+                                                       if (graf_new)
                                                        {
                                                                /* Use a lit tile */
                                                        }
index f3cea1b..f130df6 100644 (file)
@@ -3111,6 +3111,8 @@ errr init_x11(int argc, char *argv[])
                                /* Use graphics */
                                use_graphics = TRUE;
 
+                               use_transparency = TRUE;
+                       
                                pict_wid = pict_hgt = 8;
 
                                ANGBAND_GRAF = "old";