Jump to content


  • Posts

  • Joined

  • Last visited

Recent Profile Visitors

792 profile views

DarkGOd's Achievements


Newbie (1/14)



  1. Hum no, if I superload setTriggerCount like that : void TE4SpriterTriggerObjectInfo::setTriggerCount(int newTriggerCount) { TriggerObjectInfo::setTriggerCount(newTriggerCount); if (newTriggerCount) playTrigger(); } Then it means that playTrigger is automatically called by the spriterengine code when the event actually triggers; effectively making it a callback (which is what I desire) and thus removing any additional need for a polling by checking every triggers in existence for a count > 0
  2. Ah I see yes. I do have my own TiggerObjectInfo. I never care for playTrigger being called without a count > 0 so overloading setTriggerCount on it to call playTrigger only when count is set over 0 would work as I think it seems to ? Because calling playAllTriggers every frame seems wasteful to me edit: Oh no I cant .. triggerCount is private not protected :/
  3. Addementum: I've toyed with adding: if (triggerCount) playTrigger(); At line 19 of triggerobjectinfo.cpp; which seems the logical place to put it but I'm not familiar enough to be sure. Is that sane?
  4. One more silly question, I've made a TriggerObjectInfo class, with superloading void playTrigger() and the object factory returning it. I can see the constructor being called; but playTrigger never is. If I call playAllTriggers on my instance it fires all right nd getTriggerCount looks ok, returning mostly 0 and once in a while 1 as it should for my test. I've greped the code for playTrigger and it seems to only ever be called by playEventTriggers; thus explainig the things I see. Is that part not yet implemented or am I missing something obvious ?
  5. Ahh got it to work, I had to offset the pivot with xoff/yoff while computing it from w/h instead of aw/ah. I'll submit a pull request with atlas data. Which reminds me the scml file does not in any way reference the atlas png file; thus I always assume the name is the same as the scml but replacing the extension, is that safe?
  6. I'm updating my copy to handle the embedded atlas data from R8 (which I'll happily submit as a push request if I can get it to work ). It kind of works, but I fail to grasp was "axoff" and "ayoff" are in there. From the name I guess some offsets but .. hum I loaded GreyGuy both with and without atlas and it does not match exactly. I do assume it's an offset problem and thus linked to axoff/ayoff but I'm unsure what to make of it. Simply adding them to the position makes it go wildly off. I'm outputting to opengl thusly: In ImageFile::renderSprite, I make a quad with coords from -pivot to size-pivot; then I make a model matrix taht contains the position, scale & rotation and apply it to each vertex and render it. I account for the atlas sprite being rotated and "unrotate" it. In the attached picture you see GreyGuy in pink is the non atlas one and the one in green is the atlas one. Any ideas of what I'm probably doing stupidly wrong ?
  7. Confirmed, works on my linux now (I've had to fix 3 auto& in the example's main.cpp though); thanks!
  8. Hi! It's finally here, I'm *happy* I'm also sad to be the bearer of bad news though, but it just won't compile with anything but MSVC, at least it doesnt with neither gcc not clang; that means no OSX, no Linux, no Android, no iOS :/ Which I assume is not intended since Spriter itself is so multiplatform friendly On my linux (thought I doubt that'd be different on osx or windows) with gcc 4.9: http://hastebin.com/uroxefobis.vhdl and with clang 3.5: http://hastebin.com/favarilaha.vhdl Also my C++ is very rusty but to me it looks like it's using the rather recent C++14 stuff, which on OSX at least will make it very hard to support "oldish" versions of the system :/ That's something to ponder at least, but obviously the biggest urgency is to actually let it work on non MSVC stuff Thanks!
  9. Hi there! I've seen talks about an official generic implementation ? I assume this is C or C++ ? The existing third party one I've found has not been updated in months and fails on the GreyGuy example :/ If you need a beta tester, I'd be happy to do so. Thanks! PS: ultimately this is for integrating in my game engine
  • Create New...