edit clang-format with feedback from TheNathannator

This commit is contained in:
Dark
2023-12-23 09:30:38 -05:00
parent 38b83e161c
commit 19dade8f0c
191 changed files with 6040 additions and 6313 deletions
+52 -53
View File
@@ -1,16 +1,16 @@
---
Language: Cpp
Language: Cpp
AccessModifierOffset: -4
AlignAfterOpenBracket: AlwaysBreak
AlignAfterOpenBracket: BlockIndent
AlignArrayOfStructures: None
AlignConsecutiveMacros: None
AlignConsecutiveAssignments: None
AlignConsecutiveBitFields: None
AlignConsecutiveDeclarations: None
AlignEscapedNewlines: Right
AlignOperands: DontAlign
AlignOperands: DontAlign
AlignTrailingComments: false
AllowAllArgumentsOnNextLine: false
AllowAllArgumentsOnNextLine: true
AllowAllConstructorInitializersOnNextLine: true
AllowAllParametersOfDeclarationOnNextLine: true
AllowShortEnumsOnASingleLine: false
@@ -27,23 +27,23 @@ AlwaysBreakTemplateDeclarations: MultiLine
AttributeMacros:
- __capability
BinPackArguments: false
BinPackParameters: true
BinPackParameters: false
BraceWrapping:
AfterCaseLabel: false
AfterClass: false
AfterCaseLabel: false
AfterClass: false
AfterControlStatement: Never
AfterEnum: false
AfterFunction: true
AfterNamespace: false
AfterEnum: false
AfterFunction: false
AfterNamespace: false
AfterObjCDeclaration: false
AfterStruct: false
AfterUnion: false
AfterStruct: false
AfterUnion: false
AfterExternBlock: false
BeforeCatch: false
BeforeElse: false
BeforeCatch: false
BeforeElse: false
BeforeLambdaBody: false
BeforeWhile: false
IndentBraces: false
BeforeWhile: false
IndentBraces: false
SplitEmptyFunction: true
SplitEmptyRecord: true
SplitEmptyNamespace: true
@@ -57,8 +57,8 @@ BreakConstructorInitializersBeforeComma: false
BreakConstructorInitializers: BeforeColon
BreakAfterJavaFieldAnnotations: false
BreakStringLiterals: false
ColumnLimit: 80
CommentPragmas: '^ IWYU pragma:'
ColumnLimit: 90
CommentPragmas: "^ IWYU pragma:"
CompactNamespaces: false
ConstructorInitializerAllOnOneLineOrOnePerLine: false
ConstructorInitializerIndentWidth: 4
@@ -66,50 +66,50 @@ ContinuationIndentWidth: 4
Cpp11BracedListStyle: false
DeriveLineEnding: true
DerivePointerAlignment: false
DisableFormat: false
DisableFormat: false
EmptyLineAfterAccessModifier: Never
EmptyLineBeforeAccessModifier: LogicalBlock
ExperimentalAutoDetectBinPacking: false
FixNamespaceComments: true
FixNamespaceComments: false
ForEachMacros:
- Q_FOREACH
- BOOST_FOREACH
IfMacros:
- KJ_IF_MAYBE
IncludeBlocks: Preserve
IncludeBlocks: Preserve
IncludeCategories:
- Regex: '.*'
Priority: 1
SortPriority: 0
CaseSensitive: false
- Regex: '^(<|"(gtest|gmock|isl|json)/)'
Priority: 3
SortPriority: 0
CaseSensitive: false
- Regex: '.*'
Priority: 1
SortPriority: 0
CaseSensitive: false
IncludeIsMainRegex: '(Test)?$'
IncludeIsMainSourceRegex: ''
- Regex: .*
Priority: 1
SortPriority: 0
CaseSensitive: false
- Regex: ^(<|"(gtest|gmock|isl|json)/)
Priority: 3
SortPriority: 0
CaseSensitive: false
- Regex: .*
Priority: 1
SortPriority: 0
CaseSensitive: false
IncludeIsMainRegex: (Test)?$
IncludeIsMainSourceRegex: ""
IndentAccessModifiers: false
IndentCaseLabels: false
IndentCaseBlocks: false
IndentGotoLabels: true
IndentPPDirectives: None
IndentExternBlock: AfterExternBlock
IndentRequires: false
IndentWidth: 4
IndentRequires: false
IndentWidth: 4
IndentWrappedFunctionNames: false
InsertTrailingCommas: None
JavaScriptQuotes: Leave
JavaScriptWrapImports: true
KeepEmptyLinesAtTheStartOfBlocks: false
LambdaBodyIndentation: Signature
MacroBlockBegin: ''
MacroBlockEnd: ''
MacroBlockBegin: ""
MacroBlockEnd: ""
MaxEmptyLinesToKeep: 1
NamespaceIndentation: Inner
NamespaceIndentation: All
ObjCBinPackProtocolList: Auto
ObjCBlockIndentWidth: 4
ObjCBreakBeforeNestedBlockParam: true
@@ -125,11 +125,12 @@ PenaltyExcessCharacter: 100
PenaltyReturnTypeOnItsOwnLine: 60
PenaltyIndentedWhitespace: 0
PointerAlignment: Right
PPIndentWidth: -1
PPIndentWidth: -1
ReferenceAlignment: Pointer
ReflowComments: false
ReflowComments: true
SeparateDefinitionBlocks: Leave
ShortNamespaceLines: 1
SortIncludes: Never
SortIncludes: Never
SortJavaStaticImport: Before
SortUsingDeclarations: true
SpaceAfterCStyleCast: false
@@ -137,7 +138,7 @@ SpaceAfterLogicalNot: false
SpaceAfterTemplateKeyword: true
SpaceBeforeAssignmentOperators: true
SpaceBeforeCaseColon: false
SpaceBeforeCpp11BracedList: false
SpaceBeforeCpp11BracedList: true
SpaceBeforeCtorInitializerColon: true
SpaceBeforeInheritanceColon: true
SpaceBeforeParens: ControlStatements
@@ -146,31 +147,29 @@ SpaceBeforeRangeBasedForLoopColon: true
SpaceInEmptyBlock: false
SpaceInEmptyParentheses: false
SpacesBeforeTrailingComments: 1
SpacesInAngles: Never
SpacesInAngles: Never
SpacesInConditionalStatement: false
SpacesInContainerLiterals: false
SpacesInCStyleCastParentheses: false
SpacesInLineCommentPrefix:
Minimum: 1
Maximum: -1
Minimum: 1
Maximum: -1
SpacesInParentheses: false
SpacesInSquareBrackets: false
SpaceBeforeSquareBrackets: false
BitFieldColonSpacing: Both
Standard: c++03
Standard: c++03
StatementAttributeLikeMacros:
- Q_EMIT
StatementMacros:
- Q_UNUSED
- QT_REQUIRE_VERSION
TabWidth: 4
UseCRLF: false
UseTab: Always
TabWidth: 4
UseCRLF: false
UseTab: Never
WhitespaceSensitiveMacros:
- STRINGIZE
- PP_STRINGIZE
- BOOST_PP_STRINGIZE
- NS_SWIFT_NAME
- CF_SWIFT_NAME
...
+1 -1
View File
@@ -6,5 +6,5 @@ insert_final_newline = true
trim_trailing_whitespace = true
[{*.c,*.h,*.cpp,*.hpp}]
indent_style=tab
indent_style=space
indent_size=4
+7 -5
View File
@@ -7,14 +7,16 @@
#include "rb3/data.hpp"
// placement new
inline void* operator new (unsigned long size, void* p) { return p; }
inline void *operator new(unsigned long size, void *p) {
return p;
}
// evaluate a DataNode at a particular index
DataNode* EvaluateNodeAtIndex(DataArray*, int);
DataNode *EvaluateNodeAtIndex(DataArray *, int);
// string operations
bool SearchReplace(const char*, const char*, const char*, char*);
bool StrNCopy(char*, const char*, int);
bool SearchReplace(const char *, const char *, const char *, char *);
bool StrNCopy(char *, const char *, int);
// misc functions
int Minimum(int, int);
@@ -38,7 +40,7 @@ bool IsNan(float);
int CountBits(int);
// functions to swap endians of data
void SwapData(const void*, void*, int);
void SwapData(const void *, void *, int);
unsigned short SwapDataHalfWord(unsigned short);
unsigned int SwapDataWord(int);
long long SwapDataDoubleWord(long long);
+14 -18
View File
@@ -4,12 +4,10 @@
#define MAX(x, y) ((x) > (y) ? (x) : (y))
#define MIN(x, y) ((x) < (y) ? (x) : (y))
#define CLAMP(low, high, x) \
((x) > (high) ? (high) : ((x) < (low) ? (low) : (x)))
#define CLAMP(low, high, x) ((x) > (high) ? (high) : ((x) < (low) ? (low) : (x)))
#define ROUND_UP(x, align) (((x) + (align)-1) & (-(align)))
#define ROUND_UP_PTR(x, align) \
((void *)((((u32)(x)) + (align)-1) & (~((align)-1))))
#define ROUND_UP_PTR(x, align) ((void *)((((u32)(x)) + (align)-1) & (~((align)-1))))
#define ROUND_DOWN(x, align) ((x) & (-(align)))
#define ROUND_DOWN_PTR(x, align) ((void *)(((u32)(x)) & (~((align)-1))))
@@ -20,21 +18,19 @@
// (Functions are given prototypes for -requireprotos)
#ifdef __MWERKS__
// Force BSS order
#define CW_FORCE_BSS(module, ...) \
void fake_function(...); \
void FORCE_BSS##module##x(void); \
void FORCE_BSS##module##x(void) \
{ \
fake_function(__VA_ARGS__); \
}
#define CW_FORCE_BSS(module, ...) \
void fake_function(...); \
void FORCE_BSS##module##x(void); \
void FORCE_BSS##module##x(void) { \
fake_function(__VA_ARGS__); \
}
// Force strings into pool
#define CW_FORCE_STRINGS(module, ...) \
void fake_function(...); \
void FORCE_STRINGS##module(void); \
void FORCE_STRINGS##module(void) \
{ \
fake_function(__VA_ARGS__); \
}
#define CW_FORCE_STRINGS(module, ...) \
void fake_function(...); \
void FORCE_STRINGS##module(void); \
void FORCE_STRINGS##module(void) { \
fake_function(__VA_ARGS__); \
}
#else
#define CW_FORCE_BSS(module, ...)
#define CW_FORCE_STRINGS(module, ...)
+15 -11
View File
@@ -7,26 +7,30 @@ namespace Quazal {
class Codec : RootObject {
public:
enum EncoderState {
enc0, enc1, enc2
enc0,
enc1,
enc2
};
enum DecoderState {
dec0, dec1, dec2
dec0,
dec1,
dec2
};
Codec();
virtual ~Codec();
virtual const char* GetName() = 0;
virtual const char *GetName() = 0;
virtual int GetNbSamplesPerFrame() = 0;
virtual int GetNbBytesPerEncodedFrame() = 0;
virtual float GetCompressionRatio();
virtual void* CreateEncoderState() = 0;
virtual void* CreateDecoderState() = 0;
virtual void ReleaseEncoderState(EncoderState*) = 0;
virtual void ReleaseDecoderState(DecoderState*) = 0;
virtual void ResetState(EncoderState*) = 0;
virtual void ResetState(DecoderState*) = 0;
virtual void Encode(EncoderState*, short*, unsigned char*) = 0;
virtual void Decode(DecoderState*, unsigned char*, short*) = 0;
virtual void *CreateEncoderState() = 0;
virtual void *CreateDecoderState() = 0;
virtual void ReleaseEncoderState(EncoderState *) = 0;
virtual void ReleaseDecoderState(DecoderState *) = 0;
virtual void ResetState(EncoderState *) = 0;
virtual void ResetState(DecoderState *) = 0;
virtual void Encode(EncoderState *, short *, unsigned char *) = 0;
virtual void Decode(DecoderState *, unsigned char *, short *) = 0;
virtual void Trace(unsigned int);
AudioStreamFormat fmt;
+3 -3
View File
@@ -1,14 +1,14 @@
#include "datetime.hpp"
Quazal::DateTime::DateTime(){
Quazal::DateTime::DateTime() {
num = 0;
}
Quazal::DateTime::DateTime(const Quazal::DateTime& dt){
Quazal::DateTime::DateTime(const Quazal::DateTime &dt) {
num = dt.num;
}
Quazal::DateTime* Quazal::DateTime::operator=(const Quazal::DateTime& dt){
Quazal::DateTime *Quazal::DateTime::operator=(const Quazal::DateTime &dt) {
num = dt.num;
}
+3 -3
View File
@@ -5,11 +5,11 @@ namespace Quazal {
class DateTime {
public:
DateTime();
DateTime(const DateTime&);
DateTime* operator=(const DateTime&);
DateTime(const DateTime &);
DateTime *operator=(const DateTime &);
operator unsigned long long() const;
unsigned int GetYear() const;
unsigned long long num;
};
}
+15 -9
View File
@@ -10,23 +10,29 @@ namespace Quazal {
static int s_uiHeaderSize;
enum _InstructionType {
_InstType0, _InstType1, _InstType2, _InstType3, _InstType4
_InstType0,
_InstType1,
_InstType2,
_InstType3,
_InstType4
};
MemoryManager(char*);
MemoryManager(char *);
virtual ~MemoryManager();
virtual void BeginProtection();
virtual void EndProtection();
static MemoryManager* GetDefaultMemoryManager();
static void* Allocate(MemoryManager*, unsigned long, const char*, unsigned int, _InstructionType);
static void Free(MemoryManager*, void*, _InstructionType);
static MemoryManager *GetDefaultMemoryManager();
static void *Allocate(
MemoryManager *, unsigned long, const char *, unsigned int, _InstructionType
);
static void Free(MemoryManager *, void *, _InstructionType);
int GetHeaderSize();
char* unk4;
char *unk4;
int unk8, unkc, unk10;
WaterMark* unk14;
MutexPrimitive* unk18;
WaterMark *unk14;
MutexPrimitive *unk18;
};
}
+12 -11
View File
@@ -3,48 +3,49 @@
#include "highresolutionclock.hpp"
#include "common.hpp"
const char* Unused(){
const char *Unused() {
return "Insufficient Memory";
}
#pragma dont_inline on
Quazal::Platform::Platform(){
Quazal::Platform::Platform() {
_Instance = this;
HighResolutionClock clock;
clock.GetTime();
SetRandomNumberSeed((unsigned long long)clock);
}
Quazal::Platform::~Platform(){ }
Quazal::Platform::~Platform() {
}
#pragma dont_inline reset
void Quazal::Platform::CreateInstance(){
void Quazal::Platform::CreateInstance() {
_Instance = new ("Platform.cpp", 0x89) Platform();
}
void Quazal::Platform::DeleteInstance(){
void Quazal::Platform::DeleteInstance() {
delete _Instance;
}
void Quazal::Platform::SetRandomNumberSeed(unsigned int ui){
void Quazal::Platform::SetRandomNumberSeed(unsigned int ui) {
s_oRNG.SetRandomNumberSeed(ui);
}
unsigned int Quazal::Platform::GetRandomNumber(unsigned int ui){
unsigned int Quazal::Platform::GetRandomNumber(unsigned int ui) {
s_oRNG.GetRandomNumber(ui);
}
float Quazal::Platform::GetRealRandomNumber(float f){
float Quazal::Platform::GetRealRandomNumber(float f) {
s_oRNG.GetRealRandomNumber(f);
}
#pragma force_active on
void Quazal::Platform::Breakpoint(){ }
void Quazal::Platform::Breakpoint() {
}
#pragma force_active reset
extern "C" void OSSleepTicks(int, int);
extern "C" void OSYieldThread();
void Quazal::Platform::Sleep(unsigned int ui){
void Quazal::Platform::Sleep(unsigned int ui) {
}
+1 -1
View File
@@ -6,7 +6,7 @@
namespace Quazal {
class Platform : RootObject {
public:
static Platform* _Instance;
static Platform *_Instance;
static RandomNumberGenerator s_oRNG;
Platform();
+12 -11
View File
@@ -1,22 +1,22 @@
#include "qresult.hpp"
Quazal::qResult::qResult(){
Quazal::qResult::qResult() {
i1 = 0x80010001;
c = "Result.cpp";
i2 = 0x14;
}
Quazal::qResult::qResult(const int& i){
Quazal::qResult::qResult(const int &i) {
i1 = i;
c = "Result.cpp";
i2 = 0x1B;
}
bool Quazal::qResult::Equals(const int& i) const {
bool Quazal::qResult::Equals(const int &i) const {
return (i1 == i);
}
bool Quazal::qResult::Equals(const bool& b) const {
bool Quazal::qResult::Equals(const bool &b) const {
return ((i1 >= 0) == b);
}
@@ -24,14 +24,14 @@ Quazal::qResult::operator bool() const {
return (i1 >= 0);
}
Quazal::qResult* Quazal::qResult::operator=(const int& i){
Quazal::qResult *Quazal::qResult::operator=(const int &i) {
i1 = i;
c = "Result.cpp";
i2 = 0x59;
return this;
}
Quazal::qResult* Quazal::qResult::operator=(const Quazal::qResult& res){
Quazal::qResult *Quazal::qResult::operator=(const Quazal::qResult &res) {
i1 = res.i1;
c = res.c;
i2 = res.i2;
@@ -39,21 +39,22 @@ Quazal::qResult* Quazal::qResult::operator=(const Quazal::qResult& res){
}
#pragma force_active on
void Quazal::qResult::Trace(unsigned int) const { }
void Quazal::qResult::Trace(unsigned int) const {
}
#pragma force_active reset
const char* UnusedQResultReturnCodeFxn(){
const char *UnusedQResultReturnCodeFxn() {
return "ReturnCode ";
}
const char* UnusedQResultOriginFxn(){
const char *UnusedQResultOriginFxn() {
return " (origin ";
}
const char* UnusedQResultLineFxn(){
const char *UnusedQResultLineFxn() {
return ", line ";
}
const char* UnusedQResultEndParenFxn(){
const char *UnusedQResultEndParenFxn() {
return ")";
}
+6 -6
View File
@@ -5,16 +5,16 @@ namespace Quazal {
class qResult {
public:
int i1;
char* c;
char *c;
int i2;
qResult();
qResult(const int&);
bool Equals(const int&) const;
bool Equals(const bool&) const;
qResult(const int &);
bool Equals(const int &) const;
bool Equals(const bool &) const;
operator bool() const;
qResult* operator=(const int&);
qResult* operator=(const qResult&);
qResult *operator=(const int &);
qResult *operator=(const qResult &);
void Trace(unsigned int) const;
};
}
+19 -17
View File
@@ -1,42 +1,44 @@
#include "randomnumbergenerator.hpp"
Quazal::RandomNumberGenerator::RandomNumberGenerator(){
Quazal::RandomNumberGenerator::RandomNumberGenerator() {
unk_arr2[0] = 0;
unk_arr2[1] = 0x9908B0DF;
unk_9c0 = 0x271;
SetRandomNumberSeed(1);
}
Quazal::RandomNumberGenerator::~RandomNumberGenerator(){ }
Quazal::RandomNumberGenerator::~RandomNumberGenerator() {
}
void Quazal::RandomNumberGenerator::SetRandomNumberSeed(unsigned int ui){
void Quazal::RandomNumberGenerator::SetRandomNumberSeed(unsigned int ui) {
unk_arr[0] = ui;
unk_9c0 = 1;
for(; unk_9c0 < 0x270; unk_9c0++){
for (; unk_9c0 < 0x270; unk_9c0++) {
unk_arr[unk_9c0] = unk_arr[unk_9c0 - 1] * 0x10DCD;
}
}
unsigned int Quazal::RandomNumberGenerator::GetRandomNumber(unsigned int ui){
unsigned int Quazal::RandomNumberGenerator::GetRandomNumber(unsigned int ui) {
unsigned int i;
unsigned int tmp2;
if(0x270 <= unk_9c0){
if(unk_9c0 == 0x271) SetRandomNumberSeed(0x1105);
if (0x270 <= unk_9c0) {
if (unk_9c0 == 0x271)
SetRandomNumberSeed(0x1105);
for(i = 0; i < 0xE3; i++){
unsigned int tmp = (unk_arr[i] & 0x80000000) | (unk_arr[i + 1] & 0x7FFFFFFF & ~0x80000000);
for (i = 0; i < 0xE3; i++) {
unsigned int tmp =
(unk_arr[i] & 0x80000000) | (unk_arr[i + 1] & 0x7FFFFFFF & ~0x80000000);
unk_arr[i] = (tmp >> 1) ^ unk_arr[i + 0x18D] ^ (unk_arr2[tmp & 1]);
}
for(; i < 0x26F; i++){
unsigned int tmp = (unk_arr[i] & 0x80000000) | (unk_arr[i + 1] & 0x7FFFFFFF & ~0x80000000);
unk_arr[i] = (tmp >> 1) ^ unk_arr[i - 0xE3] ^ (unk_arr2[tmp & 1]);
for (; i < 0x26F; i++) {
unsigned int tmp =
(unk_arr[i] & 0x80000000) | (unk_arr[i + 1] & 0x7FFFFFFF & ~0x80000000);
unk_arr[i] = (tmp >> 1) ^ unk_arr[i - 0xE3] ^ (unk_arr2[tmp & 1]);
}
tmp2 = (unk_arr[0] & 0x7FFFFFFF) | (unk_arr[0x26F] & 0x80000000) ;
unk_arr[0x26F] = unk_arr[0x18C] ^
(tmp2 >> 1) ^
unk_arr2[(tmp2 & 1)];
tmp2 = (unk_arr[0] & 0x7FFFFFFF) | (unk_arr[0x26F] & 0x80000000);
unk_arr[0x26F] = unk_arr[0x18C] ^ (tmp2 >> 1) ^ unk_arr2[(tmp2 & 1)];
unk_9c0 = 0;
}
int tmp = unk_9c0++;
@@ -47,6 +49,6 @@ unsigned int Quazal::RandomNumberGenerator::GetRandomNumber(unsigned int ui){
return i % ui;
}
float Quazal::RandomNumberGenerator::GetRealRandomNumber(float f){
float Quazal::RandomNumberGenerator::GetRealRandomNumber(float f) {
return (GetRandomNumber(0x10000) / 65536.0f * f);
}
+10 -7
View File
@@ -1,28 +1,31 @@
#include "refcountedobject.hpp"
#include "scopedcs.hpp"
Quazal::RefCountedObject::RefCountedObject(){
Quazal::RefCountedObject::RefCountedObject() {
ref_count = 1;
}
Quazal::RefCountedObject::~RefCountedObject(){
Quazal::RefCountedObject::~RefCountedObject() {
ref_count = 0;
}
Quazal::RefCountedObject* Quazal::RefCountedObject::AcquireRef(){
Quazal::RefCountedObject *Quazal::RefCountedObject::AcquireRef() {
ScopedCS scope(s_oCS);
ref_count++;
return this;
}
void Quazal::RefCountedObject::ReleaseRef(){
void Quazal::RefCountedObject::ReleaseRef() {
bool b = false;
{
ScopedCS scope(s_oCS);
if(ref_count == 1) b = true;
else ref_count--;
if (ref_count == 1)
b = true;
else
ref_count--;
}
if(b) delete this;
if (b)
delete this;
}
unsigned short Quazal::RefCountedObject::GetRefCount() const {
+1 -1
View File
@@ -10,7 +10,7 @@ namespace Quazal {
RefCountedObject();
virtual ~RefCountedObject();
virtual RefCountedObject* AcquireRef();
virtual RefCountedObject *AcquireRef();
virtual void ReleaseRef();
unsigned short GetRefCount() const;
+46 -12
View File
@@ -1,26 +1,60 @@
#include "rootobject.hpp"
#include "memorymanager.hpp"
void* Quazal::RootObject::operator new(unsigned long ul){
Quazal::MemoryManager::Allocate(Quazal::MemoryManager::GetDefaultMemoryManager(), ul, "Unknown", 0, Quazal::MemoryManager::_InstType3);
void *Quazal::RootObject::operator new(unsigned long ul) {
Quazal::MemoryManager::Allocate(
Quazal::MemoryManager::GetDefaultMemoryManager(),
ul,
"Unknown",
0,
Quazal::MemoryManager::_InstType3
);
}
void* Quazal::RootObject::operator new(unsigned long ul, const char* cc, unsigned int ui){
Quazal::MemoryManager::Allocate(Quazal::MemoryManager::GetDefaultMemoryManager(), ul, cc, ui, Quazal::MemoryManager::_InstType3);
void *
Quazal::RootObject::operator new(unsigned long ul, const char *cc, unsigned int ui) {
Quazal::MemoryManager::Allocate(
Quazal::MemoryManager::GetDefaultMemoryManager(),
ul,
cc,
ui,
Quazal::MemoryManager::_InstType3
);
}
void* Quazal::RootObject::operator new[](unsigned long ul){
Quazal::MemoryManager::Allocate(Quazal::MemoryManager::GetDefaultMemoryManager(), ul, "Unknown", 0, Quazal::MemoryManager::_InstType4);
void *Quazal::RootObject::operator new[](unsigned long ul) {
Quazal::MemoryManager::Allocate(
Quazal::MemoryManager::GetDefaultMemoryManager(),
ul,
"Unknown",
0,
Quazal::MemoryManager::_InstType4
);
}
void* Quazal::RootObject::operator new[](unsigned long ul, const char* cc, unsigned int ui){
Quazal::MemoryManager::Allocate(Quazal::MemoryManager::GetDefaultMemoryManager(), ul, cc, ui, Quazal::MemoryManager::_InstType4);
void *
Quazal::RootObject::operator new[](unsigned long ul, const char *cc, unsigned int ui) {
Quazal::MemoryManager::Allocate(
Quazal::MemoryManager::GetDefaultMemoryManager(),
ul,
cc,
ui,
Quazal::MemoryManager::_InstType4
);
}
void Quazal::RootObject::operator delete(void* v){
Quazal::MemoryManager::Free(Quazal::MemoryManager::GetDefaultMemoryManager(), v, Quazal::MemoryManager::_InstType3);
void Quazal::RootObject::operator delete(void *v) {
Quazal::MemoryManager::Free(
Quazal::MemoryManager::GetDefaultMemoryManager(),
v,
Quazal::MemoryManager::_InstType3
);
}
void Quazal::RootObject::operator delete[](void* v){
Quazal::MemoryManager::Free(Quazal::MemoryManager::GetDefaultMemoryManager(), v, Quazal::MemoryManager::_InstType4);
void Quazal::RootObject::operator delete[](void *v) {
Quazal::MemoryManager::Free(
Quazal::MemoryManager::GetDefaultMemoryManager(),
v,
Quazal::MemoryManager::_InstType4
);
}
+6 -6
View File
@@ -4,12 +4,12 @@
namespace Quazal {
class RootObject {
public:
void* operator new(unsigned long);
void* operator new(unsigned long, const char*, unsigned int);
void* operator new[](unsigned long);
void* operator new[](unsigned long, const char*, unsigned int);
void operator delete(void*);
void operator delete[](void*);
void *operator new(unsigned long);
void *operator new(unsigned long, const char *, unsigned int);
void *operator new[](unsigned long);
void *operator new[](unsigned long, const char *, unsigned int);
void operator delete(void *);
void operator delete[](void *);
};
}
+1 -1
View File
@@ -6,7 +6,7 @@
namespace Quazal {
class ScopedCS : RootObject {
public:
ScopedCS(CriticalSection&);
ScopedCS(CriticalSection &);
~ScopedCS();
};
}
+2 -6
View File
@@ -3,14 +3,10 @@
namespace Quazal {
template <class T>
char* SpecialNewArray(unsigned int, char*, unsigned int){
template <class T> char *SpecialNewArray(unsigned int, char *, unsigned int) {
}
template <class T>
void SpecialDeleteArray(char*){
template <class T> void SpecialDeleteArray(char *) {
}
}
+11 -11
View File
@@ -7,19 +7,19 @@ namespace Quazal {
public:
SpeexCodec(int);
virtual ~SpeexCodec();
virtual const char* GetName();
virtual const char *GetName();
virtual int GetNbSamplesPerFrame();
virtual int GetNbBytesPerEncodedFrame();
virtual void* CreateEncoderState();
virtual void* CreateDecoderState();
virtual void ReleaseEncoderState(EncoderState*);
virtual void ReleaseDecoderState(DecoderState*);
virtual void ResetState(EncoderState*);
virtual void ResetState(DecoderState*);
virtual void Encode(EncoderState*, short*, unsigned char*);
virtual void Decode(DecoderState*, unsigned char*, short*);
virtual void *CreateEncoderState();
virtual void *CreateDecoderState();
virtual void ReleaseEncoderState(EncoderState *);
virtual void ReleaseDecoderState(DecoderState *);
virtual void ResetState(EncoderState *);
virtual void ResetState(DecoderState *);
virtual void Encode(EncoderState *, short *, unsigned char *);
virtual void Decode(DecoderState *, unsigned char *, short *);
int unk18;
int unk1c;
};

Some files were not shown because too many files have changed in this diff Show More