2012-09-23 22:11:08 +04:00
|
|
|
#ifndef OPENMW_ESM_REGN_H
|
|
|
|
#define OPENMW_ESM_REGN_H
|
2010-02-22 14:09:43 +01:00
|
|
|
|
2012-09-17 11:37:50 +04:00
|
|
|
#include <string>
|
|
|
|
#include <vector>
|
|
|
|
|
2012-09-23 22:41:41 +04:00
|
|
|
#include "esmcommon.hpp"
|
2010-02-22 14:09:43 +01:00
|
|
|
|
2011-04-08 17:58:21 +04:00
|
|
|
namespace ESM
|
|
|
|
{
|
2010-02-22 14:09:43 +01:00
|
|
|
|
2012-10-01 00:51:54 +04:00
|
|
|
class ESMReader;
|
|
|
|
class ESMWriter;
|
|
|
|
|
2010-02-22 14:09:43 +01:00
|
|
|
/*
|
|
|
|
* Region data
|
|
|
|
*/
|
|
|
|
|
2012-09-30 23:34:53 +04:00
|
|
|
struct Region
|
2010-02-22 14:09:43 +01:00
|
|
|
{
|
2013-09-24 13:17:28 +02:00
|
|
|
static unsigned int sRecordId;
|
|
|
|
|
2010-05-21 14:30:24 +02:00
|
|
|
#pragma pack(push)
|
|
|
|
#pragma pack(1)
|
2011-04-08 17:58:21 +04:00
|
|
|
struct WEATstruct
|
|
|
|
{
|
2014-09-04 13:23:29 +02:00
|
|
|
// These are probabilities that add up to 100
|
|
|
|
unsigned char mClear, mCloudy, mFoggy, mOvercast, mRain, mThunder, mAsh, mBlight,
|
2011-04-08 17:58:21 +04:00
|
|
|
// Unknown weather, probably snow and something. Only
|
|
|
|
// present in file version 1.3.
|
2014-09-04 13:23:29 +02:00
|
|
|
// the engine uses mA as "snow" and mB as "blizard"
|
2012-09-17 11:37:50 +04:00
|
|
|
mA, mB;
|
2011-04-08 17:58:21 +04:00
|
|
|
}; // 10 bytes
|
|
|
|
|
|
|
|
// Reference to a sound that is played randomly in this region
|
|
|
|
struct SoundRef
|
|
|
|
{
|
2012-09-17 11:37:50 +04:00
|
|
|
NAME32 mSound;
|
2014-09-04 13:23:29 +02:00
|
|
|
unsigned char mChance;
|
2011-04-08 17:58:21 +04:00
|
|
|
}; // 33 bytes
|
2010-05-21 14:30:24 +02:00
|
|
|
#pragma pack(pop)
|
2010-02-22 14:09:43 +01:00
|
|
|
|
2012-09-17 11:37:50 +04:00
|
|
|
WEATstruct mData;
|
|
|
|
int mMapColor; // RGBA
|
2010-02-22 14:09:43 +01:00
|
|
|
|
2011-04-08 17:58:21 +04:00
|
|
|
// sleepList refers to a eveled list of creatures you can meet if
|
|
|
|
// you sleep outside in this region.
|
2012-10-07 21:24:47 +04:00
|
|
|
std::string mId, mName, mSleepList;
|
2010-02-22 14:09:43 +01:00
|
|
|
|
2012-09-17 11:37:50 +04:00
|
|
|
std::vector<SoundRef> mSoundList;
|
2010-02-22 14:09:43 +01:00
|
|
|
|
2011-04-08 17:58:21 +04:00
|
|
|
void load(ESMReader &esm);
|
2013-09-16 12:32:35 +02:00
|
|
|
void save(ESMWriter &esm) const;
|
2013-04-07 16:32:06 +02:00
|
|
|
|
|
|
|
void blank();
|
|
|
|
///< Set record to default state (does not touch the ID/index).
|
2010-02-22 14:09:43 +01:00
|
|
|
};
|
|
|
|
}
|
|
|
|
#endif
|