mirror of
				https://github.com/OpenMW/openmw.git
				synced 2025-11-04 04:26:42 +00:00 
			
		
		
		
	Changed records are those where DELE is inserted at the beginning of a
record (before NAME).
The record has all required sub-records in this case.
(cherry picked from commit 9ac20a3355)
		
	
			
		
			
				
	
	
		
			37 lines
		
	
	
	
		
			700 B
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			37 lines
		
	
	
	
		
			700 B
		
	
	
	
		
			C++
		
	
	
	
	
	
#include "loadltex.hpp"
 | 
						|
 | 
						|
#include "esmreader.hpp"
 | 
						|
#include "esmwriter.hpp"
 | 
						|
#include "defs.hpp"
 | 
						|
#include "util.hpp"
 | 
						|
 | 
						|
namespace ESM
 | 
						|
{
 | 
						|
    unsigned int LandTexture::sRecordId = REC_LTEX;
 | 
						|
 | 
						|
void LandTexture::load(ESMReader &esm)
 | 
						|
{
 | 
						|
    mIsDeleted = readDeleSubRecord(esm);
 | 
						|
    mId = esm.getHNString("NAME");
 | 
						|
    esm.getHNT(mIndex, "INTV");
 | 
						|
    mTexture = esm.getHNString("DATA");
 | 
						|
}
 | 
						|
void LandTexture::save(ESMWriter &esm) const
 | 
						|
{
 | 
						|
    if (mIsDeleted)
 | 
						|
    {
 | 
						|
        writeDeleSubRecord(esm);
 | 
						|
    }
 | 
						|
    esm.writeHNCString("NAME", mId);
 | 
						|
    esm.writeHNT("INTV", mIndex);
 | 
						|
    esm.writeHNCString("DATA", mTexture);
 | 
						|
}
 | 
						|
 | 
						|
void LandTexture::blank()
 | 
						|
{
 | 
						|
    mTexture.clear();
 | 
						|
    mIndex = -1;
 | 
						|
    mIsDeleted = false;
 | 
						|
}
 | 
						|
 | 
						|
}
 |