Some compilation fixes for Godot 3.4 (#1979)

* Fix spine-godot README folder paths

* Fix spine-godot compilation issues for godot-3.4
This commit is contained in:
César Izurieta 2021-12-03 07:44:13 -05:00 committed by GitHub
parent d2feea6fcd
commit d51bbb9493
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 6 additions and 6 deletions

View File

@ -25,8 +25,8 @@ spine-godot works with the latest stable Godot 3.3 release. It requires compilat
To integrate spine-godot into your project: To integrate spine-godot into your project:
1. Follow the [instructions on how to compilation of Godot](https://docs.godotengine.org/en/stable/development/compiling/index.html) 1. Follow the [instructions on how to compilation of Godot](https://docs.godotengine.org/en/stable/development/compiling/index.html)
2. Copy the `spine-runtimes/spine-godot` folder into the folder `modules/spine-godot` in your Godot source tree. 2. Copy the `spine-runtimes/spine-godot/spine_godot` folder into the folder `modules/spine_godot` in your Godot source tree.
3. Copy the `spine-cpp/spine-cpp`folder into the folder `modules/spine-godot/spine-cpp` in your Godot source tree. 3. Copy the `spine-cpp/spine-cpp`folder into the folder `modules/spine_godot/spine-cpp` in your Godot source tree.
4. Compile Godot via scons for your platform as per the Godot documentation. 4. Compile Godot via scons for your platform as per the Godot documentation.
The resulting Godot engine binary will include the spine-godot runtime. The resulting Godot engine binary will include the spine-godot runtime.

View File

@ -90,7 +90,7 @@ bool SpineAnimation::has_timeline(Array ids) {
list.setSize(ids.size(), 0); list.setSize(ids.size(), 0);
for (size_t i = 0; i < list.size(); ++i) { for (size_t i = 0; i < list.size(); ++i) {
list[i] = ids[i]; list[i] = (int64_t) ids[i];
} }
return animation->hasTimeline(list); return animation->hasTimeline(list);
} }

View File

@ -95,7 +95,7 @@ Ref<SpineTrackEntry> SpineAnimationState::set_animation(const String &anim_name,
auto skeleton_data = anim_state_data_res->get_skeleton(); auto skeleton_data = anim_state_data_res->get_skeleton();
auto anim = skeleton_data->find_animation(anim_name); auto anim = skeleton_data->find_animation(anim_name);
if (!anim.is_valid() || anim->get_spine_object() == NULL) { if (!anim.is_valid() || anim->get_spine_object() == NULL) {
ERR_PRINT(String("Can not find animation: ") + anim_name) ERR_PRINT(String("Can not find animation: ") + anim_name);
return NULL; return NULL;
} }
auto entry = animation_state->setAnimation(track, anim->get_spine_object(), loop); auto entry = animation_state->setAnimation(track, anim->get_spine_object(), loop);
@ -108,7 +108,7 @@ Ref<SpineTrackEntry> SpineAnimationState::add_animation(const String &anim_name,
auto skeleton_data = anim_state_data_res->get_skeleton(); auto skeleton_data = anim_state_data_res->get_skeleton();
auto anim = skeleton_data->find_animation(anim_name); auto anim = skeleton_data->find_animation(anim_name);
if (!anim.is_valid() || anim->get_spine_object() == NULL) { if (!anim.is_valid() || anim->get_spine_object() == NULL) {
ERR_PRINT(String("Can not find animation: ") + anim_name) ERR_PRINT(String("Can not find animation: ") + anim_name);
return NULL; return NULL;
} }
auto entry = animation_state->addAnimation(track, anim->get_spine_object(), loop, delay); auto entry = animation_state->addAnimation(track, anim->get_spine_object(), loop, delay);

View File

@ -92,7 +92,7 @@ Array SpineTimeline::getPropertyIds() {
res.resize(ids.size()); res.resize(ids.size());
for (size_t i = 0; i < res.size(); ++i) { for (size_t i = 0; i < res.size(); ++i) {
res[i] = ids[i]; res[i] = (int64_t) ids[i];
} }
return res; return res;