Page 1 of 1

Floating stuff on q3a code plus tga vs png

Posted: Wed Mar 20, 2013 9:14 pm
by 3xistence
Hi guys, ever me.
Watching the code i hit the piece about floating images on player head (the one about medals, friend shader etc....).
Are you able to think any way in order to add a name or a string, floating on a player head?
Isn't restricted to only team members, I just want to remove the drawcrosshair name and put a floating nickname on players models head.
any tips?

Also, placing in my pk3 (named pk9 in order to be the last one readed by the game) new stuff in png format (with the same name of tga inside of pak0.pk3) i still see the tga ones (so old ones) and not the new png images.
Sounds a little weird, doesn't the engine seek for last pk3 in order to get images etc...? can it be a problem if my images are png and not tga like specified in the shader scripts?

thank you

Re: Floating stuff on q3a code plus tga vs png

Posted: Thu Mar 21, 2013 7:27 am
by themuffinman
Not sure at this point in time but you'll undoubtably need to create a variation of CG_PlayerFloatSprite() where the shader is the font glyph. CG_Text_Paint() shows how to get the glyph as it exports the text you want as a shader to CG_Text_PaintChar(). That should set you in the right direction. I'd recommend only drawing the overhead names when you're a spectator as it would otherwise be detrimental to the gameplay.

The table for the imageExtToLoaderMap_t struct in tr_image.c lists the loading priority given to the different extensions. If you want png to override tga then move it to the top of the list.

Re: Floating stuff on q3a code plus tga vs png

Posted: Thu Mar 21, 2013 1:58 pm
by Eraser
Does Q3 natively support png? Or does ioQuake?

Re: Floating stuff on q3a code plus tga vs png

Posted: Thu Mar 21, 2013 2:17 pm
by obsidian
ioQuake3 and Quake Live do. Quake 3 does not.

Re: Floating stuff on q3a code plus tga vs png

Posted: Fri Mar 22, 2013 4:11 pm
by 3xistence
no quake 3 arena doesn't support png, i'm using ioquake3 source code in order to get png and jpg support

Re: Floating stuff on q3a code plus tga vs png

Posted: Fri Mar 22, 2013 11:04 pm
by 3xistence
mhmmm the tree order put png under jpg :tga, jpg, jpeg, png, bmp. I tried to put png at bottom and also on top, nothing change. Looks like it works only if i change the gfx.shader files from tga to png. all looks to works fine if i run my pak9.pk3 like an external mod and not inside the baseq3 dir