mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-11-28 15:11:55 +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 width, height;
|
||||||
INT16 leftoffset, topoffset;
|
INT16 leftoffset, topoffset;
|
||||||
INT32 width_mask;
|
|
||||||
|
|
||||||
UINT8 *pixels;
|
UINT8 *pixels;
|
||||||
column_t *columns;
|
column_t *columns;
|
||||||
|
|
|
@ -239,11 +239,6 @@ patch_t *Patch_CreateFromDoomPatch(softwarepatch_t *source)
|
||||||
|
|
||||||
Patch_CalcDataSizes(source, &total_pixels, &total_posts);
|
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->columns = Z_Calloc(sizeof(column_t) * patch->width, PU_PATCH_DATA, NULL);
|
||||||
patch->pixels = Z_Calloc(sizeof(UINT8) * total_pixels, 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)
|
void *Patch_GetPixel(patch_t *patch, INT32 x, INT32 y)
|
||||||
{
|
{
|
||||||
if (x < 0 || x >= patch->width || y < 0 || y >= patch->height)
|
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_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);
|
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)
|
#define Patch_FreeTag(tagnum) Patch_FreeTags(tagnum, tagnum)
|
||||||
void Patch_FreeTags(INT32 lowtag, INT32 hightag);
|
void Patch_FreeTags(INT32 lowtag, INT32 hightag);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue