ZDaemon Forum Index ZDaemon
Client/Server DOOM
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

HudMessage to support displaying images

 
Post new topic   Reply to topic    ZDaemon Forum Index -> Pending Requests
View previous topic :: View next topic  
Author Message
Body-Guard
Spamming!


Joined: 08 Jan 2006
Location: Hungary

PostPosted: Fri Jan 11, 2013 4:03 pm    Post subject: HudMessage to support displaying images Reply with quote

Zdoom can use Hudmessage to display any graphic lump on the HUD when used together with SetFont. It would be nice to have this feature here too.

See: http://zdoom.org/wiki/HudMessage#Displaying_images

I see little chance for this making it in, but it did worth a try anyway.
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
BestOfTheWorst
Spamming!


Joined: 02 Jun 2006

PostPosted: Mon Jan 21, 2013 10:33 pm    Post subject: Reply with quote

Actually HudMessage already supports displaying images with SetFont.

But you can't use just any graphic lump with it, and rather you have to convert your graphics to custom BIGFONT format lumps. (this gives you 254 colors to use)

You can convert your graphics to BIGFONT with the imagetool.
Back to top
View user's profile Send private message
Body-Guard
Spamming!


Joined: 08 Jan 2006
Location: Hungary

PostPosted: Tue Jan 22, 2013 12:14 pm    Post subject: Reply with quote

Wow, I didn't know fonts can be used this way..Anyway I converted an image with my own palette, but Zdaemon renders it grayscale even when using CR_UNTRANSLATED in HudMessage.

Imagetool wrote:

font
----
This produces a file of type FON2. Unlike FON1, this format supports
custom palettes and characters of varying widths...
The source image should have each character surrounded by a box made up of
palette entry 255. Like confonts, palette entry 0 indicates transparency,
but unlike confonts, all the other 254 colors in the source image's palette
are used to colorize the font, so you can use any palette you want when
designing the font.

You can use this font (or a confont) with a ZDoom hudmessage by executing the
ACS command setfont("fontname") first... If you use a hudmessage
color of CR_UNTRANSLATED, then the font will use the palette you designed it
with.
Otherwise, it will be recolored to a single hue of differing shades.


EDIT:

It might be that Zdaemon uses an internal palette for fonts which overrides their own palette, since I tried to convert a doom player sprite, and the green armor part looks correct but the arms are painted blue for some reason...

Code:
http://kepfeltoltes.hu/130122/Coop-20130122-124244_www.kepfeltoltes.hu_.png

http://kepfeltoltes.hu/130122/Coop-20130122-124653_www.kepfeltoltes.hu_.png


Anyway Zdoom simply doesn't display these kind of fonts.
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
BestOfTheWorst
Spamming!


Joined: 02 Jun 2006

PostPosted: Tue Jan 22, 2013 3:52 pm    Post subject: Reply with quote

What kind of palette were you using? You can only display colors of the current game, so it would be best to use the doom palette as a base if you are making the graphic for doom.

Here's an example wad and .pcx using BIGFONT to display an image with 254 colors:
http://speedy.sh/UWaVd/bfontimg.zip



It also works in zdoom.
Back to top
View user's profile Send private message
Body-Guard
Spamming!


Joined: 08 Jan 2006
Location: Hungary

PostPosted: Tue Jan 22, 2013 5:36 pm    Post subject: Reply with quote

So contrary to what imagetool says I can't use any palette but only the game's in which it will actually get used to show up properly. I interpreted it as the fonts store their palettes themselves, eg. they are still limited to 8bit but have their own colorset which can be displayed as well.
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    ZDaemon Forum Index -> Pending Requests All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group