1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
|
using System;
namespace NW4RTools {
public enum PrimitiveType {
Quads = 0,
Triangles = 2,
TriangleStrip = 3,
TriangleFan = 4,
Lines = 5,
LineStrip = 6,
Points = 7
}
public enum GXCommand {
// Missing many!!
LoadPosMtxFromArray = 0x20,
LoadNrmMtxFromArray = 0x28,
LoadTexCoordMtxFromArray = 0x30,
LoadLightFromArray = 0x38,
DrawPrimitiveMask = 0x80
}
public enum TextureFormat {
I4,
I8,
IA4,
IA8,
RGB565,
RGB5A3,
RGBA8,
C4 = 8,
C8 = 9,
C14X2 = 0xA,
CMPR = 0xE
}
public enum TextureWrapType {
CLAMP,
REPEAT,
MIRROR
}
public static class TextureWrapTypeExtensionMethods {
public static Collada141.fx_sampler_wrap_common ToColladaSamplerWrap(this TextureWrapType t) {
if (t == TextureWrapType.CLAMP)
return Collada141.fx_sampler_wrap_common.CLAMP;
if (t == TextureWrapType.REPEAT)
return Collada141.fx_sampler_wrap_common.WRAP;
if (t == TextureWrapType.MIRROR)
return Collada141.fx_sampler_wrap_common.MIRROR;
return Collada141.fx_sampler_wrap_common.WRAP;
}
}
}
|