ZDoom / Raze

Build engine port backed by GZDoom tech. Currently supports Duke Nukem 3D, Blood, Shadow Warrior, Redneck Rampage and Powerslave/Exhumed.
708 stars 59 forks source link

[Feature] Port `ifmatch` subtoken for tilefromtexture and voxel tokens from EDuke32 #1097

Open fgsfds opened 6 months ago

fgsfds commented 6 months ago

Raze version

No response

Which game are you running with Raze?

Duke Nukem 3D

What Operating System are you using?

Windows 11

If Other OS, please describe

No response

Is your feature request related to a problem? Please describe.


Describe the solution you'd like

Implement ifmatch subtoken for tilefromtexture and voxel tokens.

https://voidpoint.io/terminx/eduke32/-/commit/30deaa5201b023838a950abbeddc3e0a2833b581

Describe alternatives you've considered

No response

Add any other context or screenshots about the feature request here.

No response

coelckers commented 1 month ago

What does this do? Is there any documentation about this feature?

fgsfds commented 1 month ago

What does this do? Is there any documentation about this feature? I don't think so. It's similar to tilefromtexture's ifcrc token, but also includes tile's dimensions and works with voxels.

Examples: voxel "1975.kvx" { ifmatch { size 226 136 crc32 0x6F84404B } tile0 1975 tile1 1979 scale .94 } tilefromtexture 1975 { file "4090.png" xoffset 30 yoffset 107 ifmatch { size 226 136 crc32 0x6F84404B } }

These entries will only work if the tile 1975 matches 226x136 dimensions and have crc = 0x6F84404B.