TexMan.GetName can't return long texture file names

Bugs that have been investigated and resolved somehow.

Moderator: GZDoom Developers

Forum rules
Please don't bump threads here if you have a problem - it will often be forgotten about if you do. Instead, make a new thread here.
Post Reply
User avatar
Nash
 
 
Posts: 17439
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia
Contact:

TexMan.GetName can't return long texture file names

Post by Nash »

When a TextureID returned from the line or sector structs' wall/floor/ceiling texture uses a long file name (eg "floors/red stone.png"), GetName() simply returns a blank string.
User avatar
gwHero
Posts: 360
Joined: Mon May 08, 2017 3:23 am
Graphics Processor: Intel with Vulkan/Metal Support
Location: The Netherlands

Re: TexMan.GetName can't return long texture file names

Post by gwHero »

Not only that; if I may add: retrieving the id for a graphic with TexMan.CheckForTexture also doesn't return a Id when the lumpname exceeds 8 characters.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49066
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: TexMan.GetName can't return long texture file names

Post by Graf Zahl »

gwHero wrote:Not only that; if I may add: retrieving the id for a graphic with TexMan.CheckForTexture also doesn't return a Id when the lumpname exceeds 8 characters.

What did you do? If you fail to create a texture you must have done something unsupported as this is the function that actually creates textures by lump path.
_mental_
 
 
Posts: 3812
Joined: Sun Aug 07, 2011 4:32 am

Re: TexMan.GetName can't return long texture file names

Post by _mental_ »

I will extend TexMan.GetName() with returning of full path but only in case of empty short name.
I hope that no one created a mod that relies on empty textures names...


OK, Graf already fixed it.

As for TexMan.CheckForTexture() it works for me. Please post a runnable sample with that issue.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49066
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: TexMan.GetName can't return long texture file names

Post by Graf Zahl »

What TexMan.CheckForTexture CANNOT do, is creating textures from files in the PK3's root directory - and that part is entirely intentional.
User avatar
gwHero
Posts: 360
Joined: Mon May 08, 2017 3:23 am
Graphics Processor: Intel with Vulkan/Metal Support
Location: The Netherlands

Re: TexMan.GetName can't return long texture file names

Post by gwHero »

Runnable sample included.

graphics reside in the graphics folder;
the graphic with the 8 character lumpname is shown on the hud, the graphic with the 10 character lumpname is not.

Don't know if it's intentional, just kept my lumpnames not longer than 8 characters.
Attachments
TestTex.pk3
(4.34 KiB) Downloaded 22 times
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49066
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: TexMan.GetName can't return long texture file names

Post by Graf Zahl »

A lump only has its full name, including path and extension and the 8 character name inherited from the WAD format. So this cannot possibly work.
User avatar
gwHero
Posts: 360
Joined: Mon May 08, 2017 3:23 am
Graphics Processor: Intel with Vulkan/Metal Support
Location: The Netherlands

Re: TexMan.GetName can't return long texture file names

Post by gwHero »

So, to get this straight, after some more testing, this is how it seems to work, but is this both officially okay? (both pictures residing in the graphics folder)

Code: Select all

TexMan.CheckForTexture ("graphics/picturelongname.png")
TexMan.CheckForTexture ("pictureX") // when the lumpname does not exceed 8 chars 
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49066
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: TexMan.GetName can't return long texture file names

Post by Graf Zahl »

Yes, that's correct.
User avatar
gwHero
Posts: 360
Joined: Mon May 08, 2017 3:23 am
Graphics Processor: Intel with Vulkan/Metal Support
Location: The Netherlands

Re: TexMan.GetName can't return long texture file names

Post by gwHero »

Ah, great, thanks, mystery solved.
Post Reply

Return to “Closed Bugs [GZDoom]”