2012-09-23 22:11:08 +04:00
|
|
|
#ifndef OPENMW_ESM_LIGH_H
|
|
|
|
#define OPENMW_ESM_LIGH_H
|
Finished ALCH, APPA, BOOK, CLOT, CREC, ENCH, GLOB, INGR, LIGH, MISC, RACE, SKIL, SNDG, SSCR and STAT. Phew!
2010-02-21 13:20:17 +01:00
|
|
|
|
2012-09-17 11:37:50 +04:00
|
|
|
#include <string>
|
|
|
|
|
2011-04-08 17:58:21 +04:00
|
|
|
namespace ESM
|
|
|
|
{
|
Finished ALCH, APPA, BOOK, CLOT, CREC, ENCH, GLOB, INGR, LIGH, MISC, RACE, SKIL, SNDG, SSCR and STAT. Phew!
2010-02-21 13:20:17 +01:00
|
|
|
|
2012-10-01 00:51:54 +04:00
|
|
|
class ESMReader;
|
|
|
|
class ESMWriter;
|
|
|
|
|
Finished ALCH, APPA, BOOK, CLOT, CREC, ENCH, GLOB, INGR, LIGH, MISC, RACE, SKIL, SNDG, SSCR and STAT. Phew!
2010-02-21 13:20:17 +01:00
|
|
|
/*
|
|
|
|
* Lights. Includes static light sources and also carryable candles
|
|
|
|
* and torches.
|
|
|
|
*/
|
|
|
|
|
2012-09-30 23:34:53 +04:00
|
|
|
struct Light
|
Finished ALCH, APPA, BOOK, CLOT, CREC, ENCH, GLOB, INGR, LIGH, MISC, RACE, SKIL, SNDG, SSCR and STAT. Phew!
2010-02-21 13:20:17 +01:00
|
|
|
{
|
2013-09-24 13:17:28 +02:00
|
|
|
static unsigned int sRecordId;
|
2015-06-14 02:31:00 +02:00
|
|
|
/// Return a string descriptor for this record type. Currently used for debugging / error logs only.
|
|
|
|
static std::string getRecordType() { return "Light"; }
|
2013-09-24 13:17:28 +02:00
|
|
|
|
2011-04-08 17:58:21 +04:00
|
|
|
enum Flags
|
Finished ALCH, APPA, BOOK, CLOT, CREC, ENCH, GLOB, INGR, LIGH, MISC, RACE, SKIL, SNDG, SSCR and STAT. Phew!
2010-02-21 13:20:17 +01:00
|
|
|
{
|
2012-09-17 11:37:50 +04:00
|
|
|
Dynamic = 0x001,
|
|
|
|
Carry = 0x002, // Can be carried
|
|
|
|
Negative = 0x004, // Negative light - i.e. darkness
|
|
|
|
Flicker = 0x008,
|
|
|
|
Fire = 0x010,
|
2014-08-11 20:04:56 +02:00
|
|
|
OffDefault = 0x020, // Off by default - does not burn while placed in a cell, but can burn when equipped by an NPC
|
2011-04-08 17:58:21 +04:00
|
|
|
FlickerSlow = 0x040,
|
2012-09-17 11:37:50 +04:00
|
|
|
Pulse = 0x080,
|
|
|
|
PulseSlow = 0x100
|
Finished ALCH, APPA, BOOK, CLOT, CREC, ENCH, GLOB, INGR, LIGH, MISC, RACE, SKIL, SNDG, SSCR and STAT. Phew!
2010-02-21 13:20:17 +01:00
|
|
|
};
|
|
|
|
|
2011-04-08 17:58:21 +04:00
|
|
|
struct LHDTstruct
|
|
|
|
{
|
2012-09-17 11:37:50 +04:00
|
|
|
float mWeight;
|
|
|
|
int mValue;
|
|
|
|
int mTime; // Duration
|
|
|
|
int mRadius;
|
2015-01-08 02:34:37 +01:00
|
|
|
unsigned int mColor; // 4-byte rgba value
|
2012-09-17 11:37:50 +04:00
|
|
|
int mFlags;
|
2011-04-08 17:58:21 +04:00
|
|
|
}; // Size = 24 bytes
|
|
|
|
|
2012-09-17 11:37:50 +04:00
|
|
|
LHDTstruct mData;
|
2011-04-08 17:58:21 +04:00
|
|
|
|
2012-10-07 21:24:47 +04:00
|
|
|
std::string mSound, mScript, mModel, mIcon, mName, mId;
|
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-05-06 14:10:43 +02:00
|
|
|
|
|
|
|
void blank();
|
|
|
|
///< Set record to default state (does not touch the ID).
|
Finished ALCH, APPA, BOOK, CLOT, CREC, ENCH, GLOB, INGR, LIGH, MISC, RACE, SKIL, SNDG, SSCR and STAT. Phew!
2010-02-21 13:20:17 +01:00
|
|
|
};
|
|
|
|
}
|
|
|
|
#endif
|