xoreos
0.0.5
|
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, UString > | StringMap |
typedef std::map< UString, UString, UString::iless > | StringIMap |
typedef boost::unordered_map< UString, UString, hashUStringCaseSensitive > | StringHashMap |
typedef boost::unordered_map< UString, UString, hashUStringCaseInsensitive > | StringHashIMap |
Functions | |
template<class T > | |
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) |
MemoryReadStream * | blowfishEBC (SeekableReadStream &input, const std::vector< byte > &key, Mode mode) |
MemoryReadStream * | encryptBlowfishEBC (SeekableReadStream &input, const std::vector< byte > &key) |
Encrypt the stream with the Blowfish algorithm in EBC mode. More... | |
MemoryReadStream * | decryptBlowfishEBC (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) |
byte * | decompressDeflate (const byte *data, size_t inputSize, size_t outputSize, int windowBits) |
Decompress (inflate) using zlib's DEFLATE algorithm. More... | |
byte * | 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. More... | |
SeekableReadStream * | decompressDeflate (ReadStream &input, size_t inputSize, size_t outputSize, int windowBits) |
Decompress (inflate) using zlib's DEFLATE algorithm. More... | |
SeekableReadStream * | decompressDeflateWithoutOutputSize (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... | |
MemoryReadStream * | convertString (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) |
byte * | decompressLZMA1 (const byte *data, size_t inputSize, size_t outputSize, bool noEndMarker=false) |
Decompress using the LZMA1 algorithm. More... | |
SeekableReadStream * | decompressLZMA1 (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 byte * | md5Body (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... | |
SeekableReadStream * | getSystemFontMono () |
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< uint32 > | idNumber (1) |
uint32 | generateIDNumber () |
static UString | uint64ToString (uint64 i) |
static boost::atomic< uint64 > | idNumberString (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 BitStreamImpl<16, false, false> Common::BitStream16BELSB |
16-bit big-endian data, LSB to MSB.
Definition at line 259 of file bitstream.h.
typedef BitStreamImpl<16, false, true > Common::BitStream16BEMSB |
16-bit big-endian data, MSB to LSB.
Definition at line 257 of file bitstream.h.
typedef BitStreamImpl<16, true , false> Common::BitStream16LELSB |
16-bit little-endian data, LSB to MSB.
Definition at line 255 of file bitstream.h.
typedef BitStreamImpl<16, true , true > Common::BitStream16LEMSB |
16-bit little-endian data, MSB to LSB.
Definition at line 253 of file bitstream.h.
typedef BitStreamImpl<32, false, false> Common::BitStream32BELSB |
32-bit big-endian data, LSB to MSB.
Definition at line 268 of file bitstream.h.
typedef BitStreamImpl<32, false, true > Common::BitStream32BEMSB |
32-bit big-endian data, MSB to LSB.
Definition at line 266 of file bitstream.h.
typedef BitStreamImpl<32, true , false> Common::BitStream32LELSB |
32-bit little-endian data, LSB to MSB.
Definition at line 264 of file bitstream.h.
typedef BitStreamImpl<32, true , true > Common::BitStream32LEMSB |
32-bit little-endian data, MSB to LSB.
Definition at line 262 of file bitstream.h.
typedef BitStreamImpl<64, false, false> Common::BitStream64BELSB |
64-bit big-endian data, LSB to MSB.
Definition at line 277 of file bitstream.h.
typedef BitStreamImpl<64, false, true > Common::BitStream64BEMSB |
64-bit big-endian data, MSB to LSB.
Definition at line 275 of file bitstream.h.
typedef BitStreamImpl<64, true , false> Common::BitStream64LELSB |
64-bit little-endian data, LSB to MSB.
Definition at line 273 of file bitstream.h.
typedef BitStreamImpl<64, true , true > Common::BitStream64LEMSB |
64-bit little-endian data, MSB to LSB.
Definition at line 271 of file bitstream.h.
typedef BitStreamImpl<8, false, false> Common::BitStream8LSB |
8-bit data, LSB to MSB.
Definition at line 250 of file bitstream.h.
typedef BitStreamImpl<8, false, true > Common::BitStream8MSB |
8-bit data, MSB to LSB.
Definition at line 248 of file bitstream.h.
typedef BitStreamWriterImpl<16, false, false> Common::BitStreamWriter16BELSB |
16-bit big-endian data, LSB to MSB.
Definition at line 205 of file bitstreamwriter.h.
typedef BitStreamWriterImpl<16, false, true > Common::BitStreamWriter16BEMSB |
16-bit big-endian data, MSB to LSB.
Definition at line 203 of file bitstreamwriter.h.
typedef BitStreamWriterImpl<16, true , false> Common::BitStreamWriter16LELSB |
16-bit little-endian data, LSB to MSB.
Definition at line 201 of file bitstreamwriter.h.
typedef BitStreamWriterImpl<16, true , true > Common::BitStreamWriter16LEMSB |
16-bit little-endian data, MSB to LSB.
Definition at line 199 of file bitstreamwriter.h.
typedef BitStreamWriterImpl<32, false, false> Common::BitStreamWriter32BELSB |
32-bit big-endian data, LSB to MSB.
Definition at line 214 of file bitstreamwriter.h.
typedef BitStreamWriterImpl<32, false, true > Common::BitStreamWriter32BEMSB |
32-bit big-endian data, MSB to LSB.
Definition at line 212 of file bitstreamwriter.h.
typedef BitStreamWriterImpl<32, true , false> Common::BitStreamWriter32LELSB |
32-bit little-endian data, LSB to MSB.
Definition at line 210 of file bitstreamwriter.h.
typedef BitStreamWriterImpl<32, true , true > Common::BitStreamWriter32LEMSB |
32-bit little-endian data, MSB to LSB.
Definition at line 208 of file bitstreamwriter.h.
typedef BitStreamWriterImpl<64, false, false> Common::BitStreamWriter64BELSB |
64-bit big-endian data, LSB to MSB.
Definition at line 223 of file bitstreamwriter.h.
typedef BitStreamWriterImpl<64, false, true > Common::BitStreamWriter64BEMSB |
64-bit big-endian data, MSB to LSB.
Definition at line 221 of file bitstreamwriter.h.
typedef BitStreamWriterImpl<64, true , false> Common::BitStreamWriter64LELSB |
64-bit little-endian data, LSB to MSB.
Definition at line 219 of file bitstreamwriter.h.
typedef BitStreamWriterImpl<64, true , true > Common::BitStreamWriter64LEMSB |
64-bit little-endian data, MSB to LSB.
Definition at line 217 of file bitstreamwriter.h.
typedef BitStreamWriterImpl<8, false, false> Common::BitStreamWriter8LSB |
8-bit data, LSB to MSB.
Definition at line 196 of file bitstreamwriter.h.
typedef BitStreamWriterImpl<8, false, true > Common::BitStreamWriter8MSB |
8-bit data, MSB to LSB.
Definition at line 194 of file bitstreamwriter.h.
typedef StackException Common::Exception |
typedef boost::unordered_map<UString, UString, hashUStringCaseInsensitive> Common::StringHashIMap |
Definition at line 40 of file stringmap.h.
typedef boost::unordered_map<UString, UString, hashUStringCaseSensitive> Common::StringHashMap |
Definition at line 39 of file stringmap.h.
typedef std::map<UString, UString, UString::iless> Common::StringIMap |
Definition at line 37 of file stringmap.h.
typedef std::map<UString, UString> Common::StringMap |
Definition at line 36 of file stringmap.h.
enum Common::ConfigRealm |
Special config realms.
Enumerator | |
---|---|
kConfigRealmDefault | Application or game defaults. |
kConfigRealmGameTemp | Temporary game settings/properties. |
Definition at line 45 of file configman.h.
enum Common::DebugChannel |
All debug channels.
Definition at line 41 of file debugman.h.
enum Common::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.
enum Common::Encoding |
Definition at line 37 of file encoding.h.
enum Common::HashAlgo |
The algorithm used for hashing.
enum Common::Mode |
Enumerator | |
---|---|
kModeDecrypt | |
kModeEncrypt |
Definition at line 65 of file blowfish.cpp.
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().
|
static |
Definition at line 261 of file blowfish.cpp.
References F(), kRoundCount, Common::BlowfishContext::P, and SWAP().
Referenced by blowfishECB().
MemoryReadStream* Common::blowfishEBC | ( | SeekableReadStream & | input, |
const std::vector< byte > & | key, | ||
Mode | mode | ||
) |
Definition at line 338 of file blowfish.cpp.
References blowfishECB(), blowfishSetKey(), Common::ScopedPtrBase< T, Deallocator >::get(), kBlockSize, kReadError, Common::SeekableReadStream::pos(), Common::ReadStream::read(), Common::ScopedPtrBase< T, Deallocator >::release(), and Common::SeekableReadStream::size().
Referenced by decryptBlowfishEBC(), and encryptBlowfishEBC().
|
static |
Definition at line 317 of file blowfish.cpp.
References blowfishDec(), blowfishEnc(), kModeDecrypt, and kModeEncrypt.
Referenced by blowfishEBC().
|
static |
Definition at line 247 of file blowfish.cpp.
References F(), kRoundCount, Common::BlowfishContext::P, and SWAP().
Referenced by blowfishECB(), and blowfishSetKey().
|
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().
|
static |
Definition at line 62 of file xml.cpp.
Referenced by Common::XMLParser::XMLParser().
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().
UString Common::composeString | ( | T | 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().
UString Common::composeString | ( | bool | value | ) |
Definition at line 326 of file strutil.cpp.
UString Common::composeString | ( | float | value | ) |
Definition at line 330 of file strutil.cpp.
References Common::UString::format().
UString Common::composeString | ( | double | value | ) |
Definition at line 334 of file strutil.cpp.
References Common::UString::format().
template UString Common::composeString< signed char > | ( | signed char | value | ) |
template UString Common::composeString< signed int > | ( | signed int | value | ) |
template UString Common::composeString< signed long > | ( | signed long | value | ) |
template UString Common::composeString< signed long long > | ( | signed long long | value | ) |
template UString Common::composeString< signed short > | ( | signed short | value | ) |
template UString Common::composeString< unsigned char > | ( | unsigned char | value | ) |
template UString Common::composeString< unsigned int > | ( | unsigned int | value | ) |
template UString Common::composeString< unsigned long > | ( | unsigned long | value | ) |
template UString Common::composeString< unsigned long long > | ( | unsigned long long | value | ) |
template UString Common::composeString< unsigned short > | ( | unsigned short | value | ) |
MemoryReadStream * Common::convertString | ( | const UString & | str, |
Encoding | encoding, | ||
bool | terminateString = true |
||
) |
Convert a string into the given encoding.
str | The string to convert. |
encoding | The encoding to convert the string into. |
terminateString | Should the result contain a terminating end-of- string sequence? |
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().
|
static |
Definition at line 117 of file filepath.cpp.
Referenced by Common::FilePath::absolutize(), and Common::FilePath::normalize().
Definition at line 270 of file encoding.cpp.
References ConvMan, kEncodingASCII, and kEncodingUTF8.
Referenced by readString(), readStringFixed(), and readStringLine().
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().
byte * Common::decompressDeflate | ( | const byte * | data, |
size_t | inputSize, | ||
size_t | outputSize, | ||
int | windowBits | ||
) |
Decompress (inflate) using zlib's DEFLATE algorithm.
data | The compressed input data. |
inputSize | The size of the input data in bytes. |
outputSize | The 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. |
windowBits | The base two logarithm of the window size (the size of the history buffer). See the zlib documentation on inflateInit2() for details. |
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().
SeekableReadStream * Common::decompressDeflate | ( | ReadStream & | input, |
size_t | inputSize, | ||
size_t | outputSize, | ||
int | windowBits | ||
) |
Decompress (inflate) using zlib's DEFLATE algorithm.
input | The compressed input data. |
inputSize | The size of the input data to read in bytes. |
outputSize | The 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. |
windowBits | The base two logarithm of the window size (the size of the history buffer). See the zlib documentation on inflateInit2() for details. |
Definition at line 130 of file deflate.cpp.
References decompressDeflate(), Common::ScopedPtrBase< T, Deallocator >::get(), kReadError, and Common::ReadStream::read().
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.
input | The compressed input data. |
windowBits | The base two logarithm of the window size (the size of the history buffer). See the zlib documentation on inflateInit2() for details. |
output | The output of the current chunk is stored here. |
outputSize | Maximum number of bytes to write into output. |
frameSize | The size of frame for reading from the input stream. |
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().
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.
data | The compressed input data. |
inputSize | The size of the input data in bytes. |
outputSize | The size of the decompressed output data. |
windowBits | The base two logarithm of the window size (the size of the history buffer). See the zlib documentation on inflateInit2() for details. |
frameSize | The size of the extracted frames, defaults to 4096. |
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().
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.
input | The compressed input data. |
inputSize | The size of the input data to read in bytes. |
windowBits | The base two logarithm of the window size (the size of the history buffer). See the zlib documentation on inflateInit2() for details. |
frameSize | The size of the extracted frames, defaults to 4096. |
Definition at line 142 of file deflate.cpp.
References decompressDeflateWithoutOutputSize(), Common::ScopedPtrBase< T, Deallocator >::get(), kReadError, and Common::ReadStream::read().
byte * Common::decompressLZMA1 | ( | const byte * | data, |
size_t | inputSize, | ||
size_t | outputSize, | ||
bool | noEndMarker = false |
||
) |
Decompress using the LZMA1 algorithm.
data | The compressed input data. |
inputSize | The size of the input data in bytes. |
outputSize | The 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. |
noEndMarker | The compressed stream has no end marker. |
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().
SeekableReadStream * Common::decompressLZMA1 | ( | ReadStream & | input, |
size_t | inputSize, | ||
size_t | outputSize, | ||
bool | noEndMarker = false |
||
) |
Decompress using the LZMA1 algorithm.
input | The compressed input data. |
inputSize | The size of the input data to read in bytes. |
outputSize | The 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. |
noEndMarker | The compressed stream has no end marker. |
Definition at line 123 of file lzma.cpp.
References decompressLZMA1(), Common::ScopedPtrBase< T, Deallocator >::get(), kReadError, and Common::ReadStream::read().
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().
|
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().
void Common::deinitXML | ( | ) |
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().
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().
|
static |
Definition at line 40 of file xml.cpp.
References STRINGBUFLEN.
Referenced by Common::XMLParser::XMLParser().
|
static |
Definition at line 127 of file strutil.cpp.
Referenced by parse().
|
static |
Definition at line 118 of file error.cpp.
References Common::StackException::add(), and printException().
Referenced by exceptionDispatcherError(), and exceptionDispatcherWarning().
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().
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().
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().
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().
|
static |
Definition at line 235 of file blowfish.cpp.
References Common::BlowfishContext::S.
Referenced by blowfishDec(), blowfishEnc(), and md5Body().
|
static |
Definition at line 236 of file fft.cpp.
References fft4(), fft8(), getCosineTable(), sqrthalf, TRANSFORM, and TRANSFORM_ZERO.
|
static |
|
static |
|
static |
Definition at line 278 of file filepath.cpp.
References Common::UString::c_str().
Referenced by Common::FilePath::findSubDirectory().
Definition at line 261 of file hash.h.
References Common::UString::format().
Referenced by Aurora::ResourceManager::checkHashCollision(), Aurora::ResourceManager::dumpResourcesList(), and Sound::WwiseSoundBank::WwiseSoundBank().
T Common::gcd | ( | T | a, |
T | 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-=().
uint32 Common::generateIDNumber | ( | ) |
Definition at line 46 of file uuid.cpp.
References idNumber().
Referenced by Aurora::TalkManager::addTable(), Engines::Sonic::Module::Module(), Engines::DragonAge2::Object::Object(), Engines::DragonAge::Object::Object(), Engines::KotOR::Object::Object(), Engines::KotOR2::Object::Object(), Engines::Witcher::Object::Object(), Engines::Jade::Object::Object(), Engines::NWN2::Object::Object(), Engines::NWN::Object::Object(), and Engines::Sonic::Placeable::Placeable().
UString Common::generateIDNumberString | ( | ) |
Definition at line 65 of file uuid.cpp.
References idNumberString(), and uint64ToString().
Referenced by Engines::NWN::WidgetListItemFeat::WidgetListItemFeat().
UString Common::generateIDRandomString | ( | ) |
Definition at line 37 of file uuid.cpp.
Referenced by Graphics::Aurora::TextureManager::add(), Graphics::Aurora::TextureManager::get(), Graphics::Aurora::ModelNode_Jade::load(), and Graphics::Aurora::ModelNode_KotOR::load().
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().
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().
Return the human readable name of an encoding.
Definition at line 186 of file encoding.cpp.
References kEncodingMAX, and kEncodingName.
|
static |
Definition at line 46 of file readfile.cpp.
Referenced by Common::ReadFile::open().
const float * Common::getSineTable | ( | int | bits | ) |
Definition at line 8269 of file sinetables.cpp.
References sinTables.
Referenced by Common::RDFT::RDFT().
const float * Common::getSineWindow | ( | int | bits | ) |
Definition at line 1081 of file sinewindows.cpp.
References sineWindows.
Referenced by Sound::WMACodec::initMDCT().
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().
Definition at line 189 of file hash.h.
References kCRC32Tab.
Referenced by hashStringCRC32().
Definition at line 47 of file hash.h.
Referenced by hashStringDJB2().
Definition at line 76 of file hash.h.
Referenced by hashStringFNV32().
Definition at line 105 of file hash.h.
Referenced by hashStringFNV64().
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().
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().
|
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.
Definition at line 193 of file hash.h.
References hashCRC32().
Referenced by Aurora::GDAFile::findColumn(), and hashString().
Definition at line 202 of file hash.h.
References convertString(), hashCRC32(), and Common::ReadStream::kEOF.
Definition at line 51 of file hash.h.
References hashDJB2().
Referenced by hashString(), and Aurora::HERFFile::searchDictionary().
Definition at line 60 of file hash.h.
References convertString(), hashDJB2(), and Common::ReadStream::kEOF.
Definition at line 80 of file hash.h.
References hashFNV32().
Referenced by hashString().
Definition at line 89 of file hash.h.
References convertString(), hashFNV32(), and Common::ReadStream::kEOF.
Definition at line 109 of file hash.h.
References hashFNV64().
Referenced by hashString().
Definition at line 118 of file hash.h.
References convertString(), hashFNV64(), and Common::ReadStream::kEOF.
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.
|
static |
|
static |
bool Common::initedThreads | ( | ) |
Was the global threading system initialized?
Definition at line 50 of file threads.cpp.
References threadsInited.
Referenced by deinit().
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().
void Common::initXML | ( | ) |
|
static |
Definition at line 49 of file deflate.cpp.
References setZStreamInput().
Referenced by decompressDeflate(), decompressDeflateChunk(), and decompressDeflateWithoutOutputSize().
|
inlinestatic |
Definition at line 83 of file maths.h.
References intLog2Table256.
Referenced by Video::Bink::BinkAudioTrack::audioBlock(), Sound::bookMapType1QuantVals(), Sound::CodebookLibrary::copy(), Graphics::deSwizzleOffset(), Sound::WMACodec::evalBlockLength(), Sound::WwRIFFVorbisStream::generateHeaderSetup(), Sound::WMACodec::init(), Video::Bink::BinkVideoTrack::initBundles(), Engines::NWN::OptionsVideoAdvancedMenu::initWidget(), Sound::CodebookLibrary::rebuild(), and Engines::NWN::OptionsVideoAdvancedMenu::show().
bool Common::isMainThread | ( | ) |
Returns true if called from the main thread, false otherwise.
Definition at line 54 of file threads.cpp.
References threadsInited, and threadsMainID.
Referenced by Graphics::GLContainer::destroy(), Events::RequestManager::dispatch(), enforceMainThread(), Graphics::GraphicsManager::lockFrame(), Events::EventsManager::pushEvent(), Graphics::GLContainer::rebuild(), Graphics::GraphicsManager::setCullFace(), Graphics::GraphicsManager::setFSAA(), Graphics::WindowManager::setFullScreen(), Graphics::WindowManager::setGamma(), Graphics::GraphicsManager::setOrthogonal(), Graphics::GraphicsManager::setPerspective(), and Graphics::WindowManager::setWindowSize().
|
static |
Definition at line 198 of file debugman.cpp.
References kDebugGLAPI, and kDebugGLOther.
Referenced by Common::DebugManager::logDebugGL().
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().
|
static |
|
static |
|
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().
|
static |
|
static |
bool Common::operator!= | ( | int | left, |
const Rational & | right | ||
) |
Definition at line 323 of file rational.cpp.
Definition at line 307 of file rational.cpp.
Definition at line 212 of file ustring.h.
References Common::UString::UString().
Definition at line 216 of file ustring.h.
References Common::UString::UString().
Definition at line 295 of file rational.cpp.
Definition at line 301 of file rational.cpp.
Definition at line 313 of file rational.cpp.
bool Common::operator< | ( | int | left, |
const Rational & | right | ||
) |
Definition at line 331 of file rational.cpp.
bool Common::operator<= | ( | int | left, |
const Rational & | right | ||
) |
Definition at line 339 of file rational.cpp.
bool Common::operator== | ( | int | left, |
const Rational & | right | ||
) |
Definition at line 319 of file rational.cpp.
bool Common::operator> | ( | int | left, |
const Rational & | right | ||
) |
Definition at line 327 of file rational.cpp.
bool Common::operator>= | ( | int | left, |
const Rational & | right | ||
) |
Definition at line 335 of file rational.cpp.
|
inlinestatic |
Definition at line 132 of file strutil.cpp.
References strtoll.
Referenced by parseString().
|
inlinestatic |
Definition at line 136 of file strutil.cpp.
References errorOnSign(), and strtoull.
|
inlinestatic |
Definition at line 142 of file strutil.cpp.
|
inlinestatic |
Definition at line 146 of file strutil.cpp.
References errorOnSign().
|
inlinestatic |
Definition at line 152 of file strutil.cpp.
|
inlinestatic |
Definition at line 160 of file strutil.cpp.
References errorOnSign().
|
inlinestatic |
Definition at line 170 of file strutil.cpp.
|
inlinestatic |
Definition at line 178 of file strutil.cpp.
References errorOnSign().
|
inlinestatic |
Definition at line 188 of file strutil.cpp.
|
inlinestatic |
Definition at line 196 of file strutil.cpp.
References errorOnSign().
|
inlinestatic |
Definition at line 206 of file strutil.cpp.
References strtof.
|
inlinestatic |
Definition at line 210 of file strutil.cpp.
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().
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().
template void Common::parseString< double > | ( | const UString & | str, |
double & | value, | ||
bool | allowEmpty | ||
) |
template void Common::parseString< float > | ( | const UString & | str, |
float & | value, | ||
bool | allowEmpty | ||
) |
template void Common::parseString< signed char > | ( | const UString & | str, |
signed char & | value, | ||
bool | allowEmpty | ||
) |
template void Common::parseString< signed int > | ( | const UString & | str, |
signed int & | value, | ||
bool | allowEmpty | ||
) |
template void Common::parseString< signed long > | ( | const UString & | str, |
signed long & | value, | ||
bool | allowEmpty | ||
) |
template void Common::parseString< signed long long > | ( | const UString & | str, |
signed long long & | value, | ||
bool | allowEmpty | ||
) |
template void Common::parseString< signed short > | ( | const UString & | str, |
signed short & | value, | ||
bool | allowEmpty | ||
) |
template void Common::parseString< unsigned char > | ( | const UString & | str, |
unsigned char & | value, | ||
bool | allowEmpty | ||
) |
template void Common::parseString< unsigned int > | ( | const UString & | str, |
unsigned int & | value, | ||
bool | allowEmpty | ||
) |
template void Common::parseString< unsigned long > | ( | const UString & | str, |
unsigned long & | value, | ||
bool | allowEmpty | ||
) |
template void Common::parseString< unsigned long long > | ( | const UString & | str, |
unsigned long long & | value, | ||
bool | allowEmpty | ||
) |
template void Common::parseString< unsigned short > | ( | const UString & | str, |
unsigned short & | value, | ||
bool | allowEmpty | ||
) |
|
static |
|
static |
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().
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().
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().
|
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().
|
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().
|
static |
Definition at line 54 of file xml.cpp.
References Common::ReadStream::read().
Referenced by Aurora::TheWitcherSaveFile::getResource(), and Common::XMLParser::XMLParser().
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().
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().
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().
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().
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:
This example returns 7.
haystack | The stream to search through. |
needle | The bytes to search for. |
needleSize | The length of the needle in bytes. |
maxReadBack | Only look at the last maxReadBack bytes of the stream. |
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().
|
static |
Definition at line 37 of file deflate.cpp.
Referenced by decompressDeflateChunk(), and initZStream().
|
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().
Definition at line 103 of file strutil.cpp.
References Common::UString::format(), and Common::UString::trim().
Referenced by debugTag().
Definition at line 50 of file uuid.cpp.
Referenced by generateIDNumberString().
|
static |
Definition at line 236 of file encoding.cpp.
References kEncodingASCII, kEncodingCP1250, kEncodingCP1251, kEncodingCP1252, kEncodingCP932, kEncodingCP936, kEncodingCP949, kEncodingCP950, kEncodingLatin9, kEncodingUTF16BE, kEncodingUTF16LE, and kEncodingUTF8.
Referenced by readString(), and readStringLine().
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.
stream | The stream to write into. |
str | The string to write. |
encoding | The encoding to convert the string into. |
terminate | Should we write a terminating end-of-string sequence into the stream after the string has been written? |
Definition at line 339 of file encoding.cpp.
References convertString(), and Common::WriteStream::writeStream().
Referenced by Aurora::TheWitcherSaveWriter::finish().
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().
|
static |
Definition at line 112 of file cosinetables.cpp.
|
static |
Definition at line 47 of file cosinetables.cpp.
|
static |
Definition at line 31 of file cosinetables.cpp.
|
static |
Definition at line 1084 of file cosinetables.cpp.
|
static |
Definition at line 179 of file cosinetables.cpp.
|
static |
Definition at line 58 of file cosinetables.cpp.
|
static |
Definition at line 35 of file cosinetables.cpp.
|
static |
Definition at line 2111 of file cosinetables.cpp.
|
static |
Definition at line 310 of file cosinetables.cpp.
|
static |
Definition at line 77 of file cosinetables.cpp.
|
static |
Definition at line 40 of file cosinetables.cpp.
|
static |
Definition at line 4162 of file cosinetables.cpp.
|
static |
Definition at line 569 of file cosinetables.cpp.
|
static |
Definition at line 8261 of file cosinetables.cpp.
Referenced by getCosineTable().
|
static |
const int8 Common::intLog2Table256 |
Definition at line 31 of file maths.cpp.
Referenced by intLog2().
|
static |
Definition at line 73 of file blowfish.cpp.
Referenced by blowfishEBC().
|
static |
Table of CRC32 polynomial feedback terms.
Definition at line 143 of file hash.h.
Referenced by hashCRC32().
|
static |
Definition at line 47 of file debugman.cpp.
Referenced by Common::DebugManager::DebugManager().
|
static |
Definition at line 68 of file debugman.cpp.
Referenced by Common::DebugManager::logDebugGL().
|
static |
Definition at line 41 of file debugman.cpp.
Referenced by Common::DebugManager::DebugManager(), and Common::DebugManager::logDebugGL().
|
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().
|
static |
Definition at line 47 of file encoding.cpp.
Referenced by Common::ConversionManager::convert().
|
static |
Definition at line 51 of file encoding.cpp.
Referenced by Common::ConversionManager::convert().
|
static |
Definition at line 42 of file encoding.cpp.
Referenced by Common::ConversionManager::ConversionManager(), and getEncodingName().
|
static |
Definition at line 35 of file filepath.h.
Referenced by Common::FilePath::getFileSize().
|
static |
Definition at line 61 of file lzma.cpp.
Referenced by decompressLZMA1().
|
static |
Definition at line 71 of file blowfish.cpp.
Referenced by blowfishSetKey().
|
static |
The length of an MD5 digest in bytes.
Definition at line 38 of file md5.h.
Referenced by Aurora::ERFFile::findNWNPremiumKey(), Aurora::ERFFile::readNWNPremiumHeader(), Aurora::ERFFile::readV22Header(), and Aurora::ERFFile::readV30Header().
|
static |
Definition at line 70 of file blowfish.cpp.
Referenced by blowfishSetKey().
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().
const Exception Common::kReadError |
Exception when reading from a stream failed.
Definition at line 62 of file error.h.
Referenced by blowfishEBC(), Aurora::compress10(), Sound::AACDecoder::decodeFrame(), decompressDeflate(), decompressDeflateChunk(), decompressDeflateWithoutOutputSize(), decompressLZMA1(), Common::FoxPro::loadRecords(), printDataHex(), Common::ReadStream::readByte(), Graphics::TPC::readData(), Graphics::SBM::readData(), Graphics::TXB::readData(), Graphics::WinIconImage::readData(), Graphics::DDS::readData(), Graphics::XEOSITEX::readMipMaps(), Common::ReadStream::readStream(), Common::ReadStream::readUint16BE(), Common::ReadStream::readUint16LE(), Common::ReadStream::readUint32BE(), Common::ReadStream::readUint32LE(), Common::ReadStream::readUint64BE(), Common::ReadStream::readUint64LE(), Aurora::ERFFile::readV22Header(), Aurora::ERFFile::readV30Header(), Common::FoxPro::setMemo(), and Graphics::TTFRenderer::TTFRenderer().
|
static |
Definition at line 72 of file blowfish.cpp.
Referenced by blowfishDec(), blowfishEnc(), and blowfishSetKey().
const Exception Common::kSeekError |
Exception when seeking a stream failed.
Definition at line 63 of file error.h.
Referenced by Common::ReadFile::seek(), Common::WriteFile::seek(), Common::MemoryWriteStream::seek(), Common::MemoryReadStream::seek(), Common::MemoryWriteStreamDynamic::seek(), Common::SeekableSubReadStream::seek(), and Aurora::SSFFile::writeNWN().
|
static |
Definition at line 55 of file encoding.cpp.
Referenced by Common::ConversionManager::convert().
|
static |
Definition at line 41 of file deflate.h.
Referenced by Aurora::ERFFile::decompressHeaderlessZlib(), Aurora::ERFFile::decompressStandardZlib(), Aurora::OBBFile::getIndex(), Aurora::OBBFile::getResource(), and Aurora::GFXFile::load().
|
static |
Definition at line 42 of file deflate.h.
Referenced by Common::ZipFile::decompressFile().
const Exception Common::kWriteError |
Exception when writing to a stream failed.
Definition at line 64 of file error.h.
Referenced by Aurora::compress10(), Common::WriteFile::flush(), Common::WriteStream::writeByte(), Common::WriteStream::writeBytes(), Common::WriteStream::writeSByte(), Common::WriteStream::writeString(), Common::WriteStream::writeUint16BE(), Common::WriteStream::writeUint16LE(), Common::WriteStream::writeUint32BE(), Common::WriteStream::writeUint32LE(), Common::WriteStream::writeUint64BE(), and Common::WriteStream::writeUint64LE().
|
static |
Definition at line 93 of file blowfish.cpp.
Referenced by blowfishSetKey(), and Graphics::Aurora::ModelNode_KotOR::readMesh().
|
static |
Definition at line 99 of file blowfish.cpp.
Referenced by blowfishSetKey().
|
static |
Definition at line 170 of file sinewindows.cpp.
|
static |
Definition at line 49 of file sinewindows.cpp.
|
static |
Definition at line 301 of file sinewindows.cpp.
|
static |
Definition at line 68 of file sinewindows.cpp.
|
static |
Definition at line 31 of file sinewindows.cpp.
|
static |
Definition at line 560 of file sinewindows.cpp.
|
static |
Definition at line 103 of file sinewindows.cpp.
|
static |
Definition at line 38 of file sinewindows.cpp.
|
static |
Definition at line 1075 of file sinewindows.cpp.
Referenced by getSineWindow().
|
static |
Definition at line 112 of file sinetables.cpp.
|
static |
Definition at line 47 of file sinetables.cpp.
|
static |
Definition at line 31 of file sinetables.cpp.
|
static |
Definition at line 1084 of file sinetables.cpp.
|
static |
Definition at line 179 of file sinetables.cpp.
|
static |
Definition at line 58 of file sinetables.cpp.
|
static |
Definition at line 35 of file sinetables.cpp.
|
static |
Definition at line 2111 of file sinetables.cpp.
|
static |
Definition at line 310 of file sinetables.cpp.
|
static |
Definition at line 77 of file sinetables.cpp.
|
static |
Definition at line 40 of file sinetables.cpp.
|
static |
Definition at line 4162 of file sinetables.cpp.
|
static |
Definition at line 569 of file sinetables.cpp.
|
static |
Definition at line 8261 of file sinetables.cpp.
Referenced by getSineTable().