mirror of
https://gitlab.com/2009scape/tools/2009scape-map-viewer.git
synced 2026-08-01 14:39:25 -06:00
Perfected wall rendering
This commit is contained in:
parent
f699eb91f3
commit
54a737aa61
1 changed files with 8 additions and 15 deletions
|
|
@ -265,16 +265,16 @@ class MapCell : JPanel() {
|
|||
if (sc.id == 85) return
|
||||
when (sc.rotation) {
|
||||
0 -> {
|
||||
pointX1 = 2; pointY1 = this.height; pointX2 = 2; pointY2 = 0
|
||||
pointX1 = 1; pointY1 = this.height - 1; pointX2 = 1; pointY2 = 1
|
||||
}
|
||||
1 -> {
|
||||
pointX1 = 0; pointY1 = 2; pointX2 = this.width; pointY2 = 2
|
||||
pointX1 = 1; pointY1 = 1; pointX2 = this.width - 1; pointY2 = 1
|
||||
}
|
||||
2 -> {
|
||||
pointX1 = this.width - 2; pointY1 = 0; pointX2 = this.width - 2; pointY2 = this.height
|
||||
pointX1 = this.width - 1; pointY1 = 1; pointX2 = this.width - 1; pointY2 = this.height - 1
|
||||
}
|
||||
3 -> {
|
||||
pointX1 = 0; pointY1 = this.height - 2; pointX2 = this.width; pointY2 = this.height - 2
|
||||
pointX1 = 1; pointY1 = this.height - 1; pointX2 = this.width - 1; pointY2 = this.height - 1
|
||||
}
|
||||
}
|
||||
if (sc.definition.interactive == 1 && sc.type == 0) {
|
||||
|
|
@ -290,23 +290,16 @@ class MapCell : JPanel() {
|
|||
var yArray: IntArray = intArrayOf(0, 0, 0, 0)
|
||||
when (sc.rotation) {
|
||||
0 -> {
|
||||
xArray = intArrayOf(2, 2, 2, this.width); yArray = intArrayOf(2, this.height, 2, 2)
|
||||
xArray = intArrayOf(1, 1, 1, this.width - 1); yArray = intArrayOf(1, this.height - 1, 1, 1)
|
||||
}
|
||||
1 -> {
|
||||
xArray = intArrayOf(0, this.width, this.width - 2, this.width - 2); yArray =
|
||||
intArrayOf(2, 2, 2, this.height)
|
||||
xArray = intArrayOf(1, this.width - 1, this.width - 1, this.width - 1); yArray = intArrayOf(1, 1, 1, this.height - 1)
|
||||
}
|
||||
2 -> {
|
||||
xArray = intArrayOf(0, this.width, this.width, this.width); yArray =
|
||||
intArrayOf(this.height - 2, this.height - 2, 0, this.height - 2)
|
||||
xArray = intArrayOf(1, this.width - 1, this.width - 1, this.width - 1); yArray = intArrayOf(this.height - 1, this.height - 1, 1, this.height - 1)
|
||||
}
|
||||
3 -> {
|
||||
xArray = intArrayOf(0, 0, 0, this.width); intArrayOf(
|
||||
0,
|
||||
this.height - 2,
|
||||
this.height - 2,
|
||||
this.height - 2
|
||||
)
|
||||
xArray = intArrayOf(1,1,1,this.width - 1); yArray = intArrayOf(1,this.height - 1, this.height - 1, this.height - 1)
|
||||
}
|
||||
}
|
||||
if (sc.definition.interactive == 1) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue