|
@ -33,6 +33,7 @@ namespace SemiColinGames { |
|
|
int framesToSuppress = 2; |
|
|
int framesToSuppress = 2; |
|
|
Texture2D grasslandBg1; |
|
|
Texture2D grasslandBg1; |
|
|
Texture2D grasslandBg2; |
|
|
Texture2D grasslandBg2; |
|
|
|
|
|
Texture2D whiteTexture; |
|
|
|
|
|
|
|
|
Player player; |
|
|
Player player; |
|
|
World world; |
|
|
World world; |
|
@ -56,8 +57,6 @@ namespace SemiColinGames { |
|
|
display.Initialize(Window, graphics); |
|
|
display.Initialize(Window, graphics); |
|
|
display.SetFullScreen(fullScreen); |
|
|
display.SetFullScreen(fullScreen); |
|
|
|
|
|
|
|
|
Debug.Initialize(GraphicsDevice); |
|
|
|
|
|
|
|
|
|
|
|
sceneTarget = new RenderTarget2D( |
|
|
sceneTarget = new RenderTarget2D( |
|
|
GraphicsDevice, camera.Width, camera.Height, false /* mipmap */, |
|
|
GraphicsDevice, camera.Width, camera.Height, false /* mipmap */, |
|
|
GraphicsDevice.PresentationParameters.BackBufferFormat, DepthFormat.Depth24); |
|
|
GraphicsDevice.PresentationParameters.BackBufferFormat, DepthFormat.Depth24); |
|
@ -88,10 +87,16 @@ namespace SemiColinGames { |
|
|
linesOfSight = new LinesOfSight(GraphicsDevice); |
|
|
linesOfSight = new LinesOfSight(GraphicsDevice); |
|
|
grasslandBg1 = Content.Load<Texture2D>("grassland_bg1"); |
|
|
grasslandBg1 = Content.Load<Texture2D>("grassland_bg1"); |
|
|
grasslandBg2 = Content.Load<Texture2D>("grassland_bg2"); |
|
|
grasslandBg2 = Content.Load<Texture2D>("grassland_bg2"); |
|
|
|
|
|
|
|
|
|
|
|
whiteTexture = new Texture2D(GraphicsDevice, 1, 1); |
|
|
|
|
|
whiteTexture.SetData(new Color[] { Color.White }); |
|
|
|
|
|
Debug.Initialize(whiteTexture); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
// Called once per game. Unloads all game content.
|
|
|
// Called once per game. Unloads all game content.
|
|
|
protected override void UnloadContent() { |
|
|
protected override void UnloadContent() { |
|
|
|
|
|
whiteTexture.Dispose(); |
|
|
|
|
|
|
|
|
updateTimer.DumpStats(); |
|
|
updateTimer.DumpStats(); |
|
|
drawTimer.DumpStats(); |
|
|
drawTimer.DumpStats(); |
|
|
} |
|
|
} |
|
|