idk anymore lel
This commit is contained in:
1 parent
d2f996ebaf
commit
6ebc6412e4
3 files changed
+14
-27
No files matched your search
+3
-11
@@ -314,6 +314,7 @@ static void HWR_GenerateTexture(INT32 texnum, GLMapTexture_t *gltex, boolean noe
|
||||
texture_t *texture;
|
||||
texpatch_t *patch;
|
||||
softwarepatch_t *realpatch;
|
||||
UINT8 *pdata;
|
||||
INT32 blockwidth, blockheight, blocksize;
|
||||
|
||||
UINT8 *colormap = colormaps;
|
||||
@@ -377,12 +378,8 @@ static void HWR_GenerateTexture(INT32 texnum, GLMapTexture_t *gltex, boolean noe
|
||||
// Composite the columns together.
|
||||
for (i = 0, patch = texture->patches; i < texture->patchcount; i++, patch++)
|
||||
{
|
||||
// If this patch has already been loaded, we just use it from the cache.
|
||||
realpatch = (softwarepatch_t *)W_GetCachedPatchNumPwad(patch->wad, patch->lump);
|
||||
|
||||
// Otherwise, we load it here.
|
||||
if (realpatch == NULL)
|
||||
realpatch = (softwarepatch_t *)W_CacheLumpNumPwad(patch->wad, patch->lump, PU_CACHE);
|
||||
pdata = W_CacheLumpNumPwad(patch->wad, patch->lump, PU_CACHE);
|
||||
realpatch = (softwarepatch_t *)pdata;
|
||||
|
||||
if (realpatch != NULL)
|
||||
{
|
||||
@@ -516,10 +513,6 @@ void HWR_FreeTextureColormaps(patch_t *patch)
|
||||
|
||||
// Set the first colormap to the one that comes after it.
|
||||
next = pat->mipmap->nextcolormap;
|
||||
|
||||
if (!next)
|
||||
break;
|
||||
|
||||
pat->mipmap->nextcolormap = next->nextcolormap;
|
||||
|
||||
// Free image data from memory.
|
||||
@@ -1233,7 +1226,6 @@ void HWR_GetFadeMask(lumpnum_t fademasklumpnum)
|
||||
patch = HWR_GetCachedGLPatch(fademasklumpnum);
|
||||
glMipmap = ((GLPatch_t *)Patch_AllocateHardwarePatch(patch))->mipmap;
|
||||
|
||||
|
||||
if (!glMipmap->downloaded && !glMipmap->data)
|
||||
HWR_CacheFadeMask(glMipmap, fademasklumpnum);
|
||||
|
||||
|
||||
+9
-14
@@ -304,6 +304,7 @@ static UINT8 *R_GenerateTexture(size_t texnum)
|
||||
texture_t *texture;
|
||||
texpatch_t *patch;
|
||||
softwarepatch_t *realpatch;
|
||||
UINT8 *pdata;
|
||||
int x, x1, x2, i, width, height;
|
||||
size_t blocksize;
|
||||
column_t *patchcol;
|
||||
@@ -323,8 +324,8 @@ static UINT8 *R_GenerateTexture(size_t texnum)
|
||||
{
|
||||
boolean holey = false;
|
||||
patch = texture->patches;
|
||||
|
||||
realpatch = (softwarepatch_t *)W_CacheLumpNumPwad(patch->wad, patch->lump, PU_CACHE);
|
||||
pdata = W_CacheLumpNumPwad(patch->wad, patch->lump, PU_CACHE);
|
||||
realpatch = (softwarepatch_t *)pdata;
|
||||
|
||||
// Check the patch for holes.
|
||||
if (texture->width > SHORT(realpatch->width) || texture->height > SHORT(realpatch->height))
|
||||
@@ -394,12 +395,8 @@ static UINT8 *R_GenerateTexture(size_t texnum)
|
||||
// Composite the columns together.
|
||||
for (i = 0, patch = texture->patches; i < texture->patchcount; i++, patch++)
|
||||
{
|
||||
// If this patch has already been loaded, we just use it from the cache.
|
||||
realpatch = (softwarepatch_t *)W_GetCachedPatchNumPwad(patch->wad, patch->lump);
|
||||
|
||||
// Otherwise, we load it here.
|
||||
if (realpatch == NULL)
|
||||
realpatch = (softwarepatch_t *)W_CacheLumpNumPwad(patch->wad, patch->lump, PU_CACHE);
|
||||
pdata = W_CacheLumpNumPwad(patch->wad, patch->lump, PU_CACHE);
|
||||
realpatch = (softwarepatch_t *)pdata;
|
||||
|
||||
// Well, it's not valid...
|
||||
if (realpatch == NULL)
|
||||
@@ -519,7 +516,7 @@ Rloadtextures (INT32 i, INT32 w)
|
||||
UINT16 j;
|
||||
INT32 k;
|
||||
UINT16 texstart, texend, texturesLumpPos;
|
||||
patch_t *patchlump;
|
||||
softwarepatch_t patchlump;
|
||||
texpatch_t *patch;
|
||||
texture_t *texture;
|
||||
|
||||
@@ -558,7 +555,7 @@ Rloadtextures (INT32 i, INT32 w)
|
||||
continue; // If it is then SKIP IT
|
||||
}
|
||||
|
||||
patchlump = W_CacheLumpNumPwad(wadnum, lumpnum, PU_STATIC);
|
||||
W_ReadLumpHeaderPwad(wadnum, lumpnum, &patchlump, 8, 0);
|
||||
|
||||
//CONS_Printf("\n\"%s\" is a single patch, dimensions %d x %d",W_CheckNameForNumPwad((UINT16)w,texstart+j),patchlump->width, patchlump->height);
|
||||
texture = textures[i] = Z_Calloc(sizeof(texture_t) + sizeof(texpatch_t), PU_STATIC, NULL);
|
||||
@@ -566,8 +563,8 @@ Rloadtextures (INT32 i, INT32 w)
|
||||
// Set texture properties.
|
||||
M_Memcpy(texture->name, W_CheckNameForNumPwad((UINT16)w, texstart + j), sizeof(texture->name));
|
||||
texture->hash = quickncasehash(texture->name, 8);
|
||||
texture->width = patchlump->width;
|
||||
texture->height = patchlump->height;
|
||||
texture->width = SHORT(patchlump.width);
|
||||
texture->height = SHORT(patchlump.height);
|
||||
texture->patchcount = 1;
|
||||
texture->holes = false;
|
||||
|
||||
@@ -578,8 +575,6 @@ Rloadtextures (INT32 i, INT32 w)
|
||||
patch->wad = (UINT16)w;
|
||||
patch->lump = texstart + j;
|
||||
|
||||
Z_Free(patchlump);
|
||||
|
||||
k = 1;
|
||||
while (k << 1 <= texture->width)
|
||||
k <<= 1;
|
||||
|
||||
+2
-2
@@ -217,8 +217,8 @@ void ST_UnloadGraphics(void)
|
||||
void ST_LoadGraphics(void)
|
||||
{
|
||||
// SRB2 border patch
|
||||
st_borderpatchnum = W_GetNumForName("GFZFLR01");
|
||||
scr_borderpatch = W_CacheLumpNum(st_borderpatchnum, PU_HUDGFX);
|
||||
//st_borderpatchnum = W_GetNumForName("GFZFLR01");
|
||||
//scr_borderpatch = W_CacheLumpNum(st_borderpatchnum, PU_HUDGFX);
|
||||
|
||||
// the original Doom uses 'STF' as base name for all face graphics
|
||||
// Graue 04-08-2004: face/name graphics are now indexed by skins
|
||||
|
||||
Reference in new issue
Block a user