Merge branch 'Saturn-Next' into Saturn-Testing
This commit is contained in:
commit
2e054d8bec
4 files changed
+17
-28
No files matched your search
@@ -319,7 +319,7 @@ static void HWR_GenerateTexture(INT32 texnum, GLMapTexture_t *gltex, boolean noe
|
||||
patch_t *realpatch;
|
||||
INT32 blockwidth, blockheight, blocksize;
|
||||
|
||||
INT32 i;
|
||||
INT32 i, idx;
|
||||
boolean skyspecial = false; //poor hack for Legacy large skies..
|
||||
|
||||
RGBA_t *palette;
|
||||
@@ -368,12 +368,10 @@ static void HWR_GenerateTexture(INT32 texnum, GLMapTexture_t *gltex, boolean noe
|
||||
|
||||
col = palette[HWR_CHROMAKEY_EQUIVALENTCOLORINDEX];
|
||||
|
||||
for (j = 0; j < blockheight; j++)
|
||||
for (idx = 0, j = 0; j < blockheight; j++)
|
||||
{
|
||||
for (i = 0; i < blockwidth; i++)
|
||||
for (i = 0; i < blockwidth; i++, idx++)
|
||||
{
|
||||
int idx = (j*blockwidth+i);
|
||||
|
||||
block[4*idx+0] = col.s.red;
|
||||
block[4*idx+1] = col.s.green;
|
||||
block[4*idx+2] = col.s.blue;
|
||||
|
||||
@@ -1604,6 +1604,7 @@ static void GL_UpdateTexture(GLMipmap_t *pTexInfo)
|
||||
|
||||
INT32 w = pTexInfo->width, h = pTexInfo->height;
|
||||
INT32 i, j;
|
||||
INT32 idx;
|
||||
|
||||
const GLubyte *pImgData = (const GLubyte *)pTexInfo->data;
|
||||
const GLvoid *ptex = NULL;
|
||||
@@ -1632,18 +1633,13 @@ static void GL_UpdateTexture(GLMipmap_t *pTexInfo)
|
||||
|
||||
const int chromakeyed = (pTexInfo->flags & TF_CHROMAKEYED);
|
||||
|
||||
for (j = 0; j < h; j++)
|
||||
for (idx = 0, j = 0; j < h; j++)
|
||||
{
|
||||
for (i = 0; i < w; i++)
|
||||
for (i = 0; i < w; i++, idx++)
|
||||
{
|
||||
int idx = (w*j+i);
|
||||
|
||||
if (chromakeyed && (*pImgData == HWR_PATCHES_CHROMAKEY_COLORINDEX))
|
||||
{
|
||||
tex[idx].s.red = 0;
|
||||
tex[idx].s.green = 0;
|
||||
tex[idx].s.blue = 0;
|
||||
tex[idx].s.alpha = 0;
|
||||
tex[idx].s = (byteColor_t){0, 0, 0, 0};
|
||||
pTexInfo->flags |= TF_TRANSPARENT; // there is a hole in it
|
||||
}
|
||||
else
|
||||
@@ -1672,12 +1668,10 @@ static void GL_UpdateTexture(GLMipmap_t *pTexInfo)
|
||||
ptex = tex = textureBuffer;
|
||||
texformat = GL_LUMINANCE_ALPHA;
|
||||
|
||||
for (j = 0; j < h; j++)
|
||||
for (idx = 0, j = 0; j < h; j++)
|
||||
{
|
||||
for (i = 0; i < w; i++)
|
||||
for (i = 0; i < w; i++, idx++)
|
||||
{
|
||||
int idx = (w*j+i);
|
||||
|
||||
tex[idx].s.red = *pImgData;
|
||||
tex[idx].s.green = *pImgData;
|
||||
tex[idx].s.blue = *pImgData;
|
||||
@@ -1692,17 +1686,13 @@ static void GL_UpdateTexture(GLMipmap_t *pTexInfo)
|
||||
ptex = tex = textureBuffer;
|
||||
texformat = GL_ALPHA;
|
||||
|
||||
for (j = 0; j < h; j++)
|
||||
{
|
||||
for (i = 0; i < w; i++)
|
||||
{
|
||||
int idx = (w*j+i);
|
||||
memset(&tex->s, 255, sizeof(byteColor_t)*w*h); // 255 because the fade mask is modulated with the screen texture, so alpha affects it while the colours don't
|
||||
|
||||
tex[idx].s.red = 255; // 255 because the fade mask is modulated with the screen texture, so alpha affects it while the colours don't
|
||||
tex[idx].s.green = 255;
|
||||
tex[idx].s.blue = 255;
|
||||
tex[idx].s.alpha = *pImgData;
|
||||
pImgData++;
|
||||
for (idx = 0, j = 0; j < h; j++)
|
||||
{
|
||||
for (i = 0; i < w; i++, idx++)
|
||||
{
|
||||
tex[idx].s.alpha = *pImgData++;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#include "qs22j.h"
|
||||
|
||||
#define INSORTTHRESH 5 // if n < this use insertion sort
|
||||
|
||||
+1
-1
@@ -2037,7 +2037,7 @@ void S_InitMapMusic(void)
|
||||
{
|
||||
char *maptitle = G_BuildMapTitle(gamemap);
|
||||
// for some reason, occasionally the title screen music doesent seem to be reset in time, so skipping the intro may make it just continue playing it instead, weird..
|
||||
skipintromus = (stricmp(music_name, "titles") != 0) && (maptitle && (stricmp(maptitle, "Wandering Falls") != 0)); // thanks diggle!
|
||||
skipintromus = gamestate == GS_LEVEL && (stricmp(music_name, "titles") != 0) && (maptitle && (stricmp(maptitle, "Wandering Falls") != 0)); // thanks diggle!
|
||||
if (maptitle)
|
||||
Z_Free(maptitle);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user