mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-22 12:11:25 +00:00
- Changed wad namespacing so that wads with a missing end marker will be
loaded as if they had one more lump with that end marker. This matches the behaviour of previously released ZDooms. (The warning is still present, so there's no excuse to release more wads like this.) SVN r1667 (trunk)
This commit is contained in:
parent
8d83d3791d
commit
e69f90076d
2 changed files with 12 additions and 5 deletions
|
@ -1,4 +1,8 @@
|
|||
June 10, 2009
|
||||
- Changed wad namespacing so that wads with a missing end marker will be
|
||||
loaded as if they had one more lump with that end marker. This matches the
|
||||
behaviour of previously released ZDooms. (The warning is still present, so
|
||||
there's no excuse to release more wads like this.)
|
||||
- Moved Raw Input processing into a seperate method of FInputDevice so that
|
||||
all the devices can share the same setup code.
|
||||
|
||||
|
|
|
@ -224,7 +224,7 @@ void FWadFile::SetNamespace(const char *startmarker, const char *endmarker, name
|
|||
i++;
|
||||
continue;
|
||||
}
|
||||
// same for x_START markers
|
||||
// same for x_END markers
|
||||
while (i < markers.Size()-1 && (markers[i].markertype == 1 && markers[i+1].markertype == 1))
|
||||
{
|
||||
Printf(TEXTCOLOR_YELLOW"WARNING: duplicate %s marker found.\n", endmarker);
|
||||
|
@ -235,13 +235,16 @@ void FWadFile::SetNamespace(const char *startmarker, const char *endmarker, name
|
|||
if (i >= markers.Size())
|
||||
{
|
||||
Printf(TEXTCOLOR_YELLOW"WARNING: %s marker without corresponding %s found.\n", startmarker, endmarker);
|
||||
return;
|
||||
end = NumLumps;
|
||||
}
|
||||
else
|
||||
{
|
||||
end = markers[i++].index;
|
||||
}
|
||||
end = i++;
|
||||
|
||||
// we found a marked block
|
||||
DPrintf("Found %s block at (%d-%d)\n", startmarker, markers[start].index, markers[end].index);
|
||||
for(int j = markers[start].index+1; j < markers[end].index; j++)
|
||||
DPrintf("Found %s block at (%d-%d)\n", startmarker, markers[start].index, end);
|
||||
for(int j = markers[start].index + 1; j < end; j++)
|
||||
{
|
||||
if (Lumps[j].Namespace != ns_global)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue