mirror of
https://github.com/OpenDiablo2/OpenDiablo2
synced 2024-10-15 06:33:46 -04:00
77c358ed67
* 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
19 lines
372 B
Go
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
|
|
}
|