mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-10 23:01:50 +00:00
- file system update from Raze.
This commit is contained in:
parent
3adadfe4d3
commit
26d00e14c7
1 changed files with 14 additions and 1 deletions
|
@ -113,7 +113,20 @@ struct FileSystem::LumpRecord
|
||||||
if (Namespace == ns_hidden) shortName.qword = 0;
|
if (Namespace == ns_hidden) shortName.qword = 0;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
long slash = longName.LastIndexOf('/');
|
ptrdiff_t encodedResID = longName.LastIndexOf(".{");
|
||||||
|
if (resourceId == -1 && encodedResID >= 0)
|
||||||
|
{
|
||||||
|
const char* p = longName.GetChars() + encodedResID;
|
||||||
|
char* q;
|
||||||
|
int id = (int)strtoull(p+2, &q, 10); // only decimal numbers allowed here.
|
||||||
|
if (q[0] == '}' && (q[1] == '.' || q[1] == 0))
|
||||||
|
{
|
||||||
|
FString toDelete(p, q - p + 1);
|
||||||
|
longName.Substitute(toDelete, "");
|
||||||
|
resourceId = id;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
ptrdiff_t slash = longName.LastIndexOf('/');
|
||||||
FString base = (slash >= 0) ? longName.Mid(slash + 1) : longName;
|
FString base = (slash >= 0) ? longName.Mid(slash + 1) : longName;
|
||||||
auto dot = base.LastIndexOf('.');
|
auto dot = base.LastIndexOf('.');
|
||||||
if (dot >= 0) base.Truncate(dot);
|
if (dot >= 0) base.Truncate(dot);
|
||||||
|
|
Loading…
Reference in a new issue