mirror of
				https://github.com/OpenMW/openmw.git
				synced 2025-11-04 10:26:39 +00:00 
			
		
		
		
	Nice side effects: - Subrecord name comparison now uses magic number instead of string (faster) - Improves the error message for unknown subrecords: will print the record in question instead of failing to read the next record with a strange error
		
			
				
	
	
		
			26 lines
		
	
	
	
		
			470 B
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			26 lines
		
	
	
	
		
			470 B
		
	
	
	
		
			C++
		
	
	
	
	
	
#include "loadstat.hpp"
 | 
						|
 | 
						|
#include "esmreader.hpp"
 | 
						|
#include "esmwriter.hpp"
 | 
						|
#include "defs.hpp"
 | 
						|
 | 
						|
namespace ESM
 | 
						|
{
 | 
						|
    unsigned int Static::sRecordId = REC_STAT;
 | 
						|
 | 
						|
    void Static::load(ESMReader &esm)
 | 
						|
    {
 | 
						|
        mPersistent = esm.getRecordFlags() & 0x0400;
 | 
						|
 | 
						|
        mModel = esm.getHNString("MODL");
 | 
						|
    }
 | 
						|
    void Static::save(ESMWriter &esm) const
 | 
						|
    {
 | 
						|
        esm.writeHNCString("MODL", mModel);
 | 
						|
    }
 | 
						|
 | 
						|
    void Static::blank()
 | 
						|
    {
 | 
						|
        mModel.clear();
 | 
						|
    }
 | 
						|
}
 |