mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-11-24 21:31:46 +00:00
Delete Patch_GetColumn
This commit is contained in:
parent
6d9e396b16
commit
d8d2371d0c
3 changed files with 0 additions and 21 deletions
|
@ -814,7 +814,6 @@ typedef struct
|
|||
|
||||
INT16 width, height;
|
||||
INT16 leftoffset, topoffset;
|
||||
INT32 width_mask;
|
||||
|
||||
UINT8 *pixels;
|
||||
column_t *columns;
|
||||
|
|
|
@ -239,11 +239,6 @@ patch_t *Patch_CreateFromDoomPatch(softwarepatch_t *source)
|
|||
|
||||
Patch_CalcDataSizes(source, &total_pixels, &total_posts);
|
||||
|
||||
int width_po2 = 1;
|
||||
while (width_po2 < patch->width)
|
||||
width_po2 <<= 1;
|
||||
patch->width_mask = width_po2 - 1;
|
||||
|
||||
patch->columns = Z_Calloc(sizeof(column_t) * patch->width, PU_PATCH_DATA, NULL);
|
||||
patch->pixels = Z_Calloc(sizeof(UINT8) * total_pixels, PU_PATCH_DATA, NULL);
|
||||
|
||||
|
@ -386,19 +381,6 @@ static void Patch_RebuildColumn(patch_t *patch, INT32 x, bitarray_t *is_opaque)
|
|||
}
|
||||
}
|
||||
|
||||
column_t *Patch_GetColumn(patch_t *patch, unsigned column)
|
||||
{
|
||||
if (column >= (unsigned)patch->width)
|
||||
{
|
||||
if (patch->width_mask + 1 == patch->width)
|
||||
column &= patch->width_mask;
|
||||
else
|
||||
column %= patch->width;
|
||||
}
|
||||
|
||||
return &patch->columns[column];
|
||||
}
|
||||
|
||||
void *Patch_GetPixel(patch_t *patch, INT32 x, INT32 y)
|
||||
{
|
||||
if (x < 0 || x >= patch->width || y < 0 || y >= patch->height)
|
||||
|
|
|
@ -59,8 +59,6 @@ patch_t *Patch_CreateFromDoomPatch(softwarepatch_t *source);
|
|||
void Patch_CalcDataSizes(softwarepatch_t *source, size_t *total_pixels, size_t *total_posts);
|
||||
void Patch_MakeColumns(softwarepatch_t *source, size_t num_columns, INT16 width, UINT8 *pixels, column_t *columns, post_t *posts, boolean flip);
|
||||
|
||||
column_t *Patch_GetColumn(patch_t *patch, unsigned column);
|
||||
|
||||
#define Patch_FreeTag(tagnum) Patch_FreeTags(tagnum, tagnum)
|
||||
void Patch_FreeTags(INT32 lowtag, INT32 hightag);
|
||||
|
||||
|
|
Loading…
Reference in a new issue