예제 #1
0
        /// <summary>
        /// Constructor for Midsummer effect
        /// </summary>
        /// <param name="sound">Sound system</param>
        public Midsummer(ref Sound sound)
        {
            image = Util.LoadTexture(Util.CurrentExecutionPath + "/gfx/rain.bmp", TextureMinFilter.Linear, TextureMagFilter.Linear, TextureWrapMode.Clamp, TextureWrapMode.Clamp, System.Drawing.Color.FromArgb(255, 0, 255));
            image2 = Util.LoadTexture(Util.CurrentExecutionPath + "/gfx/mid.bmp", TextureMinFilter.Linear, TextureMagFilter.Linear, TextureWrapMode.Clamp, TextureWrapMode.Clamp, System.Drawing.Color.FromArgb(255, 0, 255));
            currentImage = 0;
            snd = sound;

            LastDate = string.Empty;
            snd.CreateSound(Sound.FileType.Ogg, Util.CurrentExecutionPath + "/Samples/grodorna.ogg", "Midsummer");
            sf = new Raindrops[NUMBEROFRAINDROPS];

            float z = 0.4f;

            for (int i = 0; i < NUMBEROFRAINDROPS; i++)
            {

                sf[i] = new Raindrops((Util.Rnd.Next(-18, 15)) / 10.0f, (Util.Rnd.Next(-10, 20) * -1) / 10.0f, Util.Rnd.Next(2, 8) / 1000.0f, image,
                    new Vector2[] {  new Vector2(0.0f + (currentImage * 0.33f), 1.0f),
                                     new Vector2(0.2f + (currentImage * 0.33f), 1.0f),
                                     new Vector2(0.2f + (currentImage * 0.33f), 0.0f),
                                     new Vector2(0.0f + (currentImage * 0.33f), 0.0f)}, Util.Rnd.Next(5, 10) * 10.0f, z);

                z -= 0.00001f;
                currentImage++;

                if (currentImage == 2)
                    currentImage = 0;

            }
        }
예제 #2
0
        /// <summary>
        /// Cosntructor for Valentine effect
        /// </summary>
        /// <param name="sound">Sound system</param>
        public Valentine(ref Sound sound)
        {
            image = Util.LoadTexture(Util.CurrentExecutionPath + "/gfx/valentine.bmp", TextureMinFilter.Linear, TextureMagFilter.Linear, TextureWrapMode.Clamp, TextureWrapMode.Clamp, System.Drawing.Color.FromArgb(255, 0, 255));
            image2 = Util.LoadTexture(Util.CurrentExecutionPath + "/gfx/barseback3.png", TextureMinFilter.Linear, TextureMagFilter.Linear, TextureWrapMode.Clamp, TextureWrapMode.Clamp, System.Drawing.Color.FromArgb(255, 0, 255));
            heartsImage = Util.LoadTexture(Util.CurrentExecutionPath + "/gfx/h.bmp", TextureMinFilter.Linear, TextureMagFilter.Linear, TextureWrapMode.Clamp, TextureWrapMode.Clamp, System.Drawing.Color.FromArgb(255, 0, 255));
            currentImage = 0;
            snd = sound;
            //snd.CreateSound(Sound.FileType.WAV, Util.CurrentExecutionPath + "/Samples/valentine.wav", "Valentine");
            snd.CreateSound(Sound.FileType.Ogg, Util.CurrentExecutionPath + "/Samples/valentine.ogg", "Valentine");

            Random r = new Random();
            h = new Hearts[NUMBEROFHEARTS];

            float z = 0.4f;

            for (int i = 0; i < NUMBEROFHEARTS; i++)
            {
                h[i] = new Hearts((r.Next(-18, 15)) / 10.0f, (r.Next(-10, 20) * -1) / 10.0f, r.Next(2, 8) / 1000.0f, heartsImage,
                    new Vector2[] {  new Vector2(0.0f + (currentImage * 0.2f), 1.0f),
                                     new Vector2(0.2f + (currentImage * 0.2f), 1.0f),
                                     new Vector2(0.2f + (currentImage * 0.2f), 0.0f),
                                     new Vector2(0.0f + (currentImage * 0.2f), 0.0f)}, r.Next(5, 10) * 10.0f, z);

                z -= 0.000001f;
                currentImage++;

                if (currentImage == 4)
                    currentImage = 0;

            }//for
        }
예제 #3
0
 /// <summary>
 /// Constructor for Halloween effect
 /// </summary>
 /// <param name="chessboard">Chessboard background</param>
 /// <param name="sound">Sound system</param>
 /// <param name="NumberOfSpiders">How many spiders to show on screen</param>
 public Halloween(ref Chess chessboard, ref Sound sound, int NumberOfSpiders)
 {
     chess = chessboard;
     snd = sound;
     textureSpider = Util.LoadTexture(Util.CurrentExecutionPath + "/gfx/spider.bmp", TextureMinFilter.Linear, TextureMagFilter.Linear, TextureWrapMode.Clamp, TextureWrapMode.Clamp, Color.Black);
     textureGhost = Util.LoadTexture(Util.CurrentExecutionPath + "/gfx/halloween.bmp", TextureMinFilter.Linear, TextureMagFilter.Linear, TextureWrapMode.Clamp, TextureWrapMode.Clamp, Color.FromArgb(255,0,255));
     snd.CreateSound(Sound.FileType.Ogg, Util.CurrentExecutionPath + "/Samples/scary.ogg", "Scary");
     MaxSpiders = NumberOfSpiders;
     Spiders = new Spider[MaxSpiders];
     Ghost = new Vector3[4];
     Size = new SizeF(1.0f, 1.0f);
     float sZ = 0.4f;
     for (int i = 0; i < MaxSpiders; i++)
     {
         Spiders[i] = new Spider(0.1f, 0.1f, sZ, 1.0f, textureSpider);
         sZ -= sZ / (NumberOfSpiders + 2000);
     }
     X = Util.Rnd.Next(-3, 3) / 10.0f;
     Y = Util.Rnd.Next(-3, 3) / 10.0f;
     Z = sZ - 0.001f;
     Ghost[0] = new Vector3(X, Y, Z); // red
     Ghost[1] = new Vector3(X, Y + Size.Height, Z); // blue
     Ghost[2] = new Vector3(X + Size.Width, Y + Size.Height, Z); // green
     Ghost[3] = new Vector3(X + Size.Width, Y, Z); // yellow
     LastPlayedDate = string.Empty;
 }
예제 #4
0
파일: Fuck.cs 프로젝트: wach78/Turbofest
 /// <summary>
 /// Constructor for f**k me gently effect
 /// </summary>
 /// <param name="sound">Sound system</param>
 /// <param name="chess">Chessboard</param>
 public F**k(ref Sound sound,ref Chess chess)
 {
     img = Util.LoadTexture(System.IO.Path.GetDirectoryName(System.Windows.Forms.Application.ExecutablePath) + "/gfx/f**k.jpg");
     bakground = chess;
     snd = sound;
     snd.CreateSound(Sound.FileType.Ogg, System.IO.Path.GetDirectoryName(System.Windows.Forms.Application.ExecutablePath) + "/Samples/F**k.ogg", "F**k");
     LastDate = string.Empty;
 }
예제 #5
0
파일: Hajk.cs 프로젝트: wach78/Turbofest
        /// <summary>
        /// Constructor for Hajk effect
        /// </summary>
        /// <param name="sound">Sound system</param>
        public Hajk(ref Sound sound)
        {
            image = Util.LoadTexture(Util.CurrentExecutionPath + "/gfx/Hajk.bmp", TextureMinFilter.Linear, TextureMagFilter.Linear, TextureWrapMode.Clamp, TextureWrapMode.Clamp, System.Drawing.Color.FromArgb(255, 0, 255));
            snd = sound;

            snd.CreateSound(Sound.FileType.Ogg, Util.CurrentExecutionPath + "/Samples/HAJK.ogg", "Hajk");
            disposed = false;
            LastDate = string.Empty;
        }
예제 #6
0
        public SilverFang(ref Sound sound)
        {
            img = Util.LoadTexture(System.IO.Path.GetDirectoryName(System.Windows.Forms.Application.ExecutablePath) + "/gfx/Akakabuto.jpg");
            img2 = Util.LoadTexture(System.IO.Path.GetDirectoryName(System.Windows.Forms.Application.ExecutablePath) + "/gfx/silver.jpg");

            snd = sound;
            snd.CreateSound(Sound.FileType.Ogg, System.IO.Path.GetDirectoryName(System.Windows.Forms.Application.ExecutablePath) + "/Samples/SilverFangJap.ogg", "SilverFang");
            LastDate = string.Empty;
        }
예제 #7
0
        /// <summary>
        /// Constructor for Sailormoon effect
        /// </summary>
        /// <param name="sound">Sound system</param>
        /// <param name="chess">Chessboard</param>
        public Sailormoon(ref Sound sound,ref Chess chess)
        {
            img = Util.LoadTexture(Util.CurrentExecutionPath + "/gfx/sailormoon.jpg");

            bakground = chess;
            snd = sound;
            snd.CreateSound(Sound.FileType.Ogg, Util.CurrentExecutionPath + "/Samples/SailorJap.ogg", "Moon");
            LastDate = string.Empty;
        }
예제 #8
0
        /// <summary>
        /// Constructor for Chip and Dale effect
        /// </summary>
        /// <param name="sound">Sound system</param>
        /// <param name="chess">Chessboard</param>
        public ChipAndDale(ref Sound sound,ref Chess chess)
        {
            img = Util.LoadTexture(Util.CurrentExecutionPath + "/gfx/chipanddale.bmp", TextureMinFilter.Linear, TextureMagFilter.Linear, TextureWrapMode.Clamp, TextureWrapMode.Clamp, System.Drawing.Color.FromArgb(255, 0, 255));

            bakground = chess;
            snd = sound;
            snd.CreateSound(Sound.FileType.Ogg, Util.CurrentExecutionPath + "/Samples/chipanddale.ogg", "Chip");
            LastDate = string.Empty;
        }
예제 #9
0
        /// <summary>
        /// Constructor for Talespin effect
        /// </summary>
        /// <param name="sound">Sound system</param>
        public Talespin(ref Sound sound)
        {
            x = -1.0f;
            y = 0.0f;
            seaDuck = Util.LoadTexture(Util.CurrentExecutionPath + "/gfx/seaDuck.bmp", TextureMinFilter.Linear, TextureMagFilter.Linear, TextureWrapMode.Clamp, TextureWrapMode.Clamp, System.Drawing.Color.FromArgb(255, 0, 255));

            snd = sound;
            snd.CreateSound(Sound.FileType.Ogg, Util.CurrentExecutionPath + "/Samples/Talespin.ogg", "Talespin");
            LastDate = string.Empty;
        }
예제 #10
0
파일: Drink.cs 프로젝트: wach78/Turbofest
        public Drink(ref Sound sound)
        {
            image = Util.LoadTexture(System.IO.Path.GetDirectoryName(System.Windows.Forms.Application.ExecutablePath) + "/gfx/ibeer.png");
            snd = sound;

            snd.CreateSound(Sound.FileType.Ogg, Util.CurrentExecutionPath + "/Samples/Drink.ogg", "Drink");
            b = new Beer();
            disposed = false;
            LastDate = string.Empty;
        }
예제 #11
0
파일: Zelda.cs 프로젝트: wach78/Turbofest
 /// <summary>
 /// Constructor for Zelda effect
 /// </summary>
 /// <param name="sound">Sound system</param>
 /// <param name="chess">Chessboard</param>
 public Zelda(ref Sound sound,ref Chess chess)
 {
     zelda = Util.LoadTexture(System.IO.Path.GetDirectoryName(System.Windows.Forms.Application.ExecutablePath) + "/gfx/Zelda.png", TextureMinFilter.Linear, TextureMagFilter.Linear, TextureWrapMode.Clamp, TextureWrapMode.Clamp, System.Drawing.Color.FromArgb(255, 0, 255));
     link = Util.LoadTexture(System.IO.Path.GetDirectoryName(System.Windows.Forms.Application.ExecutablePath) + "/gfx/Link.png", TextureMinFilter.Linear, TextureMagFilter.Linear, TextureWrapMode.Clamp, TextureWrapMode.Clamp, System.Drawing.Color.FromArgb(255, 0, 255));
     ganon = Util.LoadTexture(System.IO.Path.GetDirectoryName(System.Windows.Forms.Application.ExecutablePath) + "/gfx/Ganon.png", TextureMinFilter.Linear, TextureMagFilter.Linear, TextureWrapMode.Clamp, TextureWrapMode.Clamp, System.Drawing.Color.FromArgb(255, 0, 255));
     bakground = chess;
     snd = sound;
     snd.CreateSound(Sound.FileType.Ogg, System.IO.Path.GetDirectoryName(System.Windows.Forms.Application.ExecutablePath) + "/Samples/zeldaNES.ogg", "Zelda");
     LastDate = string.Empty;
     showGanon = false;
 }
예제 #12
0
파일: Dif.cs 프로젝트: wach78/Turbofest
        /// <summary>
        /// Constructor for Degerfors IF effect
        /// </summary>
        /// <param name="chess"></param>
        /// <param name="sound"></param>
        public Dif(ref Chess chess, ref Sound sound)
        {
            bakground = chess;
            x = 0.0f;
            y = 0.0f;
            image = Util.LoadTexture(Util.CurrentExecutionPath + "/gfx/dif2.bmp", TextureMinFilter.Linear, TextureMagFilter.Linear, TextureWrapMode.Clamp, TextureWrapMode.Clamp, System.Drawing.Color.FromArgb(255, 0, 255));
            snd = sound;
            tick = 0;
            LastDate = string.Empty;

            snd.CreateSound(Sound.FileType.Ogg, Util.CurrentExecutionPath + "/Samples/imperial.ogg", "Dif");
        }
예제 #13
0
파일: Outro.cs 프로젝트: wach78/Turbofest
        /// <summary>
        /// Constructor for Outro effect
        /// </summary>
        /// <param name="sound">Sound system</param>
        public Outro(ref Sound sound)
        {
            image = Util.LoadTexture(Util.CurrentExecutionPath + "/gfx/BOSD.bmp", TextureMinFilter.Linear, TextureMagFilter.Linear, TextureWrapMode.Clamp, TextureWrapMode.Clamp, System.Drawing.Color.FromArgb(255, 0, 255));
            snd = sound;
            //snd.CreateSound(Sound.FileType.WAV, Util.CurrentExecutionPath + "/Samples/Blackheart.wav", "Outro");
            snd.CreateSound(Sound.FileType.Ogg, Util.CurrentExecutionPath + "/Samples/Blackheart.ogg", "Outro");

            disposed = false;
            ticks = 0;
            oldTicks = 0;
            delyed = false;
        }
예제 #14
0
파일: Quiz.cs 프로젝트: wach78/Turbofest
        /// <summary>
        /// Constructor for Quiz effect
        /// </summary>
        /// <param name="Text">Text printer</param>
        /// <param name="BuiltInFont">Use build in fonts for the text?</param>
        /// <param name="sound">Sound system</param>
        public Quiz(ref Text2D Text, bool BuiltInFont, ref Sound sound)
        {
            listquotes = new List<string>();
            indexList = new List<int>();
            maxIndexValue = 0;
            text = Text;
            builtInFont = BuiltInFont;
            snd = sound;
            snd.CreateSound(Sound.FileType.Ogg, Util.CurrentExecutionPath + "/Samples/Yoda.ogg", "YODA");

            readFromXml();
            drawInit(builtInFont);
        }
예제 #15
0
        /// <summary>
        /// Constructor for Ghostbusters effect
        /// </summary>
        /// <param name="sound">Sound system</param>
        public GhostBusters(ref Sound sound)
        {
            img = Util.LoadTexture(Util.CurrentExecutionPath + "/gfx/ghostbusters.jpg");
            slime = Util.LoadTexture(Util.CurrentExecutionPath + "/gfx/slimer.bmp", TextureMinFilter.Linear, TextureMagFilter.Linear, TextureWrapMode.Clamp, TextureWrapMode.Clamp, System.Drawing.Color.FromArgb(255, 0, 255));

            snd = sound;
            snd.CreateSound(Sound.FileType.Ogg, Util.CurrentExecutionPath + "/Samples/GhostBuster.ogg", "GhostBusters");
            LastDate = string.Empty;

            this.x = -1.0f;
            this.y = 0.0f;
            this.tick = 0;
        }
예제 #16
0
        /// <summary>
        /// constructor of National day effect
        /// </summary>
        /// <param name="chess">Chessboard</param>
        /// <param name="sound">Sound system</param>
        public National(ref Chess chess, ref Sound sound)
        {
            ticks = 0;
            oldTicks = 0;

            currentImage = 0;
            bakground = chess;
            snd = sound;
            LastDate = string.Empty;

            image = Util.LoadTexture(Util.CurrentExecutionPath + "/gfx/flagga.bmp", TextureMinFilter.Linear, TextureMagFilter.Linear, TextureWrapMode.Clamp, TextureWrapMode.Clamp, System.Drawing.Color.FromArgb(255, 0, 255));
            snd.CreateSound(Sound.FileType.Ogg, Util.CurrentExecutionPath + "/Samples/Du gamla du fria (Black Ingvars).ogg", "National");
        }
예제 #17
0
파일: Self.cs 프로젝트: wach78/Turbofest
        /// <summary>
        /// Constructor for Self effect
        /// </summary>
        /// <param name="sound">Sound system</param>
        public Self(ref Sound sound)
        {
            imageWach = Util.LoadTexture(Util.CurrentExecutionPath + "/gfx/wach.bmp", TextureMinFilter.Linear, TextureMagFilter.Linear, TextureWrapMode.Clamp, TextureWrapMode.Clamp, System.Drawing.Color.FromArgb(255, 0, 255));
            imageKamikazE = Util.LoadTexture(Util.CurrentExecutionPath + "/gfx/kze.bmp", TextureMinFilter.Linear, TextureMagFilter.Linear, TextureWrapMode.Clamp, TextureWrapMode.Clamp, System.Drawing.Color.FromArgb(255, 0, 255));
            randomImage = (Util.Rnd.Next(0, 100)<50? 0:1);
            snd = sound;
            snd.CreateSound(Sound.FileType.Ogg, Util.CurrentExecutionPath + "/Samples/Tetris.ogg", "Self");

            tick = 0;
            x = 0.0f;
            y = 0.0f;

            CurrentDate = string.Empty;
        }
예제 #18
0
 /// <summary>
 /// Constructor for SuneAnimation
 /// </summary>
 /// <param name="sound">Sound system</param>
 /// <param name="Text">Text printer</param>
 public SuneAnimation(ref Sound sound, ref Text2D Text)
 {
     ticks = 0;
     oldTicks = 0;
     soundOldTicks = 0;
     soundOldTicks = 0;
     currentImage = 0;
     sh = new SuneTxtHandler(ref Text, false);
     snd = sound;
     //text = Text;
     LastPlayedDate = string.Empty;
     image = Util.LoadTexture(Util.CurrentExecutionPath + "/gfx/sune_sprite.bmp");
     //snd.CreateSound(Sound.FileType.WAV, Util.CurrentExecutionPath + "/Samples/laugh.wav", "Sune");
     snd.CreateSound(Sound.FileType.Ogg, Util.CurrentExecutionPath + "/Samples/laugh.ogg", "Sune");
 }
예제 #19
0
파일: Gummi.cs 프로젝트: wach78/Turbofest
        /// <summary>
        /// Constructor for GummiBears effect
        /// </summary>
        /// <param name="sound">Sound system</param>
        public GummiBears(ref Sound sound)
        {
            PlayedSongs = new List<int>();
            snd = sound;

            songName = new string[8];
            songName[0] = "GummiSwe";
            songName[1] = "GummiDan";
            songName[2] = "GummiEng";
            songName[3] = "GummiGer";
            songName[4] = "GummiJap";
            songName[5] = "GummiNor";
            songName[6] = "GummiPol";
            songName[7] = "GummiRus";

            textures = new int[7]; // there are 7 in the "newer" gummi bears, 6 in the older (Gusto is a new one)...
            textures[0] = Util.LoadTexture(Util.CurrentExecutionPath + "/gfx/zummi.bmp", TextureMinFilter.Linear, TextureMagFilter.Linear, TextureWrapMode.Clamp, TextureWrapMode.Clamp, Color.FromArgb(255, 0, 255));
            textures[1] = Util.LoadTexture(Util.CurrentExecutionPath + "/gfx/grammi.bmp", TextureMinFilter.Linear, TextureMagFilter.Linear, TextureWrapMode.Clamp, TextureWrapMode.Clamp, Color.FromArgb(255, 0, 255));
            textures[2] = Util.LoadTexture(Util.CurrentExecutionPath + "/gfx/tummi.bmp", TextureMinFilter.Linear, TextureMagFilter.Linear, TextureWrapMode.Clamp, TextureWrapMode.Clamp, Color.FromArgb(255, 0, 255));
            textures[3] = Util.LoadTexture(Util.CurrentExecutionPath + "/gfx/gruffi.bmp", TextureMinFilter.Linear, TextureMagFilter.Linear, TextureWrapMode.Clamp, TextureWrapMode.Clamp, Color.FromArgb(255, 0, 255));
            textures[4] = Util.LoadTexture(Util.CurrentExecutionPath + "/gfx/sunni.bmp", TextureMinFilter.Linear, TextureMagFilter.Linear, TextureWrapMode.Clamp, TextureWrapMode.Clamp, Color.FromArgb(255, 0, 255));
            textures[5] = Util.LoadTexture(Util.CurrentExecutionPath + "/gfx/cubbi.bmp", TextureMinFilter.Linear, TextureMagFilter.Linear, TextureWrapMode.Clamp, TextureWrapMode.Clamp, Color.FromArgb(255, 0, 255));
            textures[6] = Util.LoadTexture(Util.CurrentExecutionPath + "/gfx/gusto.bmp", TextureMinFilter.Linear, TextureMagFilter.Linear, TextureWrapMode.Clamp, TextureWrapMode.Clamp, Color.FromArgb(255, 0, 255));
            snd.CreateSound(Sound.FileType.Ogg, Util.CurrentExecutionPath + "/Samples/GummiBears-Swedish.ogg", songName[0]);
            snd.CreateSound(Sound.FileType.Ogg, Util.CurrentExecutionPath + "/Samples/GummiBears-Danish.ogg", songName[1]);
            snd.CreateSound(Sound.FileType.Ogg, Util.CurrentExecutionPath + "/Samples/GummiBears-English.ogg", songName[2]);
            snd.CreateSound(Sound.FileType.Ogg, Util.CurrentExecutionPath + "/Samples/GummiBears-German.ogg", songName[3]);
            snd.CreateSound(Sound.FileType.Ogg, Util.CurrentExecutionPath + "/Samples/GummiBears-Japanese.ogg", songName[4]);
            snd.CreateSound(Sound.FileType.Ogg, Util.CurrentExecutionPath + "/Samples/GummiBears-Norwegian.ogg", songName[5]);
            snd.CreateSound(Sound.FileType.Ogg, Util.CurrentExecutionPath + "/Samples/GummiBears-Polish.ogg", songName[6]);
            snd.CreateSound(Sound.FileType.Ogg, Util.CurrentExecutionPath + "/Samples/GummiBears-Russian.ogg", songName[7]);

            currentSound = Util.Rnd.Next(0, songName.Length); // do this random and add to list of played?
            PlayedSongs.Add(currentSound);
            LastPlayedDate = string.Empty;
            Bears = new Bear[7];
            // left max = 1.2, right max = -1.7,
            Bears[0] = new Bear(0.4f, 0.4f, 1.0f, -0.5f, 0.40006f, Util.Rnd.Next(2000, 6500) / 1000000.0f, 0.0045f, textures[0]);
            Bears[1] = new Bear(0.4f, 0.4f, 0.75f, 0.0f, 0.40005f, Util.Rnd.Next(2000, 6500) / 1000000.0f, 0.0045f, textures[1]);
            Bears[2] = new Bear(0.4f, 0.4f, 0.5f, 0.0f, 0.40004f, Util.Rnd.Next(2000, 6500) / 1000000.0f, 0.0045f, textures[2]);
            Bears[3] = new Bear(0.4f, 0.4f, 0.0f, 0.0f, 0.40003f, Util.Rnd.Next(2000, 6500) / 1000000.0f, 0.0045f, textures[3]);
            Bears[4] = new Bear(0.25f, 0.35f, -0.5f, 0.0f, 0.40002f, Util.Rnd.Next(2000, 6500) / 1000000.0f, 0.0045f, textures[4]);
            Bears[5] = new Bear(0.3f, 0.3f, -1.0f, 0.0f, 0.40001f, Util.Rnd.Next(2000, 6500) / 1000000.0f, 0.0045f, textures[5]);
            Bears[6] = new Bear(0.4f, 0.4f, -1.5f, 0.0f, 0.40000f, Util.Rnd.Next(2000, 6500) / 1000000.0f, 0.0045f, textures[6]);
        }
예제 #20
0
        /// <summary>
        /// Constructor for Datasmurf effect
        /// </summary>
        /// <param name="sound">Sound system</param>
        /// <param name="txt">Text printing</param>
        public Datasmurf(ref Sound sound, ref Text2D txt)
        {
            x = -1.0f;
            y = 0.0f;
            image = Util.LoadTexture(Util.CurrentExecutionPath + "/gfx/dataSmurf.bmp", TextureMinFilter.Linear, TextureMagFilter.Linear, TextureWrapMode.Clamp, TextureWrapMode.Clamp, System.Drawing.Color.FromArgb(255,0,255));

            snd = sound;
            text = txt;
            //snd.CreateSound(Sound.FileType.WAV, Util.CurrentExecutionPath + "/Samples/datasmurf.wav", "Smurf");
            snd.CreateSound(Sound.FileType.Ogg, Util.CurrentExecutionPath + "/Samples/datasmurf.ogg", "Smurf");

            tick = 0;
            LastDate = string.Empty;

            currentImage = 0;
            ticks = oldTicks = 0;
        }
예제 #21
0
        /// <summary>
        /// Constructor for TeknatStyle effect
        /// </summary>
        /// <param name="chess">Chessboard</param>
        /// <param name="sound">Sound system</param>
        /// <param name="txt">Text printer</param>
        public TeknatStyle(ref Chess chess, ref Sound sound, ref Text2D txt)
        {
            disposed = false;
            slideshowImage1 = Util.LoadTexture(Util.CurrentExecutionPath + "/gfx/bildspel1.jpg");
            slideshowImage2 = Util.LoadTexture(Util.CurrentExecutionPath + "/gfx/bildspel2.jpg");
            slideshowImage3 = Util.LoadTexture(Util.CurrentExecutionPath + "/gfx/bildspel3.jpg");
            snd = sound;
            bakground = chess;
            text = txt;

            snd.CreateSound(Sound.FileType.Ogg, Util.CurrentExecutionPath + "/Samples/ts.ogg", "TS");
            currentImage = 0;
            currentSlideShow = 0;

            LastDate = string.Empty;
            ticks = 0;
            oldTicks = 0;
        }
예제 #22
0
파일: Nerdy.cs 프로젝트: wach78/Turbofest
        /// <summary>
        /// Constructor for Nerdy effect
        /// </summary>
        /// <param name="chess">Chessboard</param>
        /// <param name="sound">Sound system</param>
        public Nerdy(ref Chess chess, ref Sound sound)
        {
            disposed = false;
            n1 = Util.LoadTexture(Util.CurrentExecutionPath + "/gfx/n1.jpg");
            n2 = Util.LoadTexture(Util.CurrentExecutionPath + "/gfx/n2.jpg");
            n3 = Util.LoadTexture(Util.CurrentExecutionPath + "/gfx/n3.jpg");
            n4 = Util.LoadTexture(Util.CurrentExecutionPath + "/gfx/n4.jpg");
            n5 = Util.LoadTexture(Util.CurrentExecutionPath + "/gfx/n5.png");
            n6 = Util.LoadTexture(Util.CurrentExecutionPath + "/gfx/n6.png");
            snd = sound;
            bakground = chess;

            snd.CreateSound(Sound.FileType.Ogg, Util.CurrentExecutionPath + "/Samples/Nerdy.ogg", "Nerdy");
            currentImage = 0;

            LastDate = string.Empty;
            ticks = 0;
            oldTicks = 0;
        }
예제 #23
0
파일: Rms.cs 프로젝트: wach78/Turbofest
 /// <summary>
 /// Constructor for Richard Stalman effect
 /// </summary>
 /// <param name="sound">Sound system</param>
 /// <param name="text">Text printer</param>
 public RMS(ref Sound sound, ref Text2D text)
 {
     snd = sound;
     txt = text;
     texture = Util.LoadTexture(Util.CurrentExecutionPath + "/gfx/rms.jpg", TextureMinFilter.Linear, TextureMagFilter.Linear, TextureWrapMode.Clamp, TextureWrapMode.Clamp, Color.Yellow);
     snd.CreateSound(Sound.FileType.Ogg, Util.CurrentExecutionPath + "/Samples/free.ogg", "rms");
     SongText = new string[9];
     CurrentRow = -1;
     DelayRow = 3500; // milisecond
     LastPlayedDate = string.Empty;
     SongText[0] = "Join us now and share the software. You'll be free, hackers, you'll be free.";
     SongText[1] = "Join us now and share the software. You'll be free, hackers, you'll be free.";
     SongText[2] = "Hoarders can get piles of money, That is true, hackers, that is true.";
     SongText[3] = "But they cannot help their neighbors; That's not good, hackers, that's not good.";
     SongText[4] = "When we have enough free software At our call, hackers, at our call.";
     SongText[5] = "We'll kick out those dirty licenses Ever more, hackers, ever more.";
     SongText[6] = "Join us now and share the software. You'll be free, hackers, you'll be free.";
     SongText[7] = "Join us now and share the software. You'll be free, hackers, you'll be free.";
     //SongText[8] = "Richard Stallman - a true hacker's birthday!";
     SongText[8] = "Richard Stallman - a true hacker!";
     lastTick = DateTime.Now.Ticks / TimeSpan.TicksPerMillisecond; // lastTick is in milisecond
 }
예제 #24
0
        /// <summary>
        /// Constructor for Christmas effect
        /// </summary>
        /// <param name="sound">Sound system</param>
        public Christmas(ref Sound sound)
        {
            image = Util.LoadTexture(Util.CurrentExecutionPath + "/gfx/xmas.bmp");
            image2 = Util.LoadTexture(Util.CurrentExecutionPath + "/gfx/godjul.bmp", TextureMinFilter.Linear, TextureMagFilter.Linear, TextureWrapMode.Clamp, TextureWrapMode.Clamp, System.Drawing.Color.FromArgb(255, 0, 255));
            snowImage = Util.LoadTexture(Util.CurrentExecutionPath + "/gfx/snow1_db.bmp", TextureMinFilter.Linear, TextureMagFilter.Linear, TextureWrapMode.Clamp, TextureWrapMode.Clamp, System.Drawing.Color.FromArgb(255, 0, 255));

            currentImage = 0;
            snd = sound;
            //snd.CreateSound(Sound.FileType.WAV, Util.CurrentExecutionPath + "/Samples/xmas.wav", "smurf");
            snd.CreateSound(Sound.FileType.Ogg, Util.CurrentExecutionPath + "/Samples/xmas.ogg", "XMAS");

            LastDate = string.Empty;
            tick = 0;

            x = 1;
            y = 0;

            //Random r = new Random();
            sf = new SnowFlake[NUMBEROFFLAKES];

            float z = 0.4f;

            for (int i = 0; i < NUMBEROFFLAKES; i++)
            {

                sf[i] = new SnowFlake((Util.Rnd.Next(-18, 15)) / 10.0f, (Util.Rnd.Next(-10, 20) * -1) / 10.0f, Util.Rnd.Next(2, 8) / 1000.0f, snowImage,
                    new Vector2[] {  new Vector2(0.0f + (currentImage * 0.2f), 1.0f),
                                     new Vector2(0.2f + (currentImage * 0.2f), 1.0f),
                                     new Vector2(0.2f + (currentImage * 0.2f), 0.0f),
                                     new Vector2(0.0f + (currentImage * 0.2f), 0.0f)}, Util.Rnd.Next(5, 10) * 10.0f, z);

                z -= 0.00001f;
                currentImage++;

                if (currentImage == 4)
                    currentImage = 0;
            }
        }
예제 #25
0
파일: Easter.cs 프로젝트: wach78/Turbofest
        /// <summary>
        /// Constructor for Easter effect
        /// </summary>
        /// <param name="sound">Sound system</param>
        public Easter(ref Sound sound)
        {
            image = Util.LoadTexture(Util.CurrentExecutionPath + "/gfx/gladpask.bmp", TextureMinFilter.Linear, TextureMagFilter.Linear, TextureWrapMode.Clamp, TextureWrapMode.Clamp, System.Drawing.Color.FromArgb(255, 0, 255));
            image2 = Util.LoadTexture(Util.CurrentExecutionPath + "/gfx/chicken.bmp", TextureMinFilter.Linear, TextureMagFilter.Linear, TextureWrapMode.Clamp, TextureWrapMode.Clamp, System.Drawing.Color.FromArgb(255, 0, 255));
            eggImage = Util.LoadTexture(Util.CurrentExecutionPath + "/gfx/eggs.bmp", TextureMinFilter.Linear, TextureMagFilter.Linear, TextureWrapMode.Clamp, TextureWrapMode.Clamp, System.Drawing.Color.FromArgb(255, 0, 255));

            currentImage = 0;
            curruntEggImage = 0;
            ticks = 0;
            oldTicks = 0;
            snd = sound;
            snd.CreateSound(Sound.FileType.Ogg, Util.CurrentExecutionPath + "/Samples/Gullefjun.ogg", "Easter");
            xc = 0;
            LastDate = string.Empty;
            tick = 0;
            x = 1;
            y = 0;

            egg = new Eggs[NUMBEROFFEGGS];

            float z = 0.4f;

            for (int i = 0; i < NUMBEROFFEGGS; i++)
            {

                egg[i] = new Eggs((Util.Rnd.Next(-18, 15)) / 10.0f, (Util.Rnd.Next(-10, 20) * -1) / 10.0f, Util.Rnd.Next(2, 8) / 1000.0f, eggImage,
                    new Vector2[] {  new Vector2(0.0f + (curruntEggImage * 0.2f), 1.0f),
                                     new Vector2(0.2f + (curruntEggImage * 0.2f), 1.0f),
                                     new Vector2(0.2f + (curruntEggImage * 0.2f), 0.0f),
                                     new Vector2(0.0f + (curruntEggImage * 0.2f), 0.0f)}, Util.Rnd.Next(5, 10) * 10.0f, z);

                z -= 0.00001f;
                curruntEggImage++;

                if (curruntEggImage == 4)
                    curruntEggImage = 0;
            }
        }
예제 #26
0
파일: Tardis.cs 프로젝트: wach78/Turbofest
        /// <summary>
        /// Constructor for Tardis effect
        /// </summary>
        /// <param name="sound">Sound system</param>
        public Tardis(ref Sound sound)
        {
            vortex = Util.LoadTexture(System.IO.Path.GetDirectoryName(System.Windows.Forms.Application.ExecutablePath) + "/gfx/timeVortex.jpg");
            tardis = Util.LoadTexture(System.IO.Path.GetDirectoryName(System.Windows.Forms.Application.ExecutablePath) + "/gfx/TARDIS.png", TextureMinFilter.Linear, TextureMagFilter.Linear, TextureWrapMode.Clamp, TextureWrapMode.Clamp, System.Drawing.Color.FromArgb(255, 0, 255));
            lightning = Util.LoadTexture(System.IO.Path.GetDirectoryName(System.Windows.Forms.Application.ExecutablePath) + "/gfx/lightning.png", TextureMinFilter.Linear, TextureMagFilter.Linear, TextureWrapMode.Clamp, TextureWrapMode.Clamp, System.Drawing.Color.FromArgb(255, 0, 255));
            lightning2 = Util.LoadTexture(System.IO.Path.GetDirectoryName(System.Windows.Forms.Application.ExecutablePath) + "/gfx/lightning2.png", TextureMinFilter.Linear, TextureMagFilter.Linear, TextureWrapMode.Clamp, TextureWrapMode.Clamp, System.Drawing.Color.FromArgb(255, 0, 255));

            snd = sound;
            snd.CreateSound(Sound.FileType.Ogg, System.IO.Path.GetDirectoryName(System.Windows.Forms.Application.ExecutablePath) + "/Samples/TARDIS.ogg", "Tardis");
            LastDate = string.Empty;

            this.x = -1.0f;
            this.y = 0.0f;
            this.tick = 0;
            this.ticks = 0;
            this.oldTicks = 0;
            this.z1 = 0.3f;
            this.z2 = 0.5f;
            this.lightningx = 0.0f;
            this.lightningy = 0.0f;
            xlist = new List<float>(new float[] { 0.2f, 0.4f, 0.6f, 0.8f,1.0f,1.2f });
            ylist = new List<float>(new float[] { 0.1f, 0.2f, 0.3f, 0.4f });
        }
예제 #27
0
        /// <summary>
        /// Constructor for Birthday effect
        /// </summary>
        /// <param name="sound">Sound system</param>
        /// <param name="txt">Text printing done with this</param>
        /// <param name="chess">Chessboard</param>
        public Birthday(ref Sound sound, ref Text2D txt, ref Chess chess)
        {
            image = Util.LoadTexture(Util.CurrentExecutionPath + "/gfx/tarta.bmp", TextureMinFilter.Linear, TextureMagFilter.Linear, TextureWrapMode.Clamp, TextureWrapMode.Clamp, System.Drawing.Color.FromArgb(255, 0, 255));
            ballonsImage = Util.LoadTexture(Util.CurrentExecutionPath + "/gfx/ballons2.bmp", TextureMinFilter.Linear, TextureMagFilter.Linear, TextureWrapMode.Clamp, TextureWrapMode.Clamp, System.Drawing.Color.FromArgb(255, 0, 255));
            snd = sound;
            text = txt;
            this.chess = chess;
            x = 0.0f;
            leftborder = false;
            rightborder = true;
            randomFontt = 0;
            randomFont();

            //snd.CreateSound(Sound.FileType.WAV, Util.CurrentExecutionPath + "/Samples/birthday.wav", "Birthday");
            snd.CreateSound(Sound.FileType.Ogg, Util.CurrentExecutionPath + "/Samples/birthday.ogg", "Birthday");
            currentImage = 0;

            b = new Ballons[NUMBEROFBALLONS];
            float z = 0.4f;

            for (int i = 0; i < NUMBEROFBALLONS; i++)
            {
                b[i] = new Ballons((Util.Rnd.Next(-18, 15)) / 10.0f, (Util.Rnd.Next(-10, 20) * -1) / 10.0f, Util.Rnd.Next(2, 8) / 1000.0f, ballonsImage,
                    new Vector2[] {  new Vector2(0.0f + (currentImage * 0.2f), 1.0f),
                                     new Vector2(0.2f + (currentImage * 0.2f), 1.0f),
                                     new Vector2(0.2f + (currentImage * 0.2f), 0.0f),
                                     new Vector2(0.0f + (currentImage * 0.2f), 0.0f)}, Util.Rnd.Next(5, 10) * 10.0f, z);

                z -= 0.00001f;
                currentImage++;

                if (currentImage == 4)
                    currentImage = 0;

            }//for
        }
예제 #28
0
        /// <summary>
        /// Constructor for TurboLogo effect
        /// </summary>
        /// <param name="sound">Sound system</param>
        /// <param name="chess">Chessboard</param>
        /// <param name="VT">Vårtermin?</param>
        public TurboLogo(ref Sound sound, ref Chess chess,bool VT = true)
        {
            if (Util.Rnd.Next(0, 10) < 6)
            {
                moveUp = false;
            }
            else
            {
                moveUp = true;
            }
            if (Util.Rnd.Next(0,10) < 6)
            {
                moveLeft = false;
            }
            else
            {
                moveLeft = true;
            }

            bakground = chess;
            snd = sound;
            randomChess();

            //snd.CreateSound(Sound.FileType.WAV, Util.CurrentExecutionPath + "/Samples/roadrunner.wav", "roadrunner");
            snd.CreateSound(Sound.FileType.Ogg, Util.CurrentExecutionPath + "/Samples/roadrunner.ogg", "roadrunner");

            VTColour = VT;

            moveX = 0.0075f;
            moveY = 0.0075f;
            X = Y = 0.0f;

            //Bitmaps for making the 4 different layouts
            Bitmap bitmap = new Bitmap(Util.CurrentExecutionPath + "/gfx/roadrunner.bmp");
            Bitmap bmSprite = new Bitmap(bitmap.Width*2,bitmap.Height*2);

            Graphics g = Graphics.FromImage(bmSprite);
            g.TextRenderingHint = System.Drawing.Text.TextRenderingHint.AntiAliasGridFit;
            g.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.AntiAlias;

            g.DrawImage(bitmap, 0, 0, bitmap.Width, bitmap.Height);
            g.DrawImage(bitmap, 0, bitmap.Height, bitmap.Width, bitmap.Height);
            bitmap.RotateFlip(RotateFlipType.Rotate180FlipY);
            g.DrawImage(bitmap, bitmap.Width, 0, bitmap.Width, bitmap.Height);
            g.DrawImage(bitmap, bitmap.Width, bitmap.Height, bitmap.Width, bitmap.Height);

            // verify that this is not missing as it will crash if not possible to find...
            // this makes bad resolution on text, it can get distorted...
            // top left
            g.DrawString("Turbophesten", new Font("Tahoma", 19.0f, FontStyle.Italic | FontStyle.Bold), Brushes.Black, 75, 135);
            g.DrawString("Örebro 2013", new Font("Tahoma", 19.0f, FontStyle.Italic | FontStyle.Bold), Brushes.Black, 72, 160);
            // top right
            g.DrawString("Turbophesten", new Font("Tahoma", 19.0f, FontStyle.Italic | FontStyle.Bold), Brushes.Black, bitmap.Width + 35, 135);
            g.DrawString("Örebro 2013", new Font("Tahoma", 19.0f, FontStyle.Italic | FontStyle.Bold), Brushes.Black, bitmap.Width + 55, 160);
            // bottom left
            g.DrawString("Turbophesten", new Font("Tahoma", 18.0f, FontStyle.Italic | FontStyle.Bold), Brushes.Black, 75, bitmap.Height + 135);
            g.DrawString("Örebro 2013", new Font("Tahoma", 18.0f, FontStyle.Italic | FontStyle.Bold), Brushes.Black, 72, bitmap.Height + 160);
            //bottom right
            g.DrawString("Turbophesten", new Font("Tahoma", 18.0f, FontStyle.Italic | FontStyle.Bold), Brushes.Black, bitmap.Width + 35, bitmap.Height + 135);
            g.DrawString("Örebro 2013", new Font("Tahoma", 18.0f, FontStyle.Italic | FontStyle.Bold), Brushes.Black, bitmap.Width + 55, bitmap.Height + 160);

            g.Dispose();
            //End Bitmap creation and edits
            bmSprite.MakeTransparent(Color.Magenta);
            // change yellow (255, 214, 0) to blue and ?
            for (int y = bitmap.Height; y < bmSprite.Height; y++)
            {
                for (int x = 0; x < bmSprite.Width; x++)
                {
                    Color col = bmSprite.GetPixel(x, y);
                    if (col.R == 255 && col.G == 214 && col.B == 0)
                    {
                        bmSprite.SetPixel(x, y, Color.FromArgb(0, 187, 255));
                    }
                }
            }

            BitmapData data = bmSprite.LockBits(new System.Drawing.Rectangle(0, 0, bmSprite.Width, bmSprite.Height),
                ImageLockMode.ReadOnly, System.Drawing.Imaging.PixelFormat.Format32bppArgb);

            Util.GenTextureID(out texture);
            GL.BindTexture(TextureTarget.Texture2D, texture);
            GL.TexImage2D(TextureTarget.Texture2D, 0, PixelInternalFormat.Rgba, data.Width, data.Height, 0,
                OpenTK.Graphics.OpenGL.PixelFormat.Bgra, PixelType.UnsignedByte, data.Scan0);
            GL.TexParameter(TextureTarget.Texture2D, TextureParameterName.TextureMinFilter, (int)TextureMinFilter.Linear);
            GL.TexParameter(TextureTarget.Texture2D, TextureParameterName.TextureMagFilter, (int)TextureMagFilter.Linear);
            GL.TexParameter(TextureTarget.Texture2D, TextureParameterName.TextureWrapS, (int)TextureWrapMode.Clamp);
            GL.TexParameter(TextureTarget.Texture2D, TextureParameterName.TextureWrapT, (int)TextureWrapMode.Clamp);

            bmSprite.UnlockBits(data);
            bmSprite.Dispose();
            bitmap.Dispose();
            data = null;
            bmSprite = null;
            bitmap = null;

            //data = null;
            GL.BindTexture(TextureTarget.Texture2D, 0);
        }
예제 #29
-1
파일: Frozen.cs 프로젝트: wach78/Turbofest
        public Frozen(ref Sound sound)
        {
            image = Util.LoadTexture(Util.CurrentExecutionPath + "/gfx/Frozen.jpg", TextureMinFilter.Linear, TextureMagFilter.Linear, TextureWrapMode.Clamp, TextureWrapMode.Clamp, System.Drawing.Color.FromArgb(255, 0, 255));
            snd = sound;

            snd.CreateSound(Sound.FileType.Ogg, Util.CurrentExecutionPath + "/Samples/Frozen.ogg", "Frozen");
            disposed = false;
            LastDate = string.Empty;

            snowImage = Util.LoadTexture(Util.CurrentExecutionPath + "/gfx/snow1_db.bmp", TextureMinFilter.Linear, TextureMagFilter.Linear, TextureWrapMode.Clamp, TextureWrapMode.Clamp, System.Drawing.Color.FromArgb(255, 0, 255));
            currentImage = 0;
            sf = new SnowFlake[NUMBEROFFLAKES];
            float z = 0.4f;

            for (int i = 0; i < NUMBEROFFLAKES; i++)
            {

                sf[i] = new SnowFlake((Util.Rnd.Next(-18, 15)) / 10.0f, (Util.Rnd.Next(-10, 20) * -1) / 10.0f, Util.Rnd.Next(2, 8) / 1000.0f, snowImage,
                    new Vector2[] {  new Vector2(0.0f + (currentImage * 0.2f), 1.0f),
                                     new Vector2(0.2f + (currentImage * 0.2f), 1.0f),
                                     new Vector2(0.2f + (currentImage * 0.2f), 0.0f),
                                     new Vector2(0.0f + (currentImage * 0.2f), 0.0f)}, Util.Rnd.Next(5, 10) * 10.0f, z);

                z -= 0.00001f;
                currentImage++;

                if (currentImage == 4)
                    currentImage = 0;
            }
        }