Documentation ¶
Index ¶
- type Archive
- type CacheFile
- type DataReader
- func (r *DataReader) Byte() (byte, error)
- func (r *DataReader) HasMore() bool
- func (r *DataReader) String() (string, error)
- func (r *DataReader) Uint16() (uint16, error)
- func (r *DataReader) Uint24() (uint32, error)
- func (r *DataReader) Uint32() (uint32, error)
- func (r *DataReader) VarByte() (uint16, error)
- type InterfaceLoader
- type ItemLoader
- type Manager
- type MapLoader
- type WorldObjectLoader
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Archive ¶
type Archive struct {
// contains filtered or unexported fields
}
Archive is a collection of related asset.
func NewArchive ¶
NewArchive returns a new handle for an archive with data.
type CacheFile ¶
type CacheFile struct {
// contains filtered or unexported fields
}
CacheFile is a handle to the game server cache data.
func NewCacheFile ¶
NewCacheFile returns a handle to section of the game server cache data specified by an index.
type DataReader ¶
func NewDataReader ¶
func NewDataReader(b []byte) *DataReader
func (*DataReader) HasMore ¶
func (r *DataReader) HasMore() bool
HasMore returns true if more data is available to be read.
func (*DataReader) String ¶
func (r *DataReader) String() (string, error)
String reads a variable-length string.
func (*DataReader) Uint16 ¶
func (r *DataReader) Uint16() (uint16, error)
Uint16 reads an unsigned, 16-bit integer in big-endian format.
func (*DataReader) Uint24 ¶
func (r *DataReader) Uint24() (uint32, error)
Uint24 reads an unsigned, 24-bit integer in big-endian format.
func (*DataReader) Uint32 ¶
func (r *DataReader) Uint32() (uint32, error)
Uint32 reads an unsigned, 32-bit integer in big-endian format.
func (*DataReader) VarByte ¶
func (r *DataReader) VarByte() (uint16, error)
VarByte reads a variable-length value, either a byte or 2-bytes, depending on the most significant byte.
type InterfaceLoader ¶
type InterfaceLoader struct {
// contains filtered or unexported fields
}
InterfaceLoader loads interface data from game asset files.
func NewInterfaceLoader ¶
func NewInterfaceLoader(archive *Archive) *InterfaceLoader
NewInterfaceLoader returns a new loader for interface data.
type ItemLoader ¶
type ItemLoader struct {
// contains filtered or unexported fields
}
ItemLoader loads item data from game asset files.
func NewItemLoader ¶
func NewItemLoader(archive *Archive) *ItemLoader
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
Manager handles loading and managing game assets.
func NewManager ¶
NewManager returns a new asset Manager instance with game assets located at the given baseDir. You should call the Close() method once all assets have been loaded to free up resources.
func (*Manager) Close ¶
func (m *Manager) Close()
Close releases all resources related to located assets.
func (*Manager) Interfaces ¶
Interfaces returns a slice of model.Interface data extracted from game assets.
func (*Manager) Map ¶
Map returns the world map extracted from game assets and populated with objects.
func (*Manager) WorldObjects ¶
func (m *Manager) WorldObjects() ([]*model.WorldObject, error)
WorldObjects returns a slice of model.WorldObject data extracted from game assets.
type MapLoader ¶
type MapLoader struct {
// contains filtered or unexported fields
}
MapLoader loads world map data from game asset files.
func NewMapLoader ¶
type WorldObjectLoader ¶
type WorldObjectLoader struct {
// contains filtered or unexported fields
}
WorldObjectLoader loads world object data from game asset files.
func NewWorldObjectLoader ¶
func NewWorldObjectLoader(archive *Archive) *WorldObjectLoader
func (*WorldObjectLoader) Load ¶
func (l *WorldObjectLoader) Load() ([]*model.WorldObject, error)