Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
110 changes: 110 additions & 0 deletions .clang-format
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
---
AccessModifierOffset: -4
AlignAfterOpenBracket: Align
AlignConsecutiveAssignments: false
AlignConsecutiveDeclarations: false
#AlignEscapedNewlines: Left # Unknown to clang-format-4.0
AlignOperands: true
AlignTrailingComments: false
AllowAllParametersOfDeclarationOnNextLine: false
AllowShortBlocksOnASingleLine: false
AllowShortCaseLabelsOnASingleLine: false
AllowShortFunctionsOnASingleLine: None
AllowShortIfStatementsOnASingleLine: false
AllowShortLoopsOnASingleLine: false
AlwaysBreakAfterDefinitionReturnType: None
AlwaysBreakAfterReturnType: None
AlwaysBreakBeforeMultilineStrings: false
AlwaysBreakTemplateDeclarations: false
BinPackArguments: true
BinPackParameters: true
BraceWrapping:
AfterClass: true
AfterCaseLabel: true
AfterControlStatement: true
AfterEnum: true
AfterFunction: true
AfterNamespace: true
AfterObjCDeclaration: true
AfterStruct: true
AfterUnion: true
AfterExternBlock: false
BeforeCatch: true
BeforeElse: true
IndentBraces: false
#SplitEmptyFunction: true # Unknown to clang-format-4.0
#SplitEmptyRecord: true # Unknown to clang-format-4.0
#SplitEmptyNamespace: true # Unknown to clang-format-4.0
BreakBeforeBinaryOperators: None
BreakBeforeBraces: Custom
#BreakBeforeInheritanceComma: false # Unknown to clang-format-4.0
BreakBeforeTernaryOperators: false
BreakConstructorInitializersBeforeComma: false
#BreakConstructorInitializers: BeforeComma # Unknown to clang-format-4.0
BreakAfterJavaFieldAnnotations: false
BreakStringLiterals: false
ColumnLimit: 100
CommentPragmas: '^ IWYU pragma:'
#CompactNamespaces: false # Unknown to clang-format-4.0
ConstructorInitializerAllOnOneLineOrOnePerLine: false
ConstructorInitializerIndentWidth: 4
ContinuationIndentWidth: 4
Cpp11BracedListStyle: false
DerivePointerAlignment: false
DisableFormat: false
ExperimentalAutoDetectBinPacking: false
FixNamespaceComments: true # Unknown to clang-format-4.0

ForEachMacros:

#IncludeBlocks: Preserve # Unknown to clang-format-5.0
IncludeCategories:
- Regex: '.*'
Priority: 1
IncludeIsMainRegex: '(Test)?$'
IndentCaseLabels: false
#IndentPPDirectives: None # Unknown to clang-format-5.0
IndentWidth: 4
IndentWrappedFunctionNames: false
JavaScriptQuotes: Leave
JavaScriptWrapImports: true
KeepEmptyLinesAtTheStartOfBlocks: false
MacroBlockBegin: ''
MacroBlockEnd: ''
MaxEmptyLinesToKeep: 1
NamespaceIndentation: All
#ObjCBinPackProtocolList: Auto # Unknown to clang-format-5.0
ObjCBlockIndentWidth: 4
ObjCSpaceAfterProperty: true
ObjCSpaceBeforeProtocolList: true

#PenaltyBreakAssignment: 10 # Unknown to clang-format-4.0
PenaltyBreakBeforeFirstCallParameter: 30
PenaltyBreakComment: 10
PenaltyBreakFirstLessLess: 0
PenaltyBreakString: 10
PenaltyExcessCharacter: 100
PenaltyReturnTypeOnItsOwnLine: 60

PointerAlignment: Left
ReflowComments: false
SortIncludes: false
#SortUsingDeclarations: false # Unknown to clang-format-4.0
SpaceAfterCStyleCast: false
SpaceAfterTemplateKeyword: true
SpaceBeforeAssignmentOperators: true
#SpaceBeforeCtorInitializerColon: true # Unknown to clang-format-5.0
#SpaceBeforeInheritanceColon: true # Unknown to clang-format-5.0
SpaceBeforeParens: ControlStatements
#SpaceBeforeRangeBasedForLoopColon: true # Unknown to clang-format-5.0
SpaceInEmptyParentheses: false
SpacesBeforeTrailingComments: 1
SpacesInAngles: false
SpacesInContainerLiterals: false
SpacesInCStyleCastParentheses: false
SpacesInParentheses: false
SpacesInSquareBrackets: false
Standard: Cpp03
TabWidth: 4
UseTab: Never
...
4 changes: 2 additions & 2 deletions src/CodeWarrior/cmath
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@ namespace std
{
return (float)tan((double)x);
}
}
} // namespace std

#endif
#endif
2 changes: 1 addition & 1 deletion src/Core/p2/iCollideFast.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include "iCollideFast.h"

void iCollideFastInit(xScene *sc)
void iCollideFastInit(xScene* sc)
{
return;
}
2 changes: 1 addition & 1 deletion src/Core/p2/iCollideFast.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@

struct xScene;

void iCollideFastInit(xScene *sc);
void iCollideFastInit(xScene* sc);

#endif
22 changes: 11 additions & 11 deletions src/Core/x/xBase.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,24 +6,24 @@

struct xBaseAsset
{
unsigned int id;
unsigned char baseType;
unsigned char linkCount;
unsigned short baseFlags;
unsigned int id;
unsigned char baseType;
unsigned char linkCount;
unsigned short baseFlags;
};

struct xBase;

typedef int(*xBaseEventCB)(xBase*, xBase*, unsigned int, const float*, xBase*);
typedef int (*xBaseEventCB)(xBase*, xBase*, unsigned int, const float*, xBase*);

struct xBase
{
unsigned int id;
unsigned char baseType;
unsigned char linkCount;
unsigned short baseFlags;
xLinkAsset* link;
xBaseEventCB eventFunc;
unsigned int id;
unsigned char baseType;
unsigned char linkCount;
unsigned short baseFlags;
xLinkAsset* link;
xBaseEventCB eventFunc;
};

void xBaseInit(xBase* xb, xBaseAsset* asset);
Expand Down
4 changes: 2 additions & 2 deletions src/Core/x/xCounter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ namespace
{
return;
}
}
} // namespace

void xCounterInit()
{
Expand All @@ -26,7 +26,7 @@ void xCounterInit(xBase* b, xCounterAsset* asset)
_xCounter* t = (_xCounter*)b;

xBaseInit(t, asset);

t->eventFunc = xCounterEventCB;
t->asset = asset;

Expand Down
10 changes: 5 additions & 5 deletions src/Core/x/xCounter.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@

struct xCounterAsset : xBaseAsset
{
short count;
short count;
};

struct _xCounter : xBase
{
xCounterAsset* asset;
short count;
unsigned char state;
unsigned char counterFlags;
xCounterAsset* asset;
short count;
unsigned char state;
unsigned char counterFlags;
};

void xCounterInit();
Expand Down
Loading