rayxuln / spine-runtime-for-godot

This project is a module for godot that allows it to load/play Spine skeleton animation.
MIT License
93 stars 22 forks source link

Does not compile on latest Godot 3.X #33

Closed RhythmLunatic closed 2 years ago

RhythmLunatic commented 2 years ago

I did git clone https://github.com/godotengine/godot.git -b 3.x

Then cloned this repo and renamed the folder to spine-runtime and put it in modules.

scons platform=x11 use_llvm=yes
scons: Reading SConscript files ...

scons: *** Illegal construction variable `module_spine-runtime_enabled'
File "/media/LocalHDD/Programming/IDEs/godot-engine-src/SConstruct", line 288, in <module>
RhythmLunatic commented 2 years ago

Sorry, I see the issue. I named it spine-runtime instead of spine_runtime.

RhythmLunatic commented 2 years ago

Another problem. Compiling with Clang will also give an error.

[Initial build] Compiling ==> modules/spine_runtime/SpineAnimation.cpp
modules/spine_runtime/SpineAnimation.cpp: In member function 'Array SpineAnimation::get_timelines()':
modules/spine_runtime/SpineAnimation.cpp:54:23: warning: comparison of integer expressions of different signedness: 'size_t' {aka 'long unsigned int'} and 'int' [-Wsign-compare]
   54 |     for (size_t i=0; i<res.size(); ++i) {
      |                      ~^~~~~~~~~~~
modules/spine_runtime/SpineAnimation.cpp: In member function 'bool SpineAnimation::has_timeline(Array)':
modules/spine_runtime/SpineAnimation.cpp:68:24: error: conversion from 'Variant' to 'long long int' is ambiguous
   68 |         list[i] = ids[i];
      |                        ^
In file included from ./core/method_ptrcall.h:36,
                 from ./core/method_bind.h:35,
                 from ./core/class_db.h:34,
                 from ./core/resource.h:34,
                 from ./core/variant_parser.h:35,
                 from modules/spine_runtime/SpineAnimation.h:9,
                 from modules/spine_runtime/SpineAnimation.cpp:5:

I'm not sure what the correct type should be but I cast it to (signed long) for now