Okay, I made you something. I have made you a
pull request that will stick it in your tools/ folder. (It will *only* work if placed in a first-level subfolder, if you need it someplace else you'll have to change the "cd %~dp0\.." line)
Right now, all it does is spit its output out to the console. If you want to create an actual file with it, it would be as thus:
- Code: Select all • Expand view
call D:\WolfenDoom\tools\gldefs-mats-generator.cmd > D:\WolfenDoom\gldefs.autogen
The "call" is assuming you are using this within a batch file, and allows nested batch file execution with a graceful exit. Replace D:\WolfenDoom with your actual development folder path, obviously.
If I call the batch file with the branch in its current state, this is its output:
- Code: Select all • Expand view
material texture "textures/AFRK_T02.jpg"
{
shader "shaders/displacement.fp"
texture displacement "materials\displacement\AFRK_T02.png"
}
material texture "AFRK_T02"
{
shader "shaders/displacement.fp"
texture displacement "materials\displacement\AFRK_T02.png"
}
material texture "textures/AFRK_T07.png"
{
shader "shaders/displacement.fp"
texture displacement "materials\displacement\AFRK_T07.png"
}
material texture "AFRK_T07"
{
shader "shaders/displacement.fp"
texture displacement "materials\displacement\AFRK_T07.png"
}
material texture "textures/BRIK_T05.png"
{
shader "shaders/displacement.fp"
texture displacement "materials\displacement\BRIK_T05.png"
}
material texture "BRIK_T05"
{
shader "shaders/displacement.fp"
texture displacement "materials\displacement\BRIK_T05.png"
}
material texture "textures/ROCK_G32.png"
{
shader "shaders/displacement.fp"
texture displacement "materials\displacement\ROCK_G32.png"
}
material texture "ROCK_G32"
{
shader "shaders/displacement.fp"
texture displacement "materials\displacement\ROCK_G32.png"
}
material texture "textures/SAND_T02.png"
{
shader "shaders/displacement.fp"
texture displacement "materials\displacement\SAND_T02.png"
}
material texture "SAND_T02"
{
shader "shaders/displacement.fp"
texture displacement "materials\displacement\SAND_T02.png"
}
material texture "textures/STON_G10.png"
{
shader "shaders/displacement.fp"
texture displacement "materials\displacement\STON_G10.png"
}
material texture "STON_G10"
{
shader "shaders/displacement.fp"
texture displacement "materials\displacement\STON_G10.png"
}
material texture "textures/egypt/EGYP_S03.png"
{
shader "shaders/displacement.fp"
texture displacement "materials\displacement\EGYP_S03.png"
}
material texture "EGYP_S03"
{
shader "shaders/displacement.fp"
texture displacement "materials\displacement\EGYP_S03.png"
}