HaxePunk / SpinePunk

HaxePunk renderer for the Haxe Spine runtime
20 stars 1 forks source link

How do i get the sample to compile? #1

Closed theRemix closed 10 years ago

theRemix commented 10 years ago

I added the 3 haxelib projects:

HaxePunk: [2.5.0]
lime: [0.9.3]
openfl: 1.1.0 1.1.1 1.2.1 [1.2.2]
spinehaxe: git [dev:/usr/lib/haxe/lib/spinehaxe/git]
spinehx: [0.2.0]
SpinePunk: git [dev:/usr/lib/haxe/lib/SpinePunk/git]

then in SpritePunk/sample/project.xml

<haxelib name="HaxePunk" />
<haxelib name="SpinePunk" />
<haxelib name="spinehx" />
<haxelib name="spinehaxe" />

i get these errors when compiling

src/MainScene.hx:48: characters 33-45 : spinehx.SkeletonData should be spinehaxe.SkeletonData
src/MainScene.hx:48: characters 33-45 : For function argument 'skeletonData'
src/MainScene.hx:64: characters 8-30 : spinehx.AnimationState should be spinehaxe.animation.AnimationState
src/MainScene.hx:65: characters 8-38 : spinehx.AnimationStateData should be spinehaxe.animation.AnimationStateData
src/MainScene.hx:90: characters 23-50 : spinehaxe.animation.AnimationState has no field getAnimation (Suggestions: setAnimation, addAnimation)
src/MainScene.hx:73: characters 8-11 : Constraint check failure for add.E
src/MainScene.hx:73: characters 8-11 : spinepunk.SpinePunk should be com.haxepunk.Entity
bendmorris commented 10 years ago

Sorry - it's a problem on my end, some changes a while back broke the sample. I'll see if I can get it working again ASAP. Thanks for reminding me.

bendmorris commented 10 years ago

Also FYI, spinehx is no longer necessary (once the sample is refactored), I now use spinehaxe which is more up to date with the official runtimes.

bendmorris commented 10 years ago

Hi @theRemix , I just rewrote the sample. Can you give it a try and make sure it's working correctly?

theRemix commented 10 years ago

Hey @bendmorris thanks! i got the sample to compile on flash and ios targets. it compiles in neko and runs, though right when it launches, before anything renders to the stage, it crashes with this error:

Invalid array access
Called from spinehaxe.SkeletonJson::readAnimation line 250
Called from spinehaxe.SkeletonJson::readSkeletonData line 167
Called from MainScene::begin line 42
Called from com.haxepunk.Engine::checkScene line 389
Called from com.haxepunk.Engine::update line 125
Called from com.haxepunk.Engine::onEnterFrame line 301
Called from flash.events.Listener::dispatchEvent line 268
Called from flash.events.EventDispatcher::dispatchEvent line 98
Called from a C function
Called from flash.display.DisplayObject::__broadcast line 171
Called from a C function
Called from flash.display.DisplayObjectContainer::__broadcast line 259
Called from flash.display.DisplayObjectContainer::__broadcast line 235
Called from flash.display.DisplayObjectContainer::__broadcast line 235
Called from flash.display.Stage::__render line 974
Called from flash.display.Stage::__checkRender line 291
Called from flash.display.Stage::__pollTimers line 959
Called from flash.display.Stage::__doProcessStageEvent line 366

i'll be testing it further, and i'll post if i find anything.

i just upgraded HaxePunk to 2.5.1 lime to 0.9.4 lime-tools to 1.2.9

and am still on spinehaxe[master] https://github.com/bendmorris/spinehaxe/commit/f7dfeb24cc386d3f857f6065651a4dc9d3b34f35