From 1b2c7bc526a451442dfc5f416820ebbd0b725182 Mon Sep 17 00:00:00 2001 From: Tim Sarbin Date: Tue, 27 Nov 2018 21:20:48 -0500 Subject: [PATCH] Fixed map rendering bug with randomized tiles. --- OpenDiablo2.Common/Interfaces/IRenderWindow.cs | 2 +- OpenDiablo2.Core/Map Engine/MapEngine.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/OpenDiablo2.Common/Interfaces/IRenderWindow.cs b/OpenDiablo2.Common/Interfaces/IRenderWindow.cs index 0aaf7c5b..a1a02ab5 100644 --- a/OpenDiablo2.Common/Interfaces/IRenderWindow.cs +++ b/OpenDiablo2.Common/Interfaces/IRenderWindow.cs @@ -25,6 +25,6 @@ namespace OpenDiablo2.Common.Interfaces IMouseCursor LoadCursor(ISprite sprite, int frame, Point hotspot); void SetCursor(IMouseCursor mouseCursor); void Draw(ILabel label); - void DrawMapCell(int xCell, int yCell, int xPixel, int yPixel, MPQDS1 mapData, int main_index, int sub_index, Palette palette, int orientation = -1); + void DrawMapCell(int xCell, int yCell, int xPixel, int yPixel, MPQDS1 mapData, int main_index, int sub_index, Palette palette, int orientation); } } diff --git a/OpenDiablo2.Core/Map Engine/MapEngine.cs b/OpenDiablo2.Core/Map Engine/MapEngine.cs index fc6c0fe4..37c71bdb 100644 --- a/OpenDiablo2.Core/Map Engine/MapEngine.cs +++ b/OpenDiablo2.Core/Map Engine/MapEngine.cs @@ -151,7 +151,7 @@ namespace OpenDiablo2.Core.Map_Engine var main_index = (floor.Prop3 >> 4) + ((floor.Prop4 & 0x03) << 4); - renderWindow.DrawMapCell(x, y, cx, cy, gameState.MapData, main_index, sub_index, gameState.CurrentPalette); + renderWindow.DrawMapCell(x, y, cx, cy, gameState.MapData, main_index, sub_index, gameState.CurrentPalette, 0); } }