Browse Source

NDK wouldn't compile unless some type casts in AnimationState.c and Skeleton.c were explicitly declared (#813)

caiocsabino 8 years ago
parent
commit
0b74269207

+ 1 - 1
spine-c/spine-c/src/spine/AnimationState.c

@@ -142,7 +142,7 @@ void _spEventQueue_drain (_spEventQueue* self) {
 	if (self->drainDisabled) return;
 	if (self->drainDisabled) return;
 	self->drainDisabled = 1;
 	self->drainDisabled = 1;
 	for (i = 0; i < self->objectsCount; i += 2) {
 	for (i = 0; i < self->objectsCount; i += 2) {
-		spEventType type = self->objects[i].type;
+		spEventType type = (spEventType)self->objects[i].type;
 		spTrackEntry* entry = self->objects[i+1].entry;
 		spTrackEntry* entry = self->objects[i+1].entry;
 		spEvent* event;
 		spEvent* event;
 		switch (type) {
 		switch (type) {

+ 2 - 2
spine-c/spine-c/src/spine/Skeleton.c

@@ -161,7 +161,7 @@ static void _addToUpdateCache(_spSkeleton* const internal, _spUpdateType type, v
 	_spUpdate* update;
 	_spUpdate* update;
 	if (internal->updateCacheCount == internal->updateCacheCapacity) {
 	if (internal->updateCacheCount == internal->updateCacheCapacity) {
 		internal->updateCacheCapacity *= 2;
 		internal->updateCacheCapacity *= 2;
-		internal->updateCache = realloc(internal->updateCache, sizeof(_spUpdate) * internal->updateCacheCapacity);
+		internal->updateCache = (_spUpdate*)realloc(internal->updateCache, sizeof(_spUpdate) * internal->updateCacheCapacity);
 	}
 	}
 	update = internal->updateCache + internal->updateCacheCount;
 	update = internal->updateCache + internal->updateCacheCount;
 	update->type = type;
 	update->type = type;
@@ -172,7 +172,7 @@ static void _addToUpdateCache(_spSkeleton* const internal, _spUpdateType type, v
 static void _addToUpdateCacheReset(_spSkeleton* const internal, spBone* bone) {
 static void _addToUpdateCacheReset(_spSkeleton* const internal, spBone* bone) {
 	if (internal->updateCacheResetCount == internal->updateCacheResetCapacity) {
 	if (internal->updateCacheResetCount == internal->updateCacheResetCapacity) {
 		internal->updateCacheResetCapacity *= 2;
 		internal->updateCacheResetCapacity *= 2;
-		internal->updateCacheReset = realloc(internal->updateCacheReset, sizeof(spBone*) * internal->updateCacheResetCapacity);
+		internal->updateCacheReset = (spBone**)realloc(internal->updateCacheReset, sizeof(spBone*) * internal->updateCacheResetCapacity);
 	}
 	}
 	internal->updateCacheReset[internal->updateCacheResetCount] = bone;
 	internal->updateCacheReset[internal->updateCacheResetCount] = bone;
 	++internal->updateCacheResetCount;
 	++internal->updateCacheResetCount;