Skip to content
This repository was archived by the owner on Mar 11, 2025. It is now read-only.

Commit 5a99f1e

Browse files
committed
Init repo
0 parents  commit 5a99f1e

File tree

7 files changed

+223
-0
lines changed

7 files changed

+223
-0
lines changed

.clang-format

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
---
2+
Language: Cpp
3+
BasedOnStyle: LLVM
4+
AlwaysBreakTemplateDeclarations: Yes
5+
BreakBeforeBraces: Attach
6+
ColumnLimit: 160
7+
SpaceAfterTemplateKeyword: true
8+
Standard: c++20
9+
TabWidth: 4
10+
IndentWidth: 4
11+
UseTab: Always
12+
AllowShortEnumsOnASingleLine: true
13+
AllowShortCaseLabelsOnASingleLine: true
14+
AllowShortFunctionsOnASingleLine: All
15+
AllowShortLambdasOnASingleLine: All
16+
AllowShortBlocksOnASingleLine: Always
17+
AllowShortIfStatementsOnASingleLine: Always
18+
AllowShortLoopsOnASingleLine: true
19+
IndentRequires: true
20+
IncludeCategories:
21+
# Headers in <> with .h extension.
22+
- Regex: '<([A-Za-z0-9\/-_])+\.h>'
23+
Priority: 10
24+
# Headers in <> with .hpp extension.
25+
- Regex: '<([A-Za-z0-9\/-_])+\.hpp>'
26+
Priority: 20
27+
# Headers in <> without extension.
28+
- Regex: '<([A-Za-z0-9\/-_])+>'
29+
Priority: 30
30+
PointerAlignment: Left
31+
QualifierAlignment: Right

.clang-tidy

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
---
2+
Checks: 'clang-analyzer-*,
3+
concurrency-*,
4+
cppcoreguidelines-*,
5+
-cppcoreguidelines-non-private-member-variables-in-classes,
6+
-cppcoreguidelines-avoid-magic-numbers,
7+
-cppcoreguidelines-avoid-const-or-ref-data-members,
8+
misc-*,
9+
-misc-non-private-member-variables-in-classes,
10+
-misc-no-recursion,
11+
modernize-*,
12+
performance-*,
13+
portability-*,
14+
readability-*,
15+
-readability-identifier-length,
16+
-readability-magic-numbers,
17+
-readability-redundant-member-init,
18+
-readability-uppercase-literal-suffix'
19+
...

.editorconfig

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
[*]
2+
insert_final_newline = true
3+
charset = utf-8
4+
indent_size = 4
5+
indent_style = tab
6+
# Optional: git will commit as lf, this will only affect local files
7+
end_of_line = lf
8+
9+
[*.{py,md,yml,sh,cmake,json}]
10+
indent_style = space
11+
indent_size = 2
12+
13+
[*.{py,md,yml,sh,cmake,json}.in]
14+
indent_style = space
15+
indent_size = 2
16+
17+
[CMakeLists.txt]
18+
indent_style = space
19+
indent_size = 2

.gitignore

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
**/.vs/*
2+
**/.vscode/*
3+
build/*
4+
out/*
5+
.cache
6+
.DS_Store
7+
8+
tests/tmp.cpp
9+
**/test_src
10+
11+
CMakeSettings.json
12+
compile_commands.json
13+
/CMakeUserPresets.json
14+
15+
imgui.ini
16+
kvf-example.log

CMakePresets.json

Lines changed: 114 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,114 @@
1+
{
2+
"version": 2,
3+
"cmakeMinimumRequired": {
4+
"major": 3,
5+
"minor": 20,
6+
"patch": 0
7+
},
8+
"configurePresets": [
9+
{
10+
"name": "default",
11+
"description": "Build configuration using Ninja Multi-config",
12+
"generator": "Ninja Multi-Config",
13+
"binaryDir": "${sourceDir}/out/default",
14+
"cacheVariables": {
15+
"CMAKE_EXPORT_COMPILE_COMMANDS": "ON"
16+
}
17+
},
18+
{
19+
"name": "ninja-clang",
20+
"description": "Build configuration using Ninja Multi-config / clang",
21+
"inherits": "default",
22+
"binaryDir": "${sourceDir}/out/clang",
23+
"cacheVariables": {
24+
"CMAKE_C_COMPILER": "clang",
25+
"CMAKE_CXX_COMPILER": "clang++"
26+
}
27+
},
28+
{
29+
"name": "ninja-ubsan",
30+
"description": "UBSan build configuration using Ninja Multi-config",
31+
"inherits": "default",
32+
"binaryDir": "${sourceDir}/out/ubsan",
33+
"cacheVariables": {
34+
"CMAKE_CXX_FLAGS": "-fsanitize=undefined"
35+
}
36+
},
37+
{
38+
"name": "ninja-asan",
39+
"description": "ASan build configuration using Ninja Multi-config",
40+
"inherits": "default",
41+
"binaryDir": "${sourceDir}/out/asan",
42+
"cacheVariables": {
43+
"CMAKE_CXX_FLAGS": "-fsanitize=address"
44+
}
45+
},
46+
{
47+
"name": "ninja-tsan",
48+
"description": "TSan build configuration using Ninja Multi-config",
49+
"inherits": "default",
50+
"binaryDir": "${sourceDir}/out/tsan",
51+
"cacheVariables": {
52+
"CMAKE_CXX_FLAGS": "-fsanitize=thread"
53+
}
54+
},
55+
{
56+
"name": "vs22",
57+
"description": "Build configuration using Visual Studio 17 (2022)",
58+
"generator": "Visual Studio 17 2022",
59+
"binaryDir": "${sourceDir}/out/vs",
60+
"architecture": {
61+
"value": "x64",
62+
"strategy": "external"
63+
}
64+
}
65+
],
66+
"buildPresets": [
67+
{
68+
"name": "Debug",
69+
"configurePreset": "default",
70+
"configuration": "Debug"
71+
},
72+
{
73+
"name": "Release",
74+
"configurePreset": "default",
75+
"configuration": "Release"
76+
},
77+
{
78+
"name": "RelWithDebInfo",
79+
"configurePreset": "default",
80+
"configuration": "RelWithDebInfo"
81+
},
82+
{
83+
"name": "UBSan Debug",
84+
"configurePreset": "ninja-ubsan",
85+
"configuration": "Debug"
86+
}
87+
],
88+
"testPresets": [
89+
{
90+
"name": "Debug",
91+
"configurePreset": "default",
92+
"configuration": "Debug",
93+
"inheritConfigureEnvironment": true
94+
},
95+
{
96+
"name": "Release",
97+
"configurePreset": "default",
98+
"configuration": "Release",
99+
"inheritConfigureEnvironment": true
100+
},
101+
{
102+
"name": "RelWithDebInfo",
103+
"configurePreset": "default",
104+
"configuration": "RelWithDebInfo",
105+
"inheritConfigureEnvironment": true
106+
},
107+
{
108+
"name": "UBSan Debug",
109+
"configurePreset": "ninja-ubsan",
110+
"configuration": "Debug",
111+
"inheritConfigureEnvironment": true
112+
}
113+
]
114+
}

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2022 Karn Kaul and contributors
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# tkge
2+
3+
**2D Game Engine (WIP)**

0 commit comments

Comments
 (0)