Always initialize all column offsets inside multi-patch textures
3964d4e188
This commit is contained in:
parent
d6d0377f6b
commit
64353a043e
1 changed files with 6 additions and 2 deletions
|
|
@ -471,6 +471,12 @@ UINT8 *R_GenerateTexture(size_t texnum)
|
|||
// texture data after the lookup table
|
||||
blocktex = block + (texture->width*4);
|
||||
|
||||
for (x = 0; x < texture->width; ++x)
|
||||
{
|
||||
// generate column ofset lookup
|
||||
*(UINT32 *)&colofs[x<<2] = LONG((x * texture->height) + (texture->width*4));
|
||||
}
|
||||
|
||||
// Composite the columns together.
|
||||
for (i = 0, patch = texture->patches; i < texture->patchcount; i++, patch++)
|
||||
{
|
||||
|
|
@ -546,8 +552,6 @@ UINT8 *R_GenerateTexture(size_t texnum)
|
|||
else
|
||||
patchcol = (column_t *)((UINT8 *)realpatch + LONG(realpatch->columnofs[x-x1]));
|
||||
|
||||
// generate column ofset lookup
|
||||
*(UINT32 *)&colofs[x<<2] = LONG((x * texture->height) + (texture->width*4));
|
||||
ColumnDrawerPointer(patchcol, block + LONG(*(UINT32 *)&colofs[x<<2]), patch, texture->height, height);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue