mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-01-17 23:21:22 +00:00
Added FLIPX support for single patch textures with holes
This completes FLIPX/FLIPY support for all textures
This commit is contained in:
parent
52a84cf309
commit
84f3102ad0
1 changed files with 8 additions and 0 deletions
|
@ -289,6 +289,14 @@ static UINT8 *R_GenerateTexture(size_t texnum)
|
|||
colofs = (UINT32 *)(void *)(block + 8);
|
||||
texturecolumnofs[texnum] = colofs;
|
||||
blocktex = block;
|
||||
if (patch->flip & 1) // flip the patch horizontally
|
||||
{
|
||||
UINT32 *realcolofs = (UINT32 *)realpatch->columnofs;
|
||||
for (x = 0; x < texture->width; x++)
|
||||
colofs[x] = realcolofs[texture->width-1-x]; // swap with the offset of the other side of the texture
|
||||
}
|
||||
// we can't as easily flip the patch vertically sadly though,
|
||||
// we have wait until the texture itself is drawn to do that
|
||||
for (x = 0; x < texture->width; x++)
|
||||
colofs[x] = LONG(LONG(colofs[x]) + 3);
|
||||
goto done;
|
||||
|
|
Loading…
Reference in a new issue