mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-03-23 01:21:39 +00:00
Don't right-shift signed integers which is implementation-defined
This commit is contained in:
parent
4b88ef5891
commit
ef7e0070a6
@ -340,7 +340,7 @@ namespace MWGui
|
||||
{
|
||||
if (attr.find("color") != attr.end())
|
||||
{
|
||||
int color;
|
||||
unsigned int color;
|
||||
std::stringstream ss;
|
||||
ss << attr.at("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 int clr = light->mData.mColor;
|
||||
const unsigned int clr = light->mData.mColor;
|
||||
Ogre::ColourValue color(((clr >> 0) & 0xFF) / 255.0f,
|
||||
((clr >> 8) & 0xFF) / 255.0f,
|
||||
((clr >> 16) & 0xFF) / 255.0f);
|
||||
|
@ -37,7 +37,7 @@ struct Light
|
||||
int mValue;
|
||||
int mTime; // Duration
|
||||
int mRadius;
|
||||
int mColor; // 4-byte rgba value
|
||||
unsigned int mColor; // 4-byte rgba value
|
||||
int mFlags;
|
||||
}; // Size = 24 bytes
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user