@@ -117,8 +117,8 @@ bool CClient2DFXManager::Set2DFXProperties(C2DEffectSAInterface* effect, const e
117
117
light.offsetZ = static_cast <std::int8_t >(std::get<float >(*offsetZ));
118
118
119
119
auto * color = MapFind (effectData, " color" );
120
- int colorValue = static_cast <int >(std::get<float >(*color));
121
- light.color = RwColor{static_cast <std::uint8_t >((colorValue >> 0 ) & mask (8 )), static_cast <std::uint8_t >((colorValue >> 8 ) & mask (8 )), static_cast <std::uint8_t >((colorValue >> 16 ) & mask (8 )), static_cast <std::uint8_t >((colorValue >> 24 ) & mask (8 ))};
120
+ unsigned long colorValue = static_cast <unsigned long >(std::get<float >(*color));
121
+ light.color = RwColor{static_cast <std::uint8_t >((colorValue >> 16 ) & mask (8 )), static_cast <std::uint8_t >((colorValue >> 8 ) & mask (8 )), static_cast <std::uint8_t >((colorValue >> 0 ) & mask (8 )), static_cast <std::uint8_t >((colorValue >> 24 ) & mask (8 ))};
122
122
123
123
auto * coronaTexture = MapFind (effectData, " coronaName" );
124
124
auto * shadowTexture = MapFind (effectData, " shadowName" );
@@ -416,8 +416,8 @@ bool CClient2DFXManager::Set2DFXProperty(C2DEffectSAInterface* effect, const e2d
416
416
{
417
417
if (std::holds_alternative<float >(propertyValue))
418
418
{
419
- int colorValue = static_cast <int >(std::get<float >(propertyValue));
420
- light.color = RwColor{static_cast <std::uint8_t >((colorValue >> 0 ) & mask (8 )), static_cast <std::uint8_t >((colorValue >> 8 ) & mask (8 )), static_cast <std::uint8_t >((colorValue >> 16 ) & mask (8 )), static_cast <std::uint8_t >((colorValue >> 24 ) & mask (8 ))};
419
+ unsigned long colorValue = static_cast <unsigned long >(std::get<float >(propertyValue));
420
+ light.color = RwColor{static_cast <std::uint8_t >((colorValue >> 16 ) & mask (8 )), static_cast <std::uint8_t >((colorValue >> 8 ) & mask (8 )), static_cast <std::uint8_t >((colorValue >> 0 ) & mask (8 )), static_cast <std::uint8_t >((colorValue >> 24 ) & mask (8 ))};
421
421
422
422
return true ;
423
423
}
0 commit comments