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; } }
private void DrawPatch(Patch patch, int x, int y) { screen.DrawPatch(patch, scale * x, scale * y, scale); }
private void DrawMenuPatch(string name, int x, int y) { var scale = screen.Width / 320; screen.DrawPatch(cache[name], scale * x, scale * y, scale); }