Esempio n. 1
0
 public FlurryClusterSpec(int a_nStreams,Types.ColorModes a_color,float a_thickness,float a_speed)
 {
     nStreams=a_nStreams;
     color=a_color;
     thickness=a_thickness;
     speed=a_speed;
 }
Esempio n. 2
0
 public Spark(Types.GlobalInfo a_info)
 {
     info=a_info;
     InitSpark();
 }
Esempio n. 3
0
 public Particle(Types.GlobalInfo a_info)
 {
     info=a_info;
     InitParticle();
 }
Esempio n. 4
0
        ///<summary>
        /// Do any initialization of the rendering context here, such as
        /// setting background colors, setting up lighting, or performing
        /// preliminary calculations.
        /// </summary>
        public void GLSetupRC(Types.GlobalInfo a_info)
        {
            int i,k;
            info=a_info;

            // timing setup
            OTSetup();
            info.fTime = (float)TimeInSecondsSinceStart() + info.flurryRandomSeed;
            info.fOldTime = info.fTime;
            info.optMode = Types.OPT_MODE_SCALAR_BASE;

            // initialize particles

            for (i = 0; i < info.smoke.smokev.particles.Length; i++) {
                for (k = 0; k < info.smoke.smokev.particles[i].dead.i.Length/*4*/; k++) {
                    info.smoke.smokev.particles[i].dead.i[k] = TRUE;
                }
            }

            for (i = 0; i < /*12*/info.spark.Length; i++) {
                info.spark[i].mystery = 1800 * (i + 1) / /*13*/(info.spark.Length+1);//HACK
                info.spark[i].UpdateSpark();
            }

            //foreach(Spark s in info.spark)
            //{
            //	s.mystery = 1800 * (i + 1) / 13;
            //	s.UpdateSpark();
            //}

            // setup the defaults for OpenGL
            Gl.glDisable(Gl.GL_DEPTH_TEST);
            Gl.glAlphaFunc(Gl.GL_GREATER, 0.0f);
            Gl.glEnable(Gl.GL_ALPHA_TEST);
            Gl.glShadeModel(Gl.GL_FLAT);
            Gl.glDisable(Gl.GL_LIGHTING);
            Gl.glDisable(Gl.GL_CULL_FACE);
            Gl.glEnable(Gl.GL_BLEND);

            Gl.glViewport(0, 0, (int)info.sys_glWidth, (int)info.sys_glHeight);
            Gl.glMatrixMode(Gl.GL_PROJECTION);
            Gl.glLoadIdentity();
            Glu.gluOrtho2D(0, info.sys_glWidth, 0, info.sys_glHeight);
            Gl.glMatrixMode(Gl.GL_MODELVIEW);
            Gl.glLoadIdentity();

            Gl.glClearColor(0.0f, 0.0f, 0.0f, 1.0f);
            #if !USEFADEHACK
            Gl.glClear(Gl.GL_COLOR_BUFFER_BIT); //HACK GLsetupRC() hack for fading startup
            #endif

            Gl.glEnableClientState(Gl.GL_COLOR_ARRAY);
            Gl.glEnableClientState(Gl.GL_VERTEX_ARRAY);
            Gl.glEnableClientState(Gl.GL_TEXTURE_COORD_ARRAY);
        }
Esempio n. 5
0
 //Randomizer rand;
 public Star(Types.GlobalInfo a_info)
 {
     info=a_info;
     InitStar();
 }