forked from mirror/openmw-tes3mp
Don't right-shift signed integers which is implementation-defined
This commit is contained in:
parent
4b88ef5891
commit
ef7e0070a6
3 changed files with 3 additions and 3 deletions
|
@ -340,7 +340,7 @@ namespace MWGui
|
||||||
{
|
{
|
||||||
if (attr.find("color") != attr.end())
|
if (attr.find("color") != attr.end())
|
||||||
{
|
{
|
||||||
int color;
|
unsigned int color;
|
||||||
std::stringstream ss;
|
std::stringstream ss;
|
||||||
ss << attr.at("color");
|
ss << attr.at("color");
|
||||||
ss >> std::hex >> color;
|
ss >> std::hex >> color;
|
||||||
|
|
|
@ -336,7 +336,7 @@ void Animation::addExtraLight(Ogre::SceneManager *sceneMgr, NifOgre::ObjectScene
|
||||||
{
|
{
|
||||||
const MWWorld::Fallback *fallback = MWBase::Environment::get().getWorld()->getFallback();
|
const MWWorld::Fallback *fallback = MWBase::Environment::get().getWorld()->getFallback();
|
||||||
|
|
||||||
const int clr = light->mData.mColor;
|
const unsigned int clr = light->mData.mColor;
|
||||||
Ogre::ColourValue color(((clr >> 0) & 0xFF) / 255.0f,
|
Ogre::ColourValue color(((clr >> 0) & 0xFF) / 255.0f,
|
||||||
((clr >> 8) & 0xFF) / 255.0f,
|
((clr >> 8) & 0xFF) / 255.0f,
|
||||||
((clr >> 16) & 0xFF) / 255.0f);
|
((clr >> 16) & 0xFF) / 255.0f);
|
||||||
|
|
|
@ -37,7 +37,7 @@ struct Light
|
||||||
int mValue;
|
int mValue;
|
||||||
int mTime; // Duration
|
int mTime; // Duration
|
||||||
int mRadius;
|
int mRadius;
|
||||||
int mColor; // 4-byte rgba value
|
unsigned int mColor; // 4-byte rgba value
|
||||||
int mFlags;
|
int mFlags;
|
||||||
}; // Size = 24 bytes
|
}; // Size = 24 bytes
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue