View previous topic :: View next topic |
Author |
Message |
Body-Guard Unstoppable!
Joined: 08 Jan 2006 Location: Hungary
|
Posted: Fri Jan 11, 2013 4:03 pm Post subject: HudMessage to support displaying images |
|
|
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 |
|
|
BestOfTheWorst Unstoppable!
Joined: 02 Jun 2006
|
Posted: Mon Jan 21, 2013 10:33 pm Post subject: |
|
|
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 |
|
|
Body-Guard Unstoppable!
Joined: 08 Jan 2006 Location: Hungary
|
Posted: Tue Jan 22, 2013 12:14 pm Post subject: |
|
|
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 |
|
|
BestOfTheWorst Unstoppable!
Joined: 02 Jun 2006
|
Posted: Tue Jan 22, 2013 3:52 pm Post subject: |
|
|
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 |
|
|
Body-Guard Unstoppable!
Joined: 08 Jan 2006 Location: Hungary
|
Posted: Tue Jan 22, 2013 5:36 pm Post subject: |
|
|
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 |
|
|
|