xoreos  0.0.5
Classes | Typedefs | Enumerations | Functions | Variables
Common Namespace Reference

Classes

struct  BinSearchValue
 Struct template for a generic searchable key/value pair. More...
 
class  BitStream
 A bit stream. More...
 
class  BitStreamImpl
 A template implementing a bit stream for different data memory layouts. More...
 
class  BitStreamWriter
 A bit stream writer. More...
 
class  BitStreamWriterImpl
 A template implementing a bit stream writer for different data memory layouts. More...
 
struct  BlowfishContext
 
class  BoundingBox
 A bounding box around 3D points. More...
 
class  ChangeContent
 
class  ChangeID
 A class representing an undoable change. More...
 
struct  Complex
 A complex number. More...
 
class  Condition
 A condition. More...
 
class  ConfigDomain
 Accessor for a domain (section) in a config file. More...
 
class  ConfigFile
 This class allows reading/writing INI style config files. More...
 
class  ConfigManager
 The global config manager, storing all config keys. More...
 
class  ConversionManager
 A manager handling string encoding conversions. More...
 
class  DateTime
 A date/time object, storing a specific point in time. More...
 
class  DCT
 (Inverse) Discrete Cosine Transforms. More...
 
struct  DeallocatorArray
 Deallocate a pointer to an array. More...
 
struct  DeallocatorDefault
 Deallocate a normal pointer. More...
 
struct  DeallocatorFree
 Deallocate a pointer using free(). More...
 
class  DebugManager
 The debug manager, managing debug channels. More...
 
class  DisposableArray
 A disposable array pointer, allowing array-y access and array deletion. More...
 
class  DisposablePtr
 A disposable plain pointer, allowing pointer-y access and normal deletion. More...
 
class  DisposablePtrBase
 Base template class for a disposable pointer. More...
 
class  FFT
 (Inverse) Fast Fourier Transform. More...
 
class  FileList
 A list of files. More...
 
class  FilePath
 Utility class for manipulating file paths. More...
 
class  FoxPro
 A database in FoxPro 2.0 format. More...
 
struct  hashUStringCaseInsensitive
 
struct  hashUStringCaseSensitive
 
class  Huffman
 Decode a Huffman'd bitstream. More...
 
struct  HuffmanTable
 
struct  MD5Context
 
class  MDCT
 (Inverse) Modified Discrete Cosine Transforms. More...
 
class  MemoryReadStream
 Simple memory based 'stream', which implements the ReadStream interface for a plain memory block. More...
 
class  MemoryReadStreamEndian
 This is a wrapper around MemoryReadStream, but it adds non-endian read methods whose endianness is set on the stream creation. More...
 
class  MemoryWriteStream
 Simple memory based 'stream', which implements the SeekableWriteStream interface for a plain memory block. More...
 
class  MemoryWriteStreamDynamic
 A stream that dynamically grows as it's written to. More...
 
class  Mutex
 A mutex. More...
 
class  PEResourceID
 
class  PEResources
 A class able to load resources from a Windows Portable Executable, such as cursors, bitmaps, and sounds. More...
 
class  Platform
 
class  PtrList
 A list of pointer to objects, with automatic deletion. More...
 
class  PtrMap
 A map of pointer to objects, with automatic deletion. More...
 
class  PtrVector
 A vector of pointer to objects, with automatic deletion. More...
 
class  Rational
 A simple rational class that holds fractions. More...
 
class  RDFT
 (Inverse) Real Discrete Fourier Transform. More...
 
class  ReadFile
 A simple streaming file reading class. More...
 
class  ReadLine
 
class  ReadStream
 Generic interface for a readable data stream. More...
 
class  Rect
 
class  ScopedArray
 A scoped array pointer, allowing array-y access and array deletion. More...
 
class  ScopedPtr
 A scoped plain pointer, allowing pointer-y access and normal deletion. More...
 
class  ScopedPtrBase
 Base template class for a scoped pointer. More...
 
class  SeekableReadStream
 Interface for a seekable & readable data stream. More...
 
class  SeekableSubReadStream
 SeekableSubReadStream provides access to a SeekableReadStream restricted to the range [begin, end). More...
 
class  SeekableSubReadStreamEndian
 This is a wrapper around SeekableSubReadStream, but it adds non-endian read methods whose endianness is set on the stream creation. More...
 
class  SeekableWriteStream
 
class  Semaphore
 A semaphore . More...
 
class  Singleton
 Generic template base class for implementing the singleton design pattern. More...
 
class  StackException
 Exception that provides a stack of explanations. More...
 
class  StackLock
 Convenience class that locks a mutex on creation and unlocks it on destruction. More...
 
class  StreamTokenizer
 Tokenizes a stream. More...
 
class  StringListMap
 A map to quickly match strings from a list. More...
 
class  SubReadStream
 SubReadStream provides access to a ReadStream restricted to the range [currentPosition, currentPosition+end). More...
 
class  Thread
 A class that creates its own thread. More...
 
class  Timestamp
 Timestamps allow specifying points in time and measuring time intervals with a sub-millisecond granularity. More...
 
class  UString
 A class holding an UTF-8 string. More...
 
class  WriteFile
 A simple streaming file writing class. More...
 
class  WriteStream
 Generic interface for a writable data stream. More...
 
class  XMLNode
 
class  XMLParser
 Class to parse a ReadStream into a simple XML tree. More...
 
class  ZipFile
 A class encapsulating ZIP file access. More...
 

Typedefs

typedef BitStreamImpl< 8, false, true > BitStream8MSB
 8-bit data, MSB to LSB. More...
 
typedef BitStreamImpl< 8, false, false > BitStream8LSB
 8-bit data, LSB to MSB. More...
 
typedef BitStreamImpl< 16, true, true > BitStream16LEMSB
 16-bit little-endian data, MSB to LSB. More...
 
typedef BitStreamImpl< 16, true, false > BitStream16LELSB
 16-bit little-endian data, LSB to MSB. More...
 
typedef BitStreamImpl< 16, false, true > BitStream16BEMSB
 16-bit big-endian data, MSB to LSB. More...
 
typedef BitStreamImpl< 16, false, false > BitStream16BELSB
 16-bit big-endian data, LSB to MSB. More...
 
typedef BitStreamImpl< 32, true, true > BitStream32LEMSB
 32-bit little-endian data, MSB to LSB. More...
 
typedef BitStreamImpl< 32, true, false > BitStream32LELSB
 32-bit little-endian data, LSB to MSB. More...
 
typedef BitStreamImpl< 32, false, true > BitStream32BEMSB
 32-bit big-endian data, MSB to LSB. More...
 
typedef BitStreamImpl< 32, false, false > BitStream32BELSB
 32-bit big-endian data, LSB to MSB. More...
 
typedef BitStreamImpl< 64, true, true > BitStream64LEMSB
 64-bit little-endian data, MSB to LSB. More...
 
typedef BitStreamImpl< 64, true, false > BitStream64LELSB
 64-bit little-endian data, LSB to MSB. More...
 
typedef BitStreamImpl< 64, false, true > BitStream64BEMSB
 64-bit big-endian data, MSB to LSB. More...
 
typedef BitStreamImpl< 64, false, false > BitStream64BELSB
 64-bit big-endian data, LSB to MSB. More...
 
typedef BitStreamWriterImpl< 8, false, true > BitStreamWriter8MSB
 8-bit data, MSB to LSB. More...
 
typedef BitStreamWriterImpl< 8, false, false > BitStreamWriter8LSB
 8-bit data, LSB to MSB. More...
 
typedef BitStreamWriterImpl< 16, true, true > BitStreamWriter16LEMSB
 16-bit little-endian data, MSB to LSB. More...
 
typedef BitStreamWriterImpl< 16, true, false > BitStreamWriter16LELSB
 16-bit little-endian data, LSB to MSB. More...
 
typedef BitStreamWriterImpl< 16, false, true > BitStreamWriter16BEMSB
 16-bit big-endian data, MSB to LSB. More...
 
typedef BitStreamWriterImpl< 16, false, false > BitStreamWriter16BELSB
 16-bit big-endian data, LSB to MSB. More...
 
typedef BitStreamWriterImpl< 32, true, true > BitStreamWriter32LEMSB
 32-bit little-endian data, MSB to LSB. More...
 
typedef BitStreamWriterImpl< 32, true, false > BitStreamWriter32LELSB
 32-bit little-endian data, LSB to MSB. More...
 
typedef BitStreamWriterImpl< 32, false, true > BitStreamWriter32BEMSB
 32-bit big-endian data, MSB to LSB. More...
 
typedef BitStreamWriterImpl< 32, false, false > BitStreamWriter32BELSB
 32-bit big-endian data, LSB to MSB. More...
 
typedef BitStreamWriterImpl< 64, true, true > BitStreamWriter64LEMSB
 64-bit little-endian data, MSB to LSB. More...
 
typedef BitStreamWriterImpl< 64, true, false > BitStreamWriter64LELSB
 64-bit little-endian data, LSB to MSB. More...
 
typedef BitStreamWriterImpl< 64, false, true > BitStreamWriter64BEMSB
 64-bit big-endian data, MSB to LSB. More...
 
typedef BitStreamWriterImpl< 64, false, false > BitStreamWriter64BELSB
 64-bit big-endian data, LSB to MSB. More...
 
typedef StackException Exception
 
typedef std::map< UString, UStringStringMap
 
typedef std::map< UString, UString, UString::ilessStringIMap
 
typedef boost::unordered_map< UString, UString, hashUStringCaseSensitiveStringHashMap
 
typedef boost::unordered_map< UString, UString, hashUStringCaseInsensitiveStringHashIMap
 

Enumerations

enum  Mode { kModeDecrypt = 0, kModeEncrypt = 1 }
 
enum  ConfigRealm { kConfigRealmDefault, kConfigRealmGameTemp }
 Special config realms. More...
 
enum  DebugChannel {
  kDebugGraphics, kDebugSound, kDebugVideo, kDebugEvents,
  kDebugScripts, kDebugGLAPI, kDebugGLWindow, kDebugGLShader,
  kDebugGL3rd, kDebugGLApp, kDebugGLOther, kDebugEngineGraphics,
  kDebugEngineSound, kDebugEngineVideo, kDebugEngineEvents, kDebugEngineScripts,
  kDebugEngineLogic, kDebugActionScript, kDebugChannelCount, kDebugChannelAll
}
 All debug channels. More...
 
enum  DebugGLType {
  kDebugGLTypeError, kDebugGLTypeDeprecated, kDebugGLTypeUndefined, kDebugGLTypePortability,
  kDebugGLTypePerformance, kDebugGLTypeOther, kDebugGLTypeMAX
}
 Types of OpenGL debug messages. More...
 
enum  Encoding {
  kEncodingInvalid = -1, kEncodingASCII, kEncodingUTF8, kEncodingUTF16LE,
  kEncodingUTF16BE, kEncodingLatin9, kEncodingCP1250, kEncodingCP1251,
  kEncodingCP1252, kEncodingCP932, kEncodingCP936, kEncodingCP949,
  kEncodingCP950, kEncodingMAX
}
 
enum  HashAlgo {
  kHashNone = -1, kHashDJB2 = 0, kHashFNV32 = 1, kHashFNV64 = 2,
  kHashCRC32 = 3, kHashMAX
}
 The algorithm used for hashing. More...
 
enum  PEResourceType {
  kPECursor = 0x1, kPEBitmap = 0x2, kPEIcon = 0x3, kPEMenu = 0x4,
  kPEDialog = 0x5, kPEString = 0x6, kPEFontDir = 0x7, kPEFont = 0x8,
  kPEAccelerator = 0x9, kPERCData = 0xA, kPEMessageTable = 0xB, kPEGroupCursor = 0xC,
  kPEGroupIcon = 0xE, kPEVersion = 0x10, kPEDlgInclude = 0x11, kPEPlugPlay = 0x13,
  kPEVXD = 0x14, kPEAniCursor = 0x15, kPEAniIcon = 0x16, kPEHTML = 0x17,
  kPEManifest = 0x18
}
 The default Windows PE resources. More...
 

Functions

template<class T >
gcd (T a, T b)
 Euclid's algorithm to compute the greatest common divisor. More...
 
template<typename TK , typename TV >
const BinSearchValue< TK, TV > * binarySearch (const BinSearchValue< TK, TV > *map, size_t size, const TK &value)
 Search through this sorted list of key/value pairs. More...
 
static uint32 F (const BlowfishContext &ctx, uint32 x)
 
static void blowfishEnc (BlowfishContext &ctx, uint32 &xl, uint32 &xr)
 
static void blowfishDec (BlowfishContext &ctx, uint32 &xl, uint32 &xr)
 
static void blowfishSetKey (BlowfishContext &ctx, const byte *key, size_t keyLength)
 
static void blowfishECB (BlowfishContext &ctx, Mode mode, const byte *input, byte *output)
 
MemoryReadStreamblowfishEBC (SeekableReadStream &input, const std::vector< byte > &key, Mode mode)
 
MemoryReadStreamencryptBlowfishEBC (SeekableReadStream &input, const std::vector< byte > &key)
 Encrypt the stream with the Blowfish algorithm in EBC mode. More...
 
MemoryReadStreamdecryptBlowfishEBC (SeekableReadStream &input, const std::vector< byte > &key)
 Decrypt the stream with the Blowfish algorithm in EBC mode. More...
 
const float * getCosineTable (int bits)
 
static bool isOpenGLDebugChannel (DebugChannel channel)
 
static void setZStreamInput (z_stream &strm, size_t size, const byte *data)
 
static void initZStream (z_stream &strm, int windowBits, size_t size, const byte *data)
 
bytedecompressDeflate (const byte *data, size_t inputSize, size_t outputSize, int windowBits)
 Decompress (inflate) using zlib's DEFLATE algorithm. More...
 
bytedecompressDeflateWithoutOutputSize (const byte *data, size_t inputSize, size_t &outputSize, int windowBits, unsigned int frameSize=4096)
 Decompress (inflate) using zlib's DEFLATE algorithm without knowing the output size. More...
 
SeekableReadStreamdecompressDeflate (ReadStream &input, size_t inputSize, size_t outputSize, int windowBits)
 Decompress (inflate) using zlib's DEFLATE algorithm. More...
 
SeekableReadStreamdecompressDeflateWithoutOutputSize (ReadStream &input, size_t inputSize, int windowBits, unsigned int frameSize=4096)
 Decompress (inflate) using zlib's DEFLATE algorithm without knowing the output size. More...
 
size_t decompressDeflateChunk (SeekableReadStream &input, int windowBits, byte *output, size_t outputSize, unsigned int frameSize=4096)
 Decompress (inflate) using zlib's DEFLATE algorithm, until a stream end marker was reached. More...
 
UString getEncodingName (Encoding encoding)
 Return the human readable name of an encoding. More...
 
bool hasSupportEncoding (Encoding encoding)
 Do we have support for this encoding? More...
 
static uint32 readFakeChar (SeekableReadStream &stream, Encoding encoding)
 
static void writeFakeChar (std::vector< byte > &output, uint32 c, Encoding encoding)
 
static UString createString (std::vector< byte > &output, Encoding encoding)
 
UString readString (SeekableReadStream &stream, Encoding encoding)
 Read a string with the given encoding of a stream. More...
 
UString readStringFixed (SeekableReadStream &stream, Encoding encoding, size_t length)
 Read length bytes as a string with the given encoding out of a stream. More...
 
UString readStringLine (SeekableReadStream &stream, Encoding encoding)
 Read a line with the given encoding out of a stream. More...
 
UString readString (const byte *data, size_t size, Encoding encoding)
 Read a string with the given encoding from the raw buffer. More...
 
size_t writeString (WriteStream &stream, const Common::UString &str, Encoding encoding, bool terminate=true)
 Write a string into a stream with a given encoding. More...
 
void writeStringFixed (WriteStream &stream, const Common::UString &str, Encoding encoding, size_t length)
 Write a string into a stream with a given encoding and fixed length in bytes. More...
 
MemoryReadStreamconvertString (const UString &str, Encoding encoding, bool terminateString=true)
 Convert a string into the given encoding. More...
 
size_t getBytesPerCodepoint (Encoding encoding)
 Return the number of bytes per codepoint in this encoding. More...
 
bool isValidCodepoint (Encoding encoding, uint32 cp)
 Return whether the given codepoint is valid in this encoding. More...
 
void printException (Exception &e, const UString &prefix="ERROR: ")
 Print a whole exception stack to stderr and the log. More...
 
static void exceptionDispatcher (const char *prefix, const char *reason="")
 
void exceptionDispatcherError (const char *s,...) GCC_PRINTF(1
 Exception dispatcher that prints the exception as an error, and adds another reason on top. More...
 
void exceptionDispatcherError ()
 Exception dispatcher that prints the exception as an error. More...
 
void exceptionDispatcherWarning (const char *s,...) GCC_PRINTF(1
 Exception dispatcher that prints the exception as a warning, and adds another reason on top. More...
 
void exceptionDispatcherWarning ()
 Exception dispatcher that prints the exception as a warning. More...
 
static void pass (Complex *z, const float *wre, unsigned int n)
 
static void pass_big (Complex *z, const float *wre, unsigned int n)
 
static void fft4 (Complex *z)
 
static void fft8 (Complex *z)
 
static void fft16 (Complex *z)
 
static void fft32 (Complex *z)
 
static void fft64 (Complex *z)
 
static void fft128 (Complex *z)
 
static void fft256 (Complex *z)
 
static void fft512 (Complex *z)
 
static void fft1024 (Complex *z)
 
static void fft2048 (Complex *z)
 
static void fft4096 (Complex *z)
 
static void fft8192 (Complex *z)
 
static void fft16384 (Complex *z)
 
static void fft32768 (Complex *z)
 
static void fft65536 (Complex *z)
 
static path convertToSlash (const path &p)
 
static void splitDirectories (const UString &directory, std::list< UString > &dirs)
 
static UString findSubDirectory_internal (const UString &directory, const UString &subDirectory, bool caseInsensitive)
 
static uint32 hashDJB2 (uint32 hash, uint32 c)
 
static uint32 hashStringDJB2 (const UString &string)
 
static uint32 hashStringDJB2 (const UString &string, Encoding encoding)
 
static uint32 hashFNV32 (uint32 hash, uint32 c)
 
static uint32 hashStringFNV32 (const UString &string)
 
static uint32 hashStringFNV32 (const UString &string, Encoding encoding)
 
static uint64 hashFNV64 (uint64 hash, uint32 c)
 
static uint64 hashStringFNV64 (const UString &string)
 
static uint64 hashStringFNV64 (const UString &string, Encoding encoding)
 
static uint32 hashCRC32 (uint32 hash, uint32 c)
 
static uint32 hashStringCRC32 (const UString &string)
 
static uint32 hashStringCRC32 (const UString &string, Encoding encoding)
 
static uint64 hashString (const UString &string, HashAlgo algo)
 Hash the string with the given algorithm, as a series of UTF-8 characters. More...
 
static uint64 hashString (const UString &string, HashAlgo algo, Encoding encoding)
 Hash the string with the given algorithm, as a series of bytes in the given encoding. More...
 
static UString formatHash (uint64 hash)
 
static void *LZMA_API_CALL lzmaAlloc (void *opaque, size_t nmemb, size_t size)
 
static void LZMA_API_CALL lzmaFree (void *opaque, void *ptr)
 
bytedecompressLZMA1 (const byte *data, size_t inputSize, size_t outputSize, bool noEndMarker=false)
 Decompress using the LZMA1 algorithm. More...
 
SeekableReadStreamdecompressLZMA1 (ReadStream &input, size_t inputSize, size_t outputSize, bool noEndMarker=false)
 Decompress using the LZMA1 algorithm. More...
 
static int intLog2 (uint32 v)
 
static float rad2deg (float rad)
 
static float deg2rad (float deg)
 
static const bytemd5Body (MD5Context &ctx, const byte *data, size_t size)
 
static void md5Update (MD5Context &ctx, const byte *data, size_t size)
 
static void md5Final (byte *result, MD5Context &ctx)
 
void hashMD5 (ReadStream &stream, std::vector< byte > &digest)
 Hash the stream into an MD5 digest of 16 bytes. More...
 
void hashMD5 (const byte *data, size_t dataLength, std::vector< byte > &digest)
 Hash the data into an MD5 digest of 16 bytes. More...
 
void hashMD5 (const UString &string, std::vector< byte > &digest)
 Hash the string into an MD5 digest of 16 bytes. More...
 
void hashMD5 (const std::vector< byte > &data, std::vector< byte > &digest)
 Hash the array of data into an MD5 digest of 16 bytes. More...
 
bool compareMD5Digest (ReadStream &stream, const std::vector< byte > &digest)
 Hash the stream and compare the digests, returning true if they match. More...
 
bool compareMD5Digest (const byte *data, size_t dataLength, const std::vector< byte > &digest)
 Hash the array of data and compare the digests, returning true if they match. More...
 
bool compareMD5Digest (const UString &string, const std::vector< byte > &digest)
 Hash the string and compare the digests, returning true if they match. More...
 
bool compareMD5Digest (const std::vector< byte > &data, const std::vector< byte > &digest)
 Hash the array of data and compare the digests, returning true if they match. More...
 
const Rational operator+ (int left, const Rational &right)
 
const Rational operator- (int left, const Rational &right)
 
const Rational operator* (int left, const Rational &right)
 
const Rational operator/ (int left, const Rational &right)
 
bool operator== (int left, const Rational &right)
 
bool operator!= (int left, const Rational &right)
 
bool operator> (int left, const Rational &right)
 
bool operator< (int left, const Rational &right)
 
bool operator>= (int left, const Rational &right)
 
bool operator<= (int left, const Rational &right)
 
static long getInitialSize (std::FILE *handle)
 
const float * getSineTable (int bits)
 
const float * getSineWindow (int bits)
 
void printDataHex (SeekableReadStream &stream, size_t size=SIZE_MAX)
 Print a quick hex dump of the given data. More...
 
void printDataHex (const byte *data, size_t size)
 Print a quick hex dump of the given data. More...
 
static bool tagToString (uint32 tag, bool trim, UString &str)
 
UString debugTag (uint32 tag, bool trim=false)
 Create an elaborate string from an integer tag, for debugging purposes. More...
 
static void errorOnSign (const char *str)
 
static void parse (const char *nptr, char **endptr, signed long long &value)
 
static void parse (const char *nptr, char **endptr, unsigned long long &value)
 
static void parse (const char *nptr, char **endptr, signed long &value)
 
static void parse (const char *nptr, char **endptr, unsigned long &value)
 
static void parse (const char *nptr, char **endptr, signed int &value)
 
static void parse (const char *nptr, char **endptr, unsigned int &value)
 
static void parse (const char *nptr, char **endptr, signed short &value)
 
static void parse (const char *nptr, char **endptr, unsigned short &value)
 
static void parse (const char *nptr, char **endptr, signed char &value)
 
static void parse (const char *nptr, char **endptr, unsigned char &value)
 
static void parse (const char *nptr, char **endptr, float &value)
 
static void parse (const char *nptr, char **endptr, double &value)
 
template<typename T >
void parseString (const UString &str, T &value, bool allowEmpty=false)
 Parse a string into any POD integer, float/double or bool type. More...
 
template<>
void parseString (const UString &str, bool &value, bool allowEmpty)
 
template void parseString< signed char > (const UString &str, signed char &value, bool allowEmpty)
 
template void parseString< unsigned char > (const UString &str, unsigned char &value, bool allowEmpty)
 
template void parseString< signed short > (const UString &str, signed short &value, bool allowEmpty)
 
template void parseString< unsigned short > (const UString &str, unsigned short &value, bool allowEmpty)
 
template void parseString< signed int > (const UString &str, signed int &value, bool allowEmpty)
 
template void parseString< unsigned int > (const UString &str, unsigned int &value, bool allowEmpty)
 
template void parseString< signed long > (const UString &str, signed long &value, bool allowEmpty)
 
template void parseString< unsigned long > (const UString &str, unsigned long &value, bool allowEmpty)
 
template void parseString< signed long long > (const UString &str, signed long long &value, bool allowEmpty)
 
template void parseString< unsigned long long > (const UString &str, unsigned long long &value, bool allowEmpty)
 
template void parseString< float > (const UString &str, float &value, bool allowEmpty)
 
template void parseString< double > (const UString &str, double &value, bool allowEmpty)
 
template<typename T >
UString composeString (T value)
 Convert any POD integer, float/double or bool type into a string. More...
 
template<>
UString composeString (bool value)
 
template<>
UString composeString (float value)
 
template<>
UString composeString (double value)
 
template UString composeString< signed char > (signed char value)
 
template UString composeString< unsigned char > (unsigned char value)
 
template UString composeString< signed short > (signed short value)
 
template UString composeString< unsigned short > (unsigned short value)
 
template UString composeString< signed int > (signed int value)
 
template UString composeString< unsigned int > (unsigned int value)
 
template UString composeString< signed long > (signed long value)
 
template UString composeString< unsigned long > (unsigned long value)
 
template UString composeString< signed long long > (signed long long value)
 
template UString composeString< unsigned long long > (unsigned long long value)
 
size_t searchBackwards (SeekableReadStream &haystack, const byte *needle, size_t needleSize, size_t maxReadBack=SIZE_MAX)
 Search the stream, backwards, for the last occurrence of a set of bytes. More...
 
SeekableReadStreamgetSystemFontMono ()
 Return a stream of the monospaced system font TTF. More...
 
void initThreads ()
 Initialize the global threading system. More...
 
bool initedThreads ()
 Was the global threading system initialized? More...
 
bool isMainThread ()
 Returns true if called from the main thread, false otherwise. More...
 
void enforceMainThread ()
 Throws an Exception if called from a non-main thread. More...
 
static UString operator+ (const std::string &left, const UString &right)
 
static UString operator+ (const char *left, const UString &right)
 
UString generateIDRandomString ()
 
static boost::atomic< uint32idNumber (1)
 
uint32 generateIDNumber ()
 
static UString uint64ToString (uint64 i)
 
static boost::atomic< uint64idNumberString (1)
 
UString generateIDNumberString ()
 
static void errorFuncUString (void *ctx, const char *msg,...)
 
static int readStream (void *context, char *buffer, int len)
 
static int closeStream (void *context)
 
void initXML ()
 Initialize the XML subsystem. More...
 
void deinitXML ()
 Deinitialize the XML subsystem. More...
 

Variables

static const size_t kMinKeyLength = 4
 
static const size_t kMaxKeyLength = 56
 
static const size_t kRoundCount = 16
 
static const size_t kBlockSize = 8
 
static const uint32 P [kRoundCount+2]
 
static const uint32 S [4][256]
 
static const float cosTable16 [8]
 
static const float cosTable32 [16]
 
static const float cosTable64 [32]
 
static const float cosTable128 [64]
 
static const float cosTable256 [128]
 
static const float cosTable512 [256]
 
static const float cosTable1024 [512]
 
static const float cosTable2048 [1024]
 
static const float cosTable4096 [2048]
 
static const float cosTable8192 [4096]
 
static const float cosTable16384 [8192]
 
static const float cosTable32768 [16384]
 
static const float cosTable65536 [32768]
 
static const float *const cosTables [17]
 
static const char *const kDebugNames [kDebugChannelCount]
 
static const char *const kDebugDescriptions [kDebugChannelCount]
 
static const char *const kDebugGLTypes [kDebugGLTypeMAX]
 
static const int kWindowBitsMax = 15
 
static const int kWindowBitsMaxRaw = -kWindowBitsMax
 
static const char *const kEncodingName [kEncodingMAX]
 
static const size_t kEncodingGrowthFrom [kEncodingMAX]
 
static const size_t kEncodingGrowthTo [kEncodingMAX]
 
static const size_t kTerminatorLength [kEncodingMAX]
 
const Exception kOpenError ("Can't open file")
 Exception when a file couldn't be opened. More...
 
const Exception kReadError ("Read error")
 Exception when reading from a stream failed. More...
 
const Exception kSeekError ("Seek error")
 Exception when seeking a stream failed. More...
 
const Exception kWriteError ("Write error")
 Exception when writing to a stream failed. More...
 
static void(*const fft_dispatch [])(Complex *)
 
static const size_t kFileInvalid = SIZE_MAX
 
static const uint32 kCRC32Tab []
 Table of CRC32 polynomial feedback terms. More...
 
static lzma_allocator kLZMAAllocator
 
const int8 intLog2Table256 [256]
 
static const size_t kMD5Length = 16
 The length of an MD5 digest in bytes. More...
 
static const float sinTable16 [8]
 
static const float sinTable32 [16]
 
static const float sinTable64 [32]
 
static const float sinTable128 [64]
 
static const float sinTable256 [128]
 
static const float sinTable512 [256]
 
static const float sinTable1024 [512]
 
static const float sinTable2048 [1024]
 
static const float sinTable4096 [2048]
 
static const float sinTable8192 [4096]
 
static const float sinTable16384 [8192]
 
static const float sinTable32768 [16384]
 
static const float sinTable65536 [32768]
 
static const float *const sinTables [17]
 
static const float sineWindow32 [32]
 
static const float sineWindow64 [64]
 
static const float sineWindow128 [128]
 
static const float sineWindow256 [256]
 
static const float sineWindow512 [512]
 
static const float sineWindow1024 [1024]
 
static const float sineWindow2048 [2048]
 
static const float sineWindow4096 [4096]
 
static const float *const sineWindows [13]
 
static const byte kDejaVuSansMonoBold []
 The DejaVu Sans Mono Bold font, version 2.35. More...
 

Typedef Documentation

◆ BitStream16BELSB

typedef BitStreamImpl<16, false, false> Common::BitStream16BELSB

16-bit big-endian data, LSB to MSB.

Definition at line 259 of file bitstream.h.

◆ BitStream16BEMSB

typedef BitStreamImpl<16, false, true > Common::BitStream16BEMSB

16-bit big-endian data, MSB to LSB.

Definition at line 257 of file bitstream.h.

◆ BitStream16LELSB

typedef BitStreamImpl<16, true , false> Common::BitStream16LELSB

16-bit little-endian data, LSB to MSB.

Definition at line 255 of file bitstream.h.

◆ BitStream16LEMSB

typedef BitStreamImpl<16, true , true > Common::BitStream16LEMSB

16-bit little-endian data, MSB to LSB.

Definition at line 253 of file bitstream.h.

◆ BitStream32BELSB

typedef BitStreamImpl<32, false, false> Common::BitStream32BELSB

32-bit big-endian data, LSB to MSB.

Definition at line 268 of file bitstream.h.

◆ BitStream32BEMSB

typedef BitStreamImpl<32, false, true > Common::BitStream32BEMSB

32-bit big-endian data, MSB to LSB.

Definition at line 266 of file bitstream.h.

◆ BitStream32LELSB

typedef BitStreamImpl<32, true , false> Common::BitStream32LELSB

32-bit little-endian data, LSB to MSB.

Definition at line 264 of file bitstream.h.

◆ BitStream32LEMSB

typedef BitStreamImpl<32, true , true > Common::BitStream32LEMSB

32-bit little-endian data, MSB to LSB.

Definition at line 262 of file bitstream.h.

◆ BitStream64BELSB

typedef BitStreamImpl<64, false, false> Common::BitStream64BELSB

64-bit big-endian data, LSB to MSB.

Definition at line 277 of file bitstream.h.

◆ BitStream64BEMSB

typedef BitStreamImpl<64, false, true > Common::BitStream64BEMSB

64-bit big-endian data, MSB to LSB.

Definition at line 275 of file bitstream.h.

◆ BitStream64LELSB

typedef BitStreamImpl<64, true , false> Common::BitStream64LELSB

64-bit little-endian data, LSB to MSB.

Definition at line 273 of file bitstream.h.

◆ BitStream64LEMSB

typedef BitStreamImpl<64, true , true > Common::BitStream64LEMSB

64-bit little-endian data, MSB to LSB.

Definition at line 271 of file bitstream.h.

◆ BitStream8LSB

typedef BitStreamImpl<8, false, false> Common::BitStream8LSB

8-bit data, LSB to MSB.

Definition at line 250 of file bitstream.h.

◆ BitStream8MSB

typedef BitStreamImpl<8, false, true > Common::BitStream8MSB

8-bit data, MSB to LSB.

Definition at line 248 of file bitstream.h.

◆ BitStreamWriter16BELSB

16-bit big-endian data, LSB to MSB.

Definition at line 205 of file bitstreamwriter.h.

◆ BitStreamWriter16BEMSB

16-bit big-endian data, MSB to LSB.

Definition at line 203 of file bitstreamwriter.h.

◆ BitStreamWriter16LELSB

16-bit little-endian data, LSB to MSB.

Definition at line 201 of file bitstreamwriter.h.

◆ BitStreamWriter16LEMSB

16-bit little-endian data, MSB to LSB.

Definition at line 199 of file bitstreamwriter.h.

◆ BitStreamWriter32BELSB

32-bit big-endian data, LSB to MSB.

Definition at line 214 of file bitstreamwriter.h.

◆ BitStreamWriter32BEMSB

32-bit big-endian data, MSB to LSB.

Definition at line 212 of file bitstreamwriter.h.

◆ BitStreamWriter32LELSB

32-bit little-endian data, LSB to MSB.

Definition at line 210 of file bitstreamwriter.h.

◆ BitStreamWriter32LEMSB

32-bit little-endian data, MSB to LSB.

Definition at line 208 of file bitstreamwriter.h.

◆ BitStreamWriter64BELSB

64-bit big-endian data, LSB to MSB.

Definition at line 223 of file bitstreamwriter.h.

◆ BitStreamWriter64BEMSB

64-bit big-endian data, MSB to LSB.

Definition at line 221 of file bitstreamwriter.h.

◆ BitStreamWriter64LELSB

64-bit little-endian data, LSB to MSB.

Definition at line 219 of file bitstreamwriter.h.

◆ BitStreamWriter64LEMSB

64-bit little-endian data, MSB to LSB.

Definition at line 217 of file bitstreamwriter.h.

◆ BitStreamWriter8LSB

8-bit data, LSB to MSB.

Definition at line 196 of file bitstreamwriter.h.

◆ BitStreamWriter8MSB

8-bit data, MSB to LSB.

Definition at line 194 of file bitstreamwriter.h.

◆ Exception

Definition at line 59 of file error.h.

◆ StringHashIMap

Definition at line 40 of file stringmap.h.

◆ StringHashMap

Definition at line 39 of file stringmap.h.

◆ StringIMap

Definition at line 37 of file stringmap.h.

◆ StringMap

typedef std::map<UString, UString> Common::StringMap

Definition at line 36 of file stringmap.h.

Enumeration Type Documentation

◆ ConfigRealm

Special config realms.

Enumerator
kConfigRealmDefault 

Application or game defaults.

kConfigRealmGameTemp 

Temporary game settings/properties.

Definition at line 45 of file configman.h.

◆ DebugChannel

All debug channels.

Enumerator
kDebugGraphics 

"GGraphics", global, non-engine graphics.

kDebugSound 

"GSound", global, non-engine sound.

kDebugVideo 

"GVideo", global, non-engine video (movies).

kDebugEvents 

"GEvents", global, non-engine events.

kDebugScripts 

"GScripts", global, non-engine scripts.

kDebugGLAPI 

"GGLAPI", OpenGL debug message generated by the GL.

kDebugGLWindow 

"GGLWindow", OpenGL debug message generated by the windowing system.

kDebugGLShader 

"GGLShader", OpenGL debug message generated by the shader compiler.

kDebugGL3rd 

"GGL3rd", OpenGL debug message generated by third party middleware.

kDebugGLApp 

"GGLApp", OpenGL debug message generated by the application.

kDebugGLOther 

"GGLOther", OpenGL debug message generated by other sources.

kDebugEngineGraphics 

"EGraphics", engine graphics.

kDebugEngineSound 

"ESound", engine sound.

kDebugEngineVideo 

"EVideo", engine video.

kDebugEngineEvents 

"EEvents", engine events.

kDebugEngineScripts 

"EScripts", engine scripts.

kDebugEngineLogic 

"ELogic", engine game logic.

kDebugActionScript 

"GActionScript", actionscript interpreter

kDebugChannelCount 

Total number of debug channels.

kDebugChannelAll 

Special value to refer to all debug channel.

Definition at line 41 of file debugman.h.

◆ DebugGLType

Types of OpenGL debug messages.

See the OpenGL docs for GL_ARB_debug_output.

Enumerator
kDebugGLTypeError 

Events that generated an error.

kDebugGLTypeDeprecated 

Behavior that has been marked for deprecation.

kDebugGLTypeUndefined 

Behavior that is undefined according to the specification.

kDebugGLTypePortability 

Implementation-dependent performance warnings.

kDebugGLTypePerformance 

Use of extensions or shaders in a way that is highly vendor-specific.

kDebugGLTypeOther 

Types of events that do not fit any of the ones listed above.

kDebugGLTypeMAX 

For range checks.

Definition at line 69 of file debugman.h.

◆ Encoding

Enumerator
kEncodingInvalid 
kEncodingASCII 

Plain, unextended ASCII (7bit clean).

kEncodingUTF8 

UTF-8.

kEncodingUTF16LE 

UTF-16 LE (little endian).

kEncodingUTF16BE 

UTF-16 BE (big endian).

kEncodingLatin9 

ISO-8859-15 (Latin-9).

kEncodingCP1250 

Windows codepage 1250 (Eastern European, Latin alphabet).

kEncodingCP1251 

Windows codepage 1251 (Eastern European, Cyrillic alphabet).

kEncodingCP1252 

Windows codepage 1252 (Western European, Latin alphabet).

kEncodingCP932 

Windows codepage 932 (Japanese, extended Shift-JIS).

kEncodingCP936 

Windows codepage 936 (Simplified Chinese, extended GB2312 with GBK codepoints).

kEncodingCP949 

Windows codepage 949 (Korean, similar to EUC-KR).

kEncodingCP950 

Windows codepage 950 (Traditional Chinese, similar to Big5).

kEncodingMAX 

For range checks.

Definition at line 37 of file encoding.h.

◆ HashAlgo

The algorithm used for hashing.

Enumerator
kHashNone 

No hashing at all.

kHashDJB2 

djb2 hash function by Daniel J. Bernstein.

kHashFNV32 

32bit Fowler-Noll-Vo hash by Glenn Fowler, Landon Curt Noll and Phong Vo.

kHashFNV64 

64bit Fowler-Noll-Vo hash by Glenn Fowler, Landon Curt Noll and Phong Vo.

kHashCRC32 

32bit CRC.

kHashMAX 

For range checks.

Definition at line 37 of file hash.h.

◆ Mode

Enumerator
kModeDecrypt 
kModeEncrypt 

Definition at line 65 of file blowfish.cpp.

◆ PEResourceType

The default Windows PE resources.

Enumerator
kPECursor 
kPEBitmap 
kPEIcon 
kPEMenu 
kPEDialog 
kPEString 
kPEFontDir 
kPEFont 
kPEAccelerator 
kPERCData 
kPEMessageTable 
kPEGroupCursor 
kPEGroupIcon 
kPEVersion 
kPEDlgInclude 
kPEPlugPlay 
kPEVXD 
kPEAniCursor 
kPEAniIcon 
kPEHTML 
kPEManifest 

Definition at line 74 of file pe_exe.h.

Function Documentation

◆ binarySearch()

template<typename TK , typename TV >
const BinSearchValue<TK, TV>* Common::binarySearch ( const BinSearchValue< TK, TV > *  map,
size_t  size,
const TK &  value 
)

Search through this sorted list of key/value pairs.

Definition at line 41 of file binsearch.h.

Referenced by Aurora::findGDAHeader().

Here is the caller graph for this function:

◆ blowfishDec()

static void Common::blowfishDec ( BlowfishContext ctx,
uint32 xl,
uint32 xr 
)
static

Definition at line 261 of file blowfish.cpp.

References F(), kRoundCount, Common::BlowfishContext::P, and SWAP().

Referenced by blowfishECB().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ blowfishEBC()

MemoryReadStream* Common::blowfishEBC ( SeekableReadStream input,
const std::vector< byte > &  key,
Mode  mode 
)

◆ blowfishECB()

static void Common::blowfishECB ( BlowfishContext ctx,
Mode  mode,
const byte input,
byte output 
)
static

Definition at line 317 of file blowfish.cpp.

References blowfishDec(), blowfishEnc(), kModeDecrypt, and kModeEncrypt.

Referenced by blowfishEBC().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ blowfishEnc()

static void Common::blowfishEnc ( BlowfishContext ctx,
uint32 xl,
uint32 xr 
)
static

Definition at line 247 of file blowfish.cpp.

References F(), kRoundCount, Common::BlowfishContext::P, and SWAP().

Referenced by blowfishECB(), and blowfishSetKey().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ blowfishSetKey()

static void Common::blowfishSetKey ( BlowfishContext ctx,
const byte key,
size_t  keyLength 
)
static

Definition at line 275 of file blowfish.cpp.

References blowfishEnc(), kMaxKeyLength, kMinKeyLength, kRoundCount, Common::BlowfishContext::P, P, Common::BlowfishContext::S, and S.

Referenced by blowfishEBC().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ closeStream()

static int Common::closeStream ( void *  context)
static

Definition at line 62 of file xml.cpp.

Referenced by Common::XMLParser::XMLParser().

Here is the caller graph for this function:

◆ compareMD5Digest() [1/4]

bool Common::compareMD5Digest ( ReadStream stream,
const std::vector< byte > &  digest 
)

Hash the stream and compare the digests, returning true if they match.

Definition at line 280 of file md5.cpp.

Referenced by Aurora::ERFFile::verifyPasswordDigest().

Here is the caller graph for this function:

◆ compareMD5Digest() [2/4]

bool Common::compareMD5Digest ( const byte data,
size_t  dataLength,
const std::vector< byte > &  digest 
)

Hash the array of data and compare the digests, returning true if they match.

Definition at line 290 of file md5.cpp.

◆ compareMD5Digest() [3/4]

bool Common::compareMD5Digest ( const UString string,
const std::vector< byte > &  digest 
)

Hash the string and compare the digests, returning true if they match.

Definition at line 300 of file md5.cpp.

◆ compareMD5Digest() [4/4]

bool Common::compareMD5Digest ( const std::vector< byte > &  data,
const std::vector< byte > &  digest 
)

Hash the array of data and compare the digests, returning true if they match.

Definition at line 304 of file md5.cpp.

◆ composeString() [1/4]

template<typename T >
UString Common::composeString ( value)

Convert any POD integer, float/double or bool type into a string.

Definition at line 276 of file strutil.cpp.

References ABS().

Referenced by Engines::KotOR::SaveLoadMenu::addSavedGameItems(), Graphics::Aurora::Texture::create(), Sound::SoundManager::formatChannel(), Aurora::NWScript::formatVariable(), Engines::KotOR::SaveLoadMenu::getBaseNameFromDirectory(), Sound::WwiseSoundBank::getFileStruct(), Engines::KotOR2::CharacterGenerationInfo::getHeadId(), Engines::KotOR::Creature::getHeadMeshString(), Engines::KotOR2::Functions::getLocalBoolean(), Engines::KotOR::Functions::getLocalBoolean(), Engines::DragonAge2::Functions::getLocalCommand(), Engines::DragonAge2::Functions::getLocalEffect(), Engines::DragonAge2::Functions::getLocalEvent(), Engines::DragonAge2::Functions::getLocalFloat(), Engines::DragonAge2::Functions::getLocalInt(), Engines::DragonAge2::Functions::getLocalItemProperty(), Engines::DragonAge2::Functions::getLocalLocation(), Engines::KotOR2::Functions::getLocalNumber(), Engines::KotOR::Functions::getLocalNumber(), Engines::DragonAge2::Functions::getLocalObject(), Engines::DragonAge2::Functions::getLocalPlayer(), Engines::DragonAge2::Functions::getLocalResource(), Engines::DragonAge2::Functions::getLocalString(), Engines::KotOR::CharacterGenerationInfo::getPortrait(), Engines::KotOR2::CharacterGenerationInfo::getPortrait(), Sound::FMODSampleBank::getSample(), Sound::FMODSampleBank::getSampleName(), Sound::WwiseSoundBank::getSoundData(), Sound::WwiseSoundBank::getSoundStruct(), Aurora::GFF3Struct::getString(), Sound::XACTWaveBank_ASCII::getWave(), Sound::XACTWaveBank_Binary::getWave(), Engines::DragonAge::Functions::intToString(), Engines::DragonAge2::Functions::intToString(), Engines::KotOR2::Functions::intToString(), Engines::NWN::Functions::intToString(), Engines::NWN2::Functions::intToString(), Engines::KotOR::Functions::intToString(), Engines::Witcher::Functions::intToString(), Engines::Jade::Functions::intToString(), Sound::FMODSampleBank::load(), Sound::XACTWaveBank_Binary::load(), Sound::WwiseSoundBank::load(), Engines::KotOR::PartySelectionGUI::loadConfiguration(), Graphics::Aurora::Texture::loadImage(), Engines::KotOR::PartySelectionGUI::onSelectionChanged(), Sound::CodebookLibrary::rebuild(), Common::ConfigDomain::setBool(), Common::ConfigManager::setBool(), Common::DebugManager::setConfigToVerbosityLevels(), Common::ConfigDomain::setDouble(), Common::ConfigManager::setDouble(), Common::ConfigDomain::setInt(), Common::ConfigManager::setInt(), Engines::KotOR2::Functions::setLocalBoolean(), Engines::KotOR::Functions::setLocalBoolean(), Engines::DragonAge2::Functions::setLocalCommand(), Engines::DragonAge2::Functions::setLocalEffect(), Engines::DragonAge2::Functions::setLocalEvent(), Engines::DragonAge2::Functions::setLocalFloat(), Engines::DragonAge2::Functions::setLocalInt(), Engines::DragonAge2::Functions::setLocalItemProperty(), Engines::DragonAge2::Functions::setLocalLocation(), Engines::KotOR2::Functions::setLocalNumber(), Engines::KotOR::Functions::setLocalNumber(), Engines::DragonAge2::Functions::setLocalObject(), Engines::DragonAge2::Functions::setLocalPlayer(), Engines::DragonAge2::Functions::setLocalResource(), Engines::DragonAge2::Functions::setLocalString(), Engines::KotOR::HUD::setPortrait(), Engines::KotOR::PartySelectionGUI::setSlotTexture(), Common::ConfigDomain::setUint(), Engines::KotOR::PartySelectionGUI::toggleSlot(), Sound::SoundManager::update(), and Aurora::TwoDAFile::writeBinary().

Here is the call graph for this function:

◆ composeString() [2/4]

template<>
UString Common::composeString ( bool  value)

Definition at line 326 of file strutil.cpp.

◆ composeString() [3/4]

template<>
UString Common::composeString ( float  value)

Definition at line 330 of file strutil.cpp.

References Common::UString::format().

Here is the call graph for this function:

◆ composeString() [4/4]

template<>
UString Common::composeString ( double  value)

Definition at line 334 of file strutil.cpp.

References Common::UString::format().

Here is the call graph for this function:

◆ composeString< signed char >()

template UString Common::composeString< signed char > ( signed char  value)

◆ composeString< signed int >()

template UString Common::composeString< signed int > ( signed int  value)

◆ composeString< signed long >()

template UString Common::composeString< signed long > ( signed long  value)

◆ composeString< signed long long >()

template UString Common::composeString< signed long long > ( signed long long  value)

◆ composeString< signed short >()

template UString Common::composeString< signed short > ( signed short  value)

◆ composeString< unsigned char >()

template UString Common::composeString< unsigned char > ( unsigned char  value)

◆ composeString< unsigned int >()

template UString Common::composeString< unsigned int > ( unsigned int  value)

◆ composeString< unsigned long >()

template UString Common::composeString< unsigned long > ( unsigned long  value)

◆ composeString< unsigned long long >()

template UString Common::composeString< unsigned long long > ( unsigned long long  value)

◆ composeString< unsigned short >()

template UString Common::composeString< unsigned short > ( unsigned short  value)

◆ convertString()

MemoryReadStream * Common::convertString ( const UString str,
Encoding  encoding,
bool  terminateString = true 
)

Convert a string into the given encoding.

Parameters
strThe string to convert.
encodingThe encoding to convert the string into.
terminateStringShould the result contain a terminating end-of- string sequence?
Returns
A newly created MemoryReadStream of the converted string.

Definition at line 358 of file encoding.cpp.

References Common::UString::c_str(), ConvMan, and kEncodingUTF8.

Referenced by hashStringCRC32(), hashStringDJB2(), hashStringFNV32(), hashStringFNV64(), writeString(), and writeStringFixed().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ convertToSlash()

static path Common::convertToSlash ( const path &  p)
static

Definition at line 117 of file filepath.cpp.

Referenced by Common::FilePath::absolutize(), and Common::FilePath::normalize().

Here is the caller graph for this function:

◆ createString()

static UString Common::createString ( std::vector< byte > &  output,
Encoding  encoding 
)
static

Definition at line 270 of file encoding.cpp.

References ConvMan, kEncodingASCII, and kEncodingUTF8.

Referenced by readString(), readStringFixed(), and readStringLine().

Here is the caller graph for this function:

◆ debugTag()

UString Common::debugTag ( uint32  tag,
bool  trim = false 
)

Create an elaborate string from an integer tag, for debugging purposes.

If all 4 bytes of the integer are printable characters, return "0xXXXX ('cccc')" Otherwise, return "0xXXXX"

Definition at line 117 of file strutil.cpp.

References Common::UString::c_str(), Common::UString::format(), and tagToString().

Referenced by Aurora::GDAFile::add(), Video::ActimagineDecoder::load(), Aurora::LTRFile::load(), Graphics::Aurora::PLTFile::load(), Graphics::Aurora::Model_NWN2::load(), Aurora::RIMFile::load(), Engines::NWN2::TRXFile::load(), Aurora::KEYFile::load(), Aurora::BZFFile::load(), Sound::FMODSampleBank::load(), Aurora::TalkTable_TLK::load(), Sound::XACTWaveBank_Binary::load(), Aurora::BIFFile::load(), Sound::WwiseSoundBank::load(), Aurora::GDAFile::load(), Video::Bink::load(), Aurora::TwoDAFile::load(), Video::XboxMediaVideo::load(), Engines::DragonAge::Area::loadEnvironment(), Engines::DragonAge2::Area::loadEnvironment(), Aurora::GFF3File::loadHeader(), Aurora::GFF4File::loadHeader(), Engines::DragonAge::Room::loadLayout(), Engines::DragonAge2::Room::loadLayout(), Engines::DragonAge2::Creature::loadModelsHeadMorph(), Engines::DragonAge::Creature::loadModelsHeadMorph(), Engines::NWN2::TRXFile::loadPacket(), Graphics::Aurora::ModelNode_NWN2::loadRigid(), Graphics::Aurora::ModelNode_NWN2::loadSkin(), Sound::SoundManager::makeAudioStream(), Sound::makeWAVStream(), Graphics::Aurora::Model_DragonAge::ParserContext::open(), Graphics::NCGR::readChar(), Graphics::Aurora::NFTRFont::readCharMaps(), Engines::DragonAge::Campaign::readCIFDynamic(), Engines::DragonAge2::Campaign::readCIFDynamic(), Engines::DragonAge::Campaign::readCIFStatic(), Engines::DragonAge2::Campaign::readCIFStatic(), Aurora::NSBTXFile::readFileHeader(), Graphics::Aurora::NFTRFont::readGlyphs(), Graphics::NCLR::readHeader(), Graphics::XEOSITEX::readHeader(), Graphics::NCGR::readHeader(), Graphics::Aurora::NFTRFont::readHeader(), Graphics::Aurora::Model_Sonic::readHeader(), Graphics::Aurora::NFTRFont::readInfo(), Aurora::NSBTXFile::readInfoHeader(), Graphics::Aurora::ModelNode_DragonAge::readMAO(), Graphics::Aurora::Model_Sonic::readModelHeader(), Graphics::NCLR::readPalette(), Aurora::SSFFile::readSSFHeader(), Graphics::Aurora::NFTRFont::readWidths(), and Aurora::ERFFile::verifyVersion().

Here is the call graph for this function:

◆ decompressDeflate() [1/2]

byte * Common::decompressDeflate ( const byte data,
size_t  inputSize,
size_t  outputSize,
int  windowBits 
)

Decompress (inflate) using zlib's DEFLATE algorithm.

Parameters
dataThe compressed input data.
inputSizeThe size of the input data in bytes.
outputSizeThe size of the decompressed output data. It is assumed that this information is known and that the whole decompressed data will fit into a buffer of this size.
windowBitsThe base two logarithm of the window size (the size of the history buffer). See the zlib documentation on inflateInit2() for details.
Returns
The decompressed data.

Definition at line 63 of file deflate.cpp.

References Common::ScopedPtrBase< T, Deallocator >::get(), initZStream(), and Common::ScopedPtrBase< T, Deallocator >::release().

Referenced by decompressDeflate(), Common::ZipFile::decompressFile(), and Aurora::ERFFile::decompressZlib().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ decompressDeflate() [2/2]

SeekableReadStream * Common::decompressDeflate ( ReadStream input,
size_t  inputSize,
size_t  outputSize,
int  windowBits 
)

Decompress (inflate) using zlib's DEFLATE algorithm.

Parameters
inputThe compressed input data.
inputSizeThe size of the input data to read in bytes.
outputSizeThe size of the decompressed output data. It is assumed that this information is known and that the whole decompressed data will fit into a buffer of this size.
windowBitsThe base two logarithm of the window size (the size of the history buffer). See the zlib documentation on inflateInit2() for details.
Returns
A stream of the decompressed data.

Definition at line 130 of file deflate.cpp.

References decompressDeflate(), Common::ScopedPtrBase< T, Deallocator >::get(), kReadError, and Common::ReadStream::read().

Here is the call graph for this function:

◆ decompressDeflateChunk()

size_t Common::decompressDeflateChunk ( SeekableReadStream input,
int  windowBits,
byte output,
size_t  outputSize,
unsigned int  frameSize = 4096 
)

Decompress (inflate) using zlib's DEFLATE algorithm, until a stream end marker was reached.

Used for decompressing and reassembling a file that was split into multiple, individually compressed chunks. This function decompresses a single chunk.

Parameters
inputThe compressed input data.
windowBitsThe base two logarithm of the window size (the size of the history buffer). See the zlib documentation on inflateInit2() for details.
outputThe output of the current chunk is stored here.
outputSizeMaximum number of bytes to write into output.
frameSizeThe size of frame for reading from the input stream.
Returns
The number of bytes written to output.

Definition at line 154 of file deflate.cpp.

References Common::ScopedPtrBase< T, Deallocator >::get(), initZStream(), Common::SeekableReadStream::kOriginCurrent, kReadError, Common::SeekableReadStream::pos(), Common::ReadStream::read(), Common::SeekableReadStream::seek(), setZStreamInput(), and Common::SeekableReadStream::size().

Referenced by Aurora::OBBFile::getResource().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ decompressDeflateWithoutOutputSize() [1/2]

byte * Common::decompressDeflateWithoutOutputSize ( const byte data,
size_t  inputSize,
size_t &  outputSize,
int  windowBits,
unsigned int  frameSize = 4096 
)

Decompress (inflate) using zlib's DEFLATE algorithm without knowing the output size.

Parameters
dataThe compressed input data.
inputSizeThe size of the input data in bytes.
outputSizeThe size of the decompressed output data.
windowBitsThe base two logarithm of the window size (the size of the history buffer). See the zlib documentation on inflateInit2() for details.
frameSizeThe size of the extracted frames, defaults to 4096.
Returns
The decompressed data

Definition at line 96 of file deflate.cpp.

References Common::ScopedPtrBase< T, Deallocator >::get(), initZStream(), and Common::ScopedPtrBase< T, Deallocator >::release().

Referenced by decompressDeflateWithoutOutputSize(), Aurora::OBBFile::getIndex(), and Aurora::GFXFile::load().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ decompressDeflateWithoutOutputSize() [2/2]

SeekableReadStream * Common::decompressDeflateWithoutOutputSize ( ReadStream input,
size_t  inputSize,
int  windowBits,
unsigned int  frameSize = 4096 
)

Decompress (inflate) using zlib's DEFLATE algorithm without knowing the output size.

Parameters
inputThe compressed input data.
inputSizeThe size of the input data to read in bytes.
windowBitsThe base two logarithm of the window size (the size of the history buffer). See the zlib documentation on inflateInit2() for details.
frameSizeThe size of the extracted frames, defaults to 4096.
Returns
A stream of the decompressed data.

Definition at line 142 of file deflate.cpp.

References decompressDeflateWithoutOutputSize(), Common::ScopedPtrBase< T, Deallocator >::get(), kReadError, and Common::ReadStream::read().

Here is the call graph for this function:

◆ decompressLZMA1() [1/2]

byte * Common::decompressLZMA1 ( const byte data,
size_t  inputSize,
size_t  outputSize,
bool  noEndMarker = false 
)

Decompress using the LZMA1 algorithm.

Parameters
dataThe compressed input data.
inputSizeThe size of the input data in bytes.
outputSizeThe size of the decompressed output data. It is assumed that this information is known and that the whole decompressed data will fit into a buffer of this size.
noEndMarkerThe compressed stream has no end marker.
Returns
The decompressed data.

Definition at line 65 of file lzma.cpp.

References Common::ScopedPtrBase< T, Deallocator >::get(), kLZMAAllocator, and Common::ScopedPtrBase< T, Deallocator >::release().

Referenced by decompressLZMA1(), and Aurora::BZFFile::getResource().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ decompressLZMA1() [2/2]

SeekableReadStream * Common::decompressLZMA1 ( ReadStream input,
size_t  inputSize,
size_t  outputSize,
bool  noEndMarker = false 
)

Decompress using the LZMA1 algorithm.

Parameters
inputThe compressed input data.
inputSizeThe size of the input data to read in bytes.
outputSizeThe size of the decompressed output data. It is assumed that this information is known and that the whole decompressed data will fit into a buffer of this size.
noEndMarkerThe compressed stream has no end marker.
Returns
A stream of the decompressed data.

Definition at line 123 of file lzma.cpp.

References decompressLZMA1(), Common::ScopedPtrBase< T, Deallocator >::get(), kReadError, and Common::ReadStream::read().

Here is the call graph for this function:

◆ decryptBlowfishEBC()

MemoryReadStream * Common::decryptBlowfishEBC ( SeekableReadStream input,
const std::vector< byte > &  key 
)

Decrypt the stream with the Blowfish algorithm in EBC mode.

Definition at line 374 of file blowfish.cpp.

References blowfishEBC(), kModeDecrypt, and Common::SeekableReadStream::size().

Referenced by Aurora::ERFFile::decrypt().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ deg2rad()

static float Common::deg2rad ( float  deg)
inlinestatic

Definition at line 97 of file maths.h.

References M_PI.

Referenced by Graphics::Aurora::Cube::applyTransformation(), Graphics::Aurora::ModelNode::calcRenderTransform(), Engines::KotOR::CharacterGenerationMenu::CharacterGenerationMenu(), Engines::KotOR::ClassSelectionMenu::ClassSelectionMenu(), Graphics::Aurora::ModelNode::computeAbsoluteTransform(), Engines::KotOR2::Functions::cos(), Engines::NWN::Functions::cos(), Engines::NWN2::Functions::cos(), Engines::KotOR::Functions::cos(), Engines::Witcher::Functions::cos(), Engines::Jade::Functions::cos(), Graphics::Aurora::ModelNode::createAbsoluteBound(), Graphics::Aurora::Model::createAbsolutePosition(), Graphics::Aurora::ModelNode::drawSkeleton(), Engines::Sonic::Area::getCameraLimits(), Engines::Sonic::Area::getCameraPosition(), Engines::Sonic::Area::getWorldPosition(), Engines::KotOR2::Placeable::load(), Engines::KotOR::Placeable::load(), Engines::KotOR::Door::load(), Engines::KotOR2::Door::load(), Engines::DragonAge::Room::loadLayout(), Engines::DragonAge2::Room::loadLayout(), Engines::KotOR2::DialogGUI::makeLookAtPC(), Engines::KotOR::DialogGUI::makeLookAtPC(), Graphics::CameraManager::moveRelative(), Graphics::GraphicsManager::perspective(), Graphics::GraphicsManager::project(), Engines::NWN::NewGameFog::renderImmediate(), Graphics::GraphicsManager::renderWorld(), Graphics::GraphicsManager::renderWorldShader(), Common::BoundingBox::rotate(), Graphics::Aurora::Model::rotate(), Engines::SatelliteCamera::setPitch(), Engines::Sonic::AreaBackground::setPosition(), Engines::NWN::Functions::sin(), Engines::NWN2::Functions::sin(), Engines::KotOR2::Functions::sin(), Engines::Witcher::Functions::sin(), Engines::KotOR::Functions::sin(), Engines::Jade::Functions::sin(), Engines::NWN2::Functions::tan(), Engines::KotOR2::Functions::tan(), Engines::NWN::Functions::tan(), Engines::KotOR::Functions::tan(), Engines::Witcher::Functions::tan(), Engines::Jade::Functions::tan(), and Graphics::GraphicsManager::unproject().

Here is the caller graph for this function:

◆ deinitXML()

void Common::deinitXML ( )

Deinitialize the XML subsystem.

Needs to be called from the main thread.

Definition at line 71 of file xml.cpp.

Referenced by deinit().

Here is the caller graph for this function:

◆ encryptBlowfishEBC()

MemoryReadStream * Common::encryptBlowfishEBC ( SeekableReadStream input,
const std::vector< byte > &  key 
)

Encrypt the stream with the Blowfish algorithm in EBC mode.

Definition at line 370 of file blowfish.cpp.

References blowfishEBC(), and kModeEncrypt.

Referenced by Aurora::ERFFile::verifyPasswordDigest().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ enforceMainThread()

void Common::enforceMainThread ( )

Throws an Exception if called from a non-main thread.

Definition at line 60 of file threads.cpp.

References isMainThread().

Referenced by Graphics::GraphicsManager::deinit(), Graphics::WindowManager::init(), Graphics::GraphicsManager::init(), Events::EventsManager::processEvents(), Graphics::GraphicsManager::renderScene(), and Graphics::takeScreenshot().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ errorFuncUString()

static void Common::errorFuncUString ( void *  ctx,
const char *  msg,
  ... 
)
static

Definition at line 40 of file xml.cpp.

References STRINGBUFLEN.

Referenced by Common::XMLParser::XMLParser().

Here is the caller graph for this function:

◆ errorOnSign()

static void Common::errorOnSign ( const char *  str)
static

Definition at line 127 of file strutil.cpp.

Referenced by parse().

Here is the caller graph for this function:

◆ exceptionDispatcher()

static void Common::exceptionDispatcher ( const char *  prefix,
const char *  reason = "" 
)
static

Definition at line 118 of file error.cpp.

References Common::StackException::add(), and printException().

Referenced by exceptionDispatcherError(), and exceptionDispatcherWarning().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ exceptionDispatcherError() [1/2]

void Common::exceptionDispatcherError ( const char *  s,
  ... 
)

Exception dispatcher that prints the exception as an error, and adds another reason on top.

This is intended for fatal errors.

Definition at line 143 of file error.cpp.

References exceptionDispatcher(), and STRINGBUFLEN.

Referenced by initPlatform(), main(), and Engines::GameThread::threadMethod().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ exceptionDispatcherError() [2/2]

void void Common::exceptionDispatcherError ( )

Exception dispatcher that prints the exception as an error.

This is intended for fatal errors.

Definition at line 154 of file error.cpp.

References exceptionDispatcher().

Here is the call graph for this function:

◆ exceptionDispatcherWarning() [1/2]

void Common::exceptionDispatcherWarning ( const char *  s,
  ... 
)

Exception dispatcher that prints the exception as a warning, and adds another reason on top.

This is intended for non-fatal exceptions that can be ignored.

Definition at line 158 of file error.cpp.

References exceptionDispatcher(), and STRINGBUFLEN.

Referenced by Graphics::Aurora::CursorManager::add(), Graphics::Aurora::TTFFont::addChar(), Engines::Jade::MainMenu::callbackActive(), Graphics::Aurora::Model_Sonic::createGeometry(), Engines::KotOR::GUI::createWidget(), Engines::Witcher::Functions::executeScript(), Engines::NWN::Functions::executeScript(), Engines::NWN2::Functions::executeScript(), Common::ConfigDomain::getBool(), Common::ConfigManager::getBool(), Graphics::Aurora::PLTFile::getColorRows(), Common::ConfigDomain::getDouble(), Common::ConfigManager::getDouble(), Common::ConfigDomain::getInt(), Common::ConfigManager::getInt(), Engines::NWN::Creature::getPCListInfo(), Common::ConfigDomain::getUint(), Sound::SoundManager::init(), Engines::NWN::CharPremadeMenu::initCharacterList(), Common::ConfigManager::load(), Engines::loadModelGUI(), Engines::loadModelObject(), Engines::NWN::NewXP1Menu::loadModule(), Engines::NWN::NewXP2Menu::loadModule(), Engines::NWN::NewMenu::loadModule(), Engines::NWN::NewModuleMenu::loadModule(), Engines::NWN::NewPremiumMenu::loadModule(), Engines::KotOR::Module::loadSavedGame(), Engines::NWN2::Object::loadSSF(), Engines::NWN::Object::loadSSF(), Engines::NWN2::Area::loadTerrain(), Graphics::Aurora::ModelNode::loadTextures(), Graphics::Aurora::Texture::loadTXI(), Engines::NWN::CharPremadeMenu::playCharacter(), Engines::Jade::Game::playMenuMusic(), Engines::playSound(), Engines::playVideo(), Engines::DragonAge::Campaigns::readCampaign(), Engines::DragonAge2::Campaigns::readCampaign(), Graphics::Aurora::ModelNode_Jade::readMaterialTextures(), Graphics::Aurora::TextureManager::reloadAll(), Engines::Jade::Game::run(), Engines::NWN::ScriptContainer::runScript(), Engines::KotOR::ScriptContainer::runScript(), Engines::Jade::ScriptContainer::runScript(), Engines::NWN2::ScriptContainer::runScript(), Engines::KotOR2::ScriptContainer::runScript(), Engines::Witcher::ScriptContainer::runScript(), Engines::DragonAge2::ScriptContainer::runScript(), Engines::DragonAge::ScriptContainer::runScript(), Aurora::DLGFile::runScript(), Common::ConfigManager::save(), Engines::Witcher::Object::speakOneLiner(), Engines::NWN2::Object::speakOneLiner(), Engines::NWN::Object::speakOneLiner(), Engines::KotOR2::CharacterGeneration::start(), Engines::KotOR::CharacterGenerationMenu::start(), Engines::NWN::IngameGUI::startConversation(), and Graphics::GraphicsManager::unproject().

Here is the call graph for this function:

◆ exceptionDispatcherWarning() [2/2]

void void Common::exceptionDispatcherWarning ( )

Exception dispatcher that prints the exception as a warning.

This is intended for non-fatal exceptions that can be ignored.

Definition at line 169 of file error.cpp.

References exceptionDispatcher().

Here is the call graph for this function:

◆ F()

static uint32 Common::F ( const BlowfishContext ctx,
uint32  x 
)
static

Definition at line 235 of file blowfish.cpp.

References Common::BlowfishContext::S.

Referenced by blowfishDec(), blowfishEnc(), and md5Body().

Here is the caller graph for this function:

◆ fft1024()

static void Common::fft1024 ( Complex z)
static

Definition at line 258 of file fft.cpp.

◆ fft128()

static void Common::fft128 ( Complex z)
static

Definition at line 254 of file fft.cpp.

◆ fft16()

static void Common::fft16 ( Complex z)
static

Definition at line 236 of file fft.cpp.

References fft4(), fft8(), getCosineTable(), sqrthalf, TRANSFORM, and TRANSFORM_ZERO.

Here is the call graph for this function:

◆ fft16384()

static void Common::fft16384 ( Complex z)
static

Definition at line 262 of file fft.cpp.

◆ fft2048()

static void Common::fft2048 ( Complex z)
static

Definition at line 259 of file fft.cpp.

◆ fft256()

static void Common::fft256 ( Complex z)
static

Definition at line 255 of file fft.cpp.

◆ fft32()

static void Common::fft32 ( Complex z)
static

Definition at line 252 of file fft.cpp.

◆ fft32768()

static void Common::fft32768 ( Complex z)
static

Definition at line 263 of file fft.cpp.

◆ fft4()

static void Common::fft4 ( Complex z)
static

Definition at line 202 of file fft.cpp.

References BF.

Referenced by fft16(), and fft8().

Here is the caller graph for this function:

◆ fft4096()

static void Common::fft4096 ( Complex z)
static

Definition at line 260 of file fft.cpp.

◆ fft512()

static void Common::fft512 ( Complex z)
static

Definition at line 256 of file fft.cpp.

◆ fft64()

static void Common::fft64 ( Complex z)
static

Definition at line 253 of file fft.cpp.

◆ fft65536()

static void Common::fft65536 ( Complex z)
static

Definition at line 264 of file fft.cpp.

◆ fft8()

static void Common::fft8 ( Complex z)
static

Definition at line 216 of file fft.cpp.

References BF, fft4(), sqrthalf, and TRANSFORM.

Referenced by fft16().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ fft8192()

static void Common::fft8192 ( Complex z)
static

Definition at line 261 of file fft.cpp.

◆ findSubDirectory_internal()

static UString Common::findSubDirectory_internal ( const UString directory,
const UString subDirectory,
bool  caseInsensitive 
)
static

Definition at line 278 of file filepath.cpp.

References Common::UString::c_str().

Referenced by Common::FilePath::findSubDirectory().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ formatHash()

static UString Common::formatHash ( uint64  hash)
inlinestatic

Definition at line 261 of file hash.h.

References Common::UString::format().

Referenced by Aurora::ResourceManager::checkHashCollision(), Aurora::ResourceManager::dumpResourcesList(), and Sound::WwiseSoundBank::WwiseSoundBank().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ gcd()

template<class T >
T Common::gcd ( a,
b 
)

Euclid's algorithm to compute the greatest common divisor.

Definition at line 59 of file algorithm.h.

Referenced by Common::Rational::cancel(), Common::Timestamp::cmp(), Common::Timestamp::convertToFramerate(), Common::Timestamp::frameDiff(), Common::Rational::operator*=(), Common::Rational::operator+=(), and Common::Rational::operator-=().

Here is the caller graph for this function:

◆ generateIDNumber()

uint32 Common::generateIDNumber ( )

◆ generateIDNumberString()

UString Common::generateIDNumberString ( )

Definition at line 65 of file uuid.cpp.

References idNumberString(), and uint64ToString().

Referenced by Engines::NWN::WidgetListItemFeat::WidgetListItemFeat().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ generateIDRandomString()

UString Common::generateIDRandomString ( )

◆ getBytesPerCodepoint()

size_t Common::getBytesPerCodepoint ( Encoding  encoding)

Return the number of bytes per codepoint in this encoding.

Note: This will throw on encodings with a variable number of bytes per codepoint.

Definition at line 366 of file encoding.cpp.

References kEncodingASCII, kEncodingCP1250, kEncodingCP1251, kEncodingCP1252, kEncodingCP932, kEncodingCP936, kEncodingCP949, kEncodingCP950, kEncodingLatin9, kEncodingUTF16BE, kEncodingUTF16LE, and kEncodingUTF8.

Referenced by Aurora::GFF4Struct::getString().

Here is the caller graph for this function:

◆ getCosineTable()

const float * Common::getCosineTable ( int  bits)

Definition at line 8269 of file cosinetables.cpp.

References cosTables.

Referenced by Common::DCT::DCT(), fft16(), and Common::RDFT::RDFT().

Here is the caller graph for this function:

◆ getEncodingName()

UString Common::getEncodingName ( Encoding  encoding)

Return the human readable name of an encoding.

Definition at line 186 of file encoding.cpp.

References kEncodingMAX, and kEncodingName.

◆ getInitialSize()

static long Common::getInitialSize ( std::FILE *  handle)
static

Definition at line 46 of file readfile.cpp.

Referenced by Common::ReadFile::open().

Here is the caller graph for this function:

◆ getSineTable()

const float * Common::getSineTable ( int  bits)

Definition at line 8269 of file sinetables.cpp.

References sinTables.

Referenced by Common::RDFT::RDFT().

Here is the caller graph for this function:

◆ getSineWindow()

const float * Common::getSineWindow ( int  bits)

Definition at line 1081 of file sinewindows.cpp.

References sineWindows.

Referenced by Sound::WMACodec::initMDCT().

Here is the caller graph for this function:

◆ getSystemFontMono()

SeekableReadStream * Common::getSystemFontMono ( )

Return a stream of the monospaced system font TTF.

Definition at line 20763 of file systemfonts.cpp.

References kDejaVuSansMonoBold.

Referenced by Graphics::Aurora::FontManager::createFont().

Here is the caller graph for this function:

◆ hashCRC32()

static uint32 Common::hashCRC32 ( uint32  hash,
uint32  c 
)
inlinestatic

Definition at line 189 of file hash.h.

References kCRC32Tab.

Referenced by hashStringCRC32().

Here is the caller graph for this function:

◆ hashDJB2()

static uint32 Common::hashDJB2 ( uint32  hash,
uint32  c 
)
inlinestatic

Definition at line 47 of file hash.h.

Referenced by hashStringDJB2().

Here is the caller graph for this function:

◆ hashFNV32()

static uint32 Common::hashFNV32 ( uint32  hash,
uint32  c 
)
inlinestatic

Definition at line 76 of file hash.h.

Referenced by hashStringFNV32().

Here is the caller graph for this function:

◆ hashFNV64()

static uint64 Common::hashFNV64 ( uint64  hash,
uint32  c 
)
inlinestatic

Definition at line 105 of file hash.h.

Referenced by hashStringFNV64().

Here is the caller graph for this function:

◆ hashMD5() [1/4]

void Common::hashMD5 ( ReadStream stream,
std::vector< byte > &  digest 
)

Hash the stream into an MD5 digest of 16 bytes.

Definition at line 248 of file md5.cpp.

Referenced by Engines::NWN::Module::preparePremiumModule().

Here is the caller graph for this function:

◆ hashMD5() [2/4]

void Common::hashMD5 ( const byte data,
size_t  dataLength,
std::vector< byte > &  digest 
)

Hash the data into an MD5 digest of 16 bytes.

Definition at line 262 of file md5.cpp.

◆ hashMD5() [3/4]

void Common::hashMD5 ( const UString string,
std::vector< byte > &  digest 
)

Hash the string into an MD5 digest of 16 bytes.

Definition at line 271 of file md5.cpp.

◆ hashMD5() [4/4]

void Common::hashMD5 ( const std::vector< byte > &  data,
std::vector< byte > &  digest 
)

Hash the array of data into an MD5 digest of 16 bytes.

Definition at line 275 of file md5.cpp.

References md5Body().

Here is the call graph for this function:

◆ hashString() [1/2]

static uint64 Common::hashString ( const UString string,
HashAlgo  algo 
)
inlinestatic

Hash the string with the given algorithm, as a series of UTF-8 characters.

Definition at line 218 of file hash.h.

References hashStringCRC32(), hashStringDJB2(), hashStringFNV32(), hashStringFNV64(), kHashCRC32, kHashDJB2, kHashFNV32, and kHashFNV64.

Referenced by Aurora::FileTypeManager::buildHashLookup(), and Aurora::ResourceManager::getHash().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ hashString() [2/2]

static uint64 Common::hashString ( const UString string,
HashAlgo  algo,
Encoding  encoding 
)
inlinestatic

Hash the string with the given algorithm, as a series of bytes in the given encoding.

Definition at line 240 of file hash.h.

References hashStringCRC32(), hashStringDJB2(), hashStringFNV32(), hashStringFNV64(), kHashCRC32, kHashDJB2, kHashFNV32, and kHashFNV64.

Here is the call graph for this function:

◆ hashStringCRC32() [1/2]

static uint32 Common::hashStringCRC32 ( const UString string)
inlinestatic

Definition at line 193 of file hash.h.

References hashCRC32().

Referenced by Aurora::GDAFile::findColumn(), and hashString().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ hashStringCRC32() [2/2]

static uint32 Common::hashStringCRC32 ( const UString string,
Encoding  encoding 
)
inlinestatic

Definition at line 202 of file hash.h.

References convertString(), hashCRC32(), and Common::ReadStream::kEOF.

Here is the call graph for this function:

◆ hashStringDJB2() [1/2]

static uint32 Common::hashStringDJB2 ( const UString string)
inlinestatic

Definition at line 51 of file hash.h.

References hashDJB2().

Referenced by hashString(), and Aurora::HERFFile::searchDictionary().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ hashStringDJB2() [2/2]

static uint32 Common::hashStringDJB2 ( const UString string,
Encoding  encoding 
)
inlinestatic

Definition at line 60 of file hash.h.

References convertString(), hashDJB2(), and Common::ReadStream::kEOF.

Here is the call graph for this function:

◆ hashStringFNV32() [1/2]

static uint32 Common::hashStringFNV32 ( const UString string)
inlinestatic

Definition at line 80 of file hash.h.

References hashFNV32().

Referenced by hashString().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ hashStringFNV32() [2/2]

static uint32 Common::hashStringFNV32 ( const UString string,
Encoding  encoding 
)
inlinestatic

Definition at line 89 of file hash.h.

References convertString(), hashFNV32(), and Common::ReadStream::kEOF.

Here is the call graph for this function:

◆ hashStringFNV64() [1/2]

static uint64 Common::hashStringFNV64 ( const UString string)
inlinestatic

Definition at line 109 of file hash.h.

References hashFNV64().

Referenced by hashString().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ hashStringFNV64() [2/2]

static uint64 Common::hashStringFNV64 ( const UString string,
Encoding  encoding 
)
inlinestatic

Definition at line 118 of file hash.h.

References convertString(), hashFNV64(), and Common::ReadStream::kEOF.

Here is the call graph for this function:

◆ hasSupportEncoding()

bool Common::hasSupportEncoding ( Encoding  encoding)

Do we have support for this encoding?

To support an encoding, we need to be able to convert it to and from UTF-8.

Definition at line 193 of file encoding.cpp.

References ConvMan, and kEncodingUTF8.

◆ idNumber()

static boost::atomic<uint32> Common::idNumber ( )
static

Referenced by generateIDNumber().

Here is the caller graph for this function:

◆ idNumberString()

static boost::atomic<uint64> Common::idNumberString ( )
static

Referenced by generateIDNumberString().

Here is the caller graph for this function:

◆ initedThreads()

bool Common::initedThreads ( )

Was the global threading system initialized?

Definition at line 50 of file threads.cpp.

References threadsInited.

Referenced by deinit().

Here is the caller graph for this function:

◆ initThreads()

void Common::initThreads ( )

Initialize the global threading system.

This needs to be done before any threads are instantiated.

Definition at line 43 of file threads.cpp.

References threadsInited, and threadsMainID.

Referenced by init().

Here is the caller graph for this function:

◆ initXML()

void Common::initXML ( )

Initialize the XML subsystem.

Needs to be called from the main thread.

Definition at line 66 of file xml.cpp.

Referenced by init().

Here is the caller graph for this function:

◆ initZStream()

static void Common::initZStream ( z_stream &  strm,
int  windowBits,
size_t  size,
const byte data 
)
static

Definition at line 49 of file deflate.cpp.

References setZStreamInput().

Referenced by decompressDeflate(), decompressDeflateChunk(), and decompressDeflateWithoutOutputSize().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ intLog2()

static int Common::intLog2 ( uint32  v)
inlinestatic

◆ isMainThread()

bool Common::isMainThread ( )

◆ isOpenGLDebugChannel()

static bool Common::isOpenGLDebugChannel ( DebugChannel  channel)
static

Definition at line 198 of file debugman.cpp.

References kDebugGLAPI, and kDebugGLOther.

Referenced by Common::DebugManager::logDebugGL().

Here is the caller graph for this function:

◆ isValidCodepoint()

bool Common::isValidCodepoint ( Encoding  encoding,
uint32  cp 
)

Return whether the given codepoint is valid in this encoding.

TODO: Implement for Unicode and CJK encodings.

Definition at line 393 of file encoding.cpp.

References kEncodingASCII, kEncodingCP1250, kEncodingCP1251, kEncodingCP1252, kEncodingCP932, kEncodingCP936, kEncodingCP949, kEncodingCP950, kEncodingInvalid, kEncodingLatin9, kEncodingUTF16BE, kEncodingUTF16LE, and kEncodingUTF8.

Referenced by Graphics::Aurora::TextureFont::load().

Here is the caller graph for this function:

◆ lzmaAlloc()

static void* LZMA_API_CALL Common::lzmaAlloc ( void *  opaque,
size_t  nmemb,
size_t  size 
)
static

Definition at line 52 of file lzma.cpp.

◆ lzmaFree()

static void LZMA_API_CALL Common::lzmaFree ( void *  opaque,
void *  ptr 
)
static

Definition at line 56 of file lzma.cpp.

◆ md5Body()

static const byte* Common::md5Body ( MD5Context ctx,
const byte data,
size_t  size 
)
static

Definition at line 136 of file md5.cpp.

References Common::MD5Context::a, Common::MD5Context::b, Common::MD5Context::c, Common::MD5Context::d, F(), G, GET, SET, and STEP.

Referenced by hashMD5().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ md5Final()

static void Common::md5Final ( byte result,
MD5Context ctx 
)
static

Definition at line 200 of file md5.cpp.

◆ md5Update()

static void Common::md5Update ( MD5Context ctx,
const byte data,
size_t  size 
)
static

Definition at line 170 of file md5.cpp.

◆ operator!=()

bool Common::operator!= ( int  left,
const Rational right 
)

Definition at line 323 of file rational.cpp.

◆ operator*()

const Rational Common::operator* ( int  left,
const Rational right 
)

Definition at line 307 of file rational.cpp.

◆ operator+() [1/3]

static UString Common::operator+ ( const std::string &  left,
const UString right 
)
inlinestatic

Definition at line 212 of file ustring.h.

References Common::UString::UString().

Here is the call graph for this function:

◆ operator+() [2/3]

static UString Common::operator+ ( const char *  left,
const UString right 
)
inlinestatic

Definition at line 216 of file ustring.h.

References Common::UString::UString().

Here is the call graph for this function:

◆ operator+() [3/3]

const Rational Common::operator+ ( int  left,
const Rational right 
)

Definition at line 295 of file rational.cpp.

◆ operator-()

const Rational Common::operator- ( int  left,
const Rational right 
)

Definition at line 301 of file rational.cpp.

◆ operator/()

const Rational Common::operator/ ( int  left,
const Rational right 
)

Definition at line 313 of file rational.cpp.

◆ operator<()

bool Common::operator< ( int  left,
const Rational right 
)

Definition at line 331 of file rational.cpp.

◆ operator<=()

bool Common::operator<= ( int  left,
const Rational right 
)

Definition at line 339 of file rational.cpp.

◆ operator==()

bool Common::operator== ( int  left,
const Rational right 
)

Definition at line 319 of file rational.cpp.

◆ operator>()

bool Common::operator> ( int  left,
const Rational right 
)

Definition at line 327 of file rational.cpp.

◆ operator>=()

bool Common::operator>= ( int  left,
const Rational right 
)

Definition at line 335 of file rational.cpp.

◆ parse() [1/12]

static void Common::parse ( const char *  nptr,
char **  endptr,
signed long long &  value 
)
inlinestatic

Definition at line 132 of file strutil.cpp.

References strtoll.

Referenced by parseString().

Here is the caller graph for this function:

◆ parse() [2/12]

static void Common::parse ( const char *  nptr,
char **  endptr,
unsigned long long &  value 
)
inlinestatic

Definition at line 136 of file strutil.cpp.

References errorOnSign(), and strtoull.

Here is the call graph for this function:

◆ parse() [3/12]

static void Common::parse ( const char *  nptr,
char **  endptr,
signed long &  value 
)
inlinestatic

Definition at line 142 of file strutil.cpp.

◆ parse() [4/12]

static void Common::parse ( const char *  nptr,
char **  endptr,
unsigned long &  value 
)
inlinestatic

Definition at line 146 of file strutil.cpp.

References errorOnSign().

Here is the call graph for this function:

◆ parse() [5/12]

static void Common::parse ( const char *  nptr,
char **  endptr,
signed int &  value 
)
inlinestatic

Definition at line 152 of file strutil.cpp.

◆ parse() [6/12]

static void Common::parse ( const char *  nptr,
char **  endptr,
unsigned int &  value 
)
inlinestatic

Definition at line 160 of file strutil.cpp.

References errorOnSign().

Here is the call graph for this function:

◆ parse() [7/12]

static void Common::parse ( const char *  nptr,
char **  endptr,
signed short &  value 
)
inlinestatic

Definition at line 170 of file strutil.cpp.

◆ parse() [8/12]

static void Common::parse ( const char *  nptr,
char **  endptr,
unsigned short &  value 
)
inlinestatic

Definition at line 178 of file strutil.cpp.

References errorOnSign().

Here is the call graph for this function:

◆ parse() [9/12]

static void Common::parse ( const char *  nptr,
char **  endptr,
signed char &  value 
)
inlinestatic

Definition at line 188 of file strutil.cpp.

◆ parse() [10/12]

static void Common::parse ( const char *  nptr,
char **  endptr,
unsigned char &  value 
)
inlinestatic

Definition at line 196 of file strutil.cpp.

References errorOnSign().

Here is the call graph for this function:

◆ parse() [11/12]

static void Common::parse ( const char *  nptr,
char **  endptr,
float &  value 
)
inlinestatic

Definition at line 206 of file strutil.cpp.

References strtof.

◆ parse() [12/12]

static void Common::parse ( const char *  nptr,
char **  endptr,
double &  value 
)
inlinestatic

Definition at line 210 of file strutil.cpp.

◆ parseString() [1/2]

template<typename T >
void Common::parseString ( const UString str,
T &  value,
bool  allowEmpty = false 
)

Parse a string into any POD integer, float/double or bool type.

If allowEmpty is false, parseString() will throw when encountering an empty string. If allowEmpty is true and an empty string is encountered, parseString() will immediately return without modifying the value parameter.

Definition at line 215 of file strutil.cpp.

References Common::UString::c_str(), Common::UString::empty(), and parse().

Referenced by Engines::KotOR::PartySelectionGUI::callbackActive(), Engines::KotOR::Console::cmdAddItem(), Engines::Console::cmdGetString(), Engines::Sonic::Console::cmdGotoArea(), Engines::Console::cmdSetCamera(), Engines::KotOR::SaveLoadMenu::getBaseNameFromDirectory(), Common::ConfigDomain::getBool(), Common::ConfigManager::getBool(), Common::ConfigManager::getDefaultBool(), Common::ConfigManager::getDefaultDouble(), Common::ConfigManager::getDefaultInt(), Common::ConfigDomain::getDouble(), Common::ConfigManager::getDouble(), Common::ConfigDomain::getInt(), Common::ConfigManager::getInt(), Common::ConfigDomain::getUint(), Aurora::TextureAtlasFile::load(), Aurora::VISFile::load(), Sound::XACTWaveBank_ASCII::load(), Aurora::LYTFile::load(), Graphics::Aurora::ModelNode_NWN_ASCII::load(), Graphics::TXI::load(), Graphics::Aurora::Model_NWN::loadASCII(), Aurora::TwoDAFile::parseFloat(), Aurora::TwoDAFile::parseInt(), Graphics::Aurora::ModelNode_NWN_ASCII::readFaces(), Graphics::Aurora::ModelNode_NWN_ASCII::readFloats(), Engines::DragonAge::Campaign::readManifest(), Engines::DragonAge2::Campaign::readManifest(), Graphics::Aurora::ModelNode_NWN_ASCII::readTCoords(), Graphics::Aurora::ModelNode_NWN_ASCII::readVCoords(), Engines::WidgetListBox::selectItemByWidgetTag(), Engines::KotORInventoryItem::setContents(), Common::DebugManager::setVerbosityLevelsFromConfig(), Engines::KotOR2::Functions::stringToFloat(), Engines::NWN2::Functions::stringToFloat(), Engines::NWN::Functions::stringToFloat(), Engines::KotOR::Functions::stringToFloat(), Engines::Witcher::Functions::stringToFloat(), Engines::Jade::Functions::stringToFloat(), Engines::DragonAge2::Functions::stringToFloat(), Engines::DragonAge::Functions::stringToFloat(), Engines::KotOR2::Functions::stringToInt(), Engines::NWN2::Functions::stringToInt(), Engines::NWN::Functions::stringToInt(), Engines::KotOR::Functions::stringToInt(), Engines::Witcher::Functions::stringToInt(), Engines::DragonAge2::Functions::stringToInt(), Engines::Jade::Functions::stringToInt(), Engines::DragonAge::Functions::stringToInt(), Engines::DragonAge::Functions::stringToVector(), Engines::DragonAge2::Functions::stringToVector(), Engines::Jade::AreaLayout::updateCamera(), and Aurora::ERFFile::verifyPasswordDigest().

Here is the call graph for this function:

◆ parseString() [2/2]

template<>
void Common::parseString ( const UString str,
bool &  value,
bool  allowEmpty 
)

Definition at line 242 of file strutil.cpp.

References Common::UString::empty(), and Common::UString::equalsIgnoreCase().

Here is the call graph for this function:

◆ parseString< double >()

template void Common::parseString< double > ( const UString str,
double &  value,
bool  allowEmpty 
)

◆ parseString< float >()

template void Common::parseString< float > ( const UString str,
float &  value,
bool  allowEmpty 
)

◆ parseString< signed char >()

template void Common::parseString< signed char > ( const UString str,
signed char &  value,
bool  allowEmpty 
)

◆ parseString< signed int >()

template void Common::parseString< signed int > ( const UString str,
signed int &  value,
bool  allowEmpty 
)

◆ parseString< signed long >()

template void Common::parseString< signed long > ( const UString str,
signed long &  value,
bool  allowEmpty 
)

◆ parseString< signed long long >()

template void Common::parseString< signed long long > ( const UString str,
signed long long &  value,
bool  allowEmpty 
)

◆ parseString< signed short >()

template void Common::parseString< signed short > ( const UString str,
signed short &  value,
bool  allowEmpty 
)

◆ parseString< unsigned char >()

template void Common::parseString< unsigned char > ( const UString str,
unsigned char &  value,
bool  allowEmpty 
)

◆ parseString< unsigned int >()

template void Common::parseString< unsigned int > ( const UString str,
unsigned int &  value,
bool  allowEmpty 
)

◆ parseString< unsigned long >()

template void Common::parseString< unsigned long > ( const UString str,
unsigned long &  value,
bool  allowEmpty 
)

◆ parseString< unsigned long long >()

template void Common::parseString< unsigned long long > ( const UString str,
unsigned long long &  value,
bool  allowEmpty 
)

◆ parseString< unsigned short >()

template void Common::parseString< unsigned short > ( const UString str,
unsigned short &  value,
bool  allowEmpty 
)

◆ pass()

static void Common::pass ( Complex z,
const float *  wre,
unsigned int  n 
)
static

Definition at line 188 of file fft.cpp.

◆ pass_big()

static void Common::pass_big ( Complex z,
const float *  wre,
unsigned int  n 
)
static

Definition at line 191 of file fft.cpp.

◆ printDataHex() [1/2]

void Common::printDataHex ( SeekableReadStream stream,
size_t  size = SIZE_MAX 
)

Print a quick hex dump of the given data.

Definition at line 42 of file strutil.cpp.

References kReadError, Common::SeekableReadStream::pos(), Common::ReadStream::read(), Common::SeekableReadStream::seek(), and Common::SeekableReadStream::size().

Referenced by printDataHex().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ printDataHex() [2/2]

void Common::printDataHex ( const byte data,
size_t  size 
)

Print a quick hex dump of the given data.

Definition at line 95 of file strutil.cpp.

References printDataHex().

Here is the call graph for this function:

◆ printException()

void Common::printException ( Exception e,
const UString prefix = "ERROR: " 
)

Print a whole exception stack to stderr and the log.

Definition at line 95 of file error.cpp.

References Common::UString::c_str(), Common::StackException::getStack(), and status().

Referenced by Engines::KotOR::SaveLoadMenu::addSavedGameItems(), Engines::KotOR::Creature::equipItem(), exceptionDispatcher(), Engines::Jade::Functions::executeScript(), Engines::KotOR::MenuEquipment::fillEquipableItemsList(), and Engines::KotOR::ContainerMenu::fillFromInventory().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ rad2deg()

static float Common::rad2deg ( float  rad)
inlinestatic

Definition at line 93 of file maths.h.

References M_PI.

Referenced by Engines::KotOR2::Functions::acos(), Engines::NWN::Functions::acos(), Engines::NWN2::Functions::acos(), Engines::KotOR::Functions::acos(), Engines::Witcher::Functions::acos(), Engines::Jade::Functions::acos(), Engines::KotOR2::Functions::asin(), Engines::NWN::Functions::asin(), Engines::NWN2::Functions::asin(), Engines::KotOR::Functions::asin(), Engines::Witcher::Functions::asin(), Engines::Jade::Functions::asin(), Engines::KotOR2::Functions::atan(), Engines::NWN::Functions::atan(), Engines::NWN2::Functions::atan(), Engines::KotOR::Functions::atan(), Engines::Witcher::Functions::atan(), Engines::Jade::Functions::atan(), Engines::NWN2::Module::enter(), Engines::NWN::Module::enter(), Engines::KotOR::Module::enter(), Engines::Witcher::Module::getEntryIFOLocation(), Engines::KotOR2::Module::getEntryIFOLocation(), Engines::KotOR::Module::getEntryIFOLocation(), Engines::KotOR2::Module::handlePCMovement(), Engines::KotOR::Module::handlePCMovement(), Graphics::Aurora::Animation::interpolateOrientation(), Engines::KotOR::Waypoint::load(), Engines::KotOR2::Waypoint::load(), Engines::NWN::Waypoint::load(), Engines::NWN2::Waypoint::load(), Engines::Witcher::Waypoint::load(), Engines::DragonAge2::Waypoint::load(), Engines::DragonAge::Waypoint::load(), Engines::Sonic::Placeable::load(), Engines::NWN::Situated::load(), Engines::Witcher::Situated::load(), Engines::NWN2::Situated::load(), Graphics::Aurora::ModelNode_KotOR::load(), Graphics::Aurora::ModelNode_Jade::load(), Engines::KotOR2::Situated::load(), Engines::KotOR::Situated::load(), Graphics::Aurora::ModelNode_NWN_ASCII::load(), Engines::KotOR2::Creature::load(), Engines::KotOR::Creature::load(), Engines::NWN2::Creature::load(), Engines::NWN::Creature::load(), Graphics::Aurora::ModelNode_Sonic::load(), Engines::DragonAge::Room::loadLayout(), Engines::DragonAge2::Room::loadLayout(), Engines::DragonAge::Placeable::loadProperties(), Engines::DragonAge2::Placeable::loadProperties(), Engines::KotOR2::Object::makeLookAt(), Engines::KotOR::Object::makeLookAt(), Graphics::Aurora::ModelNode_Witcher::readNodeControllers(), Graphics::Aurora::ModelNode_NWN_Binary::readNodeControllers(), Graphics::Aurora::ModelNode_DragonAge::readTransformation(), Graphics::Aurora::Model::rotate(), and Engines::SatelliteCamera::update().

◆ readFakeChar()

static uint32 Common::readFakeChar ( SeekableReadStream stream,
Encoding  encoding 
)
static

Definition at line 198 of file encoding.cpp.

References kEncodingASCII, kEncodingCP1250, kEncodingCP1251, kEncodingCP1252, kEncodingCP932, kEncodingCP936, kEncodingCP949, kEncodingCP950, kEncodingLatin9, kEncodingUTF16BE, kEncodingUTF16LE, kEncodingUTF8, and Common::ReadStream::read().

Referenced by readString(), and readStringLine().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ readStream()

static int Common::readStream ( void *  context,
char *  buffer,
int  len 
)
static

Definition at line 54 of file xml.cpp.

References Common::ReadStream::read().

Referenced by Aurora::TheWitcherSaveFile::getResource(), and Common::XMLParser::XMLParser().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ readString() [1/2]

UString Common::readString ( SeekableReadStream stream,
Encoding  encoding 
)

Read a string with the given encoding of a stream.

Reading stops after an end-of-string terminating sequence has been read. For single- and variable-byte encodings, this is 0x00 ('\0'). For 2-byte encodings, this is 0x0000. For 4-byte encodings, this is 0x00000000.

Definition at line 287 of file encoding.cpp.

References createString(), Common::ReadStream::eos(), readFakeChar(), and writeFakeChar().

Referenced by Graphics::Aurora::convertToUTF32(), Graphics::Aurora::NFTRFont::convertToUTF32(), Graphics::Aurora::Model_Witcher::load(), Aurora::GFF4File::loadStrings(), Aurora::GFXFile::readNullTerminatedString(), Aurora::LocString::readString(), Aurora::TalkTable_TLK::readString(), Aurora::TalkTable_GFF::readString05(), Graphics::Aurora::Model_KotOR::readStrings(), and Graphics::Aurora::Model_Jade::readStrings().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ readString() [2/2]

UString Common::readString ( const byte data,
size_t  size,
Encoding  encoding 
)

Read a string with the given encoding from the raw buffer.

The raw buffer may or may not end in a terminating end-of-string sequence.

Definition at line 327 of file encoding.cpp.

References createString().

Here is the call graph for this function:

◆ readStringFixed()

UString Common::readStringFixed ( SeekableReadStream stream,
Encoding  encoding,
size_t  length 
)

Read length bytes as a string with the given encoding out of a stream.

Exactly length bytes will be read out of the stream (unless reading out of the stream fails).

Definition at line 297 of file encoding.cpp.

References createString(), and Common::ReadStream::read().

Referenced by Common::FoxPro::getString(), Aurora::GFF3Struct::getString(), Aurora::GFF4Struct::getString(), Sound::WwRIFFVorbisStream::init(), Aurora::NDSFile::isNDS(), Aurora::SACFile::load(), Aurora::TheWitcherSaveFile::load(), Graphics::Aurora::Model_Witcher::load(), Common::ZipFile::load(), Graphics::Aurora::Model_KotOR::load(), Graphics::Aurora::Model_Jade::load(), Graphics::Aurora::ModelNode_Witcher::load(), Sound::FMODSampleBank::load(), Graphics::Aurora::ModelNode_NWN_Binary::load(), Sound::XACTWaveBank_Binary::load(), Sound::WwiseSoundBank::load(), Graphics::Aurora::Model_NWN::loadBinary(), Common::FoxPro::loadFields(), Graphics::Aurora::ModelNode_NWN_Binary::loadName(), Graphics::Aurora::ModelNode_NWN2::loadRigid(), Graphics::Aurora::ModelNode_NWN2::loadSkin(), Engines::NWN2::TRXFile::loadTRRN(), Engines::NWN2::TRXFile::loadWATR(), Aurora::NWScript::NCSFile::o_const(), Common::PEResources::parseResourceLevel(), Graphics::Aurora::Model_KotOR::readAnim(), Graphics::Aurora::Model_NWN::readAnimBinary(), Aurora::KEYFile::readBIFList(), Aurora::HERFFile::readDictionary(), Aurora::SSFFile::readEntriesNWN(), Aurora::TalkTable_TLK::readEntryTableV3(), Graphics::Aurora::Model_Sonic::readInfoOffset(), Graphics::Aurora::Model_Sonic::readInfoOffsetCount(), Aurora::GFF3Struct::readLabel(), Aurora::FEVFile::readLengthPrefixedString(), Aurora::GFXFile::readLengthPrefixedString(), Graphics::Aurora::ModelNode_Jade::readMaterialTextures(), Graphics::Aurora::ModelNode_Witcher::readMesh(), Graphics::Aurora::ModelNode_NWN_Binary::readMesh(), Graphics::Aurora::ModelNode_KotOR::readMesh(), Graphics::Aurora::ModelNode_Jade::readMesh(), Aurora::NDSFile::readNames(), Aurora::NSBTXFile::readPalettes(), Aurora::OBBFile::readResList(), Aurora::RIMFile::readResList(), Aurora::KEYFile::readResList(), Graphics::Aurora::ModelNode_Witcher::readTexturePaint(), Aurora::NSBTXFile::readTextures(), Aurora::ERFFile::readV10KeyList(), Aurora::ERFFile::readV11KeyList(), Aurora::ERFFile::readV20ResList(), Aurora::ERFFile::readV21ResList(), and Aurora::ERFFile::readV22ResList().

Here is the call graph for this function:

◆ readStringLine()

UString Common::readStringLine ( SeekableReadStream stream,
Encoding  encoding 
)

Read a line with the given encoding out of a stream.

Reading stops after an end-of-line sequence has been read. For single- and variable-byte encodings, this is 0x0A ('
', LF, line feed). For 2- byte encodings, this is 0x000A. For 4-byte encodings, this is 0x0000000A.

Any occurrence of '' (CR, carriage return, 0x0D/0x000D/0x0000000D) will be read and ignored, and not stored in the resulting string. This way, both Unix-like (GNU/Linux, Mac OS X, *BSD) and DOS-like (DOS, Windows) newlines can be understood.

Definition at line 310 of file encoding.cpp.

References createString(), Common::ReadStream::eos(), readFakeChar(), and writeFakeChar().

Referenced by Graphics::TXI::load(), Common::ConfigFile::load(), Aurora::TwoDAFile::load(), and Graphics::Aurora::ModelNode_Witcher::readTextures().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ searchBackwards()

size_t Common::searchBackwards ( SeekableReadStream haystack,
const byte needle,
size_t  needleSize,
size_t  maxReadBack = SIZE_MAX 
)

Search the stream, backwards, for the last occurrence of a set of bytes.

Example:

  • haystack contains "ax abc axy azx"
  • needle is "ax"
  • needleSize is 2

This example returns 7.

Parameters
haystackThe stream to search through.
needleThe bytes to search for.
needleSizeThe length of the needle in bytes.
maxReadBackOnly look at the last maxReadBack bytes of the stream.
Returns
The offset, in bytes, of the needle from the start of the stream, or SIZE_MAX if the needle couldn't be found.

Definition at line 349 of file strutil.cpp.

References Common::ReadStream::read(), Common::SeekableReadStream::seek(), Common::SeekableReadStream::size(), and SIZE_MAX.

Referenced by Aurora::OBBFile::getIndex(), and Common::ZipFile::load().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setZStreamInput()

static void Common::setZStreamInput ( z_stream &  strm,
size_t  size,
const byte data 
)
static

Definition at line 37 of file deflate.cpp.

Referenced by decompressDeflateChunk(), and initZStream().

Here is the caller graph for this function:

◆ splitDirectories()

static void Common::splitDirectories ( const UString directory,
std::list< UString > &  dirs 
)
static

Definition at line 252 of file filepath.cpp.

References Common::UString::begin(), Common::UString::clear(), Common::UString::empty(), and Common::UString::end().

Referenced by Common::FilePath::findSubDirectory().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ tagToString()

static bool Common::tagToString ( uint32  tag,
bool  trim,
UString str 
)
static

Definition at line 103 of file strutil.cpp.

References Common::UString::format(), and Common::UString::trim().

Referenced by debugTag().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ uint64ToString()

static UString Common::uint64ToString ( uint64  i)
static

Definition at line 50 of file uuid.cpp.

Referenced by generateIDNumberString().

Here is the caller graph for this function:

◆ writeFakeChar()

static void Common::writeFakeChar ( std::vector< byte > &  output,
uint32  c,
Encoding  encoding 
)
static

◆ writeString()

size_t Common::writeString ( WriteStream stream,
const Common::UString str,
Encoding  encoding,
bool  terminate = true 
)

Write a string into a stream with a given encoding.

Parameters
streamThe stream to write into.
strThe string to write.
encodingThe encoding to convert the string into.
terminateShould we write a terminating end-of-string sequence into the stream after the string has been written?
Returns
The number of bytes written to the stream, including the end-of-string sequence if requested.

Definition at line 339 of file encoding.cpp.

References convertString(), and Common::WriteStream::writeStream().

Referenced by Aurora::TheWitcherSaveWriter::finish().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ writeStringFixed()

void Common::writeStringFixed ( WriteStream stream,
const Common::UString str,
Encoding  encoding,
size_t  length 
)

Write a string into a stream with a given encoding and fixed length in bytes.

If the string is longer than length (in bytes), the string will be cut off. For multi-byte encodings, this may result in invalid/incomplete sequences at the end of the string.

If the string is shorter than length, 0x00 will be written into the stream until length has been reached.

Definition at line 347 of file encoding.cpp.

References convertString(), Common::WriteStream::writeByte(), and Common::WriteStream::writeStream().

Referenced by Aurora::TheWitcherSaveWriter::TheWitcherSaveWriter(), and Aurora::SSFFile::writeNWN().

Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ cosTable1024

const float Common::cosTable1024[512]
static

Definition at line 112 of file cosinetables.cpp.

◆ cosTable128

const float Common::cosTable128[64]
static
Initial value:
= {
1.000000f, 0.998795f, 0.995185f, 0.989177f, 0.980785f, 0.970031f, 0.956940f, 0.941544f,
0.923880f, 0.903989f, 0.881921f, 0.857729f, 0.831470f, 0.803208f, 0.773010f, 0.740951f,
0.707107f, 0.671559f, 0.634393f, 0.595699f, 0.555570f, 0.514103f, 0.471397f, 0.427555f,
0.382683f, 0.336890f, 0.290285f, 0.242980f, 0.195090f, 0.146730f, 0.098017f, 0.049068f,
0.000000f, 0.049068f, 0.098017f, 0.146730f, 0.195090f, 0.242980f, 0.290285f, 0.336890f,
0.382683f, 0.427555f, 0.471397f, 0.514103f, 0.555570f, 0.595699f, 0.634393f, 0.671559f,
0.707107f, 0.740951f, 0.773010f, 0.803208f, 0.831470f, 0.857729f, 0.881921f, 0.903989f,
0.923880f, 0.941544f, 0.956940f, 0.970031f, 0.980785f, 0.989177f, 0.995185f, 0.998795f
}

Definition at line 47 of file cosinetables.cpp.

◆ cosTable16

const float Common::cosTable16[8]
static
Initial value:
= {
1.000000f, 0.923880f, 0.707107f, 0.382683f, 0.000000f, 0.382683f, 0.707107f, 0.923880f
}

Definition at line 31 of file cosinetables.cpp.

◆ cosTable16384

const float Common::cosTable16384[8192]
static

Definition at line 1084 of file cosinetables.cpp.

◆ cosTable2048

const float Common::cosTable2048[1024]
static

Definition at line 179 of file cosinetables.cpp.

◆ cosTable256

const float Common::cosTable256[128]
static
Initial value:
= {
1.000000f, 0.999699f, 0.998795f, 0.997290f, 0.995185f, 0.992480f, 0.989177f, 0.985278f,
0.980785f, 0.975702f, 0.970031f, 0.963776f, 0.956940f, 0.949528f, 0.941544f, 0.932993f,
0.923880f, 0.914210f, 0.903989f, 0.893224f, 0.881921f, 0.870087f, 0.857729f, 0.844854f,
0.831470f, 0.817585f, 0.803208f, 0.788346f, 0.773010f, 0.757209f, 0.740951f, 0.724247f,
0.707107f, 0.689541f, 0.671559f, 0.653173f, 0.634393f, 0.615232f, 0.595699f, 0.575808f,
0.555570f, 0.534998f, 0.514103f, 0.492898f, 0.471397f, 0.449611f, 0.427555f, 0.405241f,
0.382683f, 0.359895f, 0.336890f, 0.313682f, 0.290285f, 0.266713f, 0.242980f, 0.219101f,
0.195090f, 0.170962f, 0.146730f, 0.122411f, 0.098017f, 0.073565f, 0.049068f, 0.024541f,
0.000000f, 0.024541f, 0.049068f, 0.073565f, 0.098017f, 0.122411f, 0.146730f, 0.170962f,
0.195090f, 0.219101f, 0.242980f, 0.266713f, 0.290285f, 0.313682f, 0.336890f, 0.359895f,
0.382683f, 0.405241f, 0.427555f, 0.449611f, 0.471397f, 0.492898f, 0.514103f, 0.534998f,
0.555570f, 0.575808f, 0.595699f, 0.615232f, 0.634393f, 0.653173f, 0.671559f, 0.689541f,
0.707107f, 0.724247f, 0.740951f, 0.757209f, 0.773010f, 0.788346f, 0.803208f, 0.817585f,
0.831470f, 0.844854f, 0.857729f, 0.870087f, 0.881921f, 0.893224f, 0.903989f, 0.914210f,
0.923880f, 0.932993f, 0.941544f, 0.949528f, 0.956940f, 0.963776f, 0.970031f, 0.975702f,
0.980785f, 0.985278f, 0.989177f, 0.992480f, 0.995185f, 0.997290f, 0.998795f, 0.999699f
}

Definition at line 58 of file cosinetables.cpp.

◆ cosTable32

const float Common::cosTable32[16]
static
Initial value:
= {
1.000000f, 0.980785f, 0.923880f, 0.831470f, 0.707107f, 0.555570f, 0.382683f, 0.195090f,
0.000000f, 0.195090f, 0.382683f, 0.555570f, 0.707107f, 0.831470f, 0.923880f, 0.980785f
}

Definition at line 35 of file cosinetables.cpp.

◆ cosTable32768

const float Common::cosTable32768[16384]
static

Definition at line 2111 of file cosinetables.cpp.

◆ cosTable4096

const float Common::cosTable4096[2048]
static

Definition at line 310 of file cosinetables.cpp.

◆ cosTable512

const float Common::cosTable512[256]
static

Definition at line 77 of file cosinetables.cpp.

◆ cosTable64

const float Common::cosTable64[32]
static
Initial value:
= {
1.000000f, 0.995185f, 0.980785f, 0.956940f, 0.923880f, 0.881921f, 0.831470f, 0.773010f,
0.707107f, 0.634393f, 0.555570f, 0.471397f, 0.382683f, 0.290285f, 0.195090f, 0.098017f,
0.000000f, 0.098017f, 0.195090f, 0.290285f, 0.382683f, 0.471397f, 0.555570f, 0.634393f,
0.707107f, 0.773010f, 0.831470f, 0.881921f, 0.923880f, 0.956940f, 0.980785f, 0.995185f
}

Definition at line 40 of file cosinetables.cpp.

◆ cosTable65536

const float Common::cosTable65536[32768]
static

Definition at line 4162 of file cosinetables.cpp.

◆ cosTable8192

const float Common::cosTable8192[4096]
static

Definition at line 569 of file cosinetables.cpp.

◆ cosTables

const float* const Common::cosTables[17]
static
Initial value:
= {
0 , 0 , 0 , 0 ,
}
static const float cosTable512[256]
static const float cosTable4096[2048]
static const float cosTable65536[32768]
static const float cosTable32[16]
static const float cosTable8192[4096]
static const float cosTable2048[1024]
static const float cosTable128[64]
static const float cosTable16384[8192]
static const float cosTable32768[16384]
static const float cosTable256[128]
static const float cosTable16[8]
static const float cosTable64[32]
static const float cosTable1024[512]

Definition at line 8261 of file cosinetables.cpp.

Referenced by getCosineTable().

◆ fft_dispatch

void(* const Common::fft_dispatch[])(Complex *)
static
Initial value:
= {
}
static void fft4(Complex *z)
Definition: fft.cpp:202
static void fft8(Complex *z)
Definition: fft.cpp:216
static void fft64(Complex *z)
Definition: fft.cpp:253
static void fft128(Complex *z)
Definition: fft.cpp:254
static void fft8192(Complex *z)
Definition: fft.cpp:261
static void fft2048(Complex *z)
Definition: fft.cpp:259
static void fft32(Complex *z)
Definition: fft.cpp:252
static void fft32768(Complex *z)
Definition: fft.cpp:263
static void fft65536(Complex *z)
Definition: fft.cpp:264
static void fft512(Complex *z)
Definition: fft.cpp:256
static void fft1024(Complex *z)
Definition: fft.cpp:258
static void fft256(Complex *z)
Definition: fft.cpp:255
static void fft16(Complex *z)
Definition: fft.cpp:236
static void fft16384(Complex *z)
Definition: fft.cpp:262
static void fft4096(Complex *z)
Definition: fft.cpp:260

Definition at line 266 of file fft.cpp.

Referenced by Common::FFT::calc().

◆ intLog2Table256

const int8 Common::intLog2Table256
Initial value:
= {
#define LT(n)
-1, 0, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3,
4 , 4 , 4 , 4 , 4 , 4 , 4 , 4 , 4 , 4 , 4 , 4 , 4 , 4 , 4 , 4 , 5 , 5 , 5 , 5 , 5 , 5 , 5 , 5 , 5 , 5 , 5 , 5 , 5 , 5 , 5 , 5 , 5 , 5 , 5 , 5 , 5 , 5 , 5 , 5 , 5 , 5 , 5 , 5 , 5 , 5 , 5 , 5 , 6 , 6 , 6 , 6 , 6 , 6 , 6 , 6 , 6 , 6 , 6 , 6 , 6 , 6 , 6 , 6 , 6 , 6 , 6 , 6 , 6 , 6 , 6 , 6 , 6 , 6 , 6 , 6 , 6 , 6 , 6 , 6 , 6 , 6 , 6 , 6 , 6 , 6 , 6 , 6 , 6 , 6 , 6 , 6 , 6 , 6 , 6 , 6 , 6 , 6 , 6 , 6 , 6 , 6 , 6 , 6 , 6 , 6 , 6 , 6 , 6 , 6 , 6 , 6 ,
7 , 7 , 7 , 7 , 7 , 7 , 7 , 7 , 7 , 7 , 7 , 7 , 7 , 7 , 7 , 7 , 7 , 7 , 7 , 7 , 7 , 7 , 7 , 7 , 7 , 7 , 7 , 7 , 7 , 7 , 7 , 7 , 7 , 7 , 7 , 7 , 7 , 7 , 7 , 7 , 7 , 7 , 7 , 7 , 7 , 7 , 7 , 7 , 7 , 7 , 7 , 7 , 7 , 7 , 7 , 7 , 7 , 7 , 7 , 7 , 7 , 7 , 7 , 7 , 7 , 7 , 7 , 7 , 7 , 7 , 7 , 7 , 7 , 7 , 7 , 7 , 7 , 7 , 7 , 7 , 7 , 7 , 7 , 7 , 7 , 7 , 7 , 7 , 7 , 7 , 7 , 7 , 7 , 7 , 7 , 7 , 7 , 7 , 7 , 7 , 7 , 7 , 7 , 7 , 7 , 7 , 7 , 7 , 7 , 7 , 7 , 7 , 7 , 7 , 7 , 7 , 7 , 7 , 7 , 7 , 7 , 7 , 7 , 7 , 7 , 7 , 7 , 7
}

Definition at line 31 of file maths.cpp.

Referenced by intLog2().

◆ kBlockSize

const size_t Common::kBlockSize = 8
static

Definition at line 73 of file blowfish.cpp.

Referenced by blowfishEBC().

◆ kCRC32Tab

const uint32 Common::kCRC32Tab[]
static

Table of CRC32 polynomial feedback terms.

Definition at line 143 of file hash.h.

Referenced by hashCRC32().

◆ kDebugDescriptions

const char* const Common::kDebugDescriptions[kDebugChannelCount]
static
Initial value:
= {
"Global graphics debug channel",
"Global sound debug channel",
"Global video (movies) debug channel",
"Global events debug channel",
"Global scripts debug channel",
"OpenGL debug message generated by the GL",
"OpenGL debug message generated by the windowing system",
"OpenGL debug message generated by the shader compiler",
"OpenGL debug message generated by third party middleware",
"OpenGL debug message generated by the application",
"OpenGL debug message generated by other sources",
"Engine graphics debug channel",
"Engine sound debug channel",
"Engine video debug channel",
"Engine events debug channel",
"Engine game logic debug channel",
"Engine scripts debug channel",
"Engine ActionScript debug channel",
}

Definition at line 47 of file debugman.cpp.

Referenced by Common::DebugManager::DebugManager().

◆ kDebugGLTypes

const char* const Common::kDebugGLTypes[kDebugGLTypeMAX]
static
Initial value:
= {
"Error", "Deprecated", "Undefined", "Portability", "Performance", "Other"
}

Definition at line 68 of file debugman.cpp.

Referenced by Common::DebugManager::logDebugGL().

◆ kDebugNames

const char* const Common::kDebugNames[kDebugChannelCount]
static
Initial value:
= {
"GGraphics", "GSound", "GVideo", "GEvents", "GScripts",
"GGLAPI", "GGLWindow", "GGLShader", "GGL3rd", "GGLApp", "GGLOther",
"EGraphics", "ESound", "EVideo", "EEvents", "ELogic", "EScripts", "EActionScript"
}

Definition at line 41 of file debugman.cpp.

Referenced by Common::DebugManager::DebugManager(), and Common::DebugManager::logDebugGL().

◆ kDejaVuSansMonoBold

const byte Common::kDejaVuSansMonoBold[]
static

The DejaVu Sans Mono Bold font, version 2.35.

Distributed under the terms of the Bitstream Vera license.

DejaVu changes are in public domain. Glyphs imported from Arev fonts are Copyright 2006 by Tavmjong Bah.

Definition at line 38 of file systemfonts.cpp.

Referenced by getSystemFontMono().

◆ kEncodingGrowthFrom

const size_t Common::kEncodingGrowthFrom[kEncodingMAX]
static
Initial value:
= {
1, 1, 2, 2, 4, 4, 4, 4, 4, 4, 4, 4
}

Definition at line 47 of file encoding.cpp.

Referenced by Common::ConversionManager::convert().

◆ kEncodingGrowthTo

const size_t Common::kEncodingGrowthTo[kEncodingMAX]
static
Initial value:
= {
1, 1, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1
}

Definition at line 51 of file encoding.cpp.

Referenced by Common::ConversionManager::convert().

◆ kEncodingName

const char* const Common::kEncodingName[kEncodingMAX]
static
Initial value:
= {
"ASCII", "UTF-8", "UTF-16LE", "UTF-16BE", "ISO-8859-15", "WINDOWS-1250", "WINDOWS-1251",
"WINDOWS-1252", "CP932", "CP936", "CP949", "CP950"
}

Definition at line 42 of file encoding.cpp.

Referenced by Common::ConversionManager::ConversionManager(), and getEncodingName().

◆ kFileInvalid

const size_t Common::kFileInvalid = SIZE_MAX
static

Definition at line 35 of file filepath.h.

Referenced by Common::FilePath::getFileSize().

◆ kLZMAAllocator

lzma_allocator Common::kLZMAAllocator
static
Initial value:
= {
}
static void *LZMA_API_CALL lzmaAlloc(void *opaque, size_t nmemb, size_t size)
Definition: lzma.cpp:52
static void LZMA_API_CALL lzmaFree(void *opaque, void *ptr)
Definition: lzma.cpp:56

Definition at line 61 of file lzma.cpp.

Referenced by decompressLZMA1().

◆ kMaxKeyLength

const size_t Common::kMaxKeyLength = 56
static

Definition at line 71 of file blowfish.cpp.

Referenced by blowfishSetKey().

◆ kMD5Length

const size_t Common::kMD5Length = 16
static

◆ kMinKeyLength

const size_t Common::kMinKeyLength = 4
static

Definition at line 70 of file blowfish.cpp.

Referenced by blowfishSetKey().

◆ kOpenError

const Exception Common::kOpenError

Exception when a file couldn't be opened.

Definition at line 61 of file error.h.

Referenced by Aurora::ResourceManager::dumpResourcesList(), Common::ConfigManager::load(), and Common::ConfigManager::save().

◆ kReadError

const Exception Common::kReadError

◆ kRoundCount

const size_t Common::kRoundCount = 16
static

Definition at line 72 of file blowfish.cpp.

Referenced by blowfishDec(), blowfishEnc(), and blowfishSetKey().

◆ kSeekError

const Exception Common::kSeekError

◆ kTerminatorLength

const size_t Common::kTerminatorLength[kEncodingMAX]
static
Initial value:
= {
1, 1, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1
}

Definition at line 55 of file encoding.cpp.

Referenced by Common::ConversionManager::convert().

◆ kWindowBitsMax

const int Common::kWindowBitsMax = 15
static

◆ kWindowBitsMaxRaw

const int Common::kWindowBitsMaxRaw = -kWindowBitsMax
static

Definition at line 42 of file deflate.h.

Referenced by Common::ZipFile::decompressFile().

◆ kWriteError

const Exception Common::kWriteError

◆ P

const uint32 Common::P[kRoundCount+2]
static
Initial value:
= {
0x243F6A88, 0x85A308D3, 0x13198A2E, 0x03707344, 0xA4093822, 0x299F31D0, 0x082EFA98, 0xEC4E6C89,
0x452821E6, 0x38D01377, 0xBE5466CF, 0x34E90C6C, 0xC0AC29B7, 0xC97C50DD, 0x3F84D5B5, 0xB5470917,
0x9216D5D9, 0x8979FB1B
}

Definition at line 93 of file blowfish.cpp.

Referenced by blowfishSetKey(), and Graphics::Aurora::ModelNode_KotOR::readMesh().

◆ S

const uint32 Common::S[4][256]
static

Definition at line 99 of file blowfish.cpp.

Referenced by blowfishSetKey().

◆ sineWindow1024

const float Common::sineWindow1024[1024]
static

Definition at line 170 of file sinewindows.cpp.

◆ sineWindow128

const float Common::sineWindow128[128]
static
Initial value:
= {
0.006136f, 0.018407f, 0.030675f, 0.042938f, 0.055195f, 0.067444f, 0.079682f, 0.091909f,
0.104122f, 0.116319f, 0.128498f, 0.140658f, 0.152797f, 0.164913f, 0.177004f, 0.189069f,
0.201105f, 0.213110f, 0.225084f, 0.237024f, 0.248928f, 0.260794f, 0.272621f, 0.284408f,
0.296151f, 0.307850f, 0.319502f, 0.331106f, 0.342661f, 0.354164f, 0.365613f, 0.377007f,
0.388345f, 0.399624f, 0.410843f, 0.422000f, 0.433094f, 0.444122f, 0.455084f, 0.465977f,
0.476799f, 0.487550f, 0.498228f, 0.508830f, 0.519356f, 0.529804f, 0.540172f, 0.550458f,
0.560662f, 0.570781f, 0.580814f, 0.590760f, 0.600616f, 0.610383f, 0.620057f, 0.629638f,
0.639124f, 0.648514f, 0.657807f, 0.667000f, 0.676093f, 0.685084f, 0.693971f, 0.702755f,
0.711432f, 0.720002f, 0.728464f, 0.736817f, 0.745058f, 0.753187f, 0.761202f, 0.769103f,
0.776888f, 0.784557f, 0.792107f, 0.799537f, 0.806848f, 0.814036f, 0.821102f, 0.828045f,
0.834863f, 0.841555f, 0.848120f, 0.854558f, 0.860867f, 0.867046f, 0.873095f, 0.879012f,
0.884797f, 0.890449f, 0.895966f, 0.901349f, 0.906596f, 0.911706f, 0.916679f, 0.921514f,
0.926210f, 0.930767f, 0.935183f, 0.939459f, 0.943593f, 0.947586f, 0.951435f, 0.955141f,
0.958703f, 0.962121f, 0.965394f, 0.968522f, 0.971504f, 0.974339f, 0.977028f, 0.979570f,
0.981964f, 0.984210f, 0.986308f, 0.988258f, 0.990058f, 0.991710f, 0.993212f, 0.994565f,
0.995767f, 0.996820f, 0.997723f, 0.998476f, 0.999078f, 0.999529f, 0.999831f, 0.999981f
}

Definition at line 49 of file sinewindows.cpp.

◆ sineWindow2048

const float Common::sineWindow2048[2048]
static

Definition at line 301 of file sinewindows.cpp.

◆ sineWindow256

const float Common::sineWindow256[256]
static

Definition at line 68 of file sinewindows.cpp.

◆ sineWindow32

const float Common::sineWindow32[32]
static
Initial value:
= {
0.024541f, 0.073565f, 0.122411f, 0.170962f, 0.219101f, 0.266713f, 0.313682f, 0.359895f,
0.405241f, 0.449611f, 0.492898f, 0.534998f, 0.575808f, 0.615232f, 0.653173f, 0.689541f,
0.724247f, 0.757209f, 0.788346f, 0.817585f, 0.844854f, 0.870087f, 0.893224f, 0.914210f,
0.932993f, 0.949528f, 0.963776f, 0.975702f, 0.985278f, 0.992480f, 0.997290f, 0.999699f
}

Definition at line 31 of file sinewindows.cpp.

◆ sineWindow4096

const float Common::sineWindow4096[4096]
static

Definition at line 560 of file sinewindows.cpp.

◆ sineWindow512

const float Common::sineWindow512[512]
static

Definition at line 103 of file sinewindows.cpp.

◆ sineWindow64

const float Common::sineWindow64[64]
static
Initial value:
= {
0.012272f, 0.036807f, 0.061321f, 0.085797f, 0.110222f, 0.134581f, 0.158858f, 0.183040f,
0.207111f, 0.231058f, 0.254866f, 0.278520f, 0.302006f, 0.325310f, 0.348419f, 0.371317f,
0.393992f, 0.416430f, 0.438616f, 0.460539f, 0.482184f, 0.503538f, 0.524590f, 0.545325f,
0.565732f, 0.585798f, 0.605511f, 0.624860f, 0.643832f, 0.662416f, 0.680601f, 0.698376f,
0.715731f, 0.732654f, 0.749136f, 0.765167f, 0.780737f, 0.795837f, 0.810457f, 0.824589f,
0.838225f, 0.851355f, 0.863973f, 0.876070f, 0.887640f, 0.898674f, 0.909168f, 0.919114f,
0.928506f, 0.937339f, 0.945607f, 0.953306f, 0.960431f, 0.966976f, 0.972940f, 0.978317f,
0.983105f, 0.987301f, 0.990903f, 0.993907f, 0.996313f, 0.998118f, 0.999322f, 0.999925f
}

Definition at line 38 of file sinewindows.cpp.

◆ sineWindows

const float* const Common::sineWindows[13]
static
Initial value:
= {
0 , 0 , 0 , 0 , 0 ,
}
static const float sineWindow128[128]
Definition: sinewindows.cpp:49
static const float sineWindow64[64]
Definition: sinewindows.cpp:38
static const float sineWindow32[32]
Definition: sinewindows.cpp:31
static const float sineWindow1024[1024]
static const float sineWindow4096[4096]
static const float sineWindow2048[2048]
static const float sineWindow256[256]
Definition: sinewindows.cpp:68
static const float sineWindow512[512]

Definition at line 1075 of file sinewindows.cpp.

Referenced by getSineWindow().

◆ sinTable1024

const float Common::sinTable1024[512]
static

Definition at line 112 of file sinetables.cpp.

◆ sinTable128

const float Common::sinTable128[64]
static
Initial value:
= {
0.000000f, 0.049068f, 0.098017f, 0.146730f, 0.195090f, 0.242980f, 0.290285f, 0.336890f,
0.382683f, 0.427555f, 0.471397f, 0.514103f, 0.555570f, 0.595699f, 0.634393f, 0.671559f,
0.707107f, 0.740951f, 0.773010f, 0.803208f, 0.831470f, 0.857729f, 0.881921f, 0.903989f,
0.923880f, 0.941544f, 0.956940f, 0.970031f, 0.980785f, 0.989177f, 0.995185f, 0.998795f,
0.000000f, -0.049068f, -0.098017f, -0.146730f, -0.195090f, -0.242980f, -0.290285f, -0.336890f,
-0.382683f, -0.427555f, -0.471397f, -0.514103f, -0.555570f, -0.595699f, -0.634393f, -0.671559f,
-0.707107f, -0.740951f, -0.773010f, -0.803208f, -0.831470f, -0.857729f, -0.881921f, -0.903989f,
-0.923880f, -0.941544f, -0.956940f, -0.970031f, -0.980785f, -0.989177f, -0.995185f, -0.998795f
}

Definition at line 47 of file sinetables.cpp.

◆ sinTable16

const float Common::sinTable16[8]
static
Initial value:
= {
0.000000f, 0.382683f, 0.707107f, 0.923880f, 0.000000f, -0.382683f, -0.707107f, -0.923880f
}

Definition at line 31 of file sinetables.cpp.

◆ sinTable16384

const float Common::sinTable16384[8192]
static

Definition at line 1084 of file sinetables.cpp.

◆ sinTable2048

const float Common::sinTable2048[1024]
static

Definition at line 179 of file sinetables.cpp.

◆ sinTable256

const float Common::sinTable256[128]
static
Initial value:
= {
0.000000f, 0.024541f, 0.049068f, 0.073565f, 0.098017f, 0.122411f, 0.146730f, 0.170962f,
0.195090f, 0.219101f, 0.242980f, 0.266713f, 0.290285f, 0.313682f, 0.336890f, 0.359895f,
0.382683f, 0.405241f, 0.427555f, 0.449611f, 0.471397f, 0.492898f, 0.514103f, 0.534998f,
0.555570f, 0.575808f, 0.595699f, 0.615232f, 0.634393f, 0.653173f, 0.671559f, 0.689541f,
0.707107f, 0.724247f, 0.740951f, 0.757209f, 0.773010f, 0.788346f, 0.803208f, 0.817585f,
0.831470f, 0.844854f, 0.857729f, 0.870087f, 0.881921f, 0.893224f, 0.903989f, 0.914210f,
0.923880f, 0.932993f, 0.941544f, 0.949528f, 0.956940f, 0.963776f, 0.970031f, 0.975702f,
0.980785f, 0.985278f, 0.989177f, 0.992480f, 0.995185f, 0.997290f, 0.998795f, 0.999699f,
0.000000f, -0.024541f, -0.049068f, -0.073565f, -0.098017f, -0.122411f, -0.146730f, -0.170962f,
-0.195090f, -0.219101f, -0.242980f, -0.266713f, -0.290285f, -0.313682f, -0.336890f, -0.359895f,
-0.382683f, -0.405241f, -0.427555f, -0.449611f, -0.471397f, -0.492898f, -0.514103f, -0.534998f,
-0.555570f, -0.575808f, -0.595699f, -0.615232f, -0.634393f, -0.653173f, -0.671559f, -0.689541f,
-0.707107f, -0.724247f, -0.740951f, -0.757209f, -0.773010f, -0.788346f, -0.803208f, -0.817585f,
-0.831470f, -0.844854f, -0.857729f, -0.870087f, -0.881921f, -0.893224f, -0.903989f, -0.914210f,
-0.923880f, -0.932993f, -0.941544f, -0.949528f, -0.956940f, -0.963776f, -0.970031f, -0.975702f,
-0.980785f, -0.985278f, -0.989177f, -0.992480f, -0.995185f, -0.997290f, -0.998795f, -0.999699f
}

Definition at line 58 of file sinetables.cpp.

◆ sinTable32

const float Common::sinTable32[16]
static
Initial value:
= {
0.000000f, 0.195090f, 0.382683f, 0.555570f, 0.707107f, 0.831470f, 0.923880f, 0.980785f,
0.000000f, -0.195090f, -0.382683f, -0.555570f, -0.707107f, -0.831470f, -0.923880f, -0.980785f
}

Definition at line 35 of file sinetables.cpp.

◆ sinTable32768

const float Common::sinTable32768[16384]
static

Definition at line 2111 of file sinetables.cpp.

◆ sinTable4096

const float Common::sinTable4096[2048]
static

Definition at line 310 of file sinetables.cpp.

◆ sinTable512

const float Common::sinTable512[256]
static

Definition at line 77 of file sinetables.cpp.

◆ sinTable64

const float Common::sinTable64[32]
static
Initial value:
= {
0.000000f, 0.098017f, 0.195090f, 0.290285f, 0.382683f, 0.471397f, 0.555570f, 0.634393f,
0.707107f, 0.773010f, 0.831470f, 0.881921f, 0.923880f, 0.956940f, 0.980785f, 0.995185f,
0.000000f, -0.098017f, -0.195090f, -0.290285f, -0.382683f, -0.471397f, -0.555570f, -0.634393f,
-0.707107f, -0.773010f, -0.831470f, -0.881921f, -0.923880f, -0.956940f, -0.980785f, -0.995185f
}

Definition at line 40 of file sinetables.cpp.

◆ sinTable65536

const float Common::sinTable65536[32768]
static

Definition at line 4162 of file sinetables.cpp.

◆ sinTable8192

const float Common::sinTable8192[4096]
static

Definition at line 569 of file sinetables.cpp.

◆ sinTables

const float* const Common::sinTables[17]
static
Initial value:
= {
0 , 0 , 0 , 0 ,
}
static const float sinTable16384[8192]
static const float sinTable65536[32768]
static const float sinTable32768[16384]
static const float sinTable32[16]
Definition: sinetables.cpp:35
static const float sinTable2048[1024]
Definition: sinetables.cpp:179
static const float sinTable512[256]
Definition: sinetables.cpp:77
static const float sinTable128[64]
Definition: sinetables.cpp:47
static const float sinTable1024[512]
Definition: sinetables.cpp:112
static const float sinTable16[8]
Definition: sinetables.cpp:31
static const float sinTable256[128]
Definition: sinetables.cpp:58
static const float sinTable8192[4096]
Definition: sinetables.cpp:569
static const float sinTable64[32]
Definition: sinetables.cpp:40
static const float sinTable4096[2048]
Definition: sinetables.cpp:310

Definition at line 8261 of file sinetables.cpp.

Referenced by getSineTable().