예제 #1
0
        public void RenderDoom(Doom doom)
        {
            if (doom.State == DoomState.Opening)
            {
                openingSequence.Render(doom.Opening);
            }
            else if (doom.State == DoomState.DemoPlayback)
            {
                RenderGame(doom.DemoPlayback.Game);
            }
            else if (doom.State == DoomState.Game)
            {
                RenderGame(doom.Game);
            }

            if (!doom.Menu.Active)
            {
                if (doom.State == DoomState.Game &&
                    doom.Game.State == GameState.Level &&
                    doom.Game.Paused)
                {
                    var scale = screen.Width / 320;
                    screen.DrawPatch(
                        pause,
                        (screen.Width - scale * pause.Width) / 2,
                        4 * scale,
                        scale);
                }
            }
        }
        public void Render(OpeningSequence sequence)
        {
            var scale = screen.Width / 320;

            switch (sequence.State)
            {
            case OpeningSequenceState.Title:
                screen.DrawPatch(cache["TITLEPIC"], 0, 0, scale);
                break;

            case OpeningSequenceState.Demo:
                parent.RenderGame(sequence.DemoGame);
                break;

            case OpeningSequenceState.Credit:
                screen.DrawPatch(cache["CREDIT"], 0, 0, scale);
                break;
            }
        }
예제 #3
0
 private void DrawPatch(Patch patch, int x, int y)
 {
     screen.DrawPatch(patch, scale * x, scale * y, scale);
 }
예제 #4
0
        private void DrawMenuPatch(string name, int x, int y)
        {
            var scale = screen.Width / 320;

            screen.DrawPatch(cache[name], scale * x, scale * y, scale);
        }