Merge branch 'master' into jgrpp

Remove 'byte' typedef
This commit is contained in:
Jonathan G Rennison
2024-05-07 17:21:50 +01:00
376 changed files with 2220 additions and 2152 deletions

View File

@@ -199,7 +199,7 @@ static bool CreateMainSurface(uint w, uint h)
_allegro_screen = create_bitmap_ex(bpp, screen->cr - screen->cl, screen->cb - screen->ct);
_screen.width = _allegro_screen->w;
_screen.height = _allegro_screen->h;
_screen.pitch = ((byte*)screen->line[1] - (byte*)screen->line[0]) / (bpp / 8);
_screen.pitch = ((uint8_t*)screen->line[1] - (uint8_t*)screen->line[0]) / (bpp / 8);
_screen.dst_ptr = _allegro_screen->line[0];
/* Initialise the screen so we don't blit garbage to the screen */
@@ -246,8 +246,8 @@ std::vector<int> VideoDriver_Allegro::GetListOfMonitorRefreshRates()
struct AllegroVkMapping {
uint16_t vk_from;
byte vk_count;
byte map_to;
uint8_t vk_count;
uint8_t map_to;
};
#define AS(x, z) {x, 0, z}

View File

@@ -134,7 +134,7 @@
struct CocoaVkMapping {
unsigned short vk_from;
byte map_to;
uint8_t map_to;
};
#define AS(x, z) {x, z}

View File

@@ -108,7 +108,7 @@ const char *VideoDriver_Dedicated::Start(const StringList &)
this->UpdateAutoResolution();
int bpp = BlitterFactory::GetCurrentBlitter()->GetScreenDepth();
_dedicated_video_mem = (bpp == 0) ? nullptr : MallocT<byte>(static_cast<size_t>(_cur_resolution.width) * _cur_resolution.height * (bpp / 8));
_dedicated_video_mem = (bpp == 0) ? nullptr : MallocT<uint8_t>(static_cast<size_t>(_cur_resolution.width) * _cur_resolution.height * (bpp / 8));
_screen.width = _screen.pitch = _cur_resolution.width;
_screen.height = _cur_resolution.height;

View File

@@ -196,8 +196,8 @@ static bool IsOpenGLExtensionSupported(const char *extension)
return false;
}
static byte _gl_major_ver = 0; ///< Major OpenGL version.
static byte _gl_minor_ver = 0; ///< Minor OpenGL version.
static uint8_t _gl_major_ver = 0; ///< Major OpenGL version.
static uint8_t _gl_minor_ver = 0; ///< Minor OpenGL version.
/**
* Check if the current OpenGL version is equal or higher than a given one.
@@ -206,7 +206,7 @@ static byte _gl_minor_ver = 0; ///< Minor OpenGL version.
* @pre OpenGL was initialized.
* @return True if the OpenGL version is equal or higher than the requested one.
*/
bool IsOpenGLVersionAtLeast(byte major, byte minor)
bool IsOpenGLVersionAtLeast(uint8_t major, uint8_t minor)
{
return (_gl_major_ver > major) || (_gl_major_ver == major && _gl_minor_ver >= minor);
}
@@ -947,10 +947,10 @@ bool OpenGLBackend::Resize(int w, int h, bool force)
}
} else if (bpp == 8) {
if (_glClearBufferSubData != nullptr) {
byte b = 0;
uint8_t b = 0;
_glClearBufferSubData(GL_PIXEL_UNPACK_BUFFER, GL_R8, 0, line_pixel_count, GL_RED, GL_UNSIGNED_BYTE, &b);
} else {
ClearPixelBuffer<byte>(line_pixel_count, 0);
ClearPixelBuffer<uint8_t>(line_pixel_count, 0);
}
}
@@ -978,10 +978,10 @@ bool OpenGLBackend::Resize(int w, int h, bool force)
/* Initialize buffer as 0 == no remap. */
if (_glClearBufferSubData != nullptr) {
byte b = 0;
uint8_t b = 0;
_glClearBufferSubData(GL_PIXEL_UNPACK_BUFFER, GL_R8, 0, line_pixel_count, GL_RED, GL_UNSIGNED_BYTE, &b);
} else {
ClearPixelBuffer<byte>(line_pixel_count, 0);
ClearPixelBuffer<uint8_t>(line_pixel_count, 0);
}
_glBindTexture(GL_TEXTURE_2D, this->anim_texture);

View File

@@ -19,7 +19,7 @@
typedef void (*OGLProc)();
typedef OGLProc (*GetOGLProcAddressProc)(const char *proc);
bool IsOpenGLVersionAtLeast(byte major, byte minor);
bool IsOpenGLVersionAtLeast(uint8_t major, uint8_t minor);
const char *FindStringInExtensionList(const char *string, const char *substring);
class OpenGLSprite;

View File

@@ -57,9 +57,9 @@ bool VideoDriver_Win32Base::ClaimMousePointer()
}
struct Win32VkMapping {
byte vk_from;
byte vk_count;
byte map_to;
uint8_t vk_from;
uint8_t vk_count;
uint8_t map_to;
};
#define AS(x, z) {x, 0, z}