mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-01-29 20:20:43 +00:00
QuakeForge now supports map specific textures in textures/mapname/
.
This commit is contained in:
parent
d93fceea38
commit
e3ea39e67b
1 changed files with 24 additions and 14 deletions
|
@ -84,21 +84,31 @@ Mod_LoadExternalTextures (model_t *mod)
|
||||||
if (!tx)
|
if (!tx)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
// replace special flag characters with underscores
|
// FIXME: replace special flag characters with # or _?
|
||||||
if (tx->name[0] == '*') { // FIXME: translate to # or _?
|
if (tx->name[0] == '*') {
|
||||||
filename = va ("maps/#%s.tga", tx->name + 1);
|
filename = va ("textures/%.*s/#%s.tga", strlen (mod->name + 5) - 4,
|
||||||
} else {
|
mod->name + 5, tx->name + 1);
|
||||||
filename = va ("maps/%s.tga", tx->name);
|
|
||||||
}
|
|
||||||
QFS_FOpenFile (filename, &f);
|
|
||||||
|
|
||||||
if (!f) {
|
|
||||||
if (tx->name[0] == '*') {
|
|
||||||
filename = va ("textures/#%s.tga", tx->name + 1);
|
|
||||||
} else {
|
|
||||||
filename = va ("textures/%s.tga", tx->name);
|
|
||||||
}
|
|
||||||
QFS_FOpenFile (filename, &f);
|
QFS_FOpenFile (filename, &f);
|
||||||
|
if (!f) {
|
||||||
|
filename = va ("textures/#%s.tga", tx->name + 1);
|
||||||
|
QFS_FOpenFile (filename, &f);
|
||||||
|
}
|
||||||
|
if (!f) {
|
||||||
|
filename = va ("maps/#%s.tga", tx->name + 1);
|
||||||
|
QFS_FOpenFile (filename, &f);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
filename = va ("textures/%.*s/%s.tga", strlen (mod->name +5) -4,
|
||||||
|
mod->name + 5, tx->name);
|
||||||
|
QFS_FOpenFile (filename, &f);
|
||||||
|
if (!f) {
|
||||||
|
filename = va ("textures/%s.tga", tx->name);
|
||||||
|
QFS_FOpenFile (filename, &f);
|
||||||
|
}
|
||||||
|
if (!f) {
|
||||||
|
filename = va ("maps/%s.tga", tx->name);
|
||||||
|
QFS_FOpenFile (filename, &f);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (f) {
|
if (f) {
|
||||||
|
|
Loading…
Reference in a new issue