diff --git a/.gitignore b/.gitignore index 04111ce..6720226 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,2 @@ CMakeLists.txt.user -.vscode +.vscode/settings.json diff --git a/.vscode/extensions.json b/.vscode/extensions.json new file mode 100644 index 0000000..a4ef25e --- /dev/null +++ b/.vscode/extensions.json @@ -0,0 +1,6 @@ +{ + "recommendations": [ + "ms-vscode.cpptools-extension-pack", + "ms-vscode.cmake-tools" + ] +} \ No newline at end of file diff --git a/.vscode/godot.natvis b/.vscode/godot.natvis new file mode 100644 index 0000000..36b0919 --- /dev/null +++ b/.vscode/godot.natvis @@ -0,0 +1,210 @@ + + + + + _cowdata._ptr ? (((const unsigned int *)(_cowdata._ptr))[-1]) : 0 + + _cowdata._ptr ? (((const unsigned int *)(_cowdata._ptr))[-1]) : 0 + _cowdata._ptr + + + + + + + count + + count + data + + + + + + + _data ? (_data->size_cache) : 0 + + _data ? (_data->size_cache) : 0 + _data->first + next_ptr + value + + + + + + + num_elements + + num_elements + head_element + next + data + + + + + + + *(reinterpret_cast<int*>(_cowdata._ptr) - 1) + + *(reinterpret_cast<int*>(_cowdata._ptr) - 1) + reinterpret_cast<VMap<$T1,$T2>::Pair*>(_cowdata._ptr) + + + + + + {dynamic_cast<CallableCustomMethodPointerBase*>(key.custom)->text} + + + + + + nil + {_data._bool} + {_data._int} + {_data._float} + {_data._transform2d} + {_data._aabb} + {_data._basis} + {_data._transform3d} + {_data._projection} + {*(String *)_data._mem} + {*(Vector2 *)_data._mem} + {*(Rect2 *)_data._mem} + {*(Vector3 *)_data._mem} + {*(Vector4 *)_data._mem} + {*(Plane *)_data._mem} + {*(Quaternion *)_data._mem} + {*(Color *)_data._mem} + {*(NodePath *)_data._mem} + {*(::RID *)_data._mem} + {*(Object *)_data._mem} + {*(Dictionary *)_data._mem} + {*(Array *)_data._mem} + {reinterpret_cast<const Variant::PackedArrayRef<unsigned char>*>(_data.packed_array)->array} + {reinterpret_cast<const Variant::PackedArrayRef<int>*>(_data.packed_array)->array} + + {reinterpret_cast<const Variant::PackedArrayRef<float>*>(_data.packed_array)->array} + {reinterpret_cast<const Variant::PackedArrayRef<double>*>(_data.packed_array)->array} + {reinterpret_cast<const Variant::PackedArrayRef<String>*>(_data.packed_array)->array} + {reinterpret_cast<const Variant::PackedArrayRef<Vector2>*>(_data.packed_array)->array} + {reinterpret_cast<const Variant::PackedArrayRef<Vector3>*>(_data.packed_array)->array} + {reinterpret_cast<const Variant::PackedArrayRef<Color>*>(_data.packed_array)->array} + + ((String *)(_data._mem))->_cowdata._ptr,s32 + + + _data._bool + _data._int + _data._float + _data._transform2d + _data._aabb + _data._basis + _data._transform3d + *(String *)_data._mem + *(Vector2 *)_data._mem + *(Rect2 *)_data._mem + *(Vector3 *)_data._mem + *(Plane *)_data._mem + *(Quaternion *)_data._mem + *(Color *)_data._mem + *(NodePath *)_data._mem + *(::RID *)_data._mem + *(Object *)_data._mem + *(Dictionary *)_data._mem + *(Array *)_data._mem + reinterpret_cast<const Variant::PackedArrayRef<unsigned char>*>(_data.packed_array)->array + *(PackedInt32Array *)_data._mem + *(PackedInt64Array *)_data._mem + *(PackedFloat32Array *)_data._mem + *(PackedFloat64Array *)_data._mem + *(PackedStringArray *)_data._mem + *(PackedVector2Array *)_data._mem + *(PackedVector3Array *)_data._mem + *(PackedColorArray *)_data._mem + + + + + [empty] + {_cowdata._ptr,s32} + _cowdata._ptr,s32 + + + + {*reinterpret_cast<void**>(opaque),s32} + + *reinterpret_cast<void**>(opaque) + *reinterpret_cast<void**>(opaque),s32 + + + + + {_data->cname} + {_data->name,s32} + [empty] + _data->cname + _data->name,s32 + + + + + {(*reinterpret_cast<const char***>(opaque))[1],s8} + {(*reinterpret_cast<const char***>(opaque))[2],s32} + + *reinterpret_cast<void**>(opaque) + (*reinterpret_cast<const char***>(opaque))+1 + (*reinterpret_cast<const char***>(opaque))[1],s8 + + + + + "{user.name}" {slot_map} + "{slot_map} + + + + {{{x},{y}}} + + x + y + + + + + {{{x},{y},{z}}} + + x + y + z + + + + + Quaternion {{{x},{y},{z},{w}}} + + x + y + z + w + + + + + Color {{{r},{g},{b},{a}}} + + r + g + b + a + + + diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 0000000..c67b99c --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,35 @@ +{ + // Use IntelliSense to learn about possible attributes. + // Hover to view descriptions of existing attributes. + // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 + "version": "0.2.0", + "configurations": [ + { + "name": "Windows Launch", + "type": "cppvsdbg", + "request": "launch", + "program": "${command:cmake.launchTargetPath}", + "args": [], + "cwd": "${command:cmake.buildDirectory}/bin", + "preLaunchTask": "CMake: build", + "internalConsoleOptions": "openOnSessionStart", + "console": "internalConsole", + "environment": [ + { + "name": "Path", + "value": "${env:Path};" + } + ], + "visualizerFile": "${workspaceFolder}/.vscode/godot.natvis" + }, + { + "name": "macOS/Linux Launch", + "type": "lldb", + "request": "launch", + "program": "${command:cmake.launchTargetPath}", + "args": [], + "cwd": "${command:cmake.buildDirectory}/bin", + "visualizerFile": "${workspaceFolder}/.vscode/godot.natvis" + } + ] +} \ No newline at end of file diff --git a/.vscode/tasks.json b/.vscode/tasks.json new file mode 100644 index 0000000..e9182cd --- /dev/null +++ b/.vscode/tasks.json @@ -0,0 +1,17 @@ +{ + "version": "2.0.0", + "tasks": [ + { + "type": "cmake", + "label": "CMake: build", + "command": "build", + "targets": [ + "all" + ], + "preset": "${command:cmake.activeBuildPresetName}", + "group": "build", + "problemMatcher": [], + "detail": "CMake template build task" + } + ] +} \ No newline at end of file diff --git a/CMakePresets.json b/CMakePresets.json new file mode 100644 index 0000000..23b36b2 --- /dev/null +++ b/CMakePresets.json @@ -0,0 +1,100 @@ +{ + "version": 5, + "cmakeMinimumRequired": { + "major": 3, + "minor": 23, + "patch": 0 + }, + "configurePresets": [ + { + "name": "default", + "displayName": "default", + "description": "Default preset that are inherited by all", + "generator": "Ninja", + "hidden": true, + "environment": { + "PROJECT_NAME": "MyGodotExtention" + } + }, + { + "name": "windows-debug", + "displayName": "64bit Windows Debug", + "inherits": "default", + "binaryDir": "${sourceDir}/../build_${env:PROJECT_NAME}_Windows-AMD64", + "condition": { + "type": "equals", + "lhs": "${hostSystemName}", + "rhs": "Windows" + }, + "toolset": { + "value": "host=x64", + "strategy": "external" + }, + "architecture": { + "value": "x64", + "strategy": "external" + }, + "cacheVariables": { + "CMAKE_C_COMPILER": "cl.exe", + "CMAKE_CXX_COMPILER": "cl.exe", + "CMAKE_BUILD_TYPE": "Debug" + } + }, + { + "name": "windows-release", + "displayName": "64bit Windows Release", + "inherits": "windows-debug", + "cacheVariables": { + "CMAKE_BUILD_TYPE": "Release" + } + }, + { + "name": "linux-debug", + "displayName": "64bit Linux Debug", + "inherits": "default", + "binaryDir": "${sourceDir}/../build_${env:PROJECT_NAME}_Linux-x86_64", + "condition": { + "type": "equals", + "lhs": "${hostSystemName}", + "rhs": "Linux" + }, + "cacheVariables": { + "CMAKE_CXX_COMPILER": "g++", + "CMAKE_C_COMPILER": "gcc", + "CMAKE_BUILD_TYPE": "Debug" + } + }, + { + "name": "linux-release", + "displayName": "64bit Linux Release", + "inherits": "linux-debug", + "cacheVariables": { + "CMAKE_BUILD_TYPE": "Release" + } + }, + { + "name": "macOS-debug", + "displayName": "64bit macOS Debug", + "inherits": "default", + "binaryDir": "${sourceDir}/../build_${env:PROJECT_NAME}_Darwin-Universal", + "condition": { + "type": "equals", + "lhs": "${hostSystemName}", + "rhs": "Darwin" + }, + "cacheVariables": { + "CMAKE_CXX_COMPILER": "clang++", + "CMAKE_C_COMPILER": "clang", + "CMAKE_BUILD_TYPE": "Debug" + } + }, + { + "name": "macOS-release", + "displayName": "64bit macOS Release", + "inherits": "macOS-debug", + "cacheVariables": { + "CMAKE_BUILD_TYPE": "Release" + } + } + ] +}