Compare commits
No commits in common. "main" and "v1.0.0" have entirely different histories.
@ -1,104 +0,0 @@
|
||||
name: Build & Release
|
||||
run-name: ${{ gitea.actor }} is testing out Gitea Actions
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- "v*"
|
||||
|
||||
jobs:
|
||||
Windows-AMD64-Build:
|
||||
runs-on: windows-x86_64
|
||||
steps:
|
||||
- name: Check out repository code
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Building/Compiling/Installing Project
|
||||
run: |
|
||||
cd ${{ gitea.workspace }}
|
||||
cmake -A x64 -DCMAKE_BUILD_TYPE=Release --preset=default .
|
||||
cd build
|
||||
cmake --build . --config Release
|
||||
|
||||
- name: Creating Appropriate Directories
|
||||
run: |
|
||||
cd ${{ gitea.workspace }}
|
||||
mv build/Release/Pong.exe .
|
||||
mv build/Release/zlib1.dll .
|
||||
|
||||
- name: Zipping Binaries
|
||||
run: |
|
||||
cd ${{ gitea.workspace }}
|
||||
tar -a -c -f pong-windows-amd64.zip Pong.exe zlib1.dll resources
|
||||
|
||||
- uses: https://github.com/actions/setup-go@v4
|
||||
with:
|
||||
go-version: '>=1.20.1'
|
||||
|
||||
- name: Use Go Action
|
||||
id: use-go-action
|
||||
uses: https://gitea.com/actions/release-action@main
|
||||
with:
|
||||
files: |-
|
||||
pong-windows-amd64.zip
|
||||
api_key: '${{secrets.RELEASE_TOKEN}}'
|
||||
|
||||
Linux-AMD64-Build:
|
||||
runs-on: linux-x86_64
|
||||
steps:
|
||||
- name: Check out repository code
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Installing Dependencies
|
||||
run: |
|
||||
sudo pacman -S --noconfirm zip alsa-lib libxcb xcb-util-cursor vulkan-headers mesa
|
||||
|
||||
- name: Building/Compiling/Installing Project
|
||||
run: |
|
||||
cd ${{ gitea.workspace }}
|
||||
cmake -DCMAKE_BUILD_TYPE=Release .
|
||||
cmake --build . --config Release
|
||||
|
||||
- name: Zipping Binaries
|
||||
run: zip -r pong-linux-amd64.zip Pong resources
|
||||
|
||||
- uses: https://github.com/actions/setup-go@v4
|
||||
with:
|
||||
go-version: '>=1.20.1'
|
||||
|
||||
- name: Use Go Action
|
||||
id: use-go-action
|
||||
uses: https://gitea.com/actions/release-action@main
|
||||
with:
|
||||
files: |-
|
||||
pong-linux-amd64.zip
|
||||
api_key: '${{secrets.RELEASE_TOKEN}}'
|
||||
|
||||
Linux-AARCH64-Build:
|
||||
runs-on: linux-aarch64
|
||||
steps:
|
||||
- name: Check out repository code
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Installing Dependencies
|
||||
run: sudo apt install -y zip libasound2-dev libxcb1-dev libxcb-xinput-dev libxcb-cursor-dev vulkan-headers
|
||||
|
||||
- name: Building/Compiling/Installing Project
|
||||
run: |
|
||||
cd ${{ gitea.workspace }}
|
||||
cmake -DCMAKE_BUILD_TYPE=Release .
|
||||
cmake --build . --config Release
|
||||
|
||||
- name: Zipping Binaries
|
||||
run: zip -r pong-linux-aarch64.zip Pong resources
|
||||
|
||||
- uses: https://github.com/actions/setup-go@v4
|
||||
with:
|
||||
go-version: '>=1.20.1'
|
||||
|
||||
- name: Use Go Action
|
||||
id: use-go-action
|
||||
uses: https://gitea.com/actions/release-action@main
|
||||
with:
|
||||
files: |-
|
||||
pong-linux-aarch64.zip
|
||||
api_key: '${{secrets.RELEASE_TOKEN}}'
|
20
.idea/deployment.xml
generated
@ -1,20 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="PublishConfigData" remoteFilesAllowedToDisappearOnAutoupload="false">
|
||||
<serverData>
|
||||
<paths name="RPCM5">
|
||||
<serverdata>
|
||||
<mappings>
|
||||
<mapping deploy="/tmp/tmp.NJeYPbAYUl/Pong" local="$PROJECT_DIR$" />
|
||||
</mappings>
|
||||
<excludedPaths>
|
||||
<excludedPath local="true" path="$PROJECT_DIR$/cmake-build-debug" />
|
||||
<excludedPath local="true" path="$PROJECT_DIR$/cmake-build-release-remote" />
|
||||
<excludedPath local="true" path="$PROJECT_DIR$/cmake-build-release" />
|
||||
<excludedPath local="true" path="$PROJECT_DIR$/cmake-build-debug-remote" />
|
||||
</excludedPaths>
|
||||
</serverdata>
|
||||
</paths>
|
||||
</serverData>
|
||||
</component>
|
||||
</project>
|
324
.idea/editor.xml
generated
@ -1,247 +1,87 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="BackendCodeEditorSettings">
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CDeclarationWithImplicitIntType/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CommentTypo/@EntryIndexedValue" value="DO_NOT_SHOW" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=ConstevalIfIsAlwaysConstant/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppAbstractClassWithoutSpecifier/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppAbstractFinalClass/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppAbstractVirtualFunctionCallInCtor/@EntryIndexedValue" value="ERROR" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppAccessSpecifierWithNoDeclarations/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppAwaiterTypeIsNotClass/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppBooleanIncrementExpression/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppBoostFormatBadCode/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppBoostFormatLegacyCode/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppBoostFormatMixedArgs/@EntryIndexedValue" value="ERROR" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppBoostFormatTooFewArgs/@EntryIndexedValue" value="ERROR" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppBoostFormatTooManyArgs/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppCStyleCast/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppCVQualifierCanNotBeAppliedToReference/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppClassCanBeFinal/@EntryIndexedValue" value="HINT" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppClassIsIncomplete/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppClassNeedsConstructorBecauseOfUninitializedMember/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppClassNeverUsed/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppCompileTimeConstantCanBeReplacedWithBooleanConstant/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppConceptNeverUsed/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppConditionalExpressionCanBeSimplified/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppConstParameterInDeclaration/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppConstValueFunctionReturnType/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppCoroutineCallResolveError/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDFAArrayIndexOutOfBounds/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDFAConstantConditions/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDFAConstantFunctionResult/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDFAConstantParameter/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDFADeletedPointer/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDFAEndlessLoop/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDFAInfiniteRecursion/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDFAInvalidatedMemory/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDFALocalValueEscapesFunction/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDFALocalValueEscapesScope/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDFALoopConditionNotUpdated/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDFAMemoryLeak/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDFANotInitializedField/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDFANullDereference/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDFATimeOver/@EntryIndexedValue" value="HINT" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDFAUnreachableCode/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDFAUnreachableFunctionCall/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDFAUnreadVariable/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDFAUnusedValue/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDeclarationHidesLocal/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDeclarationHidesUncapturedLocal/@EntryIndexedValue" value="HINT" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDeclarationSpecifierWithoutDeclarators/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDeclaratorDisambiguatedAsFunction/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDeclaratorNeverUsed/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDeclaratorUsedBeforeInitialization/@EntryIndexedValue" value="ERROR" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDefaultCaseNotHandledInSwitchStatement/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDefaultInitializationWithNoUserConstructor/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDefaultIsUsedAsIdentifier/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDefaultedSpecialMemberFunctionIsImplicitlyDeleted/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDeletingVoidPointer/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDependentTemplateWithoutTemplateKeyword/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDependentTypeWithoutTypenameKeyword/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDeprecatedEntity/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDeprecatedOverridenMethod/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDeprecatedRegisterStorageClassSpecifier/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDereferenceOperatorLimitExceeded/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDiscardedPostfixOperatorResult/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDoxygenSyntaxError/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDoxygenUndocumentedParameter/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDoxygenUnresolvedReference/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppEmptyDeclaration/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppEnforceCVQualifiersOrder/@EntryIndexedValue" value="DO_NOT_SHOW" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppEnforceCVQualifiersPlacement/@EntryIndexedValue" value="DO_NOT_SHOW" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppEnforceDoStatementBraces/@EntryIndexedValue" value="DO_NOT_SHOW" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppEnforceForStatementBraces/@EntryIndexedValue" value="DO_NOT_SHOW" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppEnforceFunctionDeclarationStyle/@EntryIndexedValue" value="DO_NOT_SHOW" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppEnforceIfStatementBraces/@EntryIndexedValue" value="DO_NOT_SHOW" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppEnforceNestedNamespacesStyle/@EntryIndexedValue" value="HINT" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppEnforceOverridingDestructorStyle/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppEnforceOverridingFunctionStyle/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppEnforceTypeAliasCodeStyle/@EntryIndexedValue" value="DO_NOT_SHOW" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppEnforceWhileStatementBraces/@EntryIndexedValue" value="DO_NOT_SHOW" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppEntityAssignedButNoRead/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppEntityUsedOnlyInUnevaluatedContext/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppEnumeratorNeverUsed/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppEqualOperandsInBinaryExpression/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppEvaluationFailure/@EntryIndexedValue" value="ERROR" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppExplicitSpecializationInNonNamespaceScope/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppExpressionWithoutSideEffects/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppFinalFunctionInFinalClass/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppFinalNonOverridingVirtualFunction/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppForLoopCanBeReplacedWithWhile/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppForwardEnumDeclarationWithoutUnderlyingType/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppFunctionDoesntReturnValue/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppFunctionIsNotImplemented/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppFunctionResultShouldBeUsed/@EntryIndexedValue" value="HINT" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppFunctionalStyleCast/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppHeaderHasBeenAlreadyIncluded/@EntryIndexedValue" value="HINT" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppHiddenFunction/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppHidingFunction/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppIdenticalOperandsInBinaryExpression/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppIfCanBeReplacedByConstexprIf/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppImplicitDefaultConstructorNotAvailable/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppIncompatiblePointerConversion/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppIncompleteSwitchStatement/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppInconsistentNaming/@EntryIndexedValue" value="DO_NOT_SHOW" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppIntegralToPointerConversion/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppInvalidLineContinuation/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppJoinDeclarationAndAssignment/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppLambdaCaptureNeverUsed/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppLocalVariableMayBeConst/@EntryIndexedValue" value="HINT" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppLocalVariableMightNotBeInitialized/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppLocalVariableWithNonTrivialDtorIsNeverUsed/@EntryIndexedValue" value="DO_NOT_SHOW" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppLongFloat/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppMemberFunctionMayBeConst/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppMemberFunctionMayBeStatic/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppMemberInitializersOrder/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppMismatchedClassTags/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppMissingIncludeGuard/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppMissingKeywordThrow/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppMsExtAddressOfClassRValue/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppMsExtBindingRValueToLvalueReference/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppMsExtCopyElisionInCopyInitDeclarator/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppMsExtDoubleUserConversionInCopyInit/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppMsExtNotInitializedStaticConstLocalVar/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppMsExtReinterpretCastFromNullptr/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppMultiCharacterLiteral/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppMultiCharacterWideLiteral/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppMustBePublicVirtualToImplementInterface/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppMutableSpecifierOnReferenceMember/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppNoDiscardExpression/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppNodiscardFunctionWithoutReturnValue/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppNonExceptionSafeResourceAcquisition/@EntryIndexedValue" value="HINT" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppNonExplicitConversionOperator/@EntryIndexedValue" value="HINT" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppNonExplicitConvertingConstructor/@EntryIndexedValue" value="HINT" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppNonInlineFunctionDefinitionInHeaderFile/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppNonInlineVariableDefinitionInHeaderFile/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppNotAllPathsReturnValue/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppObjectMemberMightNotBeInitialized/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppOutParameterMustBeWritten/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppParameterMayBeConst/@EntryIndexedValue" value="HINT" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppParameterMayBeConstPtrOrRef/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppParameterNamesMismatch/@EntryIndexedValue" value="HINT" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppParameterNeverUsed/@EntryIndexedValue" value="HINT" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppPassValueParameterByConstReference/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppPointerConversionDropsQualifiers/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppPointerToIntegralConversion/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppPolymorphicClassWithNonVirtualPublicDestructor/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppPossiblyErroneousEmptyStatements/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppPossiblyUninitializedMember/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppPossiblyUnintendedObjectSlicing/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppPrecompiledHeaderIsNotIncluded/@EntryIndexedValue" value="ERROR" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppPrecompiledHeaderNotFound/@EntryIndexedValue" value="ERROR" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppPrintfBadFormat/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppPrintfExtraArg/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppPrintfMissedArg/@EntryIndexedValue" value="ERROR" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppPrintfRiskyFormat/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppPrivateSpecialMemberFunctionIsNotImplemented/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRangeBasedForIncompatibleReference/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedefinitionOfDefaultArgumentInOverrideFunction/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantAccessSpecifier/@EntryIndexedValue" value="HINT" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantBaseClassAccessSpecifier/@EntryIndexedValue" value="HINT" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantBaseClassInitializer/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantBooleanExpressionArgument/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantCastExpression/@EntryIndexedValue" value="HINT" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantComplexityInComparison/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantConditionalExpression/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantConstSpecifier/@EntryIndexedValue" value="HINT" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantControlFlowJump/@EntryIndexedValue" value="HINT" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantDereferencingAndTakingAddress/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantElaboratedTypeSpecifier/@EntryIndexedValue" value="HINT" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantElseKeyword/@EntryIndexedValue" value="HINT" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantElseKeywordInsideCompoundStatement/@EntryIndexedValue" value="HINT" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantEmptyDeclaration/@EntryIndexedValue" value="HINT" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantEmptyStatement/@EntryIndexedValue" value="HINT" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantExportKeyword/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantFwdClassOrEnumSpecifier/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantInlineSpecifier/@EntryIndexedValue" value="HINT" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantLambdaParameterList/@EntryIndexedValue" value="HINT" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantMemberInitializer/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantNamespaceDefinition/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantParentheses/@EntryIndexedValue" value="HINT" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantQualifier/@EntryIndexedValue" value="HINT" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantQualifierADL/@EntryIndexedValue" value="DO_NOT_SHOW" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantStaticSpecifierOnMemberAllocationFunction/@EntryIndexedValue" value="HINT" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantStaticSpecifierOnThreadLocalLocalVariable/@EntryIndexedValue" value="HINT" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantTemplateArguments/@EntryIndexedValue" value="HINT" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantTemplateKeyword/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantTypenameKeyword/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantVoidArgumentList/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantZeroInitializerInAggregateInitialization/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppReinterpretCastFromVoidPtr/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRemoveRedundantBraces/@EntryIndexedValue" value="DO_NOT_SHOW" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppReplaceMemsetWithZeroInitialization/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppReplaceTieWithStructuredBinding/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppReturnNoValueInNonVoidFunction/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppSmartPointerVsMakeFunction/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppSomeObjectMembersMightNotBeInitialized/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppSpecialFunctionWithoutNoexceptSpecification/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppStaticAssertFailure/@EntryIndexedValue" value="ERROR" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppStaticDataMemberInUnnamedStruct/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppStaticSpecifierOnAnonymousNamespaceMember/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppStringLiteralToCharPointerConversion/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppTabsAreDisallowed/@EntryIndexedValue" value="DO_NOT_SHOW" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppTemplateArgumentsCanBeDeduced/@EntryIndexedValue" value="HINT" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppTemplateParameterNeverUsed/@EntryIndexedValue" value="HINT" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppTemplateParameterShadowing/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppThrowExpressionCanBeReplacedWithRethrow/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppTooWideScope/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppTooWideScopeInitStatement/@EntryIndexedValue" value="HINT" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppTypeAliasNeverUsed/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppUninitializedDependentBaseClass/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppUninitializedNonStaticDataMember/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppUnionMemberOfReferenceType/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppUnmatchedPragmaEndRegionDirective/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppUnmatchedPragmaRegionDirective/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppUnnamedNamespaceInHeaderFile/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppUnnecessaryWhitespace/@EntryIndexedValue" value="DO_NOT_SHOW" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppUnsignedZeroComparison/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppUnusedIncludeDirective/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppUseAlgorithmWithCount/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppUseAssociativeContains/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppUseAuto/@EntryIndexedValue" value="HINT" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppUseAutoForNumeric/@EntryIndexedValue" value="HINT" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppUseElementsView/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppUseEraseAlgorithm/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppUseFamiliarTemplateSyntaxForGenericLambdas/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppUseRangeAlgorithm/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppUseStdSize/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppUseStructuredBinding/@EntryIndexedValue" value="HINT" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppUseTypeTraitAlias/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppUserDefinedLiteralSuffixDoesNotStartWithUnderscore/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppUsingResultOfAssignmentAsCondition/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppVariableCanBeMadeConstexpr/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppVirtualFunctionCallInsideCtor/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppVirtualFunctionInFinalClass/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppVolatileParameterInDeclaration/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppWarningDirective/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppWrongIncludesOrder/@EntryIndexedValue" value="HINT" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppWrongSlashesInIncludeDirective/@EntryIndexedValue" value="HINT" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppZeroConstantCanBeReplacedWithNullptr/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppZeroValuedExpressionUsedAsNullPointer/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=IdentifierTypo/@EntryIndexedValue" value="DO_NOT_SHOW" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=IfStdIsConstantEvaluatedCanBeReplaced/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=StdIsConstantEvaluatedWillAlwaysEvaluateToConstant/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=StringLiteralTypo/@EntryIndexedValue" value="DO_NOT_SHOW" type="string" />
|
||||
<option name="/Default/Housekeeping/GlobalSettingsUpgraded/IsUpgraded/@EntryValue" value="true" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppClangFormat/EnableClangFormatSupport/@EntryValue" value="false" type="bool" />
|
||||
<option name="/Default/CodeStyle/EditorConfig/EnableClangFormatSupport/@EntryValue" value="false" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/ALIGN_MULTILINE_BINARY_EXPRESSIONS_CHAIN/@EntryValue" value="true" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/ALIGN_MULTILINE_CALLS_CHAIN/@EntryValue" value="false" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/ALIGN_MULTILINE_EXPRESSION/@EntryValue" value="false" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/ALIGN_MULTILINE_FOR_STMT/@EntryValue" value="true" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/ALIGN_MULTIPLE_DECLARATION/@EntryValue" value="false" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/ALIGN_TERNARY/@EntryValue" value="ALIGN_ALL" type="string" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/BLANK_LINES_AROUND_CLASS_DEFINITION/@EntryValue" value="1" type="int" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/KEEP_BLANK_LINES_IN_DECLARATIONS/@EntryValue" value="2" type="int" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/KEEP_BLANK_LINES_IN_CODE/@EntryValue" value="2" type="int" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/KEEP_USER_LINEBREAKS/@EntryValue" value="true" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/INDENT_CASE_FROM_SWITCH/@EntryValue" value="true" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/INDENT_COMMENT/@EntryValue" value="true" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/INT_ALIGN_EQ/@EntryValue" value="false" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SIMPLE_BLOCK_STYLE/@EntryValue" value="DO_NOT_CHANGE" type="string" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_AFTER_COMMA_IN_TEMPLATE_ARGS/@EntryValue" value="true" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_AFTER_COMMA_IN_TEMPLATE_PARAMS/@EntryValue" value="true" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_AFTER_FOR_SEMICOLON/@EntryValue" value="true" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_BEFORE_FOR_SEMICOLON/@EntryValue" value="false" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_AFTER_UNARY_OPERATOR/@EntryValue" value="false" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_WITHIN_ARRAY_ACCESS_BRACKETS/@EntryValue" value="false" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_WITHIN_CAST_EXPRESSION_PARENTHESES/@EntryValue" value="false" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_WITHIN_EMPTY_INITIALIZER_BRACES/@EntryValue" value="false" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_WITHIN_EMPTY_METHOD_PARENTHESES/@EntryValue" value="false" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_WITHIN_INITIALIZER_BRACES/@EntryValue" value="false" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPECIAL_ELSE_IF_TREATMENT/@EntryValue" value="true" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/WRAP_AFTER_BINARY_OPSIGN/@EntryValue" value="true" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/WRAP_BEFORE_TERNARY_OPSIGNS/@EntryValue" value="true" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/TYPE_DECLARATION_BRACES/@EntryValue" value="NEXT_LINE" type="string" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/OTHER_BRACES/@EntryValue" value="NEXT_LINE" type="string" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/CASE_BLOCK_BRACES/@EntryValue" value="NEXT_LINE" type="string" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/BLANK_LINES_AROUND_FUNCTION_DECLARATION/@EntryValue" value="1" type="int" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/BLANK_LINES_AROUND_FUNCTION_DEFINITION/@EntryValue" value="1" type="int" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/NAMESPACE_INDENTATION/@EntryValue" value="All" type="string" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/ALIGN_MULTILINE_ARGUMENT/@EntryValue" value="true" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/ALIGN_MULTILINE_EXTENDS_LIST/@EntryValue" value="true" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/ALIGN_MULTILINE_PARAMETER/@EntryValue" value="true" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/ALIGN_MULTILINE_TYPE_ARGUMENT/@EntryValue" value="false" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/ALIGN_MULTILINE_TYPE_PARAMETER/@EntryValue" value="false" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/BLANK_LINES_AROUND_DECLARATIONS/@EntryValue" value="0" type="int" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/INDENT_ACCESS_SPECIFIERS_FROM_CLASS/@EntryValue" value="false" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/INDENT_CLASS_MEMBERS_FROM_ACCESS_SPECIFIERS/@EntryValue" value="true" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/LINE_BREAK_AFTER_COLON_IN_MEMBER_INITIALIZER_LISTS/@EntryValue" value="ON_SINGLE_LINE" type="string" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/MEMBER_INITIALIZER_LIST_STYLE/@EntryValue" value="LINE_BREAK" type="string" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/PLACE_NAMESPACE_DEFINITIONS_ON_SAME_LINE/@EntryValue" value="false" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_AFTER_COLON_IN_BITFIELD_DECLARATOR/@EntryValue" value="true" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_BEFORE_COLON_IN_BITFIELD_DECLARATOR/@EntryValue" value="false" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_AFTER_EXTENDS_COLON/@EntryValue" value="true" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_BEFORE_EXTENDS_COLON/@EntryValue" value="true" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_AFTER_FOR_COLON/@EntryValue" value="true" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_BEFORE_FOR_COLON/@EntryValue" value="false" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_AFTER_REF_IN_DATA_MEMBER/@EntryValue" value="true" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_BEFORE_REF_IN_DATA_MEMBERS/@EntryValue" value="false" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_BEFORE_PTR_IN_ABSTRACT_DECL/@EntryValue" value="false" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_BEFORE_REF_IN_ABSTRACT_DECL/@EntryValue" value="false" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_BEFORE_TEMPLATE_ARGS/@EntryValue" value="false" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_BEFORE_TEMPLATE_PARAMS/@EntryValue" value="false" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_WITHIN_DECLARATION_PARENTHESES/@EntryValue" value="false" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_WITHIN_EMPTY_BLOCKS/@EntryValue" value="false" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_WITHIN_EMPTY_TEMPLATE_PARAMS/@EntryValue" value="false" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_WITHIN_TEMPLATE_ARGS/@EntryValue" value="false" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_WITHIN_TEMPLATE_PARAMS/@EntryValue" value="false" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/WRAP_BEFORE_INVOCATION_LPAR/@EntryValue" value="false" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/WRAP_AFTER_INVOCATION_LPAR/@EntryValue" value="false" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/WRAP_BEFORE_INVOCATION_RPAR/@EntryValue" value="false" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/WRAP_BEFORE_DECLARATION_LPAR/@EntryValue" value="false" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/WRAP_AFTER_DECLARATION_LPAR/@EntryValue" value="false" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/WRAP_BEFORE_DECLARATION_RPAR/@EntryValue" value="false" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/WRAP_ARGUMENTS_STYLE/@EntryValue" value="WRAP_IF_LONG" type="string" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/WRAP_PARAMETERS_STYLE/@EntryValue" value="WRAP_IF_LONG" type="string" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/BREAK_TEMPLATE_DECLARATION/@EntryValue" value="LINE_BREAK" type="string" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/NAMESPACE_DECLARATION_BRACES/@EntryValue" value="NEXT_LINE" type="string" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/FREE_BLOCK_BRACES/@EntryValue" value="NEXT_LINE" type="string" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/INVOCABLE_DECLARATION_BRACES/@EntryValue" value="NEXT_LINE" type="string" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/ANONYMOUS_METHOD_DECLARATION_BRACES/@EntryValue" value="NEXT_LINE" type="string" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/INITIALIZER_BRACES/@EntryValue" value="NEXT_LINE" type="string" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/INDENT_STYLE/@EntryValue" value="Tab" type="string" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/INDENT_SIZE/@EntryValue" value="4" type="int" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/CONTINUOUS_LINE_INDENT/@EntryValue" value="Double" type="string" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/TAB_WIDTH/@EntryValue" value="4" type="int" />
|
||||
</component>
|
||||
</project>
|
2
.idea/inspectionProfiles/Project_Default.xml
generated
@ -2,7 +2,7 @@
|
||||
<profile version="1.0">
|
||||
<option name="myName" value="Project Default" />
|
||||
<inspection_tool class="ClangTidy" enabled="true" level="WARNING" enabled_by_default="true">
|
||||
<option name="clangTidyChecks" value="-*,bugprone-argument-comment,bugprone-assert-side-effect,bugprone-bad-signal-to-kill-thread,bugprone-branch-clone,bugprone-copy-constructor-init,bugprone-dangling-handle,bugprone-dynamic-static-initializers,bugprone-fold-init-type,bugprone-forward-declaration-namespace,bugprone-forwarding-reference-overload,bugprone-inaccurate-erase,bugprone-incorrect-roundings,bugprone-integer-division,bugprone-lambda-function-name,bugprone-macro-parentheses,bugprone-macro-repeated-side-effects,bugprone-misplaced-operator-in-strlen-in-alloc,bugprone-misplaced-pointer-arithmetic-in-alloc,bugprone-misplaced-widening-cast,bugprone-move-forwarding-reference,bugprone-multiple-statement-macro,bugprone-no-escape,bugprone-parent-virtual-call,bugprone-posix-return,bugprone-reserved-identifier,bugprone-sizeof-container,bugprone-sizeof-expression,bugprone-spuriously-wake-up-functions,bugprone-string-constructor,bugprone-string-integer-assignment,bugprone-string-literal-with-embedded-nul,bugprone-suspicious-enum-usage,bugprone-suspicious-include,bugprone-suspicious-memset-usage,bugprone-suspicious-missing-comma,bugprone-suspicious-semicolon,bugprone-suspicious-string-compare,bugprone-suspicious-memory-comparison,bugprone-suspicious-realloc-usage,bugprone-swapped-arguments,bugprone-terminating-continue,bugprone-throw-keyword-missing,bugprone-too-small-loop-variable,bugprone-undefined-memory-manipulation,bugprone-undelegated-constructor,bugprone-unhandled-self-assignment,bugprone-unused-raii,bugprone-unused-return-value,bugprone-use-after-move,bugprone-virtual-near-miss,cert-dcl21-cpp,cert-dcl58-cpp,cert-err34-c,cert-err52-cpp,cert-err60-cpp,cert-flp30-c,cert-msc50-cpp,cert-msc51-cpp,cert-str34-c,cppcoreguidelines-interfaces-global-init,cppcoreguidelines-narrowing-conversions,cppcoreguidelines-pro-type-member-init,cppcoreguidelines-pro-type-static-cast-downcast,cppcoreguidelines-slicing,google-default-arguments,google-explicit-constructor,google-runtime-operator,hicpp-exception-baseclass,hicpp-multiway-paths-covered,misc-misplaced-const,misc-new-delete-overloads,misc-no-recursion,misc-non-copyable-objects,misc-throw-by-value-catch-by-reference,misc-unconventional-assign-operator,misc-uniqueptr-reset-release,mpi-buffer-deref,mpi-type-mismatch,openmp-use-default-none,performance-faster-string-find,performance-for-range-copy,performance-implicit-conversion-in-loop,performance-inefficient-algorithm,performance-inefficient-string-concatenation,performance-inefficient-vector-operation,performance-move-const-arg,performance-move-constructor-init,performance-no-automatic-move,performance-noexcept-move-constructor,performance-trivially-destructible,performance-type-promotion-in-math-fn,performance-unnecessary-copy-initialization,performance-unnecessary-value-param,portability-simd-intrinsics,readability-const-return-type,readability-container-size-empty,readability-convert-member-functions-to-static,readability-delete-null-pointer,readability-deleted-default,readability-inconsistent-declaration-parameter-name,readability-make-member-function-const,readability-misleading-indentation,readability-misplaced-array-index,readability-non-const-parameter,readability-redundant-control-flow,readability-redundant-declaration,readability-redundant-function-ptr-dereference,readability-redundant-smartptr-get,readability-redundant-string-cstr,readability-redundant-string-init,readability-simplify-subscript-expr,readability-static-accessed-through-instance,readability-static-definition-in-anonymous-namespace,readability-string-compare,readability-uniqueptr-delete-release,readability-use-anyofallof" />
|
||||
<option name="clangTidyChecks" value="-*,bugprone-argument-comment,bugprone-assert-side-effect,bugprone-bad-signal-to-kill-thread,bugprone-branch-clone,bugprone-copy-constructor-init,bugprone-dangling-handle,bugprone-dynamic-static-initializers,bugprone-fold-init-type,bugprone-forward-declaration-namespace,bugprone-forwarding-reference-overload,bugprone-inaccurate-erase,bugprone-incorrect-roundings,bugprone-integer-division,bugprone-lambda-function-name,bugprone-macro-parentheses,bugprone-macro-repeated-side-effects,bugprone-misplaced-operator-in-strlen-in-alloc,bugprone-misplaced-pointer-arithmetic-in-alloc,bugprone-misplaced-widening-cast,bugprone-move-forwarding-reference,bugprone-multiple-statement-macro,bugprone-no-escape,bugprone-parent-virtual-call,bugprone-posix-return,bugprone-reserved-identifier,bugprone-sizeof-container,bugprone-sizeof-expression,bugprone-spuriously-wake-up-functions,bugprone-string-constructor,bugprone-string-integer-assignment,bugprone-string-literal-with-embedded-nul,bugprone-suspicious-enum-usage,bugprone-suspicious-include,bugprone-suspicious-memset-usage,bugprone-suspicious-missing-comma,bugprone-suspicious-semicolon,bugprone-suspicious-string-compare,bugprone-suspicious-memory-comparison,bugprone-suspicious-realloc-usage,bugprone-swapped-arguments,bugprone-terminating-continue,bugprone-throw-keyword-missing,bugprone-too-small-loop-variable,bugprone-undefined-memory-manipulation,bugprone-undelegated-constructor,bugprone-unhandled-self-assignment,bugprone-unused-raii,bugprone-unused-return-value,bugprone-use-after-move,bugprone-virtual-near-miss,cert-dcl21-cpp,cert-dcl58-cpp,cert-err34-c,cert-err52-cpp,cert-err60-cpp,cert-flp30-c,cert-msc50-cpp,cert-msc51-cpp,cert-str34-c,cppcoreguidelines-interfaces-global-init,cppcoreguidelines-narrowing-conversions,cppcoreguidelines-pro-type-member-init,cppcoreguidelines-pro-type-static-cast-downcast,cppcoreguidelines-slicing,google-default-arguments,google-explicit-constructor,google-runtime-operator,hicpp-exception-baseclass,hicpp-multiway-paths-covered,misc-misplaced-const,misc-new-delete-overloads,misc-no-recursion,misc-non-copyable-objects,misc-throw-by-value-catch-by-reference,misc-unconventional-assign-operator,misc-uniqueptr-reset-release,mpi-buffer-deref,mpi-type-mismatch,openmp-use-default-none,performance-faster-string-find,performance-for-range-copy,performance-implicit-conversion-in-loop,performance-inefficient-algorithm,performance-inefficient-string-concatenation,performance-inefficient-vector-operation,performance-move-const-arg,performance-move-constructor-init,performance-no-automatic-move,performance-noexcept-move-constructor,performance-trivially-destructible,performance-type-promotion-in-math-fn,performance-unnecessary-copy-initialization,performance-unnecessary-value-param,portability-simd-intrinsics,readability-avoid-const-params-in-decls,readability-const-return-type,readability-container-size-empty,readability-convert-member-functions-to-static,readability-delete-null-pointer,readability-deleted-default,readability-inconsistent-declaration-parameter-name,readability-make-member-function-const,readability-misleading-indentation,readability-misplaced-array-index,readability-non-const-parameter,readability-redundant-control-flow,readability-redundant-declaration,readability-redundant-function-ptr-dereference,readability-redundant-smartptr-get,readability-redundant-string-cstr,readability-redundant-string-init,readability-simplify-subscript-expr,readability-static-accessed-through-instance,readability-static-definition-in-anonymous-namespace,readability-string-compare,readability-uniqueptr-delete-release,readability-use-anyofallof" />
|
||||
</inspection_tool>
|
||||
</profile>
|
||||
</component>
|
3
.idea/misc.xml
generated
@ -1,8 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="CMakePythonSetting">
|
||||
<option name="pythonIntegrationState" value="YES" />
|
||||
</component>
|
||||
<component name="CMakeWorkspace" PROJECT_DIR="$PROJECT_DIR$" />
|
||||
<component name="DiscordProjectSettings">
|
||||
<option name="show" value="ASK" />
|
||||
|
10
.idea/other.xml
generated
@ -1,10 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="AutoUploadManager">
|
||||
<option name="hosts">
|
||||
<list>
|
||||
<option value="8d0c981d-6a46-421d-86ac-7c1cd7205238" />
|
||||
</list>
|
||||
</option>
|
||||
</component>
|
||||
</project>
|
@ -1,5 +1,4 @@
|
||||
cmake_minimum_required(VERSION 3.18.4)
|
||||
|
||||
project(Pong C CXX)
|
||||
|
||||
if (${CMAKE_HOST_SYSTEM_NAME} STREQUAL "Windows")
|
||||
@ -33,58 +32,15 @@ add_executable(Pong
|
||||
Main.cpp
|
||||
)
|
||||
|
||||
find_package(ZLIB REQUIRED)
|
||||
if (ZLIB_FOUND)
|
||||
message(STATUS "ZLIB was found.")
|
||||
else ()
|
||||
message(STATUS "ZLIB was not found.")
|
||||
endif ()
|
||||
|
||||
find_package(OpenSSL REQUIRED)
|
||||
if (OpenSSL_FOUND)
|
||||
message(STATUS "OpenSSL was found.")
|
||||
else ()
|
||||
message(STATUS "OpenSSL was not found.")
|
||||
endif ()
|
||||
|
||||
if (IS_OS_WINDOWS)
|
||||
add_compile_definitions(VK_USE_PLATFORM_WIN32_KHR)
|
||||
|
||||
target_include_directories(Pong PUBLIC ${USER_HOME_DIRECTORY}/EHS/include)
|
||||
target_include_directories(Pong PUBLIC ${USER_HOME_DIRECTORY}/EHE/include)
|
||||
target_include_directories(Pong PUBLIC ${USER_HOME_DIRECTORY}/EHC/include)
|
||||
target_include_directories(Pong PUBLIC ${USER_HOME_DIRECTORY}/LWE/include)
|
||||
target_include_directories(Pong PUBLIC $ENV{VULKAN_SDK}/include)
|
||||
|
||||
message("VK Include Path: $ENV{VULKAN_SDK}/include")
|
||||
|
||||
target_link_directories(Pong PUBLIC "${USER_HOME_DIRECTORY}/EHS/lib")
|
||||
target_link_directories(Pong PUBLIC "${USER_HOME_DIRECTORY}/EHE/lib")
|
||||
target_link_directories(Pong PUBLIC "${USER_HOME_DIRECTORY}/EHC/lib")
|
||||
target_link_directories(Pong PUBLIC "${USER_HOME_DIRECTORY}/LWE/lib")
|
||||
target_link_directories(Pong PUBLIC $ENV{VULKAN_SDK}/lib)
|
||||
|
||||
target_link_libraries(Pong PRIVATE LWE_Stc EHS_Stc OpenSSL::SSL OpenSSL::Crypto ZLIB::ZLIB vulkan-1 ws2_32 avrt)
|
||||
|
||||
set(CMAKE_INSTALL_PREFIX "${USER_HOME_DIRECTORY}/LWE")
|
||||
elseif (IS_OS_LINUX)
|
||||
add_compile_definitions(VK_USE_PLATFORM_XCB_KHR EHS_WS_XCB)
|
||||
add_compile_definitions(VK_USE_PLATFORM_XCB_KHR)
|
||||
endif()
|
||||
|
||||
target_link_directories(Pong PRIVATE "${USER_HOME_DIRECTORY}/Libraries/LWE/lib")
|
||||
target_include_directories(Pong PRIVATE "${USER_HOME_DIRECTORY}/Libraries/LWE/include")
|
||||
|
||||
find_package(Vulkan REQUIRED)
|
||||
if (Vulkan_FOUND)
|
||||
message(STATUS "Vulkan was found.")
|
||||
else ()
|
||||
message(STATUS "Vulkan was not found.")
|
||||
endif ()
|
||||
|
||||
find_package(PkgConfig REQUIRED)
|
||||
pkg_check_modules(PIPEWIRE REQUIRED libpipewire-0.3)
|
||||
|
||||
target_include_directories(Pong PRIVATE ${PIPEWIRE_INCLUDE_DIRS})
|
||||
|
||||
target_include_directories(Pong PRIVATE ${USER_HOME_DIRECTORY}/.local/include)
|
||||
|
||||
target_link_directories(Pong PRIVATE "${USER_HOME_DIRECTORY}/.local/lib")
|
||||
|
||||
target_link_libraries(Pong PRIVATE LWE_Stc EHS_Stc OpenSSL::SSL OpenSSL::Crypto ZLIB::ZLIB xcb xcb-cursor xcb-xfixes xcb-xinput pipewire-0.3 Vulkan::Headers Vulkan::Vulkan)
|
||||
endif()
|
||||
target_link_libraries(Pong PRIVATE Vulkan::Headers Vulkan::Vulkan xcb xcb-xfixes xcb-xinput wooting_analog_wrapper LWE z asound)
|
216
Levels/Game.cpp
@ -1,37 +1,37 @@
|
||||
#include "Game.h"
|
||||
#include "LWE/IO/FontAtlas.h"
|
||||
|
||||
#include <lwe/GameLoop.h>
|
||||
#include <lwe/RenderWindow.h>
|
||||
#include <lwe/systems/AudioSystem.h>
|
||||
#include <lwe/systems/RigidBodySystem.h>
|
||||
#include <lwe/systems/Portrait2DSystem.h>
|
||||
#include <lwe/systems/GuiSystem.h>
|
||||
#include <lwe/AudioSource.h>
|
||||
#include <lwe/coms/AABB2D.h>
|
||||
#include <lwe/coms/Circle.h>
|
||||
#include <lwe/coms/Portrait2D.h>
|
||||
#include <lwe/gpu/GpuFontAtlas.h>
|
||||
#include <lwe/gui/LabelGui.h>
|
||||
#include <ehs/io/audio/Audio.h>
|
||||
#include <ehs/io/hid/Input.h>
|
||||
#include <ehs/io/hid/Keyboard.h>
|
||||
#include <ehs/PRNG.h>
|
||||
#include <ehs/system/CPU.h>
|
||||
#include <LWE/GameLoop.h>
|
||||
#include <LWE/IO/RenderWindow.h>
|
||||
#include <LWE/Systems/RigidBodySystem.h>
|
||||
#include <LWE/Systems/Portrait2DSystem.h>
|
||||
#include <LWE/Systems/DynamicsSystem.h>
|
||||
#include <LWE/Systems/GuiSystem.h>
|
||||
#include <LWE/Components/AABB2D.h>
|
||||
#include <LWE/Components/Circle.h>
|
||||
#include <LWE/Components/Portrait2D.h>
|
||||
#include <LWE/Components/Dynamics.h>
|
||||
#include <LWE/Gui/LabelGui.h>
|
||||
#include <LWE/IO/HID/Input.h>
|
||||
#include <LWE/IO/HID/GenericInputHandler.h>
|
||||
#include <LWE/IO/HID/Keyboard.h>
|
||||
#include <LWE/HRNG.h>
|
||||
#include <LWE/System/CPU.h>
|
||||
|
||||
const float Game::paddleSpeed = 400.0f;
|
||||
const float Game::ballSpeed = 5000.0f;
|
||||
const float Game::ballSpeed = 400.0f;
|
||||
|
||||
Game::~Game()
|
||||
{
|
||||
}
|
||||
|
||||
Game::Game()
|
||||
: Level("Game"), plyScore(0), aiScore(0), started(false)
|
||||
: Level("Game"), plyScore(0), aiScore(0)
|
||||
{
|
||||
}
|
||||
|
||||
Game::Game(const Game& lvl)
|
||||
: Level(lvl), plyScore(lvl.plyScore), aiScore(lvl.aiScore), started(lvl.started)
|
||||
: Level(lvl), plyScore(lvl.plyScore), aiScore(lvl.aiScore)
|
||||
{
|
||||
}
|
||||
|
||||
@ -44,93 +44,87 @@ Game& Game::operator=(const Game& lvl)
|
||||
|
||||
plyScore = lvl.plyScore;
|
||||
aiScore = lvl.aiScore;
|
||||
started = lvl.started;
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
||||
void Game::SetupResources(lwe::GpuInterface *inf)
|
||||
void Game::SetupResources()
|
||||
{
|
||||
Level::SetupResources(inf);
|
||||
Level::SetupResources();
|
||||
|
||||
// Setup Resource Code Here
|
||||
AddResource(new lwe::GpuMesh(inf, ehs::portraitGui));
|
||||
AddResource(new lwe::Mesh("PortraitGui", lwe::portraitGuiVerts, lwe::portraitGuiIndices));
|
||||
|
||||
AddResource(new lwe::GpuFontAtlas("resources/fonts/Arial_48.ehf", inf));
|
||||
|
||||
AddResource(new ehs::Audio("resources/audio/Wall.wav", ehs::DataType::FLOAT));
|
||||
AddResource(new ehs::Audio("resources/audio/Paddle.wav", ehs::DataType::FLOAT));
|
||||
AddResource(new ehs::Audio("resources/audio/Score.wav", ehs::DataType::FLOAT));
|
||||
|
||||
constexpr ehs::UInt_8 circleData[] = {255, 255, 255, 255};
|
||||
lwe::GpuImg* circle = new lwe::GpuImg("Circle", inf, 1, 4, {1, 1}, (ehs::Byte*)circleData, lwe::GpuImgAspect::IMG_ASPECT_COLOR);
|
||||
constexpr lwe::UInt_8 circleData[] = {255, 255, 255, 255};
|
||||
lwe::Img* circle = new lwe::Img("Circle", 8, 4, 1, 1, (lwe::Byte*)circleData, lwe::ImgAspect::IMG_ASPECT_COLOR);
|
||||
AddResource(circle);
|
||||
}
|
||||
|
||||
void Game::Setup(lwe::GpuInterface *inf)
|
||||
void Game::Setup()
|
||||
{
|
||||
Level::Setup(inf);
|
||||
Level::Setup();
|
||||
|
||||
// Setup Code Here
|
||||
|
||||
lwe::GameLoop* gl = GetParent();
|
||||
lwe::GameLoop* gl = (lwe::GameLoop*)GetParent("GameLoop");
|
||||
|
||||
lwe::RenderWindow* win = gl->GetWindow();
|
||||
|
||||
// Adding Systems Here
|
||||
AddSystem(new lwe::AudioSystem());
|
||||
AddSystem(new lwe::Portrait2DSystem());
|
||||
AddSystem(new lwe::RigidBodySystem());
|
||||
AddSystem(new lwe::DynamicsSystem());
|
||||
|
||||
lwe::GuiSystem* gui = new lwe::GuiSystem();
|
||||
gui->AddResource(new lwe::FontAtlas("Resources/Fonts/Hack-Regular_48.ehf"));
|
||||
AddSystem(gui);
|
||||
|
||||
ehs::Vec2_f scale = win->GetSwapChain()->GetScale();
|
||||
ehs::Vec2_f center = win->GetSwapChain()->GetScale() / 2;
|
||||
lwe::Vec2_f scale = win->GetSwapChain()->GetScale();
|
||||
lwe::Vec2_f center = win->GetSwapChain()->GetScale() / 2;
|
||||
|
||||
// Score Gui
|
||||
lwe::LabelGui* plyScore = new lwe::LabelGui("PlyScore", "Arial_48", "0");
|
||||
plyScore->SetPosition({20.0f, 20.0f, 0.0f});
|
||||
lwe::LabelGui* plyScore = new lwe::LabelGui("PlyScore", "Hack-Regular_48", "0");
|
||||
plyScore->SetPosition({20.0f, 20.0f});
|
||||
gui->AddGui(plyScore);
|
||||
|
||||
lwe::LabelGui* aiScore = new lwe::LabelGui("AiScore", "Arial_48", "0");
|
||||
aiScore->SetPosition({scale.x - 68.0f, 20.0f, 0.0f});
|
||||
lwe::LabelGui* aiScore = new lwe::LabelGui("AiScore", "Hack-Regular_48", "0");
|
||||
aiScore->SetPosition({scale.x - 68.0f, 20.0f});
|
||||
gui->AddGui(aiScore);
|
||||
|
||||
// Bounds Entity
|
||||
lwe::Entity bounds("Bounds");
|
||||
bounds.SetScale({win->GetSwapChain()->GetScale(), 1.0f});
|
||||
lwe::Entity* bounds = new lwe::Entity("Bounds");
|
||||
bounds->SetScale({win->GetSwapChain()->GetScale(), 1.0f});
|
||||
|
||||
lwe::AABB2D* collider = new lwe::AABB2D("BoundsCollider", 0.0f, 0.0f);
|
||||
lwe::AABB2D* collider = new lwe::AABB2D();
|
||||
collider->SetInverted(true);
|
||||
collider->SetStatic(true);
|
||||
bounds.AddComponent(collider);
|
||||
collider->EnableStatic(true);
|
||||
bounds->AddComponent(collider);
|
||||
|
||||
AddEntity(bounds);
|
||||
|
||||
// Field Separator Entity
|
||||
|
||||
lwe::Entity fieldSep("FieldSeparator");
|
||||
fieldSep.SetScale({10.0f, scale.y, 1.0f});
|
||||
fieldSep.SetPos({center.x - 5.0f, 0.0f, 0.0f});
|
||||
lwe::Entity* fieldSep = new lwe::Entity("FieldSeparator");
|
||||
fieldSep->SetScale({10.0f, scale.y, 1.0f});
|
||||
fieldSep->SetPos({center.x - 5.0f, 0.0f, 0.0f});
|
||||
|
||||
lwe::Portrait2D* fieldSepImg = new lwe::Portrait2D("PaddleImg", "Circle");
|
||||
fieldSepImg->SetColor({0.75f});
|
||||
fieldSep.AddComponent(fieldSepImg);
|
||||
fieldSep->AddComponent(fieldSepImg);
|
||||
|
||||
AddEntity(fieldSep);
|
||||
|
||||
// Paddle Entity Template
|
||||
lwe::Entity paddle("Paddle");
|
||||
paddle.SetScale({20.0f, 200.0f, 1.0f});
|
||||
lwe::Entity* paddle = new lwe::Entity("Paddle");
|
||||
paddle->SetScale({20.0f, 200.0f, 1.0f});
|
||||
|
||||
lwe::AABB2D* paddleCollider = new lwe::AABB2D("PaddleCollider", 0.0f, 0.0f);
|
||||
paddleCollider->SetStatic(true);
|
||||
paddle.AddComponent(paddleCollider);
|
||||
lwe::AABB2D* paddleCollider = new lwe::AABB2D("Collider");
|
||||
paddleCollider->EnableStatic(true);
|
||||
paddle->AddComponent(paddleCollider);
|
||||
|
||||
lwe::Portrait2D* paddleImg = new lwe::Portrait2D("PaddleImg", "Circle");
|
||||
paddleImg->SetColor({0.75f});
|
||||
paddle.AddComponent(paddleImg);
|
||||
paddle->AddComponent(paddleImg);
|
||||
|
||||
AddTemplate(paddle);
|
||||
|
||||
@ -143,42 +137,19 @@ void Game::Setup(lwe::GpuInterface *inf)
|
||||
aiPaddle->SetPos({scale.x - 50.0f, center.y - 100.0f, 0.0f});
|
||||
|
||||
// Ball Entity
|
||||
lwe::Entity ball("Ball");
|
||||
ball.SetScale({20.0f, 20.0f, 1.0f});
|
||||
ball.SetPos({center.x - 10.0f, center.y - 10.0f, 0.0f});
|
||||
lwe::Entity* ball = new lwe::Entity("Ball");
|
||||
ball->SetScale({20.0f, 20.0f, 1.0f});
|
||||
ball->SetPos({center.x - 10.0f, center.y - 10.0f, 0.0f});
|
||||
|
||||
lwe::AABB2D* ballCollider = new lwe::AABB2D("BallCollider", 0.5f, 1.1f);
|
||||
ballCollider->SetCollidedCb([](lwe::RigidBody* a, lwe::RigidBody* b)
|
||||
{
|
||||
lwe::Entity* aOwner = (lwe::Entity*)a->GetEntity();
|
||||
lwe::Entity* bOwner = (lwe::Entity*)b->GetEntity();
|
||||
lwe::Level *lvl = aOwner->GetParent();
|
||||
lwe::AudioSystem *audioSys = (lwe::AudioSystem *)lvl->GetSystem("AudioSystem");
|
||||
lwe::AABB2D* ballCollider = new lwe::AABB2D("Collider");
|
||||
ball->AddComponent(ballCollider);
|
||||
|
||||
static ehs::UInt_64 id = 0;
|
||||
|
||||
if (bOwner->GetId() == "Bounds")
|
||||
{
|
||||
lwe::AudioSource audio("Audio_" + ehs::Str_8::FromNum(id++),"Wall");
|
||||
audio.EnableAutoDelete(true);
|
||||
audio.EnableLoop(false);
|
||||
audio.Play();
|
||||
audioSys->AddSource(audio);
|
||||
}
|
||||
else
|
||||
{
|
||||
lwe::AudioSource audio("Audio_" + ehs::Str_8::FromNum(id++),"Paddle");
|
||||
audio.EnableAutoDelete(true);
|
||||
audio.EnableLoop(false);
|
||||
audio.Play();
|
||||
audioSys->AddSource(audio);
|
||||
}
|
||||
});
|
||||
ball.AddComponent(ballCollider);
|
||||
lwe::Dynamics* ballDynamics = new lwe::Dynamics(1.0f, 1.01f);
|
||||
ball->AddComponent(ballDynamics);
|
||||
|
||||
lwe::Portrait2D* ballImg = new lwe::Portrait2D("BallImg", "Circle");
|
||||
ballImg->SetColor({1.0f, 0.0f, 0.0f});
|
||||
ball.AddComponent(ballImg);
|
||||
ball->AddComponent(ballImg);
|
||||
|
||||
AddEntity(ball);
|
||||
}
|
||||
@ -190,77 +161,78 @@ void Game::PostInitialize(lwe::GpuCmdBuffer* cmdBuffer)
|
||||
// Post Initialization Code Here
|
||||
}
|
||||
|
||||
void Game::OnUpdate(lwe::RenderWindow* win, ehs::Input* input, const float delta)
|
||||
void Game::OnUpdate(lwe::Input* input, const float delta)
|
||||
{
|
||||
Level::OnUpdate(win, input, delta);
|
||||
Level::OnUpdate(input, delta);
|
||||
|
||||
// Update Code Here
|
||||
|
||||
const ehs::InputHandler* ih = win->GetInputHandler();
|
||||
const lwe::GenericInputHandler* handler = (lwe::GenericInputHandler*)input->GetHandler("GenericInputHandler");
|
||||
|
||||
const ehs::Keyboard* keyboard = (ehs::Keyboard*)ih->GetDeviceByType(EHS_HID_KEYBOARD);
|
||||
if (!keyboard)
|
||||
return;
|
||||
const lwe::Keyboard* keyboard = handler->GetPrimaryKeyboard();
|
||||
|
||||
lwe::Entity* bounds = GetEntity("Bounds");
|
||||
|
||||
lwe::Entity* ball = GetEntity("Ball");
|
||||
ehs::Vec3_f ballPos = ball->GetPos();
|
||||
ehs::Vec3_f ballScale = ball->GetScale();
|
||||
lwe::Vec3_f ballPos = ball->GetPos();
|
||||
lwe::Vec3_f ballScale = ball->GetScale();
|
||||
|
||||
if (ballPos.x <= bounds->GetPos().x + 10.0f)
|
||||
if (ballPos.x <= bounds->GetPos().x)
|
||||
{
|
||||
aiScore++;
|
||||
|
||||
lwe::GuiSystem* gui = (lwe::GuiSystem*)GetSystem("GuiSystem");
|
||||
lwe::LabelGui* aiScoreLabel = (lwe::LabelGui*)gui->GetGui("AiScore");
|
||||
aiScoreLabel->SetText(ehs::Str_8::FromNum(aiScore));
|
||||
aiScoreLabel->SetText(lwe::Str_8::FromNum(aiScore));
|
||||
|
||||
ResetGame(bounds, ball);
|
||||
}
|
||||
else if (ballPos.x + ballScale.x >= bounds->GetScale().x - 10.0f)
|
||||
else if (ballPos.x + ballScale.x >= bounds->GetScale().x)
|
||||
{
|
||||
plyScore++;
|
||||
|
||||
lwe::GuiSystem* gui = (lwe::GuiSystem*)GetSystem("GuiSystem");
|
||||
lwe::LabelGui* plyScoreLabel = (lwe::LabelGui*)gui->GetGui("PlyScore");
|
||||
plyScoreLabel->SetText(ehs::Str_8::FromNum(plyScore));
|
||||
plyScoreLabel->SetText(lwe::Str_8::FromNum(plyScore));
|
||||
|
||||
ResetGame(bounds, ball);
|
||||
}
|
||||
|
||||
lwe::Entity* plyPaddle = GetEntity("PlyPaddle");
|
||||
|
||||
if (!started && keyboard->IsTouched(ehs::Keyboard::Space))
|
||||
if (!started && keyboard->IsTouched(lwe::Keyboard::Space))
|
||||
{
|
||||
ehs::PRNG<ehs::UInt_8> rng((ehs::UInt_8)ehs::CPU::GetTSC());
|
||||
if (!lwe::CPU::HasRDRND())
|
||||
return;
|
||||
|
||||
lwe::AABB2D* ballCollider = (lwe::AABB2D*)ball->GetComponent("AABB2D");
|
||||
lwe::Dynamics* ballDynamics = (lwe::Dynamics*)ball->GetComponent("Dynamics", "");
|
||||
//ballDynamics->ApplyForce({0.0f, ballSpeed, 0.0f});
|
||||
|
||||
if (const ehs::UInt_8 result = rng.Generate(0, 4); result == 0)
|
||||
ballCollider->ApplyForce({ballSpeed, ballSpeed, 0.0f});
|
||||
lwe::UInt_8 result = lwe::HRNG::Generate_s8(0, 4);
|
||||
if (result == 0)
|
||||
ballDynamics->ApplyForce({ballSpeed, ballSpeed, 0.0f});
|
||||
else if (result == 1)
|
||||
ballCollider->ApplyForce({-ballSpeed, ballSpeed, 0.0f});
|
||||
ballDynamics->ApplyForce({-ballSpeed, ballSpeed, 0.0f});
|
||||
else if (result == 2)
|
||||
ballCollider->ApplyForce({ballSpeed, -ballSpeed, 0.0f});
|
||||
ballDynamics->ApplyForce({ballSpeed, -ballSpeed, 0.0f});
|
||||
else if (result == 3)
|
||||
ballCollider->ApplyForce({-ballSpeed, -ballSpeed, 0.0f});
|
||||
ballDynamics->ApplyForce({-ballSpeed, -ballSpeed, 0.0f});
|
||||
|
||||
started = true;
|
||||
}
|
||||
|
||||
if (keyboard->IsDown(ehs::Keyboard::W))
|
||||
if (keyboard->IsDown(lwe::Keyboard::W))
|
||||
{
|
||||
ehs::Vec3_f newPos = plyPaddle->GetPos() - ehs::Vec3_f(0.0f, paddleSpeed, 0.0f) * delta;
|
||||
lwe::Vec3_f newPos = plyPaddle->GetPos() - lwe::Vec3_f(0.0f, paddleSpeed, 0.0f) * delta;
|
||||
if (newPos.y <= bounds->GetPos().y)
|
||||
newPos.y = bounds->GetPos().y;
|
||||
|
||||
plyPaddle->SetPos(newPos);
|
||||
}
|
||||
|
||||
if (keyboard->IsDown(ehs::Keyboard::S))
|
||||
if (keyboard->IsDown(lwe::Keyboard::S))
|
||||
{
|
||||
ehs::Vec3_f newPos = plyPaddle->GetPos() + ehs::Vec3_f(0.0f, paddleSpeed, 0.0f) * delta;
|
||||
lwe::Vec3_f newPos = plyPaddle->GetPos() + lwe::Vec3_f(0.0f, paddleSpeed, 0.0f) * delta;
|
||||
if (newPos.y + plyPaddle->GetScale().y >= bounds->GetScale().y)
|
||||
newPos.y = bounds->GetScale().y - plyPaddle->GetScale().y;
|
||||
|
||||
@ -268,12 +240,12 @@ void Game::OnUpdate(lwe::RenderWindow* win, ehs::Input* input, const float delta
|
||||
}
|
||||
|
||||
lwe::Entity* aiPaddle = GetEntity("AiPaddle");
|
||||
ehs::Vec3_f aiPaddlePos = aiPaddle->GetPos();
|
||||
ehs::Vec3_f aiPaddleScale = aiPaddle->GetScale();
|
||||
lwe::Vec3_f aiPaddlePos = aiPaddle->GetPos();
|
||||
lwe::Vec3_f aiPaddleScale = aiPaddle->GetScale();
|
||||
|
||||
if (aiPaddlePos.y + aiPaddleScale.y / 2.0f < ballPos.y + ballScale.y / 2.0f)
|
||||
{
|
||||
aiPaddlePos = aiPaddlePos + ehs::Vec3_f(0.0f, paddleSpeed * 2.0f, 0.0f) * delta;
|
||||
aiPaddlePos = aiPaddlePos + lwe::Vec3_f(0.0f, paddleSpeed, 0.0f) * delta;
|
||||
if (aiPaddlePos.y + aiPaddleScale.y / 2.0f > ballPos.y + ballScale.y / 2.0f)
|
||||
aiPaddlePos.y = ballPos.y + ballScale.y / 2.0f - aiPaddleScale.y / 2.0f;
|
||||
|
||||
@ -284,7 +256,7 @@ void Game::OnUpdate(lwe::RenderWindow* win, ehs::Input* input, const float delta
|
||||
}
|
||||
else
|
||||
{
|
||||
aiPaddlePos = aiPaddlePos - ehs::Vec3_f(0.0f, paddleSpeed * 2.0f, 0.0f) * delta;
|
||||
aiPaddlePos = aiPaddlePos - lwe::Vec3_f(0.0f, paddleSpeed, 0.0f) * delta;
|
||||
if (aiPaddlePos.y + aiPaddleScale.y / 2.0f < ballPos.y + ballScale.y / 2.0f)
|
||||
aiPaddlePos.y = ballPos.y + ballScale.y / 2.0f - aiPaddleScale.y / 2.0f;
|
||||
|
||||
@ -304,18 +276,10 @@ void Game::PreRender(lwe::GpuCmdBuffer* cmdBuffer)
|
||||
|
||||
void Game::ResetGame(const lwe::Entity* bounds, lwe::Entity* ball)
|
||||
{
|
||||
lwe::AudioSystem *audioSys = (lwe::AudioSystem *)GetSystem("AudioSystem");
|
||||
|
||||
lwe::AudioSource audio("Score", "Score");
|
||||
audio.EnableAutoDelete(true);
|
||||
audio.EnableLoop(false);
|
||||
audio.Play();
|
||||
audioSys->AddSource(audio);
|
||||
|
||||
ball->SetPos(bounds->GetScale() / 2.0f - ball->GetScale() / 2.0f);
|
||||
|
||||
lwe::AABB2D* ballCollider = (lwe::AABB2D*)ball->GetComponent("AABB2D");
|
||||
ballCollider->ResetVelocity();
|
||||
lwe::Dynamics* ballDyn = (lwe::Dynamics*)ball->GetComponent("Dynamics");
|
||||
ballDyn->SetVelocity(0.0f);
|
||||
|
||||
started = false;
|
||||
}
|
||||
|
@ -1,15 +1,15 @@
|
||||
#pragma once
|
||||
|
||||
#include <lwe/Level.h>
|
||||
#include <lwe/RenderWindow.h>
|
||||
#include <LWE/LWE.h>
|
||||
#include <LWE/Level.h>
|
||||
|
||||
class Game : public lwe::Level
|
||||
{
|
||||
private:
|
||||
static const float paddleSpeed;
|
||||
static const float ballSpeed;
|
||||
ehs::UInt_64 plyScore;
|
||||
ehs::UInt_64 aiScore;
|
||||
lwe::UInt_64 plyScore;
|
||||
lwe::UInt_64 aiScore;
|
||||
bool started;
|
||||
|
||||
public:
|
||||
@ -21,13 +21,13 @@ public:
|
||||
|
||||
Game& operator=(const Game& lvl);
|
||||
|
||||
void SetupResources(lwe::GpuInterface *inf) override;
|
||||
void SetupResources() override;
|
||||
|
||||
void Setup(lwe::GpuInterface *inf) override;
|
||||
void Setup() override;
|
||||
|
||||
void PostInitialize(lwe::GpuCmdBuffer* cmdBuffer) override;
|
||||
|
||||
void OnUpdate(lwe::RenderWindow* win, ehs::Input* input, const float delta) override;
|
||||
void OnUpdate(lwe::Input* input, const float delta) override;
|
||||
|
||||
void PreRender(lwe::GpuCmdBuffer* cmdBuffer) override;
|
||||
|
||||
|
47
Main.cpp
@ -1,23 +1,31 @@
|
||||
#include <ehs/Log.h>
|
||||
#include <ehs/GC.h>
|
||||
#include <lwe/GameLoop.h>
|
||||
#include <lwe/RenderWindow.h>
|
||||
|
||||
#include <ehs/io/Console.h>
|
||||
#include <LWE/LWE.h>
|
||||
#include <LWE/Log.h>
|
||||
#include <LWE/GarbageCollector.h>
|
||||
#include <LWE/GameLoop.h>
|
||||
#include <LWE/IO/RenderWindow.h>
|
||||
#include <LWE/IO/Console.h>
|
||||
|
||||
#include "Levels/Game.h"
|
||||
#include "LWE/IO/HID/GenericInputHandler.h"
|
||||
|
||||
int main()
|
||||
void LogCallback(const lwe::Log& log)
|
||||
{
|
||||
ehs::Initialize("Pong", "Release", {1, 0, 0});
|
||||
lwe::Console::Write_8(log.ToStr());
|
||||
}
|
||||
|
||||
ehs::Log::EnableImmediateMode(true);
|
||||
lwe::SInt_32 Main(lwe::Str_8* appName, lwe::Str_8* appVerId, lwe::Version* appVer)
|
||||
{
|
||||
*appName = "Pong";
|
||||
*appVerId = "Release";
|
||||
*appVer = {1, 0, 0};
|
||||
|
||||
ehs::Console::Attach();
|
||||
lwe::Console::Attach();
|
||||
|
||||
#if defined(EHS_OS_WINDOWS)
|
||||
lwe::Log::SetCallback(LogCallback);
|
||||
|
||||
#if defined(LWE_OS_WINDOWS)
|
||||
lwe::GpuInstance::AddExtension(VK_KHR_WIN32_SURFACE_EXTENSION_NAME);
|
||||
#elif defined(EHS_OS_LINUX)
|
||||
#elif defined(LWE_OS_LINUX)
|
||||
lwe::GpuInstance::AddExtension(VK_KHR_XCB_SURFACE_EXTENSION_NAME);
|
||||
#endif
|
||||
|
||||
@ -30,18 +38,23 @@ int main()
|
||||
lwe::GpuQueueFamily* family = primary.GetQueueFamily(lwe::QueueType::GRAPHICS);
|
||||
|
||||
lwe::GpuInterface inf(&primary);
|
||||
inf.AddExtension(VK_KHR_SWAPCHAIN_EXTENSION_NAME);
|
||||
inf.AddExtensions(VK_KHR_SWAPCHAIN_EXTENSION_NAME);
|
||||
|
||||
lwe::GpuQueue queue(family, &inf, 1.0f);
|
||||
|
||||
inf.Initialize();
|
||||
|
||||
lwe::RenderWindow win(&inf, &queue);
|
||||
win.Create_8(ehs::GetAppName_8(), {0, 0}, {1024, 768});
|
||||
win.Show();
|
||||
win.Create_8(*appName, {0, 0}, {1024, 768});
|
||||
|
||||
lwe::GameLoop gl(&win, 6, 0);
|
||||
gl.AddLevel(new Game());
|
||||
gl.GetInput()->AddHandler(new lwe::GenericInputHandler());
|
||||
|
||||
lwe::Frame* mainFrame = new lwe::Frame("Main");
|
||||
|
||||
gl.AddFrame(mainFrame);
|
||||
|
||||
mainFrame->AddLevel(new Game());
|
||||
|
||||
gl.Initialize();
|
||||
gl.Start();
|
||||
@ -53,7 +66,5 @@ int main()
|
||||
|
||||
lwe::GpuInstance::Release();
|
||||
|
||||
ehs::Uninitialize();
|
||||
|
||||
return 0;
|
||||
}
|
@ -1,31 +0,0 @@
|
||||
#version 450
|
||||
#extension GL_ARB_separate_shader_objects : enable
|
||||
|
||||
layout(location = 0) in vec2 fUv;
|
||||
layout(location = 1) in flat uint fChannels;
|
||||
|
||||
layout(location = 0) out vec4 result;
|
||||
|
||||
layout(binding = 1) uniform Opt
|
||||
{
|
||||
vec4 multiplier;
|
||||
bool preMultiply;
|
||||
} opt;
|
||||
|
||||
layout(binding = 2) uniform sampler2D render;
|
||||
|
||||
void main()
|
||||
{
|
||||
result = opt.multiplier;
|
||||
if (fChannels == 1)
|
||||
result *= vec4(texture(render, fUv).rrr, 1.0f);
|
||||
else if (fChannels == 2)
|
||||
result *= vec4(texture(render, fUv).rrr, texture(render, fUv).g);
|
||||
else if (fChannels == 3)
|
||||
result *= vec4(texture(render, fUv).rgb, 1.0f);
|
||||
else if (fChannels == 4)
|
||||
result *= texture(render, fUv).rgba;
|
||||
|
||||
if (opt.preMultiply)
|
||||
result = vec4(result.rgb * result.a, result.a);
|
||||
}
|
@ -1,53 +0,0 @@
|
||||
#version 450
|
||||
#extension GL_ARB_separate_shader_objects : enable
|
||||
|
||||
layout(location = 0) in vec3 vPos;
|
||||
layout(location = 1) in vec2 vUv;
|
||||
|
||||
layout(location = 0) out vec2 fUv;
|
||||
layout(location = 1) out uint fChannels;
|
||||
|
||||
layout(binding = 0) uniform Transform
|
||||
{
|
||||
mat4 viewProj;
|
||||
vec3 pos;
|
||||
uint channels;
|
||||
vec2 size;
|
||||
} trans;
|
||||
|
||||
mat4 RemoveRotation(mat4 inMat)
|
||||
{
|
||||
inMat[0][0] = 1.0;
|
||||
inMat[0][1] = 0.0;
|
||||
inMat[0][2] = 0.0;
|
||||
inMat[1][0] = 0.0;
|
||||
inMat[1][1] = 1.0;
|
||||
inMat[1][2] = 0.0;
|
||||
inMat[2][0] = 0.0;
|
||||
inMat[2][1] = 0.0;
|
||||
inMat[2][2] = 1.0;
|
||||
|
||||
return inMat;
|
||||
}
|
||||
|
||||
void main()
|
||||
{
|
||||
// The vec4 we will use to set gl_Position
|
||||
vec4 pos = vec4(trans.pos, 1.0f);
|
||||
|
||||
// Adjust the position based on the camera view
|
||||
// Extract the right and up vectors from the view matrix
|
||||
vec3 right = vec3(trans.viewProj[0][0], trans.viewProj[1][0], trans.viewProj[2][0]);
|
||||
vec3 up = vec3(trans.viewProj[0][1], trans.viewProj[1][1], trans.viewProj[2][1]);
|
||||
|
||||
// Adjust the quad vertices to face the camera
|
||||
// The inPosition.xy should be in NDC space, from -1 to 1
|
||||
pos.xyz += (right * vPos.x * trans.size.x) + (up * vPos.y * trans.size.y);
|
||||
|
||||
// Output position
|
||||
gl_Position = trans.viewProj * pos;
|
||||
|
||||
// Pass through the texture coordinates
|
||||
fUv = vUv;
|
||||
fChannels = trans.channels;
|
||||
}
|
@ -1,25 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
for file in ./*.vert; do
|
||||
if [ -f "$file" ]; then
|
||||
filename=$(basename -- "$file")
|
||||
|
||||
echo "Compiling vertex shader, ${filename}"
|
||||
|
||||
filename="${filename%.*}"
|
||||
|
||||
glslangValidator -V "${file}" -o "./${filename}_Vert.spv"
|
||||
fi
|
||||
done
|
||||
|
||||
for file in ./*.frag; do
|
||||
if [ -f "$file" ]; then
|
||||
filename=$(basename -- "$file")
|
||||
|
||||
echo "Compiling vertex shader, ${filename}"
|
||||
|
||||
filename="${filename%.*}"
|
||||
|
||||
glslangValidator -V "${file}" -o "./${filename}_Frag.spv"
|
||||
fi
|
||||
done
|
@ -1,22 +0,0 @@
|
||||
#version 450
|
||||
#extension GL_ARB_separate_shader_objects : enable
|
||||
|
||||
layout(location = 0) in vec2 fUv;
|
||||
layout(location = 1) in flat uint fChannels;
|
||||
|
||||
layout(location = 0) out vec4 result;
|
||||
|
||||
layout(binding = 1) uniform Opt
|
||||
{
|
||||
vec4 multiplier;
|
||||
} opt;
|
||||
|
||||
layout(binding = 2) uniform sampler2D render;
|
||||
|
||||
void main()
|
||||
{
|
||||
if (fChannels != 1)
|
||||
return;
|
||||
|
||||
result = vec4(texture(render, fUv).rrrr) * opt.multiplier;
|
||||
}
|
@ -1,24 +0,0 @@
|
||||
#version 450
|
||||
#extension GL_ARB_separate_shader_objects : enable
|
||||
|
||||
layout(location = 0) in vec3 vPos;
|
||||
layout(location = 1) in vec2 vUv;
|
||||
|
||||
layout(location = 0) out vec2 fUv;
|
||||
layout(location = 1) out flat uint fChannels;
|
||||
|
||||
layout(binding = 0) uniform Transform
|
||||
{
|
||||
mat4 proj;
|
||||
mat4 view;
|
||||
mat4 model;
|
||||
int channels;
|
||||
} trans;
|
||||
|
||||
void main()
|
||||
{
|
||||
gl_Position = trans.proj * trans.view * trans.model * vec4(vPos, 1.0);
|
||||
|
||||
fUv = vUv;
|
||||
fChannels = trans.channels;
|
||||
}
|
@ -1,12 +0,0 @@
|
||||
#version 450
|
||||
#extension GL_ARB_separate_shader_objects : enable
|
||||
|
||||
layout(location = 0) in vec2 vUv;
|
||||
|
||||
layout(location = 0) out vec4 outColor;
|
||||
|
||||
layout(binding = 1) uniform sampler2D render;
|
||||
|
||||
void main() {
|
||||
outColor = texture(render, vUv);
|
||||
}
|
@ -1,17 +0,0 @@
|
||||
#version 450
|
||||
#extension GL_ARB_separate_shader_objects : enable
|
||||
|
||||
layout(location = 0) in vec3 vPos;
|
||||
layout(location = 1) in vec2 vUv;
|
||||
|
||||
layout(location = 0) out vec2 fUv;
|
||||
|
||||
layout(binding = 0) uniform UniformBufferObject {
|
||||
mat4 mvp;
|
||||
} ubo;
|
||||
|
||||
void main() {
|
||||
gl_Position = ubo.mvp * vec4(vPos, 1.0);
|
||||
|
||||
fUv = vUv;
|
||||
}
|
@ -1,21 +0,0 @@
|
||||
#version 450
|
||||
#extension GL_ARB_separate_shader_objects : enable
|
||||
|
||||
layout(location = 0) in vec2 glyphUV;
|
||||
layout(location = 1) in vec4 glyphColor;
|
||||
|
||||
layout(location = 0) out vec4 result;
|
||||
|
||||
layout(std140, binding = 1) uniform Opt
|
||||
{
|
||||
bool preMultiply;
|
||||
} opt;
|
||||
|
||||
layout(binding = 2) uniform sampler2D atlas;
|
||||
|
||||
void main()
|
||||
{
|
||||
result = vec4(glyphColor.r, glyphColor.g, glyphColor.b, glyphColor.a * texture(atlas, glyphUV).r);
|
||||
if (opt.preMultiply)
|
||||
result = vec4(result.rgb * result.a, result.a);
|
||||
}
|
@ -1,23 +0,0 @@
|
||||
#version 450
|
||||
#extension GL_ARB_separate_shader_objects : enable
|
||||
|
||||
layout(location = 0) in vec3 vPos;
|
||||
layout(location = 1) in vec2 vUv;
|
||||
|
||||
layout(location = 0) out vec2 glyphUV;
|
||||
layout(location = 1) out vec4 glyphColor;
|
||||
|
||||
layout(std140, binding = 0) uniform Data
|
||||
{
|
||||
mat4 proj;
|
||||
mat4 view;
|
||||
mat4 model;
|
||||
vec4 color;
|
||||
} data;
|
||||
|
||||
void main() {
|
||||
gl_Position = data.proj * data.view * data.model * vec4(vPos, 1.0);
|
||||
|
||||
glyphUV = vUv;
|
||||
glyphColor = data.color;
|
||||
}
|
@ -1,21 +0,0 @@
|
||||
#version 450
|
||||
#extension GL_ARB_separate_shader_objects : enable
|
||||
|
||||
layout(location = 0) in vec2 fUv;
|
||||
|
||||
layout(location = 0) out vec4 outColor;
|
||||
|
||||
layout(binding = 1) uniform Material
|
||||
{
|
||||
vec3 lightColor;
|
||||
} material;
|
||||
|
||||
layout(binding = 2) uniform sampler2D render;
|
||||
|
||||
void main() {
|
||||
vec4 result = texture(render, fUv);
|
||||
if (result.rgb == vec3(1.0f, 1.0f, 1.0f))
|
||||
result = vec4(material.lightColor, 1.0f);
|
||||
|
||||
outColor = vec4(result.rgb, 1.0f);
|
||||
}
|
@ -1,17 +0,0 @@
|
||||
#version 450
|
||||
#extension GL_ARB_separate_shader_objects : enable
|
||||
|
||||
layout(binding = 0) uniform Transform {
|
||||
mat4 mvp;
|
||||
} transform;
|
||||
|
||||
layout(location = 0) in vec3 vPos;
|
||||
layout(location = 1) in vec2 vUv;
|
||||
|
||||
layout(location = 0) out vec2 fUv;
|
||||
|
||||
void main() {
|
||||
gl_Position = transform.mvp * vec4(vPos, 1.0);
|
||||
|
||||
fUv = vUv;
|
||||
}
|
@ -1,26 +0,0 @@
|
||||
#version 450
|
||||
#extension GL_ARB_separate_shader_objects : enable
|
||||
|
||||
layout(location = 0) in vec2 fUv;
|
||||
|
||||
layout(location = 0) out vec4 result;
|
||||
|
||||
layout(binding = 1) uniform Opt
|
||||
{
|
||||
vec3 color;
|
||||
bool preMultiply;
|
||||
} opt;
|
||||
|
||||
layout(binding = 2) uniform sampler2D render;
|
||||
|
||||
void main()
|
||||
{
|
||||
result = texture(render, fUv).rgba;
|
||||
|
||||
if (result.rgb == vec3(1.0f, 1.0f, 1.0f))
|
||||
result *= vec4(opt.color, 1.0f);
|
||||
|
||||
|
||||
if (opt.preMultiply)
|
||||
result = vec4(result.rgb * result.a, result.a);
|
||||
}
|
@ -1,50 +0,0 @@
|
||||
#version 450
|
||||
#extension GL_ARB_separate_shader_objects : enable
|
||||
|
||||
layout(location = 0) in vec3 vPos;
|
||||
layout(location = 1) in vec2 vUv;
|
||||
|
||||
layout(location = 0) out vec2 fUv;
|
||||
|
||||
layout(binding = 0) uniform Transform
|
||||
{
|
||||
mat4 viewProj;
|
||||
vec3 pos;
|
||||
vec2 size;
|
||||
} trans;
|
||||
|
||||
mat4 RemoveRotation(mat4 inMat)
|
||||
{
|
||||
inMat[0][0] = 1.0;
|
||||
inMat[0][1] = 0.0;
|
||||
inMat[0][2] = 0.0;
|
||||
inMat[1][0] = 0.0;
|
||||
inMat[1][1] = 1.0;
|
||||
inMat[1][2] = 0.0;
|
||||
inMat[2][0] = 0.0;
|
||||
inMat[2][1] = 0.0;
|
||||
inMat[2][2] = 1.0;
|
||||
|
||||
return inMat;
|
||||
}
|
||||
|
||||
void main()
|
||||
{
|
||||
// The vec4 we will use to set gl_Position
|
||||
vec4 pos = vec4(trans.pos, 1.0f);
|
||||
|
||||
// Adjust the position based on the camera view
|
||||
// Extract the right and up vectors from the view matrix
|
||||
vec3 right = vec3(trans.viewProj[0][0], trans.viewProj[1][0], trans.viewProj[2][0]);
|
||||
vec3 up = vec3(trans.viewProj[0][1], trans.viewProj[1][1], trans.viewProj[2][1]);
|
||||
|
||||
// Adjust the quad vertices to face the camera
|
||||
// The inPosition.xy should be in NDC space, from -1 to 1
|
||||
pos.xyz += (right * vPos.x * trans.size.x) + (up * vPos.y * trans.size.y);
|
||||
|
||||
// Output position
|
||||
gl_Position = trans.viewProj * pos;
|
||||
|
||||
// Pass through the texture coordinates
|
||||
fUv = vUv;
|
||||
}
|
@ -1,128 +0,0 @@
|
||||
#version 450
|
||||
#extension GL_ARB_separate_shader_objects : enable
|
||||
|
||||
#define MAX_LIGHTS 4
|
||||
|
||||
struct AmbientPointLight
|
||||
{
|
||||
vec3 color;
|
||||
vec3 pos;
|
||||
};
|
||||
|
||||
struct PointLight
|
||||
{
|
||||
vec3 color;
|
||||
float constant;
|
||||
vec3 pos;
|
||||
float linear;
|
||||
float quadratic;
|
||||
};
|
||||
|
||||
struct SpotLight
|
||||
{
|
||||
vec3 color;
|
||||
float innerCutOff;
|
||||
vec3 pos;
|
||||
float outerCutOff;
|
||||
vec3 dir;
|
||||
float constant;
|
||||
float linear;
|
||||
float quadratic;
|
||||
};
|
||||
|
||||
layout(std140, binding = 2) uniform Data
|
||||
{
|
||||
vec3 ambient;
|
||||
bool preMultiply;
|
||||
vec4 multiplier;
|
||||
uint ambientPointLightCount;
|
||||
uint pointLightCount;
|
||||
uint spotLightCount;
|
||||
AmbientPointLight ambientLights[MAX_LIGHTS];
|
||||
PointLight pointLights[MAX_LIGHTS];
|
||||
SpotLight spotLights[MAX_LIGHTS];
|
||||
} data;
|
||||
|
||||
layout(binding = 3) uniform sampler2D colorMap;
|
||||
layout(binding = 4) uniform sampler2D normalMap;
|
||||
layout(binding = 5) uniform sampler2D specularMap;
|
||||
|
||||
layout(location = 0) in vec4 fVertPos;
|
||||
layout(location = 1) in vec3 fTanPos;
|
||||
layout(location = 2) in vec2 fUV;
|
||||
layout(location = 3) in vec3 fViewPos;
|
||||
layout(location = 4) in mat3 fTBN;
|
||||
|
||||
layout(location = 0) out vec4 result;
|
||||
|
||||
vec3 CalcAmbientPointLight(vec3 normal, vec3 vertexPos, vec3 viewDir, AmbientPointLight light)
|
||||
{
|
||||
vec3 lightDir = normalize(light.pos - vertexPos);
|
||||
|
||||
vec3 diffuse = light.color * max(dot(normal, lightDir), 0.0f);
|
||||
|
||||
vec3 specular = light.color * pow(max(dot(normal, normalize(lightDir + viewDir)), 0.0), texture(specularMap, fUV).r);
|
||||
|
||||
return diffuse + specular;
|
||||
}
|
||||
|
||||
vec3 CalcPointLight(vec3 normal, vec3 vertexPos, vec3 viewDir, PointLight light)
|
||||
{
|
||||
vec3 lightDir = normalize(light.pos - vertexPos);
|
||||
|
||||
float dist = length(light.pos - vertexPos);
|
||||
|
||||
float attenuation = 1.0f / (light.constant + light.linear * dist + light.quadratic * (dist * dist));
|
||||
|
||||
vec3 diffuse = light.color * max(dot(normal, lightDir), 0.0f);
|
||||
|
||||
vec3 specular = light.color * pow(max(dot(normal, normalize(lightDir + viewDir)), 0.0), texture(specularMap, fUV).r);
|
||||
|
||||
return (diffuse + specular) * attenuation;
|
||||
}
|
||||
|
||||
vec3 CalcSpotLight(vec3 normal, vec3 vertexPos, vec3 viewDir, SpotLight light)
|
||||
{
|
||||
vec3 lightDir = normalize(light.pos - vertexPos);
|
||||
|
||||
float dist = length(light.pos - vertexPos);
|
||||
|
||||
float attenuation = 1.0f / (light.constant + light.linear * dist + light.quadratic * (dist * dist));
|
||||
|
||||
float theta = dot(lightDir, normalize(-light.dir));
|
||||
float epsilon = light.innerCutOff - light.outerCutOff;
|
||||
float intensity = clamp((theta - light.outerCutOff) / epsilon, 0.0f, 1.0f);
|
||||
|
||||
vec3 diffuse = light.color * max(dot(normal, lightDir), 0.0f);
|
||||
|
||||
vec3 specular = light.color * pow(max(dot(normal, normalize(lightDir + viewDir)), 0.0), texture(specularMap, fUV).r);
|
||||
|
||||
return (diffuse + specular) * intensity * attenuation;
|
||||
}
|
||||
|
||||
void main()
|
||||
{
|
||||
vec3 viewDir = normalize(fViewPos - fTanPos);
|
||||
vec3 nNorm = normalize(texture(normalMap, fUV).rgb * 2.0f - 1.0f);
|
||||
|
||||
vec3 final = data.ambient;
|
||||
|
||||
//Ambient Point Lights
|
||||
for (uint i = 0; i < data.ambientPointLightCount; ++i)
|
||||
final += CalcAmbientPointLight(nNorm, fVertPos.xyz, viewDir, data.ambientLights[i]);
|
||||
|
||||
//Point Lights
|
||||
for (uint i = 0; i < data.pointLightCount; ++i)
|
||||
final += CalcPointLight(nNorm, fVertPos.xyz, viewDir, data.pointLights[i]);
|
||||
|
||||
//Spot Lights
|
||||
for (uint i = 0; i < data.spotLightCount; ++i)
|
||||
final += CalcSpotLight(nNorm, fVertPos.xyz, viewDir, data.spotLights[i]);
|
||||
|
||||
vec4 tColor = texture(colorMap, fUV);
|
||||
|
||||
result = vec4(tColor.rgb * final * data.multiplier.rgb, tColor.a * data.multiplier.a);
|
||||
|
||||
if (data.preMultiply)
|
||||
result = vec4(result.rgb * result.a, result.a);
|
||||
}
|
@ -1,62 +0,0 @@
|
||||
#version 450
|
||||
#extension GL_ARB_separate_shader_objects : enable
|
||||
|
||||
struct Bone
|
||||
{
|
||||
mat4 trans;
|
||||
};
|
||||
|
||||
layout(std140, binding = 0) uniform Transform
|
||||
{
|
||||
mat4 viewProj;
|
||||
mat4 model;
|
||||
vec3 viewPos;
|
||||
} transform;
|
||||
|
||||
layout(std140, binding = 1) uniform Skin
|
||||
{
|
||||
Bone skeleton[255];
|
||||
} skin;
|
||||
|
||||
layout(location = 0) in vec3 vPos;
|
||||
layout(location = 1) in vec3 vNorm;
|
||||
layout(location = 2) in vec2 vUV;
|
||||
layout(location = 3) in vec3 vTan;
|
||||
layout(location = 4) in vec3 vBiTan;
|
||||
layout(location = 5) in uvec4 bones;
|
||||
layout(location = 6) in vec4 weights;
|
||||
|
||||
layout(location = 0) out vec4 fVertPos;
|
||||
layout(location = 1) out vec3 fTanPos;
|
||||
layout(location = 2) out vec2 fUV;
|
||||
layout(location = 3) out vec3 fViewPos;
|
||||
layout(location = 4) out mat3 fTBN;
|
||||
|
||||
void main()
|
||||
{
|
||||
vec4 totalPos = vec4(0.0f);
|
||||
|
||||
for (uint i = 0; i < 4; ++i)
|
||||
{
|
||||
if (weights[i] == 0.0f)
|
||||
continue;
|
||||
|
||||
totalPos += skin.skeleton[bones[i]].trans * vec4(vPos, 1.0f) * weights[i];
|
||||
}
|
||||
|
||||
fVertPos = transform.model * totalPos;
|
||||
fUV = vUV;
|
||||
|
||||
vec3 T = normalize(vec3(transform.model * vec4(vTan, 0.0f)));
|
||||
vec3 B = normalize(vec3(transform.model * vec4(vBiTan, 0.0f)));
|
||||
vec3 N = normalize(vec3(transform.model * vec4(vNorm, 0.0f)));
|
||||
|
||||
T = normalize(T - dot(T, N) * N);
|
||||
|
||||
fTBN = transpose(mat3(T, B, N));
|
||||
|
||||
fTanPos = fTBN * fVertPos.xyz;
|
||||
fViewPos = fTBN * transform.viewPos;
|
||||
|
||||
gl_Position = transform.viewProj * transform.model * totalPos;
|
||||
}
|
@ -1,31 +0,0 @@
|
||||
#version 450
|
||||
#extension GL_ARB_separate_shader_objects : enable
|
||||
|
||||
layout(location = 0) in vec2 fUv;
|
||||
layout(location = 1) in flat uint fChannels;
|
||||
|
||||
layout(location = 0) out vec4 result;
|
||||
|
||||
layout(binding = 1) uniform Opt
|
||||
{
|
||||
bool preMultiply;
|
||||
vec4 multiplier;
|
||||
} opt;
|
||||
|
||||
layout(binding = 2) uniform sampler2D render;
|
||||
|
||||
void main()
|
||||
{
|
||||
result = opt.multiplier;
|
||||
if (fChannels == 1)
|
||||
result *= vec4(texture(render, fUv).rrr, 1.0f);
|
||||
else if (fChannels == 2)
|
||||
result *= vec4(texture(render, fUv).rrr, texture(render, fUv).g);
|
||||
else if (fChannels == 3)
|
||||
result *= vec4(texture(render, fUv).rgb, 1.0f);
|
||||
else if (fChannels == 4)
|
||||
result *= texture(render, fUv).rgba;
|
||||
|
||||
if (opt.preMultiply)
|
||||
result = vec4(result.rgb * result.a, result.a);
|
||||
}
|
@ -1,24 +0,0 @@
|
||||
#version 450
|
||||
#extension GL_ARB_separate_shader_objects : enable
|
||||
|
||||
layout(location = 0) in vec3 vPos;
|
||||
layout(location = 1) in vec2 vUv;
|
||||
|
||||
layout(location = 0) out vec2 fUv;
|
||||
layout(location = 1) out flat uint fChannels;
|
||||
|
||||
layout(binding = 0) uniform Transform
|
||||
{
|
||||
mat4 proj;
|
||||
mat4 view;
|
||||
mat4 model;
|
||||
int channels;
|
||||
} trans;
|
||||
|
||||
void main()
|
||||
{
|
||||
gl_Position = trans.proj * trans.view * trans.model * vec4(vPos, 1.0);
|
||||
|
||||
fUv = vUv;
|
||||
fChannels = trans.channels;
|
||||
}
|
@ -1,14 +0,0 @@
|
||||
#version 450
|
||||
#extension GL_ARB_separate_shader_objects : enable
|
||||
|
||||
layout(std140, binding = 1) uniform Data
|
||||
{
|
||||
vec4 color;
|
||||
} data;
|
||||
|
||||
layout(location = 0) out vec4 result;
|
||||
|
||||
void main()
|
||||
{
|
||||
result = data.color;
|
||||
}
|
@ -1,15 +0,0 @@
|
||||
#version 450
|
||||
#extension GL_ARB_separate_shader_objects : enable
|
||||
|
||||
layout(std140, binding = 0) uniform Transform
|
||||
{
|
||||
mat4 viewProj;
|
||||
mat4 model;
|
||||
} transform;
|
||||
|
||||
layout(location = 0) in vec3 vPos;
|
||||
|
||||
void main()
|
||||
{
|
||||
gl_Position = transform.viewProj * transform.model * vec4(vPos, 1.0f);
|
||||
}
|
@ -1,20 +0,0 @@
|
||||
#version 450
|
||||
#extension GL_ARB_separate_shader_objects : enable
|
||||
|
||||
layout(location = 0) in vec3 skyboxUV;
|
||||
|
||||
layout(location = 0) out vec4 result;
|
||||
|
||||
layout(std140, binding = 1) uniform Opt
|
||||
{
|
||||
bool preMultiply;
|
||||
} opt;
|
||||
|
||||
layout(binding = 2) uniform samplerCube skybox;
|
||||
|
||||
void main()
|
||||
{
|
||||
result = texture(skybox, skyboxUV);
|
||||
if (opt.preMultiply)
|
||||
result = vec4(result.rgb * result.a, result.a);
|
||||
}
|
@ -1,20 +0,0 @@
|
||||
#version 450
|
||||
#extension GL_ARB_separate_shader_objects : enable
|
||||
|
||||
layout(location = 0) in vec3 vPos;
|
||||
|
||||
layout(location = 0) out vec3 skyboxUV;
|
||||
|
||||
layout(std140, binding = 0) uniform Data
|
||||
{
|
||||
mat4 viewProj;
|
||||
} data;
|
||||
|
||||
void main()
|
||||
{
|
||||
skyboxUV = vPos;
|
||||
|
||||
vec4 pos = data.viewProj * vec4(vPos, 1.0);
|
||||
|
||||
gl_Position = pos.xyww;
|
||||
}
|
@ -1,137 +0,0 @@
|
||||
#version 450
|
||||
#extension GL_ARB_separate_shader_objects : enable
|
||||
|
||||
#define MAX_LIGHTS 4
|
||||
|
||||
struct Material
|
||||
{
|
||||
vec4 color;
|
||||
bool diffused;
|
||||
float specular;
|
||||
float shininess;
|
||||
};
|
||||
|
||||
struct AmbientPointLight
|
||||
{
|
||||
vec3 color;
|
||||
vec3 pos;
|
||||
};
|
||||
|
||||
struct PointLight
|
||||
{
|
||||
vec3 color;
|
||||
float constant;
|
||||
vec3 pos;
|
||||
float linear;
|
||||
float quadratic;
|
||||
};
|
||||
|
||||
struct SpotLight
|
||||
{
|
||||
vec3 color;
|
||||
float innerCutOff;
|
||||
vec3 pos;
|
||||
float outerCutOff;
|
||||
vec3 dir;
|
||||
float constant;
|
||||
float linear;
|
||||
float quadratic;
|
||||
};
|
||||
|
||||
layout(std140, binding = 1) uniform Data
|
||||
{
|
||||
vec3 ambient;
|
||||
bool preMultiply;
|
||||
vec3 camPos;
|
||||
Material material;
|
||||
uint ambientPointLightCount;
|
||||
uint pointLightCount;
|
||||
uint spotLightCount;
|
||||
AmbientPointLight ambientLights[MAX_LIGHTS];
|
||||
PointLight pointLights[MAX_LIGHTS];
|
||||
SpotLight spotLights[MAX_LIGHTS];
|
||||
} data;
|
||||
|
||||
layout(location = 1) in vec3 fNorm;
|
||||
layout(location = 0) in vec4 fWorldPos;
|
||||
|
||||
layout(location = 0) out vec4 result;
|
||||
|
||||
vec3 CalcAmbientPointLight(vec3 normal, vec3 vertexPos, vec3 viewDir, Material material, AmbientPointLight light)
|
||||
{
|
||||
vec3 lightDir = normalize(light.pos - vertexPos);
|
||||
|
||||
vec3 diffuse = light.color * max(dot(normal, lightDir), 0.0f);
|
||||
|
||||
vec3 specular = light.color * pow(max(dot(normal, normalize(lightDir + viewDir)), 0.0), material.shininess);
|
||||
|
||||
return diffuse + specular;
|
||||
}
|
||||
|
||||
vec3 CalcPointLight(vec3 normal, vec3 vertexPos, vec3 viewDir, Material material, PointLight light)
|
||||
{
|
||||
vec3 lightDir = normalize(light.pos - vertexPos);
|
||||
|
||||
float dist = length(light.pos - vertexPos);
|
||||
|
||||
float attenuation = 1.0f / (light.constant + light.linear * dist + light.quadratic * (dist * dist));
|
||||
|
||||
vec3 diffuse = light.color * max(dot(normal, lightDir), 0.0f);
|
||||
|
||||
vec3 specular = light.color * pow(max(dot(normal, normalize(lightDir + viewDir)), 0.0), material.shininess);
|
||||
|
||||
return (diffuse + specular) * attenuation;
|
||||
}
|
||||
|
||||
vec3 CalcSpotLight(vec3 normal, vec3 vertexPos, vec3 viewDir, Material material, SpotLight light)
|
||||
{
|
||||
vec3 lightDir = normalize(light.pos - vertexPos);
|
||||
|
||||
float dist = length(light.pos - vertexPos);
|
||||
|
||||
float attenuation = 1.0f / (light.constant + light.linear * dist + light.quadratic * (dist * dist));
|
||||
|
||||
float theta = dot(lightDir, normalize(-light.dir));
|
||||
float epsilon = light.innerCutOff - light.outerCutOff;
|
||||
float intensity = clamp((theta - light.outerCutOff) / epsilon, 0.0f, 1.0f);
|
||||
|
||||
vec3 diffuse = light.color * max(dot(normal, lightDir), 0.0f);
|
||||
|
||||
vec3 specular = light.color * pow(max(dot(normal, normalize(lightDir + viewDir)), 0.0), material.shininess);
|
||||
|
||||
return (diffuse + specular) * intensity * attenuation;
|
||||
}
|
||||
|
||||
void main()
|
||||
{
|
||||
if (data.material.diffused == true)
|
||||
{
|
||||
vec3 viewDir = normalize(data.camPos - fWorldPos.xyz);
|
||||
vec3 nNorm = normalize(fNorm);
|
||||
|
||||
vec3 final = data.ambient;
|
||||
|
||||
//Ambient Point Lights
|
||||
for (uint i = 0; i < data.ambientPointLightCount; ++i)
|
||||
final += CalcAmbientPointLight(nNorm, fWorldPos.xyz, viewDir, data.material, data.ambientLights[i]);
|
||||
|
||||
//Point Lights
|
||||
for (uint i = 0; i < data.pointLightCount; ++i)
|
||||
final += CalcPointLight(nNorm, fWorldPos.xyz, viewDir, data.material, data.pointLights[i]);
|
||||
|
||||
//Spot Lights
|
||||
for (uint i = 0; i < data.spotLightCount; ++i)
|
||||
final += CalcSpotLight(nNorm, fWorldPos.xyz, viewDir, data.material, data.spotLights[i]);
|
||||
|
||||
//outColor = vec4(data.spotLights[0].quadratic, 0.0f, 0.0f, 1.0f);
|
||||
|
||||
result = vec4(data.material.color.rgb * final, data.material.color.a);
|
||||
}
|
||||
else
|
||||
{
|
||||
result = data.material.color;
|
||||
}
|
||||
|
||||
if (data.preMultiply)
|
||||
result = vec4(result.rgb * result.a, result.a);
|
||||
}
|
@ -1,22 +0,0 @@
|
||||
#version 450
|
||||
#extension GL_ARB_separate_shader_objects : enable
|
||||
|
||||
layout(std140, binding = 0) uniform Transform
|
||||
{
|
||||
mat4 viewProj;
|
||||
mat4 model;
|
||||
} transform;
|
||||
|
||||
layout(location = 0) in vec3 vPos;
|
||||
layout(location = 1) in vec3 vNorm;
|
||||
|
||||
layout(location = 1) out vec3 fNorm;
|
||||
layout(location = 0) out vec4 fWorldPos;
|
||||
|
||||
void main()
|
||||
{
|
||||
fNorm = (transform.model * vec4(vNorm, 0.0f)).xyz;
|
||||
fWorldPos = transform.model * vec4(vPos, 1.0f);
|
||||
|
||||
gl_Position = transform.viewProj * fWorldPos;
|
||||
}
|
@ -1,20 +0,0 @@
|
||||
#version 450
|
||||
#extension GL_ARB_separate_shader_objects : enable
|
||||
|
||||
layout(location = 0) out vec4 outColor;
|
||||
|
||||
layout(binding = 1) uniform Shading
|
||||
{
|
||||
vec4 color;
|
||||
bool preMultiply;
|
||||
} shading;
|
||||
|
||||
layout(binding = 1) uniform sampler2D render;
|
||||
|
||||
void main()
|
||||
{
|
||||
outColor = shading.color;
|
||||
|
||||
if (shading.preMultiply)
|
||||
outColor = vec4(outColor.rgb * outColor.a, outColor.a);
|
||||
}
|
@ -1,15 +0,0 @@
|
||||
#version 450
|
||||
#extension GL_ARB_separate_shader_objects : enable
|
||||
|
||||
layout(location = 0) in vec3 vPos;
|
||||
|
||||
layout(binding = 0) uniform UniformBufferObject
|
||||
{
|
||||
mat4 viewProj;
|
||||
mat4 model;
|
||||
} ubo;
|
||||
|
||||
void main()
|
||||
{
|
||||
gl_Position = ubo.viewProj * ubo.model * vec4(vPos, 1.0);
|
||||
}
|
@ -1,38 +0,0 @@
|
||||
#version 450
|
||||
|
||||
#extension GL_EXT_scalar_block_layout : enable
|
||||
|
||||
#define MAX_WEIGHTS 3
|
||||
#define MAX_BONES 50
|
||||
|
||||
layout(binding = 0) uniform Transform
|
||||
{
|
||||
mat4 viewProj;
|
||||
mat4 model;
|
||||
mat4 bones[MAX_BONES];
|
||||
} transform;
|
||||
|
||||
layout(location = 0) in vec3 vNorm;
|
||||
layout(location = 1) in vec3 vPos;
|
||||
layout(location = 2) in uvec3 vBoneIndices;
|
||||
layout(location = 3) in vec3 vWeights;
|
||||
|
||||
layout(location = 0) out vec3 fNorm;
|
||||
layout(location = 1) out vec4 fWorldPos;
|
||||
|
||||
void main()
|
||||
{
|
||||
vec4 totalLocalPos = vec4(0.0f);
|
||||
vec4 totalNormal = vec4(0.0f);
|
||||
|
||||
for (int i = 0; i < MAX_WEIGHTS; ++i)
|
||||
{
|
||||
totalLocalPos += transform.bones[vBoneIndices[i]] * vec4(vPos, 1.0f) * vWeights[i];
|
||||
totalNormal += transform.bones[vBoneIndices[i]] * vec4(vNorm, 0.0f) * vWeights[i];
|
||||
}
|
||||
|
||||
fNorm = (transform.model * totalNormal).xyz;
|
||||
fWorldPos = transform.model * totalLocalPos;
|
||||
|
||||
gl_Position = transform.viewProj * fWorldPos;
|
||||
}
|
@ -1,21 +0,0 @@
|
||||
#version 450
|
||||
#extension GL_ARB_separate_shader_objects : enable
|
||||
|
||||
layout(location = 0) in vec2 vUv;
|
||||
|
||||
layout(location = 0) out vec4 result;
|
||||
|
||||
layout(binding = 1) uniform Opt
|
||||
{
|
||||
bool preMultiply;
|
||||
vec4 multiplier;
|
||||
} opt;
|
||||
|
||||
layout(binding = 2) uniform sampler2D render;
|
||||
|
||||
void main()
|
||||
{
|
||||
result = opt.multiplier * texture(render, vUv);
|
||||
if (opt.preMultiply)
|
||||
result = vec4(result.rgb * result.a, result.a);
|
||||
}
|
@ -1,21 +0,0 @@
|
||||
#version 450
|
||||
#extension GL_ARB_separate_shader_objects : enable
|
||||
|
||||
layout(location = 0) in vec3 vPos;
|
||||
layout(location = 1) in vec2 vUv;
|
||||
|
||||
layout(location = 0) out vec2 fUv;
|
||||
|
||||
layout(binding = 0) uniform Transform
|
||||
{
|
||||
mat4 proj;
|
||||
mat4 view;
|
||||
mat4 model;
|
||||
} trans;
|
||||
|
||||
void main()
|
||||
{
|
||||
gl_Position = trans.proj * trans.view * trans.model * vec4(vPos, 1.0);
|
||||
|
||||
fUv = vUv;
|
||||
}
|
Before Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 481 KiB |
Before Width: | Height: | Size: 558 KiB |
Before Width: | Height: | Size: 209 KiB |
Before Width: | Height: | Size: 38 KiB |
Before Width: | Height: | Size: 30 KiB |
Before Width: | Height: | Size: 15 KiB |
Before Width: | Height: | Size: 127 B |
Before Width: | Height: | Size: 134 B |
Before Width: | Height: | Size: 4.5 KiB |
Before Width: | Height: | Size: 4.6 KiB |
Before Width: | Height: | Size: 186 KiB |
Before Width: | Height: | Size: 143 B |
Before Width: | Height: | Size: 12 KiB |