Inverse video doesn't seem to work #7

Closed
non opened this Issue May 4, 2013 · 2 comments

Comments

Projects
None yet
2 participants

non commented May 4, 2013

Hi, I'm trying out ttycast as a way of broadcasting Angband games (http://rephial.org/).

So far it's really great but it doesn't seem to support inverse video, which Angband uses by default for walls. I can work around this but it's a bit ugly.

It seems like ttyrec and ttyplay do support inverting the fg and bg colors, so it seems like the problem is in ttycast (or one of its dependencies). Any ideas on fixing this?

Thanks!

non commented May 4, 2013

To be specific: the application is printing spaces with a background color of RED, and with A_REVERSE. The result should be solid red, but instead there's solid black.

Owner

dtinth commented May 6, 2013

Seems like the term.js works a bit strangely. It sometimes switch the background color and foreground color, and it sometimes sets the inverse flag on the buffer. Sometimes it does both.

You should see a fix in the next version...

Testcases for self:

echo $'\e[31m\e[42mhello\e[7mworld\e[27mhi\e[m'
echo $'\e[0m\e[31mhello\e[7mworld\e[27mhi\e[m'
echo $'\e[7mhello\e[0m'
echo $'\e[1;7;32mhello\e[0m'
echo $'\e[1;32;7mhello\e[0m'
echo $'\e[1;32;7;42mhello\e[0m'
echo $'\e[1;32;7;43mhello\e[0m'

dtinth closed this in f971585 May 6, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment