diff --git a/src/hardware/hw_cache.c b/src/hardware/hw_cache.c index d45d20887..467a801e1 100644 --- a/src/hardware/hw_cache.c +++ b/src/hardware/hw_cache.c @@ -881,11 +881,17 @@ static void HWR_CacheFlat(GLMipmap_t *glMipmap, lumpnum_t flatlumpnum) size_t steppy; #endif size_t size, pflatsize; + const char *flatname = W_CheckNameForNum(flatlumpnum); // setup the texture info glMipmap->format = GL_TEXFMT_P_8; glMipmap->flags = TF_WRAPXY|TF_CHROMAKEYED; + if (UNLIKELY(memcmp(flatname, "GBA_RRF5", 8) == 0 && flatname[8] == 0)) + { + glMipmap->flags &= ~TF_CHROMAKEYED; + } + size = W_LumpLength(flatlumpnum); switch (size) @@ -913,8 +919,7 @@ static void HWR_CacheFlat(GLMipmap_t *glMipmap, lumpnum_t flatlumpnum) break; } - glMipmap->width = (UINT16)pflatsize; - glMipmap->height = (UINT16)pflatsize; + glMipmap->width = glMipmap->height = (UINT16)pflatsize; // the flat raw data needn't be converted with palettized textures W_ReadLump(flatlumpnum, Z_Malloc(size, PU_HWRCACHE, &glMipmap->data)); diff --git a/src/r_skins.c b/src/r_skins.c index 6bda9e263..f74a11e2d 100644 --- a/src/r_skins.c +++ b/src/r_skins.c @@ -684,7 +684,7 @@ next_token: // skip to end of this skin's frames lastlump = lump; - while (W_CheckNameForNumPwad(wadnum,lastlump) && memcmp(W_CheckNameForNumPwad(wadnum, lastlump),csprname,4)==0) + while (W_CheckNameForNumPwad(wadnum, lastlump) && memcmp(W_CheckNameForNumPwad(wadnum, lastlump), csprname,4)==0) lastlump++; // allocate (or replace) sprite frames, and set spritedef R_AddSingleSpriteDef(csprname, &skin->spritedef, wadnum, lump, lastlump); @@ -711,10 +711,10 @@ next_token: UINT16 localllump = 0, lstart = UINT16_MAX, lend = UINT16_MAX; const char *lname; - while ((lname = W_CheckNameForNumPwad(wadnum,localllump))) + while ((lname = W_CheckNameForNumPwad(wadnum, localllump))) { // If this is a valid sprite... - if (!memcmp(lname,sprname,4) && lname[4] && lname[5] && lname[5] >= '0' && lname[5] <= '8') + if (!memcmp(lname, sprname,4) && lname[4] && lname[5] && lname[5] >= '0' && lname[5] <= '8') { if (lstart == UINT16_MAX) lstart = localllump;