diff --git a/src/r_defs.h b/src/r_defs.h index 195cf86ff..2a84a070c 100644 --- a/src/r_defs.h +++ b/src/r_defs.h @@ -814,7 +814,6 @@ typedef struct INT16 width, height; INT16 leftoffset, topoffset; - INT32 width_mask; UINT8 *pixels; column_t *columns; diff --git a/src/r_patch.c b/src/r_patch.c index fb7f5d579..208c3330c 100644 --- a/src/r_patch.c +++ b/src/r_patch.c @@ -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) diff --git a/src/r_patch.h b/src/r_patch.h index 260007e45..351ef3628 100644 --- a/src/r_patch.h +++ b/src/r_patch.h @@ -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);