Menu

#429 Extend .link file functionality.

open
Engine (30)
5
2009-10-24
2009-10-24
stoo
No

.link files have the capacity to save a lot of space in the textures dir, and resolve the problem of textures with the same name, but right now they're very limited in what they can do.

I propose the following:

.link files should work in subdirs of the textures dir (i.e. map override dirs)
.link files should check their own dir first, then their parent dir and right down the path before falling back to id1 textures

For example:

metal5_1.link in /textures/dm2/ links to a file cop1_1.png

ezquake should search for cop1_1.png in the following dirs:

/textures/dm2/
/textures/

and then continue right down the path, using the first one it encounters.

Possible Additional Feature
--------------------------------------------

It might also make sense to search for all texture file extensions if the extension is ommitted in the .link file.

For example:

metal5_1.link in /textures/dm2/ links to cop1_1

Since no extension is specified in the .link, ezquake should search each dir for cop1_1.tga/png/jpg (whatever the actual order is) right down the path, using the first one it encounters.

If an extension IS specified, only a file with that exact name should be used.

I think this would make the .link system much more flexible and minimise duplication of files in the /textures/ tree.

Discussion