TEXTURES /* */ comments not working
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.
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.
- Major Cooke
- Posts: 8211
- Joined: Sun Jan 28, 2007 3:55 pm
- Preferred Pronouns: He/Him
- Operating System Version (Optional): Windows 10
- Graphics Processor: nVidia with Vulkan support
- Location: GZBoomer Town
- Contact:
TEXTURES /* */ comments not working
As seen here, the /* */ style comments don't work.
Load up spr1.pk3 followed by spr2.pk3. The second file has a completely commented out textures file that shouldn't even process, but it does. Just empty out the TEXTURES file inside of it and the warnings disappear.
Load up spr1.pk3 followed by spr2.pk3. The second file has a completely commented out textures file that shouldn't even process, but it does. Just empty out the TEXTURES file inside of it and the warnings disappear.
- Attachments
-
spr2.pk3
- Fixed. Load last.
- (4.02 KiB) Downloaded 42 times
-
spr1.pk3
- Load first
- (4.01 KiB) Downloaded 46 times
Last edited by Major Cooke on Sat Mar 12, 2016 9:06 pm, edited 1 time in total.
Re: TEXTURES /* */ comments not working
Whatever the problem is, it has nothing to do with comments in TEXTURES. The warnings come from spr1.pk3, not spr2.pk3.
- Major Cooke
- Posts: 8211
- Joined: Sun Jan 28, 2007 3:55 pm
- Preferred Pronouns: He/Him
- Operating System Version (Optional): Windows 10
- Graphics Processor: nVidia with Vulkan support
- Location: GZBoomer Town
- Contact:
Re: TEXTURES /* */ comments not working
Oh shit. I forgot to restore it back to the buggy behavior on TEXTURES before uploading. Fixed now, redownload spr2.pk3.
---OR---
In spr2.pk3, replace in TEXTURES:
with
---OR---
In spr2.pk3, replace in TEXTURES:
Code: Select all
//Sprite M008B0, 129, 50
//{
// Offset 0, 0
// Patch M008Z0, 0, 0
//}
//Sprite M008C0, 129, 50
//{
// Offset 0, 0
// Patch M008Z0, 0, 0
//}
Code: Select all
/*
Sprite M008B0, 129, 50
{
Offset 0, 0
Patch M008Z0, 0, 0
}
Sprite M008C0, 129, 50
{
Offset 0, 0
Patch M008Z0, 0, 0
}
*/
Re: TEXTURES /* */ comments not working
That changes nothing. I already did that when I saw it didn't match your description. Note that TEXTURES uses the same parser as everywhere else, so if C-style comments didn't work in TEXTURES, they wouldn't work in other places either.
Re: TEXTURES /* */ comments not working
You get the same error even if you completely delete the TEXTURES lump from spr2.pk3...
It's probably some kind of namespace related conflict because of the resource loading order...
If you rename your Sprites folders to Graphics, and change your 'Patch' TEXTURES entries to 'Graphic', everything seems to work as expected, with no errors/warnings.
It's probably some kind of namespace related conflict because of the resource loading order...
If you rename your Sprites folders to Graphics, and change your 'Patch' TEXTURES entries to 'Graphic', everything seems to work as expected, with no errors/warnings.
- Major Cooke
- Posts: 8211
- Joined: Sun Jan 28, 2007 3:55 pm
- Preferred Pronouns: He/Him
- Operating System Version (Optional): Windows 10
- Graphics Processor: nVidia with Vulkan support
- Location: GZBoomer Town
- Contact:
Re: TEXTURES /* */ comments not working
Actually I didn't get the error after deleting the textures lump. You must've had a different one from me.
Anyway... Is there a 'proper' way for replacing the sprites that should be known for, say, better quality packs?
Anyway... Is there a 'proper' way for replacing the sprites that should be known for, say, better quality packs?
- Graf Zahl
- Lead GZDoom+Raze Developer
- Posts: 49234
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: TEXTURES /* */ comments not working
Ok, here's what happens:
The texture manager goes through the loaded resource files one by one.
For each file all textures found in the common namespaces are added.
But there's one exception: It won't add a texture if it gets overridden by a later mod.
So when your first TEXTURES lump tries to parse the patch name it's simply not present.
There is a catch to deal with this case, but it won't get triggered if the patch is a sprite, only for actual patches, or if you specify 'graphic' for global graphics.
The texture manager goes through the loaded resource files one by one.
For each file all textures found in the common namespaces are added.
But there's one exception: It won't add a texture if it gets overridden by a later mod.
So when your first TEXTURES lump tries to parse the patch name it's simply not present.
There is a catch to deal with this case, but it won't get triggered if the patch is a sprite, only for actual patches, or if you specify 'graphic' for global graphics.
- Major Cooke
- Posts: 8211
- Joined: Sun Jan 28, 2007 3:55 pm
- Preferred Pronouns: He/Him
- Operating System Version (Optional): Windows 10
- Graphics Processor: nVidia with Vulkan support
- Location: GZBoomer Town
- Contact:
Re: TEXTURES /* */ comments not working
Aaah. So that's what AFADoomer was referring to when he suggested replacing the Patch word with Graphic?
The definition type can remain as 'Sprite', correct?
And, this just applies to the replacing file (in this case spr2.pk3) right? Or should I be replacing Patch with Graphic in both versions?
The definition type can remain as 'Sprite', correct?
And, this just applies to the replacing file (in this case spr2.pk3) right? Or should I be replacing Patch with Graphic in both versions?
- Graf Zahl
- Lead GZDoom+Raze Developer
- Posts: 49234
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: TEXTURES /* */ comments not working
No, that won't help. It only adds the patches if they are either graphics or patches, depending on the keyword. I cannot remember why sprites have been excluded here so I got to do a bit of research in the changelog before adding a "Sprite" special case. Not that this breaks more important things...
Re: TEXTURES /* */ comments not working
I know that you can leave the definition in TEXTURES as a Sprite, but you'll have to replace Patch with Graphic in both spots as it stands, unless Graf changes something...Major Cooke wrote:Aaah. So that's what AFADoomer was referring to when he suggested replacing the Patch word with Graphic?
The definition type can remain as 'Sprite', correct?
And, this just applies to the replacing file (in this case spr2.pk3) right? Or should I be replacing Patch with Graphic in both versions?
You may not actually have to rename the folders; I just re-checked my Wolf3D TC, and all of the sprites are assembled from Graphic TEXTURES entries, but are in the Sprites folders.
An example of sprites from the Wolf3D TC:
Code: Select all
Sprite POL1A0, 64, 64 {Offset 32, 64 Graphic WSPR0002, 0, 0}
In the (optional) hi-res add-on, the overriding sprite is defined as:
Code: Select all
Sprite POL1A0, 128, 128 {XScale 2.0 YScale 2.0 Offset 64, 128 Graphic MSPR037, 0, 0}
Granted, I'm not using the same file name for the component graphics, so that might make a difference there, too (and be a possible workaround)...
- Major Cooke
- Posts: 8211
- Joined: Sun Jan 28, 2007 3:55 pm
- Preferred Pronouns: He/Him
- Operating System Version (Optional): Windows 10
- Graphics Processor: nVidia with Vulkan support
- Location: GZBoomer Town
- Contact:
Re: TEXTURES /* */ comments not working
I'll just wait for Graf, AFADoomer. It's for the best. According to what he said, it appears this is actually slightly broken functionality from the sounds of it, until proven otherwise if there was a reason not to add a case for sprites. Also I wouldn't want to rename all the sprites to begin with. Too many of them.Graf Zahl wrote:No, that won't help. It only adds the patches if they are either graphics or patches, depending on the keyword. I cannot remember why sprites have been excluded here so I got to do a bit of research in the changelog before adding a "Sprite" special case. Not that this breaks more important things...
- Graf Zahl
- Lead GZDoom+Raze Developer
- Posts: 49234
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: TEXTURES /* */ comments not working
Just fixed for another bug report.
- Major Cooke
- Posts: 8211
- Joined: Sun Jan 28, 2007 3:55 pm
- Preferred Pronouns: He/Him
- Operating System Version (Optional): Windows 10
- Graphics Processor: nVidia with Vulkan support
- Location: GZBoomer Town
- Contact:
Re: TEXTURES /* */ comments not working
Huge thanks!