arkavg

package
v0.14.0 Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2022 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetStoryTxt

func GetStoryTxt(resDir string, prefix string, story Story) (string, error)

func MergeAlpha added in v0.11.0

func MergeAlpha(c image.Image, a image.Image) image.Image

func MergeFace added in v0.11.0

func MergeFace(base image.Image, face image.Image, facePos pos, faceSize pos) image.Image

Types

type Asset

type Asset struct {
	Name string
	Kind Kind
}

func GetStoryAssets

func GetStoryAssets(resDir string, prefix string, story Story) ([]Asset, error)

func ScanForPicAssets added in v0.11.0

func ScanForPicAssets(resDir string, prefix string) ([]Asset, error)

func ScanForPicAssetsByKind added in v0.11.0

func ScanForPicAssetsByKind(resDir string, prefix string, kind Kind) ([]Asset, error)

func (*Asset) FilePath added in v0.10.0

func (a *Asset) FilePath(resDir string, prefix string) string

type Avg

type Avg struct {
	Groups []Group
}

func GetAvg

func GetAvg(resDir string, prefix string) (Avg, error)

type CharAsset added in v0.11.0

type CharAsset struct {
	Name string
	Kind Kind
	Hubs []CharAssetSpriteHub
}

func ScanForCharAssets added in v0.11.0

func ScanForCharAssets(resDir string, prefix string) ([]CharAsset, error)

func ScanForCharAssetsByChar added in v0.11.0

func ScanForCharAssetsByChar(name string, resDir, prefix string) (CharAsset, error)

func (*CharAsset) AssetName added in v0.11.0

func (c *CharAsset) AssetName(hubNum, faceNum int) string

func (*CharAsset) AssetNameAlpha added in v0.11.0

func (c *CharAsset) AssetNameAlpha(hubNum, faceNum int) string

type CharAssetSpriteHub added in v0.11.0

type CharAssetSpriteHub struct {
	Sprites            []Asset
	SpritesAlpha       []Asset
	SpritesAlias       []string
	SpritesIsWholeBody []bool
	FacePos            struct{ X, Y float64 }
	FaceSize           struct{ X, Y float64 }
}

func (*CharAssetSpriteHub) MergeFace added in v0.11.0

func (h *CharAssetSpriteHub) MergeFace(resDir, prefix string) ([]image.Image, []image.Image, error)

type Group

type Group struct {
	ID      string  `bson:"id"`
	Name    string  `bson:"name"`
	Type    Type    `bson:"entryType"`
	Stories []Story `bson:"infoUnlockDatas"`
}

type Kind

type Kind string
const (
	KindImage      Kind = "images"
	KindBackground Kind = "backgrounds"
	KindCharacter  Kind = "characters"
)

type Story

type Story struct {
	ID      string `bson:"storyId"`
	GroupID string `bson:"storyGroup"`
	Code    string `bson:"storyCode"`
	Name    string `bson:"storyName"`
	Txt     string `bson:"storyTxt"`
	Tag     Tag    `bson:"avgTag"`
}

type Tag

type Tag string
const (
	TagInterlude Tag = "幕间"
	TagBefore    Tag = "行动前"
	TagAfter     Tag = "行动后"
)

type Type

type Type string
const (
	TypeNone         Type = "NONE"
	TypeMain         Type = "MAINLINE"
	TypeActivity     Type = "ACTIVITY"
	TypeMiniActivity Type = "MINI_ACTIVITY"
)

Jump to

Keyboard shortcuts

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