Compare commits
No commits in common. "4d943a344097c5a777598c1ea36c45f34ce88027" and "3c6d113d6959721b37ad8c8a4f7feb78863aed24" have entirely different histories.
4d943a3440
...
3c6d113d69
441
.clang-format
441
.clang-format
|
@ -1,268 +1,199 @@
|
||||||
|
# Commented out parameters are those with the same value as base LLVM style.
|
||||||
|
# We can uncomment them if we want to change their value, or enforce the
|
||||||
|
# chosen value in case the base style changes (last sync: Clang 14.0).
|
||||||
---
|
---
|
||||||
BasedOnStyle: Chromium
|
### General config, applies to all languages ###
|
||||||
|
BasedOnStyle: LLVM
|
||||||
AccessModifierOffset: -4
|
AccessModifierOffset: -4
|
||||||
AlignAfterOpenBracket: Align
|
AlignAfterOpenBracket: DontAlign
|
||||||
AlignArrayOfStructures: None
|
# AlignArrayOfStructures: None
|
||||||
AlignConsecutiveAssignments:
|
# AlignConsecutiveMacros: None
|
||||||
Enabled: false
|
# AlignConsecutiveAssignments: None
|
||||||
AcrossEmptyLines: false
|
# AlignConsecutiveBitFields: None
|
||||||
AcrossComments: false
|
# AlignConsecutiveDeclarations: None
|
||||||
AlignCompound: false
|
# AlignEscapedNewlines: Right
|
||||||
PadOperators: true
|
AlignOperands: DontAlign
|
||||||
AlignConsecutiveBitFields:
|
AlignTrailingComments: false
|
||||||
Enabled: false
|
# AllowAllArgumentsOnNextLine: true
|
||||||
AcrossEmptyLines: false
|
|
||||||
AcrossComments: false
|
|
||||||
AlignCompound: false
|
|
||||||
PadOperators: false
|
|
||||||
AlignConsecutiveDeclarations:
|
|
||||||
Enabled: false
|
|
||||||
AcrossEmptyLines: false
|
|
||||||
AcrossComments: false
|
|
||||||
AlignCompound: false
|
|
||||||
PadOperators: false
|
|
||||||
AlignConsecutiveMacros:
|
|
||||||
Enabled: false
|
|
||||||
AcrossEmptyLines: false
|
|
||||||
AcrossComments: false
|
|
||||||
AlignCompound: false
|
|
||||||
PadOperators: false
|
|
||||||
AlignConsecutiveShortCaseStatements:
|
|
||||||
Enabled: false
|
|
||||||
AcrossEmptyLines: false
|
|
||||||
AcrossComments: false
|
|
||||||
AlignCaseColons: false
|
|
||||||
AlignEscapedNewlines: Left
|
|
||||||
AlignOperands: Align
|
|
||||||
AlignTrailingComments:
|
|
||||||
Kind: Always
|
|
||||||
OverEmptyLines: 0
|
|
||||||
AllowAllArgumentsOnNextLine: true
|
|
||||||
AllowAllParametersOfDeclarationOnNextLine: false
|
AllowAllParametersOfDeclarationOnNextLine: false
|
||||||
AllowShortBlocksOnASingleLine: Never
|
# AllowShortEnumsOnASingleLine: true
|
||||||
AllowShortCaseLabelsOnASingleLine: false
|
# AllowShortBlocksOnASingleLine: Never
|
||||||
AllowShortEnumsOnASingleLine: true
|
# AllowShortCaseLabelsOnASingleLine: false
|
||||||
AllowShortFunctionsOnASingleLine: Inline
|
# AllowShortFunctionsOnASingleLine: All
|
||||||
AllowShortIfStatementsOnASingleLine: Never
|
# AllowShortLambdasOnASingleLine: All
|
||||||
AllowShortLambdasOnASingleLine: All
|
# AllowShortIfStatementsOnASingleLine: Never
|
||||||
AllowShortLoopsOnASingleLine: false
|
# AllowShortLoopsOnASingleLine: false
|
||||||
AlwaysBreakAfterDefinitionReturnType: None
|
# AlwaysBreakAfterDefinitionReturnType: None
|
||||||
AlwaysBreakAfterReturnType: None
|
# AlwaysBreakAfterReturnType: None
|
||||||
AlwaysBreakBeforeMultilineStrings: true
|
# AlwaysBreakBeforeMultilineStrings: false
|
||||||
AlwaysBreakTemplateDeclarations: Yes
|
# AlwaysBreakTemplateDeclarations: MultiLine
|
||||||
AttributeMacros:
|
# AttributeMacros:
|
||||||
- __capability
|
# - __capability
|
||||||
BinPackArguments: true
|
# BinPackArguments: true
|
||||||
BinPackParameters: false
|
# BinPackParameters: true
|
||||||
BitFieldColonSpacing: Both
|
# BraceWrapping:
|
||||||
BraceWrapping:
|
# AfterCaseLabel: false
|
||||||
AfterCaseLabel: false
|
# AfterClass: false
|
||||||
AfterClass: false
|
# AfterControlStatement: Never
|
||||||
AfterControlStatement: Never
|
# AfterEnum: false
|
||||||
AfterEnum: false
|
# AfterFunction: false
|
||||||
AfterFunction: false
|
# AfterNamespace: false
|
||||||
AfterNamespace: false
|
# AfterObjCDeclaration: false
|
||||||
AfterObjCDeclaration: false
|
# AfterStruct: false
|
||||||
AfterStruct: false
|
# AfterUnion: false
|
||||||
AfterUnion: false
|
# AfterExternBlock: false
|
||||||
AfterExternBlock: false
|
# BeforeCatch: false
|
||||||
BeforeCatch: false
|
# BeforeElse: false
|
||||||
BeforeElse: false
|
# BeforeLambdaBody: false
|
||||||
BeforeLambdaBody: false
|
# BeforeWhile: false
|
||||||
BeforeWhile: false
|
# IndentBraces: false
|
||||||
IndentBraces: false
|
# SplitEmptyFunction: true
|
||||||
SplitEmptyFunction: true
|
# SplitEmptyRecord: true
|
||||||
SplitEmptyRecord: true
|
# SplitEmptyNamespace: true
|
||||||
SplitEmptyNamespace: true
|
# BreakBeforeBinaryOperators: None
|
||||||
BreakAfterAttributes: Never
|
# BreakBeforeConceptDeclarations: true
|
||||||
BreakAfterJavaFieldAnnotations: false
|
# BreakBeforeBraces: Attach
|
||||||
BreakArrays: true
|
# BreakBeforeInheritanceComma: false
|
||||||
BreakBeforeBinaryOperators: None
|
# BreakInheritanceList: BeforeColon
|
||||||
BreakBeforeBraces: Attach
|
# BreakBeforeTernaryOperators: true
|
||||||
BreakBeforeConceptDeclarations: Always
|
# BreakConstructorInitializersBeforeComma: false
|
||||||
BreakBeforeInlineASMColon: OnlyMultiline
|
BreakConstructorInitializers: AfterColon
|
||||||
BreakBeforeTernaryOperators: true
|
# BreakStringLiterals: true
|
||||||
BreakConstructorInitializers: BeforeColon
|
ColumnLimit: 0
|
||||||
BreakInheritanceList: BeforeColon
|
# CommentPragmas: '^ IWYU pragma:'
|
||||||
BreakStringLiterals: true
|
# QualifierAlignment: Leave
|
||||||
ColumnLimit: 80
|
# CompactNamespaces: false
|
||||||
CommentPragmas: "^ IWYU pragma:"
|
ConstructorInitializerIndentWidth: 8
|
||||||
CompactNamespaces: false
|
ContinuationIndentWidth: 8
|
||||||
ConstructorInitializerIndentWidth: 4
|
Cpp11BracedListStyle: false
|
||||||
ContinuationIndentWidth: 4
|
# DeriveLineEnding: true
|
||||||
Cpp11BracedListStyle: true
|
# DerivePointerAlignment: false
|
||||||
DerivePointerAlignment: false
|
# DisableFormat: false
|
||||||
DisableFormat: false
|
# EmptyLineAfterAccessModifier: Never
|
||||||
EmptyLineAfterAccessModifier: Never
|
# EmptyLineBeforeAccessModifier: LogicalBlock
|
||||||
EmptyLineBeforeAccessModifier: LogicalBlock
|
# ExperimentalAutoDetectBinPacking: false
|
||||||
ExperimentalAutoDetectBinPacking: false
|
# PackConstructorInitializers: BinPack
|
||||||
FixNamespaceComments: true
|
ConstructorInitializerAllOnOneLineOrOnePerLine: true
|
||||||
ForEachMacros:
|
# AllowAllConstructorInitializersOnNextLine: true
|
||||||
- foreach
|
# FixNamespaceComments: true
|
||||||
- Q_FOREACH
|
# ForEachMacros:
|
||||||
- BOOST_FOREACH
|
# - foreach
|
||||||
IfMacros:
|
# - Q_FOREACH
|
||||||
- KJ_IF_MAYBE
|
# - BOOST_FOREACH
|
||||||
IncludeBlocks: Preserve
|
# IfMacros:
|
||||||
|
# - KJ_IF_MAYBE
|
||||||
|
# IncludeBlocks: Preserve
|
||||||
IncludeCategories:
|
IncludeCategories:
|
||||||
- Regex: ^<ext/.*\.h>
|
- Regex: '".*"'
|
||||||
Priority: 2
|
|
||||||
SortPriority: 0
|
|
||||||
CaseSensitive: false
|
|
||||||
- Regex: ^<.*\.h>
|
|
||||||
Priority: 1
|
Priority: 1
|
||||||
SortPriority: 0
|
- Regex: '^<.*\.h>'
|
||||||
CaseSensitive: false
|
|
||||||
- Regex: ^<.*
|
|
||||||
Priority: 2
|
Priority: 2
|
||||||
SortPriority: 0
|
- Regex: '^<.*'
|
||||||
CaseSensitive: false
|
|
||||||
- Regex: .*
|
|
||||||
Priority: 3
|
Priority: 3
|
||||||
SortPriority: 0
|
# IncludeIsMainRegex: '(Test)?$'
|
||||||
CaseSensitive: false
|
# IncludeIsMainSourceRegex: ''
|
||||||
IncludeIsMainRegex: ([-_](test|unittest))?$
|
# IndentAccessModifiers: false
|
||||||
IncludeIsMainSourceRegex: ""
|
|
||||||
IndentAccessModifiers: false
|
|
||||||
IndentCaseBlocks: false
|
|
||||||
IndentCaseLabels: true
|
IndentCaseLabels: true
|
||||||
IndentExternBlock: AfterExternBlock
|
# IndentCaseBlocks: false
|
||||||
IndentGotoLabels: true
|
# IndentGotoLabels: true
|
||||||
IndentPPDirectives: None
|
# IndentPPDirectives: None
|
||||||
IndentRequiresClause: true
|
# IndentExternBlock: AfterExternBlock
|
||||||
|
# IndentRequires: false
|
||||||
IndentWidth: 4
|
IndentWidth: 4
|
||||||
IndentWrappedFunctionNames: false
|
# IndentWrappedFunctionNames: false
|
||||||
InsertBraces: false
|
# InsertTrailingCommas: None
|
||||||
InsertNewlineAtEOF: false
|
# JavaScriptQuotes: Leave
|
||||||
InsertTrailingCommas: None
|
# JavaScriptWrapImports: true
|
||||||
IntegerLiteralSeparator:
|
|
||||||
Binary: 0
|
|
||||||
BinaryMinDigits: 0
|
|
||||||
Decimal: 0
|
|
||||||
DecimalMinDigits: 0
|
|
||||||
Hex: 0
|
|
||||||
HexMinDigits: 0
|
|
||||||
JavaScriptQuotes: Leave
|
|
||||||
JavaScriptWrapImports: true
|
|
||||||
KeepEmptyLinesAtEOF: false
|
|
||||||
KeepEmptyLinesAtTheStartOfBlocks: false
|
KeepEmptyLinesAtTheStartOfBlocks: false
|
||||||
LambdaBodyIndentation: Signature
|
# LambdaBodyIndentation: Signature
|
||||||
Language: Cpp
|
# MacroBlockBegin: ''
|
||||||
LineEnding: DeriveLF
|
# MacroBlockEnd: ''
|
||||||
MacroBlockBegin: ""
|
# MaxEmptyLinesToKeep: 1
|
||||||
MacroBlockEnd: ""
|
# NamespaceIndentation: None
|
||||||
MaxEmptyLinesToKeep: 1
|
# PenaltyBreakAssignment: 2
|
||||||
NamespaceIndentation: None
|
# PenaltyBreakBeforeFirstCallParameter: 19
|
||||||
ObjCBinPackProtocolList: Never
|
# PenaltyBreakComment: 300
|
||||||
ObjCBlockIndentWidth: 2
|
# PenaltyBreakFirstLessLess: 120
|
||||||
ObjCBreakBeforeNestedBlockParam: true
|
# PenaltyBreakOpenParenthesis: 0
|
||||||
ObjCSpaceAfterProperty: false
|
# PenaltyBreakString: 1000
|
||||||
ObjCSpaceBeforeProtocolList: true
|
# PenaltyBreakTemplateDeclaration: 10
|
||||||
PPIndentWidth: -1
|
# PenaltyExcessCharacter: 1000000
|
||||||
PackConstructorInitializers: NextLine
|
# PenaltyReturnTypeOnItsOwnLine: 60
|
||||||
PenaltyBreakAssignment: 2
|
# PenaltyIndentedWhitespace: 0
|
||||||
PenaltyBreakBeforeFirstCallParameter: 10
|
# PointerAlignment: Right
|
||||||
PenaltyBreakComment: 300
|
# PPIndentWidth: -1
|
||||||
PenaltyBreakFirstLessLess: 120
|
# ReferenceAlignment: Pointer
|
||||||
PenaltyBreakOpenParenthesis: 0
|
# ReflowComments: true
|
||||||
PenaltyBreakString: 1000
|
# RemoveBracesLLVM: false
|
||||||
PenaltyBreakTemplateDeclaration: 10
|
# SeparateDefinitionBlocks: Leave
|
||||||
PenaltyExcessCharacter: 1000000
|
# ShortNamespaceLines: 1
|
||||||
PenaltyIndentedWhitespace: 0
|
# SortIncludes: CaseSensitive
|
||||||
PenaltyReturnTypeOnItsOwnLine: 200
|
# SortJavaStaticImport: Before
|
||||||
PointerAlignment: Left
|
# SortUsingDeclarations: true
|
||||||
QualifierAlignment: Leave
|
# SpaceAfterCStyleCast: false
|
||||||
RawStringFormats:
|
# SpaceAfterLogicalNot: false
|
||||||
- Language: Cpp
|
# SpaceAfterTemplateKeyword: true
|
||||||
Delimiters:
|
# SpaceBeforeAssignmentOperators: true
|
||||||
- cc
|
# SpaceBeforeCaseColon: false
|
||||||
- CC
|
# SpaceBeforeCpp11BracedList: false
|
||||||
- cpp
|
# SpaceBeforeCtorInitializerColon: true
|
||||||
- Cpp
|
# SpaceBeforeInheritanceColon: true
|
||||||
- CPP
|
# SpaceBeforeParens: ControlStatements
|
||||||
- c++
|
# SpaceBeforeParensOptions:
|
||||||
- C++
|
# AfterControlStatements: true
|
||||||
CanonicalDelimiter: ""
|
# AfterForeachMacros: true
|
||||||
BasedOnStyle: google
|
# AfterFunctionDefinitionName: false
|
||||||
- Language: TextProto
|
# AfterFunctionDeclarationName: false
|
||||||
Delimiters:
|
# AfterIfMacros: true
|
||||||
- pb
|
# AfterOverloadedOperator: false
|
||||||
- PB
|
# BeforeNonEmptyParentheses: false
|
||||||
- proto
|
# SpaceAroundPointerQualifiers: Default
|
||||||
- PROTO
|
# SpaceBeforeRangeBasedForLoopColon: true
|
||||||
EnclosingFunctions:
|
# SpaceInEmptyBlock: false
|
||||||
- EqualsProto
|
# SpaceInEmptyParentheses: false
|
||||||
- EquivToProto
|
# SpacesBeforeTrailingComments: 1
|
||||||
- PARSE_PARTIAL_TEXT_PROTO
|
# SpacesInAngles: Never
|
||||||
- PARSE_TEST_PROTO
|
# SpacesInConditionalStatement: false
|
||||||
- PARSE_TEXT_PROTO
|
# SpacesInContainerLiterals: true
|
||||||
- ParseTextOrDie
|
# SpacesInCStyleCastParentheses: false
|
||||||
- ParseTextProtoOrDie
|
## Godot TODO: We'll want to use a min of 1, but we need to see how to fix
|
||||||
- ParseTestProto
|
## our comment capitalization at the same time.
|
||||||
- ParsePartialTestProto
|
|
||||||
CanonicalDelimiter: pb
|
|
||||||
BasedOnStyle: google
|
|
||||||
ReferenceAlignment: Pointer
|
|
||||||
ReflowComments: true
|
|
||||||
RemoveBracesLLVM: false
|
|
||||||
RemoveParentheses: Leave
|
|
||||||
RemoveSemicolon: false
|
|
||||||
RequiresClausePosition: OwnLine
|
|
||||||
RequiresExpressionIndentation: OuterScope
|
|
||||||
SeparateDefinitionBlocks: Leave
|
|
||||||
ShortNamespaceLines: 1
|
|
||||||
SortIncludes: CaseSensitive
|
|
||||||
SortJavaStaticImport: Before
|
|
||||||
SortUsingDeclarations: LexicographicNumeric
|
|
||||||
SpaceAfterCStyleCast: false
|
|
||||||
SpaceAfterLogicalNot: false
|
|
||||||
SpaceAfterTemplateKeyword: true
|
|
||||||
SpaceAroundPointerQualifiers: Default
|
|
||||||
SpaceBeforeAssignmentOperators: true
|
|
||||||
SpaceBeforeCaseColon: false
|
|
||||||
SpaceBeforeCpp11BracedList: false
|
|
||||||
SpaceBeforeCtorInitializerColon: true
|
|
||||||
SpaceBeforeInheritanceColon: true
|
|
||||||
SpaceBeforeJsonColon: false
|
|
||||||
SpaceBeforeParens: ControlStatements
|
|
||||||
SpaceBeforeParensOptions:
|
|
||||||
AfterControlStatements: true
|
|
||||||
AfterForeachMacros: true
|
|
||||||
AfterFunctionDeclarationName: false
|
|
||||||
AfterFunctionDefinitionName: false
|
|
||||||
AfterIfMacros: true
|
|
||||||
AfterOverloadedOperator: false
|
|
||||||
AfterRequiresInClause: false
|
|
||||||
AfterRequiresInExpression: false
|
|
||||||
BeforeNonEmptyParentheses: false
|
|
||||||
SpaceBeforeRangeBasedForLoopColon: true
|
|
||||||
SpaceBeforeSquareBrackets: false
|
|
||||||
SpaceInEmptyBlock: false
|
|
||||||
SpacesBeforeTrailingComments: 2
|
|
||||||
SpacesInAngles: Never
|
|
||||||
SpacesInContainerLiterals: true
|
|
||||||
SpacesInLineCommentPrefix:
|
SpacesInLineCommentPrefix:
|
||||||
Minimum: 1
|
Minimum: 0
|
||||||
Maximum: -1
|
Maximum: -1
|
||||||
SpacesInParens: Never
|
# SpacesInParentheses: false
|
||||||
SpacesInParensOptions:
|
# SpacesInSquareBrackets: false
|
||||||
InConditionalStatements: false
|
# SpaceBeforeSquareBrackets: false
|
||||||
InCStyleCasts: false
|
# BitFieldColonSpacing: Both
|
||||||
InEmptyParentheses: false
|
# StatementAttributeLikeMacros:
|
||||||
Other: false
|
# - Q_EMIT
|
||||||
SpacesInSquareBrackets: false
|
# StatementMacros:
|
||||||
Standard: Auto
|
# - Q_UNUSED
|
||||||
StatementAttributeLikeMacros:
|
# - QT_REQUIRE_VERSION
|
||||||
- Q_EMIT
|
|
||||||
StatementMacros:
|
|
||||||
- Q_UNUSED
|
|
||||||
- QT_REQUIRE_VERSION
|
|
||||||
TabWidth: 4
|
TabWidth: 4
|
||||||
UseTab: Never
|
# UseCRLF: false
|
||||||
VerilogBreakBetweenInstancePorts: true
|
UseTab: Always
|
||||||
WhitespaceSensitiveMacros:
|
# WhitespaceSensitiveMacros:
|
||||||
- BOOST_PP_STRINGIZE
|
# - STRINGIZE
|
||||||
- CF_SWIFT_NAME
|
# - PP_STRINGIZE
|
||||||
- NS_SWIFT_NAME
|
# - BOOST_PP_STRINGIZE
|
||||||
- PP_STRINGIZE
|
# - NS_SWIFT_NAME
|
||||||
- STRINGIZE
|
# - CF_SWIFT_NAME
|
||||||
|
---
|
||||||
|
### C++ specific config ###
|
||||||
|
Language: Cpp
|
||||||
|
Standard: c++17
|
||||||
|
---
|
||||||
|
### ObjC specific config ###
|
||||||
|
Language: ObjC
|
||||||
|
# ObjCBinPackProtocolList: Auto
|
||||||
|
ObjCBlockIndentWidth: 4
|
||||||
|
# ObjCBreakBeforeNestedBlockParam: true
|
||||||
|
# ObjCSpaceAfterProperty: false
|
||||||
|
# ObjCSpaceBeforeProtocolList: true
|
||||||
|
---
|
||||||
|
### Java specific config ###
|
||||||
|
Language: Java
|
||||||
|
# BreakAfterJavaFieldAnnotations: false
|
||||||
|
JavaImportGroups: ['org.godotengine', 'android', 'androidx', 'com.android', 'com.google', 'java', 'javax']
|
||||||
|
...
|
||||||
|
|
|
@ -1,86 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
|
||||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
|
||||||
|
|
||||||
<svg
|
|
||||||
width="297mm"
|
|
||||||
height="210mm"
|
|
||||||
viewBox="0 0 297 210"
|
|
||||||
version="1.1"
|
|
||||||
id="svg1"
|
|
||||||
inkscape:version="1.3.2 (091e20ef0f, 2023-11-25)"
|
|
||||||
sodipodi:docname="design.svg"
|
|
||||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
|
||||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
|
||||||
xmlns="http://www.w3.org/2000/svg"
|
|
||||||
xmlns:svg="http://www.w3.org/2000/svg">
|
|
||||||
<sodipodi:namedview
|
|
||||||
id="namedview1"
|
|
||||||
pagecolor="#ffffff"
|
|
||||||
bordercolor="#999999"
|
|
||||||
borderopacity="1"
|
|
||||||
inkscape:showpageshadow="0"
|
|
||||||
inkscape:pageopacity="0"
|
|
||||||
inkscape:pagecheckerboard="0"
|
|
||||||
inkscape:deskcolor="#d1d1d1"
|
|
||||||
inkscape:document-units="mm"
|
|
||||||
inkscape:zoom="1.4456739"
|
|
||||||
inkscape:cx="457.57206"
|
|
||||||
inkscape:cy="455.4969"
|
|
||||||
inkscape:current-layer="layer1" />
|
|
||||||
<defs
|
|
||||||
id="defs1">
|
|
||||||
<inkscape:path-effect
|
|
||||||
effect="fillet_chamfer"
|
|
||||||
id="path-effect2"
|
|
||||||
is_visible="true"
|
|
||||||
lpeversion="1"
|
|
||||||
nodesatellites_param="F,0,0,1,0,1.9526687,0,1 @ F,0,0,1,0,8.1210291,0,1 @ F,0,0,1,0,0,0,1 @ F,0,0,1,0,4.1953263,0,1 @ F,0,0,1,0,0,0,1"
|
|
||||||
radius="0"
|
|
||||||
unit="px"
|
|
||||||
method="auto"
|
|
||||||
mode="F"
|
|
||||||
chamfer_steps="1"
|
|
||||||
flexible="false"
|
|
||||||
use_knot_distance="true"
|
|
||||||
apply_no_radius="true"
|
|
||||||
apply_with_radius="true"
|
|
||||||
only_selected="false"
|
|
||||||
hide_knots="false" />
|
|
||||||
</defs>
|
|
||||||
<g
|
|
||||||
inkscape:label="Layer 1"
|
|
||||||
inkscape:groupmode="layer"
|
|
||||||
id="layer1">
|
|
||||||
<path
|
|
||||||
d="m 76.912699,128.73488 c -3.09378,0 -5.58467,2.49037 -5.58467,5.58415 l 0,4.79808 h -11.92954 c -1.07857,-1e-4 -1.95295,0.87428 -1.95285,1.95285 v 14.17528 c 4e-5,4.48525 3.63622,8.12119 8.12147,8.12095 h 35.371481 c 33.27233,-0.0457 61.77036,-2.57674 69.51411,-20.2855 0.92724,-2.12046 -0.51796,-3.96358 -2.83497,-3.96358 h -35.2564 l 0,-4.79808 c 0,-3.09378 -2.49089,-5.58415 -5.58468,-5.58415 z"
|
|
||||||
style="fill:#999999;stroke-width:0.793999;stroke-linejoin:round"
|
|
||||||
id="path3"
|
|
||||||
sodipodi:nodetypes="ssccccccsscsss" />
|
|
||||||
<path
|
|
||||||
style="fill:none;stroke-width:0.793999;stroke-linejoin:round;stroke:#000000;stroke-opacity:1;stroke-dasharray:0.79399902,0.79399902;stroke-dashoffset:0"
|
|
||||||
d="m 101.04647,132.07152 c 0,0 -1.204305,-26.60929 2.69533,-39.856586 3.89964,-13.247293 7.97132,-9.5197 7.97132,-9.5197"
|
|
||||||
id="path4" />
|
|
||||||
<g
|
|
||||||
id="g6"
|
|
||||||
transform="rotate(-45,103.30016,66.792882)">
|
|
||||||
<circle
|
|
||||||
style="fill:#1b1b1b;fill-opacity:1;stroke:none;stroke-width:0.509709;stroke-linejoin:round;stroke-dasharray:0.509709, 0.509709;stroke-dashoffset:0;stroke-opacity:1"
|
|
||||||
id="path5"
|
|
||||||
cx="82.723785"
|
|
||||||
cy="86.363235"
|
|
||||||
r="3.0717413" />
|
|
||||||
<path
|
|
||||||
style="fill:none;fill-opacity:1;stroke:#ae6215;stroke-width:0.793999;stroke-linejoin:round;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
|
|
||||||
d="m 82.723785,83.291496 c 0,0 -0.01513,-1.283369 0.456975,-1.648864"
|
|
||||||
id="path6" />
|
|
||||||
<rect
|
|
||||||
style="fill:#1b1b1b;fill-opacity:1;stroke:none;stroke-width:0.793999;stroke-linejoin:round;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
|
|
||||||
id="rect6"
|
|
||||||
width="1.6455212"
|
|
||||||
height="1.0793402"
|
|
||||||
x="81.880798"
|
|
||||||
y="82.756508"
|
|
||||||
ry="0" />
|
|
||||||
</g>
|
|
||||||
</g>
|
|
||||||
</svg>
|
|
Before Width: | Height: | Size: 3.3 KiB |
|
@ -1,3 +0,0 @@
|
||||||
[gd_scene format=3 uid="uid://3qb27d8vkjku"]
|
|
||||||
|
|
||||||
[node name="Level" type="Level"]
|
|
|
@ -1,27 +0,0 @@
|
||||||
#include "entrance.hpp"
|
|
||||||
#include "level.hpp"
|
|
||||||
|
|
||||||
namespace godot {
|
|
||||||
void Entrance::_bind_methods() {}
|
|
||||||
void Entrance::_enter_tree() {
|
|
||||||
this->seek_parent_level();
|
|
||||||
if(parentLevel != nullptr) {
|
|
||||||
parentLevel->add_entrance(this);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void Entrance::_exit_tree() {
|
|
||||||
if(parentLevel != nullptr)
|
|
||||||
parentLevel->remove_entrance(this);
|
|
||||||
}
|
|
||||||
|
|
||||||
Level *Entrance::seek_parent_level() {
|
|
||||||
Node *current = this;
|
|
||||||
do {
|
|
||||||
current = current->get_parent();
|
|
||||||
if(Level *level = Object::cast_to<Level>(current))
|
|
||||||
return level;
|
|
||||||
} while(current != nullptr);
|
|
||||||
return nullptr;
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,22 +0,0 @@
|
||||||
#ifndef ENTRANCE_HPP
|
|
||||||
#define ENTRANCE_HPP
|
|
||||||
|
|
||||||
#include "godot_cpp/classes/node3d.hpp"
|
|
||||||
|
|
||||||
namespace godot {
|
|
||||||
class Level;
|
|
||||||
|
|
||||||
class Entrance : public Node3D {
|
|
||||||
GDCLASS(Entrance, Node3D)
|
|
||||||
static void _bind_methods();
|
|
||||||
protected:
|
|
||||||
Level *parentLevel;
|
|
||||||
public:
|
|
||||||
virtual void _enter_tree() override;
|
|
||||||
virtual void _exit_tree() override;
|
|
||||||
protected:
|
|
||||||
Level *seek_parent_level();
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif // !ENTRANCE_HPP
|
|
|
@ -1,24 +0,0 @@
|
||||||
#ifndef GAME_STATE_HPP
|
|
||||||
#define GAME_STATE_HPP
|
|
||||||
|
|
||||||
#include "godot_cpp/classes/node.hpp"
|
|
||||||
#include "godot_cpp/classes/packed_scene.hpp"
|
|
||||||
|
|
||||||
namespace godot {
|
|
||||||
class Level;
|
|
||||||
class Player;
|
|
||||||
|
|
||||||
class GameState : public Node {
|
|
||||||
GDCLASS(GameState, Node)
|
|
||||||
static void _bind_methods();
|
|
||||||
protected:
|
|
||||||
Level *currentLevel{nullptr};
|
|
||||||
Ref<PackedScene> firstLevel{};
|
|
||||||
|
|
||||||
Player *playerInstance{nullptr};
|
|
||||||
public:
|
|
||||||
void load_level(Ref<PackedScene> levelScene);
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif // !GAME_STATE_HPP
|
|
|
@ -1,30 +0,0 @@
|
||||||
#include "level.hpp"
|
|
||||||
#include "entrance.hpp"
|
|
||||||
#include "godot_cpp/variant/utility_functions.hpp"
|
|
||||||
|
|
||||||
namespace godot {
|
|
||||||
void Level::_bind_methods() {}
|
|
||||||
|
|
||||||
Transform3D Level::get_entrance(String entranceName) {
|
|
||||||
if(entrances.has(entranceName)) {
|
|
||||||
Node3D *entrance = Object::cast_to<Node3D>(this->entrances[entranceName]);
|
|
||||||
return entrance->get_global_transform();
|
|
||||||
} else {
|
|
||||||
return this->get_global_transform();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void Level::add_entrance(Entrance *entrance) {
|
|
||||||
String key = entrance->get_name();
|
|
||||||
if(this->entrances.has(key))
|
|
||||||
UtilityFunctions::push_error("Attempt to register entrance ", key, " with duplicate key");
|
|
||||||
this->entrances[key] = entrance;
|
|
||||||
}
|
|
||||||
|
|
||||||
void Level::remove_entrance(Entrance *entrance) {
|
|
||||||
String key = entrance->get_name();
|
|
||||||
if(!this->entrances.has(key))
|
|
||||||
UtilityFunctions::push_error("Attempt to deregister entrance ", key, " without registering it");
|
|
||||||
this->entrances.erase(key);
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,24 +0,0 @@
|
||||||
#ifndef LEVEL_HPP
|
|
||||||
#define LEVEL_HPP
|
|
||||||
|
|
||||||
#include "godot_cpp/classes/node3d.hpp"
|
|
||||||
#include "godot_cpp/variant/dictionary.hpp"
|
|
||||||
#include "godot_cpp/variant/string.hpp"
|
|
||||||
#include "godot_cpp/variant/transform3d.hpp"
|
|
||||||
|
|
||||||
namespace godot {
|
|
||||||
class Entrance;
|
|
||||||
|
|
||||||
class Level : public Node3D {
|
|
||||||
GDCLASS(Level, Node3D)
|
|
||||||
static void _bind_methods();
|
|
||||||
protected:
|
|
||||||
Dictionary entrances{};
|
|
||||||
public:
|
|
||||||
Transform3D get_entrance(String entranceName);
|
|
||||||
void add_entrance(Entrance *entrance);
|
|
||||||
void remove_entrance(Entrance *entrance);
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif // !LEVEL_HPP
|
|
|
@ -1,13 +0,0 @@
|
||||||
#include "player.hpp"
|
|
||||||
#include "godot_cpp/classes/animation_tree.hpp"
|
|
||||||
#include "godot_cpp/classes/node3d.hpp"
|
|
||||||
|
|
||||||
namespace godot {
|
|
||||||
void Player::_bind_methods() {}
|
|
||||||
void Player::_enter_tree() {
|
|
||||||
this->model = this->get_node<Node3D>("Model");
|
|
||||||
this->animTree = this->get_node<AnimationTree>("Model/AnimationTree");
|
|
||||||
}
|
|
||||||
void Player::_process(double deltaTime) {}
|
|
||||||
void Player::_physics_process(double deltaTime) {}
|
|
||||||
} // namespace godot
|
|
|
@ -1,23 +0,0 @@
|
||||||
#ifndef PLAYER_HPP
|
|
||||||
#define PLAYER_HPP
|
|
||||||
|
|
||||||
#include "godot_cpp/classes/animation_tree.hpp"
|
|
||||||
#include "godot_cpp/classes/character_body3d.hpp"
|
|
||||||
|
|
||||||
namespace godot {
|
|
||||||
class Player : public CharacterBody3D {
|
|
||||||
GDCLASS(Player, CharacterBody3D)
|
|
||||||
static void _bind_methods();
|
|
||||||
|
|
||||||
protected:
|
|
||||||
Node3D *model{nullptr};
|
|
||||||
AnimationTree *animTree{nullptr};
|
|
||||||
|
|
||||||
public:
|
|
||||||
virtual void _enter_tree() override;
|
|
||||||
virtual void _process(double deltaTime) override;
|
|
||||||
virtual void _physics_process(double deltaTime) override;
|
|
||||||
};
|
|
||||||
} // namespace godot
|
|
||||||
|
|
||||||
#endif // !PLAYER_HPP
|
|
|
@ -4,33 +4,24 @@
|
||||||
#include <godot_cpp/core/defs.hpp>
|
#include <godot_cpp/core/defs.hpp>
|
||||||
#include <godot_cpp/godot.hpp>
|
#include <godot_cpp/godot.hpp>
|
||||||
|
|
||||||
#include "player.hpp"
|
|
||||||
#include "level.hpp"
|
|
||||||
#include "entrance.hpp"
|
|
||||||
|
|
||||||
using namespace godot;
|
using namespace godot;
|
||||||
|
|
||||||
void initialize_gdextension_types(ModuleInitializationLevel p_level) {
|
void initialize_gdextension_types(ModuleInitializationLevel p_level)
|
||||||
|
{
|
||||||
if (p_level != MODULE_INITIALIZATION_LEVEL_SCENE) {
|
if (p_level != MODULE_INITIALIZATION_LEVEL_SCENE) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
ClassDB::register_class<Player>();
|
|
||||||
ClassDB::register_class<Level>();
|
|
||||||
ClassDB::register_class<Entrance>();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
extern "C" {
|
extern "C"
|
||||||
// Initialization
|
{
|
||||||
GDExtensionBool GDE_EXPORT
|
// Initialization
|
||||||
pvb_practice_init(GDExtensionInterfaceGetProcAddress p_get_proc_address,
|
GDExtensionBool GDE_EXPORT pvb_practice_init(GDExtensionInterfaceGetProcAddress p_get_proc_address, GDExtensionClassLibraryPtr p_library, GDExtensionInitialization *r_initialization)
|
||||||
GDExtensionClassLibraryPtr p_library,
|
{
|
||||||
GDExtensionInitialization* r_initialization) {
|
GDExtensionBinding::InitObject init_obj(p_get_proc_address, p_library, r_initialization);
|
||||||
GDExtensionBinding::InitObject init_obj(p_get_proc_address, p_library,
|
|
||||||
r_initialization);
|
|
||||||
init_obj.register_initializer(initialize_gdextension_types);
|
init_obj.register_initializer(initialize_gdextension_types);
|
||||||
init_obj.set_minimum_library_initialization_level(
|
init_obj.set_minimum_library_initialization_level(MODULE_INITIALIZATION_LEVEL_SCENE);
|
||||||
MODULE_INITIALIZATION_LEVEL_SCENE);
|
|
||||||
|
|
||||||
return init_obj.init();
|
return init_obj.init();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue