summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLéo Lam <leo@leolam.fr>2021-04-11 12:52:41 +0200
committerLéo Lam <leo@leolam.fr>2021-04-11 12:52:48 +0200
commit225ee27b41ae3e74cf0242108c6fc4df291c1987 (patch)
tree7489987a02f3302609c7e2730eb9afd2edac7961
parent9846d6fef9ede738532f16149d7d33c13248426d (diff)
lib: Add skeleton for aal
-rw-r--r--CMakeLists.txt3
-rw-r--r--lib/aal/.clang-format74
-rw-r--r--lib/aal/CMakeLists.txt15
-rw-r--r--lib/aal/src/dummy.cpp0
4 files changed, 92 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 3ecb2b89..a3fdf1bd 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -34,6 +34,9 @@ target_link_libraries(uking PUBLIC sead)
add_subdirectory(lib/agl)
target_link_libraries(uking PUBLIC agl)
+add_subdirectory(lib/aal)
+target_link_libraries(uking PRIVATE aal)
+
add_subdirectory(lib/EventFlow)
target_link_libraries(uking PRIVATE evfl)
diff --git a/lib/aal/.clang-format b/lib/aal/.clang-format
new file mode 100644
index 00000000..ef862606
--- /dev/null
+++ b/lib/aal/.clang-format
@@ -0,0 +1,74 @@
+---
+Language: Cpp
+AccessModifierOffset: -4
+AlignAfterOpenBracket: Align
+AlignConsecutiveAssignments: false
+AlignConsecutiveDeclarations: false
+AlignOperands: true
+AlignTrailingComments: true
+AllowAllParametersOfDeclarationOnNextLine: true
+AllowShortBlocksOnASingleLine: Never
+AllowShortCaseLabelsOnASingleLine: false
+AllowShortFunctionsOnASingleLine: Inline
+AllowShortIfStatementsOnASingleLine: Never
+AllowShortLoopsOnASingleLine: false
+AlwaysBreakAfterDefinitionReturnType: None
+AlwaysBreakAfterReturnType: None
+AlwaysBreakBeforeMultilineStrings: false
+AlwaysBreakTemplateDeclarations: Yes
+BinPackArguments: true
+BinPackParameters: true
+BreakBeforeBinaryOperators: None
+BreakBeforeBraces: Attach
+BreakBeforeTernaryOperators: false
+BreakConstructorInitializersBeforeComma: false
+ColumnLimit: 100
+CommentPragmas: '^ (IWYU pragma:|NOLINT)'
+ConstructorInitializerAllOnOneLineOrOnePerLine: false
+ConstructorInitializerIndentWidth: 4
+ContinuationIndentWidth: 4
+Cpp11BracedListStyle: true
+DerivePointerAlignment: false
+DisableFormat: false
+ForEachMacros: []
+IncludeCategories:
+ - Regex: '^<[Ww]indows\.h>$'
+ Priority: 1
+ - Regex: '^<'
+ Priority: 2
+ - Regex: '^"'
+ Priority: 3
+IndentCaseLabels: false
+IndentWidth: 4
+IndentWrappedFunctionNames: false
+KeepEmptyLinesAtTheStartOfBlocks: false
+MacroBlockBegin: ''
+MacroBlockEnd: ''
+MaxEmptyLinesToKeep: 1
+NamespaceIndentation: None
+ObjCBlockIndentWidth: 4
+ObjCSpaceAfterProperty: false
+ObjCSpaceBeforeProtocolList: true
+PenaltyBreakBeforeFirstCallParameter: 19
+PenaltyBreakComment: 300
+PenaltyBreakFirstLessLess: 120
+PenaltyBreakString: 1000
+PenaltyExcessCharacter: 1000000
+PenaltyReturnTypeOnItsOwnLine: 60
+PointerAlignment: Left
+ReflowComments: true
+SortIncludes: true
+SpaceAfterCStyleCast: false
+SpaceBeforeAssignmentOperators: true
+SpaceBeforeParens: ControlStatements
+SpaceInEmptyParentheses: false
+SpacesBeforeTrailingComments: 2
+SpacesInAngles: false
+SpacesInContainerLiterals: true
+SpacesInCStyleCastParentheses: false
+SpacesInParentheses: false
+SpacesInSquareBrackets: false
+Standard: c++17
+TabWidth: 4
+UseTab: Never
+...
diff --git a/lib/aal/CMakeLists.txt b/lib/aal/CMakeLists.txt
new file mode 100644
index 00000000..bec22b55
--- /dev/null
+++ b/lib/aal/CMakeLists.txt
@@ -0,0 +1,15 @@
+project(aal CXX ASM)
+
+add_library(aal OBJECT
+ src/dummy.cpp
+)
+
+target_compile_options(aal PRIVATE -fno-exceptions)
+target_compile_options(aal PRIVATE -fno-strict-aliasing)
+target_compile_options(aal PRIVATE -Wno-invalid-offsetof)
+target_include_directories(aal PUBLIC include/)
+
+if(NOT TARGET sead)
+ add_subdirectory(../sead)
+endif()
+target_link_libraries(aal PUBLIC sead)
diff --git a/lib/aal/src/dummy.cpp b/lib/aal/src/dummy.cpp
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/lib/aal/src/dummy.cpp