/* * Note: the Flurry base code keeps everything in a global variable named * info. We want to instance it, for multimon support (several separate * Flurries), so we allocate several such structures, but to avoid changing * the base code, we set info = current->globals before calling into it. * Obviously, not thread safe. */ public FlurryGroup(FlurrySpec preset) { clusters=new List<FlurryCluster>(); //if (preset > g_visuals.size()) { //_RPT2(_CRT_WARN, "Invalid preset %d (max %d); using default\n", // preset, g_visuals.size()); // preset = 0; //} //FlurrySpec visual = g_visuals[preset]; for (int i = 0; i < preset.clusters.Count; i++) { clusters.Add(new FlurryCluster(preset.clusters[i])); } }
/* void LoadFlurries() * { * XmlDocument xdoc = new XmlDocument(); * xdoc.Load("flurries.xml"); * XmlNodeList nodes = xdoc.GetElementsByTagName("flurry"); * foreach (XmlNode node in nodes) * { * Console.WriteLine(node.Attributes["settings"].InnerText); * specs.Add(new FlurrySpec(node.Attributes["settings"].InnerText)); * } * }*/ public static FlurrySpec [] MakeDefaultSpecs() { //"Classic:{5,tiedye,100,1.0}", //"RGB:{3,red,100,0.8};{3,blue,100,0.8};{3,green,100,0.8}", //"Water:{1,blue,100.0,2.0};{1,blue,100.0,2.0};{1,blue,100.0,2.0};{1,blue,100.0,2.0};{1,blue,100.0,2.0};{1,blue,100.0,2.0};{1,blue,100.0,2.0};{1,blue,100.0,2.0};{1,blue,100.0,2.0}", //"Fire:{12,slowCyclic,10000.0,0.0}", //"Psychedelic:{10,rainbow,200.0,2.0}" FlurrySpec [] specs = new FlurrySpec[6]; specs[0] = new FlurrySpec("Classic:{5,tiedye,100.0,1.0}"); specs[1] = new FlurrySpec("RGB:{3,red,100,0.8};{3,blue,100,0.8};{3,green,100,0.8}"); specs[2] = new FlurrySpec("Water:{1,blue,100.0,2.0};{1,blue,100.0,2.0};{1,blue,100.0,2.0};{1,blue,100.0,2.0};{1,blue,100.0,2.0};{1,blue,100.0,2.0};{1,blue,100.0,2.0};{1,blue,100.0,2.0};{1,blue,100.0,2.0}"); specs[3] = new FlurrySpec("Fire:{12,slowCyclic,10000.0,0.0}"); specs[4] = new FlurrySpec("Psychedelic:{10,rainbow,200.0,2.0}"); specs[5] = new FlurrySpec("Crazy:{16,slowCyclic,200.0,0.7};{16,slowCyclic,200.0,0.5}"); return(specs); }
/* void LoadFlurries() { XmlDocument xdoc = new XmlDocument(); xdoc.Load("flurries.xml"); XmlNodeList nodes = xdoc.GetElementsByTagName("flurry"); foreach (XmlNode node in nodes) { Console.WriteLine(node.Attributes["settings"].InnerText); specs.Add(new FlurrySpec(node.Attributes["settings"].InnerText)); } }*/ public static FlurrySpec[] MakeDefaultSpecs() { //"Classic:{5,tiedye,100,1.0}", //"RGB:{3,red,100,0.8};{3,blue,100,0.8};{3,green,100,0.8}", //"Water:{1,blue,100.0,2.0};{1,blue,100.0,2.0};{1,blue,100.0,2.0};{1,blue,100.0,2.0};{1,blue,100.0,2.0};{1,blue,100.0,2.0};{1,blue,100.0,2.0};{1,blue,100.0,2.0};{1,blue,100.0,2.0}", //"Fire:{12,slowCyclic,10000.0,0.0}", //"Psychedelic:{10,rainbow,200.0,2.0}" FlurrySpec [] specs=new FlurrySpec[6]; specs[0]=new FlurrySpec("Classic:{5,tiedye,100.0,1.0}"); specs[1]=new FlurrySpec("RGB:{3,red,100,0.8};{3,blue,100,0.8};{3,green,100,0.8}"); specs[2]=new FlurrySpec("Water:{1,blue,100.0,2.0};{1,blue,100.0,2.0};{1,blue,100.0,2.0};{1,blue,100.0,2.0};{1,blue,100.0,2.0};{1,blue,100.0,2.0};{1,blue,100.0,2.0};{1,blue,100.0,2.0};{1,blue,100.0,2.0}"); specs[3]=new FlurrySpec("Fire:{12,slowCyclic,10000.0,0.0}"); specs[4]=new FlurrySpec("Psychedelic:{10,rainbow,200.0,2.0}"); specs[5]=new FlurrySpec("Crazy:{16,slowCyclic,200.0,0.7};{16,slowCyclic,200.0,0.5}"); return specs; }
/* * Note: the Flurry base code keeps everything in a global variable named * info. We want to instance it, for multimon support (several separate * Flurries), so we allocate several such structures, but to avoid changing * the base code, we set info = current->globals before calling into it. * Obviously, not thread safe. */ public FlurryGroup(FlurrySpec preset) { clusters = new List <FlurryCluster>(); //if (preset > g_visuals.size()) { //_RPT2(_CRT_WARN, "Invalid preset %d (max %d); using default\n", // preset, g_visuals.size()); // preset = 0; //} //FlurrySpec visual = g_visuals[preset]; for (int i = 0; i < preset.clusters.Count; i++) { clusters.Add(new FlurryCluster(preset.clusters[i])); } }