change ROTANGLES to 72

This commit is contained in:
Jaime Passos 2019-12-17 13:39:26 -03:00
parent 8422c88063
commit aff5b52eba
2 changed files with 2 additions and 2 deletions

View File

@ -625,7 +625,7 @@ extern const char *compdate, *comptime, *comprevision, *compbranch;
/// Sprite rotation /// Sprite rotation
#define ROTSPRITE #define ROTSPRITE
#define ROTANGLES 360 // Needs to be a divisor of 360 (45, 60, 90, 120...) #define ROTANGLES 72 // Needs to be a divisor of 360 (45, 60, 90, 120...)
#define ROTANGDIFF (360 / ROTANGLES) #define ROTANGDIFF (360 / ROTANGLES)
#ifndef HAVE_PNG #ifndef HAVE_PNG

View File

@ -1102,7 +1102,7 @@ static UINT16 GetPatchPixel(patch_t *patch, INT32 x, INT32 y, boolean flip)
column_t *column; column_t *column;
UINT8 *source; UINT8 *source;
if (x < SHORT(patch->width)) if (x >= 0 && x < SHORT(patch->width))
{ {
INT32 topdelta, prevdelta = -1; INT32 topdelta, prevdelta = -1;
column = (column_t *)((UINT8 *)patch + LONG(patch->columnofs[flip ? (patch->width-1-x) : x])); column = (column_t *)((UINT8 *)patch + LONG(patch->columnofs[flip ? (patch->width-1-x) : x]));