From 62a186697df33c96dc1a6dac0f4dfc38652fb96f Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sun, 26 Dec 2021 16:39:04 +0300 Subject: BYTE -> uint8_t --- plugins/MenuItemEx/src/images.cpp | 28 ++++++++++++++-------------- plugins/MenuItemEx/src/main.cpp | 4 ++-- 2 files changed, 16 insertions(+), 16 deletions(-) (limited to 'plugins/MenuItemEx/src') diff --git a/plugins/MenuItemEx/src/images.cpp b/plugins/MenuItemEx/src/images.cpp index 4d2189a8d9..aa1b7ab5bb 100644 --- a/plugins/MenuItemEx/src/images.cpp +++ b/plugins/MenuItemEx/src/images.cpp @@ -7,7 +7,7 @@ void HalfBitmap32Alpha(HBITMAP hBitmap) { BITMAP bmp; DWORD dwLen; - BYTE *p; + uint8_t *p; int x, y; GetObject(hBitmap, sizeof(bmp), &bmp); @@ -16,7 +16,7 @@ void HalfBitmap32Alpha(HBITMAP hBitmap) return; dwLen = bmp.bmWidth * bmp.bmHeight * (bmp.bmBitsPixel / 8); - p = (BYTE *)malloc(dwLen); + p = (uint8_t *)malloc(dwLen); if (p == nullptr) return; memset(p, 0, dwLen); @@ -24,7 +24,7 @@ void HalfBitmap32Alpha(HBITMAP hBitmap) GetBitmapBits(hBitmap, dwLen, p); for (y = 0; y < bmp.bmHeight; ++y) { - BYTE *px = p + bmp.bmWidth * 4 * y; + uint8_t *px = p + bmp.bmWidth * 4 * y; for (x = 0; x < bmp.bmWidth; ++x) { @@ -44,7 +44,7 @@ void HalfBitmap32Alpha(HBITMAP hBitmap) //{ // BITMAP bmp; // DWORD dwLen; -// BYTE *p; +// uint8_t *p; // // GetObject(hBitmap, sizeof(bmp), &bmp); // @@ -52,7 +52,7 @@ void HalfBitmap32Alpha(HBITMAP hBitmap) // return; // // dwLen = bmp.bmWidth * bmp.bmHeight * (bmp.bmBitsPixel / 8); -// p = (BYTE *)malloc(dwLen); +// p = (uint8_t *)malloc(dwLen); // if (p == NULL) // return; // @@ -68,7 +68,7 @@ void CorrectBitmap32Alpha(HBITMAP hBitmap, BOOL force) { BITMAP bmp; DWORD dwLen; - BYTE *p; + uint8_t *p; int x, y; BOOL fixIt; @@ -78,7 +78,7 @@ void CorrectBitmap32Alpha(HBITMAP hBitmap, BOOL force) return; dwLen = bmp.bmWidth * bmp.bmHeight * (bmp.bmBitsPixel / 8); - p = (BYTE *)malloc(dwLen); + p = (uint8_t *)malloc(dwLen); if (p == nullptr) return; memset(p, 0, dwLen); @@ -87,7 +87,7 @@ void CorrectBitmap32Alpha(HBITMAP hBitmap, BOOL force) fixIt = TRUE; for (y = 0; fixIt && y < bmp.bmHeight; ++y) { - BYTE *px = p + bmp.bmWidth * 4 * y; + uint8_t *px = p + bmp.bmWidth * 4 * y; for (x = 0; fixIt && x < bmp.bmWidth; ++x) { @@ -114,16 +114,16 @@ void CorrectBitmap32Alpha(HBITMAP hBitmap, BOOL force) HBITMAP CopyBitmapTo32(HBITMAP hBitmap) { - BYTE * ptPixels; + uint8_t * ptPixels; BITMAP bmp; DWORD dwLen; - BYTE *p; + uint8_t *p; GetObject(hBitmap, sizeof(bmp), &bmp); dwLen = bmp.bmWidth * bmp.bmHeight * 4; - p = (BYTE *)malloc(dwLen); + p = (uint8_t *)malloc(dwLen); if (p == nullptr) return nullptr; @@ -219,8 +219,8 @@ BOOL MakeBitmap32(HBITMAP *hBitmap) //BOOL MakeGrayscale(HBITMAP *hBitmap) //{ -// BYTE *p = NULL; -// BYTE *p1; +// uint8_t *p = NULL; +// uint8_t *p1; // DWORD dwLen; // int width, height, x, y; // BITMAP bmp; @@ -230,7 +230,7 @@ BOOL MakeBitmap32(HBITMAP *hBitmap) // height = bmp.bmHeight; // // dwLen = width * height * 4; -// p = (BYTE *)malloc(dwLen); +// p = (uint8_t *)malloc(dwLen); // if (p == NULL) // { // return FALSE; diff --git a/plugins/MenuItemEx/src/main.cpp b/plugins/MenuItemEx/src/main.cpp index 34dd3e21d9..36070f45b1 100644 --- a/plugins/MenuItemEx/src/main.cpp +++ b/plugins/MenuItemEx/src/main.cpp @@ -95,7 +95,7 @@ CMPlugin::CMPlugin() : struct ModSetLinkLinkItem { // code from dbe++ plugin by Bio char *name; - BYTE *next; //struct ModSetLinkLinkItem + uint8_t *next; //struct ModSetLinkLinkItem }; struct ModuleSettingLL @@ -122,7 +122,7 @@ static int enumModulesSettingsProc(const char *szName, void *lParam) else { struct ModSetLinkLinkItem *item = (struct ModSetLinkLinkItem *)malloc(sizeof(struct ModSetLinkLinkItem)); if (!item) return 1; - msll->last->next = (BYTE*)item; + msll->last->next = (uint8_t*)item; msll->last = (struct ModSetLinkLinkItem *)item; item->name = _strdup(szName); item->next = nullptr; -- cgit v1.2.3