1
0
Fork 0
forked from fte/fteqw

Don't bother trying to use a couple of SDL pixel formats. Too paranoid.

git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@5854 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
Spoike 2021-05-13 10:17:35 +00:00
parent cdbf3614a3
commit 4507c7c8b4
2 changed files with 9 additions and 8 deletions

View file

@ -8854,7 +8854,7 @@ static void Image_Tr_8888to1555(struct pendingtextureinfo *mips, int bgra)
} }
} }
static void Image_Tr_8888to5551(struct pendingtextureinfo *mips, int bgra) static void Image_Tr_8888to5551(struct pendingtextureinfo *mips, int bgra) //zomg
{ {
unsigned int mip; unsigned int mip;
for (mip = 0; mip < mips->mipcount; mip++) for (mip = 0; mip < mips->mipcount; mip++)
@ -12057,9 +12057,10 @@ static struct
{PTI_BGRA8, PTI_RGB565, Image_Tr_8888to565, true, true}, {PTI_BGRA8, PTI_RGB565, Image_Tr_8888to565, true, true},
{PTI_RGBX8, PTI_L8, Image_Tr_8888toLuminence, 1, true}, {PTI_RGBX8, PTI_L8, Image_Tr_8888toLuminence, 1, true},
{PTI_RGBA8, PTI_L8A8, Image_Tr_8888toLuminence, 2, true}, {PTI_RGBA8, PTI_L8A8, Image_Tr_8888toLuminence, 2, true},
//FIXME: these don't pad alphas properly.
{PTI_RGBX8, PTI_RGBA8, Image_Tr_NoTransform}, {PTI_RGBX8, PTI_RGBA8, Image_Tr_NoTransform},
{PTI_BGRX8, PTI_BGRA8, Image_Tr_NoTransform}, {PTI_BGRX8, PTI_BGRA8, Image_Tr_NoTransform},
{PTI_LLLX8, PTI_RGBA5551, Image_Tr_8888to5551, false, true}, {PTI_LLLX8, PTI_RGBA5551, Image_Tr_8888to5551, false, true},
{PTI_RGBX8, PTI_RGBA5551, Image_Tr_8888to5551, false, true}, {PTI_RGBX8, PTI_RGBA5551, Image_Tr_8888to5551, false, true},
{PTI_BGRX8, PTI_RGBA5551, Image_Tr_8888to5551, true, true}, {PTI_BGRX8, PTI_RGBA5551, Image_Tr_8888to5551, true, true},

View file

@ -3069,13 +3069,13 @@ static void ImgTool_View(const char *inname, struct pendingtextureinfo *in)
case SDL_PIXELFORMAT_RGB24: outformats[PTI_BGR8] = true; break; case SDL_PIXELFORMAT_RGB24: outformats[PTI_BGR8] = true; break;
// case SDL_PIXELFORMAT_ARGB32: outformats[PTI_ARGB8] = true; break; // case SDL_PIXELFORMAT_ARGB32: outformats[PTI_ARGB8] = true; break;
// case SDL_PIXELFORMAT_ABGR32: outformats[PTI_ABGR8] = true; break; // case SDL_PIXELFORMAT_ABGR32: outformats[PTI_ABGR8] = true; break;
#if SDL_BYTEORDER == SDL_BIG_ENDIAN /*#if SDL_BYTEORDER == SDL_BIG_ENDIAN
case SDL_PIXELFORMAT_RGBX8888: outformats[PTI_RGBX8] = true; break; case SDL_PIXELFORMAT_RGBX8888: outformats[PTI_RGBX8] = true; break;
case SDL_PIXELFORMAT_BGRX8888: outformats[PTI_BGRX8] = true; break; case SDL_PIXELFORMAT_BGRX8888: outformats[PTI_BGRX8] = true; break;
#else #else
//case SDL_PIXELFORMAT_XBGR8888: outformats[PTI_RGBX8] = true; break; case SDL_PIXELFORMAT_XBGR8888: outformats[PTI_RGBX8] = true; break;
//case SDL_PIXELFORMAT_XRGB8888: outformats[PTI_BGRX8] = true; break; case SDL_PIXELFORMAT_XRGB8888: outformats[PTI_BGRX8] = true; break;
#endif #endif*/
} }
} }
@ -3101,13 +3101,13 @@ static void ImgTool_View(const char *inname, struct pendingtextureinfo *in)
case PTI_BGRA8: sdlfmt = SDL_PIXELFORMAT_BGRA32; break; case PTI_BGRA8: sdlfmt = SDL_PIXELFORMAT_BGRA32; break;
case PTI_RGB8: sdlfmt = SDL_PIXELFORMAT_RGB24; break; case PTI_RGB8: sdlfmt = SDL_PIXELFORMAT_RGB24; break;
case PTI_BGR8: sdlfmt = SDL_PIXELFORMAT_BGR24; break; case PTI_BGR8: sdlfmt = SDL_PIXELFORMAT_BGR24; break;
#if SDL_BYTEORDER == SDL_BIG_ENDIAN /*#if SDL_BYTEORDER == SDL_BIG_ENDIAN
case PTI_RGBX8: sdlfmt = SDL_PIXELFORMAT_RGBX8888; break; case PTI_RGBX8: sdlfmt = SDL_PIXELFORMAT_RGBX8888; break;
case PTI_BGRX8: sdlfmt = SDL_PIXELFORMAT_BGRX8888; break; case PTI_BGRX8: sdlfmt = SDL_PIXELFORMAT_BGRX8888; break;
#else #else
case PTI_RGBX8: sdlfmt = SDL_PIXELFORMAT_XBGR8888; break; case PTI_RGBX8: sdlfmt = SDL_PIXELFORMAT_XBGR8888; break;
case PTI_BGRX8: sdlfmt = SDL_PIXELFORMAT_XRGB8888; break; case PTI_BGRX8: sdlfmt = SDL_PIXELFORMAT_XRGB8888; break;
#endif #endif*/
default: sdlfmt = SDL_PIXELFORMAT_UNKNOWN; break; //shouldn't happen. default: sdlfmt = SDL_PIXELFORMAT_UNKNOWN; break; //shouldn't happen.
} }