- 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
|
|
@ -122,13 +122,13 @@ class FPaletteTester : public FTexture
|
|||
public:
|
||||
FPaletteTester ();
|
||||
|
||||
const BYTE *GetColumn(unsigned int column, const Span **spans_out);
|
||||
const BYTE *GetPixels();
|
||||
const uint8_t *GetColumn(unsigned int column, const Span **spans_out);
|
||||
const uint8_t *GetPixels();
|
||||
bool CheckModified();
|
||||
void SetTranslation(int num);
|
||||
|
||||
protected:
|
||||
BYTE Pixels[16*16];
|
||||
uint8_t Pixels[16*16];
|
||||
int CurTranslation;
|
||||
int WantTranslation;
|
||||
static const Span DummySpan[2];
|
||||
|
|
@ -332,7 +332,7 @@ void DCanvas::Dim (PalEntry color)
|
|||
{
|
||||
float dim[4] = { color.r/255.f, color.g/255.f, color.b/255.f, color.a/255.f };
|
||||
V_AddBlend (dimmer.r/255.f, dimmer.g/255.f, dimmer.b/255.f, amount, dim);
|
||||
dimmer = PalEntry (BYTE(dim[0]*255), BYTE(dim[1]*255), BYTE(dim[2]*255));
|
||||
dimmer = PalEntry (uint8_t(dim[0]*255), uint8_t(dim[1]*255), uint8_t(dim[2]*255));
|
||||
amount = dim[3];
|
||||
}
|
||||
Dim (dimmer, amount, 0, 0, Width, Height);
|
||||
|
|
@ -361,7 +361,7 @@ DEFINE_ACTION_FUNCTION(_Screen, Dim)
|
|||
//
|
||||
//==========================================================================
|
||||
|
||||
void DCanvas::GetScreenshotBuffer(const BYTE *&buffer, int &pitch, ESSType &color_type)
|
||||
void DCanvas::GetScreenshotBuffer(const uint8_t *&buffer, int &pitch, ESSType &color_type)
|
||||
{
|
||||
Lock(true);
|
||||
buffer = GetBuffer();
|
||||
|
|
@ -669,7 +669,7 @@ static void BuildTransTable (const PalEntry *palette)
|
|||
//
|
||||
//==========================================================================
|
||||
|
||||
void DCanvas::CalcGamma (float gamma, BYTE gammalookup[256])
|
||||
void DCanvas::CalcGamma (float gamma, uint8_t gammalookup[256])
|
||||
{
|
||||
// I found this formula on the web at
|
||||
// <http://panda.mostang.com/sane/sane-gamma.html>,
|
||||
|
|
@ -679,7 +679,7 @@ void DCanvas::CalcGamma (float gamma, BYTE gammalookup[256])
|
|||
|
||||
for (i = 0; i < 256; i++)
|
||||
{
|
||||
gammalookup[i] = (BYTE)(255.0 * pow (i / 255.0, invgamma) + 0.5);
|
||||
gammalookup[i] = (uint8_t)(255.0 * pow (i / 255.0, invgamma) + 0.5);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -745,7 +745,7 @@ void DSimpleCanvas::Resize(int width, int height)
|
|||
}
|
||||
}
|
||||
int bytes_per_pixel = Bgra ? 4 : 1;
|
||||
MemBuffer = new BYTE[Pitch * height * bytes_per_pixel];
|
||||
MemBuffer = new uint8_t[Pitch * height * bytes_per_pixel];
|
||||
memset (MemBuffer, 0, Pitch * height * bytes_per_pixel);
|
||||
}
|
||||
|
||||
|
|
@ -834,9 +834,9 @@ DFrameBuffer::DFrameBuffer (int width, int height, bool bgra)
|
|||
//
|
||||
//==========================================================================
|
||||
|
||||
void DFrameBuffer::CopyWithGammaBgra(void *output, int pitch, const BYTE *gammared, const BYTE *gammagreen, const BYTE *gammablue, PalEntry flash, int flash_amount)
|
||||
void DFrameBuffer::CopyWithGammaBgra(void *output, int pitch, const uint8_t *gammared, const uint8_t *gammagreen, const uint8_t *gammablue, PalEntry flash, int flash_amount)
|
||||
{
|
||||
const BYTE *gammatables[3] = { gammared, gammagreen, gammablue };
|
||||
const uint8_t *gammatables[3] = { gammared, gammagreen, gammablue };
|
||||
|
||||
if (flash_amount > 0)
|
||||
{
|
||||
|
|
@ -847,8 +847,8 @@ void DFrameBuffer::CopyWithGammaBgra(void *output, int pitch, const BYTE *gammar
|
|||
|
||||
for (int y = 0; y < Height; y++)
|
||||
{
|
||||
BYTE *dest = (BYTE*)output + y * pitch;
|
||||
BYTE *src = MemBuffer + y * Pitch * 4;
|
||||
uint8_t *dest = (uint8_t*)output + y * pitch;
|
||||
uint8_t *src = MemBuffer + y * Pitch * 4;
|
||||
for (int x = 0; x < Width; x++)
|
||||
{
|
||||
uint16_t fg_red = src[2];
|
||||
|
|
@ -872,8 +872,8 @@ void DFrameBuffer::CopyWithGammaBgra(void *output, int pitch, const BYTE *gammar
|
|||
{
|
||||
for (int y = 0; y < Height; y++)
|
||||
{
|
||||
BYTE *dest = (BYTE*)output + y * pitch;
|
||||
BYTE *src = MemBuffer + y * Pitch * 4;
|
||||
uint8_t *dest = (uint8_t*)output + y * pitch;
|
||||
uint8_t *src = MemBuffer + y * Pitch * 4;
|
||||
for (int x = 0; x < Width; x++)
|
||||
{
|
||||
dest[0] = gammatables[2][src[0]];
|
||||
|
|
@ -940,7 +940,7 @@ void DFrameBuffer::DrawRateStuff ()
|
|||
{
|
||||
int i = I_GetTime(false);
|
||||
int tics = i - LastTic;
|
||||
BYTE *buffer = GetBuffer();
|
||||
uint8_t *buffer = GetBuffer();
|
||||
|
||||
LastTic = i;
|
||||
if (tics > 20) tics = 20;
|
||||
|
|
@ -1041,7 +1041,7 @@ void FPaletteTester::SetTranslation(int num)
|
|||
//
|
||||
//==========================================================================
|
||||
|
||||
const BYTE *FPaletteTester::GetColumn (unsigned int column, const Span **spans_out)
|
||||
const uint8_t *FPaletteTester::GetColumn (unsigned int column, const Span **spans_out)
|
||||
{
|
||||
if (CurTranslation != WantTranslation)
|
||||
{
|
||||
|
|
@ -1061,7 +1061,7 @@ const BYTE *FPaletteTester::GetColumn (unsigned int column, const Span **spans_o
|
|||
//
|
||||
//==========================================================================
|
||||
|
||||
const BYTE *FPaletteTester::GetPixels ()
|
||||
const uint8_t *FPaletteTester::GetPixels ()
|
||||
{
|
||||
if (CurTranslation != WantTranslation)
|
||||
{
|
||||
|
|
@ -1079,7 +1079,7 @@ const BYTE *FPaletteTester::GetPixels ()
|
|||
void FPaletteTester::MakeTexture()
|
||||
{
|
||||
int i, j, k, t;
|
||||
BYTE *p;
|
||||
uint8_t *p;
|
||||
|
||||
t = WantTranslation;
|
||||
p = Pixels;
|
||||
|
|
@ -1105,7 +1105,7 @@ void FPaletteTester::MakeTexture()
|
|||
//
|
||||
//==========================================================================
|
||||
|
||||
void DFrameBuffer::CopyFromBuff (BYTE *src, int srcPitch, int width, int height, BYTE *dest)
|
||||
void DFrameBuffer::CopyFromBuff (uint8_t *src, int srcPitch, int width, int height, uint8_t *dest)
|
||||
{
|
||||
if (Pitch == width && Pitch == Width && srcPitch == width)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue