mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-25 11:10:47 +00:00
Add simple bitmap manipulation functions
git-svn-id: https://svn.eduke32.com/eduke32@7475 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
9b0573f0f2
commit
146fa7e79e
1 changed files with 5 additions and 0 deletions
|
@ -1119,6 +1119,11 @@ static inline void append_ext_UNSAFE(char *outbuf, const char *ext)
|
||||||
Bstrcpy(p, ext);
|
Bstrcpy(p, ext);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
////////// Bitfield manipulation //////////
|
||||||
|
|
||||||
|
static FORCE_INLINE void bitmap_set(uint8_t *const ptr, int const n) { ptr[n >> 3] |= 1 << (n & 7); }
|
||||||
|
static FORCE_INLINE void bitmap_clear(uint8_t *const ptr, int const n) { ptr[n >> 3] &= ~(1 << (n & 7)); }
|
||||||
|
static FORCE_INLINE CONSTEXPR char bitmap_test(uint8_t const *const ptr, int const n) { return ptr[n >> 3] & (1 << (n & 7)); }
|
||||||
|
|
||||||
/* Begin dependence on compat.o object. */
|
/* Begin dependence on compat.o object. */
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue