Example #1
0
        public void Draw(GraphicsDevice graphics)
        {
            if (numTicks < 128)
            {
                int color = 255 - 2 * numTicks;
                graphics.FillScreen(color, color, color, 255);
            }
            else
            {
                graphics.FillScreen(0, 0, 0, 255);
            }
            DrawMessage(4 * 60, 16 * 60, 0, graphics, Message.ChaoslugStaff);
            DrawMessage(16 * 60, 24 * 60, 0, graphics, Message.ProjectLeader, Message.Macoto);
            DrawMessage(24 * 60, 32 * 60, 0, graphics, Message.Program, Message.Sinshu);
            DrawMessage(32 * 60, 40 * 60, 0, graphics, Message.Music, Message.Yutaka, Message.Yousuke, Message.Sinshu);
            DrawMessage(40 * 60, 48 * 60, 0, graphics, Message.Graphics, Message.Macoto, Message.Sinshu, Message.Iori);
            DrawMessage(48 * 60, 56 * 60, 0, graphics, Message.StageConstruction, Message.Crimson, Message.Zhon, Message.Tetsu, Message.Sinshu);
            DrawMessage(56 * 60, 64 * 60, 0, graphics, Message.Voice, Message.Zhon);
            DrawMessage(64 * 60, 72 * 60, 0, graphics, Message.SpecialThanks, Message.MiswMember);
            DrawMessage(72 * 60, 88 * 60, -128, graphics, Message.ThankYouForPlaying);
            DrawPenguin(72 * 60, 88 * 60, 32, graphics);

            if (forceExit)
            {
                if (forceExitCount < 16)
                {
                    graphics.FillScreen(0, 0, 0, 16 * forceExitCount);
                }
                else
                {
                    graphics.FillScreen(0, 0, 0, 255);
                }
            }
        }
Example #2
0
        public override void Draw(GraphicsDevice graphics)
        {
            int drawX = (int)Math.Round(position.X) - game.IntCameraX;
            int drawY = (int)Math.Round(position.Y) - game.IntCameraY;

            graphics.DrawImageAdd(GameImage.EnemyBullet, 32, 32, 0, 0, drawX - 16, drawY - 16, 255);
        }
Example #3
0
 public void Draw(GraphicsDevice graphics)
 {
     foreach (Thing thing in things)
     {
         thing.Draw(graphics);
     }
 }
Example #4
0
 public override void Draw(GraphicsDevice graphics)
 {
     int drawX = (int)Math.Round(position.X) - game.IntCameraX;
     int drawY = (int)Math.Round(position.Y) - game.IntCameraY;
     if (direction == Direction.Left)
     {
         int textureCol = animation / 4;
         if (openCount == -1)
         {
             graphics.DrawImageFix(GameImage.House, 64, 64, 0, textureCol, drawX, drawY, this);
         }
         else
         {
             graphics.DrawImageFix(GameImage.House, 64, 64, 1, openCount / 2, drawX, drawY, this);
         }
     }
     else
     {
         int textureCol = animation / 4;
         if (openCount == -1)
         {
             graphics.DrawImageFixFlip(GameImage.House, 64, 64, 0, textureCol, drawX, drawY, this);
         }
         else
         {
             graphics.DrawImageFixFlip(GameImage.House, 64, 64, 1, openCount / 2, drawX, drawY, this);
         }
     }
 }
Example #5
0
 public void Draw(GraphicsDevice graphics)
 {
     foreach (Bullet bullet in bullets)
     {
         bullet.Draw(graphics);
     }
 }
Example #6
0
 public override void DrawSomething(GraphicsDevice graphics)
 {
     if (showTitle)
     {
         graphics.DrawImage(GameImage.Title, 512, 256, (Settings.SCREEN_WIDTH - 512) / 2 - IntCameraX + 16, (Settings.SCREEN_HEIGHT - 256) / 2 - IntCameraY + 16);
     }
 }
Example #7
0
        public override void Draw(GraphicsDevice graphics)
        {
            int drawX = (int)Math.Round(position.X) - game.IntCameraX;
            int drawY = (int)Math.Round(position.Y) - game.IntCameraY;

            graphics.DrawImageRotate(GameImage.PlayerBullet, 32, 32, 1, animation, drawX, drawY, 28, 16, (int)Math.Round(direction));
        }
Example #8
0
 public void Draw(GraphicsDevice graphics)
 {
     foreach (Particle particle in particles)
     {
         particle.Draw(graphics);
     }
 }
Example #9
0
 public override void Draw(GraphicsDevice graphics)
 {
     int drawX = (int)Math.Round(position.X) - game.IntCameraX;
     int drawY = (int)Math.Round(position.Y) - game.IntCameraY;
     if (direction == Direction.Left)
     {
         if (idle)
         {
             graphics.DrawImageFix(GameImage.EggMachine, 128, 128, 0, animation, drawX, drawY, this);
         }
         else
         {
             graphics.DrawImageFix(GameImage.EggMachine, 128, 128, 1, animation, drawX, drawY, this);
         }
     }
     else
     {
         if (idle)
         {
             graphics.DrawImageFixFlip(GameImage.EggMachine, 128, 128, 0, animation, drawX, drawY, this);
         }
         else
         {
             graphics.DrawImageFixFlip(GameImage.EggMachine, 128, 128, 1, animation, drawX, drawY, this);
         }
     }
 }
Example #10
0
 public override void Draw(GraphicsDevice graphics)
 {
     int drawX = (int)Math.Round(position.X) - game.IntCameraX;
     int drawY = (int)Math.Round(position.Y) - game.IntCameraY;
     int r = (color <= 1 || color == 5) ? 255 : 0;
     int g = (color >= 3 && color <= 5) ? 255 : 0;
     int b = (color >= 1 && color <= 3) ? 255 : 0;
     graphics.DrawImageAdd(GameImage.Father, 128, 256, 0, 0, drawX, drawY, 255 - 32 * animation, r, g, b);
 }
Example #11
0
 public override void DrawBackground(GraphicsDevice graphics)
 {
     graphics.DrawImage(GameImage.Background4, 1024, 512, IntBackgroundX, IntBackgroundY, 64, 64, 64);
     for (int i = 0; i < 512; i++)
     {
         int y = (int)Math.Round(16 * Math.Sin(2 * Math.PI * (i + 0.5 * Ticks) / 128));
         int color = i + 2 * Ticks;
         graphics.DrawImageAdd(GameImage.Aurora, 2, 256, 0, i, IntBackgroundX + 2 * i, y, 128, GetAuroraColorR(color), GetAuroraColorG(color), GetAuroraColorB(color));
     }
 }
Example #12
0
 public override void Draw(GraphicsDevice graphics)
 {
     int drawX = (int)Math.Round(position.X) - game.IntCameraX - 8;
     int drawY = (int)Math.Round(position.Y) - game.IntCameraY - 8;
     if (animation < 48)
     {
         graphics.DrawImage(GameImage.Debris, 16, 16, type, animation / 2 % 8, drawX, drawY, 64, 64, 64);
     }
     else
     {
         graphics.DrawImageAlpha(GameImage.Debris, 16, 16, type, animation / 2 % 8, drawX, drawY, 255 - 16 * (animation - 48), 64, 64, 64);
     }
 }
Example #13
0
 public void Draw2(GraphicsDevice graphics)
 {
     if (playerExited)
     {
         int drawX = (int)Math.Round(position.X - game.IntCameraX);
         int drawY = (int)Math.Round(position.Y - game.IntCameraY);
         if (slideCount > 0)
         {
             graphics.DrawImage2(GameImage.Block, 76 + slideCount, 196, 20 - slideCount, 60, drawX + 12, drawY + 4);
             graphics.DrawImage2(GameImage.Block, 96, 196, 20 - slideCount, 60, drawX + 32 + slideCount, drawY + 4);
         }
     }
 }
Example #14
0
 public override void Draw(GraphicsDevice graphics)
 {
     int drawX = (int)Math.Round(position.X) - game.IntCameraX;
     int drawY = (int)Math.Round(position.Y) - game.IntCameraY;
     if (direction == Direction.Left)
     {
         graphics.DrawImageAdd(GameImage.EnemyBullet, 32, 128, 1, animation / 2, drawX - 16, drawY, energy < 16 ? 16 * energy : 255);
     }
     else
     {
         graphics.DrawImageAdd(GameImage.EnemyBullet, 32, 128, 1, animation / 2, drawX + 16, drawY, energy < 16 ? 16 * energy : 255);
     }
 }
Example #15
0
 public override void Draw(GraphicsDevice graphics)
 {
     int drawX = (int)Math.Round(position.X) - game.IntCameraX;
     int drawY = (int)Math.Round(position.Y) - game.IntCameraY;
     if (direction == Direction.Left)
     {
         int textureCol = animation / 4;
         if (!attacking)
         {
             graphics.DrawImageFix(GameImage.Kyoro, 64, 64, 0, textureCol, drawX, drawY, this);
         }
         else
         {
             if (attackCount < 8)
             {
                 graphics.DrawImageFix(GameImage.Kyoro, 64, 64, 1, attackCount / 2, drawX, drawY, this);
             }
             else if (attackCount < 24)
             {
                 graphics.DrawImageFix(GameImage.Kyoro, 64, 64, 1, 3, drawX, drawY, this);
             }
             else
             {
                 graphics.DrawImageFix(GameImage.Kyoro, 64, 64, 1, 3 - (attackCount - 24) / 2, drawX, drawY, this);
             }
         }
     }
     else
     {
         int textureCol = animation / 4;
         if (!attacking)
         {
             graphics.DrawImageFixFlip(GameImage.Kyoro, 64, 64, 0, textureCol, drawX, drawY, this);
         }
         else
         {
             if (attackCount < 8)
             {
                 graphics.DrawImageFixFlip(GameImage.Kyoro, 64, 64, 1, attackCount / 2, drawX, drawY, this);
             }
             else if (attackCount < 24)
             {
                 graphics.DrawImageFixFlip(GameImage.Kyoro, 64, 64, 1, 3, drawX, drawY, this);
             }
             else
             {
                 graphics.DrawImageFixFlip(GameImage.Kyoro, 64, 64, 1, 3 - (attackCount - 24) / 2, drawX, drawY, this);
             }
         }
     }
 }
Example #16
0
 public override void Draw(GraphicsDevice graphics)
 {
     int drawX = (int)Math.Round(position.X) - game.IntCameraX;
     int drawY = (int)Math.Round(position.Y) - game.IntCameraY;
     if (animation < 32)
     {
         graphics.DrawRect(drawX - 2, drawY - 512, 4, 512, animation % 2 == 0 ? 255 : 0, 255, 255, 4 * animation);
         graphics.DrawRect(drawX - 1, drawY - 512, 2, 512, animation % 2 == 0 ? 255 : 0, 255, 255, 8 * animation);
     }
     else
     {
         graphics.DrawImageAdd(GameImage.OyajiThunder, 32, 512, 0, animation / 2 % 8, drawX - 16, drawY - 512, 255 - 16 * (animation - 32), animation % 2 == 0 ? 255 : 0, 255, 255);
     }
 }
Example #17
0
File: Rain.cs Project: sinshu/chaos
 public override void Draw(GraphicsDevice graphics)
 {
     if (!background)
     {
         int drawX = (int)Math.Round(position.X) - game.IntCameraX;
         int drawY = (int)Math.Round(position.Y) - game.IntCameraY - 32;
         graphics.DrawImageAlpha(GameImage.Rain, 1, 64, 0, 0, drawX, drawY, 64);
     }
     else
     {
         int drawX = (int)Math.Round(position.X) + game.IntBackgroundX;
         int drawY = (int)Math.Round(position.Y) + game.IntBackgroundY - 32;
         graphics.DrawImageAlpha(GameImage.Rain, 1, 64, 0, 1, drawX, drawY, 32);
     }
 }
Example #18
0
 public override void Draw(GraphicsDevice graphics)
 {
     int drawX = (int)Math.Round(position.X) - game.IntCameraX;
     int drawY = (int)Math.Round(position.Y) - game.IntCameraY;
     if (direction == Direction.Left)
     {
         int textureCol = animation / 2;
         graphics.DrawImageFix(GameImage.Player, 32, 64, 0, textureCol, drawX, drawY, this);
     }
     else
     {
         int textureCol = animation / 2;
         graphics.DrawImageFixFlip(GameImage.Player, 32, 64, 0, textureCol, drawX, drawY, this);
     }
 }
Example #19
0
        public override void Draw(GraphicsDevice graphics)
        {
            int drawX = (int)Math.Round(position.X) - game.IntCameraX;
            int drawY = (int)Math.Round(position.Y) - game.IntCameraY;
            int r = (color <= 1 || color == 5) ? 255 : 0;
            int g = (color >= 3 && color <= 5) ? 255 : 0;
            int b = (color >= 1 && color <= 3) ? 255 : 0;

            if (stateCount < timer)
            {
                graphics.DrawImageAdd(GameImage.EnemyBullet, 32, 32, 2, stateCount / 2 % 8, drawX - 16, drawY - 16, 255, r, g, b);
            }
            else
            {
                graphics.DrawImageRotateAdd(GameImage.EnemyBullet, 64, 32, 0, 3, drawX, drawY, 48, 16, (int)Math.Round(direction * 180 / Math.PI), 255, r, g, b);
            }
        }
Example #20
0
        public MiswGame2007Application()
        {
            {
                FileArchiverZip zip = new FileArchiverZip();
                zip.ZipExtName = ".btw";
                FileSys.Archiver.Add(zip);
            }
            UnmanagedResourceManager.Instance.VideoMemory.LimitSize = 64 * 1024 * 1024;
            settings = new Settings("settings.cfg");
            CreateWindow(settings.Fullscreen);
            inputDevice = new InputDevice(!settings.Fullscreen, settings.JumpButton, settings.AttackButton, settings.StartButton);
            graphicsDevice = new GraphicsDevice(window);
            audioDevice = new AudioDevice();
            LoadStageData();

            title = new TitleScene(0, settings.ArcadeMode);
            title.AudioDevice = audioDevice;
            currentState = State.Title;
            currentStageIndex = settings.StartStageIndex;
            if (settings.StartStageIndex < settings.NumUnlockedStages)
            {
                numUnlockedStages = settings.NumUnlockedStages;
            }
            else
            {
                numUnlockedStages = settings.StartStageIndex + 1;
            }

            if (numUnlockedStages < 25)
            {
                numUnlockedStages = 25;
            }

            log = null;
            if (settings.ArcadeMode)
            {
                for (int i = 1; i <= 9999; i++)
                {
                    if (!File.Exists("log" + (10000 + i).ToString().Substring(1) + ".txt"))
                    {
                        log = new StreamWriter("log" + (10000 + i).ToString().Substring(1) + ".txt");
                        break;
                    }
                }
            }
        }
Example #21
0
        public override void Draw(GraphicsDevice graphics)
        {
            int drawX = (int)Math.Round(position.X) - game.IntCameraX;
            int drawY = (int)Math.Round(position.Y) - game.IntCameraY;

            int animation = 0;
            if (openCount < 32)
            {
                animation = openCount / 4;
            }
            else if (openCount < 224)
            {
                animation = 7;
            }
            else
            {
                animation = 7 - (openCount - 224) / 4;
            }

            if (attacking && openCount < 128)
            {
                int enemyX = (int)Math.Round(position.X + 64) - game.IntCameraX;
                int enemyY = 0;
                if (openCount < 96)
                {
                    enemyY = (int)Math.Round(position.Y + 128) - game.IntCameraY;
                }
                else
                {
                    enemyY = (int)Math.Round(position.Y + 128 - 4 * (openCount - 96)) - game.IntCameraY;
                }
                if (enemy == OutEnemy.Byaa)
                {
                    graphics.DrawImageFix(GameImage.Byaa, 128, 128, 0, 0, enemyX, enemyY, this);
                }
                else if (enemy == OutEnemy.Nurunuru)
                {
                    graphics.DrawImageFix(GameImage.Nurunuru, 128, 128, 0, 0, enemyX, enemyY, this);
                }
            }

            graphics.DrawImageFix(GameImage.HouseBoss, 256, 256, animation / 4, animation % 4, drawX, drawY, this);
        }
Example #22
0
        public override void Draw(GraphicsDevice graphics)
        {
            int drawX = (int)Math.Round(position.X) + game.IntBackgroundX;
            int drawY = (int)Math.Round(position.Y) + game.IntBackgroundY;

            if (big)
            {
                if (!exploding)
                {
                    graphics.DrawImageAdd(GameImage.EnemyBullet, 32, 32, 1, 0, drawX - 16, drawY - 16, 255, GetRed(), GetGreen(), GetBlue());
                }
                else
                {
                    if (!flip)
                    {
                        graphics.DrawImageAdd(GameImage.BigHanabi, 256, 256, animation / 2 / 4, animation / 2 % 4, drawX - 128, drawY - 128, 255, GetRed(), GetGreen(), GetBlue());
                    }
                    else
                    {
                        graphics.DrawImageAddFlipRotate90(GameImage.BigHanabi, 256, 256, animation / 2 / 4, animation / 2 % 4, drawX - 128, drawY - 128, 1, GetRed(), GetGreen(), GetBlue());
                    }
                }
            }
            else
            {
                if (!exploding)
                {
                    graphics.DrawImageAdd(GameImage.EnemyBullet, 32, 32, 1, 1, drawX - 16, drawY - 16, 255, GetRed(), GetGreen(), GetBlue());
                }
                else
                {
                    if (!flip)
                    {
                        graphics.DrawImageAdd(GameImage.SmallHanabi, 128, 128, animation / 2 / 4, animation / 2 % 4, drawX - 64, drawY - 64, 255, GetRed(), GetGreen(), GetBlue());
                    }
                    else
                    {
                        graphics.DrawImageAddFlipRotate90(GameImage.SmallHanabi, 128, 128, animation / 2 / 4, animation / 2 % 4, drawX - 64, drawY - 64, 1, GetRed(), GetGreen(), GetBlue());
                    }
                }
            }
        }
Example #23
0
 public override void Draw(GraphicsDevice graphics)
 {
     int drawX = (int)Math.Round(position.X) - game.IntCameraX;
     int drawY = (int)Math.Round(position.Y) - game.IntCameraY;
     if (part == 0)
     {
         graphics.DrawImageAdd(GameImage.EnemyBullet,16, 64, 2, (animation / 2 % 8) * 2, drawX - 16, drawY - 64, 255 - animation * 8);
     }
     else if (part == 1)
     {
         graphics.DrawImageAdd(GameImage.EnemyBullet,16, 64, 2, (animation / 2 % 8) * 2 + 1, drawX, drawY - 64, 255 - animation * 8);
     }
     else if (part == 2)
     {
         graphics.DrawImageAdd(GameImage.EnemyBullet, 16, 64, 3, (animation / 2 % 8) * 2, drawX - 16, drawY, 255 - animation * 8);
     }
     else
     {
         graphics.DrawImageAdd(GameImage.EnemyBullet,16, 64, 3, (animation / 2 % 8) * 2 + 1, drawX, drawY, 255 - animation * 8);
     }
 }
Example #24
0
 public override void Draw(GraphicsDevice graphics)
 {
     int drawX = (int)Math.Round(position.X) - game.IntCameraX;
     int drawY = (int)Math.Round(position.Y) - game.IntCameraY;
     int textureCol = 3;
     if (stateCount < 16)
     {
         textureCol = stateCount / 4;
     }
     if (flipAnimation)
     {
         textureCol = 3 - textureCol;
     }
     if (direction == Direction.Left)
     {
         graphics.DrawImageFix(GameImage.Skater, 96, 96, 0, textureCol, drawX, drawY, this);
     }
     else
     {
         graphics.DrawImageFixFlip(GameImage.Skater, 96, 96, 0, textureCol, drawX, drawY, this);
     }
 }
Example #25
0
 public void Draw(GraphicsDevice graphics)
 {
     int drawX = (int)Math.Round(position.X) - game.IntCameraX;
     int drawY = (int)Math.Round(position.Y) - game.IntCameraY;
     if (visible)
     {
         if (fadeCount < 64)
         {
             graphics.DrawImageAlpha(GameImage.Block, 64, 64, 3, 0, drawX, drawY, 4 * fadeCount);
             graphics.DrawImageAlpha(GameImage.Block, 64, 64, 3, 1, drawX, drawY, 4 * fadeCount);
         }
         else if (slideCount < 20)
         {
             graphics.DrawImage(GameImage.Block, 64, 64, 3, 0, drawX, drawY);
             graphics.DrawImage2(GameImage.Block, 76 + slideCount, 196, 20 - slideCount, 60, drawX + 12, drawY + 4);
             graphics.DrawImage2(GameImage.Block, 96, 196, 20 - slideCount, 60, drawX + 32 + slideCount, drawY + 4);
         }
         else
         {
             graphics.DrawImage(GameImage.Block, 64, 64, 3, 0, drawX, drawY);
         }
     }
 }
Example #26
0
        public void Draw(GraphicsDevice graphics)
        {
            graphics.FillScreen(0, 0, 0, 192);

            graphics.DrawImageAdd(GameImage.Message, 256, 32, 3, 0, (Settings.SCREEN_WIDTH - 256) / 2, Settings.SCREEN_HEIGHT / 2 - 80, 255);

            if (currentStageIndex + 1 < 10)
            {
                graphics.DrawImageAdd(GameImage.Number, 32, 64, 0, currentStageIndex + 1, (Settings.SCREEN_WIDTH - 32) / 2, (Settings.SCREEN_HEIGHT - 64) / 2, 255);
            }
            else
            {
                graphics.DrawImageAdd(GameImage.Number, 32, 64, 0, (currentStageIndex + 1) / 10, (Settings.SCREEN_WIDTH - 64) / 2, (Settings.SCREEN_HEIGHT - 64) / 2, 255);
                graphics.DrawImageAdd(GameImage.Number, 32, 64, 0, (currentStageIndex + 1) % 10, (Settings.SCREEN_WIDTH - 64) / 2 + 32, (Settings.SCREEN_HEIGHT - 64) / 2, 255);
            }

            if (currentStageIndex > 0)
            {
                graphics.DrawImage(GameImage.Hud, 32, 32, 0, 0, Settings.SCREEN_WIDTH / 2 - 80, Settings.SCREEN_HEIGHT / 2 - 16);
            }
            if (currentStageIndex + 1 < numUnlockedStages)
            {
                graphics.DrawImage(GameImage.Hud, 32, 32, 0, 4, Settings.SCREEN_WIDTH / 2 + 48, Settings.SCREEN_HEIGHT / 2 - 16);
            }

            if (gotoGameCount > 0)
            {
                if (gotoGameCount < 16)
                {
                    graphics.FillScreen(255, 255, 255, 16 * gotoGameCount);
                }
                else
                {
                    graphics.FillScreen(255, 255, 255, 255);
                }
            }
        }
Example #27
0
 public override void DrawMap(GraphicsDevice graphics)
 {
     Map.Draw(graphics, 128, 128, 128);
 }
Example #28
0
 public override void Draw(GraphicsDevice graphics)
 {
     base.Draw(graphics);
 }
Example #29
0
 public override void Draw(GraphicsDevice graphics)
 {
     base.Draw(graphics);
 }
Example #30
0
 public virtual void Draw(GraphicsDevice graphics)
 {
 }
Example #31
0
 public override void DrawBackground(GraphicsDevice graphics)
 {
     graphics.DrawImage(GameImage.Background2, 1024, 512, IntBackgroundX, IntBackgroundY);
 }
Example #32
0
 public override void DrawBackground(GraphicsDevice graphics)
 {
     graphics.DrawImage(GameImage.Background1, 1024, 512, IntBackgroundX, IntBackgroundY);
 }