core

package
v1.3.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 28, 2018 License: BSD-3-Clause, BSD-3-Clause Imports: 23 Imported by: 0

README

InkyBlackness Shocked-Core

Obsolescence Notice: Due to the release of InkyBlackness - HackEd, this project here has become obsolete: HackEd is the new editor to be used and is fully self-contained. Furthermore, this project is based on pre-source-release information. Use it at your own risk.

This is a library as part of the InkyBlackness project, written in Go. This library provides the core functionality of the Shocked editor.

License

The project is available under the terms of the New BSD License (see LICENSE file).

Documentation

Index

Constants

View Source
const (
	DirNone  = Direction(0)
	DirNorth = Direction(1)
	DirEast  = Direction(2)
	DirSouth = Direction(4)
	DirWest  = Direction(8)
)
View Source
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

func (archive *Archive) HasLevel(id int) bool

HasLevel returns true when given level ID (0..15) refers to a valid level.

func (*Archive) Level

func (archive *Archive) Level(id int) (level *Level)

Level returns a level wrapper should the given ID refer to a valid level.

func (*Archive) LevelIDs

func (archive *Archive) LevelIDs() (result []int)

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) Image added in v0.8.0

func (bitmaps *Bitmaps) Image(key model.ResourceKey) (bmp image.Bitmap, err error)

Image returns the image data of identified bitmap.

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 Direction

type Direction int

Direction describes a flag field.

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

func NewFonts added in v0.3.0

func NewFonts(library io.StoreLibrary) (fonts *Fonts, err error)

NewFonts returns a new instance of Fonts.

func (*Fonts) Font added in v0.3.0

func (fonts *Fonts) Font(id res.ResourceID) (font *model.Font, err error)

Font returns the font data for the identified font.

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) Bitmap added in v0.10.3

func (gameObjects *GameObjects) Bitmap(id res.ObjectID, index int) (bmp image.Bitmap, err error)

Bitmap returns an image of the specified game object.

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

func (gameObjects *GameObjects) SetBitmap(id res.ObjectID, index int, bmp image.Bitmap) (err error)

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

func (*InplaceDataStore) Tile added in v0.4.0

func (inplace *InplaceDataStore) Tile(projectID string, archiveID string, levelID int, x, y int,
	onSuccess func(properties model.TileProperties), onFailure model.FailureFunc)

Tile implements the model.DataStore interface

func (*InplaceDataStore) Tiles added in v0.4.0

func (inplace *InplaceDataStore) Tiles(projectID string, archiveID string, levelID int,
	onSuccess func(tiles model.Tiles), onFailure model.FailureFunc)

Tiles 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) ID

func (level *Level) ID() int

ID returns the identifier of the level.

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

func (level *Level) RemoveObject(objectIndex int) (err error)

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

func (level *Level) SetTextures(newIds []int)

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) Textures

func (level *Level) Textures() (result []int)

Textures returns the texture identifier used in this level.

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)

func (*Palettes) GamePalette

func (palettes *Palettes) GamePalette() (color.Palette, 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) Archive

func (project *Project) Archive() *Archive

Archive returns the wrapper for the main archive file.

func (*Project) Bitmaps added in v0.8.0

func (project *Project) Bitmaps() *Bitmaps

Bitmaps returns the wrapper for bitmaps.

func (*Project) ElectronicMessages added in v0.8.0

func (project *Project) ElectronicMessages() *ElectronicMessages

ElectronicMessages returns the wrapper for the electronic messages.

func (*Project) Fonts added in v0.3.0

func (project *Project) Fonts() *Fonts

Fonts returns the wrapper for fonts.

func (*Project) GameObjects

func (project *Project) GameObjects() *GameObjects

GameObjects returns the wrapper for the game objects.

func (*Project) Name

func (project *Project) Name() string

Name returns the name of the project.

func (*Project) Palettes

func (project *Project) Palettes() *Palettes

Palettes returns the wrapper for palettes.

func (*Project) Save added in v0.11.0

func (project *Project) Save()

Save requests to persist all currently pending changes.

func (*Project) Sounds added in v0.10.0

func (project *Project) Sounds() *Sounds

Sounds returns the wrapper for sounds.

func (*Project) Texts added in v0.10.0

func (project *Project) Texts() *Texts

Texts returns the wrapper for texts.

func (*Project) Textures

func (project *Project) Textures() *Textures

Textures returns the wrapper for textures.

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) Audio added in v0.10.0

func (sounds *Sounds) Audio(key model.ResourceKey) (data audio.SoundData, err error)

Audio returns the audio of identified sound.

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.

func (*Texts) Text added in v0.10.0

func (texts *Texts) Text(key model.ResourceKey) (result string, err error)

Text returns the string of identified text.

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) Image

func (textures *Textures) Image(index int, size model.TextureSize) (bmp image.Bitmap)

Image returns the bitmap of identified & sized texture.

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

func (textures *Textures) SetImage(index int, size model.TextureSize, imgBitmap image.Bitmap)

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

func (textures *Textures) TextureCount() int

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

func (ws *Workspace) NewProject(name string) (project *Project, err error)

NewProject tries to create a new project in the workspace.

func (*Workspace) Project

func (ws *Workspace) Project(name string) (project *Project, err error)

Project returns a project matching the given identifier.

func (*Workspace) ProjectNames

func (ws *Workspace) ProjectNames() []string

ProjectNames returns all currently known project identifiers.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL