mirror of
https://github.com/ZDoom/Raze.git
synced 2025-01-18 22:51:50 +00:00
- moved bitmap_set and bitmap_test into clip.cpp and deleted unused inside_exclude_p function.
No longer used anywhere else and to be replaced with BitArray.
This commit is contained in:
parent
ae63bcd80b
commit
730b7492cb
3 changed files with 2 additions and 14 deletions
|
@ -52,10 +52,6 @@
|
|||
|
||||
////////// Platform headers //////////
|
||||
|
||||
#if !defined __APPLE__ && (!defined EDUKE32_BSD || !__STDC__) && !defined __OpenBSD__ && !defined __DragonFly__
|
||||
# include <malloc.h>
|
||||
#endif
|
||||
|
||||
#include "engineerrors.h"
|
||||
|
||||
typedef intptr_t bssize_t;
|
||||
|
@ -83,14 +79,9 @@ typedef struct {
|
|||
|
||||
static_assert(sizeof(vec3f_t) == sizeof(float) * 3);
|
||||
|
||||
////////// Language tricks that depend on size_t //////////
|
||||
|
||||
#include "basics.h"
|
||||
|
||||
////////// Bitfield manipulation //////////
|
||||
|
||||
inline void bitmap_set(uint8_t *const ptr, int const n) { ptr[n>>3] |= 1 << (n&7); }
|
||||
inline char bitmap_test(uint8_t const *const ptr, int const n) { return ptr[n>>3] & (1 << (n&7)); }
|
||||
|
||||
|
||||
#endif // compat_h_
|
||||
|
|
|
@ -25,6 +25,8 @@ static int16_t clipobjectval[MAXCLIPNUM];
|
|||
static uint8_t clipignore[(MAXCLIPNUM+7)>>3];
|
||||
static int32_t rxi[8], ryi[8];
|
||||
|
||||
inline void bitmap_set(uint8_t* const ptr, int const n) { ptr[n >> 3] |= 1 << (n & 7); }
|
||||
inline char bitmap_test(uint8_t const* const ptr, int const n) { return ptr[n >> 3] & (1 << (n & 7)); }
|
||||
|
||||
|
||||
int32_t quickloadboard=0;
|
||||
|
|
|
@ -1177,11 +1177,6 @@ int32_t lastwall(int16_t point)
|
|||
* NOTE: The redundant bound checks are expected to be optimized away in the
|
||||
* inlined code. */
|
||||
|
||||
static inline int inside_exclude_p(int32_t const x, int32_t const y, int const sectnum, const uint8_t *excludesectbitmap)
|
||||
{
|
||||
return (sectnum>=0 && !bitmap_test(excludesectbitmap, sectnum) && inside_p(x, y, sectnum));
|
||||
}
|
||||
|
||||
/* NOTE: no bound check */
|
||||
static inline int inside_z_p(int32_t const x, int32_t const y, int32_t const z, int const sectnum)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue