mirror of
				https://github.com/OpenMW/openmw.git
				synced 2025-10-25 17:56:37 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			33 lines
		
	
	
	
		
			641 B
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			33 lines
		
	
	
	
		
			641 B
		
	
	
	
		
			C++
		
	
	
	
	
	
| #include "effectlist.hpp"
 | |
| 
 | |
| #include "esmreader.hpp"
 | |
| #include "esmwriter.hpp"
 | |
| 
 | |
| namespace ESM
 | |
| {
 | |
| 
 | |
|     void EffectList::load(ESMReader& esm)
 | |
|     {
 | |
|         mList.clear();
 | |
|         while (esm.isNextSub("ENAM"))
 | |
|         {
 | |
|             add(esm);
 | |
|         }
 | |
|     }
 | |
| 
 | |
|     void EffectList::add(ESMReader& esm)
 | |
|     {
 | |
|         ENAMstruct s;
 | |
|         esm.getHTSized<24>(s);
 | |
|         mList.push_back(s);
 | |
|     }
 | |
| 
 | |
|     void EffectList::save(ESMWriter& esm) const
 | |
|     {
 | |
|         for (std::vector<ENAMstruct>::const_iterator it = mList.begin(); it != mList.end(); ++it)
 | |
|         {
 | |
|             esm.writeHNT<ENAMstruct>("ENAM", *it, 24);
 | |
|         }
 | |
|     }
 | |
| 
 | |
| } // end namespace
 |