1
1
mirror of https://github.com/OpenDiablo2/OpenDiablo2 synced 2024-11-02 17:27:23 -04:00
OpenDiablo2/d2common/d2enum/tiletype.go
Ziemas 75112ec736
Show special tiles in mapdebug (#386)
More useful than the floor stuff

Also method for testing if special
2020-06-21 22:14:06 -04:00

54 lines
1.6 KiB
Go

package d2enum
type TileType byte
const (
Floor TileType = 0
LeftWall TileType = 1
RightWall TileType = 2
RightPartOfNorthCornerWall TileType = 3
LeftPartOfNorthCornerWall TileType = 4
LeftEndWall TileType = 5
RightEndWall TileType = 6
SouthCornerWall TileType = 7
LeftWallWithDoor TileType = 8
RightWallWithDoor TileType = 9
SpecialTile1 TileType = 10
SpecialTile2 TileType = 11
PillarsColumnsAndStandaloneObjects TileType = 12
Shadow TileType = 13
Tree TileType = 14
Roof TileType = 15
LowerWallsEquivalentToLeftWall TileType = 16
LowerWallsEquivalentToRightWall TileType = 17
LowerWallsEquivalentToRightLeftNorthCornerWall TileType = 18
LowerWallsEquivalentToSouthCornerwall TileType = 19
)
func (tile TileType) LowerWall() bool {
switch tile {
case 16, 17, 18, 19:
return true
default:
return false
}
}
func (tile TileType) UpperWall() bool {
switch tile {
case 1, 2, 3, 4, 5, 6, 7, 8, 9, 12, 14:
return true
default:
return false
}
}
func (tile TileType) Special() bool {
switch tile {
case 10, 11:
return true
default:
return false
}
}