[cocos2dx] Fixes #1229, tint black calculation was incorrect.

This commit is contained in:
badlogic 2018-12-17 14:55:45 +01:00
parent 044f0a764f
commit a4a36d81a3

View File

@ -405,13 +405,13 @@ namespace spine {
} }
float multiplier = _premultipliedAlpha ? alpha : 255; float multiplier = _premultipliedAlpha ? alpha : 255;
float red = nodeColor.r * _skeleton->color.r * slot->color.r * multiplier; float red = nodeColor.r * _skeleton->color.r * color.r * multiplier;
float green = nodeColor.g * _skeleton->color.g * slot->color.g * multiplier; float green = nodeColor.g * _skeleton->color.g * color.g * multiplier;
float blue = nodeColor.b * _skeleton->color.b * slot->color.b * multiplier; float blue = nodeColor.b * _skeleton->color.b * color.b * multiplier;
color.r = red * color.r; color.r = red * slot->color.r;
color.g = green * color.g; color.g = green * slot->color.g;
color.b = blue * color.b; color.b = blue * slot->color.b;
color.a = alpha; color.a = alpha;
if (slot->darkColor) { if (slot->darkColor) {