Example #1
0
 public override void DetectResources(List <MissingReference> missing, List <uint> matrefs, List <string> texrefs)
 {
     foreach (var reference in instance.Effect.References)
     {
         if (reference.Node is FxBasicAppearance)
         {
             var node = reference.Node;
             var fx   = (FxBasicAppearance)reference.Node;
             if (fx.Texture != null && !ResourceDetection.HasTexture(texrefs, fx.Texture))
             {
                 texrefs.Add(fx.Texture);
             }
             TexFrameAnimation texFrame;
             if (fx.Texture != null && plib.Resources.FindTexture(fx.Texture) == null &&
                 !plib.Resources.TryGetFrameAnimation(fx.Texture, out texFrame))
             {
                 var str = "Texture: " + fx.Texture; //TODO: This is wrong - handle properly
                 if (!ResourceDetection.HasMissing(missing, str))
                 {
                     missing.Add(new MissingReference(
                                     str, string.Format("{0}: {1} ({2})", instance.Effect.Name, node.NodeName, node.Name)));
                 }
             }
         }
     }
 }
Example #2
0
 public override void DetectResources(List <MissingReference> missing, List <uint> matrefs, List <string> texrefs)
 {
     ResourceDetection.DetectDrawable(Name, drawable, res, missing, matrefs, texrefs);
 }