Open dimiro1 opened 7 years ago
Unfortunately right now you can indeed only setup the duration for the whole animation. I need to improve the resource form (using XML probably) to allow that or at least add kind of array support for that specific parameter. What you can eventually in the meantime try is to modify the generated .s file from rescomp (using hand compilation) so you change change duration for each frame but as soon you will modify your resource, the makefile will regenerate the .s file so that is a really convenient solution :-/ A proper Sprite editor with proper XML format would be the solution... I keep the issue open in the meantime...
Thanks for your reply.
For the "array" parameter I am thinking in something like this:
SPRITE mysprite_sprite "sprites/mysprite.png" 6 6 0 "5,5,1|8,5,5" NONE
What do you think?
I would probably do something as usual array format in programming language : [[5,5,1][8,5,5]] without any space obviously as space are used to separate parameters ;)
Do you want to keep retro compatibility? I can see two approaches:
What do you think?
Of course i want to keep retro compatibility :) If i detect '[' first character then i assume an array otherwise an assume a single value
@Stephane-D Thanks, I am not familiar with the codebase and I am working on OSX, but, I will try to implement it.
Oh you plan to do the code change by yourself ? that would be really handy ! thanks !
I hope to open the PR soon. :)
Cool :) One suggestion about it : if the array does not match the number of expected row/column or is malformed, you may just display a warning about it and use the valid value found for remaining frames.
I look at the issue from 2017 year ))) We solved the problem in other way. In the game code.
I just want to remind that there is also unused anim->loop in SGDK sprite struct
I mean it is not possible to define it via RESCOMP params, yet.
I look at the issue from 2017 year ))) We solved the problem in other way. In the game code.
I just want to remind that there is also unused anim->loop in SGDK sprite struct
I mean it is not possible to define it via RESCOMP params, yet.
Yeah I realized I had this information not properly used (It could even be used to avoid loop afaik). Need to change that too but the SPRITE resource declaration is already overwhelmed by parameters, I definitely need to update the resource declaration format (for something as JSON for instance)
Is it possible set the duration of a single sprite animation with the rescomp utility?
As I am understanding, now, it is possible to set only a single time value: