1
1
mirror of https://github.com/OpenDiablo2/OpenDiablo2 synced 2024-06-03 22:40:43 +00:00
OpenDiablo2/d2common/d2fileformats/d2ds1/tile.go
gucio321 194c1e467c unit tests for ds1 (#4)
* ds1 refactor: added test fore some methods; put tests in right order

* ds1 refactor: unit tests for all methods

* ds1 refactor: fixed build errors

* ds1 refactor: lintfix

* ds1 refactor: fixed bug with SetWidth, SetHeight methods

* ds1 refactor: rename tile_record.go -> tile.go

* ds1 refactor: unit test for SetTiles

Co-authored-by: M. Sz <mszeptuch@protonmail.com>
2021-03-24 10:10:36 -07:00

19 lines
505 B
Go

package d2ds1
// Tile represents a tile record in a DS1 file.
type Tile struct {
Floors []Floor // Collection of floor records
Walls []Wall // Collection of wall records
Shadows []Shadow // Collection of shadow records
Substitutions []Substitution // Collection of substitutions
}
func makeDefaultTile() Tile {
return Tile{
Floors: []Floor{{}},
Walls: []Wall{{}},
Shadows: []Shadow{{}},
Substitutions: []Substitution{{}},
}
}