1
1
mirror of https://github.com/OpenDiablo2/OpenDiablo2 synced 2024-07-23 05:24:19 -04:00
OpenDiablo2/d2common/d2loader/asset/asset.go
lord 77c358ed67
d2loader refactor (#722)
* d2loader refactor

- export sources
- asset and source both have a Path method
- make asset and source implement fmt.Stringer, which just calls Path method
- Loader.AddSource now returns the source and an error

* Update loader.go
2020-09-09 14:35:52 -04:00

19 lines
372 B
Go

package asset
import (
"fmt"
"io"
"github.com/OpenDiablo2/OpenDiablo2/d2common/d2loader/asset/types"
)
// Asset represents a game asset. It has a type, an asset source, a sub-path (within the
// asset source), and it can read data and seek within the data
type Asset interface {
fmt.Stringer
io.ReadSeeker
Type() types.AssetType
Source() Source
Path() string
}