mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-30 12:32:36 +00:00
Merge branch 'everlasting_snow' into 'master'
Use meaningful names instead of pretending we don't know what snow is See merge request OpenMW/openmw!2152
This commit is contained in:
commit
809c6acc1a
@ -1184,8 +1184,8 @@ void Record<ESM::Region>::print()
|
||||
std::cout << " Thunder: " << (int)mData.mData.mThunder << std::endl;
|
||||
std::cout << " Ash: " << (int)mData.mData.mAsh << std::endl;
|
||||
std::cout << " Blight: " << (int)mData.mData.mBlight << std::endl;
|
||||
std::cout << " UnknownA: " << (int)mData.mData.mA << std::endl;
|
||||
std::cout << " UnknownB: " << (int)mData.mData.mB << std::endl;
|
||||
std::cout << " Snow: " << (int)mData.mData.mSnow << std::endl;
|
||||
std::cout << " Blizzard: " << (int)mData.mData.mBlizzard << std::endl;
|
||||
std::cout << " Map Color: " << mData.mMapColor << std::endl;
|
||||
if (!mData.mSleepList.empty())
|
||||
std::cout << " Sleep List: " << mData.mSleepList << std::endl;
|
||||
|
@ -38,7 +38,7 @@ void CSMTools::RegionCheckStage::perform (int stage, CSMDoc::Messages& messages)
|
||||
// test that chances add up to 100
|
||||
int chances = region.mData.mClear + region.mData.mCloudy + region.mData.mFoggy + region.mData.mOvercast +
|
||||
region.mData.mRain + region.mData.mThunder + region.mData.mAsh + region.mData.mBlight +
|
||||
region.mData.mA + region.mData.mB;
|
||||
region.mData.mSnow + region.mData.mBlizzard;
|
||||
if (chances != 100)
|
||||
messages.add(id, "Weather chances do not add up to 100", "", CSMDoc::Message::Severity_Error);
|
||||
|
||||
|
@ -1059,8 +1059,8 @@ namespace CSMWorld
|
||||
case 5: return region.mData.mThunder;
|
||||
case 6: return region.mData.mAsh;
|
||||
case 7: return region.mData.mBlight;
|
||||
case 8: return region.mData.mA; // Snow
|
||||
case 9: return region.mData.mB; // Blizzard
|
||||
case 8: return region.mData.mSnow;
|
||||
case 9: return region.mData.mBlizzard;
|
||||
default: break;
|
||||
}
|
||||
}
|
||||
@ -1086,8 +1086,8 @@ namespace CSMWorld
|
||||
case 5: region.mData.mThunder = chance; break;
|
||||
case 6: region.mData.mAsh = chance; break;
|
||||
case 7: region.mData.mBlight = chance; break;
|
||||
case 8: region.mData.mA = chance; break;
|
||||
case 9: region.mData.mB = chance; break;
|
||||
case 8: region.mData.mSnow = chance; break;
|
||||
case 9: region.mData.mBlizzard = chance; break;
|
||||
default: throw std::runtime_error("index out of range");
|
||||
}
|
||||
|
||||
|
@ -286,8 +286,8 @@ namespace
|
||||
mChances.push_back(region.mData.mThunder);
|
||||
mChances.push_back(region.mData.mAsh);
|
||||
mChances.push_back(region.mData.mBlight);
|
||||
mChances.push_back(region.mData.mA);
|
||||
mChances.push_back(region.mData.mB);
|
||||
mChances.push_back(region.mData.mSnow);
|
||||
mChances.push_back(region.mData.mBlizzard);
|
||||
}
|
||||
|
||||
RegionWeather::RegionWeather(const ESM::RegionWeatherState& state)
|
||||
|
@ -26,15 +26,15 @@ namespace ESM
|
||||
case fourCC("WEAT"):
|
||||
{
|
||||
esm.getSubHeader();
|
||||
// May include the additional two bytes (but not necessarily)
|
||||
// Cold weather not included before 1.3
|
||||
if (esm.getSubSize() == sizeof(mData))
|
||||
{
|
||||
esm.getT(mData);
|
||||
}
|
||||
else if (esm.getSubSize() == sizeof(mData) - 2)
|
||||
{
|
||||
mData.mA = 0;
|
||||
mData.mB = 0;
|
||||
mData.mSnow = 0;
|
||||
mData.mBlizzard = 0;
|
||||
esm.getExact(&mData, sizeof(mData) - 2);
|
||||
}
|
||||
else
|
||||
@ -105,7 +105,7 @@ namespace ESM
|
||||
{
|
||||
mRecordFlags = 0;
|
||||
mData.mClear = mData.mCloudy = mData.mFoggy = mData.mOvercast = mData.mRain =
|
||||
mData.mThunder = mData.mAsh = mData.mBlight = mData.mA = mData.mB = 0;
|
||||
mData.mThunder = mData.mAsh = mData.mBlight = mData.mSnow = mData.mBlizzard = 0;
|
||||
|
||||
mMapColor = 0;
|
||||
|
||||
|
@ -29,11 +29,7 @@ struct Region
|
||||
struct WEATstruct
|
||||
{
|
||||
// These are probabilities that add up to 100
|
||||
unsigned char mClear, mCloudy, mFoggy, mOvercast, mRain, mThunder, mAsh, mBlight,
|
||||
// Unknown weather, probably snow and something. Only
|
||||
// present in file version 1.3.
|
||||
// the engine uses mA as "snow" and mB as "blizard"
|
||||
mA, mB;
|
||||
unsigned char mClear, mCloudy, mFoggy, mOvercast, mRain, mThunder, mAsh, mBlight, mSnow, mBlizzard;
|
||||
}; // 10 bytes
|
||||
#pragma pack(pop)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user