- except for DWORD, all homegrown integer types are gone - a handful were left where they represent genuine Windows types.
This commit is contained in:
parent
c008ddaf66
commit
d2beacfc5f
136 changed files with 770 additions and 774 deletions
|
|
@ -56,7 +56,7 @@ struct TexCreateInfo
|
|||
int usetype;
|
||||
};
|
||||
|
||||
BYTE FTexture::GrayMap[256];
|
||||
uint8_t FTexture::GrayMap[256];
|
||||
|
||||
void FTexture::InitGrayMap()
|
||||
{
|
||||
|
|
@ -253,7 +253,7 @@ void FTexture::HackHack (int newheight)
|
|||
{
|
||||
}
|
||||
|
||||
FTexture::Span **FTexture::CreateSpans (const BYTE *pixels) const
|
||||
FTexture::Span **FTexture::CreateSpans (const uint8_t *pixels) const
|
||||
{
|
||||
Span **spans, *span;
|
||||
|
||||
|
|
@ -275,7 +275,7 @@ FTexture::Span **FTexture::CreateSpans (const BYTE *pixels) const
|
|||
int numcols = Width;
|
||||
int numrows = Height;
|
||||
int numspans = numcols; // One span to terminate each column
|
||||
const BYTE *data_p;
|
||||
const uint8_t *data_p;
|
||||
bool newspan;
|
||||
int x, y;
|
||||
|
||||
|
|
@ -555,9 +555,9 @@ void FTexture::GenerateBgraMipmapsFast()
|
|||
}
|
||||
}
|
||||
|
||||
void FTexture::CopyToBlock (BYTE *dest, int dwidth, int dheight, int xpos, int ypos, int rotate, const BYTE *translation)
|
||||
void FTexture::CopyToBlock (uint8_t *dest, int dwidth, int dheight, int xpos, int ypos, int rotate, const uint8_t *translation)
|
||||
{
|
||||
const BYTE *pixels = GetPixels();
|
||||
const uint8_t *pixels = GetPixels();
|
||||
int srcwidth = Width;
|
||||
int srcheight = Height;
|
||||
int step_x = Height;
|
||||
|
|
@ -575,7 +575,7 @@ void FTexture::CopyToBlock (BYTE *dest, int dwidth, int dheight, int xpos, int y
|
|||
for (int y = 0; y < srcheight; y++, pos++)
|
||||
{
|
||||
// the optimizer is doing a good enough job here so there's no need to optimize this by hand
|
||||
BYTE v = pixels[y * step_y + x * step_x];
|
||||
uint8_t v = pixels[y * step_y + x * step_x];
|
||||
if (v != 0) dest[pos] = v;
|
||||
}
|
||||
}
|
||||
|
|
@ -587,7 +587,7 @@ void FTexture::CopyToBlock (BYTE *dest, int dwidth, int dheight, int xpos, int y
|
|||
int pos = x * dheight;
|
||||
for (int y = 0; y < srcheight; y++, pos++)
|
||||
{
|
||||
BYTE v = pixels[y * step_y + x * step_x];
|
||||
uint8_t v = pixels[y * step_y + x * step_x];
|
||||
if (v != 0) dest[pos] = translation[v];
|
||||
}
|
||||
}
|
||||
|
|
@ -598,7 +598,7 @@ void FTexture::CopyToBlock (BYTE *dest, int dwidth, int dheight, int xpos, int y
|
|||
// Converts a texture between row-major and column-major format
|
||||
// by flipping it about the X=Y axis.
|
||||
|
||||
void FTexture::FlipSquareBlock (BYTE *block, int x, int y)
|
||||
void FTexture::FlipSquareBlock (uint8_t *block, int x, int y)
|
||||
{
|
||||
int i, j;
|
||||
|
||||
|
|
@ -606,17 +606,17 @@ void FTexture::FlipSquareBlock (BYTE *block, int x, int y)
|
|||
|
||||
for (i = 0; i < x; ++i)
|
||||
{
|
||||
BYTE *corner = block + x*i + i;
|
||||
uint8_t *corner = block + x*i + i;
|
||||
int count = x - i;
|
||||
if (count & 1)
|
||||
{
|
||||
count--;
|
||||
swapvalues<BYTE> (corner[count], corner[count*x]);
|
||||
swapvalues<uint8_t> (corner[count], corner[count*x]);
|
||||
}
|
||||
for (j = 0; j < count; j += 2)
|
||||
{
|
||||
swapvalues<BYTE> (corner[j], corner[j*x]);
|
||||
swapvalues<BYTE> (corner[j+1], corner[(j+1)*x]);
|
||||
swapvalues<uint8_t> (corner[j], corner[j*x]);
|
||||
swapvalues<uint8_t> (corner[j+1], corner[(j+1)*x]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -644,16 +644,16 @@ void FTexture::FlipSquareBlockBgra(uint32_t *block, int x, int y)
|
|||
}
|
||||
}
|
||||
|
||||
void FTexture::FlipSquareBlockRemap (BYTE *block, int x, int y, const BYTE *remap)
|
||||
void FTexture::FlipSquareBlockRemap (uint8_t *block, int x, int y, const uint8_t *remap)
|
||||
{
|
||||
int i, j;
|
||||
BYTE t;
|
||||
uint8_t t;
|
||||
|
||||
if (x != y) return;
|
||||
|
||||
for (i = 0; i < x; ++i)
|
||||
{
|
||||
BYTE *corner = block + x*i + i;
|
||||
uint8_t *corner = block + x*i + i;
|
||||
int count = x - i;
|
||||
if (count & 1)
|
||||
{
|
||||
|
|
@ -674,7 +674,7 @@ void FTexture::FlipSquareBlockRemap (BYTE *block, int x, int y, const BYTE *rema
|
|||
}
|
||||
}
|
||||
|
||||
void FTexture::FlipNonSquareBlock (BYTE *dst, const BYTE *src, int x, int y, int srcpitch)
|
||||
void FTexture::FlipNonSquareBlock (uint8_t *dst, const uint8_t *src, int x, int y, int srcpitch)
|
||||
{
|
||||
int i, j;
|
||||
|
||||
|
|
@ -700,7 +700,7 @@ void FTexture::FlipNonSquareBlockBgra(uint32_t *dst, const uint32_t *src, int x,
|
|||
}
|
||||
}
|
||||
|
||||
void FTexture::FlipNonSquareBlockRemap (BYTE *dst, const BYTE *src, int x, int y, int srcpitch, const BYTE *remap)
|
||||
void FTexture::FlipNonSquareBlockRemap (uint8_t *dst, const uint8_t *src, int x, int y, int srcpitch, const uint8_t *remap)
|
||||
{
|
||||
int i, j;
|
||||
|
||||
|
|
@ -750,9 +750,9 @@ void FTexture::KillNative()
|
|||
// color data. Note that the buffer expects row-major data, since that's
|
||||
// generally more convenient for any non-Doom image formats, and it doesn't
|
||||
// need to be used by any of Doom's column drawing routines.
|
||||
void FTexture::FillBuffer(BYTE *buff, int pitch, int height, FTextureFormat fmt)
|
||||
void FTexture::FillBuffer(uint8_t *buff, int pitch, int height, FTextureFormat fmt)
|
||||
{
|
||||
const BYTE *pix;
|
||||
const uint8_t *pix;
|
||||
int x, y, w, h, stride;
|
||||
|
||||
w = GetWidth();
|
||||
|
|
@ -766,7 +766,7 @@ void FTexture::FillBuffer(BYTE *buff, int pitch, int height, FTextureFormat fmt)
|
|||
stride = pitch - w;
|
||||
for (y = 0; y < h; ++y)
|
||||
{
|
||||
const BYTE *pix2 = pix;
|
||||
const uint8_t *pix2 = pix;
|
||||
for (x = 0; x < w; ++x)
|
||||
{
|
||||
*buff++ = *pix2;
|
||||
|
|
@ -931,13 +931,13 @@ void FDummyTexture::SetSize (int width, int height)
|
|||
}
|
||||
|
||||
// This must never be called
|
||||
const BYTE *FDummyTexture::GetColumn (unsigned int column, const Span **spans_out)
|
||||
const uint8_t *FDummyTexture::GetColumn (unsigned int column, const Span **spans_out)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
// And this also must never be called
|
||||
const BYTE *FDummyTexture::GetPixels ()
|
||||
const uint8_t *FDummyTexture::GetPixels ()
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue