mirror of
https://github.com/OpenDiablo2/OpenDiablo2
synced 2024-09-06 11:34:15 -04:00
* 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>
19 lines
505 B
Go
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{{}},
|
|
}
|
|
}
|