| GraphicsDevice.Clear(Color.Black); |
| |
| // Draw enlarged version of previous screen before plopping on random blobs in |
| // the middle of the screen |
| Rectangle Dest = new Rectangle(0, 0, GraphicsDevice.PresentationParameters.BackBufferWidth, |
| GraphicsDevice.PresentationParameters.BackBufferHeight); |
| Rectangle Source = Dest; |
| Dest.Width += 160; |
| Dest.Height += 100; |
| Dest.X -= 80; |
| Dest.Y -= 50; |
| |
| |
| spriteBatch.Begin(SpriteBlendMode.Additive, SpriteSortMode.Immediate, SaveStateMode.SaveState); |
| spriteBatch.Draw(HyperspaceBuffer, new Vector2(Source.Width / 2, Source.Height / 2), Source, |
| new Color(0.19f, 0.19f, 0.19f), 0.005f, |
| new Vector2(Source.Width / 2, Source.Height / 2), 1.0f, |
| SpriteEffects.None, 1.0f); |
| Dest.Width += 160; |
| Dest.Height += 100; |
| Dest.X -= 80; |
| Dest.Y -= 50; |
| spriteBatch.Draw(HyperspaceBuffer, new Vector2(Source.Width / 2, Source.Height / 2), Source, |
| new Color(0.19f, 0.19f, 0.19f), -0.005f, |
| new Vector2(Source.Width / 2, Source.Height / 2), 1.0f, |
| SpriteEffects.None, 1.0f); |
| spriteBatch.Draw(HyperspaceBuffer, Dest, Source, new Color(0.6f, 0.6f, 0.6f)); |
| // Draw 2 random coloured blobs mid-screen to be picked up next time round |
| |
| int X = Source.Width / 2; |
| X += (Rnd.Next(100) - 50); |
| int Y = Source.Height / 2; |
| Y += (Rnd.Next(100) - 50); |
| spriteBatch.Draw(HyperBlob, new Vector2(X, Y), Color.DarkOrange); |
| |
| X = Source.Width / 2; |
| X += (Rnd.Next(100) - 50); |
| Y = Source.Height / 2; |
| Y += (Rnd.Next(100) - 50); |
| spriteBatch.Draw(HyperBlob, new Vector2(X, Y), Color.DarkCyan); |
| |
| X = Source.Width / 2; |
| X += (Rnd.Next(100) - 50); |
| Y = Source.Height / 2; |
| Y += (Rnd.Next(100) - 50); |
| spriteBatch.Draw(HyperBlob, new Vector2(X, Y), Color.DarkMagenta); |
| |
| X = Source.Width / 2; |
| X += (Rnd.Next(100) - 50); |
| Y = Source.Height / 2; |
| Y += (Rnd.Next(100) - 50); |
| spriteBatch.Draw(HyperBlob, new Vector2(X, Y), Color.DarkGreen); |
| |
| X = Source.Width / 2; |
| X += (Rnd.Next(100) - 50); |
| Y = Source.Height / 2; |
| Y += (Rnd.Next(100) - 50); |
| spriteBatch.Draw(HyperBlob, new Vector2(X, Y), Color.DarkBlue); |
| |
| X = Source.Width / 2; |
| X += (Rnd.Next(100) - 50); |
| Y = Source.Height / 2; |
| Y += (Rnd.Next(100) - 50); |
| spriteBatch.Draw(HyperBlob, new Vector2(X, Y), Color.DarkRed); |
| |
| X = Source.Width / 2; |
| X += (Rnd.Next(100) - 50); |
| Y = Source.Height / 2; |
| Y += (Rnd.Next(100) - 50); |
| spriteBatch.Draw(HyperBlob, new Vector2(X, Y), Color.DarkOrange); |
| |
| X = Source.Width / 2; |
| X += (Rnd.Next(100) - 50); |
| Y = Source.Height / 2; |
| Y += (Rnd.Next(100) - 50); |
| spriteBatch.Draw(HyperBlob, new Vector2(X, Y), Color.DarkCyan); |
| |
| X = Source.Width / 2; |
| X += (Rnd.Next(100) - 50); |
| Y = Source.Height / 2; |
| Y += (Rnd.Next(100) - 50); |
| spriteBatch.Draw(HyperBlob, new Vector2(X, Y), Color.DarkMagenta); |
| |
| X = Source.Width / 2; |
| X += (Rnd.Next(100) - 50); |
| Y = Source.Height / 2; |
| Y += (Rnd.Next(100) - 50); |
| spriteBatch.Draw(HyperBlob, new Vector2(X, Y), Color.DarkGreen); |
| |
| X = Source.Width / 2; |
| X += (Rnd.Next(100) - 50); |
| Y = Source.Height / 2; |
| Y += (Rnd.Next(100) - 50); |
| spriteBatch.Draw(HyperBlob, new Vector2(X, Y), Color.DarkBlue); |
| |
| X = Source.Width / 2; |
| X += (Rnd.Next(100) - 50); |
| Y = Source.Height / 2; |
| Y += (Rnd.Next(100) - 50); |
| spriteBatch.Draw(HyperBlob, new Vector2(X, Y), Color.DarkRed); |
| |
| spriteBatch.End(); |
| |
| GraphicsDevice.ResolveBackBuffer(HyperspaceBuffer); |
| GraphicsDevice.Clear(Color.Black); |
| spriteBatch.Begin(SpriteBlendMode.Additive, SpriteSortMode.Immediate, SaveStateMode.SaveState); |
| spriteBatch.Draw(HyperspaceBuffer, Vector2.Zero, Color.White); |
| spriteBatch.End(); |