- Fixed: ANIMATED allowed animations between different texture types.

- Added a debuganimated CCMD that can be used to output some information
  if a WAD shows broken animations.
- Fixed: The handling for enum values in Xlat was incorrect. The rule with 
  value assignment must set the counter one higher than the current value.
- Fixed: The definition of enums in the Xlat grammar was right-recursive
  which could create stack overflows in the parser. Made it left-recursive as
  recommended in Lemon's docs. 


SVN r850 (trunk)
This commit is contained in:
Christoph Oelckers 2008-03-25 09:43:50 +00:00
commit 14533f867d
8 changed files with 60 additions and 15 deletions

View file

@ -59,7 +59,7 @@
//
//==========================================================================
FMultiPatchTexture::FMultiPatchTexture (const void *texdef, FPatchLookup *patchlookup, int maxpatchnum, bool strife)
FMultiPatchTexture::FMultiPatchTexture (const void *texdef, FPatchLookup *patchlookup, int maxpatchnum, bool strife, int deflumpnum)
: Pixels (0), Spans(0), Parts(0), bRedirect(false)
{
union
@ -159,6 +159,7 @@ FMultiPatchTexture::FMultiPatchTexture (const void *texdef, FPatchLookup *patchl
bRedirect = true;
}
}
DefinitionLump = deflumpnum;
}
//==========================================================================
@ -467,7 +468,7 @@ FTextureFormat FMultiPatchTexture::GetFormat()
//
//==========================================================================
void FTextureManager::AddTexturesLump (const void *lumpdata, int lumpsize, int patcheslump, int firstdup, bool texture1)
void FTextureManager::AddTexturesLump (const void *lumpdata, int lumpsize, int deflumpnum, int patcheslump, int firstdup, bool texture1)
{
FPatchLookup *patchlookup;
int i, j;
@ -596,7 +597,7 @@ void FTextureManager::AddTexturesLump (const void *lumpdata, int lumpsize, int p
}
if (j + 1 == firstdup)
{
FTexture *tex = new FMultiPatchTexture ((const BYTE *)maptex + offset, patchlookup, numpatches, isStrife);
FMultiPatchTexture *tex = new FMultiPatchTexture ((const BYTE *)maptex + offset, patchlookup, numpatches, isStrife, deflumpnum);
if (i == 1 && texture1)
{
tex->UseType = FTexture::TEX_Null;
@ -621,12 +622,12 @@ void FTextureManager::AddTexturesLumps (int lump1, int lump2, int patcheslump)
if (lump1 >= 0)
{
FMemLump texdir = Wads.ReadLump (lump1);
AddTexturesLump (texdir.GetMem(), Wads.LumpLength (lump1), patcheslump, firstdup, true);
AddTexturesLump (texdir.GetMem(), Wads.LumpLength (lump1), lump1, patcheslump, firstdup, true);
}
if (lump2 >= 0)
{
FMemLump texdir = Wads.ReadLump (lump2);
AddTexturesLump (texdir.GetMem(), Wads.LumpLength (lump2), patcheslump, firstdup, false);
AddTexturesLump (texdir.GetMem(), Wads.LumpLength (lump2), lump2, patcheslump, firstdup, false);
}
}