Defs: Minor ifcrc cleanup

git-svn-id: https://svn.eduke32.com/eduke32@8464 1a8010ca-5511-0410-912e-c29ae57300e0

# Conflicts:
#	source/build/include/build.h
#	source/build/src/defs.cpp
#	source/build/src/tiles.cpp
This commit is contained in:
hendricks266 2019-12-22 10:19:55 +00:00 committed by Christoph Oelckers
parent b7479b567d
commit 777b895748
2 changed files with 8 additions and 10 deletions

View file

@ -750,8 +750,6 @@ typedef struct MAY_ALIAS {
int16_t x, y; int16_t x, y;
} vec2_16_t; } vec2_16_t;
using vec2_16_t = vec2_16_t;
typedef struct { typedef struct {
uint32_t x, y; uint32_t x, y;
} vec2u_t; } vec2u_t;

View file

@ -649,8 +649,8 @@ static int32_t defsparser(scriptfile *script)
int32_t havexoffset = 0, haveyoffset = 0, haveextra = 0; int32_t havexoffset = 0, haveyoffset = 0, haveextra = 0;
int32_t xoffset = 0, yoffset = 0; int32_t xoffset = 0, yoffset = 0;
int32_t istexture = 0; int32_t istexture = 0;
int32_t tilecrc = 0; int32_t tile_crc32 = 0;
uint8_t have_ifcrc = 0; uint8_t have_crc32 = 0;
int32_t extra = 0; int32_t extra = 0;
static const tokenlist tilefromtexturetokens[] = static const tokenlist tilefromtexturetokens[] =
@ -694,8 +694,8 @@ static int32_t defsparser(scriptfile *script)
yoffset = clamp(yoffset, -128, 127); yoffset = clamp(yoffset, -128, 127);
break; break;
case T_IFCRC: case T_IFCRC:
scriptfile_getsymbol(script, &tilecrc); scriptfile_getsymbol(script, &tile_crc32);
have_ifcrc = 1; have_crc32 = 1;
break; break;
case T_TEXHITSCAN: case T_TEXHITSCAN:
flags |= PICANM_TEXHITSCAN_BIT; flags |= PICANM_TEXHITSCAN_BIT;
@ -722,12 +722,12 @@ static int32_t defsparser(scriptfile *script)
break; break;
} }
if (have_ifcrc) if (have_crc32)
{ {
int32_t origcrc = tileCRC(tile); int32_t const orig_crc32 = tileCRC(tile);
if (origcrc != tilecrc) if (orig_crc32 != tile_crc32)
{ {
//initprintf("CRC of tile %d doesn't match! CRC: %d, Expected: %d\n", tile, origcrc, tilecrc); // initprintf("CRC32 of tile %d doesn't match! CRC32: %d, Expected: %d\n", tile, orig_crc32, tile_crc32);
break; break;
} }
} }