Skip to content

Commit

Permalink
Fixed a compiling error on Level Editor project.
Browse files Browse the repository at this point in the history
  • Loading branch information
sharivan committed Nov 28, 2023
1 parent 3d17d23 commit 7c609ba
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions XSharpLevelEditor/Editor/FrmLevelEditor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,19 +32,19 @@ public TileRender(Control control)

public void Render()
{
var device = BaseEngine.Engine.Device;
var device = DX9Engine.Engine.Device;

device.Clear(ClearFlags.Target | ClearFlags.ZBuffer, Color.Black, 1.0f, 0);
device.BeginScene();

var tilemap = BaseEngine.Engine.ForegroundTilemap;
int tilemapWidth = tilemap.GetLevelDescription(0).Width;
int tilemapHeight = tilemap.GetLevelDescription(0).Height;
int tilemapWidth = tilemap.Width;
int tilemapHeight = tilemap.Height;
var palette = BaseEngine.Engine.ForegroundPalette;
BaseEngine.Engine.DrawTexture(tilemap, palette);

device.EndScene();
device.Present(new Rectangle(0, 0, tilemapWidth, tilemapHeight), new Rectangle(0, 0, control.ClientSize.Width, control.ClientSize.Height), control.Handle);
device.Present(new SharpDX.Rectangle(0, 0, tilemapWidth, tilemapHeight), new SharpDX.Rectangle(0, 0, control.ClientSize.Width, control.ClientSize.Height), control.Handle);
}
}

Expand Down
4 changes: 2 additions & 2 deletions XSharpLevelEditor/Engine/EditorEngine.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
namespace XSharp.Engine;

public class EditorEngine : BaseEngine
public class EditorEngine : DX9Engine
{
new public static EditorEngine Engine => (EditorEngine) BaseEngine.Engine;
new public static EditorEngine Engine => (EditorEngine) DX9Engine.Engine;

public EditorEngine()
{
Expand Down

0 comments on commit 7c609ba

Please # to comment.