- Changed license for r_data.cpp because there isn't anything of id's original

code left in that file.
- Cleaned up r_data.cpp.
- Fixed: FTextureManager::FindTexture should not print error messages if it
  doesn't find the texture.
- Added Karate Chris's patch for fixing Strife quit messages.


SVN r718 (trunk)
This commit is contained in:
Christoph Oelckers 2008-01-27 09:38:37 +00:00
commit 5dfc81af36
8 changed files with 199 additions and 102 deletions

View file

@ -53,6 +53,12 @@
//==========================================================================
//
// FMultiPatchTexture :: FMultiPatchTexture
//
//==========================================================================
FMultiPatchTexture::FMultiPatchTexture (const void *texdef, FPatchLookup *patchlookup, int maxpatchnum, bool strife)
: Pixels (0), Spans(0), Parts(0), bRedirect(false)
{
@ -155,6 +161,12 @@ FMultiPatchTexture::FMultiPatchTexture (const void *texdef, FPatchLookup *patchl
}
}
//==========================================================================
//
// FMultiPatchTexture :: ~FMultiPatchTexture
//
//==========================================================================
FMultiPatchTexture::~FMultiPatchTexture ()
{
Unload ();
@ -170,6 +182,12 @@ FMultiPatchTexture::~FMultiPatchTexture ()
}
}
//==========================================================================
//
// FMultiPatchTexture :: SetFrontSkyLayer
//
//==========================================================================
void FMultiPatchTexture::SetFrontSkyLayer ()
{
for (int i = 0; i < NumParts; ++i)
@ -179,6 +197,12 @@ void FMultiPatchTexture::SetFrontSkyLayer ()
bNoRemap0 = true;
}
//==========================================================================
//
// FMultiPatchTexture :: Unload
//
//==========================================================================
void FMultiPatchTexture::Unload ()
{
if (Pixels != NULL)
@ -188,6 +212,12 @@ void FMultiPatchTexture::Unload ()
}
}
//==========================================================================
//
// FMultiPatchTexture :: GetPixels
//
//==========================================================================
const BYTE *FMultiPatchTexture::GetPixels ()
{
if (bRedirect)
@ -201,6 +231,12 @@ const BYTE *FMultiPatchTexture::GetPixels ()
return Pixels;
}
//==========================================================================
//
// FMultiPatchTexture :: GetColumn
//
//==========================================================================
const BYTE *FMultiPatchTexture::GetColumn (unsigned int column, const Span **spans_out)
{
if (bRedirect)
@ -229,6 +265,12 @@ const BYTE *FMultiPatchTexture::GetColumn (unsigned int column, const Span **spa
return Pixels + column*Height;
}
//==========================================================================
//
// FMultiPatchTexture :: MakeTexture
//
//==========================================================================
void FMultiPatchTexture::MakeTexture ()
{
// Add a little extra space at the end if the texture's height is not
@ -250,6 +292,12 @@ void FMultiPatchTexture::MakeTexture ()
}
}
//==========================================================================
//
// FMultiPatchTexture :: CheckForHacks
//
//==========================================================================
void FMultiPatchTexture::CheckForHacks ()
{
if (NumParts <= 0)
@ -393,6 +441,14 @@ int FMultiPatchTexture::CopyTrueColorPixels(BYTE *buffer, int buf_pitch, int buf
return retv;
}
//==========================================================================
//
// FMultiPatchTexture :: GetFormat
//
// only returns 'paletted' if all patches use the base palette.
//
//==========================================================================
FTextureFormat FMultiPatchTexture::GetFormat()
{
if (NumParts == 1) return Parts[0].Texture->GetFormat();
@ -405,6 +461,12 @@ FTextureFormat FMultiPatchTexture::GetFormat()
}
//==========================================================================
//
// FTextureManager :: AddTexturesLump
//
//==========================================================================
void FTextureManager::AddTexturesLump (const void *lumpdata, int lumpsize, int patcheslump, int firstdup, bool texture1)
{
FPatchLookup *patchlookup;
@ -546,6 +608,12 @@ void FTextureManager::AddTexturesLump (const void *lumpdata, int lumpsize, int p
}
//==========================================================================
//
// FTextureManager :: AddTexturesLumps
//
//==========================================================================
void FTextureManager::AddTexturesLumps (int lump1, int lump2, int patcheslump)
{
int firstdup = (int)Textures.Size();