function Teleport(x, y,map){ ChangeMap(map) SetPersonLayer(player,1); SetPersonX(player,x*16+7); SetPersonY(player,y*16+7);}
function Teleport(x, y,map){ ChangeMap(map) SetPersonLayer(player,1); SetPersonX(player,x*16+7); SetPersonY(player,y*16+7); FlipScreen();}
How about this: my engine will clear the backbuffer to avoid further confusion in this area.
See the end of this message for details on invoking just-in-time (JIT) debugging instead of this dialog box.************** Exception Text **************System.ComponentModel.Win32Exception: The system cannot find the file specified at System.Diagnostics.Process.StartWithShellExecuteEx(ProcessStartInfo startInfo) at System.Diagnostics.Process.Start() at System.Diagnostics.Process.Start(ProcessStartInfo startInfo) at System.Diagnostics.Process.Start(String fileName, String arguments) at Sphere_Editor.EditorForm.RunToolButton_Click(Object sender, EventArgs e) at System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e) at System.Windows.Forms.ToolStripButton.OnClick(EventArgs e) at System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e) at System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e) at System.Windows.Forms.ToolStripItem.FireEventInteractive(EventArgs e, ToolStripItemEventType met) at System.Windows.Forms.ToolStripItem.FireEvent(EventArgs e, ToolStripItemEventType met) at System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea) at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks) at System.Windows.Forms.Control.WndProc(Message& m) at System.Windows.Forms.ScrollableControl.WndProc(Message& m) at System.Windows.Forms.ToolStrip.WndProc(Message& m) at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m) at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m) at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)************** Loaded Assemblies **************mscorlib Assembly Version: 2.0.0.0 Win32 Version: 2.0.50727.5472 (Win7SP1GDR.050727-5400) CodeBase: file:///C:/Windows/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll----------------------------------------Sphere Editor Assembly Version: 0.9.5.0 Win32 Version: 0.9.5.0 CodeBase: file:///G:/Game%20Engines/Sphere/SphereStudio%20v0.9.5/Sphere%20Editor.exe----------------------------------------System.Windows.Forms Assembly Version: 2.0.0.0 Win32 Version: 2.0.50727.5468 (Win7SP1GDR.050727-5400) CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll----------------------------------------System Assembly Version: 2.0.0.0 Win32 Version: 2.0.50727.5467 (Win7SP1GDR.050727-5400) CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll----------------------------------------System.Drawing Assembly Version: 2.0.0.0 Win32 Version: 2.0.50727.5467 (Win7SP1GDR.050727-5400) CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll----------------------------------------WeifenLuo.WinFormsUI.Docking Assembly Version: 2.3.1.24483 Win32 Version: 2.3.1.0 CodeBase: file:///G:/Game%20Engines/Sphere/SphereStudio%20v0.9.5/WeifenLuo.WinFormsUI.Docking.DLL----------------------------------------System.Xml Assembly Version: 2.0.0.0 Win32 Version: 2.0.50727.5473 (Win7SP1GDR.050727-5400) CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.dll----------------------------------------************** JIT Debugging **************To enable just-in-time (JIT) debugging, the .config file for thisapplication or computer (machine.config) must have thejitDebugging value set in the system.windows.forms section.The application must also be compiled with debuggingenabled.For example:<configuration> <system.windows.forms jitDebugging="true" /></configuration>When JIT debugging is enabled, any unhandled exceptionwill be sent to the JIT debugger registered on the computerrather than be handled by this dialog box.
My Sphere Engine doesn't do that on maps though, it's a good boy and remembers to clear the screen prior to each flip. Why the map engine doesn't do this is beyond me.. perhaps it was an optimization thing: since you are always going to draw tiles over the space of the screen it doesn't have to clean the back buffer: the tiles do it, thus reducing a draw call. However since I use hardware, clearing the back buffer is very fast. Hmm, in SFML, I don't think I have the privilege to not clear the buffer... I wonder if passing a transparent color does the same thing. I'm sure it would.How about this: my engine will clear the backbuffer to avoid further confusion in this area.