From ab340fe4dc87086336643b6b616df6efdfac796b Mon Sep 17 00:00:00 2001 From: Treeki Date: Thu, 3 Mar 2011 04:53:56 +0100 Subject: working (but not 100% tested) model and texture writing. a few other fixes, etc --- NW4RTools/Models/Shader.cs | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'NW4RTools/Models/Shader.cs') diff --git a/NW4RTools/Models/Shader.cs b/NW4RTools/Models/Shader.cs index 767470e..6510110 100644 --- a/NW4RTools/Models/Shader.cs +++ b/NW4RTools/Models/Shader.cs @@ -10,6 +10,25 @@ namespace NW4RTools.Models { public Shader() { } + + + public bool DataMatches(Shader another) { + if (another.TevStageCount != TevStageCount) + return false; + + if (another.Unk1 != Unk1 || another.Unk2 != Unk2) + return false; + + if (another.DisplayList.Length != DisplayList.Length) + return false; + + for (int i = 0; i < DisplayList.Length; i++) { + if (another.DisplayList[i] != DisplayList[i]) + return false; + } + + return true; + } } } -- cgit v1.2.3