32-bit mode hook

A Forum dedicated to the Suggestion, Creation and Editing of XWA Dynamic Link Library Files

Moderator: JeremyaFr

Re: 32-bit mode hook

User avatar
blue_max
XWAU Member
Posts: 2295
Joined: Wed Mar 20, 2019 5:12 am

Post by blue_max » Mon Jan 02, 2023 5:45 pm

I agree with Jeremy: the fix would be to modify the .mat file to also use the same "_fg_" suffix for the affected textures.

User avatar
Master Qui-Gon
XWAU Member
Posts: 1442
Joined: Tue Oct 23, 2001 11:01 pm

Post by Master Qui-Gon » Tue Jan 03, 2023 2:28 am

JeremyaFr wrote:
Mon Jan 02, 2023 12:23 pm
When a skin is applied to a texture, the hook appends "_fg_" to the texture name, followed by the color index.
If the Effects DDraw doesn't support that then it may explain why normal maps don't work with skins.
Ok, Thanks that makes perfect sense.
Your focus determines your reality.

User avatar
Master Qui-Gon
XWAU Member
Posts: 1442
Joined: Tue Oct 23, 2001 11:01 pm

Post by Master Qui-Gon » Tue Jan 03, 2023 3:22 am

blue_max wrote:
Mon Jan 02, 2023 5:45 pm
I agree with Jeremy: the fix would be to modify the .mat file to also use the same "_fg_" suffix for the affected textures.
I tried adding this line...with and without the c in fg..

[Tex00000,Tex00000_fg_0,Tex00001,Tex00002,Tex00003]
NormalMap = Effects\SlaveOne.dat-0-1

No luck
Your focus determines your reality.

User avatar
blue_max
XWAU Member
Posts: 2295
Joined: Wed Mar 20, 2019 5:12 am

Post by blue_max » Thu Jan 05, 2023 5:34 pm

Just to close this question, the solution was to name the textures with the format:

TEXNNNNN_fg_M_SKINNAME

in the .mat file. For this example, they look like this:

[Tex00000_fg_0_Default,Tex00000_fg_1_Default,Tex00000_fg_2_Default,Tex00000_fg_3_Default]
NormalMap = Effects\SlaveOne.dat-0

and a different section has to be added for each skin.

User avatar
JeremyaFr
XWAU Member
Posts: 3921
Joined: Mon Jan 18, 2010 5:52 pm
Contact:

Post by JeremyaFr » Thu Jan 05, 2023 7:19 pm

blue_max wrote:
Thu Jan 05, 2023 5:34 pm
in the .mat file. For this example, they look like this:

[Tex00000_fg_0_Default,Tex00000_fg_1_Default,Tex00000_fg_2_Default,Tex00000_fg_3_Default]
NormalMap = Effects\SlaveOne.dat-0
Hello,
Since all the texture markings share the same normal map, it might be better to have only:

Code: Select all

[Tex00000]
NormalMap = Effects\SlaveOne.dat-0
Then from the Effects DDraw code, search in the texture name the string "_fg_" to get the texture base name.

User avatar
blue_max
XWAU Member
Posts: 2295
Joined: Wed Mar 20, 2019 5:12 am

Post by blue_max » Thu Jan 05, 2023 7:21 pm

JeremyaFr wrote:
Thu Jan 05, 2023 7:19 pm
Hello,
Since all the texture markings share the same normal map, it might be better to have only:

Code: Select all

[Tex00000]
NormalMap = Effects\SlaveOne.dat-0
Then from the Effects DDraw code, search in the texture name the string "_fg_" to get the texture base name.
Yeah, that would work, and then if someone wants to add a custom normal map for a specific skin, they can add new lines to do the override. Yeah, that's a great suggestion, Jeremy.

User avatar
JeremyaFr
XWAU Member
Posts: 3921
Joined: Mon Jan 18, 2010 5:52 pm
Contact:

Post by JeremyaFr » Wed Mar 08, 2023 7:28 pm

UPDATE

Hello,
I've updated the 32bpp hook.

I've fixed a crash with compressed skins.

Mauricio
Recruit
Posts: 2
Joined: Fri Mar 24, 2023 10:39 pm

Post by Mauricio » Sat Mar 25, 2023 3:06 pm

JeremyaFr wrote:
Wed Mar 08, 2023 7:28 pm
UPDATE

Hello,
I've updated the 32bpp hook.

I've fixed a crash with compressed skins.
This update is released AFTER the 5.5 patch? So, can I install it or it not necessary?

User avatar
JeremyaFr
XWAU Member
Posts: 3921
Joined: Mon Jan 18, 2010 5:52 pm
Contact:

Post by JeremyaFr » Sat Mar 25, 2023 7:05 pm

Hello,
If the game is working fine for you then it is not necessary to update the hooks.

User avatar
JeremyaFr
XWAU Member
Posts: 3921
Joined: Mon Jan 18, 2010 5:52 pm
Contact:

Post by JeremyaFr » Fri May 19, 2023 4:03 pm

UPDATE

Hello,
I've updated the 32bpp hook.

I've improved fps by grouping facegroups by textures.

User avatar
JeremyaFr
XWAU Member
Posts: 3921
Joined: Mon Jan 18, 2010 5:52 pm
Contact:

Post by JeremyaFr » Fri Jul 14, 2023 6:53 pm

UPDATE

Hello,
I've updated the 32bpp hook.

Changes are:
- add support for the BC7 texture compression format for the backdrops

User avatar
JeremyaFr
XWAU Member
Posts: 3921
Joined: Mon Jan 18, 2010 5:52 pm
Contact:

Post by JeremyaFr » Fri Aug 04, 2023 1:15 pm

UPDATE

Hello,
I've updated the 32bpp hook.

Changes are:
- improve textures loading time

User avatar
JeremyaFr
XWAU Member
Posts: 3921
Joined: Mon Jan 18, 2010 5:52 pm
Contact:

Post by JeremyaFr » Thu Oct 26, 2023 5:54 pm

UPDATE

Hello,
I've updated the 32bpp hook.

Changes are:
- fix a crash when reading dat images

Post Reply