mirror of
				https://github.com/OpenMW/openmw.git
				synced 2025-11-04 11:56:39 +00:00 
			
		
		
		
	Objects no longer inherit from extra data class "Controlled" harmful abstraction no longer exists Introduced NiParticleModifier/NiParticleCollider abstractions Extra data size reading moved into the base read() method
		
			
				
	
	
		
			34 lines
		
	
	
	
		
			555 B
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			34 lines
		
	
	
	
		
			555 B
		
	
	
	
		
			C++
		
	
	
	
	
	
#include "extra.hpp"
 | 
						|
 | 
						|
namespace Nif
 | 
						|
{
 | 
						|
 | 
						|
void NiStringExtraData::read(NIFStream *nif)
 | 
						|
{
 | 
						|
    Extra::read(nif);
 | 
						|
    string = nif->getString();
 | 
						|
}
 | 
						|
 | 
						|
void NiTextKeyExtraData::read(NIFStream *nif)
 | 
						|
{
 | 
						|
    Extra::read(nif);
 | 
						|
 | 
						|
    int keynum = nif->getInt();
 | 
						|
    list.resize(keynum);
 | 
						|
    for(int i=0; i<keynum; i++)
 | 
						|
    {
 | 
						|
        list[i].time = nif->getFloat();
 | 
						|
        list[i].text = nif->getString();
 | 
						|
    }
 | 
						|
}
 | 
						|
 | 
						|
void NiVertWeightsExtraData::read(NIFStream *nif)
 | 
						|
{
 | 
						|
    Extra::read(nif);
 | 
						|
 | 
						|
    nif->skip(nif->getUShort() * sizeof(float)); // vertex weights I guess
 | 
						|
}
 | 
						|
 | 
						|
 | 
						|
 | 
						|
}
 |