Initial commit
This commit is contained in:
12
.gitignore
vendored
Normal file
12
.gitignore
vendored
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
.import
|
||||||
|
godot/logs
|
||||||
|
assets/blender/**/*.blend1
|
||||||
|
assets/blender/**/*.blend2
|
||||||
|
assets/blender/**/*.blend3
|
||||||
|
assets/blender/scripts/*.blend*
|
||||||
|
*.pyc
|
||||||
|
*.o
|
||||||
|
*.a
|
||||||
|
.*.swp
|
||||||
|
*.kra~
|
||||||
|
*.png~
|
||||||
4
.gitmodules
vendored
Normal file
4
.gitmodules
vendored
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
[submodule "src/godot"]
|
||||||
|
path = src/godot
|
||||||
|
url = git@github.com:godotengine/godot
|
||||||
|
branch = 3.x
|
||||||
39
Makefile
Normal file
39
Makefile
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
BLENDER = ../../blender-3.3.1-linux-x64/blender
|
||||||
|
SERVER = src/godot/bin/godot_server.x11.opt.tools.64
|
||||||
|
|
||||||
|
.PHONY: all godot-editor-main export export-models export-clothes export-clean export-linux-demo export-windows-demo export-binaries patch
|
||||||
|
all: godot-editor-main godot-main
|
||||||
|
godot-main: patch
|
||||||
|
cd src/godot; \
|
||||||
|
scons platform=x11 target=release tools=no custom_modules=../modules -j16; \
|
||||||
|
scons platform=x11 target=release_debug tools=no custom_modules=../modules -j16;
|
||||||
|
cd src/godot; \
|
||||||
|
scons platform=x11 target=release tools=no custom_modules=../modules -j16; \
|
||||||
|
scons platform=server target=release_debug tools=yes custom_modules=../modules -j16
|
||||||
|
godot-editor-main: patch
|
||||||
|
cd src/godot; \
|
||||||
|
scons platform=x11 target=release_debug tools=yes custom_modules=../modules -j16;
|
||||||
|
patch: ./src/godot/scene/animation/skeleton_ik.cpp
|
||||||
|
cd ./src/godot && git reset --hard HEAD && for p in ../patches/*.patch; do git apply $$p; done
|
||||||
|
sed -e 's/ERR_FAIL_COND_V(-1 == p_task->root_bone, false);//g' -i ./src/godot/scene/animation/skeleton_ik.cpp
|
||||||
|
|
||||||
|
|
||||||
|
export: export-models export-clothes
|
||||||
|
rm -Rf godot/.import
|
||||||
|
|
||||||
|
export-clean:
|
||||||
|
rm -f assets/blender/scripts/tmp-*.blend
|
||||||
|
|
||||||
|
export-models: export-clean
|
||||||
|
$(BLENDER) -b -Y -P assets/blender/scripts/export_models.py
|
||||||
|
|
||||||
|
export-clothes: export-clean
|
||||||
|
$(BLENDER) -b -Y -P assets/blender/scripts/export_clothes.py
|
||||||
|
export-binaries:
|
||||||
|
mkdir -p export
|
||||||
|
$(SERVER) --path godot --export linux_demo ../export/office-demo-linux.x86_64
|
||||||
|
$(SERVER) --path godot --export-debug linux_demo ../export/office-demo-debug-linux.x86_64
|
||||||
|
$(SERVER) --path godot --export windows_demo ../export/office-demo-windows.x86_64.exe
|
||||||
|
$(SERVER) --path godot --export-debug windows_demo ../export/office-demo-debug-windows.x86_64.exe
|
||||||
|
|
||||||
|
|
||||||
0
project.godot
Normal file
0
project.godot
Normal file
4
run-editor.sh
Executable file
4
run-editor.sh
Executable file
@@ -0,0 +1,4 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
cd godot
|
||||||
|
gdb --args ../src/godot/bin/godot.x11.opt.tools.64 --verbose -e $*
|
||||||
@@ -0,0 +1,64 @@
|
|||||||
|
From 29a376ed6ad549cf80aa1fd215aa5d34e9b9c29f Mon Sep 17 00:00:00 2001
|
||||||
|
From: Sergey Lapin <slapinid@gmail.com>
|
||||||
|
Date: Fri, 13 Jan 2023 19:09:56 +0300
|
||||||
|
Subject: [PATCH] Shut up and fix some errors breaking engine
|
||||||
|
|
||||||
|
---
|
||||||
|
drivers/gles2/rasterizer_storage_gles2.cpp | 2 +-
|
||||||
|
drivers/gles3/rasterizer_storage_gles3.cpp | 2 +-
|
||||||
|
scene/animation/skeleton_ik.cpp | 6 +++++-
|
||||||
|
3 files changed, 7 insertions(+), 3 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/drivers/gles2/rasterizer_storage_gles2.cpp b/drivers/gles2/rasterizer_storage_gles2.cpp
|
||||||
|
index 028b399a59..807b95fe57 100644
|
||||||
|
--- a/drivers/gles2/rasterizer_storage_gles2.cpp
|
||||||
|
+++ b/drivers/gles2/rasterizer_storage_gles2.cpp
|
||||||
|
@@ -2833,7 +2833,7 @@ AABB RasterizerStorageGLES2::mesh_get_aabb(RID p_mesh, RID p_skeleton) const {
|
||||||
|
const bool *skused = mesh->surfaces[i]->skeleton_bone_used.ptr();
|
||||||
|
|
||||||
|
int sbs = sk->size;
|
||||||
|
- ERR_CONTINUE(bs > sbs);
|
||||||
|
+// ERR_CONTINUE(bs > sbs);
|
||||||
|
const float *texture = sk->bone_data.ptr();
|
||||||
|
|
||||||
|
bool first = true;
|
||||||
|
diff --git a/drivers/gles3/rasterizer_storage_gles3.cpp b/drivers/gles3/rasterizer_storage_gles3.cpp
|
||||||
|
index c865c77bf8..bacc78d02d 100644
|
||||||
|
--- a/drivers/gles3/rasterizer_storage_gles3.cpp
|
||||||
|
+++ b/drivers/gles3/rasterizer_storage_gles3.cpp
|
||||||
|
@@ -4153,7 +4153,7 @@ AABB RasterizerStorageGLES3::mesh_get_aabb(RID p_mesh, RID p_skeleton) const {
|
||||||
|
const bool *skused = mesh->surfaces[i]->skeleton_bone_used.ptr();
|
||||||
|
|
||||||
|
int sbs = sk->size;
|
||||||
|
- ERR_CONTINUE(bs > sbs);
|
||||||
|
+// ERR_CONTINUE(bs > sbs);
|
||||||
|
const float *texture = sk->skel_texture.ptr();
|
||||||
|
|
||||||
|
bool first = true;
|
||||||
|
diff --git a/scene/animation/skeleton_ik.cpp b/scene/animation/skeleton_ik.cpp
|
||||||
|
index 954ec66a84..a4ad34fa2d 100644
|
||||||
|
--- a/scene/animation/skeleton_ik.cpp
|
||||||
|
+++ b/scene/animation/skeleton_ik.cpp
|
||||||
|
@@ -55,7 +55,7 @@ FabrikInverseKinematic::ChainItem *FabrikInverseKinematic::ChainItem::add_child(
|
||||||
|
|
||||||
|
/// Build a chain that starts from the root to tip
|
||||||
|
bool FabrikInverseKinematic::build_chain(Task *p_task, bool p_force_simple_chain) {
|
||||||
|
- ERR_FAIL_COND_V(-1 == p_task->root_bone, false);
|
||||||
|
+
|
||||||
|
|
||||||
|
Chain &chain(p_task->chain);
|
||||||
|
|
||||||
|
@@ -566,6 +566,10 @@ void SkeletonIK::reload_chain() {
|
||||||
|
if (!skeleton) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
+ if (skeleton->find_bone(root_bone) < 0)
|
||||||
|
+ return;
|
||||||
|
+ if (skeleton->find_bone(tip_bone) < 0)
|
||||||
|
+ return;
|
||||||
|
|
||||||
|
task = FabrikInverseKinematic::create_simple_task(skeleton, skeleton->find_bone(root_bone), skeleton->find_bone(tip_bone), _get_target_transform());
|
||||||
|
if (task) {
|
||||||
|
--
|
||||||
|
2.34.1
|
||||||
|
|
||||||
37
src/patches/0003-Asserts-work-in-debug-builds.patch
Normal file
37
src/patches/0003-Asserts-work-in-debug-builds.patch
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
From 0c7a32d332d352544d797f3909604f49c6ba40b8 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Sergey Lapin <slapinid@gmail.com>
|
||||||
|
Date: Thu, 6 Apr 2023 19:35:47 +0300
|
||||||
|
Subject: [PATCH] Asserts work in debug builds
|
||||||
|
|
||||||
|
---
|
||||||
|
modules/gdscript/gdscript_function.cpp | 7 +++++++
|
||||||
|
1 file changed, 7 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/modules/gdscript/gdscript_function.cpp b/modules/gdscript/gdscript_function.cpp
|
||||||
|
index d58164ffa9..9bd955452d 100644
|
||||||
|
--- a/modules/gdscript/gdscript_function.cpp
|
||||||
|
+++ b/modules/gdscript/gdscript_function.cpp
|
||||||
|
@@ -28,6 +28,9 @@
|
||||||
|
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
|
||||||
|
/**************************************************************************/
|
||||||
|
|
||||||
|
+#include <cstdio>
|
||||||
|
+#include <cstdlib>
|
||||||
|
+
|
||||||
|
#include "gdscript_function.h"
|
||||||
|
|
||||||
|
#include "core/os/os.h"
|
||||||
|
@@ -1550,6 +1553,10 @@ Variant GDScriptFunction::call(GDScriptInstance *p_instance, const Variant **p_a
|
||||||
|
_err_print_error(err_func.utf8().get_data(), err_file.utf8().get_data(), err_line, err_text.utf8().get_data(), ERR_HANDLER_SCRIPT);
|
||||||
|
}
|
||||||
|
|
||||||
|
+#ifndef TOOLS_ENABLED
|
||||||
|
+ fprintf(stderr, "ASSERT failed: %ls\n", err_text.c_str());
|
||||||
|
+ abort();
|
||||||
|
+#endif
|
||||||
|
#endif
|
||||||
|
OPCODE_OUT;
|
||||||
|
}
|
||||||
|
--
|
||||||
|
2.34.1
|
||||||
|
|
||||||
2099
src/patches/0004-recast-update.patch
Normal file
2099
src/patches/0004-recast-update.patch
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user