- 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
|
|
@ -161,8 +161,8 @@ public:
|
|||
void NetDone();
|
||||
|
||||
// Hexen's notch graphics, converted to chunky pixels.
|
||||
BYTE * NotchBits;
|
||||
BYTE * NetNotchBits;
|
||||
uint8_t * NotchBits;
|
||||
uint8_t * NetNotchBits;
|
||||
};
|
||||
|
||||
class FStrifeStartupScreen : public FGraphicalStartupScreen
|
||||
|
|
@ -175,7 +175,7 @@ public:
|
|||
protected:
|
||||
void DrawStuff(int old_laser, int new_laser);
|
||||
|
||||
BYTE *StartupPics[4+2+1];
|
||||
uint8_t *StartupPics[4+2+1];
|
||||
};
|
||||
|
||||
// EXTERNAL FUNCTION PROTOTYPES --------------------------------------------
|
||||
|
|
@ -187,19 +187,19 @@ int LayoutNetStartPane (HWND pane, int w);
|
|||
bool ST_Util_CreateStartupWindow ();
|
||||
void ST_Util_SizeWindowForBitmap (int scale);
|
||||
BITMAPINFO *ST_Util_CreateBitmap (int width, int height, int color_bits);
|
||||
BYTE *ST_Util_BitsForBitmap (BITMAPINFO *bitmap_info);
|
||||
uint8_t *ST_Util_BitsForBitmap (BITMAPINFO *bitmap_info);
|
||||
void ST_Util_FreeBitmap (BITMAPINFO *bitmap_info);
|
||||
void ST_Util_BitmapColorsFromPlaypal (BITMAPINFO *bitmap_info);
|
||||
void ST_Util_PlanarToChunky4 (BYTE *dest, const BYTE *src, int width, int height);
|
||||
void ST_Util_DrawBlock (BITMAPINFO *bitmap_info, const BYTE *src, int x, int y, int bytewidth, int height);
|
||||
void ST_Util_ClearBlock (BITMAPINFO *bitmap_info, BYTE fill, int x, int y, int bytewidth, int height);
|
||||
void ST_Util_PlanarToChunky4 (uint8_t *dest, const uint8_t *src, int width, int height);
|
||||
void ST_Util_DrawBlock (BITMAPINFO *bitmap_info, const uint8_t *src, int x, int y, int bytewidth, int height);
|
||||
void ST_Util_ClearBlock (BITMAPINFO *bitmap_info, uint8_t fill, int x, int y, int bytewidth, int height);
|
||||
void ST_Util_InvalidateRect (HWND hwnd, BITMAPINFO *bitmap_info, int left, int top, int right, int bottom);
|
||||
BYTE *ST_Util_LoadFont (const char *filename);
|
||||
void ST_Util_FreeFont (BYTE *font);
|
||||
BITMAPINFO *ST_Util_AllocTextBitmap (const BYTE *font);
|
||||
void ST_Util_DrawTextScreen (BITMAPINFO *bitmap_info, const BYTE *text_screen, const BYTE *font);
|
||||
void ST_Util_UpdateTextBlink (BITMAPINFO *bitmap_info, const BYTE *text_screen, const BYTE *font, bool blink_on);
|
||||
void ST_Util_DrawChar (BITMAPINFO *screen, const BYTE *font, int x, int y, BYTE charnum, BYTE attrib);
|
||||
uint8_t *ST_Util_LoadFont (const char *filename);
|
||||
void ST_Util_FreeFont (uint8_t *font);
|
||||
BITMAPINFO *ST_Util_AllocTextBitmap (const uint8_t *font);
|
||||
void ST_Util_DrawTextScreen (BITMAPINFO *bitmap_info, const uint8_t *text_screen, const uint8_t *font);
|
||||
void ST_Util_UpdateTextBlink (BITMAPINFO *bitmap_info, const uint8_t *text_screen, const uint8_t *font, bool blink_on);
|
||||
void ST_Util_DrawChar (BITMAPINFO *screen, const uint8_t *font, int x, int y, uint8_t charnum, uint8_t attrib);
|
||||
|
||||
// PUBLIC FUNCTION PROTOTYPES ----------------------------------------------
|
||||
|
||||
|
|
@ -650,12 +650,12 @@ FHexenStartupScreen::FHexenStartupScreen(int max_progress, HRESULT &hr)
|
|||
return;
|
||||
}
|
||||
|
||||
NetNotchBits = new BYTE[ST_NETNOTCH_WIDTH / 2 * ST_NETNOTCH_HEIGHT];
|
||||
NetNotchBits = new uint8_t[ST_NETNOTCH_WIDTH / 2 * ST_NETNOTCH_HEIGHT];
|
||||
Wads.ReadLump (netnotch_lump, NetNotchBits);
|
||||
NotchBits = new BYTE[ST_NOTCH_WIDTH / 2 * ST_NOTCH_HEIGHT];
|
||||
NotchBits = new uint8_t[ST_NOTCH_WIDTH / 2 * ST_NOTCH_HEIGHT];
|
||||
Wads.ReadLump (notch_lump, NotchBits);
|
||||
|
||||
BYTE startup_screen[153648];
|
||||
uint8_t startup_screen[153648];
|
||||
union
|
||||
{
|
||||
RGBQUAD color;
|
||||
|
|
@ -805,8 +805,8 @@ FHereticStartupScreen::FHereticStartupScreen(int max_progress, HRESULT &hr)
|
|||
: FGraphicalStartupScreen(max_progress)
|
||||
{
|
||||
int loading_lump = Wads.CheckNumForName ("LOADING");
|
||||
BYTE loading_screen[4000];
|
||||
BYTE *font;
|
||||
uint8_t loading_screen[4000];
|
||||
uint8_t *font;
|
||||
|
||||
hr = E_FAIL;
|
||||
if (loading_lump < 0 || Wads.LumpLength (loading_lump) != 4000 || !ST_Util_CreateStartupWindow())
|
||||
|
|
@ -886,7 +886,7 @@ void FHereticStartupScreen::Progress()
|
|||
|
||||
void FHereticStartupScreen::LoadingStatus(const char *message, int colors)
|
||||
{
|
||||
BYTE *font = ST_Util_LoadFont (TEXT_FONT_NAME);
|
||||
uint8_t *font = ST_Util_LoadFont (TEXT_FONT_NAME);
|
||||
if (font != NULL)
|
||||
{
|
||||
int x;
|
||||
|
|
@ -912,7 +912,7 @@ void FHereticStartupScreen::LoadingStatus(const char *message, int colors)
|
|||
|
||||
void FHereticStartupScreen::AppendStatusLine(const char *status)
|
||||
{
|
||||
BYTE *font = ST_Util_LoadFont (TEXT_FONT_NAME);
|
||||
uint8_t *font = ST_Util_LoadFont (TEXT_FONT_NAME);
|
||||
if (font != NULL)
|
||||
{
|
||||
int x;
|
||||
|
|
@ -979,7 +979,7 @@ FStrifeStartupScreen::FStrifeStartupScreen(int max_progress, HRESULT &hr)
|
|||
if (lumpnum >= 0 && (lumplen = Wads.LumpLength (lumpnum)) == StrifeStartupPicSizes[i])
|
||||
{
|
||||
FWadLump lumpr = Wads.OpenLumpNum (lumpnum);
|
||||
StartupPics[i] = new BYTE[lumplen];
|
||||
StartupPics[i] = new uint8_t[lumplen];
|
||||
lumpr.Read (StartupPics[i], lumplen);
|
||||
}
|
||||
}
|
||||
|
|
@ -1096,8 +1096,8 @@ void ST_Endoom()
|
|||
|
||||
int endoom_lump = Wads.CheckNumForFullName (gameinfo.Endoom, true);
|
||||
|
||||
BYTE endoom_screen[4000];
|
||||
BYTE *font;
|
||||
uint8_t endoom_screen[4000];
|
||||
uint8_t *font;
|
||||
MSG mess;
|
||||
BOOL bRet;
|
||||
bool blinking = false, blinkstate = false;
|
||||
|
|
@ -1273,10 +1273,10 @@ void ST_Util_SizeWindowForBitmap (int scale)
|
|||
//
|
||||
//==========================================================================
|
||||
|
||||
void ST_Util_PlanarToChunky4 (BYTE *dest, const BYTE *src, int width, int height)
|
||||
void ST_Util_PlanarToChunky4 (uint8_t *dest, const uint8_t *src, int width, int height)
|
||||
{
|
||||
int y, x;
|
||||
const BYTE *src1, *src2, *src3, *src4;
|
||||
const uint8_t *src1, *src2, *src3, *src4;
|
||||
size_t plane_size = width / 8 * height;
|
||||
|
||||
src1 = src;
|
||||
|
|
@ -1315,7 +1315,7 @@ void ST_Util_PlanarToChunky4 (BYTE *dest, const BYTE *src, int width, int height
|
|||
//
|
||||
//==========================================================================
|
||||
|
||||
void ST_Util_DrawBlock (BITMAPINFO *bitmap_info, const BYTE *src, int x, int y, int bytewidth, int height)
|
||||
void ST_Util_DrawBlock (BITMAPINFO *bitmap_info, const uint8_t *src, int x, int y, int bytewidth, int height)
|
||||
{
|
||||
if (src == NULL)
|
||||
{
|
||||
|
|
@ -1324,7 +1324,7 @@ void ST_Util_DrawBlock (BITMAPINFO *bitmap_info, const BYTE *src, int x, int y,
|
|||
|
||||
int pitchshift = int(bitmap_info->bmiHeader.biBitCount == 4);
|
||||
int destpitch = bitmap_info->bmiHeader.biWidth >> pitchshift;
|
||||
BYTE *dest = ST_Util_BitsForBitmap(bitmap_info) + (x >> pitchshift) + y * destpitch;
|
||||
uint8_t *dest = ST_Util_BitsForBitmap(bitmap_info) + (x >> pitchshift) + y * destpitch;
|
||||
|
||||
ST_Util_InvalidateRect (StartupScreen, bitmap_info, x, y, x + (bytewidth << pitchshift), y + height);
|
||||
|
||||
|
|
@ -1364,11 +1364,11 @@ void ST_Util_DrawBlock (BITMAPINFO *bitmap_info, const BYTE *src, int x, int y,
|
|||
//
|
||||
//==========================================================================
|
||||
|
||||
void ST_Util_ClearBlock (BITMAPINFO *bitmap_info, BYTE fill, int x, int y, int bytewidth, int height)
|
||||
void ST_Util_ClearBlock (BITMAPINFO *bitmap_info, uint8_t fill, int x, int y, int bytewidth, int height)
|
||||
{
|
||||
int pitchshift = int(bitmap_info->bmiHeader.biBitCount == 4);
|
||||
int destpitch = bitmap_info->bmiHeader.biWidth >> pitchshift;
|
||||
BYTE *dest = ST_Util_BitsForBitmap(bitmap_info) + (x >> pitchshift) + y * destpitch;
|
||||
uint8_t *dest = ST_Util_BitsForBitmap(bitmap_info) + (x >> pitchshift) + y * destpitch;
|
||||
|
||||
ST_Util_InvalidateRect (StartupScreen, bitmap_info, x, y, x + (bytewidth << pitchshift), y + height);
|
||||
|
||||
|
|
@ -1424,9 +1424,9 @@ BITMAPINFO *ST_Util_CreateBitmap (int width, int height, int color_bits)
|
|||
//
|
||||
//==========================================================================
|
||||
|
||||
BYTE *ST_Util_BitsForBitmap (BITMAPINFO *bitmap_info)
|
||||
uint8_t *ST_Util_BitsForBitmap (BITMAPINFO *bitmap_info)
|
||||
{
|
||||
return (BYTE *)bitmap_info + sizeof(BITMAPINFOHEADER) + (sizeof(RGBQUAD) << bitmap_info->bmiHeader.biBitCount);
|
||||
return (uint8_t *)bitmap_info + sizeof(BITMAPINFOHEADER) + (sizeof(RGBQUAD) << bitmap_info->bmiHeader.biBitCount);
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
|
|
@ -1452,7 +1452,7 @@ void ST_Util_FreeBitmap (BITMAPINFO *bitmap_info)
|
|||
|
||||
void ST_Util_BitmapColorsFromPlaypal (BITMAPINFO *bitmap_info)
|
||||
{
|
||||
BYTE playpal[768];
|
||||
uint8_t playpal[768];
|
||||
int i;
|
||||
|
||||
{
|
||||
|
|
@ -1499,10 +1499,10 @@ void ST_Util_InvalidateRect (HWND hwnd, BITMAPINFO *bitmap_info, int left, int t
|
|||
//
|
||||
//==========================================================================
|
||||
|
||||
BYTE *ST_Util_LoadFont (const char *filename)
|
||||
uint8_t *ST_Util_LoadFont (const char *filename)
|
||||
{
|
||||
int lumpnum, lumplen, height;
|
||||
BYTE *font;
|
||||
uint8_t *font;
|
||||
|
||||
lumpnum = Wads.CheckNumForFullName (filename);
|
||||
if (lumpnum < 0)
|
||||
|
|
@ -1519,13 +1519,13 @@ BYTE *ST_Util_LoadFont (const char *filename)
|
|||
{ // let's be reasonable here
|
||||
return NULL;
|
||||
}
|
||||
font = new BYTE[lumplen + 1];
|
||||
font = new uint8_t[lumplen + 1];
|
||||
font[0] = height; // Store font height in the first byte.
|
||||
Wads.ReadLump (lumpnum, font + 1);
|
||||
return font;
|
||||
}
|
||||
|
||||
void ST_Util_FreeFont (BYTE *font)
|
||||
void ST_Util_FreeFont (uint8_t *font)
|
||||
{
|
||||
delete[] font;
|
||||
}
|
||||
|
|
@ -1539,7 +1539,7 @@ void ST_Util_FreeFont (BYTE *font)
|
|||
//
|
||||
//==========================================================================
|
||||
|
||||
BITMAPINFO *ST_Util_AllocTextBitmap (const BYTE *font)
|
||||
BITMAPINFO *ST_Util_AllocTextBitmap (const uint8_t *font)
|
||||
{
|
||||
BITMAPINFO *bitmap = ST_Util_CreateBitmap (80 * 8, 25 * font[0], 4);
|
||||
memcpy (bitmap->bmiColors, TextModePalette, sizeof(TextModePalette));
|
||||
|
|
@ -1555,7 +1555,7 @@ BITMAPINFO *ST_Util_AllocTextBitmap (const BYTE *font)
|
|||
//
|
||||
//==========================================================================
|
||||
|
||||
void ST_Util_DrawTextScreen (BITMAPINFO *bitmap_info, const BYTE *text_screen, const BYTE *font)
|
||||
void ST_Util_DrawTextScreen (BITMAPINFO *bitmap_info, const uint8_t *text_screen, const uint8_t *font)
|
||||
{
|
||||
int x, y;
|
||||
|
||||
|
|
@ -1578,20 +1578,20 @@ void ST_Util_DrawTextScreen (BITMAPINFO *bitmap_info, const BYTE *text_screen, c
|
|||
//
|
||||
//==========================================================================
|
||||
|
||||
void ST_Util_DrawChar (BITMAPINFO *screen, const BYTE *font, int x, int y, BYTE charnum, BYTE attrib)
|
||||
void ST_Util_DrawChar (BITMAPINFO *screen, const uint8_t *font, int x, int y, uint8_t charnum, uint8_t attrib)
|
||||
{
|
||||
const BYTE bg_left = attrib & 0x70;
|
||||
const BYTE fg = attrib & 0x0F;
|
||||
const BYTE fg_left = fg << 4;
|
||||
const BYTE bg = bg_left >> 4;
|
||||
const BYTE color_array[4] = { (BYTE)(bg_left | bg), (BYTE)(attrib & 0x7F), (BYTE)(fg_left | bg), (BYTE)(fg_left | fg) };
|
||||
const BYTE *src = font + 1 + charnum * font[0];
|
||||
const uint8_t bg_left = attrib & 0x70;
|
||||
const uint8_t fg = attrib & 0x0F;
|
||||
const uint8_t fg_left = fg << 4;
|
||||
const uint8_t bg = bg_left >> 4;
|
||||
const uint8_t color_array[4] = { (uint8_t)(bg_left | bg), (uint8_t)(attrib & 0x7F), (uint8_t)(fg_left | bg), (uint8_t)(fg_left | fg) };
|
||||
const uint8_t *src = font + 1 + charnum * font[0];
|
||||
int pitch = screen->bmiHeader.biWidth >> 1;
|
||||
BYTE *dest = ST_Util_BitsForBitmap(screen) + x*4 + y * font[0] * pitch;
|
||||
uint8_t *dest = ST_Util_BitsForBitmap(screen) + x*4 + y * font[0] * pitch;
|
||||
|
||||
for (y = font[0]; y > 0; --y)
|
||||
{
|
||||
BYTE srcbyte = *src++;
|
||||
uint8_t srcbyte = *src++;
|
||||
|
||||
// Pixels 0 and 1
|
||||
dest[0] = color_array[(srcbyte >> 6) & 3];
|
||||
|
|
@ -1614,7 +1614,7 @@ void ST_Util_DrawChar (BITMAPINFO *screen, const BYTE *font, int x, int y, BYTE
|
|||
//
|
||||
//==========================================================================
|
||||
|
||||
void ST_Util_UpdateTextBlink (BITMAPINFO *bitmap_info, const BYTE *text_screen, const BYTE *font, bool on)
|
||||
void ST_Util_UpdateTextBlink (BITMAPINFO *bitmap_info, const uint8_t *text_screen, const uint8_t *font, bool on)
|
||||
{
|
||||
int x, y;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue