From cf672b508ffbd403283d9cc1437049c76a3c3786 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers <coelckers@users.noreply.github.com> Date: Tue, 2 Feb 2021 23:04:24 +0100 Subject: [PATCH] - removed unused 'updatesectorexclude' function. --- source/build/include/build.h | 2 -- source/build/src/engine.cpp | 26 -------------------------- 2 files changed, 28 deletions(-) diff --git a/source/build/include/build.h b/source/build/include/build.h index 86c6308d7..ddae46faa 100644 --- a/source/build/include/build.h +++ b/source/build/include/build.h @@ -512,8 +512,6 @@ int32_t try_facespr_intersect(uspriteptr_t const spr, vec3_t const in, #define MAXUPDATESECTORDIST 1536 #define INITIALUPDATESECTORDIST 256 void updatesector(int32_t const x, int32_t const y, int16_t * const sectnum) ATTRIBUTE((nonnull(3))); -void updatesectorexclude(int32_t const x, int32_t const y, int16_t * const sectnum, - const uint8_t * const excludesectbitmap) ATTRIBUTE((nonnull(3,4))); void updatesectorz(int32_t const x, int32_t const y, int32_t const z, int16_t * const sectnum) ATTRIBUTE((nonnull(4))); void updatesectorneighbor(int32_t const x, int32_t const y, int16_t * const sectnum, int32_t initialMaxDistance = INITIALUPDATESECTORDIST, int32_t maxDistance = MAXUPDATESECTORDIST) ATTRIBUTE((nonnull(3))); void updatesectorneighborz(int32_t const x, int32_t const y, int32_t const z, int16_t * const sectnum, int32_t initialMaxDistance = INITIALUPDATESECTORDIST, int32_t maxDistance = MAXUPDATESECTORDIST) ATTRIBUTE((nonnull(4))); diff --git a/source/build/src/engine.cpp b/source/build/src/engine.cpp index 35d621e9b..e16a9f6c8 100644 --- a/source/build/src/engine.cpp +++ b/source/build/src/engine.cpp @@ -2664,32 +2664,6 @@ void updatesector(int32_t const x, int32_t const y, int16_t * const sectnum) *sectnum = -1; } -void updatesectorexclude(int32_t const x, int32_t const y, int16_t * const sectnum, const uint8_t * const excludesectbitmap) -{ - if (inside_exclude_p(x, y, *sectnum, excludesectbitmap)) - return; - - if (*sectnum >= 0 && *sectnum < numsectors) - { - auto wal = (uwallptr_t)&wall[sector[*sectnum].wallptr]; - int wallsleft = sector[*sectnum].wallnum; - - do - { - int const next = wal->nextsector; - if (inside_exclude_p(x, y, next, excludesectbitmap)) - SET_AND_RETURN(*sectnum, next); - wal++; - } - while (--wallsleft); - } - - for (bssize_t i=numsectors-1; i>=0; --i) - if (inside_exclude_p(x, y, i, excludesectbitmap)) - SET_AND_RETURN(*sectnum, i); - - *sectnum = -1; -} // new: if *sectnum >= MAXSECTORS, *sectnum-=MAXSECTORS is considered instead // as starting sector and the 'initial' z check is skipped