[godot] Fix compatibility with Godot 3.6, make it default build for 3.x. Closes #2647

This commit is contained in:
Mario Zechner 2024-10-01 13:45:32 +02:00
parent aa932c6507
commit c58d4c7522
5 changed files with 20 additions and 4 deletions

View File

@ -12,8 +12,8 @@ env:
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_EC2_METADATA_DISABLED: true AWS_EC2_METADATA_DISABLED: true
EM_VERSION: 3.1.14 EM_VERSION: 3.1.14
GODOT_TAG: 3.5.3-stable GODOT_TAG: 3.6-stable
GODOT_VERSION: 3.5.3.stable GODOT_VERSION: 3.6.stable
jobs: jobs:
godot-editor-windows: godot-editor-windows:

View File

@ -257,7 +257,11 @@ Error SpineAtlasResource::copy_from(const Ref<Resource> &p_resource) {
#if VERSION_MAJOR > 3 #if VERSION_MAJOR > 3
RES SpineAtlasResourceFormatLoader::load(const String &path, const String &original_path, Error *error, bool use_sub_threads, float *progress, CacheMode cache_mode) { RES SpineAtlasResourceFormatLoader::load(const String &path, const String &original_path, Error *error, bool use_sub_threads, float *progress, CacheMode cache_mode) {
#else #else
#if VERSION_MINOR > 5
RES SpineAtlasResourceFormatLoader::load(const String &path, const String &original_path, Error *error, bool p_no_subresource_cache) {
#else
RES SpineAtlasResourceFormatLoader::load(const String &path, const String &original_path, Error *error) { RES SpineAtlasResourceFormatLoader::load(const String &path, const String &original_path, Error *error) {
#endif
#endif #endif
Ref<SpineAtlasResource> atlas = memnew(SpineAtlasResource); Ref<SpineAtlasResource> atlas = memnew(SpineAtlasResource);
atlas->load_from_file(path); atlas->load_from_file(path);

View File

@ -91,8 +91,12 @@ class SpineAtlasResourceFormatLoader : public ResourceFormatLoader {
public: public:
#if VERSION_MAJOR > 3 #if VERSION_MAJOR > 3
RES load(const String &path, const String &original_path, Error *error, bool use_sub_threads, float *progress, CacheMode cache_mode) override; RES load(const String &path, const String &original_path, Error *error, bool use_sub_threads, float *progress, CacheMode cache_mode) override;
#else
#if VERSION_MINOR > 5
RES load(const String &path, const String &original_path, Error *error, bool no_subresource_cache = false) override;
#else #else
RES load(const String &path, const String &original_path, Error *error) override; RES load(const String &path, const String &original_path, Error *error) override;
#endif
#endif #endif
void get_recognized_extensions(List<String> *extensions) const override; void get_recognized_extensions(List<String> *extensions) const override;

View File

@ -177,7 +177,11 @@ Error SpineSkeletonFileResource::copy_from(const Ref<Resource> &p_resource) {
#if VERSION_MAJOR > 3 #if VERSION_MAJOR > 3
RES SpineSkeletonFileResourceFormatLoader::load(const String &path, const String &original_path, Error *error, bool use_sub_threads, float *progress, CacheMode cache_mode) { RES SpineSkeletonFileResourceFormatLoader::load(const String &path, const String &original_path, Error *error, bool use_sub_threads, float *progress, CacheMode cache_mode) {
#else #else
#if MINOR_VERSION > 5
RES SpineSkeletonFileResourceFormatLoader::load(const String &path, const String &original_path, Error *error, bool no_subresource_cache) {
#else
RES SpineSkeletonFileResourceFormatLoader::load(const String &path, const String &original_path, Error *error) { RES SpineSkeletonFileResourceFormatLoader::load(const String &path, const String &original_path, Error *error) {
#endif
#endif #endif
Ref<SpineSkeletonFileResource> skeleton_file = memnew(SpineSkeletonFileResource); Ref<SpineSkeletonFileResource> skeleton_file = memnew(SpineSkeletonFileResource);
skeleton_file->load_from_file(path); skeleton_file->load_from_file(path);

View File

@ -65,7 +65,11 @@ public:
#if VERSION_MAJOR > 3 #if VERSION_MAJOR > 3
RES load(const String &path, const String &original_path, Error *error, bool use_sub_threads, float *progress, CacheMode cache_mode); RES load(const String &path, const String &original_path, Error *error, bool use_sub_threads, float *progress, CacheMode cache_mode);
#else #else
RES load(const String &path, const String &original_path, Error *error) override; #if VERSION_MINOR > 5
RES load(const String &path, const String &original_path, Error *error, bool no_subresource_cache = false);
#else
RES load(const String &path, const String &original_path, Error *error);
#endif
#endif #endif
void get_recognized_extensions(List<String> *extensions) const override; void get_recognized_extensions(List<String> *extensions) const override;
@ -82,7 +86,7 @@ public:
#if VERSION_MAJOR > 3 #if VERSION_MAJOR > 3
Error save(const RES &resource, const String &path, uint32_t flags) override; Error save(const RES &resource, const String &path, uint32_t flags) override;
#else #else
Error save(const String &path, const RES &resource, uint32_t flags) override; Error save(const String &path, const RES &resource, uint32_t flags);
#endif #endif
void get_recognized_extensions(const RES &resource, List<String> *p_extensions) const override; void get_recognized_extensions(const RES &resource, List<String> *p_extensions) const override;