- Made all the basic texture classes local to their implementation.
They are not needed anywhere else. - Changed the HackHack hack for corrupt 256 pixel high textures that FMultiPatchTexture only calls a virtual function instead of doing any type checks of the patch itself. - Cleaned up the constant definitions in doomdata.h. - Moved the TEXTUREx structures from doomdata.h to multipatchtexture.cpp because they are used only in this one file. - Removed some more typedefs from r_defs.h and doomdata.h - Moved local polyobject data definitions from p_local.h to po_man.cpp. SVN r1012 (trunk)
This commit is contained in:
parent
71b0d4d074
commit
47aacc45c8
34 changed files with 1723 additions and 1091 deletions
|
|
@ -40,17 +40,52 @@
|
|||
#include "r_data.h"
|
||||
#include "w_wad.h"
|
||||
|
||||
bool FAutomapTexture::Check(FileReader & data)
|
||||
{
|
||||
if (data.GetLength() < 320) return false;
|
||||
return true;
|
||||
}
|
||||
//==========================================================================
|
||||
//
|
||||
// A raw 320x? graphic used by Heretic and Hexen for the automap parchment
|
||||
//
|
||||
//==========================================================================
|
||||
|
||||
FTexture *FAutomapTexture::Create(FileReader &, int lumpnum)
|
||||
class FAutomapTexture : public FTexture
|
||||
{
|
||||
public:
|
||||
~FAutomapTexture ();
|
||||
|
||||
const BYTE *GetColumn (unsigned int column, const Span **spans_out);
|
||||
const BYTE *GetPixels ();
|
||||
void Unload ();
|
||||
void MakeTexture ();
|
||||
|
||||
int GetSourceLump() { return LumpNum; }
|
||||
|
||||
FAutomapTexture (int lumpnum);
|
||||
|
||||
private:
|
||||
BYTE *Pixels;
|
||||
Span DummySpan[2];
|
||||
int LumpNum;
|
||||
};
|
||||
|
||||
|
||||
|
||||
//==========================================================================
|
||||
//
|
||||
//
|
||||
//
|
||||
//==========================================================================
|
||||
|
||||
FTexture *AutomapTexture_TryCreate(FileReader &data, int lumpnum)
|
||||
{
|
||||
if (data.GetLength() < 320) return NULL;
|
||||
return new FAutomapTexture(lumpnum);
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
//
|
||||
//
|
||||
//
|
||||
//==========================================================================
|
||||
|
||||
FAutomapTexture::FAutomapTexture (int lumpnum)
|
||||
: Pixels(NULL), LumpNum(lumpnum)
|
||||
{
|
||||
|
|
@ -64,11 +99,23 @@ FAutomapTexture::FAutomapTexture (int lumpnum)
|
|||
DummySpan[1].Length = 0;
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
//
|
||||
//
|
||||
//
|
||||
//==========================================================================
|
||||
|
||||
FAutomapTexture::~FAutomapTexture ()
|
||||
{
|
||||
Unload ();
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
//
|
||||
//
|
||||
//
|
||||
//==========================================================================
|
||||
|
||||
void FAutomapTexture::Unload ()
|
||||
{
|
||||
if (Pixels != NULL)
|
||||
|
|
@ -78,6 +125,12 @@ void FAutomapTexture::Unload ()
|
|||
}
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
//
|
||||
//
|
||||
//
|
||||
//==========================================================================
|
||||
|
||||
void FAutomapTexture::MakeTexture ()
|
||||
{
|
||||
int x, y;
|
||||
|
|
@ -95,6 +148,12 @@ void FAutomapTexture::MakeTexture ()
|
|||
}
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
//
|
||||
//
|
||||
//
|
||||
//==========================================================================
|
||||
|
||||
const BYTE *FAutomapTexture::GetPixels ()
|
||||
{
|
||||
if (Pixels == NULL)
|
||||
|
|
@ -104,6 +163,12 @@ const BYTE *FAutomapTexture::GetPixels ()
|
|||
return Pixels;
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
//
|
||||
//
|
||||
//
|
||||
//==========================================================================
|
||||
|
||||
const BYTE *FAutomapTexture::GetColumn (unsigned int column, const Span **spans_out)
|
||||
{
|
||||
if (Pixels == NULL)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue