Documentation ¶
Index ¶
- Constants
- type Archive
- type Bitmaps
- type Direction
- type ElectronicMessages
- func (messages *ElectronicMessages) Message(messageType model.ElectronicMessageType, id int) (message model.ElectronicMessage, err error)
- func (messages *ElectronicMessages) MessageAudio(messageType model.ElectronicMessageType, id int, ...) (data audio.SoundData, err error)
- func (messages *ElectronicMessages) Remove(messageType model.ElectronicMessageType, id int) (err error)
- func (messages *ElectronicMessages) SetMessage(messageType model.ElectronicMessageType, id int, ...) (err error)
- func (messages *ElectronicMessages) SetMessageAudio(messageType model.ElectronicMessageType, id int, ...) (err error)
- type Fonts
- type GameObjects
- func (gameObjects *GameObjects) Bitmap(id res.ObjectID, index int) (bmp image.Bitmap, err error)
- func (gameObjects *GameObjects) Icon(id res.ObjectID) (bmp image.Bitmap)
- func (gameObjects *GameObjects) Objects() []model.GameObject
- func (gameObjects *GameObjects) SetBitmap(id res.ObjectID, index int, bmp image.Bitmap) (err error)
- func (gameObjects *GameObjects) SetObjectData(id res.ObjectID, newData objprop.ObjectData) objprop.ObjectData
- type InplaceDataStore
- func (inplace *InplaceDataStore) AddLevelObject(projectID string, archiveID string, levelID int, ...)
- func (inplace *InplaceDataStore) Audio(projectID string, key model.ResourceKey, ...)
- func (inplace *InplaceDataStore) Bitmap(projectID string, key model.ResourceKey, ...)
- func (inplace *InplaceDataStore) ElectronicMessage(projectID string, messageType model.ElectronicMessageType, id int, ...)
- func (inplace *InplaceDataStore) ElectronicMessageAudio(projectID string, messageType model.ElectronicMessageType, id int, ...)
- func (inplace *InplaceDataStore) Font(projectID string, fontID int, onSuccess func(font *model.Font), ...)
- func (inplace *InplaceDataStore) GameObjectBitmap(projectID string, class, subclass, objType int, index int, ...)
- func (inplace *InplaceDataStore) GameObjectIcon(projectID string, class, subclass, objType int, ...)
- func (inplace *InplaceDataStore) GameObjects(projectID string, onSuccess func(objects []model.GameObject), ...)
- func (inplace *InplaceDataStore) LevelObjects(projectID string, archiveID string, levelID int, ...)
- func (inplace *InplaceDataStore) LevelProperties(projectID string, archiveID string, levelID int, ...)
- func (inplace *InplaceDataStore) LevelSurveillanceObjects(projectID string, archiveID string, levelID int, ...)
- func (inplace *InplaceDataStore) LevelTextureAnimations(projectID string, archiveID string, levelID int, ...)
- func (inplace *InplaceDataStore) LevelTextures(projectID string, archiveID string, levelID int, ...)
- func (inplace *InplaceDataStore) Levels(projectID string, archiveID string, onSuccess func(levels []model.Level), ...)
- func (inplace *InplaceDataStore) NewProject(projectID string, onSuccess func(), onFailure model.FailureFunc)
- func (inplace *InplaceDataStore) Palette(projectID string, paletteID string, onSuccess func(colors [256]model.Color), ...)
- func (inplace *InplaceDataStore) Projects(onSuccess func(projects []string), onFailure model.FailureFunc)
- func (inplace *InplaceDataStore) RemoveElectronicMessage(projectID string, messageType model.ElectronicMessageType, id int, ...)
- func (inplace *InplaceDataStore) RemoveLevelObject(projectID string, archiveID string, levelID int, objectID int, ...)
- func (inplace *InplaceDataStore) SaveProject(projectID string)
- func (inplace *InplaceDataStore) SetAudio(projectID string, key model.ResourceKey, data audio.SoundData, ...)
- func (inplace *InplaceDataStore) SetBitmap(projectID string, key model.ResourceKey, rawBitmap *model.RawBitmap, ...)
- func (inplace *InplaceDataStore) SetElectronicMessage(projectID string, messageType model.ElectronicMessageType, id int, ...)
- func (inplace *InplaceDataStore) SetElectronicMessageAudio(projectID string, messageType model.ElectronicMessageType, id int, ...)
- func (inplace *InplaceDataStore) SetGameObject(projectID string, class, subclass, objType int, ...)
- func (inplace *InplaceDataStore) SetGameObjectBitmap(projectID string, class, subclass, objType int, index int, ...)
- func (inplace *InplaceDataStore) SetLevelObject(projectID string, archiveID string, levelID int, objectID int, ...)
- func (inplace *InplaceDataStore) SetLevelProperties(projectID string, archiveID string, levelID int, ...)
- func (inplace *InplaceDataStore) SetLevelSurveillanceObject(projectID string, archiveID string, levelID int, surveillanceIndex int, ...)
- func (inplace *InplaceDataStore) SetLevelTextureAnimation(projectID string, archiveID string, levelID int, animationGroup int, ...)
- func (inplace *InplaceDataStore) SetLevelTextures(projectID string, archiveID string, levelID int, textureIDs []int, ...)
- func (inplace *InplaceDataStore) SetText(projectID string, key model.ResourceKey, text string, ...)
- func (inplace *InplaceDataStore) SetTextureBitmap(projectID string, textureID int, size string, rawBitmap *model.RawBitmap, ...)
- func (inplace *InplaceDataStore) SetTextureProperties(projectID string, textureID int, newProperties *model.TextureProperties, ...)
- func (inplace *InplaceDataStore) SetTile(projectID string, archiveID string, levelID int, x, y int, ...)
- func (inplace *InplaceDataStore) Text(projectID string, key model.ResourceKey, ...)
- func (inplace *InplaceDataStore) TextureBitmap(projectID string, textureID int, size string, ...)
- func (inplace *InplaceDataStore) Textures(projectID string, onSuccess func(textures []model.TextureProperties), ...)
- func (inplace *InplaceDataStore) Tile(projectID string, archiveID string, levelID int, x, y int, ...)
- func (inplace *InplaceDataStore) Tiles(projectID string, archiveID string, levelID int, ...)
- type Level
- func (level *Level) AddObject(template *model.LevelObjectTemplate) (entry model.LevelObject, err error)
- func (level *Level) ID() int
- func (level *Level) LevelSurveillanceObjects() []model.SurveillanceObject
- func (level *Level) Objects() []model.LevelObject
- func (level *Level) Properties() (result model.LevelProperties)
- func (level *Level) RemoveObject(objectIndex int) (err error)
- func (level *Level) SetLevelSurveillanceObject(index int, data model.SurveillanceObject) []model.SurveillanceObject
- func (level *Level) SetObject(objectIndex int, newProperties *model.LevelObjectProperties) (properties model.LevelObjectProperties, err error)
- func (level *Level) SetProperties(properties model.LevelProperties)
- func (level *Level) SetTextureAnimation(animationGroup int, properties model.TextureAnimation)
- func (level *Level) SetTextures(newIds []int)
- func (level *Level) SetTileProperties(x, y int, properties model.TileProperties)
- func (level *Level) TextureAnimations() (result []model.TextureAnimation)
- func (level *Level) Textures() (result []int)
- func (level *Level) TileProperties(x, y int) (result model.TileProperties)
- type Palettes
- type Project
- func (project *Project) Archive() *Archive
- func (project *Project) Bitmaps() *Bitmaps
- func (project *Project) ElectronicMessages() *ElectronicMessages
- func (project *Project) Fonts() *Fonts
- func (project *Project) GameObjects() *GameObjects
- func (project *Project) Name() string
- func (project *Project) Palettes() *Palettes
- func (project *Project) Save()
- func (project *Project) Sounds() *Sounds
- func (project *Project) Texts() *Texts
- func (project *Project) Textures() *Textures
- type Sounds
- type Texts
- type Textures
- func (textures *Textures) Image(index int, size model.TextureSize) (bmp image.Bitmap)
- func (textures *Textures) Properties(index int) model.TextureProperties
- func (textures *Textures) SetImage(index int, size model.TextureSize, imgBitmap image.Bitmap)
- func (textures *Textures) SetProperties(index int, prop model.TextureProperties)
- func (textures *Textures) TextureCount() int
- type Workspace
Constants ¶
const ( DirNone = Direction(0) DirNorth = Direction(1) DirEast = Direction(2) DirSouth = Direction(4) DirWest = Direction(8) )
const MaximumLevelsPerArchive = 16
MaximumLevelsPerArchive is the constant of how many levels are possible.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Archive ¶
type Archive struct {
// contains filtered or unexported fields
}
Archive wraps a map archive
func NewArchive ¶
func NewArchive(library io.StoreLibrary, storeName string) (archive *Archive, err error)
NewArchive creates a new archive wrapper for given store name. This wrapper is applicable for the "starting game" archive, as well as savegames.
func (*Archive) HasLevel ¶
HasLevel returns true when given level ID (0..15) refers to a valid level.
type Bitmaps ¶ added in v0.8.0
type Bitmaps struct {
// contains filtered or unexported fields
}
Bitmaps is the adapter for general bitmaps.
func NewBitmaps ¶ added in v0.8.0
func NewBitmaps(library io.StoreLibrary) (bitmaps *Bitmaps, err error)
NewBitmaps returns a new Bitmaps instance, if possible.
func (*Bitmaps) SetImage ¶ added in v0.8.0
func (bitmaps *Bitmaps) SetImage(key model.ResourceKey, bmp image.Bitmap) (resultKey model.ResourceKey, err error)
SetImage requests to set the bitmap data of a resource.
type ElectronicMessages ¶ added in v0.8.0
type ElectronicMessages struct {
// contains filtered or unexported fields
}
ElectronicMessages handles all data related to electronic messages.
func NewElectronicMessages ¶ added in v0.8.0
func NewElectronicMessages(library io.StoreLibrary) (messages *ElectronicMessages, err error)
NewElectronicMessages returns a new instance of ElectronicMessages.
func (*ElectronicMessages) Message ¶ added in v0.8.0
func (messages *ElectronicMessages) Message(messageType model.ElectronicMessageType, id int) (message model.ElectronicMessage, err error)
Message tries to retrieve the message data for given identification.
func (*ElectronicMessages) MessageAudio ¶ added in v0.10.0
func (messages *ElectronicMessages) MessageAudio(messageType model.ElectronicMessageType, id int, language model.ResourceLanguage) (data audio.SoundData, err error)
MessageAudio tries to retrieve the audio data for given key.
func (*ElectronicMessages) Remove ¶ added in v1.0.0
func (messages *ElectronicMessages) Remove(messageType model.ElectronicMessageType, id int) (err error)
Remove tries to remove the message.
func (*ElectronicMessages) SetMessage ¶ added in v0.8.0
func (messages *ElectronicMessages) SetMessage(messageType model.ElectronicMessageType, id int, message model.ElectronicMessage) (err error)
SetMessage updates the properties of a message.
func (*ElectronicMessages) SetMessageAudio ¶ added in v0.10.0
func (messages *ElectronicMessages) SetMessageAudio(messageType model.ElectronicMessageType, id int, language model.ResourceLanguage, soundData audio.SoundData) (err error)
SetMessageAudio tries to set the audio data for given key.
type Fonts ¶ added in v0.3.0
type Fonts struct {
// contains filtered or unexported fields
}
Fonts represents the game fonts accessor
type GameObjects ¶
type GameObjects struct {
// contains filtered or unexported fields
}
GameObjects provides access to game-global information about objects.
func NewGameObjects ¶
func NewGameObjects(library io.StoreLibrary) (gameObjects *GameObjects, err error)
NewGameObjects returns a new instance of GameObjects.
func (*GameObjects) Icon ¶ added in v0.3.0
func (gameObjects *GameObjects) Icon(id res.ObjectID) (bmp image.Bitmap)
Icon returns the icon image of the specified game object. It first tries to return the bitmap for the map icon. If that is all transparent, the function reverts to the object icon.
func (*GameObjects) Objects ¶ added in v0.5.0
func (gameObjects *GameObjects) Objects() []model.GameObject
Objects returns an array of all objects
func (*GameObjects) SetBitmap ¶ added in v0.10.3
SetBitmap stores an image for the specified game object.
func (*GameObjects) SetObjectData ¶ added in v0.6.0
func (gameObjects *GameObjects) SetObjectData(id res.ObjectID, newData objprop.ObjectData) objprop.ObjectData
SetObjectData stores new object data
type InplaceDataStore ¶ added in v0.4.0
type InplaceDataStore struct {
// contains filtered or unexported fields
}
InplaceDataStore implements the model.DataStore interface with an inplace project. This store has only one project, called "(inplace)", which overwrites the source data files.
func NewInplaceDataStore ¶ added in v0.4.0
func NewInplaceDataStore(source release.Release, outQueue chan<- func(), autoSaveTimeoutMSec int) *InplaceDataStore
NewInplaceDataStore returns a new instance of an inplace data store.
func (*InplaceDataStore) AddLevelObject ¶ added in v0.5.0
func (inplace *InplaceDataStore) AddLevelObject(projectID string, archiveID string, levelID int, template model.LevelObjectTemplate, onSuccess func(object model.LevelObject), onFailure model.FailureFunc)
AddLevelObject implements the model.DataStore interface
func (*InplaceDataStore) Audio ¶ added in v0.10.0
func (inplace *InplaceDataStore) Audio(projectID string, key model.ResourceKey, onSuccess func(model.ResourceKey, audio.SoundData), onFailure model.FailureFunc)
Audio implements the model.DataStore interface
func (*InplaceDataStore) Bitmap ¶ added in v0.8.0
func (inplace *InplaceDataStore) Bitmap(projectID string, key model.ResourceKey, onSuccess func(model.ResourceKey, *model.RawBitmap), onFailure model.FailureFunc)
Bitmap implements the model.DataStore interface
func (*InplaceDataStore) ElectronicMessage ¶ added in v0.8.0
func (inplace *InplaceDataStore) ElectronicMessage(projectID string, messageType model.ElectronicMessageType, id int, onSuccess func(message model.ElectronicMessage), onFailure model.FailureFunc)
ElectronicMessage implements the model.DataStore interface.
func (*InplaceDataStore) ElectronicMessageAudio ¶ added in v0.10.0
func (inplace *InplaceDataStore) ElectronicMessageAudio(projectID string, messageType model.ElectronicMessageType, id int, language model.ResourceLanguage, onSuccess func(data audio.SoundData), onFailure model.FailureFunc)
ElectronicMessageAudio implements the model.DataStore interface.
func (*InplaceDataStore) Font ¶ added in v0.4.0
func (inplace *InplaceDataStore) Font(projectID string, fontID int, onSuccess func(font *model.Font), onFailure model.FailureFunc)
Font implements the model.DataStore interface
func (*InplaceDataStore) GameObjectBitmap ¶ added in v0.10.3
func (inplace *InplaceDataStore) GameObjectBitmap(projectID string, class, subclass, objType int, index int, onSuccess func(bmp *model.RawBitmap), onFailure model.FailureFunc)
GameObjectBitmap implements the model.DataStore interface
func (*InplaceDataStore) GameObjectIcon ¶ added in v0.4.0
func (inplace *InplaceDataStore) GameObjectIcon(projectID string, class, subclass, objType int, onSuccess func(bmp *model.RawBitmap), onFailure model.FailureFunc)
GameObjectIcon implements the model.DataStore interface
func (*InplaceDataStore) GameObjects ¶ added in v0.5.0
func (inplace *InplaceDataStore) GameObjects(projectID string, onSuccess func(objects []model.GameObject), onFailure model.FailureFunc)
GameObjects implements the model.DataStore interface
func (*InplaceDataStore) LevelObjects ¶ added in v0.4.0
func (inplace *InplaceDataStore) LevelObjects(projectID string, archiveID string, levelID int, onSuccess func(objects *model.LevelObjects), onFailure model.FailureFunc)
LevelObjects implements the model.DataStore interface
func (*InplaceDataStore) LevelProperties ¶ added in v0.7.0
func (inplace *InplaceDataStore) LevelProperties(projectID string, archiveID string, levelID int, onSuccess func(properties model.LevelProperties), onFailure model.FailureFunc)
LevelProperties implements the model.DataStore interface.
func (*InplaceDataStore) LevelSurveillanceObjects ¶ added in v0.7.0
func (inplace *InplaceDataStore) LevelSurveillanceObjects(projectID string, archiveID string, levelID int, onSuccess func(objects []model.SurveillanceObject), onFailure model.FailureFunc)
LevelSurveillanceObjects implements the model.DataStore interface.
func (*InplaceDataStore) LevelTextureAnimations ¶ added in v0.7.0
func (inplace *InplaceDataStore) LevelTextureAnimations(projectID string, archiveID string, levelID int, onSuccess func(animations []model.TextureAnimation), onFailure model.FailureFunc)
LevelTextureAnimations implements the model.DataStore interface
func (*InplaceDataStore) LevelTextures ¶ added in v0.4.0
func (inplace *InplaceDataStore) LevelTextures(projectID string, archiveID string, levelID int, onSuccess func(textureIDs []int), onFailure model.FailureFunc)
LevelTextures implements the model.DataStore interface
func (*InplaceDataStore) Levels ¶ added in v0.4.0
func (inplace *InplaceDataStore) Levels(projectID string, archiveID string, onSuccess func(levels []model.Level), onFailure model.FailureFunc)
Levels implements the model.DataStore interface
func (*InplaceDataStore) NewProject ¶ added in v0.4.0
func (inplace *InplaceDataStore) NewProject(projectID string, onSuccess func(), onFailure model.FailureFunc)
NewProject implements the model.DataStore interface
func (*InplaceDataStore) Palette ¶ added in v0.4.0
func (inplace *InplaceDataStore) Palette(projectID string, paletteID string, onSuccess func(colors [256]model.Color), onFailure model.FailureFunc)
Palette implements the model.DataStore interface
func (*InplaceDataStore) Projects ¶ added in v0.4.0
func (inplace *InplaceDataStore) Projects(onSuccess func(projects []string), onFailure model.FailureFunc)
Projects implements the model.DataStore interface
func (*InplaceDataStore) RemoveElectronicMessage ¶ added in v1.0.0
func (inplace *InplaceDataStore) RemoveElectronicMessage(projectID string, messageType model.ElectronicMessageType, id int, onSuccess func(), onFailure model.FailureFunc)
RemoveElectronicMessage implements the model.DataStore interface.
func (*InplaceDataStore) RemoveLevelObject ¶ added in v0.5.0
func (inplace *InplaceDataStore) RemoveLevelObject(projectID string, archiveID string, levelID int, objectID int, onSuccess func(), onFailure model.FailureFunc)
RemoveLevelObject implements the model.DataStore interface
func (*InplaceDataStore) SaveProject ¶ added in v0.11.0
func (inplace *InplaceDataStore) SaveProject(projectID string)
SaveProject implements the model.DataStore interface
func (*InplaceDataStore) SetAudio ¶ added in v0.10.0
func (inplace *InplaceDataStore) SetAudio(projectID string, key model.ResourceKey, data audio.SoundData, onSuccess func(model.ResourceKey), onFailure model.FailureFunc)
SetAudio implements the model.DataStore interface
func (*InplaceDataStore) SetBitmap ¶ added in v0.8.0
func (inplace *InplaceDataStore) SetBitmap(projectID string, key model.ResourceKey, rawBitmap *model.RawBitmap, onSuccess func(model.ResourceKey, *model.RawBitmap), onFailure model.FailureFunc)
SetBitmap implements the model.DataStore interface
func (*InplaceDataStore) SetElectronicMessage ¶ added in v0.8.0
func (inplace *InplaceDataStore) SetElectronicMessage(projectID string, messageType model.ElectronicMessageType, id int, message model.ElectronicMessage, onSuccess func(message model.ElectronicMessage), onFailure model.FailureFunc)
SetElectronicMessage implements the model.DataStore interface.
func (*InplaceDataStore) SetElectronicMessageAudio ¶ added in v0.10.0
func (inplace *InplaceDataStore) SetElectronicMessageAudio(projectID string, messageType model.ElectronicMessageType, id int, language model.ResourceLanguage, data audio.SoundData, onSuccess func(), onFailure model.FailureFunc)
SetElectronicMessageAudio implements the model.DataStore interface.
func (*InplaceDataStore) SetGameObject ¶ added in v0.6.0
func (inplace *InplaceDataStore) SetGameObject(projectID string, class, subclass, objType int, properties *model.GameObjectProperties, onSuccess func(properties *model.GameObjectProperties), onFailure model.FailureFunc)
SetGameObject implements the model.DataStore interface
func (*InplaceDataStore) SetGameObjectBitmap ¶ added in v0.10.3
func (inplace *InplaceDataStore) SetGameObjectBitmap(projectID string, class, subclass, objType int, index int, bmp *model.RawBitmap, onSuccess func(), onFailure model.FailureFunc)
SetGameObjectBitmap implements the model.DataStore interface
func (*InplaceDataStore) SetLevelObject ¶ added in v0.5.0
func (inplace *InplaceDataStore) SetLevelObject(projectID string, archiveID string, levelID int, objectID int, properties *model.LevelObjectProperties, onSuccess func(properties *model.LevelObjectProperties), onFailure model.FailureFunc)
SetLevelObject implements the model.DataStore interface.
func (*InplaceDataStore) SetLevelProperties ¶ added in v0.7.0
func (inplace *InplaceDataStore) SetLevelProperties(projectID string, archiveID string, levelID int, properties model.LevelProperties, onSuccess func(properties model.LevelProperties), onFailure model.FailureFunc)
SetLevelProperties implements the model.DataStore interface.
func (*InplaceDataStore) SetLevelSurveillanceObject ¶ added in v0.7.0
func (inplace *InplaceDataStore) SetLevelSurveillanceObject(projectID string, archiveID string, levelID int, surveillanceIndex int, data model.SurveillanceObject, onSuccess func(objects []model.SurveillanceObject), onFailure model.FailureFunc)
SetLevelSurveillanceObject implements the model.DataStore interface.
func (*InplaceDataStore) SetLevelTextureAnimation ¶ added in v0.7.0
func (inplace *InplaceDataStore) SetLevelTextureAnimation(projectID string, archiveID string, levelID int, animationGroup int, properties model.TextureAnimation, onSuccess func(animations []model.TextureAnimation), onFailure model.FailureFunc)
SetLevelTextureAnimation implements the model.DataStore interface
func (*InplaceDataStore) SetLevelTextures ¶ added in v0.4.0
func (inplace *InplaceDataStore) SetLevelTextures(projectID string, archiveID string, levelID int, textureIDs []int, onSuccess func(textureIDs []int), onFailure model.FailureFunc)
SetLevelTextures implements the model.DataStore interface
func (*InplaceDataStore) SetText ¶ added in v0.10.0
func (inplace *InplaceDataStore) SetText(projectID string, key model.ResourceKey, text string, onSuccess func(model.ResourceKey, string), onFailure model.FailureFunc)
SetText implements the model.DataStore interface
func (*InplaceDataStore) SetTextureBitmap ¶ added in v0.8.0
func (inplace *InplaceDataStore) SetTextureBitmap(projectID string, textureID int, size string, rawBitmap *model.RawBitmap, onSuccess func(*model.RawBitmap), onFailure model.FailureFunc)
SetTextureBitmap implements the model.DataStore interface
func (*InplaceDataStore) SetTextureProperties ¶ added in v0.7.0
func (inplace *InplaceDataStore) SetTextureProperties(projectID string, textureID int, newProperties *model.TextureProperties, onSuccess func(properties *model.TextureProperties), onFailure model.FailureFunc)
SetTextureProperties implements the model.DataStore interface.
func (*InplaceDataStore) SetTile ¶ added in v0.4.0
func (inplace *InplaceDataStore) SetTile(projectID string, archiveID string, levelID int, x, y int, properties model.TileProperties, onSuccess func(properties model.TileProperties), onFailure model.FailureFunc)
SetTile implements the model.DataStore interface
func (*InplaceDataStore) Text ¶ added in v0.10.0
func (inplace *InplaceDataStore) Text(projectID string, key model.ResourceKey, onSuccess func(model.ResourceKey, string), onFailure model.FailureFunc)
Text implements the model.DataStore interface
func (*InplaceDataStore) TextureBitmap ¶ added in v0.4.0
func (inplace *InplaceDataStore) TextureBitmap(projectID string, textureID int, size string, onSuccess func(bmp *model.RawBitmap), onFailure model.FailureFunc)
TextureBitmap implements the model.DataStore interface
func (*InplaceDataStore) Textures ¶ added in v0.4.0
func (inplace *InplaceDataStore) Textures(projectID string, onSuccess func(textures []model.TextureProperties), onFailure model.FailureFunc)
Textures implements the model.DataStore interface
type Level ¶
type Level struct {
// contains filtered or unexported fields
}
Level is a structure holding level specific information.
func NewLevel ¶
func NewLevel(store *io.DynamicChunkStore, id int) *Level
NewLevel returns a new instance of a Level structure.
func (*Level) AddObject ¶ added in v0.3.0
func (level *Level) AddObject(template *model.LevelObjectTemplate) (entry model.LevelObject, err error)
AddObject adds a new object at given tile.
func (*Level) LevelSurveillanceObjects ¶ added in v0.7.0
func (level *Level) LevelSurveillanceObjects() []model.SurveillanceObject
LevelSurveillanceObjects returns the surveillance objects of this level
func (*Level) Objects ¶
func (level *Level) Objects() []model.LevelObject
Objects returns an array of all used objects.
func (*Level) Properties ¶
func (level *Level) Properties() (result model.LevelProperties)
Properties returns the properties of the level.
func (*Level) RemoveObject ¶ added in v0.5.0
RemoveObject removes an object from the level.
func (*Level) SetLevelSurveillanceObject ¶ added in v0.7.0
func (level *Level) SetLevelSurveillanceObject(index int, data model.SurveillanceObject) []model.SurveillanceObject
SetLevelSurveillanceObject updates one surveillance object
func (*Level) SetObject ¶ added in v0.5.0
func (level *Level) SetObject(objectIndex int, newProperties *model.LevelObjectProperties) (properties model.LevelObjectProperties, err error)
SetObject modifies the properties of identified object.
func (*Level) SetProperties ¶ added in v0.7.0
func (level *Level) SetProperties(properties model.LevelProperties)
SetProperties updates the properties of a level.
func (*Level) SetTextureAnimation ¶ added in v0.7.0
func (level *Level) SetTextureAnimation(animationGroup int, properties model.TextureAnimation)
SetTextureAnimation modifies the properties of identified animation group.
func (*Level) SetTextures ¶
SetTextures sets the texture identifier for this level.
func (*Level) SetTileProperties ¶
func (level *Level) SetTileProperties(x, y int, properties model.TileProperties)
SetTileProperties sets the properties of a specific tile.
func (*Level) TextureAnimations ¶ added in v0.7.0
func (level *Level) TextureAnimations() (result []model.TextureAnimation)
TextureAnimations returns the properties of the animation groups.
func (*Level) TileProperties ¶
func (level *Level) TileProperties(x, y int) (result model.TileProperties)
TileProperties returns the properties of a specific tile.
type Palettes ¶
type Palettes struct {
// contains filtered or unexported fields
}
func NewPalettes ¶
func NewPalettes(library io.StoreLibrary) (palettes *Palettes, err error)
type Project ¶
type Project struct {
// contains filtered or unexported fields
}
Project represents one editor project, including access to all the resources.
func NewProject ¶
func NewProject(name string, library io.StoreLibrary) (project *Project, err error)
NewProject creates a new project based on given store library.
func (*Project) ElectronicMessages ¶ added in v0.8.0
func (project *Project) ElectronicMessages() *ElectronicMessages
ElectronicMessages returns the wrapper for the electronic messages.
func (*Project) GameObjects ¶
func (project *Project) GameObjects() *GameObjects
GameObjects returns the wrapper for the game objects.
func (*Project) Save ¶ added in v0.11.0
func (project *Project) Save()
Save requests to persist all currently pending changes.
type Sounds ¶ added in v0.10.0
type Sounds struct {
// contains filtered or unexported fields
}
Sounds is the adapter for general sounds.
func NewSounds ¶ added in v0.10.0
func NewSounds(library io.StoreLibrary) (sounds *Sounds, err error)
NewSounds returns a new Sounds instance, if possible.
func (*Sounds) SetAudio ¶ added in v0.10.0
func (sounds *Sounds) SetAudio(key model.ResourceKey, soundData audio.SoundData) (resultKey model.ResourceKey, err error)
SetAudio requests to set the audio of a sound resource.
type Texts ¶ added in v0.10.0
type Texts struct {
// contains filtered or unexported fields
}
Texts is the adapter for general texts.
func NewTexts ¶ added in v0.10.0
func NewTexts(library io.StoreLibrary) (texts *Texts, err error)
NewTexts returns a new Texts instance, if possible.
func (*Texts) SetText ¶ added in v0.10.0
func (texts *Texts) SetText(key model.ResourceKey, value string) (resultKey model.ResourceKey, err error)
SetText requests to set the string of a text resource.
type Textures ¶
type Textures struct {
// contains filtered or unexported fields
}
Textures is the adapter of texture information.
func NewTextures ¶
func NewTextures(library io.StoreLibrary) (textures *Textures, err error)
NewTextures returns a new Textures instance, if possible.
func (*Textures) Properties ¶
func (textures *Textures) Properties(index int) model.TextureProperties
Properties returns the texture properties of the identified texture.
func (*Textures) SetImage ¶ added in v0.8.0
SetImage requests to set the bitmap of identified & sized texture..
func (*Textures) SetProperties ¶
func (textures *Textures) SetProperties(index int, prop model.TextureProperties)
SetProperties requests to update the properties of identified texture.
func (*Textures) TextureCount ¶
TextureCount returns the number of available textures.
type Workspace ¶
type Workspace struct {
// contains filtered or unexported fields
}
Workspace describes a container of projects.
func NewWorkspace ¶
func NewWorkspace(source release.Release, projects release.ReleaseContainer, autoSaveTimeoutMSec int) *Workspace
NewWorkspace takes a Release as a basis for existing resources and returns a new workspace instance. With this instance, projects from given projects container can be worked with.
func (*Workspace) NewProject ¶
NewProject tries to create a new project in the workspace.
func (*Workspace) ProjectNames ¶
ProjectNames returns all currently known project identifiers.