mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-03-26 22:49:01 +08:00
[csharp] Fix reading dark color from binary.
This commit is contained in:
parent
6fdded7bf8
commit
3697e431ee
@ -184,12 +184,12 @@ namespace Spine {
|
|||||||
slotData.b = ((color & 0x0000ff00) >> 8) / 255f;
|
slotData.b = ((color & 0x0000ff00) >> 8) / 255f;
|
||||||
slotData.a = ((color & 0x000000ff)) / 255f;
|
slotData.a = ((color & 0x000000ff)) / 255f;
|
||||||
|
|
||||||
int darkColor = ReadInt(input);
|
int darkColor = ReadInt(input); // 0x00rrggbb
|
||||||
if (darkColor != -1) {
|
if (darkColor != -1) {
|
||||||
slotData.hasSecondColor = true;
|
slotData.hasSecondColor = true;
|
||||||
slotData.r2 = ((darkColor & 0xff000000) >> 24) / 255f;
|
slotData.r2 = ((darkColor & 0x00ff0000) >> 16) / 255f;
|
||||||
slotData.g2 = ((darkColor & 0x00ff0000) >> 16) / 255f;
|
slotData.g2 = ((darkColor & 0x0000ff00) >> 8) / 255f;
|
||||||
slotData.b2 = ((darkColor & 0x0000ff00) >> 8) / 255f;
|
slotData.b2 = ((darkColor & 0x000000ff)) / 255f;
|
||||||
}
|
}
|
||||||
|
|
||||||
slotData.attachmentName = ReadString(input);
|
slotData.attachmentName = ReadString(input);
|
||||||
@ -561,10 +561,10 @@ namespace Spine {
|
|||||||
float g = ((color & 0x00ff0000) >> 16) / 255f;
|
float g = ((color & 0x00ff0000) >> 16) / 255f;
|
||||||
float b = ((color & 0x0000ff00) >> 8) / 255f;
|
float b = ((color & 0x0000ff00) >> 8) / 255f;
|
||||||
float a = ((color & 0x000000ff)) / 255f;
|
float a = ((color & 0x000000ff)) / 255f;
|
||||||
int color2 = ReadInt(input);
|
int color2 = ReadInt(input); // 0x00rrggbb
|
||||||
float r2 = ((color2 & 0xff000000) >> 24) / 255f;
|
float r2 = ((color2 & 0x00ff0000) >> 16) / 255f;
|
||||||
float g2 = ((color2 & 0x00ff0000) >> 16) / 255f;
|
float g2 = ((color2 & 0x0000ff00) >> 8) / 255f;
|
||||||
float b2 = ((color2 & 0x0000ff00) >> 8) / 255f;
|
float b2 = ((color2 & 0x000000ff)) / 255f;
|
||||||
|
|
||||||
timeline.SetFrame(frameIndex, time, r, g, b, a, r2, g2, b2);
|
timeline.SetFrame(frameIndex, time, r, g, b, a, r2, g2, b2);
|
||||||
if (frameIndex < frameCount - 1) ReadCurve(input, frameIndex, timeline);
|
if (frameIndex < frameCount - 1) ReadCurve(input, frameIndex, timeline);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user