Floating stuff on q3a code plus tga vs png

Locked
3xistence
Posts: 90
Joined: Sun May 13, 2012 3:02 pm

Floating stuff on q3a code plus tga vs png

Post 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
themuffinman
Posts: 384
Joined: Fri Mar 05, 2010 5:29 pm

Re: Floating stuff on q3a code plus tga vs png

Post 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.
User avatar
Eraser
Posts: 19174
Joined: Fri Dec 01, 2000 8:00 am

Re: Floating stuff on q3a code plus tga vs png

Post by Eraser »

Does Q3 natively support png? Or does ioQuake?
obsidian
Posts: 10970
Joined: Mon Feb 04, 2002 8:00 am

Re: Floating stuff on q3a code plus tga vs png

Post by obsidian »

ioQuake3 and Quake Live do. Quake 3 does not.
[size=85][url=http://gtkradiant.com]GtkRadiant[/url] | [url=http://q3map2.robotrenegade.com]Q3Map2[/url] | [url=http://q3map2.robotrenegade.com/docs/shader_manual/]Shader Manual[/url][/size]
3xistence
Posts: 90
Joined: Sun May 13, 2012 3:02 pm

Re: Floating stuff on q3a code plus tga vs png

Post by 3xistence »

no quake 3 arena doesn't support png, i'm using ioquake3 source code in order to get png and jpg support
3xistence
Posts: 90
Joined: Sun May 13, 2012 3:02 pm

Re: Floating stuff on q3a code plus tga vs png

Post 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
Locked