400 Commits

Author SHA1 Message Date
Nathan Sweet
5abfbe1200 Merge pull request #321 from ubiyf/master
Fix Bug : Can not build android apk, if not set char* as const.
2014-11-14 00:06:22 +01:00
Nathan Sweet
9a7dca6230 Merge pull request #323 from wangjian1009/master
load flipX flipY from json
2014-11-14 00:05:54 +01:00
NathanSweet
322d8ed0ab Fixed first flip key not being applied. 2014-11-11 17:42:19 +01:00
beik
69fe56b329 load flipX flipY from json 2014-11-10 11:52:57 +08:00
ubiyf
879ae91c25 Fix Bug : Can not build android apk, if not set char* as const
Can not build android apk, if not set char* as const
2014-11-07 15:39:54 +08:00
jpoag
b7868c0f73 [Spine-C] retain hash and version strings 2014-10-26 12:58:48 -04:00
jpoag
eb1e303017 [Spine-C] retain hash and version strings 2014-10-26 12:49:26 -04:00
Nathan Sweet
4a242cd966 Update README.md 2014-10-14 00:37:18 +02:00
NathanSweet
1323770033 Fixed ANSI C compilation. 2014-10-06 14:01:32 +02:00
NathanSweet
22b2086f39 Flip for bones. Flip timelines now affect bones. "draworder" in JSON -> "drawOrder".
Falls back to "draworder" to not break existing JSON (for the time being).
2014-10-04 13:01:52 +02:00
NathanSweet
6ce7a62245 spine-c, added flip timelines. 2014-10-02 18:46:31 +02:00
NathanSweet
6f0343d183 Fixed long->int warnings. 2014-10-01 17:03:13 +02:00
NathanSweet
53437a6159 Fixed FfdTimeline for spine-c. 2014-10-01 01:31:52 +02:00
pinguin999
7f6d91f90a strict compile
init the struct before use
2014-09-29 15:11:31 +02:00
pinguin999
a5131d287f Merge remote-tracking branch 'upstream/master' 2014-09-29 13:41:42 +02:00
Guilherme A. David
113940e2c8 Makefile(Linux and MingW support) for spine-c, options are (debug-dynamic, release-dynamic and release-static) 2014-09-27 08:34:42 -03:00
NathanSweet
e5d3d380c7 Fixed AttachmentTimeline from missing first key.
http://esotericsoftware.com/forum/viewtopic.php?p=16600#p16600
2014-09-27 01:02:57 +02:00
pinguin999
92c8dcea13 FIX struct definition 2014-09-25 19:00:57 +02:00
NathanSweet
3ed7fb6865 Changed how scale is applied.
Scale is now multiplicative, as it was intended to be.
http://esotericsoftware.com/forum/viewtopic.php?p=16259#p16259
This change means skeletons need to be exported again using Spine 2.0.00+.
2014-09-24 16:14:42 +02:00
NathanSweet
37f332d149 Fixed IK constraint bend direction keys. 2014-09-24 15:37:12 +02:00
NathanSweet
3c7a83d95c Set attachmentVerticesCount to zero. 2014-09-23 20:18:14 +02:00
Eric Zhong
4a205a65f6 Update Animation.c
fix object size when copy slot datas.
2014-09-15 22:34:27 +08:00
NathanSweet
337b55005d Fixed flipping. 2014-09-02 17:17:45 +02:00
NathanSweet
ecab41ab8b Fixed bend direction for IK keys. 2014-09-02 13:02:15 +02:00
Nathan Sweet
5797d5a46d Merge pull request #277 from jpoag/master
* [SPINE-C] fix mem leak
2014-09-01 21:26:45 +02:00
NathanSweet
0c3e74123e Fixed loading IK keys. 2014-09-01 16:14:27 +02:00
jpoag
60fc7ac56e * [SPINE-C] fix mem leak 2014-09-01 09:48:08 -04:00
NathanSweet
b327a803e0 C89 fixes. 2014-08-31 16:21:52 +02:00
NathanSweet
593956b51d Added IK, refactoring.
Skeleton moved from Slot to Bone.
Attachments no longer take x,y to compute vertices.
Bezier curves are calculated up front.
2014-08-31 15:24:36 +02:00
NathanSweet
bdd90b6854 Formatting. 2014-08-30 20:43:53 +02:00
NathanSweet
bdace991a8 Removed unused local. 2014-07-25 22:09:50 +02:00
Leander Hasty
1135bf8a3c Json parser optimizations for spine-c.
Various optimizations for Json.c and Json.h.

parse_value uses a switch on starting character and avoids three strncmp
calls in many cases.

parse_number dispatches to strtod (C89) or strtof (C99), which is a
slightly more permissive superset of JSON's RFC4627 number parsing, but
is also quite a bit faster.   More explicit error handling added here
too.

(The parse_value and parse_number changes alone made for a ~1.5x speedup
on our tiny ARM926 platform using uclibc 0.9.30 and gcc 4.3.3.)

Use _stricmp or strcasecmp in Json_strcasecmp.  This one has a tricky
#include issue; it's in <strings.h> in some systems and <string.h> in
others.  Defining _DEFAULT_SOURCE and/or _BSD_SOURCE pulls it into
<string.h> in all of the systems we could find.  This is a noticeable
win, but less than parse_value or parse_number.

Elide NULL checks in almost all functions, insert one during
Json_create.  Everywhere else, the code already explicitly checks and
returns.  skip() keeps a NULL check but pushes it outside the loop, so
we only check it on entry to the method.

Also elide some redundant starting character checks for parse_object
('{') and parse_array ('[') since they're only called from parse_value
and we know the character is correct.  There's an opportunity to do this
also for parse_string, but it's a bit more complicated as it's called
from parse_object as well as parse_value.

For all these elided checks, allow them to reappear if SPINE_JSON_DEBUG
is defined and nonzero.

Spine doesn't use the "prev" field ever, so drop it entirely from the
Json structure unless someone defines SPINE_JSON_HAVE_PREV non-zero.

Pull some of the assignments out of conditionals to placate some of the
higher-warning-level compilers.

A few TODO comments left near some of the other speedup opportunities,
as well as one existing place that might need additional error handling.

(Tested on various x86 and ARM gcc versions, Xcode 5.x series, Visual
Studio 2010 SP1, ARMCC 5.04, and MWCCARM 4.0.  Holler if this should be
decomposed into a patch series, if there are any suggestions or idiom
changes, or a different submission method we should be using.)
2014-06-20 11:46:40 -04:00
NathanSweet
7f6abc8c00 Fixed mixing from uninitialized slot vertices.
http://esotericsoftware.com/forum/viewtopic.php?f=9&t=2775
2014-06-03 18:37:42 +02:00
NathanSweet
cf41610f8a Minor fixes. 2014-05-23 10:46:26 +02:00
NathanSweet
01c0e1881f Minor changes. 2014-05-21 22:28:50 +02:00
NathanSweet
cff77e7dea Fixed double free. 2014-05-21 10:11:57 +02:00
NathanSweet
a62b1ff0f2 Warning. 2014-05-18 21:51:42 +02:00
NathanSweet
066fa3dcae Fixed TrackEntry leak. 2014-05-17 23:21:22 +02:00
NathanSweet
2e266127a0 Carry over remaining time when playing queued animations.
http://esotericsoftware.com/forum/viewtopic.php?f=7&t=2633
2014-05-15 20:11:09 +02:00
NathanSweet
72a4ad4cc1 Minor refactoring. 2014-05-14 21:49:15 +02:00
NathanSweet
f869e93546 spine-c Eclipse project builds lib instead of exe, spine-sfml uses static libs. 2014-05-12 22:57:30 +02:00
NathanSweet
36809166a2 Make AnimationState TrackEntry create/dispose functions optional.
closes #218
2014-05-12 17:12:24 +02:00
NathanSweet
7199d22417 Better AnimationState listeners, including on a TrackEntry. 2014-05-11 21:00:50 +02:00
NathanSweet
cd7538d6a1 Fixed memory leak when track is cleared while mixing from a previous animation. 2014-05-11 20:42:48 +02:00
NathanSweet
3370501317 Rename AnimationState context to rendererObject to match all other void*. 2014-05-11 16:33:24 +02:00
NathanSweet
496466a1cc Hull length is no longer nonessential. 2014-05-10 15:33:00 +02:00
NathanSweet
77d7bf83fb Fixed small memory leak. 2014-05-08 19:26:34 +02:00
NathanSweet
5848973f0b Hull length is int. 2014-05-08 17:38:31 +02:00
jpoag
ff07eb02d8 * Allow memory tracking inside spine 2014-05-08 10:49:46 -04:00
NathanSweet
0a275f0ac7 Added includes to spine.h.
closes #214
2014-05-07 15:03:10 +02:00