mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-02-04 06:14:53 +08:00
[cpp] Fix dark color parsing for skeleton binary files.
This commit is contained in:
parent
3fc55df04d
commit
f8406e81c0
@ -23,6 +23,10 @@ else()
|
||||
endif()
|
||||
|
||||
if((${SPINE_SFML}) OR (${CMAKE_CURRENT_BINARY_DIR} MATCHES "spine-sfml"))
|
||||
if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
|
||||
set(CMAKE_OSX_ARCHITECTURES x86_64)
|
||||
set(ONLY_ACTIVE_ARCH NO)
|
||||
endif()
|
||||
add_subdirectory(spine-c)
|
||||
add_subdirectory(spine-sfml/c)
|
||||
add_subdirectory(spine-cpp)
|
||||
|
||||
@ -169,10 +169,10 @@ SkeletonData *SkeletonBinary::readSkeletonData(const unsigned char *binary, cons
|
||||
SlotData *slotData = new (__FILE__, __LINE__) SlotData(i, String(slotName, true), *boneData);
|
||||
|
||||
readColor(input, slotData->getColor());
|
||||
unsigned char a = readByte(input);
|
||||
unsigned char r = readByte(input);
|
||||
unsigned char g = readByte(input);
|
||||
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, 1);
|
||||
slotData->setHasDarkColor(true);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user