[4.2.4] GLDEFS: iwad parameter ignored in brightmaps

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.
User avatar
NightFright
Spotlight Team
Posts: 1385
Joined: Fri May 02, 2008 12:29 pm
Location: Germany

[4.2.4] GLDEFS: iwad parameter ignored in brightmaps

Post by NightFright »

It appears that the iwad parameter is not working when used to prevent brightmaps from being applied to PWAD textures.

Example:
Using Brightmaps Plus
Using Sinful Discharge for Heretic

Screenshot from Sinful Discharge E3M9, showing SW2ON replacement with standard brightmaps applied in spite of iwad definitions:


SW2ON/SW2OFF definition (in brightmaps\textures\heretic.bm of Brightmaps Plus):

Code: Select all

brightmap texture sw2off
{
	map "brightmaps/textures/heretic/sw2off.png"
	iwad
}

brightmap texture sw2on
{
	map "brightmaps/textures/heretic/sw2on.png"
	iwad
}
_mental_
 
 
Posts: 3820
Joined: Sun Aug 07, 2011 4:32 am

Re: [4.2.4] GLDEFS: iwad parameter ignored in brightmaps

Post by _mental_ »

Is there any reason why lump in build info is assigned after creating a multipatch texture?

Actually, there seems to be two related issues with these lump indices.
The first one is a source lump for multipatch texture is currently set to zero instead of -1. This condition will be always true for such textures.
The second one is the mentioned assignment. It's impossible to determine a WAD with the given texture without setting a source lump.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49252
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: [4.2.4] GLDEFS: iwad parameter ignored in brightmaps

Post by Graf Zahl »

How would you determine which file a multipatch texture originates from?
There's several issues at play here:

1. Thanks to the non-cumulative nature of these things in vanilla and classic ports, most of them redefine the entire IWAD content. So what is to be considered the source lump here?
2. Even if the above does not trigger, you can just replace patches and the texture manager will never know.

In short, it is pretty much impossible to restrict brightmaps to composite IWAD textures. Something will always break. Of course the lump assignment here seems to be wrong. For a composite texture the definition lump should qualify as the source lump.
_mental_
 
 
Posts: 3820
Joined: Sun Aug 07, 2011 4:32 am

Re: [4.2.4] GLDEFS: iwad parameter ignored in brightmaps

Post by _mental_ »

Exactly, my idea was to use definition lump as a source. So, it's about swapping these two lines.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49252
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: [4.2.4] GLDEFS: iwad parameter ignored in brightmaps

Post by Graf Zahl »

Sure, that's how it was supposed to be, the swaparound was an accident.
_mental_
 
 
Posts: 3820
Joined: Sun Aug 07, 2011 4:32 am

Re: [4.2.4] GLDEFS: iwad parameter ignored in brightmaps

Post by _mental_ »

Fixed in fd5e8d6.

As for source lump defaulting to zero instead of -1, the given fix doesn't depend on it. And I don't want to change this just in case.

Return to “Closed Bugs [GZDoom]”