- replaced another large batch of homegrown type use.

This commit is contained in:
Christoph Oelckers 2017-03-08 18:44:37 +01:00
commit 6dee9ff566
57 changed files with 656 additions and 656 deletions

View file

@ -49,7 +49,7 @@ private:
FileReader &File;
bool SawEOF;
BYTE InBuff[BUFF_SIZE];
uint8_t InBuff[BUFF_SIZE];
enum StreamState
{
@ -62,15 +62,15 @@ private:
{
StreamState State;
BYTE *In;
uint8_t *In;
unsigned int AvailIn;
unsigned int InternalOut;
BYTE CFlags, Bits;
uint8_t CFlags, Bits;
BYTE Window[WINDOW_SIZE+INTERNAL_BUFFER_SIZE];
const BYTE *WindowData;
BYTE *InternalBuffer;
uint8_t Window[WINDOW_SIZE+INTERNAL_BUFFER_SIZE];
const uint8_t *WindowData;
uint8_t *InternalBuffer;
} Stream;
void FillBuffer()
@ -109,8 +109,8 @@ private:
return false;
Stream.AvailIn -= 2;
WORD pos = BigShort(*(WORD*)Stream.In);
BYTE len = (pos & 0xF)+1;
uint16_t pos = BigShort(*(uint16_t*)Stream.In);
uint8_t len = (pos & 0xF)+1;
pos >>= 4;
Stream.In += 2;
if(len == 1)
@ -120,7 +120,7 @@ private:
return true;
}
const BYTE* copyStart = Stream.InternalBuffer-pos-1;
const uint8_t* copyStart = Stream.InternalBuffer-pos-1;
// Complete overlap: Single byte repeated
if(pos == 0)
@ -182,7 +182,7 @@ public:
long Read(void *buffer, long len)
{
BYTE *Out = (BYTE*)buffer;
uint8_t *Out = (uint8_t*)buffer;
long AvailOut = len;
do
@ -222,7 +222,7 @@ public:
while(AvailOut && Stream.State != STREAM_FINAL);
assert(AvailOut == 0);
return (long)(Out - (BYTE*)buffer);
return (long)(Out - (uint8_t*)buffer);
}
};
@ -329,7 +329,7 @@ FWadFile::~FWadFile()
bool FWadFile::Open(bool quiet)
{
wadinfo_t header;
DWORD InfoTableOfs;
uint32_t InfoTableOfs;
bool isBigEndian = false; // Little endian is assumed until proven otherwise
const long wadSize = Reader->GetLength();
@ -358,7 +358,7 @@ bool FWadFile::Open(bool quiet)
Lumps = new FWadFileLump[NumLumps];
for(DWORD i = 0; i < NumLumps; i++)
for(uint32_t i = 0; i < NumLumps; i++)
{
uppercopy (Lumps[i].Name, fileinfo[i].Name);
Lumps[i].Name[8] = 0;
@ -563,7 +563,7 @@ void FWadFile::SkinHack ()
static int namespc = ns_firstskin;
bool skinned = false;
bool hasmap = false;
DWORD i;
uint32_t i;
for (i = 0; i < NumLumps; i++)
{
@ -580,7 +580,7 @@ void FWadFile::SkinHack ()
if (!skinned)
{
skinned = true;
DWORD j;
uint32_t j;
for (j = 0; j < NumLumps; j++)
{
@ -627,7 +627,7 @@ void FWadFile::SkinHack ()
void FWadFile::FindStrifeTeaserVoices ()
{
for (DWORD i = 0; i <= NumLumps; ++i)
for (uint32_t i = 0; i <= NumLumps; ++i)
{
if (Lumps[i].Name[0] == 'V' &&
Lumps[i].Name[1] == 'O' &&