#include "memory/memory.h"
#include <stddef.h>
#include <stdint.h>
Go to the source code of this file.
|
#define | N_BIT(x) (1 << x) |
|
#define | N_ARGB(a, r, g, b) ((uint)((((a)&0xff)<<24)|(((r)&0xff)<<16)|(((g)&0xff)<<8)|((b)&0xff))) |
|
#define | N_RGBA(r, g, b, a) N_ARGB(a,r,g,b) |
|
#define | N_XRGB(r, g, b) N_ARGB(0xff,r,g,b) |
|
#define | N_COLORVALUE(r, g, b, a) N_RGBA((uint)((r)*255.f),(uint)((g)*255.f),(uint)((b)*255.f),(uint)((a)*255.f)) |
|
#define | BITS_TO_BYTES(x) (((x)+7)>>3) |
|
#define | BYTES_TO_BITS(x) ((x)<<3) |
|
#define | lengthof(x) (sizeof(x) / sizeof(*x)) |
|
#define | NEBULA_ALIGN16 alignas(16) |
|
|
constexpr uint64 | operator""_KB (const unsigned long long val) |
|
constexpr uint64 | operator""_MB (const unsigned long long val) |
|
constexpr uint64 | operator""_GB (const unsigned long long val) |
|
template<class MASK , class BITS > |
constexpr MASK | SetBits (const MASK mask, const BITS bit) |
|
template<class MASK , class BITS > |
constexpr MASK | UnsetBits (const MASK mask, const BITS bit) |
|
template<class FLAGS , class BITS > |
constexpr bool | AllBits (const FLAGS flags, const BITS bits) |
| Check if all bits are set in flags.
|
|
template<class FLAGS , class BITS > |
constexpr bool | AnyBits (const FLAGS flags, const BITS bits) |
| Check if any bits are set in flags.
|
|
template<class FLAGS , class BITS > |
constexpr bool | OnlyBits (const FLAGS flags, const BITS bits) |
|
◆ BITS_TO_BYTES
#define BITS_TO_BYTES |
( |
| x | ) |
(((x)+7)>>3) |
◆ BYTES_TO_BITS
#define BYTES_TO_BITS |
( |
| x | ) |
((x)<<3) |
◆ lengthof
#define lengthof |
( |
| x | ) |
(sizeof(x) / sizeof(*x)) |
◆ N_ARGB
#define N_ARGB |
( |
| a, |
|
|
| r, |
|
|
| g, |
|
|
| b ) ((uint)((((a)&0xff)<<24)|(((r)&0xff)<<16)|(((g)&0xff)<<8)|((b)&0xff))) |
◆ N_BIT
#define N_BIT |
( |
| x | ) |
(1 << x) |
◆ N_COLORVALUE
#define N_COLORVALUE |
( |
| r, |
|
|
| g, |
|
|
| b, |
|
|
| a ) N_RGBA((uint)((r)*255.f),(uint)((g)*255.f),(uint)((b)*255.f),(uint)((a)*255.f)) |
◆ N_RGBA
#define N_RGBA |
( |
| r, |
|
|
| g, |
|
|
| b, |
|
|
| a ) N_ARGB(a,r,g,b) |
◆ N_XRGB
#define N_XRGB |
( |
| r, |
|
|
| g, |
|
|
| b ) N_ARGB(0xff,r,g,b) |
◆ NEBULA_ALIGN16
#define NEBULA_ALIGN16 alignas(16) |
◆ Index64T
◆ IndexT
◆ int16
◆ int32
◆ int64
◆ int8
◆ ptrdiff
◆ PtrDiff
◆ PtrT
◆ Size64T
◆ SizeT
◆ ubyte
typedef unsigned char ubyte |
◆ uchar
typedef unsigned char uchar |
◆ uint
typedef unsigned int uint |
◆ uint16
◆ uint32
◆ uint64
◆ uint8
◆ uintptr
◆ ulong
typedef unsigned long ulong |
◆ ushort
◆ AllBits()
template<class FLAGS , class BITS >
constexpr bool AllBits |
( |
const FLAGS | flags, |
|
|
const BITS | bits ) |
|
constexpr |
Check if all bits are set in flags.
◆ AnyBits()
template<class FLAGS , class BITS >
constexpr bool AnyBits |
( |
const FLAGS | flags, |
|
|
const BITS | bits ) |
|
constexpr |
Check if any bits are set in flags.
◆ OnlyBits()
template<class FLAGS , class BITS >
constexpr bool OnlyBits |
( |
const FLAGS | flags, |
|
|
const BITS | bits ) |
|
constexpr |
◆ operator""_GB()
constexpr uint64 operator""_GB |
( |
const unsigned long long | val | ) |
|
|
constexpr |
◆ operator""_KB()
constexpr uint64 operator""_KB |
( |
const unsigned long long | val | ) |
|
|
constexpr |
◆ operator""_MB()
constexpr uint64 operator""_MB |
( |
const unsigned long long | val | ) |
|
|
constexpr |
◆ SetBits()
template<class MASK , class BITS >
constexpr MASK SetBits |
( |
const MASK | mask, |
|
|
const BITS | bit ) |
|
constexpr |
◆ UnsetBits()
template<class MASK , class BITS >
constexpr MASK UnsetBits |
( |
const MASK | mask, |
|
|
const BITS | bit ) |
|
constexpr |
◆ InvalidIndex
const int InvalidIndex = -1 |
|
static |