public GameMain(Form form) { this.form = form; form.Location = new Point(150, 0); form.Text = title; form.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; form.Size = screenSize; form.Icon = Properties.Resources.gameIcon; pb = new PictureBox(); pb.Parent = form; pb.Dock = DockStyle.Fill; pb.BackColor = Color.Black; pb.SizeMode = PictureBoxSizeMode.StretchImage; pb.MouseClick += new MouseEventHandler(pb_MouseClick); surface = new Bitmap(screenSize.Width, screenSize.Height); pb.Image = surface; device = Graphics.FromImage(surface); debuggerTools = new Debugger.DebuggerTools(this); timer = new Timer(); timer.Interval = GameMain.frameRate; timer.Tick += new EventHandler(timer_Tick); mainMenu = new Scene.MainMenu(this); inGame = new Scene.InGame(this); UpdateScene(mainMenu); }