diff options
| author | Treeki <treeki@gmail.com> | 2011-02-21 03:17:08 +0100 | 
|---|---|---|
| committer | Treeki <treeki@gmail.com> | 2011-02-21 03:17:08 +0100 | 
| commit | 1d5fa5585f08dd82a6722af3dd8ab360fd161151 (patch) | |
| tree | 588245bb84e9155bbaa39b800891f880cc668d79 /NW4RTools/VertexSettings.cs | |
| parent | b0760b28807b31cc1403584265c07feb87ac4887 (diff) | |
| download | nw4rtools-1d5fa5585f08dd82a6722af3dd8ab360fd161151.tar.gz nw4rtools-1d5fa5585f08dd82a6722af3dd8ab360fd161151.zip  | |
this is a pain in the ass
Diffstat (limited to '')
| -rw-r--r-- | NW4RTools/VertexSettings.cs | 17 | 
1 files changed, 12 insertions, 5 deletions
diff --git a/NW4RTools/VertexSettings.cs b/NW4RTools/VertexSettings.cs index b8a341f..2a0d3ac 100644 --- a/NW4RTools/VertexSettings.cs +++ b/NW4RTools/VertexSettings.cs @@ -8,14 +8,21 @@ namespace NW4RTools {  		public int[] Colors;  		public int[] TexCoords; +		public byte PosMtxIndex; +		public byte[] TexCoordMtxIndex;  		public void LoadFrom(InputStream ins, VertexSettings vs) {  			if (vs.PNMatrixIndexExists) -				throw new NotImplementedException(); -			if (vs.TexCoordMatrixIndexExists[0]) -				throw new NotImplementedException(); -			// won't bother with the rest +				PosMtxIndex = ins.ReadByte(); + +			for (int i = 0; i < 8; i++) { +				if (vs.TexCoordMatrixIndexExists[i]) { +					if (TexCoordMtxIndex == null) +						TexCoordMtxIndex = new byte[8]; +					TexCoordMtxIndex[i] = ins.ReadByte(); +				} +			}  			switch (vs.PositionDesc) {  			case VertexSettings.DescType.Direct: @@ -34,7 +41,7 @@ namespace NW4RTools {  				break;  			} -			// not sure how to detect NBT3 yet +			// not sure how to detect NBT3 yet -- or if it's even relevant?  			switch (vs.NormalDesc) {  			case VertexSettings.DescType.Direct:  				throw new NotImplementedException();  | 
