mirror of
				https://github.com/TES3MP/openmw-tes3mp.git
				synced 2025-11-03 02:56:42 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			55 lines
		
	
	
	
		
			1.1 KiB
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			55 lines
		
	
	
	
		
			1.1 KiB
		
	
	
	
		
			C++
		
	
	
	
	
	
#ifndef OPENMW_ESM_LIGH_H
 | 
						|
#define OPENMW_ESM_LIGH_H
 | 
						|
 | 
						|
#include <string>
 | 
						|
 | 
						|
namespace ESM
 | 
						|
{
 | 
						|
 | 
						|
class ESMReader;
 | 
						|
class ESMWriter;
 | 
						|
 | 
						|
/*
 | 
						|
 * Lights. Includes static light sources and also carryable candles
 | 
						|
 * and torches.
 | 
						|
 */
 | 
						|
 | 
						|
struct Light
 | 
						|
{
 | 
						|
    static unsigned int sRecordId;
 | 
						|
 | 
						|
    enum Flags
 | 
						|
    {
 | 
						|
        Dynamic     = 0x001,
 | 
						|
        Carry       = 0x002, // Can be carried
 | 
						|
        Negative    = 0x004, // Negative light - i.e. darkness
 | 
						|
        Flicker     = 0x008,
 | 
						|
        Fire        = 0x010,
 | 
						|
        OffDefault  = 0x020, // Off by default
 | 
						|
        FlickerSlow = 0x040,
 | 
						|
        Pulse       = 0x080,
 | 
						|
        PulseSlow   = 0x100
 | 
						|
    };
 | 
						|
 | 
						|
    struct LHDTstruct
 | 
						|
    {
 | 
						|
        float mWeight;
 | 
						|
        int mValue;
 | 
						|
        int mTime; // Duration
 | 
						|
        int mRadius;
 | 
						|
        int mColor; // 4-byte rgba value
 | 
						|
        int mFlags;
 | 
						|
    }; // Size = 24 bytes
 | 
						|
 | 
						|
    LHDTstruct mData;
 | 
						|
 | 
						|
    std::string mSound, mScript, mModel, mIcon, mName, mId;
 | 
						|
 | 
						|
    void load(ESMReader &esm);
 | 
						|
    void save(ESMWriter &esm) const;
 | 
						|
 | 
						|
    void blank();
 | 
						|
    ///< Set record to default state (does not touch the ID).
 | 
						|
};
 | 
						|
}
 | 
						|
#endif
 |