[Scummvm-git-logs] scummvm master -> 92efa8bdcc891f2fcd7b6f1f34193acc0de77528
aquadran
noreply at scummvm.org
Mon Nov 29 19:43:15 UTC 2021
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
92efa8bdcc GRIM: Attempt to fix AmigaOS4 compilation.
Commit: 92efa8bdcc891f2fcd7b6f1f34193acc0de77528
https://github.com/scummvm/scummvm/commit/92efa8bdcc891f2fcd7b6f1f34193acc0de77528
Author: PaweÅ KoÅodziejski (aquadran at gmail.com)
Date: 2021-11-29T20:43:09+01:00
Commit Message:
GRIM: Attempt to fix AmigaOS4 compilation.
Changed paths:
engines/grim/gfx_opengl.cpp
diff --git a/engines/grim/gfx_opengl.cpp b/engines/grim/gfx_opengl.cpp
index 8154cd99e0..0a76ce0f8b 100644
--- a/engines/grim/gfx_opengl.cpp
+++ b/engines/grim/gfx_opengl.cpp
@@ -1094,7 +1094,7 @@ void GfxOpenGL::createBitmap(BitmapData *bitmap) {
glGenTextures(bitmap->_numTex * bitmap->_numImages, textures);
byte *texData = nullptr;
- const byte *texOut = nullptr;
+ byte *texOut = nullptr;
GLint format = GL_RGBA;
GLint type = GL_UNSIGNED_BYTE;
@@ -1114,7 +1114,7 @@ void GfxOpenGL::createBitmap(BitmapData *bitmap) {
texData = new byte[bytes * bitmap->_width * bitmap->_height];
// Convert data to 32-bit RGBA format
byte *texDataPtr = texData;
- const uint16 *bitmapData = reinterpret_cast<const uint16 *>(bitmap->getImageData(pic).getPixels());
+ uint16 *bitmapData = (uint16 *)const_cast<void *>(bitmap->getImageData(pic).getPixels());
for (int i = 0; i < bitmap->_width * bitmap->_height; i++, texDataPtr += bytes, bitmapData++) {
uint16 pixel = *bitmapData;
int r = pixel >> 11;
@@ -1133,9 +1133,9 @@ void GfxOpenGL::createBitmap(BitmapData *bitmap) {
texOut = texData;
} else if (bitmap->_format == 1 && bitmap->_colorFormat == BM_RGB1555) {
bitmap->convertToColorFormat(pic, Graphics::PixelFormat(4, 8, 8, 8, 8, 0, 8, 16, 24));
- texOut = (const byte *)bitmap->getImageData(pic).getPixels();
+ texOut = (byte *)const_cast<void *>(bitmap->getImageData(pic).getPixels());
} else {
- texOut = (const byte *)bitmap->getImageData(pic).getPixels();
+ texOut = (byte *)const_cast<void *>(bitmap->getImageData(pic).getPixels());
}
for (int i = 0; i < bitmap->_numTex; i++) {
More information about the Scummvm-git-logs
mailing list