mirror of
				https://github.com/OpenMW/openmw.git
				synced 2025-11-04 02:26:41 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			24 lines
		
	
	
	
		
			453 B
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			24 lines
		
	
	
	
		
			453 B
		
	
	
	
		
			C++
		
	
	
	
	
	
#include "loadglob.hpp"
 | 
						|
 | 
						|
namespace ESM
 | 
						|
{
 | 
						|
 | 
						|
void Global::load(ESMReader &esm)
 | 
						|
{
 | 
						|
    VarType t;
 | 
						|
    std::string tmp = esm.getHNString("FNAM");
 | 
						|
    if (tmp == "s")
 | 
						|
        t = VT_Short;
 | 
						|
    else if (tmp == "l")
 | 
						|
        t = VT_Int;
 | 
						|
    else if (tmp == "f")
 | 
						|
        t = VT_Float;
 | 
						|
    else
 | 
						|
        esm.fail("Illegal global variable type " + tmp);
 | 
						|
    type = t;
 | 
						|
 | 
						|
    // Note: Both floats and longs are represented as floats.
 | 
						|
    esm.getHNT(value, "FLTV");
 | 
						|
}
 | 
						|
 | 
						|
}
 |