From a886717731ccc0599b0a73ed1d4d5840fc629dc4 Mon Sep 17 00:00:00 2001 From: mogami Date: Mon, 28 Jan 2002 13:29:07 +0000 Subject: [PATCH] =?utf8?q?8x8=E3=82=BF=E3=82=A4=E3=83=AB=E3=81=A7=E3=80=81?= =?utf8?q?transparency=E3=81=AB=E5=AF=BE=E5=BF=9C=E3=80=82=E5=9C=B0?= =?utf8?q?=E5=BD=A2=E3=81=A8=E3=82=A2=E3=82=A4=E3=83=86=E3=83=A0=E3=82=84?= =?utf8?q?=E3=82=AD=E3=83=A3=E3=83=A9=E3=82=AF=E3=82=BF=E3=83=BC=E3=81=8C?= =?utf8?q?=E9=87=8D=E3=81=AA=E3=81=A3=E3=81=A6=E8=A1=A8=E7=A4=BA=E3=81=95?= =?utf8?q?=E3=82=8C=E3=82=8B=E3=80=82=20=E3=82=82=E3=81=97=E3=81=8B?= =?utf8?q?=E3=81=97=E3=81=A6=E3=80=81=E9=BB=92=E3=81=A3=E3=81=BD=E3=81=84?= =?utf8?q?=E3=82=A2=E3=82=A4=E3=83=86=E3=83=A0=E3=82=84=E3=83=A2=E3=83=B3?= =?utf8?q?=E3=82=B9=E3=82=BF=E3=83=BC=E3=81=AB=E3=81=A4=E3=81=84=E3=81=A6?= =?utf8?q?=E3=82=BF=E3=82=A4=E3=83=AB=E3=82=92=E4=B8=80=E9=83=A8=E4=BF=AE?= =?utf8?q?=E6=AD=A3=E5=BF=85=E8=A6=81=E3=81=8B=E3=82=82=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- acconfig.h | 1 + configure.in | 1 + src/cave.c | 44 +++++++++++++++++++++++--------------------- src/main-x11.c | 2 ++ 4 files changed, 27 insertions(+), 21 deletions(-) diff --git a/acconfig.h b/acconfig.h index d2134eac2..f79b9ef63 100644 --- a/acconfig.h +++ b/acconfig.h @@ -11,3 +11,4 @@ #undef X_LOCALE #undef CHUUKEI #undef WORLD_SCORE +#undef USE_TRANSPARENCY diff --git a/configure.in b/configure.in index 834a80cf3..03c409a7c 100644 --- a/configure.in +++ b/configure.in @@ -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 diff --git a/src/cave.c b/src/cave.c index 67f74d2c9..44beb25df 100644 --- a/src/cave.c +++ b/src/cave.c @@ -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 */ } diff --git a/src/main-x11.c b/src/main-x11.c index f3cea1b1c..f130df6ca 100644 --- a/src/main-x11.c +++ b/src/main-x11.c @@ -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"; -- 2.11.0