Namespaces | |
namespace | Debug |
Group of functions to assist in debugging. | |
namespace | Flash |
Functions and classes to support playing Adobe Flash files. | |
namespace | Linux |
namespace | MacOS |
Functions specific to MacOS. | |
namespace | MacOSX |
namespace | MSDos |
Functions specific to MS/DOS. | |
namespace | PS4 |
namespace | Switch |
namespace | type_traits |
Semi-private template classes for type checking. | |
namespace | Unix |
namespace | Vulkan |
namespace | Win32 |
Namespace for Windows specific functions and classes. | |
namespace | Xbox360 |
Classes | |
struct | add_const |
Add the const qualifier to a type. More... | |
struct | add_cv |
Add the const and volatile qualifier to a type. More... | |
struct | add_volatile |
Add the volatile qualifier to a type. More... | |
struct | ADPCMState_t |
struct | alignment_of |
Determine the alignment of an object. More... | |
class | allocator |
Implementation of std::allocator<> More... | |
class | allocator< const void > |
Implementation of std::allocator<void> More... | |
class | allocator< void > |
Implementation of std::allocator<void> More... | |
class | AllocatorANSI |
ANSI Memory Manager object. More... | |
struct | AllocatorBase |
Base class for memory manager objects. More... | |
class | AllocatorHandle |
class | ArgumentType |
Container class for passing data to SafePrint. More... | |
struct | ArgumentType_Dispatch |
Intrinsic data type dispatcher. More... | |
struct | ArgumentType_DispatchPtr |
Intrinsic data type dispatcher. More... | |
union | ArgumentType_t |
Base structure for ArgumentType. More... | |
union | ArgumentTypeDataUnion_t |
Data stored in this object. More... | |
struct | Assert_t |
Container structure for Assert support. More... | |
class | AutoreleasePool |
Create an instance of a NSAutoreleasePool. More... | |
class | AutoRepeat |
Autorepeat a joystick. More... | |
class | Base |
Base class for virtual destructor. More... | |
struct | BigEndian |
Loads a 16, 32 or 64 bit value with byte swapping if needed. More... | |
struct | bool_constant |
Wrap a static bool constant. More... | |
class | CaptureStdout |
Class to capture stdout and stderr. More... | |
class | ClassArray |
Template for creating arrays of class objects. More... | |
class | CodeFramework |
Manage MacOSX / iOS Framework library files. More... | |
class | CodeLibrary |
Manage code library files. More... | |
class | CodePage |
Shared constants for code page handlers. More... | |
class | CommandParameter |
Base class for command line parameters. More... | |
class | CommandParameterBooleanTrue |
Class for a boolean command line parameters. More... | |
class | CommandParameterString |
Class for a string command line parameter. More... | |
class | CommandParameterWordPtr |
Class for a numeric string command line parameter. More... | |
class | Compress |
Base class for data compression. More... | |
class | CompressDeflate |
Compress data using Deflate Encoding. More... | |
class | CompressILBMRLE |
Compress data using ILBM Run Length Encoding. More... | |
class | CompressLZSS |
Compress data using LZSS encoding. More... | |
struct | conditional |
Select a type based if the conditional is true or false. More... | |
class | ConditionVariable |
Class for creating a condition variable. More... | |
class | ConsoleApp |
Base class for console applications. More... | |
struct | CPUID_t |
Structure that holds the features of the CPU. More... | |
class | Decompress |
Base class for data decompression. More... | |
class | Decompress16BitBEAudio |
Process 16 bit audio data in Big Endian format. More... | |
class | Decompress16BitLEAudio |
Process 16 bit audio data in Little Endian format. More... | |
class | Decompress32BitBEAudio |
Process 32 bit audio data in Big Endian format. More... | |
class | Decompress32BitLEAudio |
Process 32 bit audio data in Little Endian format. More... | |
class | DecompressALaw |
Process audio data compressed with ALaw. More... | |
class | DecompressAudio |
Base class for audio decompression codec. More... | |
class | DecompressDeflate |
Decompress Deflate format. More... | |
class | DecompressILBMRLE |
Decompress RLE format. More... | |
class | DecompressLZSS |
Decompress LZSS format. More... | |
class | DecompressMace3 |
Decompress MACE 3 format. More... | |
class | DecompressMace6 |
Decompress MACE 6 format. More... | |
class | DecompressMicrosoftADPCM |
Decompress Microsoft ADPCM format. More... | |
class | DecompressMP3 |
Process audio data compressed with MP3. More... | |
class | DecompressSigned8BitAudio |
Process signed 8 bit audio data. More... | |
class | DecompressULaw |
Process audio data compressed with ULaw. More... | |
class | DecompressUnsigned8BitAudio |
Process unsigned 8 bit audio data. More... | |
struct | default_delete_Base |
struct | default_delete_Free |
class | DetectMultiLaunch |
Class to detect multiple launches of a desktop application. More... | |
class | DirectoryEntry_t |
A directory entry returned by DirectorySearch. More... | |
class | DirectorySearch |
Directory contents iteration class. More... | |
class | DirectXPerfMarker |
DirectX performance marker. More... | |
struct | disable_if |
Create typedef type if condition is false. More... | |
class | Display |
Base class for instantiating a video display and the API to drive it. More... | |
class | DisplayDIB |
class | DisplayDIBSoftware8 |
DIB startup and teardown class. More... | |
class | DisplayDirectX11 |
class | DisplayDirectX9 |
class | DisplayDirectX9Software8 |
class | DisplayObject |
Class for managing display objects. More... | |
class | DisplayOpenGL |
class | DisplayOpenGLSoftware8 |
class | DoubleLinkedList |
Simple double linked list manager. More... | |
struct | DoubleLinkedList_t |
Double linked list. More... | |
struct | Dxt1Packet_t |
Data structure for a DXT1 compressed texture block. More... | |
struct | Dxt3Packet_t |
Data structure for a DXT3 compressed texture block. More... | |
struct | Dxt5Packet_t |
Data structure for a DXT5 compressed texture block. More... | |
class | Effect |
Base class for shader effects. More... | |
class | Effect2D |
class | Effect2DDX9 |
class | Effect2DOpenGL |
class | EffectPositionColorTexture |
class | EffectPositionColorTextureDX9 |
class | EffectPositionColorTextureOpenGL |
class | EffectPositionTexture |
class | EffectPositionTextureDX9 |
class | EffectPositionTextureOpenGL |
struct | enable_if |
Create typedef type if condition is true. More... | |
struct | EventHeader_t |
Base structure for events. More... | |
class | File |
System file reference class. More... | |
class | FileAPF |
Reads files. More... | |
class | FileBMP |
Reads and writes BMP files. More... | |
class | FileDDS |
Reads and writes DDS files. More... | |
class | FileGIF |
Reads and writes GIF files. More... | |
class | FileINI |
Reads and writes INI files. More... | |
class | FileLBM |
Reads and writes LBM files. More... | |
class | FileManager |
Global file system manager. More... | |
class | FileManagerSimple |
Initialization class for the global FileManager structure. More... | |
class | FileMP3 |
Reads and writes MP3 files. More... | |
class | Filename |
File name container. More... | |
class | FilePCX |
Reads and writes PCX files. More... | |
class | FilePNG |
Reads and writes PNG files. More... | |
class | FileTGA |
Reads and writes TGA files. More... | |
class | FileXML |
Reads and writes XML files. More... | |
struct | FixedMatrix3D_t |
3 dimensional fixed point matrix More... | |
struct | FixedMatrix4D_t |
4x4 Fixed32 matrix. More... | |
struct | FixedVector2D_t |
2 dimensional fixed point vector More... | |
struct | FixedVector3D_t |
3D Fixed32 vector. More... | |
struct | FixedVector4D_t |
4 dimensional fixed point vector More... | |
class | FloatTimer |
Floating point timer. More... | |
class | Font |
Base class for font manager. More... | |
class | Font4Bit |
Class to render a tiny space 4 bit per pixel font. More... | |
class | ForwardLink |
Singly linked list pointer. More... | |
struct | FourCharacterCode_t |
Helper structure to create 4 characters codes. More... | |
class | FPInfo |
Class for analyzing a floating point number. More... | |
class | FPLargeInt |
Class for managing a very large integer for double precision. More... | |
class | FPPrintInfo |
Digit printing class for floating point. More... | |
class | GameApp |
Base class for video game application. More... | |
struct | GfxShape_t |
class | GIFDecoder |
GIF style LZW decompresser. More... | |
class | GIFEncoder |
GIF style LZW compressor. More... | |
class | GlobalMemoryManager |
Singleton class for global memory allocation. More... | |
struct | Globals |
Global variables shared by all functions in the application. More... | |
struct | GOST_t |
32 byte array to contain a GOST hash More... | |
struct | GOSTHasher_t |
Multi-pass GOST hash generator. More... | |
class | GridIndexBox |
Class for managing a grid with objects on overlapping areas. More... | |
class | GridIndexPoints |
Manager to handle a grid with singly linked lists with values. More... | |
class | Half |
Container for a 16 bit float. More... | |
class | HashMap |
Key / data pair hash for quick lookup and retrieval. More... | |
class | HashMapShared |
Base class for HashMap. More... | |
class | HashMapString |
String key / data pair hash for quick lookup and retrieval. More... | |
class | HashMapStringCase |
String key / data pair hash for quick lookup and retrieval. More... | |
struct | HSL_t |
Hue, Saturation and Intensity 32 bit floating point values. More... | |
struct | ice_and |
Test for all values being true. More... | |
struct | ice_eq |
Test for equality. More... | |
struct | ice_ne |
Test for inequality. More... | |
struct | ice_not |
Reverse boolean input. More... | |
struct | ice_or |
Test for any value being true. More... | |
class | Image |
Class for containing raw images. More... | |
class | InputMemoryStream |
Fast input memory stream. More... | |
class | InputRezStream |
InputMemoryStream for RezFile. More... | |
struct | integral_constant |
Wrap a static constant of specified type. More... | |
struct | is_arithmetic |
Test if a type is an integer or a floating point number. More... | |
struct | is_const |
Test if a type is const. More... | |
struct | is_floating_point |
Test if a type is a float. More... | |
struct | is_fundamental |
Test if a type is arithmetic or void. More... | |
struct | is_integral |
Test if a type is an integer. More... | |
struct | is_lvalue_reference |
Test if a type is an lvalue reference. More... | |
struct | is_pointer |
Test if a type is a pointer. More... | |
struct | is_reference |
Test if a type is a reference. More... | |
struct | is_rvalue_reference |
Test if a type is an rvalue reference. More... | |
struct | is_same |
Determine if two objects are the same type. More... | |
struct | is_signed |
Test if a type is a signed value. More... | |
struct | is_unsigned |
Test if a type is an unsigned value. More... | |
struct | is_void |
Test if a type is void. More... | |
struct | is_volatile |
Test if a type is volatile. More... | |
class | ISOLatin1 |
Conversion routines to support the ISOLatin1 text encoding scheme. More... | |
class | Joypad |
struct | JoypadButtonEvent_t |
Structure for joypad button events. More... | |
class | Keyboard |
Keyboard input manager. More... | |
struct | KeyEvent_t |
Structure holding a keyboard event. More... | |
class | LastInFirstOut |
Class that manages a last in first out singly linked list. More... | |
class | LinkedListObjects |
Linked list object class. More... | |
class | LinkedListPointer |
Double linked list with pointer class. More... | |
struct | LittleEndian |
Loads a 16, 32 or 64 bit value with byte swapping if needed. More... | |
class | Localization |
Localization functions. More... | |
struct | longlong_t |
struct | LWShape_t |
struct | LWXShape_t |
struct | MacAddress_t |
struct | MACEState_t |
State of MACE compression/decompression. More... | |
struct | MacOSXOld |
Functions exclusive to Apple macOS. More... | |
class | MacRomanUS |
Conversion routines to support the MacRomanUS text encoding scheme. More... | |
struct | Matrix3D_t |
3 dimensional floating point matrix More... | |
struct | Matrix4D_t |
4 dimensional floating point matrix More... | |
struct | MD2_t |
16 byte array to contain an MD2 hash More... | |
struct | MD2Hasher_t |
Multi-pass MD2 hash generator. More... | |
struct | MD4_t |
16 byte array to contain an MD4 hash More... | |
struct | MD4Hasher_t |
Multi-pass MD4 hash generator. More... | |
struct | MD5_t |
16 byte array to contain an MD5 hash More... | |
struct | MD5Hasher_t |
Multi-pass MD5 hash generator. More... | |
struct | MemoryManager |
Base class for memory managers. More... | |
class | MemoryManagerANSI |
ANSI Memory Manager. More... | |
class | MemoryManagerGlobalANSI |
Global ANSI Memory Manager helper class. More... | |
class | MemoryManagerGlobalHandle |
Global Handle Memory Manager helper class. More... | |
class | MemoryManagerHandle |
Handle based Memory Manager. More... | |
class | Mouse |
Class for mouse input. More... | |
struct | MouseButtonEvent_t |
Structure for mouse button events. More... | |
struct | MouseMotionEvent_t |
Structure for mouse motion events. More... | |
struct | MousePositionEvent_t |
Structure for mouse position events. More... | |
struct | MouseWheelEvent_t |
Structure for mouse wheel events. More... | |
class | MPLastInFirstOut |
Thread safe class that manages a last in first out singly linked list. More... | |
class | Mutex |
Class for creating a Mutex for a critical section of data. More... | |
class | MutexLock |
Class for locking and releasing a mutex in a function. More... | |
class | MutexStatic |
Class for creating a Mutex for a statically allocated critical section of data. More... | |
struct | NativeEndian |
Loads a 16, 32 or 64 bit value with no byte swapping. More... | |
struct | NetAddr_t |
Generic structure to contain a network address. More... | |
struct | NetPacket_t |
class | NetPlay |
Network game manager. More... | |
class | NetworkEndpoint |
Base class for network endpoints. More... | |
class | NetworkEndpointInstance |
Base class for network endpoint instances. More... | |
class | NetworkEndpointInstanceTCP |
class | NetworkEndpointTCP |
struct | NetworkEnumPacketTCP_t |
class | NetworkManager |
class | NetworkModule |
struct | NetworkModuleInfo_t |
Structure to obtain information from a NetworkModule. More... | |
class | NetworkModuleSettings |
Abstract class for settings for endpoints. More... | |
class | NetworkModuleSettingsTCP |
class | NetworkModuleTCP |
class | NumberString |
Simple "C" string numeric conversion class. More... | |
class | NumberStringHex |
Simple "C" string hexadecimal conversion class. More... | |
class | OSCursor |
Class to handle an operating system cursor. More... | |
class | OSCursorImage |
Class to generate an operating system cursor. More... | |
class | OutputMemoryStream |
Fast output memory stream. More... | |
class | Pair |
Template for creating an object pair. More... | |
class | Palette |
Static functions to manage palettes. More... | |
class | Perforce |
Handle a connection to a perforce server. More... | |
struct | Point2D_t |
Integer 2D coordinate. More... | |
class | ProxyReferenceCounter |
Class to track an object that can be deleted at any time. More... | |
class | Queue |
A simple first in first out queue. More... | |
class | Random |
A simple random number generator. More... | |
class | RandomBase |
A random number generator base class. More... | |
class | RandomMersenneTwist |
Random number generator using Mersenne Twist (MT19937) More... | |
struct | Rect_t |
Structure describing an integer precision 2D rectangle. More... | |
class | ReferenceCounter |
Class to track an object using SmartPointer. More... | |
struct | remove_const |
Remove the const qualifier from a type. More... | |
struct | remove_cv |
Remove the volatile and const qualifier from a type. More... | |
struct | remove_pointer |
Remove the reference qualifier to a type. More... | |
struct | remove_reference |
Remove the reference qualifier to a type. More... | |
struct | remove_volatile |
Remove the volatile qualifier from a type. More... | |
class | Renderer |
Base graphics renderer class. More... | |
class | RendererSoftware16 |
16 bit software renderer More... | |
class | RendererSoftware8 |
8 bit paletted software renderer More... | |
class | RezFile |
Rez file manager. More... | |
struct | RGBAFloat_t |
Red, Green,Blue and Alpha 32 bit floating point values. More... | |
struct | RGBAWord16_t |
Red, Green,Blue and Alpha 16 bit values. More... | |
struct | RGBAWord8_t |
Red, Green,Blue and Alpha 8 bit values. More... | |
struct | RGBFloat_t |
Red, Green and Blue 32 bit floating point values. More... | |
struct | RGBWord16_t |
Red, Green and Blue 16 bit values. More... | |
struct | RGBWord8_t |
Red, Green and Blue 8 bit values. More... | |
class | RunQueue |
Simple manager of a list of function pointers. More... | |
class | SafePrint |
Container class for SafePrint functions. More... | |
class | Semaphore |
Class for creating a semaphore. More... | |
class | Sequencer |
struct | SHA1_t |
20 byte array to contain a SHA-1 hash More... | |
struct | SHA1Hasher_t |
Multi-pass SHA1 hash generator. More... | |
class | Shader2DCColor |
class | Shader2DCColorDX9 |
class | Shader2DCColorOpenGL |
class | Shader2DColorVertex |
class | Shader2DColorVertexDX9 |
class | Shader2DColorVertexOpenGL |
struct | Shape8Bit_t |
struct | Shape8BitArray_t |
struct | Shape8BitOffset_t |
struct | Shape8BitOffsetArray_t |
class | SimpleArray |
Template for creating arrays of intrinsic objects. More... | |
class | SimpleArrayBase |
Base class for SimpleArray. More... | |
class | SimpleString |
Simple "C" string container. More... | |
class | SmartPointer |
Template for auto reference counting a pointer. More... | |
class | SoundBufferRez |
Convenience class for sound files in resources. More... | |
class | SoundManager |
struct | StaticRTTI |
Structure to handle simple Run Time Type Identification. More... | |
class | Steam |
class | String |
UTF 8 bit string class. More... | |
class | String16 |
UTF 16 bit string class. More... | |
struct | SwapEndian |
Swap the byte order of 16, 32 and 64 bit values. More... | |
class | Texture |
Class for managing hardware images. More... | |
class | TextureDirectX9 |
Class for containing raw images. More... | |
class | TextureOpenGL |
class | Thread |
Class for creating a thread. More... | |
struct | ThreadLocalStorage_t |
Simple array of ThreadLocalStorageEntry_t records. More... | |
struct | ThreadLocalStorageEntry_t |
Thread local storage for shutdown callback. More... | |
struct | ThreadLocalStorageRecord_t |
Internal record to match ThreadLocalStorage_t to a thread. More... | |
class | Tick |
Low level timer manager. More... | |
struct | TimeDate_t |
Structure to hold a date and time. More... | |
union | uint32_float_t |
Union to create float values with integer constants. More... | |
union | uint64_double_t |
Union to create double values with integer constants. More... | |
struct | ulonglong_t |
class | Uname |
struct | unique_ptr |
Simplified implementation of std::unique_ptr. More... | |
struct | unique_ptr_array |
struct | unique_ptr_Base |
struct | unique_ptr_Free |
class | UTF16 |
Conversion routines to the UTF8 format. More... | |
class | UTF32 |
Conversion routines to the UTF32 format. More... | |
class | UTF8 |
Conversion routines to support the UTF8 format. More... | |
struct | Vector2D_t |
2 dimensional floating point vector More... | |
struct | Vector3D_t |
3 dimensional floating point vector More... | |
struct | Vector4D_t |
4 dimensional floating point vector More... | |
struct | Vector_128Float32 |
Structure to create a 128 vector with 32 bit floating point constants. More... | |
struct | Vector_128Float64 |
Structure to create a 128 vector with 64 bit floating point constants. More... | |
struct | Vector_128Int32 |
Structure to create a 128 vector with 32 bit signed integer constants. More... | |
struct | Vector_128Word16 |
Structure to create a 128 vector with 16 bit unsigned integer constants. More... | |
struct | Vector_128Word32 |
Structure to create a 128 vector with 32 bit unsigned integer constants. More... | |
struct | Vector_128Word64 |
Structure to create a 128 vector with 64 bit unsigned integer constants. More... | |
struct | Vector_128Word8 |
Structure to create a 128 vector with 8 bit unsigned integer constants. More... | |
class | VertexBuffer |
class | VertexBufferDirectX9 |
class | VertexBufferOpenGL |
class | WeakAndStrongBase |
Base class to support WeakPointer and SmartPointer. More... | |
class | WeakPointer |
Template for tracking an object that could self destruct. More... | |
class | WeakPointerAnchor |
Private sub class for use by WeakPointer. More... | |
class | Win1252 |
Conversion routines to support the Win1252 text encoding scheme. More... | |
class | Win437 |
Conversion routines to support the Win437 text encoding scheme. More... | |
struct | Word32ToVector2D_t |
Structure to create a Vector2D_t with 32 bit unsigned integer constants. More... | |
struct | Word32ToVector3D_t |
Structure to create a Vector3D_t with 32 bit unsigned integer constants. More... | |
struct | XInputGamePad_t |
Persistent state of an XInput gamepad. More... | |
Typedefs | |
typedef uint8_t | Float80Bit[10] |
80 bit float(Extended) | |
typedef bool_constant< true > | true_type |
Static bool constant of true. | |
typedef bool_constant< false > | false_type |
Static bool constant of false. | |
typedef uint16_t | float16_t |
16 bit float | |
typedef uintptr_t | ThreadID |
Platform Thread ID. | |
typedef void(* | TLSShutdownProc) (void *pThis) |
Callback prototype for TLS shutdown. | |
typedef uintptr_t | SocketType |
Cross platform type for a socket. | |
typedef DisplayDirectX9 | DisplayDefault |
typedef Effect2DDX9 | Effect2DDefault |
typedef EffectPositionColorTextureDX9 | EffectPositionColorTextureDefault |
typedef EffectPositionTextureDX9 | EffectPositionTextureDefault |
typedef Shader2DCColorDX9 | Shader2DCColorDefault |
typedef Shader2DColorVertexDX9 | Shader2DColorVertexDefault |
typedef VertexBufferDirectX9 | VertexBufferDefault |
Functions | |
template<class T > | |
constexpr remove_reference< T >::type && | move (T &&t) noexcept |
Upconvert to && for move semantics. | |
const char * | error_lookup_string (eError uError) noexcept |
Convert a Burgerlib error code into a string. | |
uintptr_t | error_get_string (char *pOutput, uintptr_t uOutputSize, eError uError) noexcept |
Convert error code to a meaningful message. | |
eError | platform_convert_to_error (int iNativeError) noexcept |
Convert platform error code to a Burgerlib error code. | |
int | Assert (const char *pCondition, const char *pFilename, uint32_t uLineNumber) noexcept |
Redirect an assert to the application's assert function. | |
void | invoke_debugger (void) noexcept |
Enter the debugger if present. | |
void | GUID_init (GUID *pOutput) noexcept |
Create a new GUID. | |
void | GUID_to_string (char *pOutput, const GUID *pInput) noexcept |
Convert a GUID to a string. | |
eError | GUID_from_string (GUID *pOutput, const char *pInput) noexcept |
Convert a GUID string into a GUID. | |
uint_t | GUID_hash (const GUID *pInput) noexcept |
Return the 16 bit hash of a GUID. | |
uint_t | GUID_is_equal (const GUID *pInput1, const GUID *pInput2) noexcept |
Compare two GUID structures for equality. | |
int | GUID_compare (const GUID *pInput1, const GUID *pInput2) noexcept |
Test two GUID for equality. | |
void | Delete (const Base *pInput) noexcept |
Delete a base class. | |
uint32_t | power_of_two (uint32_t uInput) noexcept |
Round up an integer to the nearest power of 2. | |
uint64_t | power_of_two (uint64_t uInput) noexcept |
Round up an integer to the nearest power of 2. | |
float | power_of_two (float fInput) noexcept |
Round up a 32 bit float to the nearest power of 2. | |
double | power_of_two (double dInput) noexcept |
Round up a 64 bit float to the nearest power of 2. | |
template<class T > | |
T | power_of_two (T input) noexcept |
Round up an integer to the nearest power of 2. | |
uint32_t | convert_from_BCD (uint32_t uInput) noexcept |
Convert a BCD value into a decimal integer. | |
uint32_t | convert_to_BCD (uint32_t uInput) noexcept |
Convert a decimal integer into BCD format. | |
uint32_t | bit_reverse (uint32_t uInput, uint_t uBitLength) noexcept |
Reverse the bits in a byte. | |
uint64_t | bit_reverse (uint64_t uInput, uint_t uBitLength) noexcept |
Reverse the bits in a byte. | |
uint_t | count_set_bits (uint32_t uInput) noexcept |
Calculate the number of set bits. | |
uint_t | count_set_bits (uint64_t uInput) noexcept |
Calculate the number of set bits. | |
template<class T , class U > | |
bool | operator== (const allocator< T > &, const allocator< U > &) noexcept |
Allocators are always equal. | |
template<class T , class U > | |
bool | operator!= (const allocator< T > &, const allocator< U > &) noexcept |
Allocators are always equal. | |
void * | alloc_platform_memory (uintptr_t uSize) noexcept |
Allocate memory from the underlying operating system. | |
void | free_platform_memory (const void *pInput) noexcept |
Release memory back to the underlying operating system. | |
void * | Alloc (uintptr_t uSize) noexcept |
Allocate memory. | |
void | Free (const void *pInput) noexcept |
Release memory. | |
void * | Realloc (const void *pInput, uintptr_t uSize) noexcept |
Reallocate previously allocated memory. | |
void * | alloc_clear (uintptr_t uSize) noexcept |
Allocate memory that is preinitialized to zero. | |
void * | alloc_copy (const void *pInput, uintptr_t uSize) noexcept |
Allocate a buffer and copy data into it. | |
template<class T > | |
T * | New (void) noexcept |
Allocate a class instance. | |
template<class T > | |
void | Delete (const T *pInput) noexcept |
Dispose of a generic class instance. | |
uint32_t | translate_from_UTF8 (const char *pInput, const uint8_t pTranslateTable[128][4]) noexcept |
Translate a single UTF8 stream character into a mapped 8 bit char. | |
uintptr_t | translate_from_UTF8 (char *pOutput, uintptr_t uOutputSize, const char *pInput, const uint8_t pTranslateTable[128][4]) noexcept |
Convert a UTF8 stream into a ISOLatin1 "C" string. | |
uintptr_t | translate_from_UTF8 (char *pOutput, uintptr_t uOutputSize, const char *pInput, uintptr_t uInputSize, const uint8_t pTranslateTable[128][4]) noexcept |
Convert a UTF8 stream into a ISOLatin1 byte array. | |
float16_t | convert_to_float16 (float fInput) noexcept |
Convert a 32 bit float into a 16 bit float. | |
float | convert_to_float (float16_t uInput) noexcept |
Convert a 16 bit float into a 32 bit float. | |
void | separate_integer_fraction (FPLargeInt *pIntegerPart, FPLargeInt *pFractionalPart, const FPInfo *pFPInfo) noexcept |
Separate integer and fractional values from floating point number. | |
ThreadID | get_ThreadID (void) noexcept |
Return the ID of the current thread. | |
eThreadPriority | get_thread_priority (ThreadID uThreadID) noexcept |
Get the execution priority of a thread. | |
eError | set_thread_priority (ThreadID uThreadID, eThreadPriority uThreadPriority) noexcept |
Set the execution priority of a thread. | |
uint32_t | tls_new_index (void) noexcept |
Create a unique index for Thread Local Storage. | |
ThreadLocalStorage_t * | tls_data_get_fallback (void) noexcept |
Scan for Thread Local Storage (Private) | |
eError | tls_data_set_fallback (ThreadLocalStorage_t *pInput) noexcept |
Set a Thread Local Storage entry (Private) | |
ThreadLocalStorage_t * | tls_data_get (void) noexcept |
Get Thread Local Storage. | |
eError | tls_data_set (ThreadLocalStorage_t *pInput) noexcept |
Set a Thread Local Storage entry. | |
void * | tls_get (uint32_t uIndex) noexcept |
Get thread local storage for current thread. | |
eError | tls_set (uint32_t uIndex, const void *pThis, TLSShutdownProc pShutdown=nullptr) noexcept |
Set thread local storage for current thread. | |
void | tls_release (void) noexcept |
Release Thread Local Storage for current thread. | |
ForwardLink * | reverse_list (ForwardLink *pRoot) noexcept |
Reverse a singly linked list. | |
uint_t | calc_adler16 (const void *pInput, uintptr_t uInputLength, uint_t uAdler16=1) noexcept |
Compute the (Mark) Adler-16 checksum. | |
uint32_t | calc_adler32 (const void *pInput, uintptr_t uInputLength, uint32_t uAdler32=1) noexcept |
Compute the (Mark) Adler-32 checksum. | |
uint16_t | calc_crc16IBM (const void *pInput, uintptr_t uInputLength, uint16_t uCRC=0) noexcept |
Calculate the CRC16-IBM checksum (MP3) for a buffer. | |
void | generate_crc_table (uint16_t *pOutput, uint16_t uPolynomial=0x8005U, uint_t bBitReverse=1) noexcept |
Calculate a CRC16 polynomial table. | |
uint32_t | calc_crc32b (const void *pInput, uintptr_t uInputLength, uint32_t uCRC=0) noexcept |
Calculate the CRC32B checksum (ZLib) for a buffer. | |
uint32_t | calc_crc32 (const void *pInput, uintptr_t uInputLength, uint32_t uCRC=0) noexcept |
Calculate the CRC32 checksum (Ethernet) for a buffer. | |
void | generate_crc_table (uint32_t *pOutput, uint32_t uPolynomial=0x04C11DB7U, uint_t bBitReverse=1) noexcept |
Calculate a CRC32 polynomial table. | |
void | hash (MD2_t *pOutput, const void *pInput, uintptr_t uLength) noexcept |
Quickly create an MD2 key. | |
void | hash (MD4_t *pOutput, const void *pInput, uintptr_t uLength) noexcept |
Quickly create an MD4 key. | |
void | hash (MD5_t *pOutput, const void *pInput, uintptr_t uLength) noexcept |
Quickly create an MD5 key. | |
void | hash (GOST_t *pOutput, const void *pInput, uintptr_t uLength) noexcept |
Quickly create a GOST key. | |
void | generate_GOST_table (uint32_t *pOutput, const uint32_t pSBoxTable[8][16]=GOSTHasher_t::g_TestParmsSBox) noexcept |
Calculate a GOST polynomial table. | |
void | hash (SHA1_t *pOutput, const void *pInput, uintptr_t uLength) noexcept |
Quickly create a SHA-1 key. | |
uintptr_t | SDBM_hash (const void *pInput, uintptr_t uInputCount, uint32_t uHashSeed=0U) noexcept |
Hash data using the sdbm (Service Data Base Management) algorithm. | |
uintptr_t | SDBM_hash_case (const void *pInput, uintptr_t uInputCount, uint32_t uHashSeed=0U) noexcept |
Hash string data using forced lower case with the sdbm (Service Data Base Management) algorithm. | |
uintptr_t | DJB2_hash_add (const void *pInput, uintptr_t uInputCount, uint32_t uHashSeed=5381U) noexcept |
Hash data using the djb2 (Daniel Julius Bernstein) algorithm. | |
uintptr_t | DJB2_hash_add_case (const void *pInput, uintptr_t uInputCount, uint32_t uHashSeed=5381U) noexcept |
Hash string data using forced lower case using the djb2 (Daniel Julius Bernstein) algorithm. | |
uintptr_t | DJB2_hash_xor (const void *pInput, uintptr_t uInputCount, uint32_t uHashSeed=5381U) noexcept |
Hash data using the djb2 (Daniel Julius Bernstein) algorithm. | |
uintptr_t | DJB2_hash_xor_case (const void *pInput, uintptr_t uInputCount, uint32_t uHashSeed=5381U) noexcept |
Hash string data using forced lower case using the djb2 (Daniel Julius Bernstein) algorithm. | |
float | _swapendianfloat (float fInput) noexcept |
Swap endian of a 32 bit float. | |
double | _swapendiandouble (double dInput) noexcept |
Swap endian of a 64 bit float. | |
float | _swapendianfloat (const float *pInput) noexcept |
Swap endian of a 32 bit float from a pointer. | |
double | _swapendiandouble (const double *pInput) noexcept |
Swap endian of a 64 bit float. | |
uint16_t | _load_unaligned (const uint16_t *pInput) noexcept |
Fetch a 16 bit unsigned value from memory with byte alignment. | |
uint32_t | _load_unaligned (const uint32_t *pInput) noexcept |
Fetch a 32 bit unsigned value from memory with byte alignment. | |
uint64_t | _load_unaligned (const uint64_t *pInput) noexcept |
Fetch a 64 bit unsigned value from memory with byte alignment. | |
float | _load_unaligned (const float *pInput) noexcept |
Fetch a float value from memory with byte alignment. | |
double | _load_unaligned (const double *pInput) noexcept |
Fetch a double value from memory with byte alignment. | |
void | _store_unaligned (uint16_t *pOutput, uint16_t uInput) noexcept |
Store a 16 bit unsigned value to memory with byte alignment. | |
void | _store_unaligned (uint32_t *pOutput, uint32_t uInput) noexcept |
Store a 32 bit unsigned value to memory with byte alignment. | |
void | _store_unaligned (uint64_t *pOutput, uint64_t uInput) noexcept |
Store a 64 bit unsigned value to memory with byte alignment. | |
void | _store_unaligned (float *pOutput, float fInput) noexcept |
Store a float value to memory with byte alignment. | |
void | _store_unaligned (double *pOutput, double dInput) noexcept |
Store a double value to memory with byte alignment. | |
uint16_t | _load_unaligned_swap (const uint16_t *pInput) noexcept |
Fetch a 16 bit unsigned reverse endian integer from memory with byte alignment. | |
uint32_t | _load_unaligned_swap (const uint32_t *pInput) noexcept |
Fetch a 32 bit unsigned reverse endian integer from memory with byte alignment. | |
uint64_t | _load_unaligned_swap (const uint64_t *pInput) noexcept |
Fetch a 64 bit unsigned reverse endian integer from memory with byte alignment. | |
float | _load_unaligned_swap (const float *pInput) noexcept |
Fetch a 32 bit reverse endian float from memory with byte alignment. | |
double | _load_unaligned_swap (const double *pInput) noexcept |
Fetch a 64 bit reverse endian float from memory with byte alignment. | |
void | _store_unaligned_swap (uint16_t *pOutput, uint16_t uInput) noexcept |
Store a 16 bit unsigned value with endian swapping to memory with byte alignment. | |
void | _store_unaligned_swap (uint32_t *pOutput, uint32_t uInput) noexcept |
Store a 32 bit unsigned value with endian swapping to memory with byte alignment. | |
void | _store_unaligned_swap (uint64_t *pOutput, uint64_t uInput) noexcept |
Store a 64 bit unsigned value with endian swapping to memory with byte alignment. | |
void | _store_unaligned_swap (float *pOutput, float fInput) noexcept |
Store a float value to memory with endian swapping with byte alignment. | |
void | _store_unaligned_swap (double *pOutput, double dInput) noexcept |
Store a double value to memory with endian swapping with byte alignment. | |
void | swap_endian (uint16_t *pInput, uintptr_t uElements) noexcept |
Reverse the endian of an array of 16-bit integers. | |
void | swap_endian (uint16_t *pOutput, const uint16_t *pInput, uintptr_t uElements) noexcept |
Reverse the endian of a copied array of 16-bit integers. | |
void | swap_endian (uint32_t *pInput, uintptr_t uElements) noexcept |
Reverse the endian of an array of 32-bit integers. | |
void | swap_endian (uint32_t *pOutput, const uint32_t *pInput, uintptr_t uElements) noexcept |
Reverse the endian of a copied array of 32-bit integers. | |
void | swap_endian (uint64_t *pInput, uintptr_t uElements) noexcept |
Reverse the endian of an array of 64-bit integers. | |
void | swap_endian (uint64_t *pOutput, const uint64_t *pInput, uintptr_t uElements) noexcept |
Reverse the endian of a copied array of 64-bit integers. | |
void | swap_chars_to_bytes (void *pInput, uintptr_t uLength) noexcept |
Add 128 to every byte to convert a char to a byte or vice versa. | |
void | swap_chars_to_bytes (void *pOutput, const void *pInput, uintptr_t uLength) noexcept |
Add 128 to every byte to convert a char to a byte or vice versa. | |
e8087Precision | get_8087_precision (void) noexcept |
Get the floating point precision. | |
e8087Precision | set_8087_precision (e8087Precision uInput) noexcept |
Change the floating point precision. | |
e8087Rounding | get_8087_rounding (void) noexcept |
Get the floating point rounding setting. | |
e8087Rounding | set_8087_rounding (e8087Rounding uInput) noexcept |
Change the floating point precision. | |
uint32_t | set_mxcsr_flags (uint32_t uOrFlags, uint32_t uAndFlags) noexcept |
Change the SSE floating point precision. | |
ePowerPCRounding | get_PowerPC_rounding (void) |
Get the floating point rounding setting. | |
ePowerPCRounding | set_PowerPC_rounding (ePowerPCRounding uInput) |
Change the floating point precision. | |
float | get_sign (float fInput) noexcept |
Return sign constant. | |
double | get_sign (double dInput) noexcept |
Return sign constant. | |
constexpr float | square (float fInput) noexcept |
Return the square of the input. | |
constexpr double | square (double dInput) noexcept |
Return the square of the input. | |
float | absolute (float fInput) noexcept |
Get the absolute value of a float. | |
double | absolute (double dInput) noexcept |
Get the absolute value of a double. | |
float | square_root (float fInput) noexcept |
Get the square root value of a float. | |
double | square_root (double dInput) noexcept |
Get the square root value of a double. | |
constexpr float | int_to_float (int32_t iInput) noexcept |
32 bit integer to floating point conversion | |
float | int_to_float (const int32_t *pInput) noexcept |
32 bit integer to floating point conversion | |
void | int_to_float (float *pOutput, int32_t iInput) noexcept |
32 bit integer to floating point conversion | |
constexpr float | fixed_to_float (Fixed32 fInput) noexcept |
32 bit 16.16 fixed point integer to floating point conversion | |
float | fixed_to_float (const Fixed32 *pInput) noexcept |
32 bit 16.16 fixed point integer to floating point conversion | |
void | fixed_to_float (float *pOutput, Fixed32 fInput) noexcept |
32 bit 16.16 fixed point integer to floating point conversion | |
void | int_to_float (float *pOutput, const int32_t *pInput) noexcept |
32 bit integer to floating point conversion | |
void | fixed_to_float (float *pOutput, const Fixed32 *pInput) noexcept |
32 bit 16.16 fixed point integer to floating point conversion | |
constexpr float | interpolate (float fFrom, float fTo, float fFactor) noexcept |
Interpolate between two floating point values. | |
constexpr double | interpolate (double dFrom, double dTo, double dFactor) noexcept |
Interpolate between two floating point values. | |
template<typename T > | |
T | clamp (T Input, T Min, T Max) noexcept |
Clamp the input between a bounds. | |
uint_t | is_NaN (float fInput) noexcept |
Return TRUE if the value is a NaN. | |
uint_t | is_NaN (double dInput) noexcept |
Return TRUE if the value is a NaN. | |
uint_t | is_infinite (float fInput) noexcept |
Return TRUE if the value is infinity. | |
uint_t | is_infinite (double dInput) noexcept |
Return TRUE if the value is infinity. | |
uint_t | is_finite (float fInput) noexcept |
Return TRUE if the value is finite. | |
uint_t | is_finite (double dInput) noexcept |
Return TRUE if the value is finite. | |
uint_t | is_normal (float fInput) noexcept |
Return TRUE if the value is normal. | |
uint_t | is_normal (double dInput) noexcept |
Return TRUE if the value is normal. | |
uint_t | get_sign_bit (float fInput) noexcept |
Return TRUE if the value is negative. | |
uint_t | get_sign_bit (double dInput) noexcept |
Return TRUE if the value is negative. | |
uint_t | equal_with_epsilon (float fInput1, float fInput2) noexcept |
Return TRUE if the values are less than epsilon apart. | |
uint_t | equal_with_epsilon (double dInput1, double dInput2) noexcept |
Return TRUE if the values are less than epsilon apart. | |
uint_t | equal_with_epsilon (float fInput1, float fInput2, float fEpsilon) noexcept |
Return TRUE if the values are less than epsilon apart. | |
uint_t | equal_with_epsilon (double dInput1, double dInput2, double dEpsilon) noexcept |
Return TRUE if the values are less than epsilon apart. | |
float | get_floor (float fInput) noexcept |
Return a floating point number with the fraction removed. | |
double | get_floor (double dInput) noexcept |
Return a floating point number with the fraction removed. | |
float | get_ceiling (float fInput) noexcept |
Return a floating point number rounded up. | |
double | get_ceiling (double dInput) noexcept |
Return a floating point number rounded up. | |
float | get_round (float fInput) noexcept |
Return a floating point number rounded to the nearest integer. | |
double | get_round (double dInput) noexcept |
Return a floating point number rounded to the nearest integer. | |
float | round_to_zero (float fInput) noexcept |
Return a floating point number rounded to zero. | |
double | round_to_zero (double dInput) noexcept |
Return a floating point number rounded to zero. | |
float | modulo_radians (float fInput) noexcept |
Modulo the range of the input so that -BURGER_PI <= fInput < BURGER_PI. | |
double | modulo_radians (double dInput) noexcept |
Modulo the range of the input so that -BURGER_PI <= fInput < BURGER_PI. | |
float | sine_387 (float fInput) noexcept |
Return the sine from radians. | |
double | sine_387 (double fInput) noexcept |
Return the sine from radians. | |
float | cosine_387 (float fInput) noexcept |
Return the cosine from radians. | |
double | cosine_387 (double fInput) noexcept |
Return the cosine from radians. | |
float | get_sine_3_digits (float fInput) noexcept |
Return the sine from radians accurate to +-0.000597239. | |
float | get_cosine_3_digits (float fInput) noexcept |
Return the cosine from radians accurate to +-0.000597239. | |
float | get_sine_5_digits (float fInput) noexcept |
Return the sine from radians accurate to +-7.49199e-06. | |
float | get_cosine_5_digits (float fInput) noexcept |
Return the cosine from radians accurate to +- 7.49199e-06. | |
float | get_sine_6_digits (float fInput) noexcept |
Return the sine from radians accurate to +-1.03892e-06. | |
float | get_cosine_6_digits (float fInput) noexcept |
Return the cosine from radians accurate to +-1.1407e-06. | |
float | get_sine (float fInput) noexcept |
Return the sine from radians. | |
float | get_cosine (float fInput) noexcept |
Return the cosine from radians. | |
double | get_sine_7_digits (double dInput) noexcept |
Return the sine from radians accurate to +-2.05542e-06. | |
double | get_cosine_7_digits (double dInput) noexcept |
Return the cosine from radians accurate to +-2.05542e-06. | |
double | get_sine_12_digits (double dInput) noexcept |
Return the sine from radians accurate to +-7.48669e-13. | |
double | get_cosine_12_digits (double dInput) noexcept |
Return the cosine from radians accurate to +-7.48669e-13. | |
double | get_sine_18_digits (double dInput) noexcept |
Return the sine from radians. | |
double | get_cosine_18_digits (double dInput) noexcept |
Return the cosine from radians. | |
double | get_sine (double dInput) noexcept |
Return the sine from radians accurate to +-1.16573e-15. | |
double | get_cosine (double dInput) noexcept |
Return the cosine from radians accurate to +-1.34615e-15. | |
float | get_tangent (float fInput) noexcept |
double | get_tangent (double dInput) noexcept |
float | get_arcsine (float fInput) noexcept |
double | get_arcsine (double dInput) noexcept |
float | get_arccosine (float fInput) noexcept |
double | get_arccosine (double dInput) noexcept |
float | get_arctangent (float fInput) noexcept |
double | get_arctangent (double dInput) noexcept |
float | get_arctangent2 (float fSin, float fCos) noexcept |
double | get_arctangent2 (double dSin, double dCos) noexcept |
float | get_power (float fX, float fY) noexcept |
double | get_power (double dX, double dY) noexcept |
float | get_exponent (float fInput) noexcept |
double | get_exponent (double dInput) noexcept |
float | get_logarithm (float fInput) noexcept |
double | get_logarithm (double dInput) noexcept |
float | get_logarithm2 (float fInput) noexcept |
double | get_logarithm2 (double dInput) noexcept |
float | get_logarithm10 (float fInput) noexcept |
double | get_logarithm10 (double dInput) noexcept |
float | get_fraction (float fInput, float *pInteger) noexcept |
double | get_fraction (double dInput, double *pInteger) noexcept |
float | get_modulo (float fInput, float fDivisor) noexcept |
double | get_modulo (double dInput, double dDivisor) noexcept |
double | little_endian_load_extended (const Float80Bit pInput) noexcept |
Load a little endian 80 bit float as a double. | |
double | big_endian_load_extended (const Float80Bit pInput) noexcept |
Load a big endian 80 bit float as a double. | |
long | convert_to_DirectSound_volume (uint_t uInput) noexcept |
Convert a linear volume to decibels. | |
long | convert_to_DirectSound_volume (float fInput) noexcept |
Convert a linear volume to decibels. | |
long | convert_to_DirectSound_pan (uint_t uInput) noexcept |
Convert a linear pan to decibels. | |
long | convert_to_DirectSound_pan (float fInput) noexcept |
Convert a linear pan to decibels. | |
float | convert_to_AudioUnit_volume (uint_t uInput) noexcept |
Convert a linear volume to 0.0f to 1.0f. | |
float | convert_to_AudioUnit_pan (uint_t uInput) noexcept |
Convert a linear pan to 0.0f to 1.0f. | |
float | decibels_to_amplitude_ratio (float fDecibels) noexcept |
Convert a DirectSound decibel value to an XAudio2 Amplitude multiplier. | |
float | amplitude_ratio_to_decibels (float fVolume) noexcept |
Convert a XAudio2 Amplitude multiplier to a DirectSound decibel value. | |
uint_t | get_low_word (uint32_t uInput) noexcept |
Retrieves the low-order word from the specified value. | |
uint_t | get_high_word (uint32_t uInput) noexcept |
Retrieves the low-order word from the specified value. | |
Fixed32 | int_to_fixed (int32_t iInput) noexcept |
Convert an int32_t into a Fixed32 value. | |
Fixed32 | int_to_fixed_saturate (int32_t iInput) noexcept |
Convert an int32_t into a Fixed32 value with saturation. | |
int32_t | fixed_to_int_floor (Fixed32 fInput) noexcept |
Convert a fixed point value to an integer using round down. | |
int32_t | fixed_to_int (Fixed32 fInput) noexcept |
Convert a fixed point value to an integer using round to zero. | |
int32_t | fixed_to_int_ceil (Fixed32 fInput) noexcept |
Convert a fixed point value to an integer using round up. | |
int32_t | fixed_to_int_nearest (Fixed32 fInput) noexcept |
Convert a fixed point value to an integer using round to nearest. | |
int32_t | float_to_int_floor (float fInput) noexcept |
Convert a 32 bit float to an integer using floor(). | |
void | float_to_int_floor (int32_t *pOutput, float fInput) noexcept |
Convert a 32 bit float to an integer using floor(). | |
int32_t | float_to_int_ceil (float fInput) noexcept |
Convert a 32 bit float to an integer using ceil(). | |
void | float_to_int_ceil (int32_t *pOutput, float fInput) noexcept |
Convert a 32 bit float to an integer using ceil(). | |
int32_t | float_to_int_round (float fInput) noexcept |
Convert a 32 bit float to an integer using round to nearest. | |
void | float_to_int_round (int32_t *pOutput, float fInput) noexcept |
Convert a 32 bit float to an integer using round to nearest. | |
int32_t | float_to_int_round_to_zero (float fInput) noexcept |
Convert a 32 bit float to an integer using round to zero. | |
void | float_to_int_round_to_zero (int32_t *pOutput, float fInput) noexcept |
Convert a 32 bit float to an integer using round to zero. | |
Fixed32 | float_to_fixed_floor (float fInput) noexcept |
Convert a 32 bit float to a Fixed32 using floor(). | |
void | float_to_fixed_floor (Fixed32 *pOutput, float fInput) noexcept |
Convert a 32 bit float to a Fixed32 using floor(). | |
Fixed32 | float_to_fixed_ceil (float fInput) noexcept |
Convert a 32 bit float to a Fixed32 using ceil(). | |
void | float_to_fixed_ceil (Fixed32 *pOutput, float fInput) noexcept |
Convert a 32 bit float to a Fixed32 using ceil(). | |
Fixed32 | float_to_fixed_round (float fInput) noexcept |
Convert a 32 bit float to a Fixed32 using round to nearest. | |
void | float_to_fixed_round (Fixed32 *pOutput, float fInput) noexcept |
Convert a 32 bit float to a Fixed32 using round to nearest. | |
Fixed32 | float_to_fixed_round_to_zero (float fInput) noexcept |
Convert a 32 bit float to a Fixed32 using round to zero. | |
void | float_to_fixed_round_to_zero (Fixed32 *pOutput, float fInput) noexcept |
Convert a 32 bit float to a Fixed32 using round to zero. | |
int8_t | absolute (int8_t iInput) |
Get the absolute value of an integer. | |
int16_t | absolute (int16_t iInput) noexcept |
Get the absolute value of an integer. | |
int32_t | absolute (int32_t iInput) noexcept |
Get the absolute value of an integer. | |
int64_t | absolute (int64_t iInput) noexcept |
Get the absolute value of a 64 bit integer. | |
int8_t | ClampZero (int8_t iInput) noexcept |
Clamp an integer to 0. | |
int16_t | ClampZero (int16_t iInput) noexcept |
Clamp an integer to 0. | |
int32_t | ClampZero (int32_t iInput) noexcept |
Clamp an integer to 0. | |
int64_t | ClampZero (int64_t iInput) noexcept |
Clamp an integer to 0. | |
constexpr int8_t | get_sign (int8_t iInput) noexcept |
Get the sign value of an integer. | |
constexpr int16_t | get_sign (int16_t iInput) noexcept |
Get the sign value of an integer. | |
constexpr int32_t | get_sign (int32_t iInput) noexcept |
Get the sign value of an integer. | |
constexpr int64_t | get_sign (int64_t iInput) noexcept |
Get the sign value of a 64 bit integer. | |
Fixed32 | FixedMultiply (Fixed32 fInput1, Fixed32 fInput2) |
Multiply two 16.16 fixed point numbers. | |
Fixed32 | FixedDivide (Fixed32 fInputNumerator, Fixed32 fInputDenominator) |
Divide two 16.16 fixed point numbers. | |
Fixed32 | FixedReciprocal (Fixed32 fInput) |
Return the reciprocal of a fixed point number. | |
uint32_t | square_root (uint32_t uInput) |
Get the square root of an integer. | |
uint32_t | SqrtFixedToWord32 (Fixed32 fInput) |
Get the square root of a Fixed32. | |
Fixed32 | square_root (Fixed32 uInput) |
Get the square root of a Fixed32. | |
uint32_t | RotateLeft (uint32_t uInput, uint_t uShiftCount) noexcept |
Rotate the bits left. | |
uint32_t | RotateRight (uint32_t uInput, uint_t uShiftCount) noexcept |
Rotate the bits right. | |
uint64_t | RotateLeft (uint64_t uInput, uint_t uShiftCount) noexcept |
Rotate the bits left. | |
uint64_t | RotateRight (uint64_t uInput, uint_t uShiftCount) noexcept |
Rotate the bits right. | |
void | MemoryCopy (void *pOutput, const void *pInput, uintptr_t uCount) noexcept |
Copy raw memory from one buffer to another. | |
void | MemoryMove (void *pOutput, const void *pInput, uintptr_t uCount) noexcept |
Copy raw memory from one buffer to another in any direction. | |
void | MemoryClear (void *pOutput, uintptr_t uCount) noexcept |
Set a buffer to all zeros. | |
void | MemoryFill (void *pOutput, uint8_t uFill, uintptr_t uCount) noexcept |
Set a buffer to a specific value. | |
void | MemoryNot (void *pOutput, uintptr_t uCount) noexcept |
Exclusive or a buffer with 0xFF. | |
void | MemoryNot (void *pOutput, const void *pInput, uintptr_t uCount) noexcept |
Copy a buffer that's been exclusive or'd with 0xFF. | |
void | MemoryXor (void *pOutput, uint8_t uXor, uintptr_t uCount) noexcept |
Exclusive or a buffer with a value. | |
void | MemoryXor (void *pOutput, const void *pInput, uint8_t uXor, uintptr_t uCount) noexcept |
Exclusive or a buffer with a value and store the result in another buffer. | |
void | MemoryXor (void *pOutput, const void *pInput, uintptr_t uCount) noexcept |
Exclusive or a buffer with another buffer. | |
void | MemoryXor (void *pOutput, const void *pInput1, const void *pInput2, uintptr_t uCount) noexcept |
Exclusive or a buffer with another buffer and store the result in a third buffer. | |
int | MemoryCompare (const void *pInput1, const void *pInput2, uintptr_t uCount) noexcept |
Compare two byte buffers for equality. | |
int | MemoryCaseCompare (const void *pInput1, const void *pInput2, uintptr_t uCount) noexcept |
Compare two byte buffers for equality, case insensitive. | |
char * | MemoryCharacter (const char *pInput, uintptr_t uInputSize, int iChar) noexcept |
Scan for the first occurrence of a specific character in a byte array. | |
uint16_t * | MemoryCharacter (const uint16_t *pInput, uintptr_t uInputSize, uint_t uChar) noexcept |
Scan for the first occurrence of a specific character in a short array. | |
char * | MemoryCharacterReverse (const char *pInput, uintptr_t uInputSize, int iChar) noexcept |
Scan for the last occurrence of a specific character in a buffer. | |
uint16_t * | MemoryCharacterReverse (const uint16_t *pInput, uintptr_t uInputSize, uint_t uChar) noexcept |
Scan for the last occurrence of a specific character in a uint16_t buffer. | |
void | OkAlertMessage (const char *pMessage, const char *pTitle=nullptr) noexcept |
Display a dialog box. | |
uint_t | OkCancelAlertMessage (const char *pMessage, const char *pTitle=nullptr) noexcept |
Display a dialog to alert the user of a possible error condition or message. | |
uint_t | is_debugger_present (void) noexcept |
Detect if a debugger is attached. | |
uint_t | is_macsbug_installed (void) noexcept |
Test if macsbug is installed. | |
uint_t | is_metronub_installed (void) noexcept |
Test if Metrowerks Metronub is installed. | |
void | InitFileInfo (FileInfo *pFileInfo) noexcept |
Initialize a Mac Finder FileInfo. | |
void | InitFSRefParam (FSRefParam *pFSRefParam, FSRef *pFSRef, uint32_t uCatInfoBitmap) noexcept |
Initialize a Mac FSRefParam. | |
int | GetFilenameFromPathname (uint8_t *pOutput, const uint8_t *pInput) noexcept |
Extract a filename at the end of a MacOS path. | |
int | GetFileLocation (short *pVRefNum, long *pDirID, uint8_t *pOutputFilename, short iFileRefNum) noexcept |
Find a file location from a file reference number. | |
int | GetFileLocation (FSSpec *pOutput, short iFileRefNum) noexcept |
Find the FSSpec from a file reference number. | |
int | GetFileLocation (FSRef *pOutput, short iFileRefNum) noexcept |
Use an open file reference to return the FSRef. | |
int | CreateEmptyFile (short svRefNum, long lDirID, const uint8_t *pFilename) noexcept |
Call PBHCreateSync() to create a file. | |
int | CreateEmptyFile (const FSSpec *pFSSpec) noexcept |
Call FSpCreate() to create a file. | |
int | CreateEmptyFile (FSRef *pOutput, const FSRef *pFSSpec, const char *pName) noexcept |
Call PBCreateFileUnicodeSync() to create a file. | |
int | CheckForForks (short svRefNum, long lDirID, const uint8_t *pName, uint_t *pbDataFork, uint_t *pbResourceFork) noexcept |
Test if a file has either a resource or data fork. | |
int | CheckForForks (const FSSpec *pFSSpec, uint_t *pbDataFork, uint_t *pbResourceFork) noexcept |
Test if a file has either a resource or data fork. | |
int | CheckForForks (const FSRef *pFSRef, uint_t *pbDataFork, uint_t *pbResourceFork) noexcept |
Test if a file has either a resource or data fork. | |
int | DoCopyFile (short svRefNumDest, long lDirIDDest, const uint8_t *pFilenameDest, short svRefNumSource, long lDirIDSource, const uint8_t *pFilenameSource) noexcept |
Copy a file using PBHCopyFileSync() | |
int | DoCopyFile (const FSSpec *pFSDest, const FSSpec *pFSSource) noexcept |
Copy a file using PBHCopyFileSync() | |
int | CopyForkClassic (short iDestRefNum, short iSourceRefNum, uint8_t *pBuffer, uintptr_t uBufferSize) noexcept |
Copy a fork of a file using FSSpec APIs. | |
int | CopyForkCarbon (short iDestRefNum, short iSourceRefNum, uint8_t *pBuffer, uintptr_t uBufferSize) noexcept |
Copy a fork of a file using FSRef APIs. | |
int | CopyFileMgrAttributes (short svRefNumDest, long lDirIDDest, const uint8_t *pFilenameDest, short svRefNumSource, long lDirIDSource, const uint8_t *pFilenameSource, uint_t bCopyLockBit=1) noexcept |
Copy file manager metadata from one file to another. | |
int | CopyFileMgrAttributes (const FSSpec *pDestSpec, const FSSpec *pSourceSpec, uint_t bCopyLockBit=1) noexcept |
Copy file manager metadata from one file to another. | |
int | CopyFileMgrAttributes (const FSRef *pDestRef, const FSRef *pSourceRef, uint_t bCopyLockBit=1) noexcept |
Copy file manager metadata from one file to another. | |
int | DoPBXGetVolInfoSync (XVolumeParam *pXVolumeParam) noexcept |
Call PBXGetVolInfoSync() on all targets. | |
int | GetVolumeInfo (HParamBlockRec *pOutput, short sVRefNum) noexcept |
Obtain information about a volume. | |
int | GetVolumeInfo (XVolumeParam *pOutput, short svRefNum) noexcept |
Obtain information about an extended volume. | |
int | DetermineVRefNum (short *pOutput, short svRefNum) noexcept |
Find the real volume reference number. | |
int | CheckVolLock (short svRefNum) noexcept |
Check if a volume is locked. | |
int | DoGetCatInfo (CInfoPBRec *pOutput, uint8_t pOutputName[256], short sVRefNum, long lDirID, const uint8_t *pName) noexcept |
Call PBGetCatInfoSync() quickly. | |
int | DoGetCatInfo (CInfoPBRec *pOutput, uint8_t pOutputName[256], const FSSpec *pFSSpec) noexcept |
Call PBGetCatInfoSync() quickly. | |
int | DoGetCatInfo (FSCatalogInfo *pOutput, FSRefParam *pRefParam, const FSRef *pFSRef, uint32_t uCatInfoBitmap) noexcept |
Call PBGetCatalogInfoSync() quickly. | |
int | DoGetCatInfo (CInfoPBRec *pOutput, short sVRefNum, long lDirID, const uint8_t *pName) noexcept |
Call PBGetCatInfoSync() quickly. | |
int | DoGetCatInfo (CInfoPBRec *pOutput, const FSSpec *pFSSpec) noexcept |
Call PBGetCatInfoSync() quickly. | |
int | DoGetCatInfo (FSCatalogInfo *pOutput, const FSRef *pFSRef, uint32_t uCatInfoBitmap) noexcept |
Call PBGetCatalogInfoSync() quickly. | |
int | GetDirectoryInfo (DInfo *pFinderInfo, short sVRefNum, long lDirID, const uint8_t *pName) noexcept |
Get Finder DInfo for a directory. | |
int | GetDirectoryInfo (DInfo *pFinderInfo, const FSSpec *pFSSpec) noexcept |
Get Finder DInfo for a directory using a FSSpec. | |
int | GetDirectoryInfo (DInfo *pFinderInfo, const FSRef *pFSRef) noexcept |
Get Finder DInfo for a directory using a FSRef. | |
int | GetDestinationDirectoryInfo (short sVRefNum, long lDirID, const uint8_t *pName, long *pDirID, uint_t *pbDirectory, uint_t *pbDropBox) noexcept |
Get common information from a directory. | |
int | GetDestinationDirectoryInfo (const FSSpec *pFSSpec, long *pDirID, uint_t *pbDirectory, uint_t *pbDropBox) noexcept |
Get common information from a directory. | |
int | GetDestinationDirectoryInfo (const FSRef *pFSRef, long *pDirID, uint_t *pbDirectory, uint_t *pbDropBox) noexcept |
Get common information from a directory. | |
int | GetCommentID (short *pCommentID, short sVRefNum, long lDirID, const uint8_t *pName) noexcept |
Get finder comment ID. | |
int | GetCommentID (short *pCommentID, const FSSpec *pFSSpec) noexcept |
Get finder comment ID. | |
int | GetCommentID (short *pCommentID, const FSRef *pFSRef) noexcept |
Get finder comment ID. | |
int | GetDirectoryID (short sVRefNum, long lDirID, const uint8_t *pName, long *pDirID, uint_t *pbDirectory) noexcept |
Get directory ID of a named directory. | |
int | GetDirectoryID (const FSSpec *pFSSpec, long *pDirID, uint_t *pbDirectory) noexcept |
Get directory ID of a named directory. | |
int | GetDesktopFileName (uint8_t *pDesktopName, short svRefNum) noexcept |
Determine the name of the Finder Desktop Database. | |
int | GetCommentFromDesktopFile (char *pComment, short svRefNum, long lDirID, const uint8_t *pFileName) noexcept |
Load in a comment from a Desktop resource file. | |
int | DesktopOpen (const uint8_t *pVolumeName, short vRefNum, short *pRefNum, uint_t *pbDatabaseCreated) noexcept |
Open the desktop manager database. | |
int | DesktopGetComment (char *pOutput, short svRefNum, long lDirID, const uint8_t *pFilename) noexcept |
Get a comment from the Desktop Manager. | |
int | DesktopSetComment (short svRefNum, long lDirID, const uint8_t *pFilename, const char *pComment) noexcept |
Get a comment from the Desktop Manager. | |
int | DesktopCopyComment (short svRefNumDest, long lDirIDDest, const uint8_t *pFilenameDest, short svRefNumSource, long lDirIDSource, const uint8_t *pFilenameSource) noexcept |
Copy a comment from one file to another. | |
int | DesktopCopyComment (const FSSpec *pFSSpecDest, const FSSpec *pFSSpecSource) noexcept |
Copy a comment from one file to another. | |
int | DesktopCopyComment (const FSRef *pFSRefDest, const FSRef *pFSRefSource) noexcept |
Copy a comment from one file to another. | |
int | PreflightFileCopySpace (short svRefNumSource, long lDirIDSource, const uint8_t *pFilenameSource, const uint8_t *pVolumenameDest, short svRefNumDest, uint_t *pbSpaceAvailable) noexcept |
Determine if a destination volume has free file space. | |
int | OpenAware (short svRefNum, long lDirID, const uint8_t *pFilename, short sDenyModes, short *pRefNum) noexcept |
Open a file with OpenDeny modes. | |
int | OpenAware (const FSSpec *pFSSpec, short sDenyModes, short *pRefNum) noexcept |
Open a file with OpenDeny modes. | |
int | OpenRFAware (short svRefNum, long lDirID, const uint8_t *pFilename, short sDenyModes, short *pRefNum) noexcept |
Open a resource fork with OpenDeny modes. | |
int | OpenRFAware (const FSSpec *pFSSpec, short sDenyModes, short *pRefNum) noexcept |
Open a resource fork with OpenDeny modes. | |
int | FileCopy (short svRefNumSource, long lDirIDSource, const uint8_t *pFilenameSource, short svRefNumDest, long lDirIDDest, const uint8_t *pFilenameDest, const uint8_t *pCopyname, void *pBuffer, uintptr_t uBufferSize, uint_t bPreflight) noexcept |
Copy a file, with AppleShare awareness. | |
int | FileCopy (const FSSpec *pFSSpecSource, const FSSpec *pFSSpecDestFolder, const uint8_t *pCopyname, void *pBuffer, uintptr_t uBufferSize, uint_t bPreflight) noexcept |
Copy a file, with AppleShare awareness. | |
CodeLibrary * | GetInterfaceLib (void) noexcept |
Load InterfaceLib for manual linking. | |
CodeLibrary * | GetDriverLoaderLib (void) noexcept |
Load DriverLoaderLib for manual linking. | |
CodeLibrary * | GetNameRegistryLib (void) noexcept |
Load NameRegistryLib for manual linking. | |
void | PrintHexDigit (uint_t uInput) noexcept |
Print a hex character to standard out. | |
void | PrintHex (uint8_t uInput) noexcept |
Print an 8 bit value in hex to standard out. | |
void | PrintHex (uint16_t uInput) noexcept |
Print a 16 bit value in hex to standard out. | |
void | PrintHex (uint32_t uInput) noexcept |
Print a 32 bit value in hex to standard out. | |
void | PrintHex (uint64_t uInput) noexcept |
Print a 64 bit value in hex to standard out. | |
void | PrintHex (char iInput) noexcept |
Print a char in hex to standard out. | |
void | PrintHex (signed char iInput) noexcept |
Print a signed char in hex to standard out. | |
void | PrintHex (short iInput) noexcept |
Print a short in hex to standard out. | |
void | PrintHex (int iInput) noexcept |
Print an integer in hex to standard out. | |
void | PrintHex (long iInput) noexcept |
Print a long integer in hex to standard out. | |
void | PrintHex (long long iInput) noexcept |
Print a long long integer in hex to standard out. | |
void | PrintHex (wchar_t uInput) noexcept |
Print a wchar_t in hex to standard out. | |
void | PrintHex (unsigned int uInput) noexcept |
Print an unsigned integer in hex to standard out. | |
void | PrintHex (unsigned long uInput) noexcept |
Print an unsigned long integer in hex to standard out. | |
void | PrintHex (float fInput) noexcept |
Print a 32 bit floating pointer number in hex to standard out. | |
void | PrintHex (double dInput) noexcept |
Print a 64 bit floating point number in hex to standard out. | |
void | ClearConsole (void) noexcept |
Clear the text console. | |
uint_t | has_CPUID (void) noexcept |
Return TRUE if the instruction CPUID is present. | |
void | CPUID (CPUID_t *pOutput) noexcept |
Fill in a CPUID_t structure. | |
uint_t | has_AltiVec (void) noexcept |
Return TRUE if the AltiVec instruction set is present. | |
uint_t | has_PPC_fsqrt (void) noexcept |
Return TRUE if floating point sqrt is supported in hardware. | |
uint_t | has_68kFPU (void) noexcept |
Return TRUE if floating point is supported in hardware. | |
uint_t | atomic_compare_and_set (volatile uint32_t *pOutput, uint32_t uOld, uint32_t uNew) noexcept |
Atomically swaps a 32 bit value for one in memory. | |
uint32_t | atomic_set (volatile uint32_t *pOutput, uint32_t uInput) noexcept |
Atomically sets a 32 bit value to memory. | |
uint32_t | atomic_get (volatile uint32_t *pInput) noexcept |
Atomically gets a 32 bit value from memory. | |
uint32_t | atomic_add (volatile uint32_t *pOutput, uint32_t uInput) noexcept |
Atomically add a 32 bit value to a variable in memory. | |
uint_t | atomic_trylock (volatile uint32_t *pInput) noexcept |
Attempt to lock a spin lock. | |
void | atomic_lock (volatile uint32_t *pInput) noexcept |
Lock a spin lock. | |
void | atomic_unlock (volatile uint32_t *pInput) noexcept |
Unlock a spin lock. | |
uint_t | atomic_compare_and_set (volatile uint64_t *pOutput, uint64_t uOld, uint64_t uNew) noexcept |
Atomically swaps a 64 bit value for one in memory. | |
uint64_t | atomic_set (volatile uint64_t *pOutput, uint64_t uInput) noexcept |
Atomically sets a 64 bit value for one in memory. | |
uint64_t | atomic_get (volatile uint64_t *pInput) noexcept |
Atomically gets a 64 bit value from memory. | |
uint64_t | atomic_add (volatile uint64_t *pOutput, uint64_t uInput) noexcept |
Atomically add a 64 bit value to a variable in memory. | |
uint32_t | AsciiToInteger (const char *pInput, const char **pDest=nullptr) noexcept |
Convert an ASCII string into an integer. | |
int_t | AsciiToInteger (const char *pInput, int_t iDefault, int_t iMin=INT32_MIN, int_t iMax=INT32_MAX) noexcept |
Return a signed integer value. | |
uint_t | AsciiToInteger (uint32_t *pOutput, const char *pInput) noexcept |
Convert a 32 bit integer and signal if successful. | |
uint_t | AsciiToWord (const char *pInput, uint_t uDefault, uint_t uMin=0, uint_t uMax=0xFFFFFFFFU) noexcept |
Return an unsigned integer value. | |
uint64_t | AsciiToInteger64 (const char *pInput, const char **pDest=nullptr) noexcept |
Convert an ASCII string into a 64 bit integer. | |
int64_t | AsciiToInteger64 (const char *pInput, int64_t iDefault, int64_t iMin=INT64_MIN, int64_t iMax=INT64_MAX) noexcept |
Return a signed integer value. | |
uint_t | AsciiToInteger64 (uint64_t *pOutput, const char *pInput) noexcept |
Convert a 64 bit integer and signal if successful. | |
uint64_t | AsciiToWord64 (const char *pInput, uint64_t uDefault, uint64_t uMin=0, uint64_t uMax=0xFFFFFFFFFFFFFFFFULL) noexcept |
Return an unsigned integer value. | |
float | AsciiToFloat (const char *pInput, const char **pDest=nullptr) noexcept |
Convert an ASCII string into a floating point number. | |
double | AsciiToDouble (const char *pInput, const char **pDest=nullptr) noexcept |
Convert an ASCII string into a floating point number. | |
uint_t | AsciiToBoolean (const char *pInput, const char **pDest=nullptr) noexcept |
Convert an ASCII string into a boolean. | |
uint_t | AsciiToBoolean (const char *pInput, uint_t bDefault) noexcept |
Convert an ASCII string into a boolean. | |
uint_t | AsciiToBoolean (uint_t *pOutput, const char *pInput) noexcept |
Convert an ASCII string into a boolean and signal if successful. | |
float | AsciiToFloat (const char *pInput, float fDefault) noexcept |
Return a floating point value. | |
float | AsciiToFloat (const char *pInput, float fDefault, float fMin, float fMax) noexcept |
Return a floating point value. | |
uint_t | AsciiToFloat (float *pOutput, const char *pInput) noexcept |
Return a floating point value and signal if successful. | |
double | AsciiToDouble (const char *pInput, double dDefault) noexcept |
Return a 64 bit floating point value. | |
double | AsciiToDouble (const char *pInput, double dDefault, double dMin, double dMax) noexcept |
Return a 64 bit floating point value. | |
uint_t | AsciiToDouble (double *pOutput, const char *pInput) noexcept |
Return a 64 bit floating point value and signal if successful. | |
uint32_t | AsciiHexToInteger (const char *pInput, uintptr_t uLength) noexcept |
Convert hex ASCII string to an integer. | |
uint32_t | AsciiHexToInteger (const uint16_t *pInput, uintptr_t uLength) noexcept |
Convert hex UTF-16 string to an integer. | |
char * | NumberToAsciiHex (char *pOutput, uint8_t uInput) noexcept |
Convert an 8 bit value into a hex string. | |
char * | NumberToAsciiHex (char *pOutput, uint16_t uInput) noexcept |
Convert a 16 bit value into a hex string. | |
char * | NumberToAsciiHex (char *pOutput, uint32_t uInput) noexcept |
Convert a 32 bit value into a hex string. | |
char * | NumberToAsciiHex (char *pOutput, uint64_t uInput) noexcept |
Convert a 64 bit value into a hex string. | |
char * | NumberToAsciiHex (char *pOutput, float fInput) noexcept |
Convert a 32 bit floating point value into a hex string. | |
char * | NumberToAsciiHex (char *pOutput, double dInput) noexcept |
Convert a 64 bit floating point value into a hex string. | |
template<class T > | |
char * | NumberToAsciiHex (char *pOutput, T input) noexcept |
Convert a integral value into a hex string. | |
char * | NumberToAsciiHex (char *pOutput, uint32_t uInput, uint_t uDigits) noexcept |
Convert an unsigned 32 bit integer into hexadecimal ASCII. | |
char * | NumberToAsciiHex (char *pOutput, uint64_t uInput, uint_t uDigits) noexcept |
Convert an unsigned 64 bit integer into hexadecimal ASCII. | |
char * | NumberToAsciiHex (char *pOutput, float fInput, uint_t uDigits) noexcept |
Convert a 32 bit float into hexadecimal ASCII. | |
char * | NumberToAsciiHex (char *pOutput, double dInput, uint_t uDigits) noexcept |
Convert a 64 bit float into hexadecimal ASCII. | |
char * | NumberToAsciiHex (char *pOutput, uint8_t uInput, uint_t uDigits) noexcept |
char * | NumberToAsciiHex (char *pOutput, uint16_t uInput, uint_t uDigits) noexcept |
template<class T > | |
char * | NumberToAsciiHex (char *pOutput, T input, uint_t uDigits) noexcept |
Convert a integral value into a hex string. | |
char * | NumberToAscii (char *pOutput, uint32_t uInput, uint_t uDigits) noexcept |
Convert an unsigned 32 bit integer into ASCII. | |
char * | NumberToAscii (char *pOutput, int32_t iInput, uint_t uDigits) noexcept |
Convert a signed 32 bit integer into ASCII. | |
char * | NumberToAscii (char *pOutput, uint64_t uInput, uint_t uDigits) noexcept |
Convert an unsigned 64 bit integer into ASCII. | |
char * | NumberToAscii (char *pOutput, int64_t iInput, uint_t uDigits) noexcept |
Convert a signed 64 bit integer into ASCII. | |
char * | NumberToAscii (char *pOutput, float fInput, uint_t uDigits=0) noexcept |
Convert a 32 bit float into ASCII. | |
char * | NumberToAscii (char *pOutput, double dInput, uint_t uDigits=0) noexcept |
Convert a 64 bit float into ASCII. | |
template<class T > | |
char * | NumberToAscii (char *pOutput, T input) noexcept |
template<class T > | |
char * | NumberToAscii (char *pOutput, T input, uint_t uDigits) noexcept |
uint_t | NumberStringLength (uint32_t uInput) noexcept |
Calculate the length of a string that represents this integer. | |
uint_t | NumberStringLength (int32_t iInput) noexcept |
Calculate the length of a string that represents this integer. | |
uint_t | NumberStringLength (uint64_t uInput) noexcept |
Calculate the length of a string that represents this integer. | |
uint_t | NumberStringLength (int64_t iInput) noexcept |
Calculate the length of a string that represents this integer. | |
template<class T > | |
uint_t | NumberStringLength (T input) noexcept |
Calculate the length of a string that represents this integer. | |
uint_t | NumberHexStringLength (uint32_t uInput) noexcept |
Calculate the length of a string that represents this hex integer. | |
uint_t | NumberHexStringLength (uint64_t uInput) noexcept |
Calculate the length of a string that represents this hex integer. | |
template<class T > | |
uint_t | NumberHexStringLength (T input) noexcept |
Calculate the length of a string that represents this hex integer. | |
uint_t | NumberOctalStringLength (uint32_t uInput) noexcept |
Calculate the length of a string that represents this octal integer. | |
uint_t | NumberOctalStringLength (uint64_t uInput) noexcept |
Calculate the length of a string that represents this octal integer. | |
template<class T > | |
uint_t | NumberOctalStringLength (T input) noexcept |
Calculate the length of a string that represents this octal integer. | |
constexpr uint32_t | ToLower (uint32_t uInput) noexcept |
Convert a character to lower case. | |
constexpr uint32_t | ToUpper (uint32_t uInput) noexcept |
Convert a character to upper case. | |
uint_t | IsPointerInvalid (const void *pInput) noexcept |
Test if a pointer is invalid. | |
uint_t | IsPointerValid (const void *pInput) noexcept |
Test if a pointer is valid. | |
uint_t | IsStringEmpty (const char *pInput) noexcept |
Test if a UTF-8 string pointer points to a nullptr string. | |
uint_t | IsStringEmpty (const uint16_t *pInput) noexcept |
Test if a UTF-16 string pointer points to a nullptr string. | |
uint_t | IsDigit (char iInput) noexcept |
Test if a character is 0-9. | |
uint_t | IsHex (char iInput) noexcept |
Test if a character is 0-9, A-F or a-f. | |
uint_t | IsWhitespace (char iInput) noexcept |
Test if a character is TAB or SPACE. | |
uint_t | IsLowercase (char iInput) noexcept |
Test if a character is a-z. | |
uint_t | IsUppercase (char iInput) noexcept |
Test if a character is A-Z. | |
uint_t | IsSpace (int iInput) noexcept |
Test if a character is ASCII white space. | |
void | CStringToPString (uint8_t *pOutput, const char *pInput) noexcept |
Convert a "C" string into a Pascal string. | |
void | PStringToCString (char *pOutput, const uint8_t *pInput) noexcept |
Convert a Pascal string into a "C" string. | |
char * | ParseBeyondWhiteSpace (const char *pInput) noexcept |
Parse a "C" string until a non-white space character is found. | |
char * | ParseToDelimiter (const char *pInput) noexcept |
Return a pointer to whitespace, CR, LF or zero. | |
char * | ParseBeyondEOL (const char *pInput) noexcept |
Parse a "C" string until a zero or EOL. | |
char * | ParseBeyondEOL (const char *pInput, uintptr_t uLength) noexcept |
Parse a "C" string until a zero or EOL or out of data. | |
char * | ParseQuotedString (char *pOutput, uintptr_t uOutputSize, const char *pInput) noexcept |
Parse out a quoted string. | |
uintptr_t | CopyUpToEOL (char *pOutput, uintptr_t uOutputSize, const char *pInput, uintptr_t uInputSize) noexcept |
Read a stream of text chars until a nullptr, LF, CR or CR/LF is found. | |
void | StripLeadingSpaces (char *pInput) noexcept |
Remove spaces from the beginning of a string. | |
void | StripTrailingSpaces (char *pInput) noexcept |
Remove spaces from the end of a string. | |
void | StripLeadingWhiteSpace (char *pInput) noexcept |
Remove whitespace from the beginning of a string. | |
void | StripTrailingWhiteSpace (char *pInput) noexcept |
Remove whitespace from the end of a string. | |
void | StripLeadingAndTrailingSpaces (char *pInput) noexcept |
Remove spaces from the beginning and end of a string. | |
void | StripLeadingAndTrailingWhiteSpace (char *pInput) noexcept |
Remove whitespace from the beginning and end of a string. | |
void | StripAllFromList (char *pInput, const char *pList) noexcept |
Remove all characters that match those in a list. | |
void | StripAllButList (char *pInput, const char *pList) noexcept |
Remove all characters except those in a list. | |
void | StripTrailing (char *pInput, const char *pList) noexcept |
Remove characters from the end of a string. | |
void | StripLeading (char *pInput, const char *pList) noexcept |
Remove characters from the beginning of a string. | |
void | RemoveTrailingChar (char *pInput, uint_t uRemove) noexcept |
Remove a character from the end of a string if present. | |
void | ForceTrailingChar (char *pInput, uint_t uLast) noexcept |
Force a character to be at the end of a string if missing. | |
void | SlashesToColons (char *pInput) noexcept |
Convert all forward and back slashes to colons. | |
void | SlashesToColons (char *pOutput, const char *pInput) noexcept |
Convert all forward and back slashes to colons. | |
void | SlashesToWindowsSlashes (char *pInput) noexcept |
Convert all forward slashes ('/') to back slashes ('\'). | |
void | SlashesToWindowsSlashes (char *pOutput, const char *pInput) noexcept |
Convert all forward slashes ('/') to back slashes ('\'). | |
void | EndWithWindowsSlashes (char *pInput) noexcept |
Force the last character of a string to be '\'. | |
void | EndWithWindowsSlashes (char *pOutput, const char *pInput) noexcept |
Copy a string and force the last character of a string to be '\'. | |
void | SlashesToLinuxSlashes (char *pInput) noexcept |
Convert all back slashes ('\') to forward slashes ('/'). | |
void | SlashesToLinuxSlashes (char *pOutput, const char *pInput) noexcept |
Convert all back slashes ('\') to forward slashes ('/'). | |
void | EndWithLinuxSlashes (char *pInput) noexcept |
Force the last character of a string to be '/'. | |
void | EndWithLinuxSlashes (char *pOutput, const char *pInput) noexcept |
Copy a string and force the last character of a string to be '/'. | |
void | Replace (char *pInput, uint_t uFrom, uint_t uTo) noexcept |
Convert characters in a string from one to another. | |
void | Replace (char *pOutput, const char *pInput, uint_t uFrom, uint_t uTo) noexcept |
Convert characters in a string from one to another. | |
char * | GetFileExtension (const char *pInput) noexcept |
Get a pointer to the beginning of the file extension. | |
void | SetFileExtension (char *pInput, const char *pNewExtension) noexcept |
Replace the text after the last period for filename extensions. | |
uintptr_t | StringLength (const char *pInput) noexcept |
Perform an ANSI compatible strlen(). | |
uintptr_t | StringLength (const uint16_t *pInput) noexcept |
Perform an ANSI compatible strlen() for UTF16 strings.. | |
void | StringCopy (char *pOutput, const char *pInput) noexcept |
Copy a "C" string. | |
void | StringCopy (char *pOutput, uintptr_t uOutputSize, const char *pInput) noexcept |
Copy a "C" string with bounds checking. | |
void | StringCopy (char *pOutput, uintptr_t uOutputSize, const char *pInput, uintptr_t uInputSize) noexcept |
Copy a text buffer into a "C" string with bounds checking. | |
void | StringCopy (uint16_t *pOutput, const uint16_t *pInput) noexcept |
Copy a 16 bit "C" string. | |
void | StringCopy (uint16_t *pOutput, uintptr_t uOutputSize, const uint16_t *pInput) noexcept |
Copy a 16 bit "C" string with bounds checking. | |
void | StringCopy (uint16_t *pOutput, uintptr_t uOutputSize, const uint16_t *pInput, uintptr_t uInputSize) noexcept |
Copy a text buffer into a 16 bit "C" string with bounds checking. | |
char * | StringDuplicate (const char *pInput) noexcept |
Make a copy of a "C" string. | |
char * | StringDuplicate (const char *pInput, uintptr_t uPadding) noexcept |
Make a copy of a "C" string with some padding. | |
void | StringDelete (const char *pInput) noexcept |
Delete an allocated string. | |
void | StringConcatenate (char *pOutput, const char *pInput) noexcept |
Concatenate a "C" string with another "C" string. | |
void | StringConcatenate (char *pOutput, uintptr_t uOutputSize, const char *pInput) noexcept |
Concatenate a "C" string with another "C" string bounds checked. | |
void | StringConcatenate (char *pOutput, uintptr_t uOutputSize, const char *pInput, uintptr_t uInputSize) noexcept |
Concatenate a "C" string with a string buffer, bounds checked. | |
void | StringConcatenate (uint16_t *pOutput, const uint16_t *pInput) noexcept |
Concatenate a 16 bit "C" string with another 16 bit "C" string. | |
void | StringConcatenate (uint16_t *pOutput, uintptr_t uOutputSize, const uint16_t *pInput) noexcept |
Concatenate a 16 bit "C" string with another 16 bit "C" string bounds checked. | |
int | StringCompare (const char *pInput1, const char *pInput2) noexcept |
Compare two "C" strings for equality. | |
int | StringCompare (const char *pInput1, const char *pInput2, uintptr_t uMaxLength) noexcept |
Compare two "C" strings for equality, case sensitive, length delimited. | |
int | StringCompare (const uint16_t *pInput1, const uint16_t *pInput2) noexcept |
Compare two 16 bit "C" strings for equality. | |
int | StringCompare (const uint16_t *pInput1, const uint16_t *pInput2, uintptr_t uMaxLength) noexcept |
Compare two 16 bit "C" strings for equality, case sensitive, length delimited. | |
int | StringCaseCompare (const char *pInput1, const char *pInput2) noexcept |
Compare two "C" strings for equality, case insensitive. | |
int | StringCaseCompare (const char *pInput1, const char *pInput2, uintptr_t uMaxLength) noexcept |
Compare two "C" strings for equality, case insensitive, length delimited. | |
uint_t | Wildcardcmp (const char *pInput, const char *pWildcard) noexcept |
Perform a string comparison using the wild card system. | |
uint_t | HasWildcard (const char *pInput) noexcept |
Return TRUE if the string contains a wild card character. | |
void | StringUppercase (char *pInput) noexcept |
Convert a string to upper case. | |
void | StringUppercase (char *pOutput, const char *pInput) noexcept |
Convert a string to upper case into a new buffer. | |
void | StringLowercase (char *pInput) noexcept |
Convert a string to lower case. | |
void | StringLowercase (char *pOutput, const char *pInput) noexcept |
Convert a string to lower case into a new buffer. | |
char * | StringCharacter (const char *pInput, int iChar) noexcept |
Scan for the first occurrence of a specific character. | |
uint16_t * | StringCharacter (const uint16_t *pInput, uint_t uChar) noexcept |
Scan for the first occurrence of a specific character. | |
char * | StringCharacterReverse (const char *pInput, int iChar) noexcept |
Scan for the last occurrence of a specific character. | |
uint16_t * | StringCharacterReverse (const uint16_t *pInput, uint_t uChar) noexcept |
Scan for the last occurrence of a specific character. | |
uint_t | StringEndsWith (char *pInput, int iChar) noexcept |
Force the ending character of a string. | |
uint_t | StringEndsWith (uint16_t *pInput, uint_t uChar) noexcept |
Force the ending character of a string. | |
uintptr_t | StringSkipOver (const char *pInput, const char *pDelimiters) noexcept |
Locate the offset of the first non-delimiter in a string. | |
uintptr_t | StringSkipOver (const uint16_t *pInput, const uint16_t *pDelimiters) noexcept |
Locate the offset of the first non-delimiter in a string. | |
uintptr_t | StringStopAt (const char *pInput, const char *pDelimiters) noexcept |
Locate the offset of the first delimiter in a string. | |
uintptr_t | StringStopAt (const uint16_t *pInput, const uint16_t *pDelimiters) noexcept |
Locate the offset of a delimiter in a string. | |
char * | StringString (const char *pInput, const char *pTest) noexcept |
Locate a substring. | |
char * | StringString (const char *pInput, const char *pTest, uintptr_t uTestLength) noexcept |
Locate a substring. | |
uint16_t * | StringString (const uint16_t *pInput, const uint16_t *pTest) noexcept |
Locate a substring (UTF-16 version) | |
char * | StringCaseString (const char *pInput, const char *pTest) noexcept |
Locate a substring, case insensitive. | |
uint16_t * | StringCaseString (const uint16_t *pInput, const uint16_t *pTest) noexcept |
Locate a substring, case insensitive (UTF-16 version) | |
char * | StringToken (char *pInput, const char *pDelimiters, char **ppSave) noexcept |
Split a string into tokens. | |
uint16_t * | StringToken (uint16_t *pInput, const uint16_t *pDelimiters, uint16_t **ppSave) noexcept |
Split a string into tokens. | |
intptr_t | GetFormattedLength (const char *pFormat, uintptr_t uArgCount, const ArgumentType **ppArgs) noexcept |
Reports the size of a formatted output in bytes without actually creating any formatted output. | |
intptr_t | SprintfUserAlloc (SafePrint::SprintfCallbackProc pCallback, void *pContext, uint_t bAddNull, const char *pFormat, uintptr_t uArgCount, const ArgumentType **ppArgs) noexcept |
Print into a buffer that a callback allocates. | |
intptr_t | Sprintf (char *pOutput, const char *pFormat, uintptr_t uArgCount, const ArgumentType **ppArgs) noexcept |
sprintf() clone | |
intptr_t | Snprintf (char *pOutput, uintptr_t uOutputSize, const char *pFormat, uintptr_t uArgCount, const ArgumentType **ppArgs) noexcept |
snprintf() clone | |
intptr_t | Printf (const char *pFormat, uintptr_t uArgCount, const ArgumentType **ppArgs) noexcept |
printf() clone | |
intptr_t | Fprintf (FILE *fp, const char *pFormat, uintptr_t uArgCount, const ArgumentType **ppArgs) noexcept |
printf() clone | |
intptr_t | DebugSnprintf (char *pOutput, uintptr_t uOutputSize, const char *pFormat, uintptr_t uArgCount, const ArgumentType **ppArgs) noexcept |
Debug snprintf() | |
float | Unpack16ToFloat (int16_t iInput) |
Decompress a packed floating point number. | |
int16_t | PackFloatTo16 (float fInput) |
Convert a float in the range of 0.999999 to -0.999999 into a 16 bit packed integer. | |
float | Unpack16ToFloat (int16_t iInput, uint32_t uBaseExponent) |
Decompress a packed floating point number with a supplied base exponent. | |
int16_t | PackFloatTo16 (float fInput, uint32_t uBaseExponent) |
Convert a float in the range of a supplied exponent into a 16 bit packed integer. | |
uintptr_t | UnpackBytes (const uint8_t *pInput, uintptr_t uInputLength, uint8_t **ppOutput, uintptr_t *pOutputLength) |
Decompress data compressed with PackBytes from the Apple IIgs. | |
eUnixFlavor | UnixGetFlavor (void) noexcept |
uint32_t | get_traceflags (void) noexcept |
Get the current debug tracing flag. | |
void | set_traceflags (uint32_t uTraceFlags) noexcept |
Set the current debug tracing flag. | |
uint32_t | get_hintflags (void) noexcept |
Get the current code hint flags. | |
void | set_hintflags (uint32_t uHintFlags) noexcept |
Set the current debug tracing flag. | |
const char * | GetEnvironmentString (const char *pKey) noexcept |
Retrieve an environment string. | |
eError | SetEnvironmentString (const char *pKey, const char *pInput) noexcept |
Set an environment string. | |
uint_t | IsElevated (void) noexcept |
Test if the application has elevated privileges. | |
eError | GetUserLoginName (String *pOutput) noexcept |
Retrieves the login name of the user associated with the current thread. | |
eError | GetUserRealName (String *pOutput) noexcept |
Get the real name of the current user. | |
eError | GetMachineName (String *pOutput) noexcept |
Get the name the user has called the computer. | |
eError | GetFullPathNameUTF8 (String *pOutput, const char *pInput) noexcept |
eError | GetOSString (String *pOutput, int16_t iStringID) noexcept |
eError | GetOSIndString (String *pOutput, int16_t iStringID, int16_t iIndex) noexcept |
eError | GetMacModelIdentifier (String *pOutput) noexcept |
void | StringCopy (String *pOutput, const __CFString *pInput) noexcept |
Convert an NSString to a Burger::String (MacOSX and Carbon Only) | |
eError | get_home_directory (String *pOutput) noexcept |
Return the path of the "home" folder. | |
eError | get_abspath (String *pOutput, const char *pInput) noexcept |
Return the absolute path of a pathname. | |
uintptr_t | SDBMHashFunctor (const void *pData, uintptr_t uDataSize) noexcept |
SDBM (Service Data Base Management) hash callback for HashMapShared. | |
uintptr_t | SDBMHashCaseFunctor (const void *pData, uintptr_t uDataSize) noexcept |
Case insensitive SDBM (Service Data Base Management) hash callback for HashMapShared. | |
uintptr_t | DJB2HashAddFunctor (const void *pData, uintptr_t uDataSize) noexcept |
DJB2 Additive hash callback for HashMapShared. | |
uintptr_t | DJB2HashAddCaseFunctor (const void *pData, uintptr_t uDataSize) noexcept |
Case insensitive DJB2 Additive hash callback for HashMapShared. | |
uintptr_t | DJB2HashXorFunctor (const void *pData, uintptr_t uDataSize) noexcept |
DJB2 Exclusive Or hash callback for HashMapShared. | |
uintptr_t | DJB2HashXorCaseFunctor (const void *pData, uintptr_t uDataSize) noexcept |
DJB2 Exclusive Or hash callback for HashMapShared. | |
uintptr_t | DJB2StringHashXorFunctor (const void *pData, uintptr_t uDataSize) noexcept |
DJB2 Exclusive Or hash callback for HashMapString. | |
uintptr_t | DJB2StringHashXorCaseFunctor (const void *pData, uintptr_t uDataSize) noexcept |
Case insensitive DJB2 Exclusive Or hash callback for HashMapStringCase. | |
uint_t | HashMapStringCaseTest (const void *pA, const void *pB) noexcept |
Case insensitive string test for HashMapStringCase. | |
void | MP3DCT64 (float *pOutput1, float *pOutput2, const float *pInput) |
MP3 Discrete cosine transform function. | |
void | MP3FHT (float *pInput, uintptr_t uCount) |
MP3 Fast Fourier (Hartley) transform. | |
void | MP3DCT36 (float *pSideSamples, float *pHybridOutput, float *pOutput, const float *pPrevious, const float *pBlockType) |
36 entry DCT for MP3 | |
void | MP3DCT12 (float *pSideSamples, float *pHybridOutput, float *pOutput, const float *pPrevious, const float *pBlockType) |
12 entry DCT for MP3 | |
void | sleep_ms (uint32_t uMilliseconds, uint_t bAlertable=0) noexcept |
Sleep the current thread. | |
uint_t | WriteBig (FILE *fp, uint16_t uInput) |
Write a big endian 16-bit integer to a file. | |
uint_t | WriteBig (FILE *fp, uint32_t uInput) |
Write a big endian 32-bit integer to a file. | |
uint_t | WriteBig (FILE *fp, uint64_t uInput) |
Write a big endian 64-bit integer to a file. | |
uint_t | WriteBig (FILE *fp, float fInput) |
Write a big endian 32-bit float to a file. | |
uint_t | WriteBig (FILE *fp, double dInput) |
Write a big endian 64-bit float to a file. | |
uint_t | WriteLittle (FILE *fp, uint16_t uInput) |
Write a little endian 16-bit integer to a file. | |
uint_t | WriteLittle (FILE *fp, uint32_t uInput) |
Write a little endian 32-bit integer to a file. | |
uint_t | WriteLittle (FILE *fp, uint64_t uInput) |
Write a little endian 64-bit integer to a file. | |
uint_t | WriteLittle (FILE *fp, float fInput) |
Write a little endian 32-bit float to a file. | |
uint_t | WriteLittle (FILE *fp, double dInput) |
Write a little endian 64-bit float to a file. | |
uint_t | WriteCString (FILE *fp, const char *pInput) |
Write a "C" string with the terminating zero to a file stream. | |
uint16_t | read_big_uint16 (FILE *fp) |
Read a big endian 16-bit integer from a file. | |
uint32_t | read_big_uint32 (FILE *fp) |
Read a big endian 32-bit integer from a file. | |
uint64_t | ReadBigWord64 (FILE *fp) |
Read a big endian 64-bit integer from a file. | |
float | ReadBigFloat (FILE *fp) |
Read a big endian 32-bit float from a file. | |
double | ReadBigDouble (FILE *fp) |
Read a big endian 64-bit float from a file. | |
uint16_t | read_little_uint16 (FILE *fp) |
Read a little endian 16-bit integer from a file. | |
uint32_t | read_little_uint32 (FILE *fp) |
Read a little endian 32-bit integer from a file. | |
uint64_t | ReadLittleWord64 (FILE *fp) |
Read a little endian 64-bit integer from a file. | |
float | ReadLittleFloat (FILE *fp) |
Read a little endian 32-bit float from a file. | |
double | ReadLittleDouble (FILE *fp) |
Read a little endian 64-bit float from a file. | |
uint_t | read_c_string (FILE *fp, char *pInput, uintptr_t uLength) |
Read a "C" string with the terminating zero to a file stream. | |
uintptr_t | GetSize (FILE *fp) |
Return the size of a file. | |
uint64_t | GetSize64 (FILE *fp) |
Return the size of a file with 64 bits. | |
eError | SaveFile (FILE *fp, const void *pData, uintptr_t uLength) |
Save memory to a file opened with fopen() | |
void * | LoadFile (FILE *fp, uintptr_t *uLength) |
Load a file opened with fopen() into memory. | |
void | SetBinaryMode (FILE *fp) |
Force an ANSI FILE * to binary mode. | |
eError | SimpleDecompressILBMRLE (void *pOutput, uintptr_t uOutputChunkLength, const void *pInput, uintptr_t uInputChunkLength) |
Decompress data using RLE compression. | |
eError | SimpleDecompressLZSS (void *pOutput, uintptr_t uOutputChunkLength, const void *pInput, uintptr_t uInputChunkLength) |
eError | SimpleDecompressDeflate (void *pOutput, uintptr_t uOutputChunkLength, const void *pInput, uintptr_t uInputChunkLength) |
Decompress data using Deflate compression. | |
long | SetDeviceCursor (IDirect3DDevice9 *pDirect3DDevice9, HICON__ *hCursor) |
Convert a Windows HCURSOR for DirectX9. | |
uint_t | GetD3DFORMATColorChannelBits (uint_t uD3DFORMAT) |
Get the number of bits for a single color channel. | |
uint_t | GetD3DFORMATAlphaChannelBits (uint_t uD3DFORMAT) |
Get the number of bits for the alpha channel. | |
uint_t | GetD3DFORMATDepthBits (uint_t uD3DFORMAT) |
Get the number of bits for the depth channel. | |
uint_t | GetD3DFORMATStencilBits (uint_t uD3DFORMAT) |
Get the number of bits for the stencil channel. | |
uint_t | GetDXGI_FORMATColorChannelBits (uint_t uDXGI_FORMAT) |
Get the number of bits for a single color channel. | |
void | CopyPalette (RGBWord8_t *pOutput, const RGBWord8_t *pInput, uintptr_t uEntries=256) |
Copy an array of RGBWord8_t entries. | |
void | CopyPalette (RGBWord8_t *pOutput, const RGBAWord8_t *pInput, uintptr_t uEntries=256) |
Copy an array of RGBWord8_t entries from an array of RGBAWord8_t entries. | |
void | CopyPalette (RGBAWord8_t *pOutput, const RGBWord8_t *pInput, uintptr_t uEntries=256) |
Copy an array of RGBAWord8_t entries from an array of RGBWord8_t entries. | |
void | CopyPalette (RGBAWord8_t *pOutput, const RGBAWord8_t *pInput, uintptr_t uEntries=256) |
Copy an array of RGBAWord8_t entries from an array of RGBAWord8_t entries. | |
void | CopyPalette444 (RGBWord8_t *pOutput, const uint16_t *pInput, uintptr_t uEntries=256) |
Copy an array of RGBWord8_t entries from an array of 16 bit XRGB entries. | |
void | CopyPalette444 (RGBAWord8_t *pOutput, const uint16_t *pInput, uintptr_t uEntries=256) |
Copy an array of RGBAWord8_t entries from an array of 16 bit XRGB entries. | |
void | CopyPalette4444 (RGBWord8_t *pOutput, const uint16_t *pInput, uintptr_t uEntries=256) |
Copy an array of RGBWord8_t entries from an array of 16 bit ARGB entries. | |
void | CopyPalette4444 (RGBAWord8_t *pOutput, const uint16_t *pInput, uintptr_t uEntries=256) |
Copy an array of RGBAWord8_t entries from an array of 16 bit ARGB entries. | |
void | Convert (RGBFloat_t *pOutput, const HSL_t *pInput) |
Convert a HSL color to an RGB color. | |
void | Convert (HSL_t *pOutput, const RGBFloat_t *pInput) |
Convert an RGB color to HSL color. | |
void | CopyPalette256 (RGBWord8_t *pOutput, const RGBWord8_t *pInput, uint_t uStartIndex=0, uint_t uPaletteSize=256) |
Set a range of RGB color entries to a 256 entry palette. | |
void | CopyPalette256 (RGBWord8_t *pOutput, const RGBAWord8_t *pInput, uint_t uStartIndex=0, uint_t uPaletteSize=256) |
Set a range of RGB color entries to a 256 entry palette. | |
void | CopyPalette256 (RGBAWord8_t *pOutput, const RGBWord8_t *pInput, uint_t uStartIndex=0, uint_t uPaletteSize=256) |
Set a range of RGBA color entries to a 256 entry palette. | |
void | CopyPalette256 (RGBAWord8_t *pOutput, const RGBAWord8_t *pInput, uint_t uStartIndex=0, uint_t uPaletteSize=256) |
Set a range of RGBA color entries to a 256 entry palette. | |
void | ClearPalette (RGBWord8_t *pOutput, uintptr_t uPaletteSize=256) |
Clear an RGB palette. | |
void | ClearPalette (RGBAWord8_t *pOutput, uintptr_t uPaletteSize=256) |
Clear an RGBA palette. | |
void | FillPalette (RGBWord8_t *pOutput, const RGBWord8_t *pInput, uintptr_t uPaletteSize=256) |
Fill an RGB palette with a specific color. | |
void | FillPalette (RGBAWord8_t *pOutput, const RGBAWord8_t *pInput, uintptr_t uPaletteSize=256) |
Fill an RGBA palette with a specific color. | |
void | DecompressImage (RGBAWord8_t *pOutput, uintptr_t uOutputStride, uint_t uWidth, uint_t uHeight, const Dxt1Packet_t *pInput, uintptr_t uInputStride) |
Decompress an array of 4x4 block compressed with DXT1. | |
void | DecompressImage (RGBAWord8_t *pOutput, uintptr_t uOutputStride, uint_t uWidth, uint_t uHeight, const Dxt3Packet_t *pInput, uintptr_t uInputStride) |
Decompress an array of 4x4 block compressed with DXT3. | |
void | DecompressImage (RGBAWord8_t *pOutput, uintptr_t uOutputStride, uint_t uWidth, uint_t uHeight, const Dxt5Packet_t *pInput, uintptr_t uInputStride) |
Decompress an array of 4x4 block compressed with DXT5. | |
const void * | FindAIFFChunk (const void *pInput, uintptr_t uLength, uint32_t uChunkName) |
Scan an AIFF file for a specific chunk. | |
const void * | FindRIFFChunk (const void *pInput, uintptr_t uLength, uint32_t uChunkName) |
Scan a RIFF file for a specific chunk. | |
uint32_t | GetID3V2TagLength (const void *pInput) |
Parses the ID3V2 tag length. | |
uint_t | XInputStopRumbleOnAllControllers (void) noexcept |
Turn off rumbling on XInput managed controllers. | |
uint_t | XInputGetGamepadState (uint_t uWhich, XInputGamePad_t *pXInputGamePad, eXInputDeadZoneType uDeadZoneType=XINPUTDEADZONE_NONE) noexcept |
Read a controller using XInput. | |
uint_t | IsDeviceXInput (const GUID *pGuid) noexcept |
Test if a device GUID belongs to an XInput device. | |
void | CopySoundData (void *pOutput, const void *pInput, uintptr_t uLength, SoundManager::eDataType eType) |
Upload sound data. | |
void | ClearSoundData (void *pOutput, uintptr_t uLength, SoundManager::eDataType eType) |
Clear sound data. | |
void | CopyStereoInterleaved (void *pOutput, const uint8_t *pLeft, const uint8_t *pRight, uintptr_t uOutputSize) |
Merge a left and right audio channel into a single buffer. | |
void | CopyStereoInterleaved (void *pOutput, const uint16_t *pLeft, const uint16_t *pRight, uintptr_t uOutputSize) |
Merge a left and right audio channel into a single buffer. | |
void | ComputeReverb (uint8_t *pOutput, const uint8_t *pInput, uintptr_t uCount, uint_t uPercentage) |
Add in an 8 bit reverb. | |
void | ComputeReverb (int16_t *pOutput, const int16_t *pInput, uintptr_t uCount, uint_t uPercentage) |
Add in an 16 bit reverb. | |
uint_t | Upload (IDirectSoundBuffer *pBuffer, uintptr_t uOffset, const uint8_t *pInput, uintptr_t uInputLength) |
Upload sound data into a DirectSoundBuffer. | |
uint_t | Upload (IDirectSoundBuffer *pBuffer, uintptr_t uOffset, SoundManager::BufferDecoder *pBufferDecoder, uintptr_t uInputLength) |
Upload compressed sound data into a DirectSoundBuffer. | |
float | AudioDeviceGetMasterVolume (uint32_t uDeviceID) |
uint_t | AudioDeviceSetMasterVolume (uint32_t uDeviceID, float fInput) |
void | MACEExp1to6 (const uint8_t *pInput, uint8_t *pOutput, uintptr_t uPacketCount, MACEState_t *pInputState, MACEState_t *pOutputState, uint_t uNumChannels, uint_t uWhichChannel) |
Decompress audio compressed with MACE 6:1. | |
void | MACEExp1to3 (const uint8_t *pInput, uint8_t *pOutput, uintptr_t uPacketCount, MACEState_t *pInputState, MACEState_t *pOutputState, uint_t uNumChannels, uint_t uWhichChannel) |
Decompress audio compressed with MACE 3:1. | |
void | ImportS3MEffect (Sequencer::Command_t *pOutput, uint_t uS3MCommand, uint_t uS3MArgument) |
Convert an S3M effect command to a Burgerlib one. | |
uint_t | ImportS3M (Sequencer::SongPackage *pOutput, const uint8_t *pInput, uintptr_t uInputLength) |
Import an S3M file. | |
void | ImportITEffect (Sequencer::Command_t *pOutput, uint_t uITCommand, uint_t uITArgument) |
Convert an IT effect command to a Burgerlib one. | |
uint_t | ImportIT (Sequencer::SongPackage *pOutput, const uint8_t *pInput, uintptr_t uInputLength) |
Import an IT file. | |
const uint8_t * | ImportXMEffect (Sequencer::Command_t *pOutput, const uint8_t *pInput) |
Convert an XM effect command to a Burgerlib one. | |
uint_t | ImportXM (Sequencer::SongPackage *pOutput, const uint8_t *pInput, uintptr_t uInputLength) |
Import an XM file. | |
uint_t | IsSelfAssignedIPv4 (uint32_t uIP) noexcept |
Test if an IPv4 address is self assigned. | |
uint_t | IsIPv6Unspecified (const uint8_t *pIP) noexcept |
Test if an IPv6 address is unspecified. | |
uint_t | IsIPv6Loopback (const uint8_t *pIP) noexcept |
Test if an IPv6 address is a loop back address. | |
uint_t | IsIPv6Multicast (const uint8_t *pIP) noexcept |
Test if an IPv6 address is a multicast address. | |
uint_t | IsIPv6LinkLocal (const uint8_t *pIP) noexcept |
Test if an IPv6 address is a link local address. | |
uint_t | IsIPv6SiteLocal (const uint8_t *pIP) noexcept |
Test if an IPv6 address is a site local address. | |
uint_t | IsIPv6MappedIPv4 (const uint8_t *pIP) noexcept |
Test if an IPv6 address is an IPv4 address in a wrapper. | |
uint_t | IsIPv6CompatibleIPv4 (const uint8_t *pIP) noexcept |
Test if an IPv6 address is an IPv4 address in a wrapper. | |
uint_t | IsIPv6MulticastNodeLocal (const uint8_t *pIP) noexcept |
Test if an IPv6 multicast address has node local scope. | |
uint_t | IsIPv6MulticastLinkLocal (const uint8_t *pIP) noexcept |
Test if an IPv6 multicast address has link local scope. | |
uint_t | IsIPv6MulticastSiteLocal (const uint8_t *pIP) noexcept |
Test if an IPv6 multicast address has site local scope. | |
uint_t | IsIPv6MulticastOrgLocal (const uint8_t *pIP) noexcept |
Test if an IPv6 multicast address has organization local scope. | |
uint_t | IsIPv6MulticastGlobal (const uint8_t *pIP) noexcept |
Test if an IPv6 multicast address has global scope. | |
eError | IPv4ToString (String *pOutput, uint32_t uIP, uint_t uPort=0xFFFFFFFFU) noexcept |
Convert an IPv4 address into a string. | |
eError | IPv6ToString (String *pOutput, const uint8_t *pIP, uint_t uPort=0xFFFFFFFFU) noexcept |
Convert an IPv6 address into a string. | |
eError | StringToIPv4 (const char *pInput, uint32_t *pIP, uint_t *pPort=0) noexcept |
Convert a string into an IPv4 address. | |
eError | StringToIPv6 (const char *pInput, uint8_t *pIP, uint_t *pPort=0) noexcept |
Convert a string into an IPv6 address. | |
eError | SocketSetBlocking (SocketType uSocket) noexcept |
Set a posix socket to blocking mode. | |
eError | SocketSetNonBlocking (SocketType uSocket) noexcept |
Set a posix socket to non-blocking mode. | |
eError | SocketTestForReading (SocketType uSocket) noexcept |
Test a posix socket if there's pending data. | |
eError | get_default_mac_address (MacAddress_t *pOutput) noexcept |
Get the MAC address. | |
void | MakeNetworkEnumQueryPacket (void *pPacket) |
Create a query packet for network server scanning. | |
uint_t | IsNetworkEnumQueryPacket (const void *pPacket, uintptr_t uPacketSize) |
Verify a query packet for network server scanning. | |
void | ChooseGridSize (uint_t *pXCellCount, uint_t *pYCellCount, const Vector4D_t *pBoundingRect, uintptr_t uItemCountEstimate, float fGridScale=0.707f) |
Determine the optimum size of a grid. | |
void | EdgeIntersectTest (float *pEdge1VSEdge2, float *pEdge2VSEdge1, const Vector2D_t *pEdge1V1, const Vector2D_t *pEdge1V2, const Vector2D_t *pEdge2V1, const Vector2D_t *pEdge2V2) |
Test two edges for intersection. | |
Variables | |
const uint32_float_t | g_fZero = {0x00000000U} |
Constant for 0.0f in the float format. | |
const uint32_float_t | g_fNegZero = {0x80000000U} |
Constant for -0.0f in the float format. | |
const uint32_float_t | g_fOne = {0x3F800000U} |
Constant for 1.0f in the float format. | |
const uint32_float_t | g_fNegOne = {0xBF800000U} |
Constant for -1.0f in the float format. | |
const uint32_float_t | g_fHalf = {0x3F000000U} |
Constant for 0.5f in the float format. | |
const uint32_float_t | g_fNegHalf = {0xBF000000U} |
Constant for -0.5f in the float format. | |
const uint32_float_t | g_fInf = {0x7F800000U} |
Constant for Infinity in the float format. | |
const uint32_float_t | g_fNegInf = {0xFF800000U} |
Constant for -Infinity in the float format. | |
const uint32_float_t | g_fNan = {0x7FBFFFFFU} |
Constant for signaling Not a Number (NaN) in the float format. | |
const uint32_float_t | g_fNegNan = {0xFFBFFFFFU} |
Constant for negative signaling Not a Number (NaN) in the float format. | |
const uint32_float_t | g_fQNan = {0x7FFFFFFFU} |
Constant for non signaling Not a Number (Nan) in the float format. | |
const uint32_float_t | g_fNegQNan = {0xFFFFFFFFU} |
Constant for negative non signaling Not a Number in the float format. | |
const uint32_float_t | g_fMin = {0x00800000U} |
Constant for smallest number (Non-zero) in the float format. | |
const uint32_float_t | g_fNegMin = {0x80800000U} |
Constant for negative smallest number (Non-zero) in the float format. | |
const uint32_float_t | g_fMax = {0x7F7FFFFFU} |
Constant for largest number in the float format. | |
const uint32_float_t | g_fNegMax = {0xFF7FFFFFU} |
Constant for negative largest number in the float format. | |
const uint32_float_t | g_fMinNoInteger = {0x4B000000} |
Constant for the smallest number that cannot have a fraction 8388608.0f. | |
const uint32_float_t | g_fNegMinNoInteger = {0xCB000000} |
Constant for the negative smallest number that cannot have a fraction -8388608.0f. | |
const uint32_float_t | g_fEpsilon = {0x34000000U} |
Constant for Epsilon in the float format. | |
const uint32_float_t | g_fNegEpsilon = {0xB4000000U} |
Constant for negative Epsilon in the float format. | |
const uint32_float_t | g_fQuarterPi = {0x3F490FDB} |
Constant for Pi*0.25f in the float format. | |
const uint32_float_t | g_fNegQuarterPi = {0xBF490FDB} |
Constant for -Pi*0.25f in the float format. | |
const uint32_float_t | g_fHalfPi = {0x3FC90FDB} |
Constant for Pi*0.5f in the float format. | |
const uint32_float_t | g_fNegHalfPi = {0xBFC90FDB} |
Constant for -Pi*0.5f in the float format. | |
const uint32_float_t | g_fPi = {0x40490FDB} |
Constant for Pi in the float format. | |
const uint32_float_t | g_fNegPi = {0xC0490FDB} |
Constant for -Pi in the float format. | |
const uint32_float_t | g_fPi2 = {0x40C90FDB} |
Constant for Pi*2 in the float format. | |
const uint32_float_t | g_fNegPi2 = {0xC0C90FDB} |
Constant for -Pi*2 in the float format. | |
const uint32_float_t | g_fPi4 = {0x41490FDB} |
Constant for Pi*4 in the float format. | |
const uint32_float_t | g_fNegPi4 = {0xC1490FDB} |
Constant for -Pi*4 in the float format. | |
const uint32_float_t | g_fCosPiDiv6 = {0x3F5DB3D7} |
Constant for get_cosine(Pi/6.0) in the float format. | |
const uint32_float_t | g_fNegCosPiDiv6 = {0xBF5DB3D7} |
Constant for -get_cosine(Pi/6.0) in the float format. | |
const uint32_float_t | g_fReciprocalHalfPi = {0x3F22F983} |
Constant for 1/(Pi*0.5f) in the float format. | |
const uint32_float_t | g_fNegReciprocalHalfPi = {0xBF22F983} |
Constant for -1/(Pi*0.5f) in the float format. | |
const uint32_float_t | g_fReciprocalPi = {0x3EA2F983} |
Constant for 1/Pi in the float format. | |
const uint32_float_t | g_fNegReciprocalPi = {0xBEA2F983} |
Constant for -1/Pi in the float format. | |
const uint32_float_t | g_fReciprocalPi2 = {0x3E22F983} |
Constant for 1/(Pi*2.0f) in the float format. | |
const uint32_float_t | g_fNegReciprocalPi2 = {0xBE22F983} |
Constant for -1/(Pi*2.0f) in the float format. | |
const uint32_float_t | g_fRadiansToDegrees = {0x42652EE1} |
Constant for 180/Pi in the float format. | |
const uint32_float_t | g_fNegRadiansToDegrees = {0xC2652EE1} |
Constant for -180/Pi in the float format. | |
const uint32_float_t | g_fDegreesToRadians = {0x3C8EFA35} |
Constant for Pi/180 in the float format. | |
const uint32_float_t | g_fNegDegreesToRadians = {0xBC8EFA35} |
Constant for -Pi/180 in the float format. | |
const uint32_float_t | g_fSqrt2 = {0x3FB504F3} |
Constant for sqrt(2) in the float format. | |
const uint32_float_t | g_fNegSqrt2 = {0xBFB504F3} |
Constant for -sqrt(2) in the float format. | |
const uint32_float_t | g_fLN2 = {0x3F317218} |
Constant for ln(2) in the float format. | |
const uint32_float_t | g_fNegLN2 = {0xBF317218} |
Constant for -ln(2) in the float format. | |
const uint32_float_t | g_fLN10 = {0x40135D8E} |
Constant for ln(10) in the float format. | |
const uint32_float_t | g_fNegLN10 = {0xC0135D8E} |
Constant for -ln(10) in the float format. | |
const uint32_float_t | g_f1Div255 = {0x3B808081} |
Constant for 1.0f/255.f in the float format. | |
const uint32_float_t | g_f1Div3 = {0x3EAAAAAB} |
Constant for 1.0f/3.f in the float format. | |
const uint32_float_t | g_f2Div3 = {0x3F2AAAAB} |
Constant for 2.0f/3.f in the float format. | |
const uint32_float_t | g_f65536 = {0x47800000} |
Constant for 65536.f in the float float. | |
const uint64_double_t | g_dZero = {0x0000000000000000ULL} |
Constant for 0.0 in the double format. | |
const uint64_double_t | g_dNegZero = {0x8000000000000000ULL} |
Constant for -0.0 in the double format. | |
const uint64_double_t | g_dOne = {0x3FF0000000000000ULL} |
Constant for 1.0 in the double format. | |
const uint64_double_t | g_dNegOne = {0xBFF0000000000000ULL} |
Constant for -1.0 in the double format. | |
const uint64_double_t | g_dHalf = {0x3FE0000000000000ULL} |
Constant for 0.5 in the double format. | |
const uint64_double_t | g_dNegHalf = {0xBFE0000000000000ULL} |
Constant for -0.5 in the double format. | |
const uint64_double_t | g_dInf = {0x7FF0000000000000ULL} |
Constant for Infinity in the double format. | |
const uint64_double_t | g_dNegInf = {0xFFF0000000000000ULL} |
Constant for -Infinity in the double format. | |
const uint64_double_t | g_dNan = {0x7FF7FFFFFFFFFFFFULL} |
Constant for signaling Not a Number (NaN) in the double format. | |
const uint64_double_t | g_dNegNan = {0xFFF7FFFFFFFFFFFFULL} |
Constant for negative signaling Not a Number (NaN) in the double format. | |
const uint64_double_t | g_dQNan = {0x7FFFFFFFFFFFFFFFULL} |
Constant for non signaling Not a Number (Nan) in the double format. | |
const uint64_double_t | g_dNegQNan = {0xFFFFFFFFFFFFFFFFULL} |
Constant for negative non signaling Not a Number (Nan) in the double format. | |
const uint64_double_t | g_dMin = {0x0010000000000000ULL} |
Constant for the smallest number (Non-zero) in the double format. | |
const uint64_double_t | g_dNegMin = {0x8010000000000000ULL} |
Constant for the negative smallest number (Non-zero) in the double format. | |
const uint64_double_t | g_dMax = {0x7FEFFFFFFFFFFFFFULL} |
Constant for the largest number in the double format. | |
const uint64_double_t | g_dNegMax = {0xFFEFFFFFFFFFFFFFULL} |
Constant for the negative largest number in the double format. | |
const uint64_double_t | g_dMinNoInteger = {0x4330000000000000ULL} |
Constant for the smallest number that cannot have a fraction 4503599627370496.0. | |
const uint64_double_t | g_dNegMinNoInteger |
Constant for the negative smallest number that cannot have a fraction -4503599627370496.0. | |
const uint64_double_t | g_dEpsilon = {0x3CB0000000000000ULL} |
Constant for Epsilon in the double format. | |
const uint64_double_t | g_dNegEpsilon = {0xBCB0000000000000ULL} |
Constant for negative Epsilon in the double format. | |
const uint64_double_t | g_dQuarterPi = {0x3FE921FB54442D18ULL} |
Constant for Pi*0.25 in the double format. | |
const uint64_double_t | g_dNegQuarterPi = {0xBFE921FB54442D18ULL} |
Constant for -Pi*0.25 in the double format. | |
const uint64_double_t | g_dHalfPi = {0x3FF921FB54442D18ULL} |
Constant for Pi*0.5 in the double format. | |
const uint64_double_t | g_dNegHalfPi = {0xBFF921FB54442D18ULL} |
Constant for -Pi*0.5 in the double format. | |
const uint64_double_t | g_dPi = {0x400921FB54442D18ULL} |
Constant for Pi in the double format. | |
const uint64_double_t | g_dNegPi = {0xC00921FB54442D18ULL} |
Constant for -Pi in the double format. | |
const uint64_double_t | g_dPi2 = {0x401921FB54442D18ULL} |
Constant for Pi*2 in the double format. | |
const uint64_double_t | g_dNegPi2 = {0xC01921FB54442D18ULL} |
Constant for -Pi*2 in the double format. | |
const uint64_double_t | g_dPi4 = {0x402921FB54442D18ULL} |
Constant for Pi*4 in the double format. | |
const uint64_double_t | g_dNegPi4 = {0xC02921FB54442D18ULL} |
Constant for -Pi*4 in the double format. | |
const uint64_double_t | g_dCosPiDiv6 = {0x3FEBB67AE8584CABULL} |
Constant for get_cosine(Pi/6.0) in the double format. | |
const uint64_double_t | g_dNegCosPiDiv6 = {0xBFEBB67AE8584CABULL} |
Constant for -get_cosine(Pi/6.0) in the double format. | |
const uint64_double_t | g_dReciprocalHalfPi |
Constant for 1/(Pi*0.5) in the double format. | |
const uint64_double_t | g_dNegReciprocalHalfPi |
Constant for -1/(Pi*0.5) in the double format. | |
const uint64_double_t | g_dReciprocalPi = {0x3FD45F306DC9C883ULL} |
Constant for 1/Pi in the double format. | |
const uint64_double_t | g_dNegReciprocalPi |
Constant for -1/Pi in the double format. | |
const uint64_double_t | g_dReciprocalPi2 |
Constant for 1/(Pi*2) in the double format. | |
const uint64_double_t | g_dNegReciprocalPi2 |
Constant for -1/(Pi*2) in the double format. | |
const uint64_double_t | g_dRadiansToDegrees |
Constant for 180/Pi in the double format. | |
const uint64_double_t | g_dNegRadiansToDegrees |
Constant for -180/Pi in the double format. | |
const uint64_double_t | g_dDegreesToRadians |
Constant for Pi/180 in the double format. | |
const uint64_double_t | g_dNegDegreesToRadians |
Constant for -Pi/180 in the double format. | |
const uint64_double_t | g_dSqrt2 = {0x3FF6A09E667F3BCDULL} |
Constant for sqrt(2) in the double format. | |
const uint64_double_t | g_dNegSqrt2 = {0xBFF6A09E667F3BCDULL} |
Constant for -sqrt(2) in the double format. | |
const uint64_double_t | g_dLN2 = {0x3FE62E42FEFA39EFULL} |
Constant for ln(2) in the double format. | |
const uint64_double_t | g_dNegLN2 = {0xBFE62E42FEFA39EFULL} |
Constant for -ln(2) in the double format. | |
const uint64_double_t | g_dLN10 = {0x40026BB1BBB55516ULL} |
Constant for ln(10) in the double format. | |
const uint64_double_t | g_dNegLN10 = {0xC0026BB1BBB55516ULL} |
Constant for -ln(10) in the double format. | |
const uint64_double_t | g_d1Div255 = {0x3F70101010101010ULL} |
Constant for 1.0/255.0 in the double format. | |
const uint64_double_t | g_d1Div3 = {0x3FD5555555555555ULL} |
Constant for 1.0/3.0 in the double format. | |
const uint64_double_t | g_d2Div3 = {0x447696695DBD1CC3ULL} |
Constant for 2.0/3.0 in the double format. | |
const uint64_double_t | g_d65536 = {0x40f0000000000000ULL} |
Constant for 65536.0 in the double format. | |
const uint16_t | g_u8087RoundToZero = 0x0F7F |
8087 control word to set rounding to zero | |
const uint16_t | g_u8087RoundToInfinity = 0x0B7F |
8087 control word to set rounding to +infinity | |
const uint16_t | g_u8087RoundToNegativeInfinity = 0x077F |
8087 control word to set rounding to -infinity | |
const GUID | g_GUID_zero |
Empty GUID. | |
const uint32_float_t | g_X86HalfAndNegHalf [2] |
0.5f,-0.5f for roundup / rounddown | |
constexpr const Frac32 | kMinFrac32 = (-0x7FFFFFFF) - 1 |
Minimum value for Frac32. | |
constexpr const Frac32 | kMaxFrac32 = 0x7FFFFFFF |
Maximum value for Frac32. | |
constexpr const Fixed32 | kMinFixed32 = (-0x7FFFFFFF) - 1 |
Minimum value for Fixed32. | |
constexpr const Fixed32 | kMaxFixed32 = 0x7FFFFFFF |
Maximum value for Fixed32. | |
constexpr const Fixed32 | kPiFixed32 = 0x003243F |
Pi in Fixed32 format (3.141... * 65536 = 205887.416) | |
const char | g_EmptyString [1] = {0} |
"" This string is hard coded to be an empty string. It saves space by having a singular occurrence. | |
const char | g_CRLFString [3] = {'\r', '\n', 0} |
"\r\n" | |
const char | g_CRString [2] = {'\r', 0} |
"\r" | |
const char | g_LFString [2] = {'\n', 0} |
"\n" | |
const char | g_TokenDelimiters [5] = {' ', '\t', '\r', '\n', 0} |
" \t\r\n" | |
const char | g_TrueString [5] = {'t', 'r', 'u', 'e', 0} |
"true" | |
const char | g_FalseString [6] = {'f', 'a', 'l', 's', 'e', 0} |
"false" | |
const char | g_YesString [4] = {'y', 'e', 's', 0} |
"yes" | |
const char | g_NoString [3] = {'n', 'o', 0} |
"no" | |
const char | g_NullString [7] = {'(', 'n', 'u', 'l', 'l', ')', 0} |
String to print when a NULL pointer is found. | |
const char * | g_WeekDays [7] |
Days of the week. | |
const char * | g_Months [12] |
Months of the year. | |
const char * | g_pBoolStrings [2] |
Strings to print for a boolean. | |
const uint16_t | g_EmptyString16 [1] = {0} |
"" in UTF16 | |
const uint16_t | g_CRLFString16 [3] = {'\r', '\n', 0} |
"\r\n" in UTF16 | |
const uint16_t | g_CRString16 [2] = {'\r', 0} |
"\r" in UTF16 | |
const uint16_t | g_LFString16 [2] = {'\n', 0} |
"\n" in UTF16 | |
const uint16_t | g_TokenDelimiters16 [5] = {' ', '\t', '\r', '\n', 0} |
" \t\r\n" in UTF16 | |
const uint16_t | g_TrueString16 [5] = {'t', 'r', 'u', 'e', 0} |
"true" in UTF16 | |
const uint16_t | g_FalseString16 [6] = {'f', 'a', 'l', 's', 'e', 0} |
"false" in UTF16 | |
const uint16_t | g_YesString16 [4] = {'y', 'e', 's', 0} |
"yes" in UTF16 | |
const uint16_t | g_NoString16 [3] = {'n', 'o', 0} |
"no" in UTF16 | |
const uint8_t | g_AsciiTestTable [256] |
Table to quickly determine the type of low ASCII character. | |
const char | g_NibbleToAsciiUppercase [16] |
Table to convert nibbles (0-15) into upper case ASCII characters. | |
const char | g_NibbleToAsciiLowercase [16] |
Table to convert nibbles (0-15) into lower case ASCII characters. | |
const uint8_t | g_AsciiToWord8Table [256] |
Table to convert ASCII characters into nibbles (0-15). | |
const uint8_t | g_reverse_bits [256] |
Table to reverse the bit order of a byte. | |
const uint32_t | g_TensTable32 [10] |
Table used for testing powers of ten for 32 bit integer to ASCII conversion. | |
const uint64_t | g_TensTable64 [20] |
Table used for testing powers of ten for 64 bit integer to ASCII conversion. | |
const char * | g_VolumePrefixes [kUnixStadia+1] |
Folder for mounted volumes. | |
const Vector2D_t | g_Vector2DZero = {0.0f, 0.0f} |
Constant of 0.0f,0.0f. | |
const Vector2D_t | g_Vector2DOne = {1.0f, 1.0f} |
Constant of 1.0f,1.0f. | |
const Vector2D_t | g_Vector2DOneX = {1.0f, 0.0f} |
Constant of 1.0f,0.0f. | |
const Vector2D_t | g_Vector2DOneY = {0.0f, 1.0f} |
Constant of 0.0f,1.0f. | |
const Word32ToVector2D_t | g_Vector2DMax |
Constant of Burger::g_fMax,Burger::g_fMax. | |
const Word32ToVector2D_t | g_Vector2DInfinity |
Constant of Burger::g_fInf,Burger::g_fInf. | |
const Vector3D_t | g_Vector3DZero = {0.0f, 0.0f, 0.0f} |
Constant of 0.0f,0.0f,0.0f. | |
const Vector3D_t | g_Vector3DOne = {1.0f, 1.0f, 1.0f} |
Constant of 1.0f,1.0f,1.0f. | |
const Vector3D_t | g_Vector3DOneX = {1.0f, 0.0f, 0.0f} |
Constant of 1.0f,0.0f,0.0f. | |
const Vector3D_t | g_Vector3DOneY = {0.0f, 1.0f, 0.0f} |
Constant of 0.0f,1.0f,0.0f. | |
const Vector3D_t | g_Vector3DOneZ = {0.0f, 0.0f, 1.0f} |
Constant of 0.0f,0.0f,1.0f. | |
const Word32ToVector3D_t | g_Vector3DMax |
Constant of Burger::g_fMax,Burger::g_fMax,Burger::g_fMax. | |
const Word32ToVector3D_t | g_Vector3DInfinity |
Constant of Burger::g_fInf,Burger::g_fInf,Burger::g_fInf. | |
const Vector4D_t | g_Vector4DZero = {0.0f,0.0f,0.0f,0.0f} |
Constant of 0.0f,0.0f,0.0f,0.0f. | |
const Vector4D_t | g_Vector4DOne = {1.0f,1.0f,1.0f,1.0f} |
Constant of 1.0f,1.0f,1.0f,1.0f. | |
const Vector4D_t | g_Vector4DOneX = {1.0f,0.0f,0.0f,0.0f} |
Constant of 1.0f,0.0f,0.0f,0.0f. | |
const Vector4D_t | g_Vector4DOneY = {0.0f,1.0f,0.0f,0.0f} |
Constant of 0.0f,1.0f,0.0f,0.0f. | |
const Vector4D_t | g_Vector4DOneZ = {0.0f,0.0f,1.0f,0.0f} |
Constant of 0.0f,0.0f,1.0f,0.0f. | |
const Vector4D_t | g_Vector4DOneW = {0.0f,0.0f,0.0f,1.0f} |
Constant of 0.0f,0.0f,0.0f,1.0f. | |
const FixedVector3D_t | s_FixedVector3DZero = {BURGER_FLOAT_TO_FIXED(0.0f),BURGER_FLOAT_TO_FIXED(0.0f),BURGER_FLOAT_TO_FIXED(0.0f)} |
Constant of 0.0f,0.0f,0.0f in fixed point. | |
const FixedVector3D_t | s_FixedVector3DOne = {BURGER_FLOAT_TO_FIXED(1.0f),BURGER_FLOAT_TO_FIXED(1.0f),BURGER_FLOAT_TO_FIXED(1.0f)} |
Constant of 1.0f,1.0f,1.0f in fixed point. | |
const FixedVector3D_t | s_FixedVector3DOneX = {BURGER_FLOAT_TO_FIXED(1.0f),BURGER_FLOAT_TO_FIXED(0.0f),BURGER_FLOAT_TO_FIXED(0.0f)} |
Constant of 1.0f,0.0f,0.0f in fixed point. | |
const FixedVector3D_t | s_FixedVector3DOneY = {BURGER_FLOAT_TO_FIXED(0.0f),BURGER_FLOAT_TO_FIXED(1.0f),BURGER_FLOAT_TO_FIXED(0.0f)} |
Constant of 0.0f,1.0f,0.0f in fixed point. | |
const FixedVector3D_t | s_FixedVector3DOneZ = {BURGER_FLOAT_TO_FIXED(0.0f),BURGER_FLOAT_TO_FIXED(0.0f),BURGER_FLOAT_TO_FIXED(1.0f)} |
Constant of 0.0f,0.0f,1.0f in fixed point. | |
const FixedVector4D_t | s_FixedVector4DZero = {BURGER_FLOAT_TO_FIXED(0.0f),BURGER_FLOAT_TO_FIXED(0.0f),BURGER_FLOAT_TO_FIXED(0.0f),BURGER_FLOAT_TO_FIXED(0.0f)} |
Constant of 0.0f,0.0f,0.0f,0.0f in fixed point. | |
const FixedVector4D_t | s_FixedVector4DOne = {BURGER_FLOAT_TO_FIXED(1.0f),BURGER_FLOAT_TO_FIXED(1.0f),BURGER_FLOAT_TO_FIXED(1.0f),BURGER_FLOAT_TO_FIXED(1.0f)} |
Constant of 1.0f,1.0f,1.0f,1.0f in fixed point. | |
const FixedVector4D_t | s_FixedVector4DOneX = {BURGER_FLOAT_TO_FIXED(1.0f),BURGER_FLOAT_TO_FIXED(0.0f),BURGER_FLOAT_TO_FIXED(0.0f),BURGER_FLOAT_TO_FIXED(0.0f)} |
Constant of 1.0f,0.0f,0.0f,0.0f in fixed point. | |
const FixedVector4D_t | s_FixedVector4DOneY = {BURGER_FLOAT_TO_FIXED(0.0f),BURGER_FLOAT_TO_FIXED(1.0f),BURGER_FLOAT_TO_FIXED(0.0f),BURGER_FLOAT_TO_FIXED(0.0f)} |
Constant of 0.0f,1.0f,0.0f,0.0f in fixed point. | |
const FixedVector4D_t | s_FixedVector4DOneZ = {BURGER_FLOAT_TO_FIXED(0.0f),BURGER_FLOAT_TO_FIXED(0.0f),BURGER_FLOAT_TO_FIXED(1.0f),BURGER_FLOAT_TO_FIXED(0.0f)} |
Constant of 0.0f,0.0f,1.0f,0.0f in fixed point. | |
const FixedVector4D_t | s_FixedVector4DOneW = {BURGER_FLOAT_TO_FIXED(0.0f),BURGER_FLOAT_TO_FIXED(0.0f),BURGER_FLOAT_TO_FIXED(0.0f),BURGER_FLOAT_TO_FIXED(1.0f)} |
Constant of 0.0f,0.0f,0.0f,1.0f in fixed point. | |
const Matrix3D_t | g_Matrix3DIdentity |
Constant 3x3 identity matrix. | |
const Matrix4D_t | s_Matrix4DIdentity |
Constant 4x4 identity matrix. | |
const FixedMatrix3D_t | s_FixedMatrix3DIdentity |
Constant 3x3 fixed point identity matrix. | |
const FixedMatrix4D_t | s_FixedMatrix4DIdentity |
Constant 4x4 fixed point identity matrix. | |
const uint32_float_t * | g_pMP3CosinePoints [5] = { g_MP3Cosine64, g_MP3Cosine32, g_MP3Cosine16, g_MP3Cosine8, g_MP3Cosine4 } |
Array of cosine points. | |
const uint32_float_t | g_MP3FHTCosines [4][2] |
4 pairs of FHT cosine/sine values for MP3 encoding | |
const uint32_float_t | g_MP3DCT36Constants [18] |
MP3 Layer 3 table for MP3DCT36. | |
const uint32_float_t | g_MP3DCT12Constants [3] |
MP3 Layer 3 table for 0.5 / cos((Burger::g_dPi * (i*2+1)) / 12.0) | |
const uint8_t | g_pscclr4dx9 [] |
const uint8_t | g_pstex2clr4dx9 [] |
const uint8_t | g_pstexturedx9 [] |
const uint8_t | g_pstexturecolordx9 [] |
const uint8_t | g_vs20pos22ddx9 [] |
const uint8_t | g_vs20pos2tex2clr42ddx9 [] |
const uint8_t | g_vs20sprite2ddx9 [] |
const uint8_t | g_vsstaticpositiondx9 [] |
const char | g_glDiffuseTexture [15] |
(OpenGL only) "DiffuseTexture" | |
const char | g_glPosition [9] |
(OpenGL only) "Position" | |
const char | g_glTexcoord [9] |
(OpenGL only) "Texcoord" | |
const char | g_glColor [6] |
(OpenGL only) "Color" | |
const char | g_glViewProjectionMatrix [21] |
(OpenGL only) "ViewProjectionMatrix" | |
const char | g_glXYWidthHeight [14] |
(OpenGL only) "XYWidthHeight" | |
const char | g_pscclr4gl [] |
const char | g_pstex2clr4gl [] |
const char | g_pstexturegl [] |
const char | g_pstexturecolorgl [] |
const char | g_vs20pos22dgl [] |
const char | g_vs20pos2tex2clr42dgl [] |
const char | g_vs20sprite2dgl [] |
const char | g_vsstaticpositiongl [] |
const uint32_t | g_pscclr4360 [] |
const uint32_t | g_pstex2clr4360 [] |
const uint32_t | g_pstexture360 [] |
const uint32_t | g_pstexturecolor360 [] |
const uint32_t | g_vs20pos22d360 [] |
const uint32_t | g_vs20pos2tex2clr42d360 [] |
const uint32_t | g_vs20sprite2d360 [] |
const uint32_t | g_vsstaticposition360 [] |
const uint8_t | g_pstexturevitaimage [] |
const uint8_t | g_pstexturecolorvitaimage [] |
const uint8_t | g_vs20sprite2dvitaimage [] |
const uint8_t | g_vsstaticpositionvitaimage [] |
const uint_t | g_Effect2DMemberDescription [] |
Vertex description for Effect2D 2 entries for position 2 entries for UV. | |
const VertexBuffer::VertexAoS_t | g_Effect2DDefaultVertexBufferDescription |
Describe the location for Effect2D. | |
const uint_t | g_Shader2DColorVertexMemberDescription [] |
Vertex description for Shader2DColorVertex 2 entries for position 2 entries for UV 4 entries for color. | |
const VertexBuffer::VertexAoS_t | g_Shader2DColorVertexDefaultVertexBufferDescription |
Describe the location for Shader2DColorVertex. | |
const uint_t | g_Shader2DCColorMemberDescription [] |
Vertex description for Shader2DCColor 2 entries for position. | |
const VertexBuffer::VertexAoS_t | g_Shader2DCColorDefaultVertexBufferDescription |
Describe the location for Shader2DCColor. | |
typedef Effect2DDX9 Burger::Effect2DDefault |
16 bit float
Typedef that directly maps to a uint16_t to hold in a register, a 16 bit floating point number.
Burger::Float80Bit |
80 bit float(Extended)
This is a type to abstract the 80-bit floating point data type found in the x8087 and 680x0 math co-processors. Currently, this type is hardly used anymore with the exception of the audio frame rate used in AIFF files.
Burgerlib only has functions to read and write this format into double and float.
Cross platform type for a socket.
BSD sockets are either int for most platforms or an unsigned integer the size of a void * for Microsoft Windows. This type is used to handle this platform difference.
Platform Thread ID.
Every thread has a thread identification number. The number itself is not important, and if 0 it means it's invalid. If non-zero, it's a value that is used by the platform to identify a thread. This ID is not a pointer, but an integer value used by the operating system.
Burger::TLSShutdownProc |
Callback prototype for TLS shutdown.
typedef void(BURGER_API* TLSShutdownProc)(void *pThis);
When ttls_set(uint32_t, const void*, TLSShutdownProc) is called, the passed pointer can be cleaned up using a callback function that matches this prototype. The data pointer is passed as the pThis
parameter to the callback when tls_release() is called.
anonymous enum |
32 bit Intel floating point precision
On Intel 32 bit processors, there's a special floating point register to control the precision of the 80387 compatible FPU
32 bit Intel floating point rounding mode
On Intel 32 bit processors, there's a special floating point register to control the rounding mode from float to integer conversions in the 80387 compatible FPU
Enumerator | |
---|---|
k8087RoundingNearest | Use round to nearest integer (Banker's rounding) |
k8087RoundingDown | Use get_floor() rounding (-Infinity) |
k8087RoundingUp | Use get_ceiling() rounding (+Infinity) |
k8087RoundingTruncate | Use fraction truncation rounding (To Zero) |
Type stored in this object.
When a ArgumentType object is created, it contains intrinsic data of a specific type. This enumeration lists the type it could be.
Enumerator | |
---|---|
kArgumentTypeInvalid | Invalid argument type. |
kArgumentTypeInt8 | Signed 1 byte integer. |
kArgumentTypeInt16 | Signed 2 byte integer. |
kArgumentTypeInt32 | Signed 4 byte integer. |
kArgumentTypeInt64 | Signed 8 byte integer. |
kArgumentTypeUInt8 | Unsigned 1 byte integer. |
kArgumentTypeUInt16 | Unsigned 2 byte integer. |
kArgumentTypeUInt32 | Unsigned 4 byte integer. |
kArgumentTypeUInt64 | Unsigned 8 byte integer. |
kArgumentTypeFloat16 | 16-bit IEEE 754-2008 float, aka binary16 |
kArgumentTypeFloat32 | 32-bit IEEE 754 float |
kArgumentTypeFloat64 | 64-bit IEEE 754 float |
kArgumentTypeBool | bool C++ built in boolean type |
kArgumentTypeVector2 | 64-bit SIMD structure |
kArgumentTypeVector4 | 128-bit SIMD structure |
kArgumentTypeVector4Int | 128-bit SIMD structure, integer only |
kArgumentTypeVector4Dbl | 128-bit SIMD structure, 2 doubles only |
kArgumentTypeBurgerStringPtr | Burgerlib String. |
kArgumentTypeCharPtr | const char* for a "C" string |
kArgumentTypeInt8Ptr | const signed char* for a "C" string |
kArgumentTypeUInt8Ptr | const unsigned char* for a "C" string |
kArgumentTypeInt16Ptr | Pointer to an int16_t. |
kArgumentTypeUInt16Ptr | Pointer to a uint16_t. |
kArgumentTypeInt32Ptr | Pointer to an int32_t. |
kArgumentTypeUInt32Ptr | Pointer to a uint32_t. |
kArgumentTypeInt64Ptr | Pointer to an int64_t. |
kArgumentTypeUInt64Ptr | Pointer to a uint64_t. |
kArgumentTypeFloat32Ptr | Pointer to a float. |
kArgumentTypeFloat64Ptr | Pointer to a double. |
kArgumentTypeBoolPtr | Pointer to a bool. |
kArgumentTypeVector2Ptr | Pointer to a 64-bit SIMD structure. |
kArgumentTypeVector4Ptr | Pointer to a 128-bit SIMD structure, 4 floats only. |
kArgumentTypeVector4IntPtr | Pointer to a 128-bit SIMD structure, 4 32-bit integers. |
kArgumentTypeVector4DblPtr | Pointer to a 128-bit SIMD structure, 2 doubles only. |
kArgumentTypeVoidPtr | void * for a catchall |
kArgumentTypeCount | Auto list counter, all valid types must appear above this. |
kArgumentTypeAny | Used to indicate 'any valid arg'. |
kArgumentTypeFirstInt | First integer entry. |
kArgumentTypeLastInt | Last integer entry. |
kArgumentTypeFirstSigned | First signed integer entry. |
kArgumentTypeLastSigned | Last signed integer entry. |
kArgumentTypeFirstUnsigned | First unsigned integer entry. |
kArgumentTypeLastUnsigned | Last unsigned integer entry. |
kArgumentTypeFirstFloat | First floating point entry. |
kArgumentTypeLastFloat | Last floating point entry. |
kArgumentTypeFirstCString | First "C" string pointer entry. |
kArgumentTypeLastCString | Last "C" string pointer entry. |
kArgumentTypeFirstPointer | First pointer type entry. |
kArgumentTypeLastPointer | Last pointer type entry. |
kArgumentTypeFirstVector | First SIMD entry. |
kArgumentTypeLastVector | Last SIMD entry. |
kArgumentTypeFirstVectorPointer | First SIMD pointer type entry. |
kArgumentTypeLastVectorPointer | Last SIMD pointer type entry. |
enum Burger::eASCIITypeFlag : uint8_t |
Bit flags to quickly test low ASCII character type.
When g_AsciiTestTable[256] is indexed with a low ASCII character in the range of 0 through 127 inclusive, the value will contain one or more flags to quickly determine the type of ASCII character.
Enumerator | |
---|---|
ASCII_LOWER | Lower case character. |
ASCII_UPPER | Upper case character. |
ASCII_CONTROL | Control character. |
ASCII_SPACE | Space character (Tab/CR/LF/FF) |
ASCII_WHITESPACE | Whitespace (Space/Tab only) |
ASCII_PUNCTUATION | Punctuation character. |
kASCIITypeFlagHex | Base 16 numeric character. |
ASCII_DIGIT | Base 10 numeric character. |
enum Burger::eError |
Decompression error code.
Global error codes.
When a Burgerlib function fails, it will return one of these error codes. If the code returned by the operating system can't be mapped to these codes, it will be returned unmodified instead.
Enumerator | |
---|---|
kErrorNone | No error (Always zero). |
kErrorGeneric | General error. |
kErrorInvalidParameter | Input parameter is invalid. |
kErrorInvalidArgument | Invalid argument in function call. |
kErrorNotInitialized | Class or subsystem not initialized. |
kErrorAlreadyInitialized | Class or subsystem already initialized. |
kErrorNotSupported | Command not supported. |
kErrorNotSupportedOnThisPlatform | Function not supported on this platform. |
kErrorVersionMismatch | Version not supported. |
kErrorItemNotFound | Item searched for was not found. |
kErrorNotReady | Not ready yet. |
kErrorOutOfEntries | Fixed array is out of entries. |
kErrorOutOfBounds | Index is beyond the allowed range. |
kErrorFailedTest | Failed unit test. |
kErrorDuplicateEntries | Data was found more than once. |
kErrorRestartRequired | Restart is required. |
kErrorFile | File system errors. |
kErrorFileNotFound | File not found. |
kErrorPathNotFound | Directory to file not found. |
kErrorVolumeNotFound | Volume not found. |
kErrorWriteProtected | Write access was not granted. |
kErrorNoMoreFileDescriptors | No more file descriptors are available. |
kErrorFileTableOverflow | System file table overflow. |
kErrorDirectoryNotEmpty | Files are present in the directory. |
kErrorNotAFile | Operation attempted on an object that wasn't a file. |
kErrorNotADirectory | Operation attempted on an object that wasn't a directory. |
kErrorFileExists | File already exists. |
kErrorOpenFailure | Failed on opening. |
kErrorReadFailure | Failed on reading data. |
kErrorWriteFailure | Failed on writing data. |
kErrorSeekFailure | File or stream seek operation failed. |
kErrorAccessDenied | Permission not granted to perform operation. |
kErrorResourceNotFound | Data resource not found. |
kErrorIO | IO Error. |
kErrorEndOfFile | End of file. |
kErrorIsLocked | File object is locked. |
kErrorMemory | Memory system errors. |
kErrorOutOfMemory | Not enough memory to perform operation. |
kErrorDataCorruption | Data isn't valid or memory overrun detected. |
kErrorBadAlignment | Data wasn't aligned on a proper byte boundary. |
kErrorNoData | No data remaining. |
kErrorBufferTooSmall | Buffer not large enough for operation. |
kErrorBufferTooLarge | Buffer is too large for this operation. |
kErrorAudio | Sound system errors. |
kErrorAudioDriverFailure | Audio driver failed. |
kErrorAudioFormatNotSupported | Audio data format is not supported by the driver. |
kErrorNetwork | Network errors. |
kErrorCancelled | User cancelled. |
kErrorRefused | Operation was refused. |
kErrorNetworkFailure | Network hardware or software failure. |
kErrorDataStarvation | Data required for stream was not available in time. |
kErrorSocketFailure | Network socket failure. |
kErrorAcceptFailure | Failed on accepting a connection. |
kErrorAddressNotFound | Network address not found. |
kErrorFlowInterrupted | Network flow interrupted (Or blocked) |
kErrorVideo | Video and shader errors. |
kErrorColorDepthNotSupported | Color depth requested is not available on current hardware. |
kErrorResolutionNotSupported | Requested display resolution is not available on current hardware. |
kErrorGPUFailure | GPU hardware fault. |
kErrorShaderCompile | Shader didn't compile. |
kErrorShaderIncludeMissing | Shader has a bad include. |
kErrorOutOfVideoMemory | Out of video memory. |
kErrorPalette | Palette upload failure. |
kErrorThread | Thread and process errors. |
kErrorTimeout | Operation timed out. |
kErrorEnumerationInProgress | Enumeration operation is in progress. |
kErrorNotEnumerating | Enumeration operation isn't running. |
kErrorCantLock | Thread lock failure. |
kErrorCantUnlock | Thread unlock failure. |
kErrorThreadNotStarted | Thread couldn't start. |
kErrorThreadAlreadyStarted | Thread already in progress. |
kErrorThreadCantStop | Thread won't stop. |
kErrorThreadNotFound | Thread not found. |
kErrorThreadNotModified | Thread not modified. |
enum Burger::eEvent |
Enumeration for input events.
Enumerator | |
---|---|
EVENT_NULL | Keyboard null event. |
EVENT_TIMER | Keyboard timer event. |
EVENT_KEYDOWN | Keyboard keypress event. |
EVENT_KEYUP | Keyboard key up event. |
EVENT_KEYAUTO | Keyboard repeated key event. |
EVENT_MOUSEDOWN | Mouse button down event. |
EVENT_MOUSEUP | Mouse button up event. |
EVENT_MOUSEMOVE | Mouse motion event. |
EVENT_MOUSEPOSITION | Mouse position event. |
EVENT_MOUSEWHEEL | Mouse wheel event. |
EVENT_JOYPADDOWN | Joypad button press. |
EVENT_JOYPADUP | Joypad button release. |
EVENT_JOYPADAXIS | Joypad axis motion. |
EVENT_COUNT | Maximum event code. |
enum Burger::eHintFlags |
Flags to enable/disable underlying code.
Some underlying code in Burgerlib may or may not cause issues with higher level code, such as throwing exception, debugger integration which can cause issues. These flags will enable or disable these underlying features.
Enumerator | |
---|---|
kHintWin32DisableThreadNamingException | Disable the throwing of an exception to name a thread. |
ID codes for supported Network protocols.
For each NetworkModule class, there is a unique ID code for that protocol. Not all protocols are supported on all platforms.
TCP/IP is the only protocol supported by a majority of platforms.
Enumerator | |
---|---|
kNetworkProtocolAppleTalk | Module is AppleTalk. |
kNetworkProtocolIP | Module is TCP/IP (Both IPv4 and IPv6) |
kNetworkProtocolIPX | Module is IPX/SPX. |
kNetworkProtocolBonjour | Module is TCP/IP using Bonjour. |
kNetworkProtocolSteam | Module is Steam. |
kNetworkProtocolXBoxLive | Module is Xbox Live. |
kNetworkProtocolUnknown | Module is not loaded or defined. |
kNetworkProtocolCount | Number of valid module types. |
Bit flags to control numeric text generation.
The functions that convert a float or integer into an ASCII string use these flags to suppress the output of the terminating zero and/or leading zeros. The default behavior is that a zero is output as the last character so that the string is a valid "C" string and no leading ASCII zeros.
Enumerator | |
---|---|
NOENDINGNULL | Pass this flag to disable storing a terminating zero. |
LEADINGZEROS | Pass this flag to enable leading ASCII zeros output. |
PowerPC floating point rounding mode.
On PowerPC processors, there's a special floating point register to control the rounding mode when precision is lost.
Enumerator | |
---|---|
kPPCRoundingNearest | Use round to nearest integer (Banker's rounding) |
kPPCRoundingTruncate | Use fraction truncation rounding (To Zero) |
kPPCRoundingUp | Use get_ceiling() rounding (+Infinity) |
kPPCRoundingDown | Use get_floor() rounding (-Infinity) |
enum Burger::eSocketFlags |
Flags for socket types.
Network sockets come in two types, guaranteed in order delivery and out of order. These bit flags are used to determine which types are needed to be connected to a port.
Enumerator | |
---|---|
kSocketFlagDatagram | Flag for datagram mode. |
kSocketFlagStream | Flag for stream mode. |
kSocketFlagAll | Flag for all modes. |
kSocketFlagNone | Flag for no modes. |
Number of types of sockets available.
Network sockets come in two types, guaranteed in order delivery and out of order. This enum enumerates these types.
Enumerator | |
---|---|
kSocketIndexDatagram | Index to the socket for datagrams. |
kSocketIndexStream | Index to the socket for streams. |
kSocketIndexCount | Number of sockets allowed for this endpoint. |
Thread priority setting.
When calling Burger::set_thread_priority(Burger::ThreadID, Burger::eThreadPriority), this is the enumeration used to set the thread priority in a cross platform way.
enum Burger::eTraceFlags |
Flags to enable debugging features.
Many burgerlib functions allow for logging of information at runtime, and the behavior is enabled by setting these flags. Normally, the default is all flags clear.
enum Burger::eUnixFlavor |
Enum describing the actual platform Unix is running on.
Enumerator | |
---|---|
kUnixUnknown | Unknown flavor of Linux. |
kUnixNative | Native Linux distribution. |
kUnixMSYS2 | Linux running under MSYS2. |
kUnixWSL | |
kUnixCygwin | Linux running under Cygwin. |
kUnixMacOSX | |
kUnixiOS | Unix running as iOS. |
kUnixAndroid | Linux running under Android. |
kUnixStadia | Linux running under Google Stadia. |
|
externnoexcept |
Fetch a double value from memory with byte alignment.
Assuming the data is unaligned, it will grab data a byte at a time and reconstruct it into a double value in native endian.
pInput | Pointer to a double value. |
|
externnoexcept |
Fetch a float value from memory with byte alignment.
Assuming the data is unaligned, it will grab data a byte at a time and reconstruct it into a float value in native endian.
pInput | Pointer to a float value. |
|
externnoexcept |
Fetch a 16 bit unsigned value from memory with byte alignment.
Assuming the data is unaligned, it will grab data a byte at a time and reconstruct it into a 16 bit value in native endian.
pInput | Pointer to a 16 bit value. |
|
externnoexcept |
Fetch a 32 bit unsigned value from memory with byte alignment.
Assuming the data is unaligned, it will grab data a byte at a time and reconstruct it into a 32 bit value in native endian.
pInput | Pointer to a 32 bit value. |
|
externnoexcept |
Fetch a 64 bit unsigned value from memory with byte alignment.
Assuming the data is unaligned, it will grab data a byte at a time and reconstruct it into a 64 bit value in native endian.
pInput | Pointer to a 64 bit value. |
|
externnoexcept |
Fetch a 64 bit reverse endian float from memory with byte alignment.
Given a pointer to a 64-bit floating point value, load it and swap the bytes so that 0x123456789ABCDEF0 becomes 0xF0DEBC9A78563412. The pointer does not have to be 64-bit aligned. uint8_t alignment is acceptable.
pInput | Pointer to the value to endian convert |
|
externnoexcept |
Fetch a 32 bit reverse endian float from memory with byte alignment.
Given a pointer to a 32-bit floating point value, load it and swap the bytes so that 0x12345678 becomes 0x78563412. The pointer does not have to be 32-bit aligned. uint8_t alignment is acceptable.
pInput | Pointer to the value to endian convert |
|
externnoexcept |
Fetch a 16 bit unsigned reverse endian integer from memory with byte alignment.
Given a pointer to a 16 bit value, load it and swap the bytes so that 0x1234 becomes 0x3412. The pointer does not have to be 16-bit aligned. uint8_t alignment is acceptable.
pInput | Pointer to a value to endian convert |
|
externnoexcept |
Fetch a 32 bit unsigned reverse endian integer from memory with byte alignment.
Given a pointer to a 32 bit value, load it and swap the bytes so that 0x12345678 becomes 0x78563412. The pointer does not have to be 32-bit aligned. uint8_t alignment is acceptable.
pInput | Pointer to value to endian convert |
|
externnoexcept |
Fetch a 64 bit unsigned reverse endian integer from memory with byte alignment.
Assuming the data is unaligned, it will grab data a byte at a time and reconstruct it into a 64 bit value in reverse endian. The pointer does not have to be 64-bit aligned. uint8_t alignment is acceptable.
pInput | Pointer to a 64 bit value. |
|
externnoexcept |
Store a double value to memory with byte alignment.
Assuming the output pointer is unaligned, it will store data a byte at a time into a 64 bit float value in native endian.
pOutput | Pointer to a double value. |
dInput | The double value. |
|
externnoexcept |
Store a float value to memory with byte alignment.
Assuming the output pointer is unaligned, it will store data a byte at a time into a 32 bit float value in native endian.
pOutput | Pointer to a float value. |
fInput | The float value. |
|
externnoexcept |
Store a 16 bit unsigned value to memory with byte alignment.
Assuming the output pointer is unaligned, it will store data a byte at a time into a 16 bit value in native endian.
pOutput | Pointer to a 16 bit value. |
uInput | The 16 bit unsigned value. |
|
externnoexcept |
Store a 32 bit unsigned value to memory with byte alignment.
Assuming the output pointer is unaligned, it will store data a byte at a time into a 32 bit value in native endian.
pOutput | Pointer to a 32 bit value. |
uInput | The 32 bit unsigned value. |
|
externnoexcept |
Store a 64 bit unsigned value to memory with byte alignment.
Assuming the output pointer is unaligned, it will store data a byte at a time into a 64 bit value in native endian.
pOutput | Pointer to a 64 bit value. |
uInput | The 64 bit unsigned value. |
|
externnoexcept |
Store a double value to memory with endian swapping with byte alignment.
Assuming the output pointer is unaligned, it will store data a byte at a time into a 64 bit float value in reversed endian.
pOutput | Pointer to a double value. |
dInput | The double value. |
|
externnoexcept |
Store a float value to memory with endian swapping with byte alignment.
Assuming the output pointer is unaligned, it will store data a byte at a time into a 32 bit float value in reversed endian.
pOutput | Pointer to a float value. |
fInput | The float value. |
|
externnoexcept |
Store a 16 bit unsigned value with endian swapping to memory with byte alignment.
Assuming the output pointer is unaligned, it will store data a byte at a time into a 16 bit value in reversed endian.
pOutput | Pointer to a 16 bit value. |
uInput | The 16 bit unsigned value. |
|
externnoexcept |
Store a 32 bit unsigned value with endian swapping to memory with byte alignment.
Assuming the output pointer is unaligned, it will store data a byte at a time into a 32 bit value in reversed endian.
pOutput | Pointer to a 32 bit value. |
uInput | The 32 bit unsigned value. |
|
externnoexcept |
Store a 64 bit unsigned value with endian swapping to memory with byte alignment.
Assuming the output pointer is unaligned, it will store data a byte at a time into a 64 bit value in reversed endian.
pOutput | Pointer to a 64 bit value. |
uInput | The 64 bit unsigned value. |
|
externnoexcept |
Swap endian of a 64 bit float.
Reverse the endian of a 64 bit float. Implemented in assembly on some platforms.
pInput | Pointer to the value to return endian swapped |
|
externnoexcept |
Swap endian of a 64 bit float.
Reverse the endian of a 64 bit float. Implemented in assembly on some platforms.
dInput | The value to return endian swapped |
|
externnoexcept |
Swap endian of a 32 bit float from a pointer.
Reverse the endian of a 32 bit float. Implemented in assembly on some platforms.
pInput | Pointer to the value to return endian swapped |
|
externnoexcept |
Swap endian of a 32 bit float.
Reverse the endian of a 32 bit float. Implemented in assembly on some platforms.
fInput | The value to return endian swapped |
|
externnoexcept |
Get the absolute value of a double.
Return the absolute value of the floating point input. This is usually done by inline assembly.
dInput | A valid double precision floating point number. |
|
externnoexcept |
Get the absolute value of a float.
Return the absolute value of the floating point input. This is usually done by inline assembly.
fInput | A valid single precision floating point number. |
|
inlinenoexcept |
Get the absolute value of an integer.
Without branching, calculate the absolute value of an integer.
iInput | Value to get the absolute value of. |
|
inlinenoexcept |
Get the absolute value of an integer.
Without branching, calculate the absolute value of an integer.
iInput | Value to get the absolute value of. |
|
inlinenoexcept |
Get the absolute value of a 64 bit integer.
Without branching, calculate the absolute value of an integer.
iInput | Value to get the absolute value of. |
|
inline |
Get the absolute value of an integer.
Without branching, calculate the absolute value of an integer.
iInput | Value to get the absolute value of. |
|
externnoexcept |
Allocate memory.
Allocate memory using the GlobalMemoryManager
uSize | Number of bytes requested to allocate |
|
externnoexcept |
Allocate memory that is preinitialized to zero.
Allocate memory using the Burger::GlobalMemoryManager. If the allocation was successful, initialize all the memory to zero.
uSize | Number of bytes requested to allocate |
|
externnoexcept |
Allocate a buffer and copy data into it.
Allocate memory and copy the contents of the pointer to the new memory
pInput | Pointer to the data to copy. nullptr will leave the data uninitialized |
uSize | Size of the buffer to allocate. |
|
externnoexcept |
Allocate memory from the underlying operating system.
The handle based memory manager obtains the memory it controls from the operating system. Generic systems call malloc(), other systems call the low level functions directly
On MacOS, this calls NewPtr(), Windows calls HeapAlloc(), etc...
uSize | Number of bytes requested from the operating system |
|
externnoexcept |
Convert a XAudio2 Amplitude multiplier to a DirectSound decibel value.
Convert the volume of 0.0f to 1.0f into decibels from -10000 to 0
fVolume | in the form of 0.0f to 1.0f in the scale needed for XAudio2 GetVolume() |
|
externnoexcept |
Convert hex ASCII string to an integer.
Scan a hex string and return a 32 bit unsigned integer
Parsing ends either when characters are exhausted of if a non-ASCII character is found. Overflow returns BURGER_MAXUINT
pInput | Pointer to the ASCII string |
uLength | Length of the string in bytes |
|
externnoexcept |
Convert hex UTF-16 string to an integer.
Scan a hex string and return a 32 bit unsigned integer
Parsing ends either when characters are exhausted of if a non-ASCII character is found. Overflow returns BURGER_MAXUINT
pInput | Pointer to the UTF-16 string |
uLength | Length of the string in bytes |
|
externnoexcept |
Convert an ASCII string into a boolean.
If the case insensitive string matches yes, no, true or false, return 1,0,1,0 in that order. Otherwise, parse it as a number and return 1 if it's non-zero and 0 if it's zero or invalid.
String matching does not look for ending whitespace, so true and true value will both match as "true" and return 1. The pDest return value will be moved forward by four characters in both cases.
pInput | Pointer to the string to convert. nullptr will page fault. |
pDest | Pointer to a const char * that will either be given pInput (Error) of pInput moved ahead until a non-numeric character was found. This can be nullptr if the application doesn't require the location of the string after the integer was parsed. |
|
externnoexcept |
Convert an ASCII string into a boolean.
Convert the string to a TRUE or a FALSE. If the input is nullptr or invalid, return the default value.
"true" and "yes" are considered TRUE while "false" and "no" are considered FALSE. The comparison is case insensitive.
pInput | Pointer to the string to convert. nullptr will force the default |
bDefault | Default boolean to return in the event of a parsing error. |
|
externnoexcept |
Convert an ASCII string into a boolean and signal if successful.
Convert the string to a TRUE or a FALSE. If the input is nullptr or invalid, return FALSE.
"true" and "yes" are considered TRUE while "false" and "no" are considered FALSE. The comparison is case insensitive.
pOutput | Pointer to the value to return |
pInput | Pointer to the string to convert. nullptr will force the default |
|
externnoexcept |
Convert an ASCII string into a floating point number.
Take a floating point number of the format (+/-)303.030e(+/-)1 and turn it into a double that is the equivalent.
If a number is parsed, the character at the end of the string after whitespace is removed is the one pointed by pDest.
Examples:
1.0
1.666
1666.4
1e3 -> 1000
NAN -> NAN
INF -> INF
pInput | Pointer to the ASCII string with the number to parse. |
pDest | Pointer to receive the character beyond the last character parsed. Will equal pInput on error. |
|
externnoexcept |
Return a 64 bit floating point value.
Scan the value string as a 64 bit floating point numeric value and if successful, return it. If it's not a number, return the default.
If NaN or Inf is detected, it will be converted to a zero to prevent floating point issues.
pInput | Pointer to the string to convert. nullptr will force the default |
dDefault | Value to return on error |
|
externnoexcept |
Return a 64 bit floating point value.
Scan the value string as a 64 bit floating point numeric value and if successful, test it against the valid range and return the value clamped to that range. If it's not a number, return the default.
If NaN or Inf is detected, it will be converted to a zero to prevent floating point issues.
pInput | Pointer to the string to convert. nullptr will force the default |
dDefault | Value to return on error |
dMin | Minimum acceptable value |
dMax | Maximum acceptable value |
|
externnoexcept |
Return a 64 bit floating point value and signal if successful.
Scan the value string as a 64 bit floating point numeric value and if successful, return TRUE. If it's not a number, return FALSE.
pOutput | Pointer to the value to return |
pInput | Pointer to the string to convert. nullptr will force the default |
|
externnoexcept |
Convert an ASCII string into a floating point number.
Take a floating point number of the format (+/-)303.030e(+/-)1 and turn it into a float that is the equivalent.
If a number is parsed, the character at the end of the string after whitespace is removed is the one pointed by pDest.
Examples:
1.0
1.666
1666.4
1e3 -> 1000
NAN -> NAN
INF -> INF
pInput | Pointer to the ASCII string with the number to parse. |
pDest | Pointer to receive the character beyond the last character parsed. Will equal pInput on error. |
|
externnoexcept |
Return a floating point value.
Scan the value string as a 32 bit floating point numeric value and if successful, return it. If it's not a number, return the default.
If NaN or Inf is detected, it will be converted to a zero to prevent floating point issues.
pInput | Pointer to the string to convert. nullptr will force the default |
fDefault | Value to return on error |
|
externnoexcept |
Return a floating point value.
Scan the value string as a 32 bit floating point numeric value and if successful, test it against the valid range and return the value clamped to that range. If it's not a number, return the default.
If NaN or Inf is detected, it will be converted to a zero to prevent floating point issues.
pInput | Pointer to the string to convert. nullptr will force the default |
fDefault | Value to return on error |
fMin | Minimum acceptable value |
fMax | Maximum acceptable value |
|
externnoexcept |
Return a floating point value and signal if successful.
Scan the value string as a 32 bit floating point numeric value and if successful, return TRUE. If it's not a number, return FALSE.
pOutput | Pointer to the value to return |
pInput | Pointer to the string to convert. nullptr will force the default |
|
externnoexcept |
Convert an ASCII string into an integer.
Take a string formatted as a simple integer number a hex number of the form $5123 or 0x1234 with or without a preceding '-' sign and convert it into a 32 bit integer value.
Overflow is detected and is considered an error condition. 0xFFFFFFFFU will be returned in this case.
pInput | Pointer to the string to convert. nullptr will page fault. |
pDest | Pointer to a const char * that will either be given pInput (Error) of pInput moved ahead until a non-numeric character was found. This can be nullptr if the application doesn't require the location of the string after the integer was parsed. |
|
externnoexcept |
Return a signed integer value.
Scan the value string as a 32 bit signed integer or hex value and if successful, test it against the valid range and return the value clamped to that range. If it's not a number, return the default.
Hex strings are acceptable input in the form of $1234 and 0x1234. 0xFFFFFFFF will be converted to -1.
pInput | Pointer to the string to convert. nullptr will force the default |
iDefault | Value to return on error |
iMin | Minimum acceptable value |
iMax | Maximum acceptable value |
|
externnoexcept |
Convert a 32 bit integer and signal if successful.
Scan the value string as a 32 bit integer or hex value and if successful, return TRUE.
Hex strings are acceptable input in the form of $1234 and 0x1234. 0xFFFFFFFF will be converted to -1.
pOutput | Pointer to the value to return |
pInput | Pointer to the string to convert. nullptr will force the default |
|
externnoexcept |
Convert an ASCII string into a 64 bit integer.
Take a string formatted as a simple integer number, a hex number of the form $5123 or 0x1234 with or without a preceding '-' sign and convert it into a 64 bit integer value.
Overflow is detected and is considered an error condition. 0xFFFFFFFFFFFFFFFFU will be returned in this case.
pInput | Pointer to the string to convert. nullptr will page fault. |
pDest | Pointer to a const char * that will either be given pInput (Error) of pInput moved ahead until a non-numeric character was found. This can be nullptr if the application doesn't require the location of the string after the integer was parsed. |
|
externnoexcept |
Return a signed integer value.
Scan the value string as a 64 bit signed integer or hex value and if successful, test it against the valid range and return the value clamped to that range. If it's not a number, return the default.
Hex strings are acceptable input in the form of $1234 and 0x1234. 0xFFFFFFFFFFFFFFFF will be converted to -1.
pInput | Pointer to the string to convert. nullptr will force the default |
iDefault | Value to return on error |
iMin | Minimum acceptable value |
iMax | Maximum acceptable value |
|
externnoexcept |
Convert a 64 bit integer and signal if successful.
Scan the value string as a 64 bit integer or hex value and if successful, return TRUE.
Hex strings are acceptable input in the form of $1234 and 0x1234. 0xFFFFFFFFFFFFFFFF will be converted to -1.
pOutput | Pointer to the value to return |
pInput | Pointer to the string to convert. nullptr will force the default |
|
externnoexcept |
Return an unsigned integer value.
Scan the value string as a 32 bit unsigned integer or hex value and if successful, test it against the valid range and return the value clamped to that range. If it's not a number, return the default.
Hex strings are acceptable input in the form of $1234 and 0x1234
pInput | Pointer to the string to convert. nullptr will force the default |
uDefault | Value to return on error |
uMin | Minimum acceptable value |
uMax | Maximum acceptable value |
|
externnoexcept |
Return an unsigned integer value.
Scan the value string as a 64 bit unsigned integer or hex value and if successful, test it against the valid range and return the value clamped to that range. If it's not a number, return the default.
Hex strings are acceptable input in the form of $1234 and 0x1234
pInput | Pointer to the string to convert. nullptr will force the default |
uDefault | Value to return on error |
uMin | Minimum acceptable value |
uMax | Maximum acceptable value |
|
externnoexcept |
Redirect an assert to the application's assert function.
When an assert is fired from the use of the macro BURGER_ASSERT this function is called which redirects to the currently logged assert function. It's global by design.
Prints the message "Assertion from \"%s\" in file %s at line %u.\n", pCondition, pFilename, uLineNumber using Debug::Message(), and then calls invoke_debugger(). If execution continues, it will call Debug::Fatal() with the same message and exit the application.
pCondition | "C" string of the test condition that fired off the assert |
pFilename | The value of the "__FILE__" macro at the location of the BURGER_ASSERT macro |
uLineNumber | The value of the "__LINE__" macro at the location of the BURGER_ASSERT macro |
|
externnoexcept |
Atomically add a 32 bit value to a variable in memory.
For multi-CPU machines, this function will atomically add a value to one stored in memory using appropriate locking for all CPUs. It will return the value before the addition was applied.
pOutput | Pointer to a 32 bit aligned memory location to add a value to |
uInput | 32 bit value to add |
|
externnoexcept |
Atomically add a 64 bit value to a variable in memory.
For multi-CPU machines, this function will atomically add a value to one stored in memory using appropriate locking for all CPUs. It will return the value before the addition was applied.
pOutput | Pointer to a 64 bit aligned memory location to add a value to |
uInput | 64 bit value to add |
|
externnoexcept |
Atomically swaps a 32 bit value for one in memory.
Atomically swap a value in a memory only if the memory matches the previous value.
pOutput | Pointer to a 32 bit aligned memory location to swap with |
uOld | 32 bit value to compare with the memory location |
uNew | 32 bit value to store if the comparison succeeds |
|
externnoexcept |
Atomically swaps a 64 bit value for one in memory.
Atomically swap a value in a memory only if the memory matches the previous value.
pOutput | Pointer to a 64 bit aligned memory location to swap with |
uOld | 64 bit value to compare with the memory location |
uNew | 64 bit value to store if the comparison succeeds |
|
externnoexcept |
Atomically gets a 32 bit value from memory.
For multi-CPU machines, this function will atomically load a value with using appropriate locking for all CPUs
pInput | Pointer to a 32 bit aligned memory location to load from |
|
externnoexcept |
Atomically gets a 64 bit value from memory.
For multi-CPU machines, this function will atomically load a value with using appropriate locking for all CPUs
pInput | Pointer to a 64 bit aligned memory location to load from |
|
externnoexcept |
Lock a spin lock.
Wait until a spin lock is released and then lock it. If the lock is already in possession by another thread, let this thread sleep for a moment to let the other thread do it's job and release the lock for this thread's use.
pInput | Pointer to a 32 bit aligned memory location to lock |
|
externnoexcept |
Atomically sets a 32 bit value to memory.
For multi-CPU machines, this function will atomically store a value with using appropriate locking for all CPUs
pOutput | Pointer to a 32 bit aligned memory location to set |
uInput | 32 bit value to set in the memory location |
|
externnoexcept |
Atomically sets a 64 bit value for one in memory.
For multi-CPU machines, this function will atomically swap a value with one stored in memory using appropriate locking for all CPUs
pOutput | Pointer to a 64 bit aligned memory location to set |
uInput | 64 bit value to set in the memory location |
|
externnoexcept |
|
externnoexcept |
Unlock a spin lock.
Set a spin lock to zero, atomically.
pInput | Pointer to a 32 bit aligned memory location to unlock |
|
extern |
|
extern |
|
externnoexcept |
Load a big endian 80 bit float as a double.
Convert an 80 bit float stored in memory in big endian format into a double in native endian
pInput | Pointer to the 80 bit floating point number |
|
externnoexcept |
Reverse the bits in a byte.
Given a bit width (From 1 through 32), reverse the order of the bits within.
Since this version is variable width, if uBitLength is equal to 4, the truth table would look like this...
Input | Output |
---|---|
0x00 | 0x00 |
0x01 | 0x02 |
0x02 | 0x01 |
0x03 | 0x03 |
Whereas if uBitLength is equal to 8, the truth table would look like this...
Input | Output |
---|---|
0x00 | 0x00 |
0x01 | 0x00 |
0x02 | 0x40 |
0x03 | 0xC0 |
uInput | Value to bit reverse |
uBitLength | Width of the value to reverse (1 through 32) |
|
externnoexcept |
Reverse the bits in a byte.
Given a bit width (From 1 through 64), reverse the order of the bits within.
Since this version is variable width, if uBitLength is equal to 4, the truth table would look like this...
Input | Output |
---|---|
0x00 | 0x00 |
0x01 | 0x02 |
0x02 | 0x01 |
0x03 | 0x03 |
Whereas if uBitLength is equal to 8, the truth table would look like this...
Input | Output |
---|---|
0x00 | 0x00 |
0x01 | 0x80 |
0x02 | 0x40 |
0x03 | 0xC0 |
uInput | Value to bit reverse |
uBitLength | Width of the value to reverse (1 through 64) |
|
externnoexcept |
Compute the (Mark) Adler-16 checksum.
Create a 16 bit Alder-16 checksum using a 16 bit version the Alder algorithm.
Implemented following the documentation for the 32 bit version found in http://en.wikipedia.org/wiki/Adler-32
The lower 8 bits is a simple additive checksum with a starting value of 1.
The upper 8 bits is a factorial additive checksum based on the additive checksum with a starting value of 0
pInput | Pointer to a buffer to be checksummed |
uInputLength | Number of bytes in the buffer to be checksummed |
uAdler16 | Alder-16 from previous calculations or one if a new checksum is desired |
|
externnoexcept |
Compute the (Mark) Adler-32 checksum.
Implemented following the documentation found in http://en.wikipedia.org/wiki/Adler-32 and http://tools.ietf.org/html/rfc1950
The lower 16 bits is a simple additive checksum with a starting value of 1.
The upper 16 bits is a factorial additive checksum based on the additive checksum with a starting value of 0
pInput | Pointer to a buffer to be checksummed |
uInputLength | Number of bytes in the buffer to be checksummed |
uAdler32 | Alder-32 from previous calculations or one if a new checksum is desired |
|
externnoexcept |
Calculate the CRC16-IBM checksum (MP3) for a buffer.
Calculates a 16-bit CRC, "CRC16-IBM", which is the 16-bit Frame Check Sequence of MP3.
The polynomial format is X^16+X^15+X^2+X^0 or 0x8005
Implemented following the documentation found in http://en.wikipedia.org/wiki/Cyclic_redundancy_check
pInput | Pointer to a buffer to be checksummed |
uInputLength | Number of bytes in the buffer to be checksummed |
uCRC | CRC from previous calculations or zero if a new checksum is desired |
|
externnoexcept |
Calculate the CRC32 checksum (Ethernet) for a buffer.
Calculates a 32-bit CRC, "CRC32", which is the 32-bit Frame Check Sequence of ITU V.42. This is the CRC algorithm used for Ethernet
The polynomial format is X^32+X^26+X^23+X^22+X^16+X^12+X^11+X^10+X^8+X^7+X^5+X^4+X^2+X^1+X^0 or 0x04C11DB7
Implemented following the documentation found in http://en.wikipedia.org/wiki/Cyclic_redundancy_check and http://wiki.osdev.org/CRC32
pInput | Pointer to a buffer to be checksummed |
uInputLength | Number of bytes in the buffer to be checksummed |
uCRC | CRC from previous calculations or zero if a new checksum is desired |
|
externnoexcept |
Calculate the CRC32B checksum (ZLib) for a buffer.
Calculates a 32-bit CRC, "CRC32B", which is the 32-bit Frame Check Sequence of ITU V.42. This is the CRC algorithm used for Zlib, PNG, MPEG-2, Gzip and others
The polynomial format is X^32+X^26+X^23+X^22+X^16+X^12+X^11+X^10+X^8+X^7+X^5+X^4+X^2+X^1+X^0 or 0x04C11DB7
Implemented following the documentation found in http://en.wikipedia.org/wiki/Cyclic_redundancy_check and http://wiki.osdev.org/CRC32
pInput | Pointer to a buffer to be checksummed |
uInputLength | Number of bytes in the buffer to be checksummed |
uCRC | CRC from previous calculations or zero if a new checksum is desired |
|
externnoexcept |
Test if a file has either a resource or data fork.
Before copying a file, check if the source has a resource or data fork, so only the detected forks will be copied. Return two booleans that are either TRUE or FALSE if either fork is detected. FSGetCatalogInfo() is used to check the fork sizes.
This function always returns paramErr
if running on MacOS 7 or 8.
pFSRef | Pointer to the FSRef of the file of interest. |
pbDataFork | Pointer to a boolean to receive the presence of a data fork. |
pbResourceFork | Pointer to a boolean to receive the presence of a resource fork. |
|
externnoexcept |
Test if a file has either a resource or data fork.
Before copying a file, check if the source has a resource or data fork, so only the detected forks will be copied. Return two booleans that are either TRUE or FALSE if either fork is detected. PBHGetFInfoSync() is used to check the fork sizes.
pFSSpec | Pointer to the FSSpec of the file of interest. |
pbDataFork | Pointer to a boolean to receive the presence of a data fork. |
pbResourceFork | Pointer to a boolean to receive the presence of a resource fork. |
|
externnoexcept |
Test if a file has either a resource or data fork.
Before copying a file, check if the source has a resource or data fork, so only the detected forks will be copied. Return two booleans that are either TRUE or FALSE if either fork is detected. PBHGetFInfoSync() is used to check the fork sizes.
svRefNum | Volume the file resides on |
lDirID | Directory ID the file resides on |
pName | Pointer to a PASCAL string of the filename |
pbDataFork | Pointer to a boolean to receive the presence of a data fork. |
pbResourceFork | Pointer to a boolean to receive the presence of a resource fork. |
|
externnoexcept |
Check if a volume is locked.
Given a volume reference number, get its information and determine if it is locked. If no error is returned, the volume is not locked. A wPrErr is returned if the lock is by hardware (Write protect tab) or vLckdErr if the volume was locked by a software flag.
svRefNum | Volume reference number |
|
extern |
Determine the optimum size of a grid.
Utility to find good values for x width and y height for a grid index, based on the expected number of items to index and the bounding box.
A bias for the values up or down using grid_scale can be applied
pXCellCount | Pointer to receive the width of the new grid |
pYCellCount | Pointer to receive the height of the new grid |
pBoundingRect | Bounding rect of the grid |
uItemCountEstimate | Number of items likely to occupy the grid |
fGridScale | Scale for precision |
|
inlinenoexcept |
Clamp the input between a bounds.
If the input value is less than the minimum, return the minimum or if the input value is greater than the maximum, return the maximum, otherwise return the input value. No checking is performed to determine if the minimum is less than the maximum.
T | Input data type |
Input | First value to test |
Min | Minimum allowed value |
Max | Maximum allowed value |
|
inlinenoexcept |
Clamp an integer to 0.
Without branching, if the integer is less than zero, set it to zero.
iInput | Value to test for less than zero. |
|
inlinenoexcept |
Clamp an integer to 0.
Without branching, if the integer is less than zero, set it to zero.
iInput | Value to test for less than zero. |
|
inlinenoexcept |
Clamp an integer to 0.
Without branching, if the integer is less than zero, set it to zero.
iInput | Value to test for less than zero. |
|
inlinenoexcept |
Clamp an integer to 0.
Without branching, if the integer is less than zero, set it to zero.
iInput | Value to test for less than zero. |
|
externnoexcept |
Clear the text console.
For platforms that support a text console, clear out the text console by sending a line feed or system appropriate set of calls to perform the same action the ends up with a clear text screen and the output cursor set to the upper left corner.
This is an equivalent of the Borland C library function clrscr().
|
extern |
Clear an RGBA palette.
Set the red, green and blue values to zero and the alpha to 255
pOutput | Pointer to the palette to set to Black |
uPaletteSize | Number of color entries to clear |
|
extern |
Clear an RGB palette.
Set all values to zero
pOutput | Pointer to the palette to set to Black |
uPaletteSize | Number of color entries to clear |
|
extern |
Clear sound data.
Fill the sound buffer with data that represents silence. For unsigned char, fill with 0x80U, all other formats will fill with zero.
pOutput | Pointer to the buffer to receive the converted data |
uLength | Length of the sound data in bytes |
eType | Type of the input sound data |
|
extern |
Add in an 16 bit reverb.
Given a scale in the format of a percentage of 0 to 100, apply the scaled input buffer to the output buffer via addition to generate reverb
pOutput | Pointer to the buffer which will have reverb applied |
pInput | Pointer to the buffer which the reverb comes from |
uCount | Number of bytes to process |
uPercentage | Scale of reverb 0 is none, 100 is full volume |
|
extern |
Add in an 8 bit reverb.
Given a scale in the format of a percentage of 0 to 100, apply the scaled input buffer to the output buffer via addition to generate reverb
pOutput | Pointer to the buffer which will have reverb applied |
pInput | Pointer to the buffer which the reverb comes from |
uCount | Number of bytes to process |
uPercentage | Scale of reverb 0 is none, 100 is full volume |
|
extern |
Convert an RGB color to HSL color.
Perform a conversion of RGB color space to Hue, Saturation and Intensity color space
pOutput | Pointer to the structure to get the converted HSL color |
pInput | Pointer to an RGB color in the range for 0.0f to 1.0f per element |
|
extern |
Convert a HSL color to an RGB color.
Perform a conversion of Hue, Saturation and Intensity color space to Red, Green and Blue color space
pOutput | Pointer to the structure to get the converted RGB color |
pInput | Pointer to a HSL color in the range for 0.0f to 1.0f per element |
|
externnoexcept |
Convert a BCD value into a decimal integer.
Given an input value of 0x1234, assume it is Binary Coded Decimal (BCD) format and convert it to become the decimal integer 1234.
BCD's encoding rules dictate that only the number 0-9 are valid. Any use of the hex digits A-F are considered illegal.
uInput | 32-bit hex value in BCD. |
|
externnoexcept |
Convert a linear pan to 0.0f to 1.0f.
Convert the pan from 0-65535 into 0.0f to 1.0f.
uInput | Pan from 0 to 65535. Numbers higher than 65535 will be clamped. |
|
externnoexcept |
Convert a linear volume to 0.0f to 1.0f.
Clamp the volume to 0-255 and then convert the value into floating point.
uInput | Volume from 0 to 255. Numbers higher than 255 will be clamped. |
|
externnoexcept |
Convert a decimal integer into BCD format.
Given a decimal in the range of 0-99999999, convert it into that value into Binary Coded Decimal (BCD) format. Such that 1234 become 0x1234 and 50331 become 0x00050331. If the input value is greater than 99999999 it is clamped to 99999999.
uInput | Integer value in the range of 0 to 99999999. |
|
externnoexcept |
Convert a linear pan to decibels.
DirectSound requires pan inputs to be set in decibels from -10000 being full left, 0 being center and 10000 being full right.
Input values lower than -1.0f will return -10000 (Full left) and higher than 1.0f will return 10000 (Full right)
fInput | Pan from -1.0f to 1.0f as a pan value |
|
externnoexcept |
Convert a linear pan to decibels.
DirectSound requires pan inputs to be set in decibels from -10000 being full left, 0 being center and 10000 being full right.
Input values lower than 2 will return -10000 (Full left) and higher than 0xFFFEU will return 10000 (Full right)
uInput | Pan from 0x0000 to 0xFFFFU as a pan value |
|
externnoexcept |
Convert a linear volume to decibels.
DirectSound requires volume inputs to be set in decibels from 0 being full volume to -10000 being silent.
Input values lower than 0.0f will return -10000 (Silence) and higher than 1.0f will return 0 (Max volume)
fInput | Volume from 0.0f to 1.0f as a percentage of volume |
|
externnoexcept |
Convert a linear volume to decibels.
DirectSound requires volume inputs to be set in decibels from 0 being full volume to -10000 being silent.
Input values higher than 255 will return 0 (Max volume)
uInput | Volume from 0 to 255 as a percentage of volume in 256 steps |
|
externnoexcept |
Convert a 16 bit float into a 32 bit float.
The conversion will retain sign, Nan, Inf and perform rounding to nearest even.
Negative zero returns negative zero.
uInput | 16 bit float to convert |
|
externnoexcept |
Convert a 32 bit float into a 16 bit float.
The conversion will retain sign, Nan, Inf and perform rounding to nearest even.
Small numbers are converted to zero, large numbers to infinity.
Negative zero returns negative zero.
fInput | 32 bit float to convert |
|
externnoexcept |
Copy file manager metadata from one file to another.
Given the FSRefs for a source and destination file, read in the file manager metadata, such as the file creator type, file type, and finder location information. If bCopyLockBit
is non-zero, the lock bit will also be copied.
pDestRef | Pointer to the destination file's FSRef |
pSourceRef | Pointer to the source file's FSRef |
bCopyLockBit | Boolean to enable the copying of the lock status |
|
externnoexcept |
Copy file manager metadata from one file to another.
Given the FSSpecs for a source and destination file, read in the file manager metadata, such as the file creator type, file type, and finder location information. If bCopyLockBit
is non-zero, the lock bit will also be copied.
pDestSpec | Pointer to the destination file's FSSpec |
pSourceSpec | Pointer to the source file's FSSpec |
bCopyLockBit | Boolean to enable the copying of the lock status |
|
externnoexcept |
Copy file manager metadata from one file to another.
Given the volume, directory ID and filename for a source and destination file, read in the file manager metadata, such as the file creator type, file type, and finder location information. If bCopyLockBit
is non-zero, the lock bit will also be copied.
svRefNumDest | Volume reference number of the destination file |
lDirIDDest | Parent ID of the destination file |
pFilenameDest | Pointer to a Pascal string for the destination file |
svRefNumSource | Volume reference number of the source file |
lDirIDSource | Parent ID of the source file |
pFilenameSource | Pointer to a Pascal string for the source file |
bCopyLockBit | Boolean to enable the copying of the lock status |
|
externnoexcept |
Copy a fork of a file using FSRef APIs.
Given an opened source and destination file fork, and a buffer, perform a complete copy of the data from the source file fork to the destination file fork, replacing the destination file fork with a copy of the source fork. Buffer is assumed to a size that's a minimum of 512 bytes or in a chunk size of 512 bytes. Forks must be opened using the FSRef class of functions using an FSRef, not an FSSpec or volume / directory / name. If the fork was opened with an older API, use CopyForkClassic(short, short, uint8_t*, uintptr_t) instead.
iDestRefNum | Opened file reference for the destination file |
iSourceRefNum | Opened file reference for the source file |
pBuffer | Pointer to the buffer to use for data transfer |
uBufferSize | Size in bytes of the data transfer buffer |
|
externnoexcept |
Copy a fork of a file using FSSpec APIs.
Given an opened source and destination file fork, and a buffer, perform a complete copy of the data from the source file fork to the destination file fork, replacing the destination file fork with a copy of the source fork. Buffer is assumed to a size that's a minimum of 512 bytes or in a chunk size of 512 bytes. Forks must be opened using the PBH class of functions using either an FSSpec or volume / directory / name, not an FSRef. If the fork was opened with an FSRef, use CopyForkCarbon(short, short, uint8_t*, uintptr_t) instead.
iDestRefNum | Opened file reference for the destination file |
iSourceRefNum | Opened file reference for the source file |
pBuffer | Pointer to the buffer to use for data transfer |
uBufferSize | Size in bytes of the data transfer buffer |
|
inline |
Copy an array of RGBAWord8_t entries from an array of RGBAWord8_t entries.
Given a pointer to an array of RGBAWord8_t color entries, copy the colors into another array of RGBAWord8_t entries
pOutput | Pointer to the palette to copy to |
pInput | Pointer to the palette to copy from |
uEntries | Number of color entries in the palette |
|
extern |
Copy an array of RGBAWord8_t entries from an array of RGBWord8_t entries.
Given a pointer to an array of RGBWord8_t color entries, copy the colors into another array of RGBAWord8_t entries and set the alpha value to zero.
pOutput | Pointer to the palette to copy to |
pInput | Pointer to the palette to copy from |
uEntries | Number of color entries in the palette |
|
extern |
Copy an array of RGBWord8_t entries from an array of RGBAWord8_t entries.
Given a pointer to an array of RGBAWord8_t color entries, copy the colors into another array of RGBWord8_t entries while losing the alpha value
pOutput | Pointer to the palette to copy to |
pInput | Pointer to the palette to copy from |
uEntries | Number of color entries in the palette |
|
inline |
Copy an array of RGBWord8_t entries.
Given a pointer to an array of RGBWord8_t color entries, copy the colors into another array of RGBWord8_t entries
pOutput | Pointer to the palette to copy to |
pInput | Pointer to the palette to copy from |
uEntries | Number of color entries in the palette |
|
extern |
Set a range of RGBA color entries to a 256 entry palette.
Given a pointer to a 256 color palette, copy the color entries passed in the input array and store them in the output array. Since the output array is assumed to be 256 entries, the starting index must be less than 256 and the number of entries copied will be clamped to prevent a buffer overrun.
Any entries that would result in a buffer overrun will be ignored and if the starting index is greater than 255, this function will do nothing.
pOutput | Pointer to the 256 color palette to store the new colors |
pInput | Pointer to the color entries to copy from |
uStartIndex | Color index of the 256 color output palette to start modification (Maximum 255) |
uPaletteSize | Number of color entries to copy (Maximum 256) |
|
extern |
Set a range of RGBA color entries to a 256 entry palette.
Given a pointer to a 256 color palette, copy the color entries passed in the input array and store them in the output array. Since the output array is assumed to be 256 entries, the starting index must be less than 256 and the number of entries copied will be clamped to prevent a buffer overrun.
Any entries that would result in a buffer overrun will be ignored and if the starting index is greater than 255, this function will do nothing.
pOutput | Pointer to the 256 color palette to store the new colors |
pInput | Pointer to the color entries to copy from |
uStartIndex | Color index of the 256 color output palette to start modification (Maximum 255) |
uPaletteSize | Number of color entries to copy (Maximum 256) |
|
extern |
Set a range of RGB color entries to a 256 entry palette.
Given a pointer to a 256 color palette, copy the color entries passed in the input array and store them in the output array. Since the output array is assumed to be 256 entries, the starting index must be less than 256 and the number of entries copied will be clamped to prevent a buffer overrun.
Any entries that would result in a buffer overrun will be ignored and if the starting index is greater than 255, this function will do nothing.
pOutput | Pointer to the 256 color palette to store the new colors |
pInput | Pointer to the color entries to copy from |
uStartIndex | Color index of the 256 color output palette to start modification (Maximum 255) |
uPaletteSize | Number of color entries to copy (Maximum 256) |
|
extern |
Set a range of RGB color entries to a 256 entry palette.
Given a pointer to a 256 color palette, copy the color entries passed in the input array and store them in the output array. Since the output array is assumed to be 256 entries, the starting index must be less than 256 and the number of entries copied will be clamped to prevent a buffer overrun.
Any entries that would result in a buffer overrun will be ignored and if the starting index is greater than 255, this function will do nothing.
pOutput | Pointer to the 256 color palette to store the new colors |
pInput | Pointer to the color entries to copy from |
uStartIndex | Color index of the 256 color output palette to start modification (Maximum 255) |
uPaletteSize | Number of color entries to copy (Maximum 256) |
|
extern |
Copy an array of RGBAWord8_t entries from an array of 16 bit XRGB entries.
Given a pointer to an array of 16 bit XRGB color entries, copy the colors into another array of RGBAWord8_t entries. Set Alpha to 255
Each color is 4 bits, however it's expanded to 8 bits in the output palette
Red = (Color>>8)&0xF Green = (Color>>4)&0xF Blue = Color&0xF
pOutput | Pointer to the palette to copy to |
pInput | Pointer to the palette to copy from |
uEntries | Number of color entries in the palette |
|
extern |
Copy an array of RGBWord8_t entries from an array of 16 bit XRGB entries.
Given a pointer to an array of 16 bit XRGB color entries, copy the colors into another array of RGBWord8_t entries.
Each color is 4 bits, however it's expanded to 8 bits in the output palette
Red = (Color>>8)&0xF Green = (Color>>4)&0xF Blue = Color&0xF
pOutput | Pointer to the palette to copy to |
pInput | Pointer to the palette to copy from |
uEntries | Number of color entries in the palette |
|
extern |
Copy an array of RGBAWord8_t entries from an array of 16 bit ARGB entries.
Given a pointer to an array of 16 bit ARGB color entries, copy the colors into another array of RGBAWord8_t entries.
Each color is 4 bits, however it's expanded to 8 bits in the output palette
Alpha = (Color>>12)&0xF Red = (Color>>8)&0xF Green = (Color>>4)&0xF Blue = Color&0xF
pOutput | Pointer to the palette to copy to |
pInput | Pointer to the palette to copy from |
uEntries | Number of color entries in the palette |
|
extern |
Copy an array of RGBWord8_t entries from an array of 16 bit ARGB entries.
Given a pointer to an array of 16 bit ARGB color entries, copy the colors into another array of RGBWord8_t entries and discard the alpha
Each color is 4 bits, however it's expanded to 8 bits in the output palette
Alpha = (Color>>12)&0xF Red = (Color>>8)&0xF Green = (Color>>4)&0xF Blue = Color&0xF
pOutput | Pointer to the palette to copy to |
pInput | Pointer to the palette to copy from |
uEntries | Number of color entries in the palette |
|
extern |
Upload sound data.
This function will take signed 8 bit, unsigned 8 bit, big and little endian signed 16 bit sound data and copy it into either an 8 or 16 bit sound buffer using native endian. This is a helper function for the sound manager.
If the data type is not one of the four types, it will perform a simple memory copy
pOutput | Pointer to the buffer to receive the converted data |
pInput | Pointer to the sound data |
uLength | Length of the sound data in bytes |
eType | Type of the input sound data |
|
extern |
Merge a left and right audio channel into a single buffer.
Given two input buffers of equal size, interleave the buffers with the left channel written first and then the right second into a buffer that's twice as large as uOutputSize to contain the merged data.
pOutput | Pointer to receive the interleaved data (Must be uOutputSize*4 bytes in size) |
pLeft | Pointer to the left channel data |
pRight | Pointer to the right channel data |
uOutputSize | Size in entries (uint16_t) of the left or right channel (Both must be the same size) |
|
extern |
Merge a left and right audio channel into a single buffer.
Given two input buffers of equal size, interleave the buffers with the left channel written first and then the right second into a buffer that's twice as large as uOutputSize to contain the merged data.
pOutput | Pointer to receive the interleaved data (Must be uOutputSize*2 bytes in size) |
pLeft | Pointer to the left channel data |
pRight | Pointer to the right channel data |
uOutputSize | Size in bytes of the left or right channel (Both must be the same size) |
|
externnoexcept |
Read a stream of text chars until a nullptr, LF, CR or CR/LF is found.
Copy from the input stream of text characters until either a zero, a LF (Unix), CR/LF (Windows), or CR (Mac) is found. The output buffer will be zero terminated and will truncate excess data.
The value returned is the number of bytes that was processed. This number is how many bytes from the original input was used.
pOutput | Pointer to the output buffer (Can be nullptr if uOutputSize is zero). |
uOutputSize | Size in bytes of the output buffer. |
pInput | Pointer to the input buffer. |
uInputSize | Size in bytes of the maximum number of bytes to process. |
|
externnoexcept |
Return the cosine from radians.
Use the fcos instruction to generate sine. Will loop in cases where overflow is detected.
dInput | Value in Radians |
|
externnoexcept |
Return the cosine from radians.
Use the fcos instruction to generate sine. Will loop in cases where overflow is detected.
fInput | Value in Radians |
|
externnoexcept |
Calculate the number of set bits.
Given a 32 bit integer, count the number of bits set and return the value from zero to thirty two.
uInput | Integer to count the bits from |
|
externnoexcept |
Calculate the number of set bits.
Given a 64 bit integer, count the number of bits set and return the value from zero to sixty four.
uInput | Integer to count the bits from |
|
externnoexcept |
Fill in a CPUID_t structure.
On x86 and x64 CPUs, this function will call CPUID several times to extract the most commonly requested data from the CPU and fills in the CPUID_t structure. On non x86/x64 platforms, this function does not exist.
pOutput | Pointer to a CPUID_t to initialize |
|
externnoexcept |
Call FSpCreate() to create a file.
Call FSpCreate() to create an empty file with no data or type.
pFSSpec | Pointer to an FSSpec of the new file |
|
externnoexcept |
Call PBCreateFileUnicodeSync() to create a file.
Call PBCreateFileUnicodeSync() to create an empty file with no data or type.
This function always returns paramErr
if running on MacOS 7 or 8.
pOutput | Pointer to store the new FSRef, can be nullptr |
pFSRef | Pointer to an FSRef of the new file's parent directory |
pName | Pointer to UTF8 encoded "C" string of the new file name |
|
externnoexcept |
Call PBHCreateSync() to create a file.
Call PBHCreateSync() to create an empty file with no data or type.
svRefNum | Volume reference number of the new file |
lDirID | Parent ID of the new file |
pFilename | Pointer to a Pascal string for the new filename |
|
externnoexcept |
Convert a "C" string into a Pascal string.
Copy a "C" string and convert it into a Pascal style string. A byte will denote the length, followed by the text itself. There will be no terminating zero in the new string.
The destination and the source pointer can contain the same value. This function allows in buffer data conversion.
|
externnoexcept |
Debug snprintf()
Parse the parameters and do a printf() dump of the contents, used exclusively for debugging.
pOutput | Pointer to a output buffer |
uOutputSize | Number of bytes in the output buffer |
pFormat | Pointer to a "C" format string |
uArgCount | Number of arguments in the argument array |
ppArgs | Argument array, can be NULL if uArgCount is zero |
|
externnoexcept |
Convert a DirectSound decibel value to an XAudio2 Amplitude multiplier.
Convert the decibels from -10000 to 0 to 0 to 1.0f
fDecibels | DirectSound decibels from -10000 to 0. |
|
extern |
Decompress an array of 4x4 block compressed with DXT1.
Given an array of 8 byte blocks of DXT1 compressed data, extract the 4x4 RGBA color blocks into a bit map.
pOutput | Pointer to the start of a bitmap in the size of uWidth and uHeight RGBAWord8_t encoded 32 bit pixels. |
uOutputStride | Number of bytes per scan line of the output bit map (Usually it's uWidth*4) |
uWidth | Width of the output bitmap in pixels |
uHeight | Height of the output bitmap in pixels |
pInput | Pointer to a matching bitmap of DXT1 compressed pixels |
uInputStride | Byte width of each scan line for the block of compressed data. (Usually it's uWidth*4) |
|
extern |
Decompress an array of 4x4 block compressed with DXT3.
Given an array of 16 byte blocks of DXT3 compressed data, extract the 4x4 RGBA color blocks into a bit map.
pOutput | Pointer to the start of a bitmap in the size of uWidth and uHeight RGBAWord8_t encoded 32 bit pixels. |
uOutputStride | Number of bytes per scan line of the output bit map (Usually it's uWidth*4) |
uWidth | Width of the output bitmap in pixels |
uHeight | Height of the output bitmap in pixels |
pInput | Pointer to a matching bitmap of DXT3 compressed pixels |
uInputStride | Byte width of each scan line for the block of compressed data. (Usually it's uWidth*4) |
|
extern |
Decompress an array of 4x4 block compressed with DXT5.
Given an array of 16 byte blocks of DXT5 compressed data, extract the 4x4 RGBA color blocks into a bit map.
pOutput | Pointer to the start of a bitmap in the size of uWidth and uHeight RGBAWord8_t encoded 32 bit pixels. |
uOutputStride | Number of bytes per scan line of the output bit map (Usually it's uWidth*4) |
uWidth | Width of the output bitmap in pixels |
uHeight | Height of the output bitmap in pixels |
pInput | Pointer to a matching bitmap of DXT5 compressed pixels |
uInputStride | Byte width of each scan line for the block of compressed data. (Usually it's uWidth*4) |
|
externnoexcept |
Delete a base class.
If the pointer passed is not nullptr, call the destructor and then dispose of the pointer with a call to Free(const void *)
pInput | Pointer to a base class |
|
noexcept |
Dispose of a generic class instance.
When Burger::New<T> is called, release the memory with this call
pInput | nullptr or a valid pointer to a generic class to dispose of. |
|
externnoexcept |
Copy a comment from one file to another.
Given the source FSRef and the destination FSRef, read in the Desktop Manager comment associated with the source file and write a copy of the comment found onto the destination file.
While this code can read comments from both the Desktop Manager and the Desktop
resource file, it is limited to only writing to systems with a Desktop Manager. If the destination file resides on a different volume as the source and the destination uses a "Desktop" resource file, this call will always fail. However, if the source and destination reside on the same volume that uses a Desktop
file, this call is moot because the resource string already exists in the destination file's resource fork if the destination file is a copy of the source file.
pFSRefDest | Pointer to the FSSpec of the destination file |
pFSRefSource | Pointer to the FSSpec of the source file |
|
externnoexcept |
Copy a comment from one file to another.
Given the source FSSpec and the destination FSSpec, read in the Desktop Manager comment associated with the source file and write a copy of the comment found onto the destination file.
While this code can read comments from both the Desktop Manager and the Desktop
resource file, it is limited to only writing to systems with a Desktop Manager. If the destination file resides on a different volume as the source and the destination uses a "Desktop" resource file, this call will always fail. However, if the source and destination reside on the same volume that uses a Desktop
file, this call is moot because the resource string already exists in the destination file's resource fork if the destination file is a copy of the source file.
pFSSpecDest | Pointer to the FSSpec of the destination file |
pFSSpecSource | Pointer to the FSSpec of the source file |
|
externnoexcept |
Copy a comment from one file to another.
Given the volume, directory ID and filename for a source and destination file, read in the Desktop Manager comment associated with the source file and write a copy of the comment found onto the destination file.
While this code can read comments from both the Desktop Manager and the Desktop
resource file, it is limited to only writing to systems with a Desktop Manager. If the destination file resides on a different volume as the source and the destination uses a "Desktop" resource file, this call will always fail. However, if the source and destination reside on the same volume that uses a Desktop
file, this call is moot because the resource string already exists in the destination file's resource fork if the destination file is a copy of the source file.
svRefNumDest | Volume reference number of the destination file |
lDirIDDest | Parent ID of the destination file |
pFilenameDest | Pointer to a Pascal string for the destination file |
svRefNumSource | Volume reference number of the source file |
lDirIDSource | Parent ID of the source file |
pFilenameSource | Pointer to a Pascal string for the source file |
|
externnoexcept |
Get a comment from the Desktop Manager.
Given a file's volume, directory and filename, check the desktop manager if the database is active and query it for any associated comment. If the desktop database is not supported, check for the "Desktop" file found on many network shares and query it for the comment.
If there are no errors and there was a comment, the pOutput
buffer will have a "C" string of the comment. It will be set to an empty string on error or if there was no comment found.
pOutput | Pointer to a 256 byte buffer to receive the comment "C" string |
svRefNum | Volume reference number of the file to check |
lDirID | Parent ID of the file to check |
pFilename | Pointer to a Pascal string for the filename to check |
|
externnoexcept |
Open the desktop manager database.
Given a volume reference number, open the finder database and return a reference to the open file.
pVolumeName | Pointer to a Pascal string of the volume name |
svRefNum | Volume reference number of the file to check |
pRefNum | Pointer to variable to receive the open file reference |
pbDatabaseCreated | Pointer to receive boolean if the database was created, can be nullptr |
|
externnoexcept |
Get a comment from the Desktop Manager.
Given a file's volume, directory and filename, check the desktop manager if the database is active and set the comment to the given file. If the desktop database is not supported, no transfer is performed.
Comments are limited to a maximum of 200 characters. If the comment string is longer than 200 characters, it will be truncated.
svRefNum | Volume reference number of the file to set the comment |
lDirID | Parent ID of the file |
pFilename | Pointer to a Pascal string for the filename of the file |
pComment | Pointer to a "C" string to set as a comment. |
|
externnoexcept |
Find the real volume reference number.
Given a volume reference number, get its information and determine if it is an alias or a real number. This function will call PBHGetVInfoSync and may return a different number that was passed in. This number is the true device number.
pOutput | Pointer to receive the returned volume reference number |
svRefNum | Volume reference number |
|
externnoexcept |
Hash data using the djb2 (Daniel Julius Bernstein) algorithm.
This algorithm (k=33) was first reported by Dan Bernstein many years ago in comp.lang.c. This uses hash(i) = hash(i - 1) * 33 + str[i];
The magic of number 33 (why it works better than many other constants, prime or not) has never been adequately explained.
Further reading: http://www.cs.yorku.ca/~oz/hash.html#djb2
pInput | Pointer to the data to hash |
uInputCount | Number of bytes of data to hash |
uHashSeed | Value to seed the hash with. |
|
externnoexcept |
Hash string data using forced lower case using the djb2 (Daniel Julius Bernstein) algorithm.
This algorithm (k=33) was first reported by Dan Bernstein many years ago in comp.lang.c. This uses hash(i) = hash(i - 1) * 33 + ToLower(str[i]);
The magic of number 33 (why it works better than many other constants, prime or not) has never been adequately explained.
Further reading: http://www.cs.yorku.ca/~oz/hash.html#djb2
pInput | Pointer to the data to hash |
uInputCount | Number of bytes of data to hash |
uHashSeed | Value to seed the hash with. |
|
externnoexcept |
Hash data using the djb2 (Daniel Julius Bernstein) algorithm.
This algorithm (k=33) was first reported by Dan Bernstein many years ago in comp.lang.c. This uses hash(i) = hash(i - 1) * 33 ^ str[i];
The magic of number 33 (why it works better than many other constants, prime or not) has never been adequately explained.
Further reading: http://www.cs.yorku.ca/~oz/hash.html#djb2
pInput | Pointer to the data to hash |
uInputCount | Number of bytes of data to hash |
uHashSeed | Value to seed the hash with. |
|
externnoexcept |
Hash string data using forced lower case using the djb2 (Daniel Julius Bernstein) algorithm.
This algorithm (k=33) was first reported by Dan Bernstein many years ago in comp.lang.c. This uses hash(i) = hash(i - 1) * 33 ^ ToLower(str[i]);
The magic of number 33 (why it works better than many other constants, prime or not) has never been adequately explained.
Further reading: http://www.cs.yorku.ca/~oz/hash.html#djb2
pInput | Pointer to the data to hash |
uInputCount | Number of bytes of data to hash |
uHashSeed | Value to seed the hash with. |
|
externnoexcept |
Case insensitive DJB2 Additive hash callback for HashMapShared.
Invoke the DJB2 Additive hashing algorithm on the contents of a class using the default seed value and convert all upper case characters into lower case.
pData | Pointer to a data chunk to hash |
uDataSize | Size of the data chunk in bytes |
|
externnoexcept |
DJB2 Additive hash callback for HashMapShared.
Invoke the DJB2 Additive hashing algorithm on the contents of a class using the default seed value.
pData | Pointer to a data chunk to hash |
uDataSize | Size of the data chunk in bytes |
|
externnoexcept |
DJB2 Exclusive Or hash callback for HashMapShared.
Invoke the DJB2 Exclusive Or hashing algorithm on the contents of a class using the default seed value.
pData | Pointer to a data chunk to hash |
uDataSize | Size of the data chunk in bytes |
|
externnoexcept |
DJB2 Exclusive Or hash callback for HashMapShared.
Invoke the DJB2 Exclusive Or hashing algorithm on the contents of a class using the default seed value.
pData | Pointer to a data chunk to hash |
uDataSize | Size of the data chunk in bytes |
|
externnoexcept |
Case insensitive DJB2 Exclusive Or hash callback for HashMapStringCase.
Invoke the case insensitive DJB2 Exclusive Or hashing algorithm on the contents of a String class using the default seed value.
pData | Pointer to a String to hash with case insensitivity |
uDataSize | Size of the data chunk in bytes (Not used) |
|
externnoexcept |
DJB2 Exclusive Or hash callback for HashMapString.
Invoke the DJB2 Exclusive Or hashing algorithm on the contents of a String class using the default seed value.
pData | Pointer to a String to hash |
uDataSize | Size of the data chunk in bytes (Not used) |
|
externnoexcept |
Copy a file using PBHCopyFileSync()
Use the Mac OS call PBHCopyFileSync() to copy a file from one place to another on the same volume. This call will fail if either the source and destination volumes are different or if the volume doesn't support file copying. Use has_copy_file(const GetVolParmsInfoBuffer*) to test if a volume supports this call before invoking it.
Network drives almost always implement this API
pFSDest | FSSpec for where the file will be copied to |
pFSSource | FSSpec of the file being copied |
|
externnoexcept |
Copy a file using PBHCopyFileSync()
Use the Mac OS call PBHCopyFileSync() to copy a file from one place to another on the same volume. This call will fail if either the source and destination volumes are different or if the volume doesn't support file copying. Use has_copy_file(const GetVolParmsInfoBuffer*) to test if a volume supports this call before invoking it.
Network drives almost always implement this API
svRefNumDest | Volume reference number of the destination file |
lDirIDDest | Parent ID of the destination file |
pFilenameDest | Pointer to a Pascal string for the destination file |
svRefNumSource | Volume reference number of the source file |
lDirIDSource | Parent ID of the source file |
pFilenameSource | Pointer to a Pascal string for the source file |
|
externnoexcept |
Call PBGetCatInfoSync() quickly.
Given information about a file/folder, quickly obtain information about this file object and return the record. An internal buffer for the filename is removed from ioNamePtr before this function exits to prevent dangling pointers.
pOutput | Pointer to empty CInfoPBRec to be filled in. |
pFSSpec | Pointer to FSSpec for the file to be queried. |
|
externnoexcept |
Call PBGetCatInfoSync() quickly.
Given information about a file/folder, quickly obtain information about this file object and return the record. An internal buffer for the filename is removed from ioNamePtr before this function exits to prevent dangling pointers.
pOutput | Pointer to empty CInfoPBRec to be filled in. |
sVRefNum | Volume reference number |
lDirID | Current directory ID |
pName | Pascal name of the file of interest, can be nullptr. |
|
externnoexcept |
Call PBGetCatInfoSync() quickly.
Given information about a file/folder, quickly obtain information about this file object and return the record and the filename.
pOutput | Pointer to empty CInfoPBRec to be filled in. |
pOutputName | Pointer to a 256 byte Pascal buffer for the filename. |
pFSSpec | Pointer to the FSSpec of the file to be queried. |
|
externnoexcept |
Call PBGetCatInfoSync() quickly.
Given information about a file/folder, quickly obtain information about this file object and return the record and the filename.
pOutput | Pointer to empty CInfoPBRec to be filled in. |
pOutputName | Pointer to a 256 byte Pascal buffer for the filename. |
sVRefNum | Volume reference number |
lDirID | Current directory ID |
pName | Pascal string of the file of interest, can be nullptr. |
|
externnoexcept |
Call PBGetCatalogInfoSync() quickly.
Given information about a file/folder, quickly obtain information about this file object and return the record and the filename.
This function will return paramErr
if PBGetCatalogInfoSync() is not supported on the version of MacOS
A FSRefParam record is used internally during the scope of this function and will be discarded on exit.
pOutput | Pointer to empty FSCatalogInfo to be filled in. |
pFSRef | Pointer to the FSRef of the file to be queried. |
uCatInfoBitmap | 32 bit catalog information bitmap |
|
externnoexcept |
Call PBGetCatalogInfoSync() quickly.
Given information about a file/folder, quickly obtain information about this file object and return the record and the filename.
This function will return paramErr
if PBGetCatalogInfoSync() is not supported on the version of MacOS
pOutput | Pointer to empty FSCatalogInfo to be filled in. |
pRefParam | Pointer to an unitialized FSRefParam buffer. |
pFSRef | Pointer to the FSRef of the file to be queried. |
uCatInfoBitmap | 32 bit catalog information bitmap |
|
externnoexcept |
Call PBXGetVolInfoSync() on all targets.
On 68K CFM and PPC non-carbon targets, the symbol PBXGetVolInfoSync() was not properly exposed in InterfaceLib until MacOS 8.5. So, for those poor unforunate souls running on MacOS 7.1 - 8.1 have to use a peice of glue code that jumps to 68000 via the trap manager.
For Carbon PPC and 68K classic apps, this function directly calls PBXGetVolInfoSync()
pXVolumeParam | Pointer to a XVolumeParam record |
|
extern |
Test two edges for intersection.
Test two edge line segments and determine if they are on top of each other, crossing or not crossing.
pEdge1VSEdge2 | Return negative if Edge1 crossing Edge2, 0 if touching, positive if not crossing |
pEdge2VSEdge1 | Return negative if Edge2 crossing Edge1, 0 if touching, positive if not crossing |
pEdge1V1 | Pointer to the first vertex of Edge1 |
pEdge1V2 | Pointer to the second vertex of Edge1 |
pEdge2V1 | Pointer to the first vertex of Edge2 |
pEdge2V2 | Pointer to the second vertex of Edge2 |
|
externnoexcept |
Force the last character of a string to be '/'.
Linux uses forward slashes as directory separators. This function will take Windows style slashes and convert them into Linux slashes. It will also append a '/' character to the end of the string if a slash wasn't already there.
pInput | Pointer to the "C" string to perform the fix up on. nullptr will page fault. |
|
externnoexcept |
Copy a string and force the last character of a string to be '/'.
Linux uses forward slashes as directory separators. This function will take Windows style slashes and convert them into Linux slashes. It will also append a '/' character to the end of the string if a slash wasn't already there.
pOutput | Pointer to a buffer large enough to hold the converted "C" string. |
pInput | Pointer to the "C" string to perform the fix up on. nullptr will page fault. |
|
externnoexcept |
Force the last character of a string to be '\'.
Windows uses backslashes as directory separators. This function will take Linux style slashes and convert them into Windows slashes. It will also append a '\' character to the end of the string if a slash wasn't already there.
pInput | Pointer to the "C" string to perform the fix up on. nullptr will page fault. |
|
externnoexcept |
Copy a string and force the last character of a string to be '\'.
Windows uses backslashes as directory separators. This function will take Linux style slashes and convert them into Windows slashes. It will also append a '\' character to the end of the string if a slash wasn't already there.
pOutput | Pointer to a buffer large enough to hold the converted "C" string. |
pInput | Pointer to the "C" string to perform the fix up on. nullptr will page fault. |
|
externnoexcept |
Return TRUE if the values are less than epsilon apart.
Test if two numbers are less than or equal apart than the epsilon of 1e-6.
dInput1 | A 64 bit floating point number to test |
dInput2 | Another 64 bit floating point number to test |
|
externnoexcept |
Return TRUE if the values are less than epsilon apart.
Test if two numbers are less than or equal apart than the epsilon of 1e-6.
dInput1 | A 64 bit floating point number to test |
dInput2 | Another 64 bit floating point number to test |
dEpsilon | Epsilon to test with |
|
externnoexcept |
Return TRUE if the values are less than epsilon apart.
Test if two numbers are less than or equal apart than the epsilon of 1e-6f.
fInput1 | A 32 bit floating point number to test |
fInput2 | Another 32 bit floating point number to test |
|
externnoexcept |
Return TRUE if the values are less than epsilon apart.
Test if two numbers are less than or equal apart than the epsilon of 1e-6f.
fInput1 | A 32 bit floating point number to test |
fInput2 | Another 32 bit floating point number to test |
fEpsilon | Epsilon to test with |
|
externnoexcept |
Convert error code to a meaningful message.
Sometimes it's better to get an string explaining the error code. It's implemented in a way that it will never allocate memory, therefore it can safely be called from an error handler.
It the output buffer size is set to zero, it will not attempt to return any string data, just the length of the output in case the caller needs to know the size of the data in advance to allocate a buffer. In a majority of cases, a 256 byte hard coded buffer will suffice.
pOutput | Pointer to the buffer to receive the "C" string |
uOutputSize | Length of the output buffer. |
uError | Error code to convert to message. |
|
externnoexcept |
Convert a Burgerlib error code into a string.
Look up a Burgerlib error code into an array of error messages and return a pointer to a "C" string with a message in English giving a meaningful message.
uError | Error code to convert to message. |
|
externnoexcept |
Copy a file, with AppleShare awareness.
If the file system supports it, copy with PBHCopyFile(), otherwise, manually copy a file from one volume to another and also copy the finder metadata and comments.
pFSSpecSource | FSSpec of the source file |
pFSSpecDestFolder | FSSpec of the destination folder |
pCopyname | Pointer to a PASCAL string of the new name for the destination file |
pBuffer | Pointer to a buffer to use for data transfer |
uBufferSize | Size in bytes of the data transfer buffer |
bPreflight | Set to TRUE if the destination volume should be checked for free space |
|
externnoexcept |
Copy a file, with AppleShare awareness.
If the file system supports it, copy with PBHCopyFile(), otherwise, manually copy a file from one volume to another and also copy the finder metadata and comments.
svRefNumSource | Volume of the source file |
lDirIDSource | Directory ID the source file |
pFilenameSource | Pointer to a PASCAL string of the source file |
svRefNumDest | Volume of the destination folder |
lDirIDDest | Directory ID the destination folder |
pFilenameDest | Pointer to a PASCAL string of the destination folder |
pCopyname | Pointer to a PASCAL string of the new name for the destination file |
pBuffer | Pointer to a buffer to use for data transfer |
uBufferSize | Size in bytes of the data transfer buffer |
bPreflight | Set to TRUE if the destination volume should be checked for free space |
|
extern |
Fill an RGBA palette with a specific color.
Set all values to a specific color
pOutput | Pointer to the palette to fill |
pInput | Pointer to the color to fill with |
uPaletteSize | Number of color entries to set |
|
extern |
Fill an RGB palette with a specific color.
Set all values to a specific color
pOutput | Pointer to the palette to fill |
pInput | Pointer to the color to fill with |
uPaletteSize | Number of color entries to set |
|
extern |
Scan an AIFF file for a specific chunk.
Scan an AIFF file in memory and return pointer to a chunk or NULL if the chunk was not found
pInput | Pointer to the AIFF file in memory |
uLength | Length of the AIFF file in memory |
uChunkName | 4 byte code of the chunk to find in ASCII format 'CODE' = 0x434F4445U big endian or 0x45444F43U on little endian machines |
|
extern |
Scan a RIFF file for a specific chunk.
Scan a RIFF file in memory and return pointer to a chunk or NULL if the chunk was not found
pInput | Pointer to the WAV/RIFF file in memory |
uLength | Length of the WAV/RIFF file in memory |
uChunkName | 4 byte code of the chunk to find in ASCII format 'CODE' = 0x434F4445U native endian |
|
inlinenoexcept |
32 bit 16.16 fixed point integer to floating point conversion
pInput | Pointer to a 32 bit 16.16 fixed point integer to convert |
|
inlineconstexprnoexcept |
32 bit 16.16 fixed point integer to floating point conversion
iInput | 32 bit 16.16 fixed point integer to convert |
|
inlinenoexcept |
32 bit 16.16 fixed point integer to floating point conversion
pInput | Pointer to a 32 bit 16.16 fixed point integer to convert |
pOutput | Pointer to a 32 bit float to receive the converted integer |
|
inlinenoexcept |
32 bit 16.16 fixed point integer to floating point conversion
iInput | 32 bit 16.16 fixed point integer to convert |
pOutput | Pointer to a 32 bit float to receive the converted integer |
|
inlinenoexcept |
Convert a fixed point value to an integer using round to zero.
Convert a Fixed32 into an integer using round to zero.
fInput | Value to convert to an integer. |
|
inlinenoexcept |
Convert a fixed point value to an integer using round up.
Convert a Fixed32 into an integer using the same formula as ceil().
fInput | Value to convert to an integer. |
|
inlinenoexcept |
Convert a fixed point value to an integer using round down.
Convert a Fixed32 into an integer using the same formula as floor().
fInput | Value to convert to an integer. |
|
inlinenoexcept |
Convert a fixed point value to an integer using round to nearest.
Convert a Fixed32 into an integer using round to nearest.
fInput | Value to convert to an integer. |
|
inline |
Divide two 16.16 fixed point numbers.
Divide a 16.16 fixed point number by another 16.16 fixed point number without saturation or checking for division by zero..
fInputNumerator | Signed value to divide |
fInputDenominator | Signed value to divide with |
|
inline |
Multiply two 16.16 fixed point numbers.
Perform a signed multiplication of two 32-bit fixed point numbers and return the fixed point result. No error checking is performed, so overflow or underflow conditions yield undefined results.
fInput1 | First signed value to multiply |
fInput2 | Second signed value to multiply |
|
inline |
Return the reciprocal of a fixed point number.
Divide a 16.16 fixed point number by BURGER_FLOAT_TO_FIXED(1.0f) in fixed point. If the input value is negative epsilon (0xFFFFFFFF), return 0x8000000. If the input is equal to 0 or positive epsilon (0x1), then return 0x7ffffff. This has the effect of saturating the output and leaving no output as undefined.
\param fInput \ref Fixed32 value to convert to a reciprocal. \return Result of \ref BURGER_FLOAT_TO_FIXED(1.0f) / fInput with saturation \note It's not recommended to input epsilon or 0 due to saturation. \sa FixedDivideSaturate(Fixed32,Fixed32) or FixedDivide(Fixed32,Fixed32)
|
externnoexcept |
Convert a 32 bit float to a Fixed32 using ceil().
Convert a single precision floating point number to a Fixed32 using the ceil() form of fractional truncation and store it to memory
pOutput | A valid pointer to a Fixed32 to receive the result. |
fInput | A valid single precision floating point number. |
|
externnoexcept |
Convert a 32 bit float to a Fixed32 using ceil().
Convert a single precision floating point number to a Fixed32 using the ceil() form of fractional truncation
fInput | A valid single precision floating point number. |
|
externnoexcept |
Convert a 32 bit float to a Fixed32 using floor().
Convert a single precision floating point number to a Fixed32 using the floor() form of fractional truncation and store it to memory
pOutput | A valid pointer to a Fixed32 to receive the result. |
fInput | A valid single precision floating point number. |
|
externnoexcept |
Convert a 32 bit float to a Fixed32 using floor().
Convert a single precision floating point number to a Fixed32 using the floor() form of fractional truncation
fInput | A valid single precision floating point number. |
|
externnoexcept |
Convert a 32 bit float to a Fixed32 using round to nearest.
Convert a single precision floating point number to a Fixed32 using the round to nearest fractional truncation and store it to memory
pOutput | A valid pointer to a Fixed32 to receive the result. |
fInput | A valid single precision floating point number. |
|
externnoexcept |
Convert a 32 bit float to a Fixed32 using round to nearest.
Convert a single precision floating point number to a Fixed32 using the round to nearest fractional truncation
fInput | A valid single precision floating point number. |
|
externnoexcept |
Convert a 32 bit float to a Fixed32 using round to zero.
Convert a single precision floating point number to a Fixed32 using the round to zero fractional truncation and store it to memory
pOutput | A valid pointer to a Fixed32 to receive the result. |
fInput | A valid single precision floating point number. |
|
externnoexcept |
Convert a 32 bit float to a Fixed32 using round to zero.
Convert a single precision floating point number to a Fixed32 using the round to zero fractional truncation
fInput | A valid single precision floating point number. |
|
externnoexcept |
Convert a 32 bit float to an integer using ceil().
Convert a single precision floating point number to an integer using the ceil() form of fractional truncation
fInput | A valid single precision floating point number. |
|
externnoexcept |
Convert a 32 bit float to an integer using ceil().
Convert a single precision floating point number to an integer using the ceil() form of fractional truncation and store it to memory
pOutput | A valid pointer to a 32-bit integer to receive the result. |
fInput | A valid single precision floating point number. |
|
externnoexcept |
Convert a 32 bit float to an integer using floor().
Convert a single precision floating point number to an integer using the floor() form of fractional truncation (Round down)
fInput | A valid single precision floating point number. |
|
externnoexcept |
Convert a 32 bit float to an integer using floor().
Convert a single precision floating point number to an integer using the floor() form of fractional truncation and store it to memory
pOutput | A valid pointer to a 32-bit integer to receive the result. |
fInput | A valid single precision floating point number. |
|
externnoexcept |
Convert a 32 bit float to an integer using round to nearest.
Convert a single precision floating point number to an integer using the round to nearest fractional truncation
fInput | A valid single precision floating point number. |
|
externnoexcept |
Convert a 32 bit float to an integer using round to nearest.
Convert a single precision floating point number to an integer using the round to nearest fractional truncation and store it to memory
pOutput | A valid pointer to a 32-bit integer to receive the result. |
fInput | A valid single precision floating point number. |
|
externnoexcept |
Convert a 32 bit float to an integer using round to zero.
Convert a single precision floating point number to an integer using the round to zero fractional truncation
fInput | A valid single precision floating point number. |
|
externnoexcept |
Convert a 32 bit float to an integer using round to zero.
Convert a single precision floating point number to an integer using the round to zero fractional truncation and store it to memory
pOutput | A valid pointer to a 32-bit integer to receive the result. |
fInput | A valid single precision floating point number. |
|
externnoexcept |
Force a character to be at the end of a string if missing.
Parse to the end of the string. If the last character is a match to uLast, then do nothing. Otherwise, append this single character to the end of the string and write a terminating zero after it. This function is a convenience routine used to ensure that a trailing ':' or '/' mark is at the end of a directory path.
pInput | Pointer to the "C" string to scan. nullptr will page fault. |
uLast | 8 bit character to test the last char with. |
|
externnoexcept |
printf() clone
Return value is the number of characters transmitted, or a negative value indicating an error occurred during the attempt.
fp | Pointer to a FILE stream |
pFormat | Pointer to a "C" format string |
uArgCount | Number of arguments in the argument array |
ppArgs | Argument array, can be NULL if uArgCount is zero |
|
externnoexcept |
Release memory.
Free memory using the Burger::GlobalMemoryManager. nullptr performs no operation.
pInput | Pointer to memory to release. |
|
externnoexcept |
Release memory back to the underlying operating system.
The handle based memory manager obtained the memory it controls from the operating system. This function releases the memory back. Generic systems call free(), other systems call the low level functions directly
On MacOS, this calls DisposePtr(), Windows calls HeapFree(), etc...
pInput | Pointer to memory previously allocated by alloc_platform_memory(uintptr_t) |
|
externnoexcept |
Calculate a CRC16 polynomial table.
Calculates a 16-bit CRC table
The default polynomial format is X^16+X^15+X^2+X^0 or 0x8005, however any value can be entered
Implemented following the documentation found in http://en.wikipedia.org/wiki/Cyclic_redundancy_check
pOutput | Pointer to a buffer to be checksummed |
uPolynomial | Polynomial to use (Default 0x8005) |
bBitReverse | TRUE if the bits are to be reversed (For CRC16-IBM) |
|
externnoexcept |
Calculate a CRC32 polynomial table.
Calculates a 32-bit CRC table
The default polynomial format is X^32+X^26+X^23+X^22+X^16+X^12+X^11+X^10+X^8+X^7+X^5+X^4+X^2+X^1+X^0 or 0x04C11DB7, however any value can be entered
Implemented following the documentation found in http://en.wikipedia.org/wiki/Cyclic_redundancy_check and http://wiki.osdev.org/CRC32
pOutput | Pointer to a buffer to be checksummed |
uPolynomial | Polynomial to use (Default 0x04C11DB7U) |
bBitReverse | TRUE if the bits are to be reversed (For CRC32B) |
|
externnoexcept |
Calculate a GOST polynomial table.
Calculates a 1024 entry shift index table
Implemented following the documentation found in https://en.wikipedia.org/wiki/GOST_(hash_function)
pOutput | Pointer to a buffer to have the generated table store |
pSBoxTable | Pointer to the 4 bit definition table |
|
externnoexcept |
Get the floating point precision.
On Intel 32 bit processors, there's a special floating point register to control the precision of the 80387 compatible FPU. This function returns the current setting.
|
externnoexcept |
Get the floating point rounding setting.
On Intel 32 bit processors, there's a special floating point register to control the rounding behavior of the 80387 compatible FPU. This function returns the current setting.
|
externnoexcept |
Return the absolute path of a pathname.
On unix style machines, paths can start with ~ or ., whereas a prefix string needs to be inserted to get a full pathname. If there are /./ or /../ entries, they will be resolved.
pOutput | Pointer to a String to receive the name in UTF-8 encoding |
pInput | Pointer to a "C" string of the native unix pathname. |
|
externnoexcept |
|
externnoexcept |
|
externnoexcept |
|
externnoexcept |
|
externnoexcept |
|
externnoexcept |
|
externnoexcept |
|
externnoexcept |
|
externnoexcept |
Return a floating point number rounded up.
If there is any fraction, round the value up to the next whole integer.
dInput | 64 bit floating point value to round up to the nearest integer. |
|
externnoexcept |
Return a floating point number rounded up.
If there is any fraction, round the value up to the next whole integer.
fInput | 32 bit floating point value to round up to the nearest integer. |
|
externnoexcept |
Return the cosine from radians accurate to +-1.34615e-15.
Calculate cosine with 8 iterations. It calculates cosine but sacrifices some accuracy.
dInput | Value in Radians |
|
externnoexcept |
Return the cosine from radians.
This is a replacement of cosf() from the C++ libraries
fInput | Value in Radians |
|
externnoexcept |
Return the cosine from radians accurate to +-7.48669e-13.
Calculate cosine with 6 iterations. It calculates cosine but sacrifices some accuracy.
dInput | Value in Radians |
|
externnoexcept |
Return the cosine from radians.
This is a replacement of cos() from the C++ libraries
dInput | Value in Radians |
|
externnoexcept |
Return the cosine from radians accurate to +-0.000597239.
Calculate cosine with 3 iterations. It calculates cosine but sacrifices some accuracy.
fInput | Value in Radians |
|
externnoexcept |
Return the cosine from radians accurate to +- 7.49199e-06.
Calculate cosine with 4 iterations. It calculates cosine but sacrifices some accuracy.
fInput | Value in Radians |
|
externnoexcept |
Return the cosine from radians accurate to +-1.1407e-06.
Calculate cosine with 4 iterations. It calculates cosine but sacrifices some accuracy.
fInput | Value in Radians |
|
externnoexcept |
Return the cosine from radians accurate to +-2.05542e-06.
Calculate cosine with 5 iterations. It calculates cosine but sacrifices some accuracy.
dInput | Value in Radians |
|
externnoexcept |
Get the MAC address.
Scan the hardware for the default MAC address
pOutput | Pointer to an uninitialized MacAddress_t structure |
|
externnoexcept |
|
externnoexcept |
|
externnoexcept |
Return a floating point number with the fraction removed.
If there is any fraction, round the value down to the whole integer.
dInput | 64 bit floating point value to round down to the nearest integer. |
|
externnoexcept |
Return a floating point number with the fraction removed.
If there is any fraction, round the value down to the whole integer.
fInput | 32 bit floating point value to round down to the nearest integer. |
|
externnoexcept |
|
externnoexcept |
|
inlinenoexcept |
Retrieves the low-order word from the specified value.
Shift the input 16 bits to the right and set the upper bits to zero. This is an equivalent to the function HIWORD(DWORD)
uInput | The value to be converted. |
|
externnoexcept |
Get the current code hint flags.
Several subsystems perform code that may or may not interfere with higher level code. This flag enables and/or disables these features.
|
externnoexcept |
Return the path of the "home" folder.
On unix style machines, the user account has a home directory. Return that home directory name in native unix format.
pOutput | Pointer to a String to receive the name in UTF-8 encoding |
|
externnoexcept |
|
externnoexcept |
|
externnoexcept |
|
externnoexcept |
|
externnoexcept |
|
externnoexcept |
|
inlinenoexcept |
Retrieves the low-order word from the specified value.
Mask off the upper 16 bit of the 32 bit input and set the bits to zero. This is an equivalent to the function LOWORD(DWORD)
uInput | The value to be converted. |
|
externnoexcept |
|
externnoexcept |
|
externnoexcept |
|
externnoexcept |
|
extern |
Get the floating point rounding setting.
On PowerPC processors, there's a special floating point register to control the rounding behavior. This function returns the current setting.
|
externnoexcept |
Return a floating point number rounded to the nearest integer.
If there is any fraction, round the value to the whole integer.
dInput | 64 bit floating point value to round to the nearest integer. |
|
externnoexcept |
Return a floating point number rounded to the nearest integer.
If there is any fraction, round the value to the whole integer with fraction going away from zero. This is a functional equivalent to the "C" library function round().
fInput | 32 bit floating point value to round to the nearest integer. |
|
externnoexcept |
Return sign constant.
If the input is less than zero, return negative one, if the input is greater than zero, return one, otherwise return zero.
dInput | Value to test |
|
externnoexcept |
Return sign constant.
If the input is less than zero, return negative one, if the input is greater than zero, return one, otherwise return zero.
fInput | Value to test |
|
inlineconstexprnoexcept |
Get the sign value of an integer.
Without branching, calculate the sign value of an integer. If the input was zero, return zero, if it's positive, return 1 and if negative, return -1.
iInput | Value to get the sign value of. |
|
inlineconstexprnoexcept |
Get the sign value of an integer.
Without branching, calculate the sign value of an integer. If the input was zero, return zero, if it's positive, return 1 and if negative, return -1.
iInput | Value to get the sign value of. |
|
inlineconstexprnoexcept |
Get the sign value of a 64 bit integer.
Without branching, calculate the sign value of an integer. If the input was zero, return zero, if it's positive, return 1 and if negative, return -1.
iInput | Value to get the sign value of. |
|
inlineconstexprnoexcept |
Get the sign value of an integer.
Without branching, calculate the sign value of an integer. If the input was zero, return zero, if it's positive, return 1 and if negative, return -1.
iInput | Value to get the sign value of. |
|
externnoexcept |
|
externnoexcept |
|
externnoexcept |
Return the sine from radians accurate to +-1.16573e-15.
Calculate sine with 8 iterations. It calculates sine but sacrifices some accuracy.
dInput | Value in Radians |
|
externnoexcept |
Return the sine from radians.
This is a replacement of sinf() from the C++ libraries
To calculate sine... sin(x) = x - ((x^3)/ 3!) + ((x^5)/ 5!) - ((x^7)/ 7!) + ((x^9)/ 9!) ... Repeat the pattern by reversing the sign of the addition and adding 2 to the factors for every iteration
This function will perform 10 iterations from 3,5,7,...,23
fInput | Value in Radians |
|
externnoexcept |
Return the sine from radians accurate to +-7.48669e-13.
Calculate sine with 6 iterations. It calculates sine but sacrifices some accuracy.
dInput | Value in Radians |
|
externnoexcept |
Return the sine from radians.
This is a replacement of sin() from the C++ libraries
dInput | Value in Radians |
|
externnoexcept |
Return the sine from radians accurate to +-0.000597239.
Calculate sine with 3 iterations. It calculates sine but sacrifices some accuracy.
fInput | Value in Radians |
|
externnoexcept |
Return the sine from radians accurate to +-7.49199e-06.
Calculate sine with 4 iterations. It calculates sine but sacrifices some accuracy.
fInput | Value in Radians |
|
externnoexcept |
Return the sine from radians accurate to +-1.03892e-06.
Calculate sine with 4 iterations. It calculates sine but sacrifices some accuracy.
fInput | Value in Radians |
|
externnoexcept |
Return the sine from radians accurate to +-2.05542e-06.
Calculate sine with 5 iterations. It calculates sine but sacrifices some accuracy.
dInput | Value in Radians |
|
externnoexcept |
|
externnoexcept |
|
externnoexcept |
Get the execution priority of a thread.
Get the execution priority of any thread using a ThreadID.
If kThreadPriorityInvalid is returned, this feature is not supported.
|
externnoexcept |
Return the ID of the current thread.
Query the operating system for the ID number of the currently executing thread.
If zero is returned, this feature is not supported
|
externnoexcept |
Get the current debug tracing flag.
Several subsystems perform diagnostic logging and this flag enables and/or disables these features.
|
externnoexcept |
Load in a comment from a Desktop resource file.
On network shares, the finder stores metadata like file comments in a file called "Desktop" on the root folder. Given the location of a file of interest, look up its comment ID in the database looking for a match. If found, return a copy of the data within.
pComment | Pointer to a 256 byte buffer to receive the "C" string comment |
svRefNum | Volume reference number of the file to check |
lDirID | Directory ID of the file to check |
pFileName | Pointer to a "C" string of the filename to check |
|
externnoexcept |
Get finder comment ID.
Given information about a file, get the comment ID of the named file object.
pCommentID | Pointer to receive the finder comment ID. |
pFSRef | Pointer to the FSRef of the file to query. |
|
externnoexcept |
Get finder comment ID.
Given information about a file, get the comment ID of the named file object.
pCommentID | Pointer to receive the finder comment ID. |
pFSSpec | Pointer to the FSSpec of the file to query. |
|
externnoexcept |
Get finder comment ID.
Given information about a file, get the comment ID of the named file object.
pCommentID | Pointer to receive the finder comment ID. |
sVRefNum | Volume reference number |
lDirID | Current directory ID |
pName | Name of the file of interest, can be nullptr. |
|
extern |
Get the number of bits for the alpha channel.
Using a DirectX 9 D3DFORMAT value, return the number of bits needed to hold the alpha value in a single pixel.
Return 0 if the value is invalid or there is no alpha component
uD3DFORMAT | D3DFORMAT value |
|
extern |
Get the number of bits for a single color channel.
Using a DirectX 9 D3DFORMAT value, return the number of bits needed to hold a smallest color value in a single pixel.
Return 0 if the value is invalid
uD3DFORMAT | D3DFORMAT value |
|
extern |
Get the number of bits for the depth channel.
Using a DirectX 9 D3DFORMAT value, return the number of bits needed to hold the depth value in a single pixel.
Return 0 if the value is invalid or there is no depth component
uD3DFORMAT | D3DFORMAT value |
|
extern |
Get the number of bits for the stencil channel.
Using a DirectX 9 D3DFORMAT value, return the number of bits needed to hold the stencil value in a single pixel.
Return 0 if the value is invalid or there is no stencil component
uD3DFORMAT | D3DFORMAT value |
|
externnoexcept |
Determine the name of the Finder Desktop Database.
On network shares, the finder stores metadata like file comments in a file called "Desktop" on the root folder. Due to localization, this file name might be in another language so loading by name is impossible. Iterate through the root directory of the volume for the first file with the creator code of 'ERIK' and the file type of 'FNDR' and return the name of that file.
pDesktopName | Pointer to a 256 byte buffer to receive the Pascal filename |
svRefNum | Volume reference number of the volume to scan for the file. |
|
externnoexcept |
Get common information from a directory.
Given information about a file, get the ID of the named file object, if it's a directory and if the access is that of a "Drop box" folder.
pFSRef | Pointer of an FSRef of the file/directory to query. |
pDirID | Pointer to receive the DirID of the named folder |
pbDirectory | Pointer to receive a boolean that is TRUE if it's a directory |
pbDropBox | Pointer to receive a boolean if the folder is a drop box. |
|
externnoexcept |
Get common information from a directory.
Given information about a file, get the ID of the named file object, if it's a directory and if the access is that of a "Drop box" folder.
pFSSpec | Pointer of an FSSpec of the file/directory to query. |
pDirID | Pointer to receive the DirID of the named folder |
pbDirectory | Pointer to receive a boolean that is TRUE if it's a directory |
pbDropBox | Pointer to receive a boolean if the folder is a drop box. |
|
externnoexcept |
Get common information from a directory.
Given information about a file, get the ID of the named file object, if it's a directory and if the access is that of a "Drop box" folder.
sVRefNum | Volume reference number |
lDirID | Current directory ID |
pName | Name of the file of interest, can be nullptr. |
pDirID | Pointer to receive the DirID of the named folder |
pbDirectory | Pointer to receive a boolean that is TRUE if it's a directory |
pbDropBox | Pointer to receive a boolean if the folder is a drop box. |
|
externnoexcept |
Get directory ID of a named directory.
Given information about a directory, get its directory ID. If the object is a file, return the parent directory ID.
pFSSpec | Pointer to the FSSpec of the file or directory of interest. |
pDirID | Pointer to receive the directory's ID. |
pbDirectory | Pointer to receive TRUE if it's a directory. |
|
externnoexcept |
Get directory ID of a named directory.
Given information about a directory, get its directory ID. If the object is a file, return the parent directory ID.
sVRefNum | Volume reference number |
lDirID | Current directory ID |
pName | Pascal name of the file of interest, can be nullptr. |
pDirID | Pointer to receive the directory's ID. |
pbDirectory | Pointer to receive TRUE if it's a directory. |
|
externnoexcept |
Get Finder DInfo for a directory using a FSRef.
Given an FSRef for a folder, obtain the finder information about this folder object and return the DInfo record.
pFinderInfo | Pointer to empty DInfo to be filled in. |
pFSRef | Pointer to a FSRef that points to the folder of interest. |
|
externnoexcept |
Get Finder DInfo for a directory using a FSSpec.
Given an FSSpec for a folder, obtain the finder information about this folder object and return the DInfo record.
pFinderInfo | Pointer to empty DInfo to be filled in. |
pFSSpec | Pointer to a FSSpec that points to the folder of interest. |
|
externnoexcept |
Get Finder DInfo for a directory.
Given information about a folder, obtain the finder information about this folder object and return the DInfo record. pName is converted into a pascal string before being passed to PBGetCatInfoSync().
pFinderInfo | Pointer to empty DInfo to be filled in. |
sVRefNum | Volume reference number |
lDirID | Current directory ID |
pName | Name of the file of interest, can be nullptr. |
|
externnoexcept |
Load DriverLoaderLib for manual linking.
Load in the shared system library DriverLoaderLib
.
|
extern |
Get the number of bits for a single color channel.
Using a DirectX 11 DXGI_FORMAT value, return the number of bits needed to hold a smallest color value in a single pixel.
Return 0 if the value is invalid
uDXGI_FORMAT | DXGI_FORMAT value |
|
externnoexcept |
Retrieve an environment string.
On systems that support it, query the system for an environment variable and return a COPY of the string. Once the string is no longer needed, call Burger::Free(const void *) on it to release it.
Once obtained, the string will not change due to it being a copy of the one that exists in the operating system.
The string is encoded to UTF8 on all systems
pKey | Pointer to a "C" string of the environment variable name |
|
externnoexcept |
Get a pointer to the beginning of the file extension.
A string is scanned until the last period is found. A pointer to the string fragment following the period is returned. If no period is found then a pointer to the terminating zero is returned. This function is a quick way to extract the file extension from a PC style filename.
Example filenames expected are: "Foo", "ReadMe.txt","ArtFile.gif" or "MyData.c".
These examples will return pointers to: "", "txt", "gif" or "c".
The pointer returned is a pointer within the string. You do not need to release the memory in any way.
pInput | Pointer to the "C" string to scan. nullptr will page fault. |
|
externnoexcept |
Use an open file reference to return the FSRef.
If a file was opened using an FSRef, use this function to retrieve the FSRef from the open file reference by calling FSGetForkCBInfo().
This function will fail if the application is not running on MacOS 9 or higher with a paramErr
.
pOutput | Pointer to a buffer to receive the FSRef |
iFileRefNum | Open file reference to query for the FSRef |
|
externnoexcept |
Find the FSSpec from a file reference number.
When a file is opened, a file reference number is generated. This function will return the FSSpec of the opened file by calling PBGetFCBInfoSync().
pOutput | Pointer to an uninitialized FSSpec |
iFileRefNum | Open file reference ID |
|
externnoexcept |
Find a file location from a file reference number.
When a file is opened, a file reference number is generated. This function will return the volume, directory ID and filename of the opened file by calling PBGetFCBInfoSync().
pVRefNum | Pointer to variable to receive the volume reference number |
pDirID | Pointer to variable to receive the file's parent ID. |
pOutputFilename | Pointer to a 256 byte buffer to receive the Pascal filename |
iFileRefNum | Open file reference ID |
|
externnoexcept |
Extract a filename at the end of a MacOS path.
Scan a Pascal filename string and extract the last component which should be the filename. If the string passed in is a volume path, such as ":Macintosh HD:", it will intentionally fail.
Do not pass the same pointer for both input and output.
Error codes returned, notAFileErr
, or noErr
.
pOutput | Pointer to a 256 byte Pascal string buffer |
pInput | Pointer to the Pascal filename path |
|
externnoexcept |
Reports the size of a formatted output in bytes without actually creating any formatted output.
* Step 1) Parse the format string and arguments * Step 2) Report the format results and call back for an output buffer. * Step 3) If no issues found in Step 1 and a buffer was returned in step 2, execute the list of format & copy output commands. \param pFormat Pointer to a "C" format string \param uArgCount Number of arguments in the argument array \param ppArgs Argument array, can be \ref NULL if uArgCount is zero \return Negative number for error, number of bytes processed on success
|
extern |
Parses the ID3V2 tag length.
A ID3V2 tag is 28 bits pulled out of 4 bytes with the highest bit masked off.
pInput | Pointer to a raw ID3V2 length stream (4 bytes) |
|
externnoexcept |
Load InterfaceLib for manual linking.
Load in the shared system library InterfaceLib
.
|
externnoexcept |
Get the name the user has called the computer.
Some computer owners have the option to give their computer a whimsical name. This routine will retrieve that name. If for some reason a name can't be found or the operating system doesn't support naming, the name of "Computer" will be returned.
pOutput | Pointer to a String to receive the name in UTF-8 encoding |
localhost
|
externnoexcept |
Return the name of the mac model.
Query the Registry entries that are found in a Macintosh and return the model string that denotes the specific model of Macintosh that is currently running this code.
pOutput | Pointer to a String to receive the name in UTF-8 encoding |
|
externnoexcept |
Load NameRegistryLib for manual linking.
Load in the shared system library NameRegistryLib
.
|
externnoexcept |
Call GetIndString() using the system resource file.
Call the function GetIndString() with UseResFile(0) so the string is forced to be obtained from the system resource.
pOutput | Pointer to a String to receive the name in UTF-8 encoding. |
iStringID | MacOS resource ID number of the string array. |
iIndex | Index into the STR# list |
|
externnoexcept |
Call GetString() using the system resource file.
Call the function GetString() with UseResFile(0) so the string is forced to be obtained from the system resource.
pOutput | Pointer to a String to receive the name in UTF-8 encoding. |
iStringID | MacOS resource ID number of the string. |
|
extern |
Return the size of a file.
Given an ANSI FILE *, return the size of the file.
fp | FILE * to the stream to write to. |
This function is faster than the fseek(), ftell(seek), fseek() method since this uses custom code tailored for each compiler to directly access records in the FILE structure in most cases.
|
extern |
Return the size of a file with 64 bits.
Given an ANSI FILE *, return the size of the file.
fp | FILE * to the stream to write to. |
This function is faster than the fseek(), ftell(seek), fseek() method since this uses custom code tailored for each compiler to directly access records in the FILE structure in most cases.
|
externnoexcept |
Retrieves the login name of the user associated with the current thread.
On systems that use user logins, return the login name of the account associated with the current thread. If the platform doesn't support multiple user accounts, it will return "User" and the error code kErrorNotSupportedOnThisPlatform.
pOutput | Pointer to a String to receive the name in UTF-8 encoding |
|
externnoexcept |
Get the real name of the current user.
When someone has logged onto a computer, that person can associate a real name to the login user account. This routine will retrieve real name of the user. If for some reason a user name can't be found or the operating system doesn't support user logins, the name "User" will be returned.
pOutput | Pointer to a String to receive the real name in UTF-8 encoding |
|
externnoexcept |
Obtain information about a volume.
Given a volume reference number, fill in a HParamBlockRec record with information about the volume. The ioNamePtr entry is zeroed out so retrieving a volume name is not possible with this call.
pOutput | Pointer to an uninitialized HParamBlockRec buffer |
sVRefNum | Volume reference number |
|
externnoexcept |
Obtain information about an extended volume.
Given a volume reference number, fill in a XVolumeParam record with information about the volume. The ioNamePtr entry is zeroed out so retrieving a volume name is not possible with this call.
pOutput | Pointer to an uninitialized XVolumeParam buffer |
svRefNum | Volume reference number |
|
externnoexcept |
Test two GUID for equality.
Compare two GUID's for equality. For cross platform consistency, the comparisons assume the data is in little endian format and will do conversions on big endian machines.
Will return 0 for equality, -1 if pInput1<pInput2 and 1 if pInput1>pInput2
pInput1 | Pointer to the first GUID to test |
pInput2 | Pointer to the second GUID to test |
|
externnoexcept |
Convert a GUID string into a GUID.
A string in the format of 8641FBDE-7F8F-11D4-AAC5-000A27DD93F2
will be parsed and converted into a GUID structure
pOutput | Pointer to an uninitialized GUID structure |
pInput | Pointer to a "C" string formatted as above |
|
externnoexcept |
Return the 16 bit hash of a GUID.
Using the GUID as a byte array (So the function is endian neutral), create a 16 bit hash value.
pInput | Pointer to a valid GUID |
|
externnoexcept |
Create a new GUID.
Using a MAC address, current time and deep voodoo, generate a unique 128 bit number for labeling a data object.
http://en.wikipedia.org/wiki/Globally_unique_identifier
http://tools.ietf.org/html/rfc4122.html
pOutput | Pointer to an uninitialized GUID buffer |
|
externnoexcept |
Compare two GUID structures for equality.
pInput1 | Pointer to the first GUID to test |
pInput2 | Pointer to the second GUID to test |
|
externnoexcept |
Convert a GUID to a string.
Convert a GUID into a string that looks like 8641FBDE-7F8F-11D4-AAC5-000A27DD93F2
pOutput | Pointer to a buffer that's at least 36 bytes in length. |
pInput | Pointer to a GUID to convert to an ASCII string |
|
externnoexcept |
Return TRUE if floating point is supported in hardware.
Most modern CPUs have floating point in hardware, and on most platforms, this function will return TRUE. On 680x0 platforms, this function will test for the existance of an FPU and will return non-zero if one is found and zero if there is no FPU.
|
externnoexcept |
Return TRUE if the AltiVec instruction set is present.
On PowerPC CPUs, this function will perform a test to determine if the AltiVec instruction is present. It will return TRUE if it does, and FALSE if not.
On XBox 360 and PS3 machines, this will always return TRUE and on non PowerPC CPUs it will always return FALSE.
|
externnoexcept |
Return TRUE if the instruction CPUID is present.
On x86 CPUs, this function will perform a test to determine if the CPUID instruction is present. It will return TRUE if it does, and FALSE if not. It's very likely this will return TRUE on x86 CPUs due to the introduction of the instruction occurred in 1993
On x64 machines, this will always return TRUE and on non Intel CPUs it will always return FALSE.
|
externnoexcept |
Return TRUE if floating point sqrt is supported in hardware.
Most modern CPUs have floating point in hardware, and on most platforms, this function will return TRUE. On 680x0 and PowerPC platforms, this function will test for the existance of an instruction to perform a floating point square root and will return non-zero if one is found.
|
externnoexcept |
Quickly create a GOST key.
Given a buffer of data, generate the GOST hash key
pOutput | Pointer to an uninitialized GOST_t structure |
pInput | Pointer to a buffer of data to hash |
uLength | Number of bytes to hash |
|
externnoexcept |
Quickly create an MD2 key.
Given a buffer of data, generate the MD2 hash key
pOutput | Pointer to an unitialized MD2_t structure |
pInput | Pointer to a buffer of data to hash |
uLength | Number of bytes to hash |
|
externnoexcept |
Quickly create an MD4 key.
Given a buffer of data, generate the MD4 hash key
pOutput | Pointer to an unitialized MD4_t structure |
pInput | Pointer to a buffer of data to hash |
uLength | Number of bytes to hash |
|
externnoexcept |
Quickly create an MD5 key.
Given a buffer of data, generate the MD5 hash key
pOutput | Pointer to an unitialized MD5_t structure |
pInput | Pointer to a buffer of data to hash |
uLength | Number of bytes to hash |
|
externnoexcept |
Quickly create a SHA-1 key.
Given a buffer of data, generate the SHA-1 hash key
pOutput | Pointer to an uninitialized SHA1_t structure |
pInput | Pointer to a buffer of data to hash |
uLength | Number of bytes to hash |
|
externnoexcept |
Case insensitive string test for HashMapStringCase.
This internal function performs a case insensitive string comparison between two String classes.
|
externnoexcept |
|
extern |
Import an IT file.
Convert an IT music file into a Burgerlib SongPackage
pOutput | Pointer to the SongPackage to fill in with music data |
pInput | Pointer to the IT file |
uInputLength | Length of the input data |
|
extern |
Convert an IT effect command to a Burgerlib one.
Given an IT effect command and its argument, translate them into a Burgerlib command and argument
pOutput | Pointer to the command to receive the translated values |
uITCommand | IT format effect command |
uITArgument | IT format effect argument |
|
extern |
Import an S3M file.
Convert an S3M music file into a Burgerlib SongPackage
pOutput | Pointer to the SongPackage to fill in with music data |
pInput | Pointer to the S3M file |
uInputLength | Length of the input data |
|
extern |
Convert an S3M effect command to a Burgerlib one.
Given an S3M effect command and its argument, translate them into a Burgerlib command and argument
pOutput | Pointer to the command to receive the translated values |
uS3MCommand | S3M format effect command |
uS3MArgument | S3M format effect argument |
|
extern |
Import an XM file.
Convert an XM music file into a Burgerlib SongPackage
pOutput | Pointer to the SongPackage to fill in with music data |
pInput | Pointer to the XM file |
uInputLength | Length of the input data |
|
extern |
Convert an XM effect command to a Burgerlib one.
Given an data stream with an XM effect encoded into it, parse the stream, convert the command and its arguments, translate them into a Burgerlib command and argument
pOutput | Pointer to the command to receive the translated values |
pInput | Pointer to the input stream |
|
externnoexcept |
Initialize a Mac Finder FileInfo.
When creating a file on MacOS, a file type and creator code needs to be assigned. The default for generic files is file type "BINA" for binary and the creator code is "????" for unknown. It's up to the app developer to call set_creator_and_file_type() to assign the proper values after the file is created or modified.
pFileInfo | Pointer to an uninitialized FileInfo to be filled in. |
|
externnoexcept |
Initialize a Mac FSRefParam.
When calling the Mac function PBGetCatalogInfoSync(), a FSRefParam needs to be prepared so only the information queried is returned. This structure is large, so this subroutine clears it out quickly. All entries except for "ref" and "whichInfo" are cleared to zero. These two values are set to the passed values.
pFSRefParam | Pointer to an uninitialized FSRefParam to be filled in. |
pFSRef | Pointer to a valid FSRef of the file of interest. |
uCatInfoBitmap | Value to put in whichInfo . |
|
inlinenoexcept |
Convert an int32_t into a Fixed32 value.
Convert an integer into a fixed point number. No bounds checking is performed so values that exceed 32767 or are less than -32768 will yield undefined results.
iInput | Integer to convert |
|
externnoexcept |
Convert an int32_t into a Fixed32 value with saturation.
Convert an integer into a fixed point number. Bounds checking is performed so values that exceed 32767 or are less than -32768 will yield max and min values.
Examples of clamping:
iInput | Integer to convert |
|
inlinenoexcept |
32 bit integer to floating point conversion
pInput | Pointer to a 32 bit integer to convert |
|
inlinenoexcept |
32 bit integer to floating point conversion
pInput | Pointer to a 32 bit integer to convert |
pOutput | Pointer to a 32 bit float to receive the converted integer |
|
inlinenoexcept |
32 bit integer to floating point conversion
iInput | 32 bit integer to convert |
pOutput | Pointer to a 32 bit float to receive the converted integer |
|
inlineconstexprnoexcept |
32 bit integer to floating point conversion
iInput | 32 bit integer to convert |
|
inlineconstexprnoexcept |
Interpolate between two floating point values.
Using a factor that's clamped from 0.0 to 1.0, return the value between dFrom and dTo inclusive along a linear scale where 0.0 returns dFrom and 1.0 returns dTo. Order of the dFrom and dTo values are unimportant.
dFrom | Value to return if the interpolation factor is 0.0 |
dTo | Value to return if the interpolation factor is 1.0 |
dFactor | Interpolation between 0.0 and 1.0 inclusive |
|
inlineconstexprnoexcept |
Interpolate between two floating point values.
Using a factor that's clamped from 0.0f to 1.0f, return the value between fFrom and fTo inclusive along a linear scale where 0.0f returns fFrom and 1.0f returns fTo. Order of the fFrom and fTo values are unimportant.
fFrom | Value to return if the interpolation factor is 0.0f |
fTo | Value to return if the interpolation factor is 1.0f |
fFactor | Interpolation between 0.0f and 1.0f inclusive |
|
externnoexcept |
Enter the debugger if present.
On some platforms, this will only halt if a debugger is attached, if not, this function will return immediately
|
externnoexcept |
Convert an IPv4 address into a string.
Given a an IPv4 address, convert it into a readable string.
If uPort is less than 65536, then append the port address.
Example output "206.55.132.145:80" "127.0.0.1"
pOutput | String object to store the output |
uIP | IPv4 IP address in native endian with the highest 8 bits being the leftmost number |
uPort | Optional port number, if set to greater than 65535, it's not appended |
|
externnoexcept |
Convert an IPv6 address into a string.
Given a an IPv6 address, convert it into a readable string.
If uPort is less than 65536, then append the port address.
"[2604:4080:1122:8430:44ab:4ad8:adfd:a731]:80" "fe80::adfd:a731" "::1"
pOutput | String object to store the output |
pIP | Pointer to IPv6 IP address as a 16 byte array |
uPort | Optional port number, if set to greater than 65535, the address isn't encapsulated and not appended |
|
externnoexcept |
|
externnoexcept |
|
externnoexcept |
|
externnoexcept |
|
externnoexcept |
|
externnoexcept |
Test if macsbug is installed.
For pre-MacOSX and Carbon systems, the MacsBug system extension can be installed to capture application crashes. This function will detect if MacsBug is present.
|
externnoexcept |
Test if Metrowerks Metronub is installed.
For pre-MacOSX and Carbon systems, the Metrowerks Metronub system extension can be installed to capture application crashes. This function will detect if Metrowerks Metronub is present.
|
externnoexcept |
|
externnoexcept |
|
externnoexcept |
|
externnoexcept |
|
externnoexcept |
Test if a device GUID belongs to an XInput device.
To allow DirectInput and XInput to work side-by-side, all devices that are supported by XInput should be ignored when enumerated for DirectInput control.
Given a GUID of a device, test the Plug and Play (PNP) device ID if it contains the substring "IG_", because if it does, it's an XInput supported device.
|
inlinenoexcept |
Test if a character is 0-9.
If the character is ASCII 0 through 9, return non zero, otherwise return zero.
iInput | ASCII character |
|
externnoexcept |
Test if the application has elevated privileges.
On systems that support it, check if the user has elevated privileges.
Systems such as MSDOS and game consoles allow full access to all system resources, but on modern desktops, only Administrators or root accounts can modify system folders.
|
inlinenoexcept |
Test if a character is 0-9, A-F or a-f.
If the character is ASCII 0 through 9, A through F or a through f, return non zero, otherwise return zero.
iInput | ASCII character |
|
externnoexcept |
Test if an IPv6 address is an IPv4 address in a wrapper.
Given a an IPv6 address, test if it's really an encapsulated IPv4 address.
pIP | Pointer to an IPv6 address to test |
|
externnoexcept |
Test if an IPv6 address is a link local address.
Given an IPv6 address, test if it's a link local address.
A multicast IPv6 address starts with 0xfe and the second byte is 0x80 if masked with 0xc0, where 'x' is "don't care", fe8x:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx .
pIP | Pointer to an IPv6 address to test |
|
externnoexcept |
Test if an IPv6 address is a loop back address.
Given an IPv6 address, test if it's the loop back address.
An loopback IPv6 address is ::1 .
pIP | Pointer to an IPv6 address to test |
|
externnoexcept |
Test if an IPv6 address is an IPv4 address in a wrapper.
Given a an IPv6 address, test if it's really an encapsulated IPv4 address.
pIP | Pointer to an IPv6 address to test |
|
inlinenoexcept |
Test if an IPv6 address is a multicast address.
Given an IPv6 address, test if it's a multicast address.
A multicast IPv6 address starts with 0xff, where 'x' is "don't care", ffxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx .
pIP | Pointer to an IPv6 address to test |
|
externnoexcept |
Test if an IPv6 multicast address has global scope.
Given an IPv6 multicast address, test if it has global scope.
A multicast IPv6 address starts with 0xff and the second byte is 0x0e if masked with 0x0f, where 'x' is "don't care", ffxe:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx .
pIP | Pointer to an IPv6 address to test |
|
externnoexcept |
Test if an IPv6 multicast address has link local scope.
Given an IPv6 multicast address, test if it has link local scope.
A multicast IPv6 address starts with 0xff and the second byte is 0x02 if masked with 0x0f, where 'x' is "don't care", ffx2:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx .
pIP | Pointer to an IPv6 address to test |
|
externnoexcept |
Test if an IPv6 multicast address has node local scope.
Given an IPv6 multicast address, test if it has node local scope.
A multicast IPv6 address starts with 0xff and the second byte is 0x01 if masked with 0x0f, where 'x' is "don't care", ffx1:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx .
pIP | Pointer to an IPv6 address to test |
|
externnoexcept |
Test if an IPv6 multicast address has organization local scope.
Given an IPv6 multicast address, test if it has organization local scope.
A multicast IPv6 address starts with 0xff and the second byte is 0x08 if masked with 0x0f, where 'x' is "don't care", ffx8:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx .
pIP | Pointer to an IPv6 address to test |
|
externnoexcept |
Test if an IPv6 multicast address has site local scope.
Given an IPv6 multicast address, test if it has site local scope.
A multicast IPv6 address starts with 0xff and the second byte is 0x05 if masked with 0x0f, where 'x' is "don't care", ffx5:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx .
pIP | Pointer to an IPv6 address to test |
|
externnoexcept |
Test if an IPv6 address is a site local address.
Given an IPv6 address, test if it's a site local address.
A multicast IPv6 address starts with 0xfe and the second byte is 0xc0 if masked with 0xc0, where 'x' is "don't care", fecx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx .
pIP | Pointer to an IPv6 address to test |
|
externnoexcept |
Test if an IPv6 address is unspecified.
Given an IPv6 address, test if it's specified.
An unspecified IPv6 address is :: .
pIP | Pointer to an IPv6 address to test |
|
inlinenoexcept |
Test if a character is a-z.
If the character is ASCII a through z, return non zero, otherwise return zero.
iInput | ASCII character |
|
extern |
Verify a query packet for network server scanning.
Test a 512 byte buffer with a special, big endian magic number for validation.
pPacket | Pointer to a buffer to validate |
uPacketSize | Size of the buffer to validate |
|
inlinenoexcept |
Test if a pointer is invalid.
On windows platforms, memory pointers cannot point to any location less than 65536, so any pointer less than 65536 is considered broken. All other platforms will only consider nullptr as an invalid pointer.
No attempt is made to check if the memory points to a specific data type of if the application has permission to access the memory.
pInput | Pointer to test |
|
inlinenoexcept |
Test if a pointer is valid.
On windows platforms, memory pointers cannot point to any location less than 65536, so any pointer less than 65536 is considered broken. All other platforms will only consider nullptr as an invalid pointer.
No attempt is made to check if the memory points to a specific data type of if the application has permission to access the memory.
pInput | Pointer to test |
|
inlinenoexcept |
|
inlinenoexcept |
Test if a character is ASCII white space.
If the character is ASCII SPACE, TAB, LF, VT, FF or CR, return non zero, otherwise return zero.
iInput | ASCII character |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
Test if a character is A-Z.
If the character is ASCII A through Z, return non zero, otherwise return zero.
iInput | ASCII character |
|
inlinenoexcept |
Test if a character is TAB or SPACE.
If the character is ASCII TAB or SPACE, return non zero, otherwise return zero.
iInput | ASCII character |
|
externnoexcept |
Load a little endian 80 bit float as a double.
Convert an 80 bit float stored in memory in little endian format into a double in native endian
pInput | Pointer to the 80 bit floating point number |
|
extern |
Load a file opened with fopen() into memory.
Given an ANSI FILE * for a freshly opened file with read permissions, allocate enough memory to accommodate the entire file and read it into memory. The file is closed at the end of the function. The passed fp pointer is considered invalid and closed after this call is issued.
Dispose of the memory returned with a call to Burger::Free(const void *)
fp | FILE * to the file to read from |
pLength | to a uintptr_t to receive the size of the file in bytes. |
|
extern |
Decompress audio compressed with MACE 3:1.
This routine will decompress data by trying to "predict" where the next sample will be. This is a lossy compression targeted to unsigned 8 bit samples
Each call will only decompress one channel of data. To decompress stereo input, call this function twice like this
Each packet of compressed data occupies 2 bytes and yields 6 bytes
pInput | Pointer to the compressed data |
pOutput | Pointer to the uint8_t buffer to receive the decompressed data |
uPacketCount | Number of compressed packets to decompress |
pInputState | Pointer to a running MACEState_t for partial decompression |
pOutputState | Pointer to a MACEState_t for the state of the decompression after this call completes |
uNumChannels | 1 for mono, 2 for stereo |
uWhichChannel | 1 for left channel, 2 for right channel |
|
extern |
Decompress audio compressed with MACE 6:1.
This routine will decompress data by trying to "predict" where the next sample will be. This is a lossy compression targeted to unsigned 8 bit samples
Each call will only decompress one channel of data. To decompress stereo input, call this function twice like this
Each packet of compressed data occupies 1 byte and yields 6 bytes
pInput | Pointer to the compressed data |
pOutput | Pointer to the uint8_t buffer to receive the decompressed data |
uPacketCount | Number of compressed packets to decompress |
pInputState | Pointer to a running MACEState_t for partial decompression |
pOutputState | Pointer to a MACEState_t for the state of the decompression after this call completes |
uNumChannels | 1 for mono, 2 for stereo |
uWhichChannel | 1 for left channel, 2 for right channel |
|
extern |
Create a query packet for network server scanning.
Fill in a 512 byte buffer with a special, big endian magic number which will be validated on the receiving server before the server responds with information about the server.
pPacket | Pointer to a 512 byte buffer to fill in for a kQueryCommand |
|
externnoexcept |
Compare two byte buffers for equality, case insensitive.
Given pointers to two unsigned byte arrays, compare them for equality by using a subtraction of the first buffer to the second. If the subtraction's result is non-zero, sign extend the result and return it immediately. If both buffers are identical, return zero. If the byte is an upper case ASCII character, convert it to lower case before the subtraction is performed
pInput1 | Pointer to the first buffer to subtract from. |
pInput2 | Pointer to the second buffer to subtract with. |
uCount | Size in bytes of both of the buffers. |
|
externnoexcept |
Scan for the first occurrence of a specific character in a byte array.
Returns a pointer to the first occurrence of the character iChar in the 8 bit pInput or nullptr if the character was not found
pInput | Pointer to an array of bytes to scan |
uInputSize | Size of the buffer in bytes |
iChar | Character to scan for |
|
externnoexcept |
Scan for the first occurrence of a specific character in a short array.
Returns a pointer to the first occurrence of the character uChar in the 16 bit pInput or nullptr if the character was not found
pInput | Pointer to an array of 16 bit shorts to scan |
uInputSize | Size of the buffer in bytes |
uChar | Character to scan for |
|
externnoexcept |
Scan for the last occurrence of a specific character in a buffer.
Returns a pointer to the last occurrence of the character iChar in the memory buffer pInput or nullptr if the character was not found
pInput | Pointer to a char buffer string to scan |
uInputSize | Number of bytes contained in the buffer |
iChar | Character to scan for |
|
externnoexcept |
Scan for the last occurrence of a specific character in a uint16_t buffer.
Returns a pointer to the last occurrence of the character uChar in the uint16_t string buffer pInput or nullptr if the character was not found
pInput | Pointer to a uint16_t string buffer to scan |
uInputSize | Number of BYTES in the buffer |
uChar | Character to scan for |
|
externnoexcept |
Set a buffer to all zeros.
Given a pointer to a byte array, erase it to all zeros
pOutput | Pointer to the buffer to erase. |
uCount | Size in bytes of the buffer. |
|
externnoexcept |
Compare two byte buffers for equality.
Given pointers to two unsigned byte arrays, compare them for equality by using a subtraction of the first buffer to the second. If the subtraction's result is non-zero, sign extend the result and return it immediately. If both buffers are identical, return zero.
This is equivalent to memcmp()
pInput1 | Pointer to the first buffer to subtract from. |
pInput2 | Pointer to the second buffer to subtract with. |
uCount | Size in bytes of both of the buffers. |
|
externnoexcept |
Copy raw memory from one buffer to another.
Given a pointer to a byte stream, copy it to a destination buffer using a supplied input length.
pOutput | Pointer to the buffer to get the copy. |
pInput | Pointer to the buffer with the raw data to copy from. |
uCount | Size in bytes of the data to copy. |
|
externnoexcept |
Set a buffer to a specific value.
Given a pointer to a byte array, fill it with a specific value
pOutput | Pointer to the buffer to erase. |
uFill | 8 bit value to fill memory with |
uCount | Size in bytes of the buffer. |
|
externnoexcept |
Copy raw memory from one buffer to another in any direction.
Given a pointer to a byte stream, copy it to a destination buffer using a supplied input length. This differs from MemoryCopy() in that it is safe to use this function for up or down memory copies. It will determine which direction to perform the copy in a safe manner. As such, there is a small performance penalty for using this function instead of MemoryCopy().
pOutput | Pointer to the buffer to get the copy. |
pInput | Pointer to the buffer with the raw data to copy from. |
uCount | Size in bytes of the data to copy. |
|
externnoexcept |
Copy a buffer that's been exclusive or'd with 0xFF.
Given a pointer to a byte array, toggle all the zeros to ones and vice versa and store the result into another buffer
pOutput | Pointer to the buffer to store the result. |
pInput | Pointer to the buffer to toggle. |
uCount | Size in bytes of the buffer. |
|
externnoexcept |
Exclusive or a buffer with 0xFF.
Given a pointer to a byte array, toggle all the zeros to ones and vice versa.
pOutput | Pointer to the buffer to toggle. |
uCount | Size in bytes of the buffer. |
|
externnoexcept |
Exclusive or a buffer with a value and store the result in another buffer.
Given a pointer to a byte array, exclusive or all of the values with a given 8 bit value and store the result elsewhere
pOutput | Pointer to the buffer to store the result. |
pInput | Pointer to the buffer to toggle. |
uXor | Value to exclusive or the buffer with |
uCount | Size in bytes of the buffer. |
|
externnoexcept |
Exclusive or a buffer with another buffer.
Given pointers to two byte arrays, exclusive or all of the values of each buffer with each other and store the result in the first buffer
pOutput | Pointer to the buffer to exclusive or and store the result. |
pInput | Pointer to the buffer to exclusive or with. |
uCount | Size in bytes of the buffers. Both buffers must be the same size. |
|
externnoexcept |
Exclusive or a buffer with another buffer and store the result in a third buffer.
Given pointers to two byte arrays, exclusive or all of the values of each buffer with each other and store the result in a third buffer
pOutput | Pointer to the buffer to store the result. |
pInput1 | Pointer to the first buffer to exclusive or with. |
pInput2 | Pointer to the second buffer to exclusive or with. |
uCount | Size in bytes of the buffers. All three buffers must be the same size. |
|
externnoexcept |
Exclusive or a buffer with a value.
Given a pointer to a byte array, exclusive or all of the values with a given 8 bit value.
pOutput | Pointer to the buffer to toggle. |
uXor | Value to exclusive or the buffer with |
uCount | Size in bytes of the buffer. |
|
externnoexcept |
Modulo the range of the input so that -BURGER_PI <= fInput < BURGER_PI.
Wrap around a value in radians into remain in the valid range of radians.
dInput | 64 bit floating point value in radians |
|
externnoexcept |
Modulo the range of the input so that -BURGER_PI <= fInput < BURGER_PI.
Wrap around a value in radians into remain in the valid range of radians.
fInput | 32 bit floating point value in radians |
|
inlineconstexprnoexcept |
Upconvert to && for move semantics.
A template that converts the type to a && type. Used to force move semantics. It's used to allow for C++11 or higher compilers to generate better code by moving the contents of a class or structure instead of making a copy.
T | Type to convert to &&. |
t | Object reference to convert to && |
Based on std::move
|
extern |
12 entry DCT for MP3
Perform a 12 entry DCT for MP3 decoding. This is a simpler form of DCT36 that only processes 1/3 of the entries
"On Computing the Discrete Fourier Transform", Mathematics of Computation, Volume 32, Number 141, January 1978, Pages 175-199 http://www.ams.org/journals/mcom/1978-32-141/S0025-5718-1978-0468306-4/S0025-5718-1978-0468306-4.pdf
pSideSamples | Pointer a buffer of cSideSampleLimit (18) entries for cascade (Input/Output) |
pHybridOutput | Pointer a buffer of cSubBandLimit*cSideSampleLimit (32*18) entries for transform (Input/Output) |
pOutput | Pointer a buffer of cSideSampleLimit (18) entries for output |
pPrevious | Pointer to the previous output buffer of cSideSampleLimit (18) entries |
pBlockType | Pointer a 36 entry block type table |
|
extern |
36 entry DCT for MP3
Perform a 36 entry DCT for MP3 decoding
"On Computing the Discrete Fourier Transform", Mathematics of Computation, Volume 32, Number 141, January 1978, Pages 175-199 http://www.ams.org/journals/mcom/1978-32-141/S0025-5718-1978-0468306-4/S0025-5718-1978-0468306-4.pdf
pSideSamples | Pointer a buffer of cSideSampleLimit (18) entries for cascade (Input/Output) |
pHybridOutput | Pointer a buffer of cSubBandLimit*cSideSampleLimit (32*18) entries for transform (Input/Output) |
pOutput | Pointer a buffer of cSideSampleLimit (18) entries for output |
pPrevious | Pointer to the previous output buffer of cSideSampleLimit (18) entries |
pBlockType | Pointer a 36 entry block type table |
|
extern |
MP3 Discrete cosine transform function.
Discrete cosine transform applied to an 8*8 2 dimensional array for decoding audio for MP3.
The output arrays are written at a stride of 16 entries
pOutput1 | Pointer to a buffer with a minimum of 257 entries |
pOutput2 | Pointer to a buffer with a minimum of 257 entries |
pInput | Pointer to a 32 entry array of audio samples |
|
extern |
MP3 Fast Fourier (Hartley) transform.
https://en.wikipedia.org/wiki/Hartley_transform
Apply a Hartley transform optimized for either 256 or 1024 entry arrays using the MP3 FHT algorithm
pInput | Pointer to an array of terms to apply the FHT |
uCount | Either 256 or 1024 entries |
|
noexcept |
Allocate a class instance.
Allocate memory with Burger::Alloc(uintptr_t) and invoke the default constructor on it.
|
inlinenoexcept |
Calculate the length of a string that represents this hex integer.
A template to map an integral data type and calls the appropriate NumberHexStringLength function.
T | Input data type, tested with is_integral. |
input | Integral value to determine the string length if converted to hex ASCII. |
|
externnoexcept |
Calculate the length of a string that represents this hex integer.
Determine the number of characters are needed to convert the input value into a hexadecimal string. 32 bit integers have a minimum of one character to a maximum of 8 characters.
uInput | 32 bit unsigned integer to test. |
|
externnoexcept |
Calculate the length of a string that represents this hex integer.
Determine the number of characters are needed to convert the input value into a hexadecimal string. 64 bit integers have a minimum of one character to a maximum of 16 characters.
uInput | 64 bit unsigned integer to test. |
|
inlinenoexcept |
Calculate the length of a string that represents this octal integer.
A template to map an integral data type and calls the appropriate NumberOctalStringLength function.
T | Input data type, tested with is_integral. |
input | Integral value to determine the string length if converted to octal ASCII. |
|
externnoexcept |
Calculate the length of a string that represents this octal integer.
Determine the number of characters are needed to convert the input value into a octal string. 32 bit integers have a minimum of one character to a maximum of 11 characters.
uInput | 32 bit unsigned integer to test. |
|
externnoexcept |
Calculate the length of a string that represents this octal integer.
Determine the number of characters are needed to convert the input value into a octal string. 64 bit integers have a minimum of one character to a maximum of 22 characters.
uInput | 32 bit unsigned integer to test. |
|
externnoexcept |
Calculate the length of a string that represents this integer.
Determine the number of characters are needed to convert the input value into a string. 32 bit integers have a minimum of one character to a maximum of 10 characters and an extra character for a '-' for negative numbers which could be "-2147483648".
Example: 12345 will return 5, 1000 will return 4, 0 through 9 will return 1.
iInput | 32 bit signed integer to test. |
|
externnoexcept |
Calculate the length of a string that represents this integer.
Determine the number of characters are needed to convert the input value into a string. 64 bit integers have a minimum of one character to a maximum of 20 characters and an extra character for a '-' for negative numbers which could be "-9223372036854775808"
Example: 12345 will return 5, 1000 will return 4, 0 through 9 will return 1.
iInput | 64 bit signed integer to test. |
|
inlinenoexcept |
Calculate the length of a string that represents this integer.
A template to map an integral data type and calls the appropriate NumberStringLength function.
T | Input data type, tested with is_integral. |
input | Integral value to determine the string length if converted to ASCII. |
|
externnoexcept |
Calculate the length of a string that represents this integer.
Determine the number of characters are needed to convert the input value into a string. 32 bit integers have a minimum of one character to a maximum of 10 characters which could be "4294967295".
Example: 12345 will return 5, 1000 will return 4, 0 through 9 will return 1.
uInput | 32 bit unsigned integer to test. |
|
externnoexcept |
Calculate the length of a string that represents this integer.
Determine the number of characters are needed to convert the input value into a string. 64 bit integers have a minimum of one character to a maximum of 20 characters "18446744073709551615".
Example: 12345 will return 5, 1000 will return 4, 0 through 9 will return 1.
uInput | 32 bit unsigned integer to test. |
|
externnoexcept |
Convert a 64 bit float into ASCII.
Convert a 64 bit float into an ASCII string.
Examples:
dInput = 123.4567 -> "123.4567"
dInput = 123456.7 -> "123456.7"
dInput = -1.234567 -> "-1.234567"
dInput = -1234.567 -> "-1234.567"
pOutput | Pointer to a buffer to hold the converted integer. It has to be a minimum of 32 bytes in size. |
dInput | 64 bit float to convert to ASCII. |
uDigits | Number of digits to convert. Flags Burger::LEADINGZEROS and Burger::NOENDINGNULL can be added or or'd to this value to affect output. |
|
externnoexcept |
Convert a 32 bit float into ASCII.
Convert a 32 bit float into an ASCII string.
Examples:
fInput = 123.4567 -> "123.4567"
fInput = 123456.7 -> "123456.7"
fInput = -1.234567 -> "-1.234567"
fInput = -1234.567 -> "-1234.567"
pOutput | Pointer to a buffer to hold the converted integer. It has to be a minimum of 32 bytes in size. |
fInput | 32 bit float to convert to ASCII. |
uDigits | Number of digits to convert. Flags Burger::LEADINGZEROS and Burger::NOENDINGNULL can be added or or'd to this value to affect output. |
|
externnoexcept |
Convert a signed 32 bit integer into ASCII.
Convert a signed 32 bit integer into an ASCII string. The third parameter modifies how the data is formatted.
Burger::LEADINGZEROS will force leading zeros to be printed. Burger::NOENDINGNULL will disable the writing of a terminating zero character at the end of the string so an existing string can be modified without accidentally truncating it.
Examples:
uInput = 1234567, uDigits = 4 -> "4567"
uInput = 1234567, uDigits = 0 -> "1234567"
uInput = -1234567, uDigits = 4 -> "-4567"
uInput = -1234567, uDigits = 0 -> "-1234567"
uInput = 1234567, uDigits = Burger::LEADINGZEROS -> "0001234567"
uInput = 22, uDigits = Burger::LEADINGZEROS+4 -> "0022"
uInput = -22, uDigits = Burger::LEADINGZEROS+4 -> "-0022"
pOutput | Pointer to a buffer to hold the converted integer. It has to be with uDigits+1 or 12 bytes in size Whichever is appropriate. |
iInput | Signed 32 bit integer to convert to ASCII. |
uDigits | Number of digits to convert. Flags Burger::LEADINGZEROS and Burger::NOENDINGNULL can be added or or'd to this value to affect output. |
|
externnoexcept |
Convert a signed 64 bit integer into ASCII.
Convert a signed 64 bit integer into an ASCII string. You can modify how the data is formatted by passing a third parameter.
Burger::LEADINGZEROS will force leading zeros to be printed. Burger::NOENDINGNULL will disable the writing of a terminating zero character at the end of the string so you can modify the an existing string without accidentally truncating it.
Examples:
uInput = 1234567, uDigits = 4 -> "4567"
uInput = 1234567, uDigits = 0 -> "1234567"
uInput = -1234567, uDigits = 4 -> "-4567"
uInput = -1234567, uDigits = 0 -> "-1234567"
uInput = 1234567, uDigits = Burger::LEADINGZEROS -> "0001234567"
uInput = 22, uDigits = Burger::LEADINGZEROS+4 -> "0022"
uInput = -22, uDigits = Burger::LEADINGZEROS+4 -> "-0022"
pOutput | Pointer to a buffer to hold the converted integer. It has to be with uDigits+1 or 24 bytes in size Whichever is appropriate. |
iInput | Signed 64 bit integer to convert to ASCII. |
uDigits | Number of digits to convert. Flags Burger::LEADINGZEROS and Burger::NOENDINGNULL can be added or or'd to this value to affect output. |
|
inlinenoexcept |
|
inlinenoexcept |
|
externnoexcept |
Convert an unsigned 32 bit integer into ASCII.
Convert an unsigned 32 bit integer into an ASCII string. The third parameter modifies how the data is formatted.
Burger::LEADINGZEROS will force leading zeros to be printed. Burger::NOENDINGNULL will disable the writing of a terminating zero character at the end of the string so an existing string can be modified without accidentally truncating it.
Examples:
uInput = 1234567, uDigits = 4 -> "4567"
uInput = 1234567, uDigits = 0 -> "1234567"
uInput = 1234567, uDigits = Burger::LEADINGZEROS -> "0001234567"
uInput = 22, uDigits = Burger::LEADINGZEROS+4 -> "0022"
pOutput | Pointer to a buffer to hold the converted integer. It has to be with uDigits+1 or 12 bytes in size Whichever is appropriate. |
uInput | Unsigned 32 bit integer to convert to ASCII. |
uDigits | Number of digits to convert. Flags Burger::LEADINGZEROS and Burger::NOENDINGNULL can be added or or'd to this value to affect output. |
|
externnoexcept |
Convert an unsigned 64 bit integer into ASCII.
Convert an unsigned 64 bit integer into an ASCII string. You can modify how the data is formatted by passing a third parameter.
Burger::LEADINGZEROS will force leading zeros to be printed. Burger::NOENDINGNULL will disable the writing of a terminating zero character at the end of the string so you can modify the an existing string without accidentally truncating it.
Examples:
uInput = 1234567, uDigits = 4 -> "4567"
uInput = 1234567, uDigits = 0 -> "1234567"
uInput = 1234567, uDigits = Burger::LEADINGZEROS -> "0001234567"
uInput = 22, uDigits = Burger::LEADINGZEROS+4 -> "0022"
pOutput | Pointer to a buffer to hold the converted integer. It has to be with uDigits+1 or 24 bytes in size Whichever is appropriate. |
uInput | Unsigned 64 bit integer to convert to ASCII. |
uDigits | Number of digits to convert. Flags Burger::LEADINGZEROS and Burger::NOENDINGNULL can be added or or'd to this value to affect output. |
|
externnoexcept |
Convert a 64 bit floating point value into a hex string.
Store sixteen hex digits in the form of 0000000000000000 to a string buffer and append a terminating zero. Returns the pointer to the terminating zero so the calling function can continue writing to the output buffer as if it's a stream.
pOutput | Pointer to a buffer at least 17 bytes in size. |
dInput | 64 bit value to print in HEX to a string. |
|
externnoexcept |
Convert a 64 bit float into hexadecimal ASCII.
Convert a 64 bit float into a hexadecimal ASCII string. The third parameter modifies how the data is formatted.
Burger::LEADINGZEROS will force leading zeros to be printed. Burger::NOENDINGNULL will disable the writing of a terminating zero character at the end of the string so an existing string can be modified without accidentally truncating it.
pOutput | Pointer to a buffer to hold the converted integer. It has to be with uDigits+1 or 17 bytes in size, whichever is appropriate. |
dInput | 64 bit float to convert to hexadecimal ASCII. |
uDigits | Number of digits to convert. Flags Burger::LEADINGZEROS and Burger::NOENDINGNULL can be added or or'd to this value to affect output. |
|
externnoexcept |
Convert a 32 bit floating point value into a hex string.
Store eight hex digits in the form of 00000000 to a string buffer and append a terminating zero. Returns the pointer to the terminating zero so the calling function can continue writing to the output buffer as if it's a stream.
pOutput | Pointer to a buffer at least 9 bytes in size. |
fInput | 32 bit value to print in HEX to a string. |
|
externnoexcept |
Convert a 32 bit float into hexadecimal ASCII.
Convert a 32 bit float into a hexadecimal ASCII string. The third parameter modifies how the data is formatted.
Burger::LEADINGZEROS will force leading zeros to be printed. Burger::NOENDINGNULL will disable the writing of a terminating zero character at the end of the string so an existing string can be modified without accidentally truncating it.
pOutput | Pointer to a buffer to hold the converted integer. It has to be with uDigits+1 or 9 bytes in size, whichever is appropriate. |
fInput | 32 bit float to convert to hexadecimal ASCII. |
uDigits | Number of digits to convert. Flags Burger::LEADINGZEROS and Burger::NOENDINGNULL can be added or or'd to this value to affect output. |
|
inlinenoexcept |
Convert a integral value into a hex string.
A template to map an integral data type and calls the appropriate NumberToAsciiHex function.
T | Input data type, tested with is_integral. |
pOutput | Pointer to a buffer at least 17 bytes in size. |
input | Integral value to print in HEX to a string. |
|
inlinenoexcept |
Convert a integral value into a hex string.
A template to map an integral data type and calls the appropriate NumberToAsciiHex(char *, T, uint_t uDigits) function.
T | Input data type, tested with is_integral. |
pOutput | Pointer to a buffer at least 17 bytes in size. |
input | Integral value to print in HEX to a string. |
uDigits | Number of digits to convert. Flags Burger::LEADINGZEROS and Burger::NOENDINGNULL can be added or or'd to this value to affect output. |
|
externnoexcept |
Convert a 16 bit value into a hex string.
Store four hex digits in the form of 0000 to a string buffer and append a terminating zero. Returns the pointer to the terminating zero so the calling function can continue writing to the output buffer as if it's a stream.
pOutput | Pointer to a buffer at least 5 bytes in size. |
uInput | 16 bit value to print in HEX to a string. |
|
inlinenoexcept |
|
externnoexcept |
Convert a 32 bit value into a hex string.
Store eight hex digits in the form of 00000000 to a string buffer and append a terminating zero. Returns the pointer to the terminating zero so the calling function can continue writing to the output buffer as if it's a stream.
pOutput | Pointer to a buffer at least 9 bytes in size. |
uInput | 32 bit value to print in HEX to a string. |
|
externnoexcept |
Convert an unsigned 32 bit integer into hexadecimal ASCII.
Convert an unsigned 32 bit integer into a hexadecimal ASCII string. The third parameter modifies how the data is formatted.
Burger::LEADINGZEROS will force leading zeros to be printed. Burger::NOENDINGNULL will disable the writing of a terminating zero character at the end of the string so an existing string can be modified without accidentally truncating it.
Examples:
uInput = 0x1234BCD, uDigits = 4 -> "4BCD"
uInput = 0x1234BCD, uDigits = 0 -> "1234BCD"
uInput = 0x1234BCD, uDigits = Burger::LEADINGZEROS -> "01234BCD"
uInput = 0x2A, uDigits = Burger::LEADINGZEROS+4 -> "002A"
pOutput | Pointer to a buffer to hold the converted integer. It has to be with uDigits+1 or 9 bytes in size, whichever is appropriate. |
uInput | Unsigned 32 bit integer to convert to hexadecimal ASCII. |
uDigits | Number of digits to convert. Flags Burger::LEADINGZEROS and Burger::NOENDINGNULL can be added or or'd to this value to affect output. |
|
externnoexcept |
Convert a 64 bit value into a hex string.
Store sixteen hex digits in the form of 0000000000000000 to a string buffer and append a terminating zero. Returns the pointer to the terminating zero so the calling function can continue writing to the output buffer as if it's a stream.
pOutput | Pointer to a buffer at least 17 bytes in size. |
uInput | 64 bit value to print in HEX to a string. |
|
externnoexcept |
Convert an unsigned 64 bit integer into hexadecimal ASCII.
Convert an unsigned 64 bit integer into a hexadecimal ASCII string. The third parameter modifies how the data is formatted.
Burger::LEADINGZEROS will force leading zeros to be printed. Burger::NOENDINGNULL will disable the writing of a terminating zero character at the end of the string so an existing string can be modified without accidentally truncating it.
Examples:
uInput = 0x1234BCD, uDigits = 4 -> "4BCD"
uInput = 0x1234BCD, uDigits = 0 -> "1234BCD"
uInput = 0x1234BCD, uDigits = Burger::LEADINGZEROS -> "01234BCD"
uInput = 0x2A, uDigits = Burger::LEADINGZEROS+4 -> "002A"
pOutput | Pointer to a buffer to hold the converted integer. It has to be with uDigits+1 or 17 bytes in size, whichever is appropriate. |
uInput | Unsigned 64 bit integer to convert to hexadecimal ASCII. |
uDigits | Number of digits to convert. Flags Burger::LEADINGZEROS and Burger::NOENDINGNULL can be added or or'd to this value to affect output. |
|
externnoexcept |
Convert an 8 bit value into a hex string.
Store two hex digits in the form of 00 to a string buffer and append a terminating zero. Returns the pointer to the terminating zero so the calling function can continue writing to the output buffer as if it's a stream.
pOutput | Pointer to a buffer at least 3 bytes in size. |
uInput | 8 bit value to print in HEX to a string. |
|
inlinenoexcept |
|
externnoexcept |
Display a dialog box.
On platforms that support pop up dialogs, display a dialog that has an "Okay" button
On platforms that do not support pop up dialogs, the messages are logged
pMessage | Message to print in the center of the dialog box |
pTitle | Pointer to "C" string or nullptr for a message in the title bar |
|
externnoexcept |
Display a dialog to alert the user of a possible error condition or message.
On platforms that support pop up dialogs, display a dialog that has two buttons, one for "Okay" and another for "Cancel"
On platforms that do not support pop up dialogs, the messages are logged and FALSE (Cancel) is always returned
pMessage | Pointer to "C" string with the message that asks a question that can be answered with Okay or Cancel |
pTitle | Pointer to "C" string or NULL for a message in the title bar |
|
externnoexcept |
Open a file with OpenDeny modes.
If the file system supports it, open a data fork using PBHOpenDenySync(), otherwise emulate the behavior using older APIs.
pFSSpec | FSSpec for the file to open |
sDenyModes | OpenDeny modes requested |
pRefNum | Pointer to receive the open file reference |
|
externnoexcept |
Open a file with OpenDeny modes.
If the file system supports it, open a data fork using PBHOpenDenySync(), otherwise emulate the behavior using older APIs.
svRefNum | Volume the file resides on |
lDirID | Directory ID the file resides on |
pFilename | Pointer to a PASCAL string of the filename |
sDenyModes | OpenDeny modes requested |
pRefNum | Pointer to receive the open file reference |
|
externnoexcept |
Open a resource fork with OpenDeny modes.
If the file system supports it, open a resource fork using PBHOpenRFDenySync(), otherwise emulate the behavior using older APIs.
pFSSpec | FSSpec for the file to open |
sDenyModes | OpenDeny modes requested |
pRefNum | Pointer to receive the open file reference |
|
externnoexcept |
Open a resource fork with OpenDeny modes.
If the file system supports it, open a resource fork using PBHOpenRFDenySync(), otherwise emulate the behavior using older APIs.
svRefNum | Volume the file resides on |
lDirID | Directory ID the file resides on |
pFilename | Pointer to a PASCAL string of the filename |
sDenyModes | OpenDeny modes requested |
pRefNum | Pointer to receive the open file reference |
|
inlinenoexcept |
Allocators are always equal.
|
inlinenoexcept |
Allocators are always equal.
|
extern |
Convert a float in the range of 0.999999 to -0.999999 into a 16 bit packed integer.
Apply compression to a floating point number in the range of 0.999999 to -0.999999 and create a 16 bit version. The input will be clamped.
Use Burger::Unpack16ToFloat(int16_t) to reconstruct the number.
Result == 0 if the input was zero or too small to be represented. Result & 0x8000 if the input was negative. (Result>>11)&0xF The exponent where 0 = 111 and 15 = 126. (Result&0x7FF) The 11 bit mantissa.
fInput | Floating point number in the range of 0.999999 to -0.999999 |
|
extern |
Convert a float in the range of a supplied exponent into a 16 bit packed integer.
Apply compression to a floating point number in the range of 0.999999 to -0.999999 and create a 16 bit version. The input will be clamped.
Use Burger::Unpack16ToFloat(int16_t,uint32_t) to reconstruct the number.
Result == 0 if the input was zero or too small to be represented. Result & 0x8000 if the input was negative. (Result>>11)&0xF The exponent where 0 = BaseExponent and 15 = BaseExponent+15. (Result&0x7FF) The 11 bit mantissa.
fInput | Floating point number in the range of the supplied exponent. |
uBaseExponent | Minimum acceptable exponent, (111 is used for a max value of 0.999999). |
|
externnoexcept |
Parse a "C" string until a zero or EOL.
Follow a stream of text input until either a zero is found or an End Of Line is found.
If a zero is found, return a pointer to the ZERO.
If an EOL is found, return a pointer to the text BEYOND the EOL which is a "\n" (10) or a "\r" (13). In the case of a CR/LF combination, found in PC style text files, return the pointer beyond the pair.
pInput | Pointer to a "C" string to parse. nullptr will page fault. |
|
externnoexcept |
Parse a "C" string until a zero or EOL or out of data.
Follow a stream of text input until either a zero is found, an End Of Line is found or data ran out.
If a zero is found, return a pointer to the ZERO.
If an EOL is found, return a pointer to the text BEYOND the EOL which is a "\n" (10) or a "\r" (13). In the case of a CR/LF combination, found in PC style text files, return the pointer beyond the pair.
pInput | Pointer to a string to parse. nullptr will page fault. |
uLength | Length of the string buffer. |
|
externnoexcept |
Parse a "C" string until a non-white space character is found.
Skip over any space (32) or tab (9) character and return the pointer to the first character that doesn't match.
pInput | Pointer to a "C" string to parse. nullptr will page fault. |
|
externnoexcept |
Parse out a quoted string.
If the first character of the string is a quote "\"" (0x22) or "'", then parse out a quote delimited string. This function will parse double quotes ("" or '') as a single quote to be inserted into the string. Whichever was the first quote character found, that will be the quote character to be used for the double quote and end quote parser making the alternate quote treated as a normal character.
If the first character is 0 or whitespace, return pInput to signal an error condition.
If the first character isn't a quote, 0 or whitespace, parse the string until another whitespace character is found.
All tabs (\t) in a quoted string are converted into spaces.
All strings terminate if a 0 or EOL (\r, \r\n, \n) sequence is found. If this type of terminator is found, the returned pointer will point to the terminating character (Except in the case of \r\n, where it will point at the \n character).
If the output buffer isn't large enough to hold the resulting string, truncate the output to fit. The output will always be zero terminated in all cases.
pOutput | Pointer to the output string. nullptr is acceptable if uOutputSize is zero. |
uOutputSize | Size of the output string buffer in bytes. |
pInput | Pointer to a "C" string that has a '"' as the first character. nullptr will page fault. |
|
externnoexcept |
Return a pointer to whitespace, CR, LF or zero.
Parse a string until a whitespace, CR, LF or zero is found. Return the pointer at the point where the requested character is. Useful in parsing a token and finding the end of it.
pInput | Pointer to a "C" string to parse. nullptr will page fault. |
|
externnoexcept |
Convert platform error code to a Burgerlib error code.
Take a native platform error code and convert it to a Burgerlib equivalent error code.
iNativeError | MacOS OSErr or OSStatus, Windows HRESULT error code |
|
externnoexcept |
Round up a 64 bit float to the nearest power of 2.
Take an arbitrary value and round it up to the nearest power of 2.
If the input is 5 to 7, the function returns 8. NaN, infinity, or numbers that are already powers of two are returned unchanged. Zero will return NaN.
dInput | Float value to round up |
|
externnoexcept |
Round up a 32 bit float to the nearest power of 2.
Take an arbitrary value and round it up to the nearest power of 2.
If the input is 5 to 7, the function returns 8. NaN, infinity, or numbers that are already powers of two are returned unchanged. Zero will return NaN.
fInput | Float value to round up |
|
inlinenoexcept |
Round up an integer to the nearest power of 2.
A template to take an arbitrary value and round it up to the nearest power of 2. Zero will return zero.
T | Input data type, tested with is_unsigned. |
input | Integer value to round up |
|
externnoexcept |
Round up an integer to the nearest power of 2.
Take an arbitrary value and round it up to the nearest power of 2 If the input is 0x40000001 to 0x7FFFFFFF, the function returns 0x80000000 0x80000000-0xFFFFFFFF is an overflow and returns zero. Zero will return zero
uInput | Integer value to round up |
|
externnoexcept |
Round up an integer to the nearest power of 2.
Take an arbitrary value and round it up to the nearest power of 2 If the input is 0x4000000000000001 to 0x7FFFFFFFFFFFFFFF, the function returns 0x8000000000000000 0x8000000000000000-0xFFFFFFFFFFFFFFFF is an overflow and returns zero. Zero will return zero
uInput | Integer value to round up |
|
externnoexcept |
Determine if a destination volume has free file space.
Given a file, check how much space it currently is occupying on the drive. Then, check the destination volume if there is enough free space to receive a copy of the source file.
svRefNumSource | Volume reference number of the source file |
lDirIDSource | Parent ID of the source file |
pFilenameSource | Pointer to a Pascal string for the source file |
pVolumenameDest | Pointer to a Pascal string of the dest volume |
svRefNumDest | Volume reference number of the destination volume |
pbSpaceAvailable | Pointer to a variable to receive the answer |
|
externnoexcept |
printf() clone
Return value is the number of characters transmitted, or a negative value indicating an error occurred during the attempt.
pFormat | Pointer to a "C" format string |
uArgCount | Number of arguments in the argument array |
ppArgs | Argument array, can be NULL if uArgCount is zero |
|
inlinenoexcept |
Print a char in hex to standard out.
iInput | char to print in HEX to stdout |
|
externnoexcept |
Print a 64 bit floating point number in hex to standard out.
Print sixteen hex digits in the form of 0000000000000000 to stdout
dInput | 64 bit floating point number to print in HEX to stdout |
|
externnoexcept |
Print a 32 bit floating pointer number in hex to standard out.
Print eight hex digits in the form of 00000000 to stdout
fInput | Floating point number to print in HEX to stdout |
|
inlinenoexcept |
Print an integer in hex to standard out.
iInput | integer to print in HEX to stdout |
|
inlinenoexcept |
Print a long integer in hex to standard out.
iInput | long integer to print in HEX to stdout |
|
inlinenoexcept |
Print a long long integer in hex to standard out.
iInput | long integer to print in HEX to stdout |
|
inlinenoexcept |
Print a short in hex to standard out.
iInput | short to print in HEX to stdout |
|
inlinenoexcept |
Print a signed char in hex to standard out.
iInput | signed char to print in HEX to stdout |
|
externnoexcept |
Print a 16 bit value in hex to standard out.
Print four hex digits in the form of 0000 to stdout
uInput | 16 bit value to print in HEX to stdout |
|
externnoexcept |
Print a 32 bit value in hex to standard out.
Print eight hex digits in the form of 00000000 to stdout
uInput | 32 bit value to print in HEX to stdout |
|
externnoexcept |
Print a 64 bit value in hex to standard out.
Print sixteen hex digits in the form of 0000000000000000 to stdout
uInput | 64 bit value to print in HEX to stdout |
|
externnoexcept |
Print an 8 bit value in hex to standard out.
Print two hex digits in the form of 00 to stdout
uInput | 8 bit value to print in HEX to stdout |
|
inlinenoexcept |
Print an unsigned integer in hex to standard out.
uInput | unsigned integer to print in HEX to stdout |
|
inlinenoexcept |
Print an unsigned long integer in hex to standard out.
uInput | unsigned long integer to print in HEX to stdout |
|
inlinenoexcept |
Print a wchar_t in hex to standard out.
uInput | wchar_t to print in HEX to stdout |
|
externnoexcept |
Print a hex character to standard out.
Print a single hex digit from the lowest 4 bits of the input value to stdout
uInput | Integer value (Only lowest 4 bits used) to print in HEX to stdout |
|
externnoexcept |
Convert a Pascal string into a "C" string.
Copy a Pascal string and convert it into a "C" style string. A byte will denote the length, followed by the text itself. There will be text followed by a terminating zero in the new string.
The destination and the source pointer can contain the same value. This function allows in buffer data conversion.
|
extern |
Read a big endian 16-bit integer from a file.
Given an ANSI FILE *, read a 16-bit integer in big endian format from the file stream.
fp | FILE * to the stream to read from. |
|
extern |
Read a big endian 32-bit integer from a file.
Given an ANSI FILE *, read a 32-bit integer in big endian format from the file stream.
fp | FILE * to the stream to read from. |
|
extern |
Read a "C" string with the terminating zero to a file stream.
Given an ANSI FILE *, read a "C" string with a terminating zero into the file stream. If the string read is larger than the buffer, it is truncated. The buffer will have an ending zero on valid read or a truncated read. If uLength was zero, then pInput can be NULL
fp | FILE * to the stream to write to. |
pInput | Pointer to a "C" string to write. |
uLength | Size of the buffer (To prevent overruns) |
|
extern |
Read a little endian 16-bit integer from a file.
Given an ANSI FILE *, read a 16-bit integer in little endian format from the file stream.
fp | FILE * to the stream to read from. |
|
extern |
Read a little endian 32-bit integer from a file.
Given an ANSI FILE *, read a 32-bit integer in little endian format from the file stream.
fp | FILE * to the stream to read from. |
|
extern |
Read a big endian 64-bit float from a file.
Given an ANSI FILE *, read a 64-bit float in big endian format from the file stream.
fp | FILE * to the stream to read from. |
|
extern |
Read a big endian 32-bit float from a file.
Given an ANSI FILE *, read a 32-bit float in big endian format from the file stream.
fp | FILE * to the stream to read from. |
|
extern |
Read a big endian 64-bit integer from a file.
Given an ANSI FILE *, read a 64-bit integer in big endian format from the file stream.
fp | FILE * to the stream to read from. |
|
extern |
Read a little endian 64-bit float from a file.
Given an ANSI FILE *, read a 64-bit float in little endian format from the file stream.
fp | FILE * to the stream to read from. |
|
extern |
Read a little endian 32-bit float from a file.
Given an ANSI FILE *, read a 32-bit float in little endian format from the file stream.
fp | FILE * to the stream to read from. |
|
extern |
Read a little endian 64-bit integer from a file.
Given an ANSI FILE *, read a 64-bit integer in little endian format from the file stream.
fp | FILE * to the stream to read from. |
|
externnoexcept |
Reallocate previously allocated memory.
Reallocate memory using the Burger::GlobalMemoryManager. If the new buffer is smaller, the data is truncated. If the new buffer is larger, the extra memory is not initialized.
pInput | Pointer to memory to reallocate. nullptr assumes no memory to copy from. |
uSize | New size of the buffer. |
|
externnoexcept |
Remove a character from the end of a string if present.
Parse to the end of the string. If the last character is a match to uRemove, it's zeroed out, effectively removing it. This function is a convenience routine used to get rid of a trailing ':' or '/' mark from a directory path.
pInput | Pointer to the "C" string to scan. nullptr will page fault. |
uRemove | character to test the last char with (Range 0-255). |
|
externnoexcept |
Convert characters in a string from one to another.
Convert any character that matches the uFrom value into the uTo value.
pInput | Pointer to the "C" string to perform the fix up on. nullptr will page fault. |
uFrom | Value to compare with. |
uTo | Value to replace matching values with. |
|
externnoexcept |
Convert characters in a string from one to another.
Convert any character that matches the uFrom value into the uTo value.
pOutput | Pointer to a buffer large enough to hold the converted "C" string. |
pInput | Pointer to the "C" string to perform the fix up on. nullptr will page fault. |
uFrom | Value to compare with. |
uTo | Value to replace matching values with. |
|
externnoexcept |
Reverse a singly linked list.
Traverse a singly linked list and reverse the linkage so that the order of the entries are in the opposite order.
pRoot | Pointer to the ForwardLink that is the head of the list. |
|
inlinenoexcept |
Rotate the bits left.
Using a compiler intrinsic where supported, rotate the bits in the 32 bit register to the left.
uInput | Value to rotate left |
uShiftCount | 0 to 31, number of bits to shift. |
|
inlinenoexcept |
Rotate the bits left.
Using a compiler intrinsic where supported, rotate the bits in the 64 bit register to the left.
uInput | Value to rotate left |
uShiftCount | 0 to 63, number of bits to shift. |
|
inlinenoexcept |
Rotate the bits right.
Using a compiler intrinsic where supported, rotate the bits in the 32 bit register to the right.
uInput | Value to rotate right |
uShiftCount | 0 to 31, number of bits to shift. |
|
inlinenoexcept |
Rotate the bits right.
Using a compiler intrinsic where supported, rotate the bits in the 64 bit register to the right.
uInput | Value to rotate right |
uShiftCount | 0 to 63, number of bits to shift. |
|
externnoexcept |
Return a floating point number rounded to zero.
If there is any fraction, round the value to the whole integer towards zero
dInput | 64 bit floating point value to round to zero. |
|
externnoexcept |
Return a floating point number rounded to zero.
If there is any fraction, round the value to the whole integer towards zero
fInput | 32 bit floating point value to round to zero. |
|
extern |
Save memory to a file opened with fopen()
Given an ANSI FILE * for a freshly opened file with write permissions, write the chunk of memory to the file and close the file. The passed pointer is considered invalid and closed after this call is issued.
fp | FILE * to the file to write to |
pInput | Pointer to the memory to write to |
uLength | Number of bytes to write |
|
externnoexcept |
Hash data using the sdbm (Service Data Base Management) algorithm.
This algorithm was created for sdbm (a public-domain reimplementation of ndbm) database library.
It was found to do well in scrambling bits, causing better distribution of the keys and fewer splits. it also happens to be a good general hashing function with good distribution. the actual function is hash(i) = hash(i - 1) * 65599 + str[i];
Further reading: http://www.cs.yorku.ca/~oz/hash.html#sdbm
pInput | Pointer to the data to hash |
uInputCount | Number of bytes of data to hash |
uHashSeed | Value to seed the hash with. |
|
externnoexcept |
Hash string data using forced lower case with the sdbm (Service Data Base Management) algorithm.
This algorithm was created for sdbm (a public-domain reimplementation of ndbm) database library.
It was found to do well in scrambling bits, causing better distribution of the keys and fewer splits. it also happens to be a good general hashing function with good distribution. the actual function is hash(i) = hash(i - 1) * 65599 + str[i];
Further reading: http://www.cs.yorku.ca/~oz/hash.html#sdbm
pInput | Pointer to the data to hash |
uInputCount | Number of bytes of data to hash |
uHashSeed | Value to seed the hash with. |
|
externnoexcept |
Case insensitive SDBM (Service Data Base Management) hash callback for HashMapShared.
Invoke the SDBM (Service Data Base Management) hashing algorithm on the contents of a class using the default seed value and convert all upper case characters into lower case.
pData | Pointer to a data chunk to hash |
uDataSize | Size of the data chunk in bytes |
|
externnoexcept |
SDBM (Service Data Base Management) hash callback for HashMapShared.
Invoke the SDBM (Service Data Base Management) hashing algorithm on the contents of a class using the default seed value.
pData | Pointer to a data chunk to hash |
uDataSize | Size of the data chunk in bytes |
|
externnoexcept |
Separate integer and fractional values from floating point number.
Given an FPInfo class instance, extract the integer and the fractional components of a floating point number and store the values into separate FPLargeInt classes.
pIntegerPart | Pointer to the output integer record |
pFractionalPart | Pointer to the output fractional record |
pFPInfo | Pointer to the input FPInfo record |
|
externnoexcept |
Change the floating point precision.
On Intel 32 bit processors, there's a special floating point register to control the precision of the 80387 compatible FPU. This function allows the modification of this register for FPU precision. Lower precision yields more speed.
uInput | New enumeration state |
|
externnoexcept |
Change the floating point precision.
On Intel 32 bit processors, there's a special floating point register to control the rounding of the 80387 compatible FPU. This function allows the modification of this register for FPU rounding.
uInput | New enumeration state |
|
externnoexcept |
Set the current debug tracing flag.
Several subsystems perform perform code that may or may not interfere with higher level code. This flag enables and/or disables these features.
uHintFlags | The hint flags. Generate it with eHintFlags enumerations. |
|
externnoexcept |
Change the SSE floating point precision.
On Intel processors with SSE, there's a special floating point register to control the rounding of the SSE FPU. This function allows the modification of this register for FPU rounding, denormal zeroing, and other exceptions.
Examples of flags to set or clear
uOrFlags | Flags to set in the MXCSR |
uAndFlags | Flags to clear in the MXCSR |
|
extern |
Change the floating point precision.
On PowerPC processors, there's a special floating point register to control the rounding. This function allows the modification of this register for FPU rounding.
uInput | New enumeration state |
|
externnoexcept |
Set the execution priority of a thread.
Set the execution priority of any thread using a ThreadID.
If kErrorNotSupportedOnThisPlatform is returned, this feature is not supported.
|
externnoexcept |
Set the current debug tracing flag.
Several subsystems perform diagnostic logging and this flag enables and/or disables these features.
uTraceFlags | The trace flags. Generate it with eTraceFlags enumerations. |
|
extern |
Force an ANSI FILE * to binary mode.
If the "C" standard library supports it, change the mode for an open FILE * to binary
fp | FILE * to the file to read from |
|
extern |
Convert a Windows HCURSOR for DirectX9.
Convert a HCURSOR into a DirectX 9 surface and set up DirectX to use this surface as a cursor. Hot spots are retained.
pDirect3DDevice9 | Pointer to the current Direct3D 9 device |
hCursor | HCURSOR object to convert |
|
externnoexcept |
Set an environment string.
On systems that support it, set or create an environment variable.
The string will be properly converted from UTF8 into the operating system's native character encoding.
pKey | Pointer to a "C" string of the environment variable name |
pInput | Pointer to a "C" string of the environment variable value or nullptr to remove the variable |
|
externnoexcept |
Replace the text after the last period for filename extensions.
A string is scanned until the last period is found. The text beyond the final period is discarded and the string pointed by pNewExtension is appended to the Input filename. If no final period is found, then a period is appended and then the new extension is added. If NewExtension has a period as the first character, it will be ignored to prevent a double period from occurring in the final string.
You must guarantee that the Input buffer has enough space to accommodate the new extension. This routine will not check for buffer overruns.
Examples: "Foo.txt" + "gif" = "Foo.gif", "Foo" + "gif" = "Foo.gif", "Foo.txt" + nullptr = "Foo", "Foo.bin" + ".txt" = "Foo.txt".
pInput | Pointer to the "C" string to scan. nullptr will page fault. This will be modified with the new file extension. NewExtension = Pointer to a "C" string with the extension to apply. |
pNewExtension | Pointer to a "C" string that represents the new extension. A nullptr or empty string will have the existing extension stripped. |
|
extern |
Decompress data using Deflate compression.
Using the Deflate (ZLIB) compression algorithm, decompress the data in one pass
pOutput | Pointer to the buffer to accept the decompressed data |
uOutputChunkLength | Number of bytes in the output buffer |
pInput | Pointer to data to compress |
uInputChunkLength | Number of bytes in the data to decompress |
|
extern |
Decompress data using RLE compression.
Using the RLE compression algorithm, decompress the data in one pass
pOutput | Pointer to the buffer to accept the decompressed data |
uOutputChunkLength | Number of bytes in the output buffer |
pInput | Pointer to data to compress |
uInputChunkLength | Number of bytes in the data to decompress |
|
extern |
|
externnoexcept |
Return the sine from radians.
Use the fsin instruction to generate sine. Will loop in cases where overflow is detected.
dInput | Value in Radians |
|
externnoexcept |
Return the sine from radians.
Use the fsin instruction to generate sine. Will loop in cases where overflow is detected.
fInput | Value in Radians |
|
externnoexcept |
|
externnoexcept |
Convert all forward and back slashes to colons.
Burgerlib uses colons as directory separators. This function will take Unix ('\') and Windows ('/') style slashes and convert them into colons.
pOutput | Pointer to a buffer large enough to contain the new string |
pInput | Pointer to the "C" string to perform the fix up. nullptr will page fault. |
|
externnoexcept |
|
externnoexcept |
Convert all back slashes ('\') to forward slashes ('/').
Linux and MacOSX uses forward slashes as directory separators. This function will take Windows slashes and convert them into Unix style slashes.
pOutput | Pointer to a buffer large enough to hold the converted "C" string. |
pInput | Pointer to the "C" string to perform the fix up on. nullptr will page fault. |
|
externnoexcept |
|
externnoexcept |
Convert all forward slashes ('/') to back slashes ('\').
Windows uses backslashes as directory separators. This function will take Unix style slashes and convert them into Windows slashes.
pOutput | Pointer to a buffer large enough to hold the converted "C" string. |
pInput | Pointer to the "C" string to perform the fix up on. nullptr will page fault. |
|
externnoexcept |
Sleep the current thread.
On multithreaded systems, if kSleepYield is passed to this function it will yield the thread's remaining time quantum.
If kSleepInfinite is passed then the thread will sleep forever unless an Remote Procedure Call or an I/O event occurs. Otherwise, pass the number of milliseconds that are desired for the thread to sleep. Zero is mapped to kSleepYield.
If bAlertable is FALSE, the pause will not be interruptable.
uMilliseconds | kSleepYield, kSleepInfinite or number of non-zero milliseconds to sleep |
bAlertable | TRUE if the sleep can be interrupted |
|
externnoexcept |
snprintf() clone
Return value is the number of characters to be written if the buffer is sufficiently large to hold the entire formatted output, or a negative value indicating an error occurred during the attempt.
pOutput | Pointer to the output buffer |
uOutputSize | Size of the output buffer in bytes |
pFormat | Pointer to a "C" format string |
uArgCount | Number of arguments in the argument array |
ppArgs | Argument array, can be NULL if uArgCount is zero |
|
externnoexcept |
Set a posix socket to blocking mode.
Given a valid socket from a BSD socket library, mark it as blocking.
uSocket | SOCKET from windows or socket from BSD socket systems |
|
externnoexcept |
Set a posix socket to non-blocking mode.
Given a valid socket from a BSD socket library, mark it as blocking.
uSocket | SOCKET from windows or socket from BSD socket systems |
|
externnoexcept |
Test a posix socket if there's pending data.
Given a valid socket from a BSD socket library, test it if there's data pending. Return an error if the socket is disconnected.
uSocket | SOCKET from windows or socket from BSD socket systems |
|
externnoexcept |
sprintf() clone
Return value is the number of characters written to the buffer, or a negative value indicating an error occurred during the attempt.
pOutput | Pointer to a buffer large enough to accept the output string |
pFormat | Pointer to a "C" format string |
uArgCount | Number of arguments in the argument array |
ppArgs | Argument array, can be NULL if uArgCount is zero |
|
externnoexcept |
Print into a buffer that a callback allocates.
Version of sprintf that calls back to an allocator to get the output buffer AFTER* validating the formatting and determining the required size. A null terminator written to the end of the output is optional requested by the caller.
pCallback | Pointer to a callback function |
pContext | Pointer to data the callback function requires, can be NULL |
bAddNull | TRUE if a 0 should be appended to the end of the string, FALSE if not. |
pFormat | Pointer to a "C" format string |
uArgCount | Number of arguments in the argument array |
ppArgs | Argument array, can be NULL if uArgCount is zero |
|
extern |
Get the square root of a Fixed32.
Return the square root of a Fixed32 and return the integer result. The maximum value is 255.998 (256) for the square root of 0x7FFFFFFF. This routine is 100% accurate.
Negative numbers will return zero for the result.
fInput | Value to return the square root of. |
|
inlineconstexprnoexcept |
Return the square of the input.
Square the number and return the result.
dInput | Value to square |
|
inlineconstexprnoexcept |
Return the square of the input.
Square the number and return the result.
fInput | Value to square |
|
externnoexcept |
Get the square root value of a double.
Return the square root of the floating point input. This is usually done by inline assembly.
dInput | A valid double precision floating point number. |
|
extern |
Get the square root of a Fixed32.
Return the square root of a Fixed32 and return the Fixed32 result. The maximum value is 255.998 (256) for the square root of 0x7FFFFFFF. This routine is 100% accurate.
Negative numbers will return zero for the result.
fInput | Value to return the square root of. |
|
externnoexcept |
Get the square root value of a float.
Return the square root of the floating point input.
This is usually done by inline assembly.
fInput | A valid single precision floating point number. |
|
extern |
Get the square root of an integer.
Return the square root of an integer. The maximum value is 46341 for the square root of 0x7FFFFFFF. This routine is 100% accurate.
uInput | Value to return the square root of. |
|
externnoexcept |
Compare two "C" strings for equality, case insensitive.
Given pointers to two "C" strings, compare them for equality by using a subtraction of the first buffer to the second. If the subtraction's result is non-zero, sign extend the result and return it immediately. If both buffers are identical, return zero. If the characters in the string are upper case, convert them to ASCII lowercase before the subtraction.
pInput1 | Pointer to the first "C" string to subtract from. |
pInput2 | Pointer to the second "C" string to subtract with. |
|
externnoexcept |
Compare two "C" strings for equality, case insensitive, length delimited.
Given pointers to two "C" strings, compare them for equality by using a subtraction of the first buffer to the second. If the subtraction's result is non-zero, sign extend the result and return it immediately. If both buffers are identical, return zero. If the characters in the string are upper case, convert them to ASCII lowercase before the subtraction.
The function determines equality by hitting a zero first or the maximum allowed length.
pInput1 | Pointer to the first "C" string to subtract from. |
pInput2 | Pointer to the second "C" string to subtract with. |
uMaxLength | Maximum number of bytes to check |
|
externnoexcept |
Locate a substring, case insensitive.
Returns a pointer to the first occurrence of pTest in pInput, or a nullptr pointer if pTest is not part of pInput.
The case insensitive matching process does not include the terminating null-characters, but it stops there.
pInput | Pointer to the string to scan |
pTest | Pointer to the substring to look for |
|
externnoexcept |
Locate a substring, case insensitive (UTF-16 version)
Returns a pointer to the first occurrence of pTest in pInput, or a nullptr pointer if pTest is not part of pInput.
The case insensitive matching process does not include the terminating null-characters, but it stops there.
pInput | Pointer to the string to scan |
pTest | Pointer to the substring to look for |
|
externnoexcept |
Scan for the first occurrence of a specific character.
Returns a pointer to the first occurrence of the character iChar in the string pInput or nullptr if the character was not found
pInput | Pointer to a "C" string to scan |
iChar | Character to scan for |
|
externnoexcept |
Scan for the first occurrence of a specific character.
Returns a pointer to the first occurrence of the character uChar in the string pInput or nullptr if the character was not found
pInput | Pointer to a "C" string to scan |
uChar | Character to scan for |
|
externnoexcept |
Scan for the last occurrence of a specific character.
Returns a pointer to the last occurrence of the character iChar in the string pInput or nullptr if the character was not found
pInput | Pointer to a "C" string to scan |
iChar | Character to scan for |
|
externnoexcept |
Scan for the last occurrence of a specific character.
Returns a pointer to the last occurrence of the character uChar in the string pInput or nullptr if the character was not found
pInput | Pointer to a "C" string to scan |
uChar | Character to scan for |
|
externnoexcept |
Compare two "C" strings for equality.
Given pointers to two "C" strings, compare them for equality by using a subtraction of the first buffer to the second. If the subtraction's result is non-zero, sign extend the result and return it immediately. If both buffers are identical, return zero.
pInput1 | Pointer to the first "C" string to subtract from. |
pInput2 | Pointer to the second "C" string to subtract with. |
|
externnoexcept |
Compare two "C" strings for equality, case sensitive, length delimited.
Given pointers to two "C" strings, compare them for equality by using a subtraction of the first buffer to the second. If the subtraction's result is non-zero, sign extend the result and return it immediately. If both buffers are identical, return zero.
The function determines equality by hitting a zero first or the maximum allowed length.
pInput1 | Pointer to the first "C" string to subtract from. |
pInput2 | Pointer to the second "C" string to subtract with. |
uMaxLength | Maximum number of bytes to check |
|
externnoexcept |
Compare two 16 bit "C" strings for equality.
Given pointers to two 16 bit "C" strings, compare them for equality by using a subtraction of the first buffer to the second. If the subtraction's result is non-zero, sign extend the result and return it immediately. If both buffers are identical, return zero.
pInput1 | Pointer to the first 16 bit "C" string to subtract from. |
pInput2 | Pointer to the second 16 bit "C" string to subtract with. |
|
externnoexcept |
Compare two 16 bit "C" strings for equality, case sensitive, length delimited.
Given pointers to two 16 bit "C" strings, compare them for equality by using a subtraction of the first buffer to the second. If the subtraction's result is non-zero, sign extend the result and return it immediately. If both buffers are identical, return zero.
The function determines equality by hitting a zero first or the maximum allowed length.
pInput1 | Pointer to the first 16 bit "C" string to subtract from. |
pInput2 | Pointer to the second 16 bit "C" string to subtract with. |
uMaxLength | Maximum number of bytes to check |
|
externnoexcept |
Concatenate a "C" string with another "C" string.
Given a pointer to a "C" string, append it to a destination buffer that contains a valid "C" string. No bounds checking is performed.
This is the equivalent to strcat()
pOutput | Pointer to the buffer of a valid "C" string to be appended. |
pInput | Pointer to the buffer with the "C" to copy from. |
|
externnoexcept |
Concatenate a "C" string with another "C" string bounds checked.
Given a pointer to a "C" string, append it to a destination buffer that contains a valid "C" string. If the destination buffer isn't big enough for the input string, truncate it.
pOutput | Pointer to the buffer of a valid "C" string to be appended. |
uOutputSize | Size in bytes of the output buffer |
pInput | Pointer to the buffer with the "C" to copy from. |
|
externnoexcept |
Concatenate a "C" string with a string buffer, bounds checked.
Given a pointer to a string buffer, append it to a destination buffer that contains a valid "C" string. If the destination buffer isn't big enough for the input string, truncate it.
pOutput | Pointer to the buffer of a valid "C" string to be appended. |
uOutputSize | Size in bytes of the output buffer |
pInput | Pointer to the buffer with the string to copy from. |
uInputSize | Size in bytes of the input buffer |
|
externnoexcept |
Concatenate a 16 bit "C" string with another 16 bit "C" string.
Given a pointer to a 16 bit "C" string, append it to a destination buffer that contains a valid 16 bit "C" string. No bounds checking is performed.
This is the equivalent to wstrcat()
pOutput | Pointer to the buffer of a valid 16 bit "C" string to be appended. |
pInput | Pointer to the buffer with the 16 bit "C" to copy from. |
|
externnoexcept |
Concatenate a 16 bit "C" string with another 16 bit "C" string bounds checked.
Given a pointer to a 16 bit "C" string, append it to a destination buffer that contains a valid 16 bit "C" string. If the destination buffer isn't big enough for the input string, truncate it.
pOutput | Pointer to the buffer of a valid 16 bit "C" string to be appended. |
uOutputSize | Size in bytes of the output buffer |
pInput | Pointer to the buffer with the 16 bit "C" to copy from. |
|
externnoexcept |
Copy a "C" string.
Given a pointer to a "C" string, copy it to a destination buffer. This is a functional equivalent to strcpy().
pOutput | Pointer to the buffer to get the copy. |
pInput | Pointer to the buffer with the "C" to copy from. |
|
externnoexcept |
Copy a "C" string with bounds checking.
Given a pointer to a "C" string, copy it to a destination buffer. If the destination buffer isn't big enough for the input string, truncate it.
pOutput | Pointer to the buffer to get the copy. |
uOutputSize | Size in bytes of the output buffer |
pInput | Pointer to the buffer with the "C" to copy from. |
|
externnoexcept |
Copy a text buffer into a "C" string with bounds checking.
Given a pointer to a buffer of text, copy it to a destination buffer and append it with a trailing zero. If the destination buffer isn't big enough for the input string, truncate it.
pOutput | Pointer to the buffer to get the copy. |
uOutputSize | Size in bytes of the output buffer |
pInput | Pointer to the buffer with the text to copy from. |
uInputSize | Size in byte of the text to copy from |
|
externnoexcept |
Convert an NSString to a Burger::String (MacOSX and Carbon Only)
Given a valid const NSString, convert the string into UTF8 encoding and store the result into an output String.
pOutput | Pointer to a String class instance to recieve the string |
pInput | Pointer to a constant NSString or CFString to convert |
|
externnoexcept |
Copy a 16 bit "C" string.
Given a pointer to a 16 bit "C" string, copy it to a destination buffer. This is a functional equivalent to wstrcpy().
pOutput | Pointer to the buffer to get the copy. |
pInput | Pointer to the buffer with the 16 bit "C" to copy from. |
|
externnoexcept |
Copy a 16 bit "C" string with bounds checking.
Given a pointer to a 16 bit "C" string, copy it to a destination buffer. If the destination buffer isn't big enough for the input string, truncate it.
pOutput | Pointer to the buffer to get the copy. |
uOutputSize | Size in bytes of the output buffer |
pInput | Pointer to the buffer with the 16 bit "C" to copy from. |
|
externnoexcept |
Copy a text buffer into a 16 bit "C" string with bounds checking.
Given a pointer to a buffer of text, copy it to a destination buffer and append it with a trailing zero. If the destination buffer isn't big enough for the input string, truncate it.
pOutput | Pointer to the buffer to get the copy. |
uOutputSize | Size in bytes of the output buffer |
pInput | Pointer to the buffer with the text to copy from. |
uInputSize | Size in byte of the text to copy from |
|
externnoexcept |
Delete an allocated string.
If a string was allocated with Burger::StringDuplicate(const char *) or Burger::StringDuplicate(const char *,uintptr_t) then you must dispose of it with this function.
pInput | Pointer to the "C" string to delete. A nullptr pointer will do nothing and is okay to pass. |
|
externnoexcept |
Make a copy of a "C" string.
The "C" string passed by pInput will be copied into a buffer allocated by Burger::Alloc(uintptr_t). The buffer is exactly the same size of the string. You must eventually dispose of the string with a call to Burger::StringDelete(const char *).
pInput | Pointer to the "C" string to copy. A nullptr pointer will page fault. |
|
externnoexcept |
Make a copy of a "C" string with some padding.
The "C" string passed by pInput will be copied into a buffer allocated by Burger::Alloc(uintptr_t). The buffer is the same size of the string plus the padding value. The extra memory is not initialized but the string does terminate with a zero. You must eventually dispose of the string with a call to Burger::StringDelete(const char *).
pInput | Pointer to the "C" string to copy. A null pointer will page fault. |
uPadding | Number of bytes to extend the buffer. |
|
externnoexcept |
Force the ending character of a string.
If the string is empty, or the last character doesn't match iChar, append iChar to the end of the string.
If pInput is nullptr, do nothing.
pInput | Pointer to a "C" string to scan and modify |
iChar | Character to append if needed |
|
externnoexcept |
Force the ending character of a string.
If the string is empty, or the last character doesn't match uChar, append uChar to the end of the string.
If pInput is nullptr, do nothing.
pInput | Pointer to a "C" string to scan and modify |
uChar | Character to append if needed |
|
externnoexcept |
Perform an ANSI compatible strlen().
Determine the length of a "C" string in memory. A "C" string is a random string of bytes that terminates with a zero.
This function works by first forcing 32-bit alignment and then grabbing four bytes at a time, and uses a pseudo vector operation to test all four of them at once.
Here's how it works. For each byte, perform an operation that will clear the high bit if it is not in a suitable range. The two tests are as follows.
#1) Negate the high bit. This eliminates 0x80-0xFF, because if the byte was 0xD5, then it would become 0x55 which has a clear high bit. (0xD5^0x80)&0x80 == 0. This test is performed by performing a "~" operation in "C".
#2) Add 0xFF to the byte. This converts 0x01-0x80 into 0x00-0x7F. This range of values all have their high bits clear. This test is performed by adding the constant 0xFEFEFEFF to the uint32_t.
Take the output of these two tests and and them together, then and with 0x80 to test the high bit. If it is set, it must be zero since zero is the only value that passes both tests.
You may ask, why add with 0xFEFEFEFF, when I want to add 0xFF to each byte? Why wasn't it 0xFFFFFFFF? Because when I add 0xFF to the bottommost byte, it will carry a one to each upper byte. To compensate, I add 0xFE instead of 0xFF so the carried one is accounted for.
pInput | Pointer to "C" string to determine the length |
|
externnoexcept |
Perform an ANSI compatible strlen() for UTF16 strings..
Determine the length of a UTF16 "C" string in memory. A UTF16 "C" string is a random string of shorts that terminates with a zero.
pInput | Pointer to a UTF16 "C" string to determine the length |
|
externnoexcept |
Convert a string to lower case.
Convert all 'A'-'Z' characters to 'a'-'z'. No localization is performed and no other characters are altered.
pInput | Pointer to "C" string to modify. |
|
externnoexcept |
Convert a string to lower case into a new buffer.
Copy a string and convert all 'A'-'Z' characters to 'a'-'z'. No localization is performed and no other characters are altered.
pOutput | Pointer to a buffer large enough to hold the input "C" string. |
pInput | Pointer to "C" string to modify. |
|
externnoexcept |
Locate the offset of the first non-delimiter in a string.
Calculate the length of a span in pInput, which consists entirely of characters in pDelimiters. If no delimiters are found, the returned value is zero.
pInput | Pointer to the string to scan |
pDelimiters | Pointer to the list of delimiters to look for |
|
externnoexcept |
Locate the offset of the first non-delimiter in a string.
Calculate the length of a span in pInput, which consists entirely of characters in pDelimiters. If no delimiters are found, the returned value is zero.
pInput | Pointer to the string to scan |
pDelimiters | Pointer to the list of delimiters to look for |
|
externnoexcept |
Locate the offset of the first delimiter in a string.
Scan pInput until a delimiter is found. Return the offset from the beginning of the string where the delimiter was located. If any of the delimiters are not found, the length of the input string is returned.
pInput | Pointer to the string to scan |
pDelimiters | Pointer to the list of delimiters to look for |
|
externnoexcept |
Locate the offset of a delimiter in a string.
Scan pInput until a delimiter is found. Return the offset from the beginning of the string where the delimiter was located. If any of the delimiters are not found, the length of the input string is returned.
pInput | Pointer to the string to scan |
pDelimiters | Pointer to the list of delimiters to look for |
|
externnoexcept |
Locate a substring.
Returns a pointer to the first occurrence of pTest in pInput, or a nullptr pointer if pTest is not part of pInput.
The matching process does not include the terminating null-characters, but it stops there.
pInput | Pointer to the string to scan |
pTest | Pointer to the substring to look for |
|
externnoexcept |
Locate a substring.
Returns a pointer to the first occurrence of pTest in pInput, or a nullptr pointer if pTest is not part of pInput.
The matching process does not include the terminating null-characters, but it stops there.
pInput | Pointer to the string to scan |
pTest | Pointer to the substring to look for |
uTestLength | Number of elements in the string to match |
|
externnoexcept |
Locate a substring (UTF-16 version)
Returns a pointer to the first occurrence of pTest in pInput, or a nullptr pointer if pTest is not part of pInput.
The matching process does not include the terminating null-characters, but it stops there.
pInput | Pointer to the string to scan |
pTest | Pointer to the substring to look for |
|
externnoexcept |
Convert a string into an IPv4 address.
Given a an IPv4 address as a string, convert it into a IPv4 address and port.
If the port is not specified, it will be returned as 0
Example input "206.55.132.145:80" becomes 206<<24+55<<16+132<<8+145 port is 80 "127.0.0.1" becomes 127<<24+1 port is 0
pInput | Pointer to a "C" string to parse |
pIP | Pointer to where to store the IPv4 IP address in native endian with the highest 8 bits being the leftmost number |
pPort | Pointer to where to the port number |
|
externnoexcept |
Convert a string into an IPv6 address.
Given a an IPv6 address as a string, convert it into a IPv6 address and port.
If the port is not specified, it will be returned as 0
Example input "[2604:4080:1122:8430:44ab:4ad8:adfd:a731]:80" "fe80::adfd:a731" "::1"
pInput | Pointer to a "C" string to parse |
pIP | Pointer to where to store the IPv6 IP address |
pPort | Pointer to where to the port number |
|
externnoexcept |
Split a string into tokens.
On a first call, the function expects a C string as argument for pInput, whose first character is used as the starting location to scan for tokens. In subsequent calls, the function expects a null pointer and uses the position right after the end of the last token as the new starting location for scanning.
pInput | Pointer to the string to scan |
pDelimiters | Pointer to the string of delimiters to scan |
ppSave | Pointer to a char * to save the state |
|
externnoexcept |
Split a string into tokens.
On a first call, the function expects a C string as argument for pInput, whose first character is used as the starting location to scan for tokens. In subsequent calls, the function expects a null pointer and uses the position right after the end of the last token as the new starting location for scanning.
pInput | Pointer to the string to scan |
pDelimiters | Pointer to the string of delimiters to scan |
ppSave | Pointer to a char * to save the state |
|
externnoexcept |
Convert a string to upper case.
Convert all 'a'-'z' characters to 'A'-'Z'. No localization is performed and no other characters are altered.
pInput | Pointer to "C" string to modify. |
|
externnoexcept |
Convert a string to upper case into a new buffer.
Copy a string and convert all 'a'-'z' characters to 'A'-'Z'. No localization is performed and no other characters are altered.
pOutput | Pointer to a buffer large enough to hold the input "C" string. |
pInput | Pointer to "C" string to modify. |
|
externnoexcept |
Remove all characters except those in a list.
The Input string is scanned and every character that is not in the pList "C" string will be removed and compacted. The resulting string consists only of characters that are found in the pList "C" string.
pInput | Pointer to the "C" string to purge. nullptr will page fault. |
pList | Pointer to the "C" string that contains the valid characters to allow. |
|
externnoexcept |
Remove all characters that match those in a list.
The Input string is scanned and every character that is in the pList "C" string will be removed and compacted. The resulting string consists only of characters that are not found in the pList "C" string.
|
externnoexcept |
Remove characters from the beginning of a string.
Starting from the beginning of a string, see if the character is in the supplied list. If so, then the character is removed by copying the rest of the string up. This is repeated until there are no more characters from the list at the beginning of the string or the string is empty.
pInput | Pointer to the "C" string to remove beginning characters from. Do not pass a nullptr pointer. |
pList | Pointer to the "C" string that contains the characters to remove. Do not pass a nullptr pointer. |
|
externnoexcept |
Remove spaces from the beginning and end of a string.
Starting from the beginning of a string, see if the character is a space. If so then the character is removed by copying the rest of the string up. This is repeated until there are no more spaces at the beginning of the string or the string is empty. Then the process is repeated but from the end of the string. The resulting string will not have any space characters at the beginning or the end.
Example: " Foo" becomes "Foo", "Foo " becomes "Foo", " Foo " becomes "Foo".
pInput | Pointer to the "C" string to remove beginning and ending spaces from. nullptr will page fault. |
|
externnoexcept |
Remove whitespace from the beginning and end of a string.
Starting from the beginning of a string, see if the character is whitespace. If so then the character is removed by copying the rest of the string up. This is repeated until there are no more whitespace at the beginning of the string or the string is empty. Then the process is repeated but from the end of the string. The resulting string will not have any whitespace characters at the beginning or the end.
Example: " \t Foo" becomes "Foo", "Foo \t " becomes "Foo", " \t Foo \t " becomes "Foo".
pInput | Pointer to the "C" string to remove beginning and ending whitespace from. nullptr will page fault. |
|
externnoexcept |
Remove spaces from the beginning of a string.
Starting from the beginning of a string, see if the character is a space (32). If so, then the character is removed by copying the rest of the string up. This is repeated until there are no more spaces at the beginning of the string or the string is empty.
Example: " Foo" becomes "Foo", "Foo " remains "Foo ", " Foo " becomes "Foo ".
pInput | Pointer to the "C" string to remove beginning spaces from. nullptr will page fault. |
|
externnoexcept |
Remove whitespace from the beginning of a string.
Starting from the beginning of a string, see if the character is a space or a tab. If so, then the character is removed by copying the rest of the string up. This is repeated until there are no more spaces or tabs at the beginning of the string or the string is empty.
Example: " \t Foo" becomes "Foo", "Foo \t " remains "Foo \t ", " \t Foo \t " becomes "Foo \t ".
pInput | Pointer to the "C" string to remove beginning whitespace from. nullptr will page fault. |
|
externnoexcept |
Remove characters from the end of a string.
Starting from the end of a string but before the ending zero, see if the character found is inside the string passed in pList. If so, then the character is removed by zeroing it out and the process begins again until the string is empty or a character that is not in the list is found.
pInput | Pointer to the "C" string to remove ending characters from. Do not pass a nullptr pointer. |
pList | Pointer to the "C" string that contains the characters to remove. Do not pass a nullptr pointer. |
|
externnoexcept |
Remove spaces from the end of a string.
Starting from the end of a string but before the ending zero, see if the last character is a space. If so, then the character is removed by zeroing it out and the process begins again until the string is empty or a non space character is at the end of the "C" string. For speed purposes, only a single zero is ever written to the "C" string. Do not assume that all the spaces that were removed were actually overwritten with zeros.
Example: " Foo" remains " Foo", " Foo" becomes "Foo", " Foo " becomes " Foo".
pInput | Pointer to the "C" string to remove ending spaces from. nullptr will page fault. |
|
externnoexcept |
Remove whitespace from the end of a string.
Starting from the end of a string but before the ending zero, see if the last character is a space or tab. If so, then the character is removed by zeroing it out and the process begins again until the string is empty or a non space or tab character is at the end of the "C" string. For speed purposes, only a single zero is ever written to the "C" string. Do not assume that all the spaces and tabs that were removed were actually overwritten with zeros.
Example: " \t Foo" remains " \t Foo", "Foo \t " becomes "Foo", " \t Foo \t " becomes " \t Foo".
pInput | Pointer to the "C" string to remove ending spaces and tabs from. nullptr will page fault. |
|
externnoexcept |
Add 128 to every byte to convert a char to a byte or vice versa.
Given a pointer to an array of bytes, add 128 to every entry
pInput | Pointer to the array to bytes |
uLength | Number of bytes in the array |
|
externnoexcept |
Add 128 to every byte to convert a char to a byte or vice versa.
Given a pointer to an array of bytes, add 128 to every entry and store the result into another array of equal or greater size
pOutput | Pointer to the array to receive the converted data |
pInput | Pointer to the array to bytes |
uLength | Number of bytes in the array |
|
externnoexcept |
Reverse the endian of an array of 16-bit integers.
Given a pointer to an array of 16-bit integers, swap the endian of every entry
pInput | Pointer to the array to endian swap |
uElements | Number of elements in the array (Not bytes) |
|
externnoexcept |
Reverse the endian of a copied array of 16-bit integers.
Given a pointer to an array of 16-bit integers, swap the endian of every entry and store the result into another array of equal or greater size
pOutput | Pointer to the array to receive the swapped data |
pInput | Pointer to the array to endian swap |
uElements | Number of elements in the array (Not bytes) |
|
externnoexcept |
Reverse the endian of an array of 32-bit integers.
Given a pointer to an array of 32-bit integers, swap the endian of every entry
pInput | Pointer to the array to endian swap |
uElements | Number of elements in the array (Not bytes) |
|
externnoexcept |
Reverse the endian of a copied array of 32-bit integers.
Given a pointer to an array of 32-bit integers, swap the endian of every entry and store the result into another array of equal or greater size
pOutput | Pointer to the array to receive the swapped data |
pInput | Pointer to the array to endian swap |
uElements | Number of elements in the array (Not bytes) |
|
externnoexcept |
Reverse the endian of an array of 64-bit integers.
Given a pointer to an array of 64-bit integers, swap the endian of every entry
pInput | Pointer to the array to endian swap |
uElements | Number of elements in the array (Not bytes) |
|
externnoexcept |
Reverse the endian of a copied array of 64-bit integers.
Given a pointer to an array of 64-bit integers, swap the endian of every entry and store the result into another array of equal or greater size
pOutput | Pointer to the array to receive the swapped data |
pInput | Pointer to the array to endian swap |
uElements | Number of elements in the array (Not bytes) |
|
externnoexcept |
Get Thread Local Storage.
Scan a private linked list for thread storage records and if found, return the pointer to the ThreadLocalStorageRecord_t that is assigned to the currently running thread.
|
externnoexcept |
Scan for Thread Local Storage (Private)
For really old operating systems, or if the Thread Local Storage on the native operating system is full, this function will perform the same task.
Scan a private linked list for thread storage records and if found, return the pointer to the ThreadLocalStorageRecord_t that is assigned to the currently running thread.
|
externnoexcept |
Set a Thread Local Storage entry.
Scan a private linked list for thread storage records and if found, set the pointer to the ThreadLocalStorageRecord_t for the currently running thread. If no record was found, allocate a new record and add the data to this new record.
pInput | Pointer to a ThreadLocalStorage_t or nullptr to delete the record if found |
|
externnoexcept |
Set a Thread Local Storage entry (Private)
For really old operating systems, or if the Thread Local Storage on the native operating system is full, this function will perform the same task.
Scan a private linked list for thread storage records and if found, set the pointer to the ThreadLocalStorageRecord_t for the currently running thread. If no record was found, allocate a new record and add the data to this new record.
pInput | Pointer to a ThreadLocalStorage_t or nullptr to delete the record if found |
|
externnoexcept |
Get thread local storage for current thread.
Every thread is assigned an array of entries for data that is specific to each thread. Given an index that starts with 1, retrieve data stored by a previous call to tls_set(uint32_t, const void*, TLSShutdownProc).
If the index is out of bounds, or no data entry exists for this thread, a nullptr is returned.
uIndex | Index that starts with 1 or higher. |
|
externnoexcept |
Create a unique index for Thread Local Storage.
Atomically increment a counter and return the value. This value is used as an index to obtain the thread local storage to the thread that possesses the index.
|
externnoexcept |
|
externnoexcept |
Set thread local storage for current thread.
Every thread is assigned an array of entries for data that is specific to each thread. Given an index that starts with 1, set the data pointer and a possible function to be called once the thread has shut down.
If the index is out of bounds for this thread, the internal data structure is grown in size to accomodate the index.
uIndex | Index that starts with 1 or higher |
pThis | Pointer to data to store |
pShutdown | Pointer to a shutdown function to call on thread shutdown, can be nullptr |
|
inlineconstexprnoexcept |
Convert a character to lower case.
Using ASCII encoding, check if the value is between 'A' to 'Z' inclusive and if true, convert to 'a' to 'z'.
uInput | ASCII character to convert to lower case |
|
inlineconstexprnoexcept |
Convert a character to upper case.
Using ASCII encoding, check if the value is between 'a' to 'z' inclusive and if true, convert to 'A' to 'Z'.
uInput | ASCII character to convert to upper case |
|
externnoexcept |
Convert a UTF8 stream into a ISOLatin1 "C" string.
Take a "C" string that is using UTF8 encoding and convert it into a ISOLatin1 encoded "C" string. The function will return the size of the string after encoding. This size is valid, even if it exceeded the output buffer size. The output pointer and size can be nullptr to have this routine calculate the size of the possible output so the application can allocate a buffer large enough to hold it.
pOutput | Pointer to byte buffer to receive the ISOLatin1 encoded string. nullptr is okay if uOutputSize is zero, otherwise it will page fault. |
uOutputSize | Size of the output buffer in bytes. |
pInput | A UTF8 encoded "C" string. nullptr will page fault. |
pTranslateTable | Pointer to a 128 entry code page lookup table that would convert the code page to UTF8 for a reverse lookup. |
|
externnoexcept |
Convert a UTF8 stream into a ISOLatin1 byte array.
Take a byte array that is using UTF8 encoding and convert it to a ISOLatin1 encoded "C" string. The function will return the size of the string after encoding. This size is valid, even if it exceeded the output buffer size. The output pointer and size can be nullptr to have this routine calculate the size of the possible output so the application can allocate a buffer large enough to hold it.
pOutput | Pointer to a byte buffer to receive the ISOLatin1 string. nullptr is okay if uOutputSize is zero, otherwise a page fault will occur. |
uOutputSize | Size of the output buffer in bytes. |
pInput | UTF8 encoded byte array. nullptr is okay if uInputSize is zero. |
uInputSize | Size of the input byte array. |
pTranslateTable | Pointer to a 128 entry code page lookup table that would convert the code page to UTF8 for a reverse lookup. |
|
externnoexcept |
Translate a single UTF8 stream character into a mapped 8 bit char.
UTF8 can be a maximum of 4 bytes per character. Scan a 128 entry table for a match and if found, return the index + 128 as the mapped code page. This function is used to convert UTF8 to an 8 bit encoding. kInvalid is returned if there is no match.
The table will have 4 bytes per character, with zeros filling all unused entries in case the entry is 2 or 3 values in length.
pInput | Pointer to UTF8 buffer that contains the 1 to 4 byte buffer to convert. nullptr will page fault. |
pTranslateTable | Pointer to a 128 entry code page lookup table that would convert the code page to UTF8 for a reverse lookup. |
|
noexcept |
|
extern |
Decompress a packed floating point number.
Decompress a 16 bit floating point number, assuming that the range is 0.999999 to -0.999999
Use Burger::PackFloatTo16(float) to create the 16 bit value.
The 16 bits are represented in this manner.
val==0 = The value is zero. val&0x8000 = The value is negative. (val&0x7800)>>11 = 4 bit exponent where 0->111 and 15->126. (val&0x7FF) = 11 bit mantissa.
iInput | 16 bit representation of a floating point number. |
|
extern |
Decompress a packed floating point number with a supplied base exponent.
Decompress a 16 bit floating point number, assuming that the minimum exponent is the one supplied. For 0.999999 you should supply the exponent value of 111. This number must match the value used to compress the value in the first place. This function exists so that floating point compression can scale to different ranges.
Use Burger::PackFloatTo16(float,uint32_t) to create the 16 bit value.
The 16 bits are represented in this manner.
val==0 = The value is zero. val&0x8000 = The value is negative. (val&0x7800)>>11 = 4 bit exponent where 0->111 and 15->126. (val&0x7FF) = 11 bit mantissa.
iInput | 16 bit representation of a floating point number. |
uBaseExponent | Minimum exponent, should match the value used to apply compression (111 is used for a max value of 0.999999). |
|
extern |
Decompress data compressed with PackBytes from the Apple IIgs.
This routine will decompress data compressed by the algorithm used by PackBytes() from the Apple IIgs. This function is almost a drop in replacement, with the exception that the handle to the source data is replaced with a pointer and remaining bytes.
The value returned is the number of input bytes consumed, or zero if an error occurred.
pInput | Pointer to the compressed data |
uInputLength | Number of bytes of compressed data |
ppOutput | Pointer to the uint8_t buffer to receive the decompressed data |
pOutputLength | Pointer to the number of compressed packets to decompress |
|
extern |
Upload sound data into a DirectSoundBuffer.
Given a buffer, lock the DirectSoundBuffer and upload the raw data into it. If the DirectSoundBuffer was lost, attempt to restore it and the upload the data.
pBuffer | Pointer to a DirectSoundBuffer |
uOffset | Offset into the start of the buffer |
pInput | Pointer to the data to upload |
uInputLength | Number of bytes to upload |
|
extern |
Upload compressed sound data into a DirectSoundBuffer.
Given a buffer, lock the DirectSoundBuffer, decompress data from the compressed stream and upload the newly decompressed data into the DirectSoundBuffer. If the DirectSoundBuffer was lost, attempt to restore it and the upload the data.
pBuffer | Pointer to a DirectSoundBuffer |
uOffset | Offset into the start of the buffer |
pBufferDecoder | Pointer to the compressed data stream to decode from |
uInputLength | Number of bytes to upload |
|
externnoexcept |
Perform a string comparison using the wild card system.
An asterisk "*" denotes that the input is skipped until the character following is found, then the compare continues. If a "*" is the final character, then the input string is considered a match.
A question mark "?" denotes that a single, non-zero character must occupy this location.
Examples for wild cards: .* = All strings that have a single period anywhere in them. = All strings match. .??? = All strings that have a exactly three characters at the end after a period.
pInput | Pointer to a "C" string to compare against. nullptr will page fault. |
pWildcard | Pointer to a "C" string that has wild card information. nullptr will page fault. |
|
extern |
Write a big endian 64-bit float to a file.
Given an ANSI FILE *, write a 64-bit float in big endian format into the file stream.
fp | FILE * to the stream to write to. |
dInput | Data to write. |
|
extern |
Write a big endian 32-bit float to a file.
Given an ANSI FILE *, write a 32-bit float in big endian format into the file stream.
fp | FILE * to the stream to write to. |
fInput | Data to write. |
|
extern |
Write a big endian 16-bit integer to a file.
Given an ANSI FILE *, write a 16-bit integer in big endian format into the file stream.
fp | FILE * to the stream to write to. |
uInput | Data to write. |
|
extern |
Write a big endian 32-bit integer to a file.
Given an ANSI FILE *, write a 32-bit integer in big endian format into the file stream.
fp | FILE * to the stream to write to. |
uInput | Data to write. |
|
extern |
Write a big endian 64-bit integer to a file.
Given an ANSI FILE *, write a 64-bit integer in big endian format into the file stream.
fp | FILE * to the stream to write to. |
uInput | Data to write. |
|
extern |
Write a "C" string with the terminating zero to a file stream.
Given an ANSI FILE *, write a "C" string with a terminating zero into the file stream.
fp | FILE * to the stream to write to. |
pInput | Pointer to a "C" string to write. |
|
extern |
Write a little endian 64-bit float to a file.
Given an ANSI FILE *, write a 64-bit float in little endian format into the file stream.
fp | FILE * to the stream to write to. |
dInput | Data to write. |
|
extern |
Write a little endian 32-bit float to a file.
Given an ANSI FILE *, write a 32-bit float in little endian format into the file stream.
fp | FILE * to the stream to write to. |
fInput | Data to write. |
|
extern |
Write a little endian 16-bit integer to a file.
Given an ANSI FILE *, write a 16-bit integer in little endian format into the file stream.
fp | FILE * to the stream to write to. |
uInput | Data to write. |
|
extern |
Write a little endian 32-bit integer to a file.
Given an ANSI FILE *, write a 32-bit integer in little endian format into the file stream.
fp | FILE * to the stream to write to. |
uInput | Data to write. |
|
extern |
Write a little endian 64-bit integer to a file.
Given an ANSI FILE *, write a 64-bit integer in little endian format into the file stream.
fp | FILE * to the stream to write to. |
uInput | Data to write. |
|
externnoexcept |
Read a controller using XInput.
If XInput is available, this function will read in the data from a gamepad controller.
The XInputGamePad_t structure is assumed to be persistent and initialized by the application to zero before calling this function with the data. The function will maintain state using the contents of the XInputGamePad_t structure during successive calls. Calling this function with an XInputGamePad_t structure that had never been initially filled with zeros will yield undefined behavior.
uWhich | Which controller to read, 0-3 are valid |
pXInputGamePad | Pointer to a structure that will receive the state. |
uDeadZoneType | Type of post processing on the raw thumbstick data. |
|
externnoexcept |
Turn off rumbling on XInput managed controllers.
If XInput is available, this function will clear the vibration state to off on all four controllers.
This function is useful when the application is exiting or entering pause mode
|
extern |
Table to quickly determine the type of low ASCII character.
This table is used for code to quickly determine if an ASCII code from 0 to 127 is upper case, lower case, whitespace, etc.
Entries 128-255 are all zeros, because they are escape codes for UTF-8 lookup
|
extern |
Table to convert ASCII characters into nibbles (0-15).
This table is used for code to quickly map the ASCII values of '0'-'9', 'A'-'F' and 'a'-'f' into the hex digits 0x00-0x0F.
|
extern |
"\r\n"
This string is hard coded to have the Win32 CR/LF EOL string. It saves space by having a singular occurrence.
|
extern |
|
extern |
"\r"
This string is hard coded to have the MacOS CR EOL string. It saves space by having a singular occurrence.
|
extern |
|
extern |
Constant for 1.0/255.0 in the double format.
|
extern |
Constant for 1.0/3.0 in the double format.
|
extern |
Constant for 2.0/3.0 in the double format.
|
extern |
Constant for 65536.0 in the double format.
|
extern |
Constant for get_cosine(Pi/6.0) in the double format.
|
extern |
Constant for Pi/180 in the double format.
|
extern |
Constant for Epsilon in the double format.
|
extern |
Constant for 0.5 in the double format.
|
extern |
Constant for Pi*0.5 in the double format.
|
extern |
Constant for Infinity in the double format.
|
extern |
Constant for ln(10) in the double format.
|
extern |
Constant for ln(2) in the double format.
|
extern |
Constant for the largest number in the double format.
|
extern |
Constant for the smallest number (Non-zero) in the double format.
|
extern |
Constant for the smallest number that cannot have a fraction 4503599627370496.0.
|
extern |
Constant for signaling Not a Number (NaN) in the double format.
|
extern |
Constant for -get_cosine(Pi/6.0) in the double format.
|
extern |
Constant for -Pi/180 in the double format.
|
extern |
Constant for negative Epsilon in the double format.
|
extern |
Constant for -0.5 in the double format.
|
extern |
Constant for -Pi*0.5 in the double format.
|
extern |
Constant for -Infinity in the double format.
|
extern |
Constant for -ln(10) in the double format.
|
extern |
Constant for -ln(2) in the double format.
|
extern |
Constant for the negative largest number in the double format.
|
extern |
Constant for the negative smallest number (Non-zero) in the double format.
|
extern |
Constant for the negative smallest number that cannot have a fraction -4503599627370496.0.
|
extern |
Constant for negative signaling Not a Number (NaN) in the double format.
|
extern |
Constant for -1.0 in the double format.
|
extern |
Constant for -Pi in the double format.
|
extern |
Constant for -Pi*2 in the double format.
|
extern |
Constant for -Pi*4 in the double format.
|
extern |
Constant for negative non signaling Not a Number (Nan) in the double format.
|
extern |
Constant for -Pi*0.25 in the double format.
|
extern |
Constant for -180/Pi in the double format.
|
extern |
Constant for -1/(Pi*0.5) in the double format.
|
extern |
Constant for -1/Pi in the double format.
|
extern |
Constant for -1/(Pi*2) in the double format.
|
extern |
Constant for -sqrt(2) in the double format.
|
extern |
Constant for -0.0 in the double format.
|
extern |
Constant for 1.0 in the double format.
|
extern |
Constant for Pi in the double format.
|
extern |
Constant for Pi*2 in the double format.
|
extern |
Constant for Pi*4 in the double format.
|
extern |
Constant for non signaling Not a Number (Nan) in the double format.
|
extern |
Constant for Pi*0.25 in the double format.
|
extern |
Constant for 180/Pi in the double format.
|
extern |
Constant for 1/(Pi*0.5) in the double format.
|
extern |
Constant for 1/Pi in the double format.
|
extern |
Constant for 1/(Pi*2) in the double format.
|
extern |
Constant for sqrt(2) in the double format.
|
extern |
Constant for 0.0 in the double format.
|
extern |
Describe the location for Effect2D.
|
extern |
Vertex description for Effect2D 2 entries for position 2 entries for UV.
|
extern |
"" This string is hard coded to be an empty string. It saves space by having a singular occurrence.
|
extern |
"" in UTF16
This string is hard coded to be an empty string. It saves space by having a singular occurrence.
|
extern |
Constant for 1.0f/255.f in the float format.
|
extern |
Constant for 1.0f/3.f in the float format.
|
extern |
Constant for 2.0f/3.f in the float format.
|
extern |
Constant for 65536.f in the float float.
|
extern |
"false"
This string is hard coded to have the string "false". It saves space by having a singular occurrence.
|
extern |
"false" in UTF16
This string is hard coded to have the string "false". It saves space by having a singular occurrence.
|
extern |
Constant for get_cosine(Pi/6.0) in the float format.
|
extern |
Constant for Pi/180 in the float format.
|
extern |
Constant for Epsilon in the float format.
|
extern |
Constant for 0.5f in the float format.
|
extern |
Constant for Pi*0.5f in the float format.
|
extern |
Constant for Infinity in the float format.
|
extern |
Constant for ln(10) in the float format.
|
extern |
Constant for ln(2) in the float format.
|
extern |
Constant for largest number in the float format.
|
extern |
Constant for smallest number (Non-zero) in the float format.
|
extern |
Constant for the smallest number that cannot have a fraction 8388608.0f.
|
extern |
Constant for signaling Not a Number (NaN) in the float format.
|
extern |
Constant for -get_cosine(Pi/6.0) in the float format.
|
extern |
Constant for -Pi/180 in the float format.
|
extern |
Constant for negative Epsilon in the float format.
|
extern |
Constant for -0.5f in the float format.
|
extern |
Constant for -Pi*0.5f in the float format.
|
extern |
Constant for -Infinity in the float format.
|
extern |
Constant for -ln(10) in the float format.
|
extern |
Constant for -ln(2) in the float format.
|
extern |
Constant for negative largest number in the float format.
|
extern |
Constant for negative smallest number (Non-zero) in the float format.
|
extern |
Constant for the negative smallest number that cannot have a fraction -8388608.0f.
|
extern |
Constant for negative signaling Not a Number (NaN) in the float format.
|
extern |
Constant for -1.0f in the float format.
|
extern |
Constant for -Pi in the float format.
|
extern |
Constant for -Pi*2 in the float format.
|
extern |
Constant for -Pi*4 in the float format.
|
extern |
Constant for negative non signaling Not a Number in the float format.
|
extern |
Constant for -Pi*0.25f in the float format.
|
extern |
Constant for -180/Pi in the float format.
|
extern |
Constant for -1/(Pi*0.5f) in the float format.
|
extern |
Constant for -1/Pi in the float format.
|
extern |
Constant for -1/(Pi*2.0f) in the float format.
|
extern |
Constant for -sqrt(2) in the float format.
|
extern |
Constant for -0.0f in the float format.
|
extern |
Constant for 1.0f in the float format.
|
extern |
Constant for Pi in the float format.
|
extern |
Constant for Pi*2 in the float format.
|
extern |
Constant for Pi*4 in the float format.
|
extern |
Constant for non signaling Not a Number (Nan) in the float format.
|
extern |
Constant for Pi*0.25f in the float format.
|
extern |
Constant for 180/Pi in the float format.
|
extern |
Constant for 1/(Pi*0.5f) in the float format.
|
extern |
Constant for 1/Pi in the float format.
|
extern |
Constant for 1/(Pi*2.0f) in the float format.
|
extern |
Constant for sqrt(2) in the float format.
|
extern |
Constant for 0.0f in the float format.
|
extern |
(OpenGL only) "Color"
|
extern |
(OpenGL only) "DiffuseTexture"
|
extern |
(OpenGL only) "Position"
|
extern |
(OpenGL only) "Texcoord"
|
extern |
(OpenGL only) "ViewProjectionMatrix"
|
extern |
(OpenGL only) "XYWidthHeight"
|
extern |
Empty GUID.
A GUID where all values are zero
|
extern |
"\n"
This string is hard coded to have the Linux/Unix LF EOL string. It saves space by having a singular occurrence.
|
extern |
"\n" in UTF16
This string is hard coded to have the Linux/Unix LF EOL string. It saves space by having a singular occurrence.
|
extern |
Constant 3x3 identity matrix.
|
extern |
Months of the year.
An array of twelve strings for the twelve months of the year. Each string is capitalized so they are "January", "February", etc...
|
extern |
MP3 Layer 3 table for 0.5 / cos((Burger::g_dPi * (i*2+1)) / 12.0)
|
extern |
MP3 Layer 3 table for MP3DCT36.
The first 9 entries are cos((BURGER_PI / 18.0) * i) The second 9 entries are 0.5 / cos((Burger::g_dPi * (i*2+1)) / 36.0)
|
extern |
4 pairs of FHT cosine/sine values for MP3 encoding
|
extern |
Table to convert nibbles (0-15) into lower case ASCII characters.
This table is used for code to quickly map the hex values of 0-15 into the digits 0-9 and a-f.
|
extern |
Table to convert nibbles (0-15) into upper case ASCII characters.
This table is used for code to quickly map the hex values of 0-15 into the digits 0-9 and A-F.
|
extern |
"no"
This string is hard coded to have the string "no". It saves space by having a singular occurrence.
|
extern |
"no" in UTF16
This string is hard coded to have the string "no". It saves space by having a singular occurrence.
|
extern |
|
extern |
Strings to print for a boolean.
|
extern |
Array of cosine points.
Array of pointers to cosine tables used for MP3 decoding in the order of 16 entry, 8 entry, 4 entry, 2 entry and 1 entry in that order.
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
Table to reverse the bit order of a byte.
This table will take the a uint8_t used as an index and return the bit reversed value of that index. 0x80 -> 0x01, 0xAA -> 0x55, 0x32 -> 0x4C.
|
extern |
Describe the location for Shader2DCColor.
|
extern |
Vertex description for Shader2DCColor 2 entries for position.
|
extern |
Describe the location for Shader2DColorVertex.
|
extern |
Vertex description for Shader2DColorVertex 2 entries for position 2 entries for UV 4 entries for color.
|
extern |
Table used for testing powers of ten for 32 bit integer to ASCII conversion.
This table is used for code to test a 32 bit integer against a power of ten for divisionless conversion of an integer to ASCII text.
|
extern |
Table used for testing powers of ten for 64 bit integer to ASCII conversion.
This table is used for code to test a 64 bit integer against a power of ten for divisionless conversion of an integer to ASCII text.
|
extern |
" \t\r\n"
This is used for StringToken(char *, const char *, char **) to parse tokens using default white space.
|
extern |
" \t\r\n" in UTF16
This is used for StringToken(uint16_t *, const uint16_t *, uint16_t **) to parse tokens using default white space.
|
extern |
"true"
This string is hard coded to have the string "true". It saves space by having a singular occurrence.
|
extern |
"true" in UTF16
This string is hard coded to have the string "true". It saves space by having a singular occurrence.
|
extern |
8087 control word to set rounding to +infinity
|
extern |
8087 control word to set rounding to -infinity
|
extern |
8087 control word to set rounding to zero
|
extern |
Constant of Burger::g_fInf,Burger::g_fInf.
|
extern |
Constant of Burger::g_fMax,Burger::g_fMax.
|
extern |
Constant of 1.0f,1.0f.
|
extern |
Constant of 1.0f,0.0f.
|
extern |
Constant of 0.0f,1.0f.
|
extern |
Constant of 0.0f,0.0f.
|
extern |
Constant of Burger::g_fInf,Burger::g_fInf,Burger::g_fInf.
|
extern |
Constant of Burger::g_fMax,Burger::g_fMax,Burger::g_fMax.
|
extern |
Constant of 1.0f,1.0f,1.0f.
|
extern |
Constant of 1.0f,0.0f,0.0f.
|
extern |
Constant of 0.0f,1.0f,0.0f.
|
extern |
Constant of 0.0f,0.0f,1.0f.
|
extern |
Constant of 0.0f,0.0f,0.0f.
|
extern |
Constant of 1.0f,1.0f,1.0f,1.0f.
|
extern |
Constant of 0.0f,0.0f,0.0f,1.0f.
|
extern |
Constant of 1.0f,0.0f,0.0f,0.0f.
|
extern |
Constant of 0.0f,1.0f,0.0f,0.0f.
|
extern |
Constant of 0.0f,0.0f,1.0f,0.0f.
|
extern |
Constant of 0.0f,0.0f,0.0f,0.0f.
|
extern |
Folder for mounted volumes.
Every flavor of Unix uses a different folder for where all the mounted volumes are located. This array contains all the base folders for every flavor of unix supported by Burgerlib.
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |
Days of the week.
An array of seven strings for the seven days of the week. Each string is capitalized so they are "Sunday", "Monday", etc...
|
extern |
0.5f,-0.5f for roundup / rounddown
|
extern |
"yes"
This string is hard coded to have the string "yes". It saves space by having a singular occurrence.
|
extern |
"yes" in UTF16
This string is hard coded to have the string "yes". It saves space by having a singular occurrence.
|
constexpr |
Minimum value for Fixed32.
|
constexpr |
Pi in Fixed32 format (3.141... * 65536 = 205887.416)
|
extern |
Constant 3x3 fixed point identity matrix.
|
extern |
Constant 4x4 fixed point identity matrix.
|
extern |
Constant of 1.0f,1.0f,1.0f in fixed point.
|
extern |
Constant of 1.0f,0.0f,0.0f in fixed point.
|
extern |
Constant of 0.0f,1.0f,0.0f in fixed point.
|
extern |
Constant of 0.0f,0.0f,1.0f in fixed point.
|
extern |
Constant of 0.0f,0.0f,0.0f in fixed point.
|
extern |
Constant of 1.0f,1.0f,1.0f,1.0f in fixed point.
|
extern |
Constant of 0.0f,0.0f,0.0f,1.0f in fixed point.
|
extern |
Constant of 1.0f,0.0f,0.0f,0.0f in fixed point.
|
extern |
Constant of 0.0f,1.0f,0.0f,0.0f in fixed point.
|
extern |
Constant of 0.0f,0.0f,1.0f,0.0f in fixed point.
|
extern |
Constant of 0.0f,0.0f,0.0f,0.0f in fixed point.
|
extern |
Constant 4x4 identity matrix.