ComputerScienceHouse / bingehack

A fork of nethack with semi-multiplayer features and other customizations. (An in-heavy-development fork version is at https://github.com/computersciencehouse/bingehack4 )
http://nethack.csh.rit.edu
23 stars 4 forks source link

Too long status lines w/ status colors result in color glitches #21

Closed clockfort closed 14 years ago

clockfort commented 14 years ago

workaround: Not have a status line so long that it goes off of the screen.

actual fix: Instead of saying something akin to "/RED/ TEXT /WHITE/", we should print out "/RED/T/WHITE//RED/E/WHITE/" to the terminal, so that the color will be back to normal by the time we print something else out to the terminal.

eatnumber1 commented 14 years ago

I'm not sure how terminal cutoffs work, but if the terminal can cut off non-printable chars, the WHITE control char might get cut off.

clockfort commented 14 years ago

Yeah, thought about that. I hope it doesn't... we'll see, I guess?

eatnumber1 commented 14 years ago

We can modify nethack to test it. Always make the status line 80 chars and print a color.

eatnumber1 commented 14 years ago

Sooo, the problem isn't what we think it is. I currently have a game where I am hallu, conf, and burdened (which is a really long status) that is colored correctly, but if I make myself strained the status bar gets shorter and exhibits the color problem. Both of these statuses aren't clipped.

This is it correctly colored Dlvl:1 $:0 HP:14(14) Pw:5(5) AC:4 Xp:1/0 Wt:904/725 T:28 Conf Hallu Burdened This is it incorrectly colored Dlvl:1 $:0 HP:14(14) Pw:5(5) AC:4 Xp:1/0 Wt:1654/725 T:24 Conf Hallu Strained The bad color begins at the $ symbol.

eatnumber1 commented 14 years ago

This appears to have been fixed by SHA: c8f2191d0b4ede62a11fdf4a479c2d9054e5e1b9. Please verify.

clockfort commented 14 years ago

I don't have a long status line, so looks like bug testing for this one is up to you and ducker.

eatnumber1 commented 14 years ago

Well, i'm not seeing this anymore... so i'm closing it. If someone sees it again, feel free to re-open.