Substantially increase lump name character limit >8

Post a reply

Smilies
:D :) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :wink: :geek: :ugeek: :!: :?: :idea: :arrow: :| :mrgreen: :3: :wub: >:( :blergh:
View more smilies

BBCode is OFF
Smilies are ON

Topic review
   

Expand view Topic review: Substantially increase lump name character limit >8

Re: Substantially increase lump name character limit >8

by Graf Zahl » Sat May 17, 2014 12:47 pm

Patience. The bug has already been fixed, but the GZDoom repo hadn't been updated yet.

Re: Substantially increase lump name character limit >8

by JPL » Sat May 17, 2014 12:37 pm

Great to see this progressing, thanks so much for considering it.

In case it's useful, here's an example PK3 (IWAD replacement, actually) with some textures that currently show up black in [G]ZDoom due to the lump name length issue, that show up fine in SLADE3's map editor:
https://www.dropbox.com/s/1gmsnsrm5569h2e/deck.pk3

Re: Substantially increase lump name character limit >8

by binarycrusader » Fri May 16, 2014 9:22 pm

Graf Zahl wrote:All I added was an option to specify a lump name directly in most places where textures are used. This means:

- you cannot define long texture names yourself
- you have to use the FULL file name, i.e 'textures/manor_wall_bookshelf01.png' - notice both the subdirectory AND the file extension!

It would have been close to impossible to change the texture manager. This was really the only option to do it.
I was simply going to retain the truncation logic for all map formats except udmf, and then basically replace texture->Name buffer with FString and adjust as appropriate.

Would you accept a patch that removes length limitations on TEXTURE names in way that only affects UDMF?

Re: Substantially increase lump name character limit >8

by Gez » Fri May 16, 2014 4:02 am

I'm not Graf. :p
binarycrusader wrote:Ah, but you would accept patches to remove this limitation for UDMF maps, as long as it doesn't break older doom maps, mods, etc. correct?
I don't think you're approaching this from the right angle if you say you want to remove this limitation for UDMF maps. First, the point is moot since only UDMF can allow long texture names. Secondly, the texture manager should not be encumbered by map format checks.

Re: Substantially increase lump name character limit >8

by Graf Zahl » Fri May 16, 2014 2:27 am

I'll have to see what they do. The standard 'FindTexture' function should be able to find them so this is a bit odd. Maybe again some stupid truncation issue.

Can you make a quick demo so I can test?

Re: Substantially increase lump name character limit >8

by Nash » Fri May 16, 2014 2:22 am

Okay, cool. One last question, although I was unsure if I should have posted it as a bug instead, but I'd rather ask here first in case it's a case of "not a bug"...

ACS commands CheckActorCeiling/FloorTexture currently do not work with long file names in my test... can this be changed too?

Re: Substantially increase lump name character limit >8

by Graf Zahl » Fri May 16, 2014 1:22 am

All I added was an option to specify a lump name directly in most places where textures are used. This means:

- you cannot define long texture names yourself
- you have to use the FULL file name, i.e 'textures/manor_wall_bookshelf01.png' - notice both the subdirectory AND the file extension!

It would have been close to impossible to change the texture manager. This was really the only option to do it.

Re: Substantially increase lump name character limit >8

by Nash » Fri May 16, 2014 12:55 am

Ok so I'm trying to understand this better (I haven't started renaming my map textures to long names yet)...

Does this mean that this won't work:

manor_wall_bookshelf01
manor_wall_bookshelf02

... the engine will only recognize it as MANOR_WA?

(Sorry if this seems like a dumb question; I'm still unsure about the technicalities of this feature and what limits to look out for)

Re: Substantially increase lump name character limit >8

by binarycrusader » Fri May 16, 2014 12:52 am

Graf Zahl wrote: Textures defined in [wiki]TEXTURES[/wiki] are not lump. The TEXTURES lump still can only define textures with an 8-char name. Texture manager and lump manager are two different things.
Graf Zahl wrote:You can't create long names with TEXTURES.
Ah, but you would accept patches to remove this limitation for UDMF maps, as long as it doesn't break older doom maps, mods, etc. correct?

Re: Substantially increase lump name character limit >8

by Gez » Fri May 16, 2014 12:45 am

binarycrusader wrote:Perhaps I'm confused by how this is supposed to work, but while this did fix texture definitions, it doesn't quite seem to be enough yet.

Code: Select all

texture manor_wall_coldstone_arch, 512, 512
{
		XScale 4
		YScale 4
		Patch "patches/p_manor_wall_coldstone_arch.png", 0, 0
}

texture manor_wall_bookshelf, 512, 512
{
		XScale 4
		YScale 4
		Patch pmwbkshf, 0, 0
}
Textures defined in [wiki]TEXTURES[/wiki] are not lump. The TEXTURES lump still can only define textures with an 8-char name. Texture manager and lump manager are two different things.
Graf Zahl wrote:You can't create long names with TEXTURES.

Re: Substantially increase lump name character limit >8

by binarycrusader » Fri May 16, 2014 12:29 am

Perhaps I'm confused by how this is supposed to work, but while this did fix texture definitions, it doesn't quite seem to be enough yet.

For example, if I have the following in a map file:

Code: Select all

sidedef
{
sector = 9;
texturemiddle = "MANOR_WALL_COLDSTONE_ARCH";
}

sidedef
{
sector = 1;
texturemiddle = "MANOR_WALL_BOOKSHELF";
}
And then I have this in my textures.txt:

Code: Select all

texture manor_wall_coldstone_arch, 512, 512
{
		XScale 4
		YScale 4
		Patch "patches/p_manor_wall_coldstone_arch.png", 0, 0
}

texture manor_wall_bookshelf, 512, 512
{
		XScale 4
		YScale 4
		Patch pmwbkshf, 0, 0
}
The texture lookup is always going to succeed, so we never fallthrough to the new lumpname logic that has been added.

This is because when parsing the udmf data, the names are going to be truncated to 8 characters. Later on, when SetTexture is called, it's going to match the second texture definition.

As JP noted in his textures.txt:
Texture entries here are necessary to scale textures to non-1:1 sizes,
so that for example a 512x512 can be drawn on a 128x128 wall and appear at
the correct scale.
Can you clarify as to how this was intended to work? Or was this the part that I still needed to make changes for? The truncation is confusing as the udmf specification explicitly states that "Strings have no reasonable length limitations".

It seems like you were expecting the sidedefs above to specify a full pathname to the resource, and since there would be no textures.txt entry, it would find a match that way. But that doesn't work if you need to apply scaling, etc.

Re: Substantially increase lump name character limit >8

by Nash » Fri May 16, 2014 12:23 am

I just wanted to drop in and say thank you so much for this. Finally less awkwardly-named file resources! I've converted a huge chunk of my project to use longer filenames and everything seems to be working so far... even ACS libraries with long names work - now I'm not sure if long file name libraries worked all along or if it was introduced by this new feature but MAN it's so good to be able to clearly label what each library is because it was starting to get really tedious to manage with the short names! So once again, thank you for this feature.

(Too bad about the sprites... oh well. I'm sure someone would take a look at it in future... :P)

Re: Substantially increase lump name character limit >8

by Graf Zahl » Wed May 14, 2014 9:24 am

Make that a big, loud 'Never!'
There are things not worth changing and this clearly is one of them.

Re: Substantially increase lump name character limit >8

by edward850 » Wed May 14, 2014 9:12 am

MG_Man wrote:Is this going to apply for sprites as well? I realize the last letter and number is extremely important, but perhaps the part before that could be extended?
Let's see what the rest of the thread has already said.
Gez wrote:Sprites are really tied to their 4444-1-1-[1-1] convention, there's no way around it.
Graf Zahl wrote:Sorry, but the sprite stuff is too rigidly tied to the naming scheme. Changing it may cause unforeseen problems.
Graf Zahl wrote:For sprites, sorry, no. The sprite naming system is so hardwired to the naming scheme that I wouldn't like to change that.
That's probably a no, then. :P

Re: Substantially increase lump name character limit >8

by MG_Man » Wed May 14, 2014 9:10 am

Is this going to apply for sprites as well? I realize the last letter and number is extremely important, but perhaps the part before that could be extended?

Top