mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-02-06 07:14:55 +08:00
[cpp] Cleaned up parsing of dark slot colors. See #1090
This commit is contained in:
parent
4c104ef885
commit
b40eb593c9
@ -176,7 +176,7 @@ SkeletonData *SkeletonBinary::readSkeletonData(const unsigned char *binary, cons
|
||||
unsigned char b = readByte(input);
|
||||
unsigned char a = readByte(input);
|
||||
if (!(r == 0xff && g == 0xff && b == 0xff && a == 0xff)) {
|
||||
slotData->getDarkColor().set(r / 255.0f, g / 255.0f, b / 255.0f, 0);
|
||||
slotData->getDarkColor().set(r / 255.0f, g / 255.0f, b / 255.0f, 1);
|
||||
slotData->setHasDarkColor(true);
|
||||
}
|
||||
slotData->_attachmentName.own(readString(input));
|
||||
|
||||
@ -223,7 +223,7 @@ SkeletonData *SkeletonJson::readSkeletonData(const char *json) {
|
||||
darkColor.r = toColor(dark, 0);
|
||||
darkColor.g = toColor(dark, 1);
|
||||
darkColor.b = toColor(dark, 2);
|
||||
darkColor.a = toColor(dark, 3);
|
||||
darkColor.a = 1;
|
||||
data->setHasDarkColor(true);
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user