|
|
@ -8,7 +8,8 @@ namespace SemiColinGames { |
|
|
|
|
|
|
|
const float DESIRED_ASPECT_RATIO = 1920.0f / 1080.0f; |
|
|
|
|
|
|
|
private readonly Color backgroundColor = Color.DarkBlue; |
|
|
|
private readonly Color letterboxColor = Color.DarkSlateBlue; |
|
|
|
private readonly Color backgroundColor = Color.Black; |
|
|
|
|
|
|
|
private readonly GraphicsDevice graphics; |
|
|
|
private readonly RenderTarget2D sceneTarget; |
|
|
@ -35,8 +36,6 @@ namespace SemiColinGames { |
|
|
|
|
|
|
|
public void Draw(bool isRunningSlowly, IWorld iworld, bool paused) { |
|
|
|
ShmupWorld world = (ShmupWorld) iworld; |
|
|
|
graphics.SetRenderTarget(null); |
|
|
|
graphics.Clear(Color.Black); |
|
|
|
|
|
|
|
// Draw scene to sceneTarget.
|
|
|
|
graphics.SetRenderTarget(sceneTarget); |
|
|
@ -64,6 +63,7 @@ namespace SemiColinGames { |
|
|
|
|
|
|
|
// Get ready to draw sceneTarget to screen.
|
|
|
|
graphics.SetRenderTarget(null); |
|
|
|
graphics.Clear(letterboxColor); |
|
|
|
|
|
|
|
// Letterbox the scene if needed.
|
|
|
|
float aspectRatio = 1.0f * graphics.Viewport.Width / graphics.Viewport.Height; |
|
|
|