[godot] Fix compilation errors on Clang.

This commit is contained in:
Mario Zechner 2022-04-12 20:43:42 +02:00
parent 0dde81eaea
commit 0bd1fe7aac
5 changed files with 8 additions and 8 deletions

View File

@ -32,7 +32,7 @@
#include "SpineConstant.h"
#include "core/reference.h"
#include <spine/spine.h>
#include <spine/Animation.h>
class SpineEvent;
class SpineSkeleton;

View File

@ -70,8 +70,8 @@ public:
if (error != OK) {
ERR_PRINT(vformat("Can't load texture: \"%s\"", String(path.buffer())));
auto renderer_object = memnew(SpineRendererObject);
renderer_object->texture = nullptr;
renderer_object->normal_map = nullptr;
renderer_object->texture = Ref<Texture>(nullptr);
renderer_object->normal_map = Ref<Texture>(nullptr);
page.setRendererObject((void *) renderer_object);
return;
}
@ -79,7 +79,7 @@ public:
textures->append(texture);
auto renderer_object = memnew(SpineRendererObject);
renderer_object->texture = texture;
renderer_object->normal_map = nullptr;
renderer_object->normal_map = Ref<Texture>(nullptr);
String temp_path = fixed_path;
String new_path = vformat("%s/%s_%s", temp_path.get_base_dir(), normal_map_prefix, temp_path.get_file());

View File

@ -30,14 +30,11 @@
#ifndef GODOT_SPINEATLASRESOURCE_H
#define GODOT_SPINEATLASRESOURCE_H
#include <spine/Atlas.h>
#include "core/io/resource_loader.h"
#include "core/io/resource_saver.h"
#include "core/io/image_loader.h"
#include <spine/Atlas.h>
class spine::Atlas;
class GodotSpineTextureLoader;
class SpineAtlasResource : public Resource {

View File

@ -31,6 +31,8 @@
#define GODOT_SPINEEVENT_H
#include "SpineEventData.h"
#include "core/reference.h"
#include <spine/Event.h>
class SpineEvent : public Reference {
GDCLASS(SpineEvent, Reference)

View File

@ -31,6 +31,7 @@
#define GODOT_SPINEIKCONSTRAINT_H
#include "SpineIkConstraintData.h"
#include <spine/IkConstraint.h>
class SpineBone;