mirror of
https://github.com/OpenDiablo2/OpenDiablo2
synced 2024-11-04 17:27:16 -05:00
9e58b134e5
* Refactored animation mode enum * More d2enum changes * Refactored tile enum * Refactored weapon class enum * Refactored more enums * Refactored item event enum * Fixed init_functions animation mode * Removed string2enum from MonsterAnimationMode * Refactored ItemStatCost description * Last enum lint errors * Regenerated monster stringer file
72 lines
1.4 KiB
Go
72 lines
1.4 KiB
Go
package d2enum
|
|
|
|
// TileType represents a tile type
|
|
type TileType byte
|
|
|
|
// Tile types
|
|
const (
|
|
TileFloor TileType = iota
|
|
TileLeftWall
|
|
TileRightWall
|
|
TileRightPartOfNorthCornerWall
|
|
TileLeftPartOfNorthCornerWall
|
|
TileLeftEndWall
|
|
TileRightEndWall
|
|
TileSouthCornerWall
|
|
TileLeftWallWithDoor
|
|
TileRightWallWithDoor
|
|
TileSpecialTile1
|
|
TileSpecialTile2
|
|
TilePillarsColumnsAndStandaloneObjects
|
|
TileShadow
|
|
TileTree
|
|
TileRoof
|
|
TileLowerWallsEquivalentToLeftWall
|
|
TileLowerWallsEquivalentToRightWall
|
|
TileLowerWallsEquivalentToRightLeftNorthCornerWall
|
|
TileLowerWallsEquivalentToSouthCornerwall
|
|
)
|
|
|
|
// LowerWall checks for lower wall tiles
|
|
func (tile TileType) LowerWall() bool {
|
|
switch tile {
|
|
case TileLowerWallsEquivalentToLeftWall,
|
|
TileLowerWallsEquivalentToRightWall,
|
|
TileLowerWallsEquivalentToRightLeftNorthCornerWall,
|
|
TileLowerWallsEquivalentToSouthCornerwall:
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// UpperWall checks for upper wall tiles
|
|
func (tile TileType) UpperWall() bool {
|
|
switch tile {
|
|
case TileLeftWall,
|
|
TileRightWall,
|
|
TileRightPartOfNorthCornerWall,
|
|
TileLeftPartOfNorthCornerWall,
|
|
TileLeftEndWall,
|
|
TileRightEndWall,
|
|
TileSouthCornerWall,
|
|
TileLeftWallWithDoor,
|
|
TileRightWallWithDoor,
|
|
TilePillarsColumnsAndStandaloneObjects,
|
|
TileTree:
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// Special checks for special tiles
|
|
func (tile TileType) Special() bool {
|
|
switch tile {
|
|
case TileSpecialTile1, TileSpecialTile2:
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|