Go Back   Angband Forums > Angband > Vanilla

Thread Tools Display Modes
Old January 19, 2020, 07:54   #1
Join Date: Dec 2019
Location: Mexico, undisclosed location
Posts: 79
eastwind is on a distinguished road
colors in messages, ruminations on term support

Each brand or slay has a verb defined for it so that when the damage is increased on a hit, instead of getting the message 'You hit the troll' it says 'You burn the troll' or whatever the brand/slay-specific verb is.

I thought it would be nice to highlight these verbs with color. I looked into the code and alas, it appears not easily doable, because these messages go to the message log and out through the 'EVENT_MESSAGE' handler which doesn't have any way to colorize one part of a string being messaged.

The only code I saw that puts out color is c_put_str, where you write directly to a screen location and provide the color as a separate parameter.

It might be possible to define some kind of 'color shift' character escape sequence, embed it into message strings, then handle it at the low level when the strings are being put to the screen (and strip it out for strings being put to the log file), but that's waaay too much work for my little WIBNI.

And while I'm wishing for the impossible, I wish there were color attributes for reverse video.

I suppose all this has been thought of and discussed before. Let me know if I'm incorrect on any of my understandings.

Is there any thought of eventually rewriting all the term stuff that still supports, or purports to support, the sort of 1980's dumb terminals that no longer exist? You could still have a lowest-common-denominator terminal-like output device assumption but raise the lowest-common-denominator a bit to exclude ancient devices that are no longer used.
eastwind is offline   Reply With Quote

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[3.4] text_out_e() doesn't support some colors PowerWyrm Vanilla 0 September 26, 2012 17:50
Question about colors AnonymousHero Development 2 April 22, 2011 19:44
Messages term colors location krugar Development 3 September 12, 2010 02:11
Monster colors Timo Pietilš Development 13 June 25, 2010 06:51
3.1 - Store messages not showing in messages term Stossel Vanilla 0 January 15, 2009 11:40

All times are GMT +1. The time now is 18:21.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, vBulletin Solutions Inc.