- 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
|
|
@ -680,11 +680,11 @@ void SetLanguageIDs()
|
|||
}
|
||||
else
|
||||
{
|
||||
DWORD lang = 0;
|
||||
uint32_t lang = 0;
|
||||
|
||||
((BYTE *)&lang)[0] = (language)[0];
|
||||
((BYTE *)&lang)[1] = (language)[1];
|
||||
((BYTE *)&lang)[2] = (language)[2];
|
||||
((uint8_t *)&lang)[0] = (language)[0];
|
||||
((uint8_t *)&lang)[1] = (language)[1];
|
||||
((uint8_t *)&lang)[2] = (language)[2];
|
||||
LanguageIDs[0] = lang;
|
||||
LanguageIDs[1] = lang;
|
||||
LanguageIDs[2] = lang;
|
||||
|
|
@ -910,7 +910,7 @@ void ToEditControl(HWND edit, const char *buf, wchar_t *wbuf, int bpos)
|
|||
};
|
||||
for (int i = 0; i <= bpos; ++i)
|
||||
{
|
||||
wchar_t code = (BYTE)buf[i];
|
||||
wchar_t code = (uint8_t)buf[i];
|
||||
if (code >= 0x1D && code <= 0x1F)
|
||||
{ // The bar characters, most commonly used to indicate map changes
|
||||
code = 0x2550; // Box Drawings Double Horizontal
|
||||
|
|
@ -985,7 +985,7 @@ static void DoPrintStr(const char *cp, HWND edit, HANDLE StdOut)
|
|||
}
|
||||
else
|
||||
{
|
||||
const BYTE *color_id = (const BYTE *)cp + 1;
|
||||
const uint8_t *color_id = (const uint8_t *)cp + 1;
|
||||
EColorRange range = V_ParseFontColor(color_id, CR_UNTRANSLATED, CR_YELLOW);
|
||||
cp = (const char *)color_id;
|
||||
|
||||
|
|
@ -999,7 +999,7 @@ static void DoPrintStr(const char *cp, HWND edit, HANDLE StdOut)
|
|||
// eight basic colors, and each comes in a dark and a bright
|
||||
// variety.
|
||||
float h, s, v, r, g, b;
|
||||
WORD attrib = 0;
|
||||
int attrib = 0;
|
||||
|
||||
RGBtoHSV(color.r / 255.f, color.g / 255.f, color.b / 255.f, &h, &s, &v);
|
||||
if (s != 0)
|
||||
|
|
@ -1016,7 +1016,7 @@ static void DoPrintStr(const char *cp, HWND edit, HANDLE StdOut)
|
|||
else if (v < 0.90) attrib = FOREGROUND_RED | FOREGROUND_GREEN | FOREGROUND_BLUE;
|
||||
else attrib = FOREGROUND_RED | FOREGROUND_GREEN | FOREGROUND_BLUE | FOREGROUND_INTENSITY;
|
||||
}
|
||||
SetConsoleTextAttribute(StdOut, attrib);
|
||||
SetConsoleTextAttribute(StdOut, (WORD)attrib);
|
||||
}
|
||||
if (edit != NULL)
|
||||
{
|
||||
|
|
@ -1376,7 +1376,7 @@ static HCURSOR CreateCompatibleCursor(FTexture *cursorpic)
|
|||
Rectangle(xor_mask_dc, 0, 0, 32, 32);
|
||||
|
||||
FBitmap bmp;
|
||||
const BYTE *pixels;
|
||||
const uint8_t *pixels;
|
||||
|
||||
bmp.Create(picwidth, picheight);
|
||||
cursorpic->CopyTrueColorPixels(&bmp, 0, 0);
|
||||
|
|
@ -1387,7 +1387,7 @@ static HCURSOR CreateCompatibleCursor(FTexture *cursorpic)
|
|||
{
|
||||
for (int x = 0; x < picwidth; ++x)
|
||||
{
|
||||
const BYTE *bgra = &pixels[x*4 + y*bmp.GetPitch()];
|
||||
const uint8_t *bgra = &pixels[x*4 + y*bmp.GetPitch()];
|
||||
if (bgra[3] != 0)
|
||||
{
|
||||
SetPixelV(and_mask_dc, x, y, RGB(0,0,0));
|
||||
|
|
@ -1463,7 +1463,7 @@ static HCURSOR CreateAlphaCursor(FTexture *cursorpic)
|
|||
// a negative pitch so that CopyTrueColorPixels will use GDI's orientation.
|
||||
if (scale == 1)
|
||||
{
|
||||
FBitmap bmp((BYTE *)bits + 31 * 32 * 4, -32 * 4, 32, 32);
|
||||
FBitmap bmp((uint8_t *)bits + 31 * 32 * 4, -32 * 4, 32, 32);
|
||||
cursorpic->CopyTrueColorPixels(&bmp, 0, 0);
|
||||
}
|
||||
else
|
||||
|
|
@ -1471,7 +1471,7 @@ static HCURSOR CreateAlphaCursor(FTexture *cursorpic)
|
|||
TArray<uint32_t> unscaled;
|
||||
unscaled.Resize(32 * 32);
|
||||
for (int i = 0; i < 32 * 32; i++) unscaled[i] = 0;
|
||||
FBitmap bmp((BYTE *)&unscaled[0] + 31 * 32 * 4, -32 * 4, 32, 32);
|
||||
FBitmap bmp((uint8_t *)&unscaled[0] + 31 * 32 * 4, -32 * 4, 32, 32);
|
||||
cursorpic->CopyTrueColorPixels(&bmp, 0, 0);
|
||||
uint32_t *scaled = (uint32_t*)bits;
|
||||
for (int y = 0; y < 32 * scale; y++)
|
||||
|
|
@ -1766,7 +1766,7 @@ unsigned int I_MakeRNGSeed()
|
|||
{
|
||||
return (unsigned int)time(NULL);
|
||||
}
|
||||
if (!CryptGenRandom(prov, sizeof(seed), (BYTE *)&seed))
|
||||
if (!CryptGenRandom(prov, sizeof(seed), (uint8_t *)&seed))
|
||||
{
|
||||
seed = (unsigned int)time(NULL);
|
||||
}
|
||||
|
|
@ -1834,9 +1834,9 @@ int VS14Stat(const char *path, struct _stat64i32 *buffer)
|
|||
buffer->st_uid = 0;
|
||||
buffer->st_gid = 0;
|
||||
buffer->st_size = data.nFileSizeLow;
|
||||
buffer->st_atime = (*(QWORD*)&data.ftLastAccessTime) / 10000000 - 11644473600LL;
|
||||
buffer->st_mtime = (*(QWORD*)&data.ftLastWriteTime) / 10000000 - 11644473600LL;
|
||||
buffer->st_ctime = (*(QWORD*)&data.ftCreationTime) / 10000000 - 11644473600LL;
|
||||
buffer->st_atime = (*(uint64_t*)&data.ftLastAccessTime) / 10000000 - 11644473600LL;
|
||||
buffer->st_mtime = (*(uint64_t*)&data.ftLastWriteTime) / 10000000 - 11644473600LL;
|
||||
buffer->st_ctime = (*(uint64_t*)&data.ftCreationTime) / 10000000 - 11644473600LL;
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue