summaryrefslogtreecommitdiff
path: root/NW4RTools/VertexSettings.cs
diff options
context:
space:
mode:
authorTreeki <treeki@gmail.com>2011-02-18 03:28:31 +0100
committerTreeki <treeki@gmail.com>2011-02-18 03:28:31 +0100
commitb0760b28807b31cc1403584265c07feb87ac4887 (patch)
treedc97346a0c0d0cdcdc066d77df3905a614a858e8 /NW4RTools/VertexSettings.cs
parent7d7491feb41bc9724bf63bef545b996226406889 (diff)
downloadnw4rtools-b0760b28807b31cc1403584265c07feb87ac4887.tar.gz
nw4rtools-b0760b28807b31cc1403584265c07feb87ac4887.zip
some collada work, and an unfinished OGL renderer using OpenTK. huge commit
Diffstat (limited to 'NW4RTools/VertexSettings.cs')
-rw-r--r--NW4RTools/VertexSettings.cs18
1 files changed, 14 insertions, 4 deletions
diff --git a/NW4RTools/VertexSettings.cs b/NW4RTools/VertexSettings.cs
index 5eac02a..b8a341f 100644
--- a/NW4RTools/VertexSettings.cs
+++ b/NW4RTools/VertexSettings.cs
@@ -129,6 +129,15 @@ namespace NW4RTools {
Float32 = 4
}
+ public enum CompClrType {
+ RGB565 = 0,
+ RGB8 = 1,
+ RGBX8 = 2,
+ RGBA4 = 3,
+ RGBA6 = 4,
+ RGBA8 = 5
+ }
+
public bool PNMatrixIndexExists;
public bool[] TexCoordMatrixIndexExists;
@@ -139,7 +148,8 @@ namespace NW4RTools {
public CompCount[] ColorCount, TexCoordCount;
public CompType PositionFormat, NormalFormat;
- public CompType[] ColorFormat, TexCoordFormat;
+ public CompClrType[] ColorFormat;
+ public CompType[] TexCoordFormat;
public byte PositionFrac;
public byte[] TexCoordFrac;
@@ -155,7 +165,7 @@ namespace NW4RTools {
ColorCount = new CompCount[2];
TexCoordCount = new CompCount[8];
- ColorFormat = new CompType[2];
+ ColorFormat = new CompClrType[2];
TexCoordFormat = new CompType[8];
TexCoordFrac = new byte[8];
@@ -189,10 +199,10 @@ namespace NW4RTools {
NormalFormat = (CompType)((val1 & 0x1C00) >> 10);
ColorCount[0] = (CompCount)((val1 & 0x2000) >> 13);
- ColorFormat[0] = (CompType)((val1 & 0x1C000) >> 14);
+ ColorFormat[0] = (CompClrType)((val1 & 0x1C000) >> 14);
ColorCount[1] = (CompCount)((val1 & 0x20000) >> 17);
- ColorFormat[1] = (CompType)((val1 & 0x1C0000) >> 18);
+ ColorFormat[1] = (CompClrType)((val1 & 0x1C0000) >> 18);
TexCoordCount[0] = (CompCount)((val1 & 0x200000) >> 21);
TexCoordFormat[0] = (CompType)((val1 & 0x1C00000) >> 22);