Skip to content

Commit

Permalink
Merge pull request #26 from GsLogiMaker/cpp
Browse files Browse the repository at this point in the history
Rewrite in C++
  • Loading branch information
GsLogiMaker authored Sep 26, 2024
2 parents 2c93a44 + 6126856 commit d0756f0
Show file tree
Hide file tree
Showing 115 changed files with 113,230 additions and 6,664 deletions.
312 changes: 190 additions & 122 deletions .github/workflows/unittests.yml

Large diffs are not rendered by default.

10 changes: 9 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,12 @@ addons/gut/gui/GutSceneTheme.tres
unittest_log.xml
test_results.xml

logs/*
logs/*.log

# Ignore C++ build files
addons/glecs/cpp/.sconsign.dblite
*.os
addons/glecs/cpp/.cache
addons/glecs/cpp/compile_commands.json
.godot/scene_groups_cache.cfg
addons/glecs/cpp/src/doc_data.gen.h
11 changes: 8 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
[submodule "addons/glecs/rust/flecs-rs"]
path = addons/glecs/rust/flecs-rs
url = https://github.com/GsLogiMaker/flecs-rs
[submodule "addons/glecs/cpp/include/--force"]
path = addons/glecs/cpp/include/--force
url = https://github.com/godotengine/godot-cpp
branch = 4.2
[submodule "addons/glecs/cpp/include/godot-cpp"]
path = addons/glecs/cpp/include/godot-cpp
url = https://github.com/godotengine/godot-cpp
branch = 4.2
42 changes: 0 additions & 42 deletions .godot/global_script_class_cache.cfg
Original file line number Diff line number Diff line change
@@ -1,47 +1,5 @@
list=Array[Dictionary]([{
"base": &"RefCounted",
"class": &"Glecs",
"icon": "",
"language": &"GDScript",
"path": "res://addons/glecs/gd/glecs.gd"
}, {
"base": &"_GlecsBaseComponent",
"class": &"GlecsComponent",
"icon": "",
"language": &"GDScript",
"path": "res://addons/glecs/gd/component.gd"
}, {
"base": &"_GlecsBaseEntity",
"class": &"GlecsEntity",
"icon": "",
"language": &"GDScript",
"path": "res://addons/glecs/gd/entity.gd"
}, {
"base": &"GlecsEntity",
"class": &"GlecsModule",
"icon": "",
"language": &"GDScript",
"path": "res://addons/glecs/gd/module.gd"
}, {
"base": &"_GlecsBaseSystemBuilder",
"class": &"GlecsSystemBuilder",
"icon": "",
"language": &"GDScript",
"path": "res://addons/glecs/gd/system_builder.gd"
}, {
"base": &"_GlecsBaseWorldNode",
"class": &"GlecsWorldNode",
"icon": "",
"language": &"GDScript",
"path": "res://addons/glecs/gd/world_node.gd"
}, {
"base": &"_GlecsBaseWorld",
"class": &"GlecsWorldObject",
"icon": "",
"language": &"GDScript",
"path": "res://addons/glecs/gd/world_object.gd"
}, {
"base": &"RefCounted",
"class": &"GutHookScript",
"icon": "",
"language": &"GDScript",
Expand Down
4 changes: 2 additions & 2 deletions .gut_editor_config.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"ignore_pause": false,
"include_subdirs": true,
"inner_class": null,
"junit_xml_file": "./test_results.xml",
"junit_xml_file": "res://test_results.xml",
"junit_xml_timestamp": false,
"log_level": 1,
"opacity": 100,
Expand All @@ -42,4 +42,4 @@
"suffix": ".gd",
"tests": [],
"unit_test_name": ""
}
}
16 changes: 16 additions & 0 deletions .vscode/c_cpp_properties.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"configurations": [
{
"name": "linux-gcc-x64",
"includePath": [
"${workspaceFolder}/**"
],
"defines": [],
"cStandard": "${default}",
"cppStandard": "${default}",
"intelliSenseMode": "linux-gcc-x64",
"compilerPath": "/usr/bin/gcc"
}
],
"version": 4
}
45 changes: 11 additions & 34 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,40 +2,17 @@
"version": "0.2.0",
"configurations": [
{
"name": "Debug Game",
"preLaunchTask": "godot-rust: Build Debug",
"type": "lldb",
"name": "Debug Extension",
"request": "launch",
"program": "${config:godot-rust.environment.godotEditorPath}",
"cwd": "${config:godot-rust.environment.godotProjectPath}",
"presentation": {
"group": "Debug",
"order": 1
}
},
{
"name": "Release Game",
"preLaunchTask": "godot-rust: Build Release",
"type": "lldb",
"request": "launch",
"program": "${config:godot-rust.environment.godotEditorPath}",
"cwd": "${config:godot-rust.environment.godotProjectPath}",
"presentation": {
"group": "Debug",
"order": 2
}
},
{
"name": "Attach to Game",
"pid": "${command:pickMyProcess}",
"type": "lldb",
"request": "attach",
"program": "${config:godot-rust.environment.godotEditorPath}",
"port": 6007,
"presentation": {
"group": "Debug",
"order": 3
}
}
"preLaunchTask": "godot-extension: Build Debug",
"program": "${config:godotTools.editorPath.godot4}",
"args": [
"--path",
"${workspaceFolder}",
"--headless"
],
"cwd": "${workspaceFolder}"
}
]
}
}
221 changes: 216 additions & 5 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,218 @@
{
"rust-analyzer.linkedProjects": [
"./addons/glecs/rust/glecs/Cargo.toml",
"./addons/glecs/rust/flecs-rs/Cargo.toml",
],
"godot-rust.environment.godotProjectPath": "${workspaceFolder}"
"editor.tabSize": 4,
"editor.rulers": [
120
],
"editor.renderWhitespace": "trailing",
"editor.suggestSelection": "first",
"editor.formatOnSave": true,
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.stickyScroll.enabled": false,
"editor.bracketPairColorization.enabled": false,
"editor.cursorSmoothCaretAnimation": "on",
"editor.suggest.preview": true,
"terminal.integrated.defaultProfile.windows": "Command Prompt",
"debug.onTaskErrors": "debugAnyway",
"explorer.compactFolders": false,
"explorer.confirmDragAndDrop": false,
"explorer.confirmDelete": false,
"explorer.copyRelativePathSeparator": "/",
"files.autoSave": "onFocusChange",
"files.exclude": {
"node_modules/**/*": true,
"**/.classpath": true,
"**/.project": true,
"**/.settings": true,
"**/.factorypath": true
},
"files.associations": {
".clang*": "yaml",
"*.hpp.in": "cpp",
"*.in": "cpp"
},
"files.insertFinalNewline": true,
"files.trimFinalNewlines": true,
"files.trimTrailingWhitespace": true,
"workbench.startupEditor": "none",
"workbench.editorAssociations": {
"*.md": "vscode.markdown.preview.editor",
"*.svg": "svgPreviewer.customEditor"
},
"workbench.colorTheme": "Default Dark+",
"git.enableSmartCommit": true,
"git.autofetch": true,
"git.confirmSync": false,
"git.openRepositoryInParentFolders": "always",
"prettier.tabWidth": 4,
"prettier.singleQuote": true,
"prettier.jsxSingleQuote": true,
"prettier.trailingComma": "all",
"prettier.useEditorConfig": true,
"prettier.bracketSpacing": false,
"markdown.validate.enabled": true,
"[markdown]": {
"files.trimTrailingWhitespace": false,
"editor.formatOnSave": false,
"editor.defaultFormatter": "yzhang.markdown-all-in-one",
"editor.wordWrap": "wordWrapColumn",
"editor.wordWrapColumn": 120
},
"[yaml]": {
"editor.formatOnSave": false,
"editor.defaultFormatter": "redhat.vscode-yaml",
"editor.wordWrap": "wordWrapColumn",
"editor.wordWrapColumn": 120
},
"[json]": {
"editor.formatOnSave": false,
"editor.defaultFormatter": "vscode.json-language-features"
},
"[jsonc]": {
"editor.formatOnSave": false
},
"[plaintext]": {
"editor.wordWrap": "wordWrapColumn",
"editor.wordWrapColumn": 120
},
"[toml]": {
"editor.wordWrap": "wordWrapColumn",
"editor.wordWrapColumn": 120
},
"better-comments.tags": [
{
"tag": "XXX",
"color": "#F8C471"
},
{
"tag": "WARN",
"color": "#FF6961"
},
{
"tag": "NOTE",
"color": "#3498DB"
},
{
"tag": "TODO",
"color": "#77C3EC"
}
],
"vsintellicode.modify.editor.suggestSelection": "automaticallyOverrodeDefaultValue",
"codesnap.showWindowControls": false,
"codesnap.shutterAction": "copy",
"Workspace_Formatter.excludePattern": [
"**/build",
"**/.*",
"**/.vscode",
"**/html"
],
"Workspace_Formatter.includePattern": [
"*.c",
"*.h",
"*.cc",
"*.hh",
"*.cpp",
"*.hpp"
],
"svg.preview.autoOpen": true,
"remote.WSL.fileWatcher.polling": true,
"errorLens.delay": 1000,
"errorLens.enabledDiagnosticLevels": [
"error",
"warning"
],
"errorLens.enabled": false,
"C_Cpp.clang_format_sortIncludes": true,
"C_Cpp.vcFormat.indent.preserveComments": true,
"C_Cpp.vcFormat.indent.namespaceContents": false,
"C_Cpp.vcFormat.indent.caseContentsWhenBlock": true,
"C_Cpp.vcFormat.space.pointerReferenceAlignment": "right",
"C_Cpp.default.browse.limitSymbolsToIncludedHeaders": false,
"C_Cpp.default.cppStandard": "c++20",
"C_Cpp.default.cStandard": "c11",
"C_Cpp.formatting": "clangFormat",
"[c]": {
"editor.formatOnSave": false,
"editor.defaultFormatter": "ms-vscode.cpptools"
},
"[cpp]": {
"editor.formatOnSave": false,
"editor.defaultFormatter": "ms-vscode.cpptools"
},
"[cuda-cpp]": {
"editor.defaultFormatter": "ms-vscode.cpptools"
},
"cmake.configureOnOpen": false,
"cmake.autoSelectActiveFolder": false,
"cmake.configureOnEdit": false,
"[cmake]": {
"editor.formatOnSave": false,
"editor.defaultFormatter": "cheshirekow.cmake-format"
},
"cmake.options.statusBarVisibility": "visible",
"doxdocgen.file.fileTemplate": "@file {name}",
"doxdocgen.cpp.tparamTemplate": "@tparam {param} ",
"doxdocgen.generic.briefTemplate": "@brief {text}",
"doxdocgen.generic.boolReturnsTrueFalse": false,
"doxdocgen.generic.paramTemplate": "@param {param} ",
"doxdocgen.generic.returnTemplate": "@return",
"doxdocgen.generic.includeTypeAtReturn": false,
"C_Cpp.codeAnalysis.clangTidy.enabled": false,
"C_Cpp.configurationWarnings": "disabled",
"C_Cpp_Runner.cppStandard": "c++20",
"C_Cpp_Runner.cStandard": "c11",
"C_Cpp_Runner.enableWarnings": true,
"C_Cpp_Runner.warningsAsError": false,
"C_Cpp_Runner.cCompilerPath": "gcc",
"C_Cpp_Runner.cppCompilerPath": "g++",
"C_Cpp_Runner.debuggerPath": "gdb",
"C_Cpp_Runner.useMsvc": false,
"C_Cpp_Runner.warnings": [
"-Wall",
"-Wextra",
"-Wpedantic",
"-Wshadow",
"-Wformat=2",
"-Wcast-align",
"-Wconversion",
"-Wsign-conversion",
"-Wnull-dereference"
],
"C_Cpp_Runner.msvcWarnings": [
"/W4",
"/permissive-",
"/w14242",
"/w14287",
"/w14296",
"/w14311",
"/w14826",
"/w44062",
"/w44242",
"/w14905",
"/w14906",
"/w14263",
"/w44265",
"/w14928"
],
"C_Cpp_Runner.compilerArgs": [],
"C_Cpp_Runner.linkerArgs": [],
"C_Cpp_Runner.includePaths": [],
"C_Cpp_Runner.includeSearch": [
"*",
"**/*"
],
"C_Cpp_Runner.excludeSearch": [
"**/build",
"**/build/**",
"**/.*",
"**/.*/**",
"**/.vscode",
"**/.vscode/**"
],
"C_Cpp_Runner.useAddressSanitizer": false,
"C_Cpp_Runner.useUndefinedSanitizer": false,
"C_Cpp_Runner.useLeakSanitizer": false,
"C_Cpp_Runner.showCompilationTime": false,
"C_Cpp_Runner.useLinkTimeOptimization": false,
"C_Cpp_Runner.msvcSecureNoWarnings": false,
"C_Cpp_Runner.msvcBatchPath": ""
}
Loading

0 comments on commit d0756f0

Please sign in to comment.