Opened 6 years ago

Closed 5 years ago

#1813 closed bug (fixed (in master))

Walls lighting is broken under gcu

Reported by: myshkin Owned by:
Milestone: 3.5.1 Keywords: gcu
Cc:

Description

Walls seen but outside of a room or LOS display strangely in the gcu port. With TERM=xterm, I see nothing; with TERM=xterm-256color, I see shaded blocks, even when I have -a on. See attached screenshot for an example with TERM=xterm.

Attachments (1)

gcu-walls.png (29.1 KB) - added by myshkin 6 years ago.
gcu, TERM=xterm, ASCII walls on, just before 3.5 release

Download all attachments as: .zip

Change History (9)

Changed 6 years ago by myshkin

gcu, TERM=xterm, ASCII walls on, just before 3.5 release

comment:1 Changed 6 years ago by myshkin

  • Milestone changed from Triage to 3.5.1

comment:2 Changed 5 years ago by myshkin

Please see another report from IRC of what seems to be the same issue in #1826.

comment:3 Changed 5 years ago by noz

Terminal: linux console
OS: Linux
$TERM: linux
infocmp:

#	Reconstructed via infocmp from file: /lib/terminfo/l/linux
linux|linux console,
	am, bce, ccc, eo, mir, msgr, xenl, xon,
	colors#8, it#8, ncv#18, pairs#64,
	acsc=+\020\,\021-\030.^Y0\333`\004a\261f\370g\361h\260i\316j\331k\277l\332m\300n\305o~p\304q\304r\304s_t\303u\264v\301w\302x\263y\363z\362{\343|\330}\234~\376,
	bel=^G, blink=\E[5m, bold=\E[1m, civis=\E[?25l\E[?1c,
	clear=\E[H\E[J, cnorm=\E[?25h\E[?0c, cr=^M,
	csr=\E[%i%p1%d;%p2%dr, cub=\E[%p1%dD, cub1=^H,
	cud=\E[%p1%dB, cud1=^J, cuf=\E[%p1%dC, cuf1=\E[C,
	cup=\E[%i%p1%d;%p2%dH, cuu=\E[%p1%dA, cuu1=\E[A,
	cvvis=\E[?25h\E[?8c, dch=\E[%p1%dP, dch1=\E[P, dim=\E[2m,
	dl=\E[%p1%dM, dl1=\E[M, ech=\E[%p1%dX, ed=\E[J, el=\E[K,
	el1=\E[1K, flash=\E[?5h\E[?5l$<200/>, home=\E[H,
	hpa=\E[%i%p1%dG, ht=^I, hts=\EH, ich=\E[%p1%d@, ich1=\E[@,
	il=\E[%p1%dL, il1=\E[L, ind=^J,
	initc=\E]P%p1%x%p2%{255}%*%{1000}%/%02x%p3%{255}%*%{1000}%/%02x%p4%{255}%*%{1000}%/%02x,
	kb2=\E[G, kbs=\177, kcbt=\E[Z, kcub1=\E[D, kcud1=\E[B,
	kcuf1=\E[C, kcuu1=\E[A, kdch1=\E[3~, kend=\E[4~, kf1=\E[[A,
	kf10=\E[21~, kf11=\E[23~, kf12=\E[24~, kf13=\E[25~,
	kf14=\E[26~, kf15=\E[28~, kf16=\E[29~, kf17=\E[31~,
	kf18=\E[32~, kf19=\E[33~, kf2=\E[[B, kf20=\E[34~,
	kf3=\E[[C, kf4=\E[[D, kf5=\E[[E, kf6=\E[17~, kf7=\E[18~,
	kf8=\E[19~, kf9=\E[20~, khome=\E[1~, kich1=\E[2~,
	kmous=\E[M, knp=\E[6~, kpp=\E[5~, kspd=^Z, nel=^M^J, oc=\E]R,
	op=\E[39;49m, rc=\E8, rev=\E[7m, ri=\EM, rmacs=\E[10m,
	rmam=\E[?7l, rmir=\E[4l, rmpch=\E[10m, rmso=\E[27m,
	rmul=\E[24m, rs1=\Ec\E]R, sc=\E7, setab=\E[4%p1%dm,
	setaf=\E[3%p1%dm,
	sgr=\E[0;10%?%p1%t;7%;%?%p2%t;4%;%?%p3%t;7%;%?%p4%t;5%;%?%p5%t;2%;%?%p6%t;1%;%?%p9%t;11%;m,
	sgr0=\E[0;10m, smacs=\E[11m, smam=\E[?7h, smir=\E[4h,
	smpch=\E[11m, smso=\E[7m, smul=\E[4m, tbc=\E[3g,
	u6=\E[%i%d;%dR, u7=\E[6n, u8=\E[?6c, u9=\E[c,
	vpa=\E[%i%p1%dd,

Only happens for me in the linux console, and not when playing in an xterm (can provide those deatils as well if necc.)

comment:4 Changed 5 years ago by PowerWyrm

Just for info, I have the same problem under Win7. All granite walls appear black when out of LOS. The only way to bring them back is to comment out the lines in font-gcu.prf, or use the ASCII option (attr = 0x01, char = 0x23).

comment:5 Changed 5 years ago by PowerWyrm

In grid_get_attr(), grids that are out of LOS are displayed using TERM_L_DARK instead of TERM_DARK, so in GCU the tile changes from (0x81, 0x20) to (0x88, 0x20), which apparently is displayed as a black square.

comment:6 Changed 5 years ago by PowerWyrm

Seems to be a problem with the Curses library. I'm using PDCurses for Windows, and it seems that the A_REVERSE flag doesn't work with A_BRIGHT, so the "light" colors are displayed like the "dark" colors in reverse mode.

Note: using A_BLINK instead of A_BRIGHT when in reverse mode fixes the problem for me. Isn't it just a problem of reversing the "bright" flag?

comment:7 Changed 5 years ago by PowerWyrm

This works for me (Term_text_gcu):

        /* The high bit of the attribute indicates a reversed fg/bg */
        int flip = ((a > 127)? A_REVERSE: A_NORMAL);

        if ((flip == A_REVERSE) && (colortable[attr] & A_BRIGHT))
            wattrset(td->win, (colortable[attr] & ~A_BRIGHT) | A_BLINK | A_REVERSE);
        else
            wattrset(td->win, colortable[attr] | flip);

comment:8 Changed 5 years ago by magnate

  • Resolution set to fixed (in master)
  • Status changed from new to closed

Fixed in 2100ecd

Note: See TracTickets for help on using tickets.