using System; namespace NW4RTools { public enum PrimitiveType { Quads = 0, Triangles = 2, TriangleStrip = 3, TriangleFan = 4, Lines = 5, LineStrip = 6, Points = 7 } public enum GXCommand { Nop = 0, LoadBPReg = 0x61, LoadCPReg = 0x08, LoadXFReg = 0x10, LoadPosMtxFromArray = 0x20, LoadNrmMtxFromArray = 0x28, LoadTexCoordMtxFromArray = 0x30, LoadLightFromArray = 0x38, CallDL = 0x40, UnknownMetrics = 0x44, InvalidateVC = 0x48, DrawPrimitiveMask = 0x80, // TODO: Figure out some better way to store this PrimitiveShiftAmount = 3 } 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; } } }