Beispiel #1
0
        public override void Draw(SpriteBatch spriteBatch)
        {
            if (_Visible)
            {
                draw_background(spriteBatch);

                spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend);
                Darkened_Bar.draw(spriteBatch);
                spriteBatch.End();

                spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend);
                Portrait_Bg.draw(spriteBatch);
                if (Portrait_Label != null)
                {
                    Portrait_Label.draw(spriteBatch);
                }
                spriteBatch.End();

                Face.draw(spriteBatch);

                draw_window(spriteBatch);

                spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend);
                Gold_Window.draw(spriteBatch);
                Gold_Data.draw(spriteBatch);
                Gold_G.draw(spriteBatch);
                spriteBatch.End();
                spriteBatch.GraphicsDevice.ScissorRectangle = Scene_Map.fix_rect_to_screen(Item_Rect);
                spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, null, null, Item_State);
                //foreach (Shop_Item item in Item_Data) //Debug
                { }//item.draw(sprite_batch, new Vector2(0, Scroll_Real)); //Debug
                spriteBatch.End();

                Message.draw_background(spriteBatch);
                Message.draw_faces(spriteBatch);
                Message.draw_foreground(spriteBatch);

                if (Choices != null)
                {
                    spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend);
                    Choices.Draw(spriteBatch);
                    Cursor.draw(spriteBatch);
                    spriteBatch.End();
                }
            }
            spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend);
            Black_Screen.draw(spriteBatch);
            spriteBatch.End();
        }
        protected void draw_animation_scene(SpriteBatch sprite_batch, GraphicsDevice device,
                                            RenderTarget2D final_render, RenderTarget2D temp_render, RenderTarget2D effect_render)
        {
            Effect reel_shader = Global.effect_shader();

            // Background
            sprite_batch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, SamplerState.PointClamp, null, null);
            Background.draw(sprite_batch);
            sprite_batch.End();
            // Spell Bg
            if (Battler != null)
            {
                Battler.draw_bg_effects(sprite_batch, reel_shader);
            }
            // Platform
            Platform.draw(sprite_batch);
            // Battler

            if (Battler != null)
            {
                BattleSpriteRenderer battler_renderer = new BattleSpriteRenderer(
                    false, Vector2.Zero, Vector2.Zero, Vector2.Zero);
                battler_renderer.draw(sprite_batch, device,
                                      new Tuple <Battler_Sprite, bool>(Battler, false), null,
                                      final_render, temp_render, effect_render);
            }

            sprite_batch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, SamplerState.PointClamp, null, null);

            /*if (Battler != null) //Debug
             * {
             *  sprite_batch.End();
             *  Battler.draw_lower_effects(sprite_batch, reel_shader);
             *  Battler.draw_lower(sprite_batch, Vector2.Zero, reel_shader);
             *  Battler.draw(sprite_batch, Vector2.Zero, reel_shader);
             *  Battler.draw_upper(sprite_batch, Vector2.Zero, reel_shader);
             *  sprite_batch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, SamplerState.PointClamp, null, null);
             * }*/
            // Stats
            if (Message != null)
            {
                foreach (Class_Reel_Stat_Bars bar in Stat_Bars)
                {
                    bar.draw(sprite_batch);
                }
                foreach (TextSprite label in Stat_Labels)
                {
                    label.draw(sprite_batch);
                }
                foreach (TextSprite value in Stat_Values)
                {
                    value.draw(sprite_batch);
                }
                foreach (Icon_Sprite icon in Weapon_Icons)
                {
                    icon.draw(sprite_batch);
                }
                Name_Bg.draw(sprite_batch);
            }
            // Battler
            if (Battler != null)
            {
                sprite_batch.End();
                Battler.draw_upper_effects(sprite_batch, reel_shader);
                sprite_batch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, SamplerState.PointClamp, null, null);
            }
            // Name/Message
            if (Message != null)
            {
                Text_Bg.draw(sprite_batch);
                Name.draw(sprite_batch);
                sprite_batch.End();
                // Message
                Message.draw_background(sprite_batch);
                Message.draw_faces(sprite_batch);
                Message.draw_foreground(sprite_batch);

                sprite_batch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, SamplerState.PointClamp, null, null);
            }
            // Spell Fg
            if (Battler != null)
            {
                sprite_batch.End();
                Battler.draw_fg_effects(sprite_batch, reel_shader);
                sprite_batch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, SamplerState.PointClamp, null, null);
                White_Flash.draw(sprite_batch);
            }
            // Black Screen
            Black_Screen.draw(sprite_batch);
            Black_Bar1.draw(sprite_batch);
            Black_Bar2.draw(sprite_batch);
            sprite_batch.End();
        }