diff --git a/source/blood/src/blood.cpp b/source/blood/src/blood.cpp index dad00d844..f88f93a1f 100644 --- a/source/blood/src/blood.cpp +++ b/source/blood/src/blood.cpp @@ -1693,7 +1693,7 @@ static int parsedefinitions_game(scriptfile *pScript, int firstPass) if (have_size) { - vec2_16_t const orig_size = tileGetSize(tile); + vec2_16_t const orig_size = tilesiz[tile]; if (orig_size.x != tile_size.x && orig_size.y != tile_size.y) { // initprintf("Size of tile %d doesn't match! Size: (%d, %d), Expected: (%d, %d)\n", tile, orig_size.x, orig_size.y, tile_size.x, tile_size.y); diff --git a/source/build/src/defs.cpp b/source/build/src/defs.cpp index 3eff02ce5..4a63b0247 100644 --- a/source/build/src/defs.cpp +++ b/source/build/src/defs.cpp @@ -761,7 +761,7 @@ static int32_t defsparser(scriptfile *script) if (have_crc32) { - int32_t const orig_crc32 = tileCRC(tile); + int32_t const orig_crc32 = tileGetCRC32(tile); if (orig_crc32 != tile_crc32) { // initprintf("CRC32 of tile %d doesn't match! CRC32: %d, Expected: %d\n", tile, orig_crc32, tile_crc32); diff --git a/source/build/src/mdsprite.cpp b/source/build/src/mdsprite.cpp index cd53e356b..833c1303d 100644 --- a/source/build/src/mdsprite.cpp +++ b/source/build/src/mdsprite.cpp @@ -1736,7 +1736,7 @@ static int32_t polymost_md3draw(md3model_t *m, tspriteptr_t tspr) VSMatrix texmat(0); texmat.translate(xpanning, ypanning, 1.0f); - if (!(tspr->extra&TSPR_EXTRA_MDHACK)) + if (tspr->clipdist & TSPR_FLAGS_MDHACK) { //POGOTODO: if we add support for palette indexing on model skins, the texture for the palswap could be setup here diff --git a/source/common/textures/buildtiles.cpp b/source/common/textures/buildtiles.cpp index fded6c4ad..4621d0e79 100644 --- a/source/common/textures/buildtiles.cpp +++ b/source/common/textures/buildtiles.cpp @@ -457,7 +457,7 @@ void BuildTiles::tileSetExternal(int tilenum, int width, int height, uint8_t* da // //========================================================================== -int32_t tileCRC(int tileNum) +int32_t tileGetCRC32(int tileNum) { if ((unsigned)tileNum >= (unsigned)MAXTILES) return 0; auto tile = TileFiles.tiles[tileNum]; diff --git a/source/common/textures/textures.h b/source/common/textures/textures.h index 469ebaeed..bd808b745 100644 --- a/source/common/textures/textures.h +++ b/source/common/textures/textures.h @@ -553,7 +553,7 @@ struct BuildTiles void InvalidateTile(int num); }; -int tileCRC(int tileNum); +int tileGetCRC32(int tileNum); int tileImportFromTexture(const char* fn, int tilenum, int alphacut, int istexture); void tileCopy(int tile, int tempsource, int temppal, int xoffset, int yoffset, int flags); void tileSetDummy(int tile, int width, int height); diff --git a/source/duke3d/src/common_game.h b/source/duke3d/src/common_game.h index f1e6aa386..335e1a315 100644 --- a/source/duke3d/src/common_game.h +++ b/source/duke3d/src/common_game.h @@ -7,7 +7,6 @@ #ifndef EDUKE32_COMMON_GAME_H_ #define EDUKE32_COMMON_GAME_H_ -#include "build.h" #include "gamecontrol.h" BEGIN_DUKE_NS @@ -63,16 +62,10 @@ static inline void Duke_ApplySpritePropertiesToTSprite(tspriteptr_t tspr, usprit EDUKE32_STATIC_ASSERT(CSTAT_SPRITE_RESERVED5 >> 11 == TSPR_FLAGS_INVISIBLE_WITH_SHADOW); auto const cstat = spr->cstat; - tspr->clipdist |= ((cstat & CSTAT_SPRITE_RESERVED1) >> 9) | ((cstat & (CSTAT_SPRITE_RESERVED4|CSTAT_SPRITE_RESERVED5)) >> 11); + tspr->clipdist |= ((cstat & CSTAT_SPRITE_RESERVED1) >> 9) | ((cstat & (CSTAT_SPRITE_RESERVED4 | CSTAT_SPRITE_RESERVED5)) >> 11); } void Duke_CommonCleanup(void); -#if defined HAVE_FLAC || defined HAVE_VORBIS -# define FORMAT_UPGRADE_ELIGIBLE -extern int g_maybeUpgradeSoundFormats; -extern buildvfs_kfd S_OpenAudio(const char *fn, char searchfirst, uint8_t ismusic); -#else -# define S_OpenAudio(fn, searchfirst, ismusic) kopen4loadfrommod(fn, searchfirst) END_DUKE_NS #endif diff --git a/source/duke3d/src/gamevars.cpp b/source/duke3d/src/gamevars.cpp index c081f52ca..22a5819b9 100644 --- a/source/duke3d/src/gamevars.cpp +++ b/source/duke3d/src/gamevars.cpp @@ -1219,8 +1219,6 @@ static void Gv_AddSystemVars(void) } #endif - char aszBuf[64]; - for (int i=0; i