mirror of
https://github.com/OpenDiablo2/OpenDiablo2
synced 2025-01-03 16:06:57 -05:00
parent
7f6e14c5d0
commit
30b680d9d1
@ -204,6 +204,17 @@ func (v *Engine) RenderRegion(region EngineRegion, target *ebiten.Image) {
|
|||||||
|
|
||||||
func (v *Engine) RenderPass1(region *Region, offX, offY, x, y int, target *ebiten.Image) {
|
func (v *Engine) RenderPass1(region *Region, offX, offY, x, y int, target *ebiten.Image) {
|
||||||
tile := region.DS1.Tiles[y][x]
|
tile := region.DS1.Tiles[y][x]
|
||||||
|
// Draw lower walls
|
||||||
|
for i := range tile.Walls {
|
||||||
|
if tile.Walls[i].Orientation <= 15 {
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
if tile.Walls[i].Hidden || tile.Walls[i].Orientation == 10 || tile.Walls[i].Orientation == 11 || tile.Walls[i].Orientation == 0 {
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
region.RenderTile(offX+int(v.OffsetX), offY+int(v.OffsetY), x, y, d2enum.RegionLayerTypeWalls, i, target)
|
||||||
|
}
|
||||||
|
|
||||||
for i := range tile.Floors {
|
for i := range tile.Floors {
|
||||||
if tile.Floors[i].Hidden || tile.Floors[i].Prop1 == 0 {
|
if tile.Floors[i].Hidden || tile.Floors[i].Prop1 == 0 {
|
||||||
continue
|
continue
|
||||||
@ -217,16 +228,6 @@ func (v *Engine) RenderPass1(region *Region, offX, offY, x, y int, target *ebite
|
|||||||
region.RenderTile(offX+int(v.OffsetX), offY+int(v.OffsetY), x, y, d2enum.RegionLayerTypeShadows, i, target)
|
region.RenderTile(offX+int(v.OffsetX), offY+int(v.OffsetY), x, y, d2enum.RegionLayerTypeShadows, i, target)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Draw lower walls
|
|
||||||
for i := range tile.Walls {
|
|
||||||
if tile.Walls[i].Orientation <= 15 {
|
|
||||||
continue
|
|
||||||
}
|
|
||||||
if tile.Walls[i].Hidden || tile.Walls[i].Orientation == 10 || tile.Walls[i].Orientation == 11 || tile.Walls[i].Orientation == 0 {
|
|
||||||
continue
|
|
||||||
}
|
|
||||||
region.RenderTile(offX+int(v.OffsetX), offY+int(v.OffsetY), x, y, d2enum.RegionLayerTypeWalls, i, target)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (v *Engine) RenderPass2(region *Region, offX, offY, x, y int, target *ebiten.Image) {
|
func (v *Engine) RenderPass2(region *Region, offX, offY, x, y int, target *ebiten.Image) {
|
||||||
|
@ -224,10 +224,7 @@ func (v *Region) renderWall(tile d2ds1.WallRecord, offsetX, offsetY int, target
|
|||||||
}
|
}
|
||||||
|
|
||||||
yAdjust := 0
|
yAdjust := 0
|
||||||
if tile.Orientation > 15 {
|
if tile.Orientation == 15 {
|
||||||
// Lower Walls
|
|
||||||
yAdjust = 80
|
|
||||||
} else if tile.Orientation == 15 {
|
|
||||||
// Roof
|
// Roof
|
||||||
yAdjust = -int(tileData.RoofHeight)
|
yAdjust = -int(tileData.RoofHeight)
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user