Subversion Repositories spk

Rev

Rev 114 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 114 Rev 273
Line 1... Line 1...
1
#include "bod_bob_parser.h"
1
#include "bod_bob_parser.h"
2
#include "../common/strutils.h"
2
#include "../common/strutils.h"
-
 
3
 
-
 
4
#include <cstdint>
3
 
5
 
4
#define ISMATERIAL(text) ((strcmp(text, "MATERIAL6")==0 || strcmp(text, "MATERIAL5")==0 || \
6
#define ISMATERIAL(text) ((strcmp(text, "MATERIAL6")==0 || strcmp(text, "MATERIAL5")==0 || \
5
                          strcmp(text, "MATERIAL3")==0 || strcmp(text, "MATERIAL")==0))
7
                          strcmp(text, "MATERIAL3")==0 || strcmp(text, "MATERIAL")==0))
6
 
8
 
7
//---------------------------------------------------------------------------------
9
//---------------------------------------------------------------------------------
Line 850... Line 852...
850
				{ bRes=false; break; }
852
				{ bRes=false; break; }
851
 
853
 
852
			bob_weight::value val;
854
			bob_weight::value val;
853
			val.boneIdx=v;
855
			val.boneIdx=v;
854
 
856
 
-
 
857
#ifdef _WIN64
-
 
858
			val.boneCoefficient = static_cast<int32_t>(d * bob_weight::value::MULTIPLIER);
-
 
859
#else
855
			__asm{
860
			__asm{
856
				/* 
861
				/* 
857
					val.boneCoefficient = bob_weight::value::multiplier * d 
862
					val.boneCoefficient = bob_weight::value::multiplier * d 
858
				*/
863
				*/
859
				fild bob_weight::value::MULTIPLIER
864
				fild bob_weight::value::MULTIPLIER
860
				fmul d
865
				fmul d
861
				fistp val.boneCoefficient
866
				fistp val.boneCoefficient
862
			}
867
			}
-
 
868
#endif
863
			w->values.push_back(val);
869
			w->values.push_back(val);
864
		}
870
		}
865
		while(!is.fail());
871
		while(!is.fail());
866
		if(is.fail()){
872
		if(is.fail()){
867
			error(is.previous(), S_Error, "Unexpected end of document found while loading Weights. Do you miss the '-1'?");
873
			error(is.previous(), S_Error, "Unexpected end of document found while loading Weights. Do you miss the '-1'?");