res

package
v0.0.0-...-0d8acc7 Latest Latest
Warning

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

Go to latest
Published: Dec 28, 2024 License: GPL-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package with pre-loaded game resources like item graphic data, textures, etc.

Index

Constants

This section is empty.

Variables

View Source
var (
	Avatars          []AvatarData
	Items            []ItemGraphicData
	Effects          []EffectGraphicData
	Skills           []SkillGraphicData
	TranslationBases []*flameres.TranslationBaseData
)

Functions

func AddTranslationBases

func AddTranslationBases(bases []flameres.TranslationBaseData)

AddTranslationBases adds all translation bases to the translation resources.

Types

type AvatarData

type AvatarData struct {
	ID        string         `xml:"id,attr" json:"id"`
	Serial    string         `xml:"serial,attr" json:"serial"`
	Portrait  string         `xml:"portrait,attr" json:"portrait"`
	Head      string         `xml:"head,attr" json:"head"`
	Torso     string         `xml:"torso,attr" json:"torso"`
	FullBody  string         `xml:"fullbody,attr" json:"full-body"`
	Greetings []GreetingData `xml:"greetings>greeting" json:"greetings"`
}

Struct for avatar data.

func Avatar

func Avatar(id string) *AvatarData

Avatar returns avatar data for character with specified ID.

type AvatarsData

type AvatarsData struct {
	XMLName xml.Name     `xml:"avatars" json:"-"`
	Avatars []AvatarData `xml:"avatar" json:"avatars"`
}

Struct for avatars data.

type Camera

type Camera struct {
	X float64 `xml:"x,attr" json:"x"`
	Y float64 `xml:"y,attr" json:"y"`
}

Struct for HUD camera data.

type EffectGraphicData

type EffectGraphicData struct {
	EffectID string `xml:"id,attr" json:"id"`
	Icon     string `xml:"icon,attr" json:"icon"`
}

Struct for effect graphic data.

func Effect

func Effect(id string) *EffectGraphicData

Effect returns graphic data for effect with specified ID.

type EffectGraphicsData

type EffectGraphicsData struct {
	XMLName xml.Name            `xml:"effect-graphics" json:"-"`
	Effects []EffectGraphicData `xml:"effect-graphic" json:"effect-graphics"`
}

Struct for effect graphics data.

type GreetingData

type GreetingData struct {
	ID string `xml:"id,attr" json:"id"`
}

Struct for avatar greeting data.

type HUDData

type HUDData struct {
	XMLName xml.Name `xml:"hud" json:"-"`
	Name    string   `xml:"name,attr" json:"name,attr"`
	Players []Player `xml:"players>player" json:"players"`
	Camera  Camera   `xml:"camera" json:"camera"`
}

Struct for HUD data.

type ItemGraphicData

type ItemGraphicData struct {
	ItemID       string             `xml:"id,attr" json:"id"`
	Icon         string             `xml:"icon,attr" json:"icon"`
	MaxStack     int                `xml:"stack,attr" json:"stack"`
	Spritesheets []*SpritesheetData `xml:"spritesheets>spritesheet" json:"spritesheets"`
}

Struct for item graphic data.

func Item

func Item(id string) *ItemGraphicData

Item returns graphic data for item with specified ID.

type ItemGraphicsData

type ItemGraphicsData struct {
	XMLName xml.Name          `xml:"item-graphics" json:"-"`
	Items   []ItemGraphicData `xml:"item-graphic" json:"item-graphics"`
}

Struct for item graphics data.

type Player

type Player struct {
	ID       string `xml:"id" json:"id"`
	Serial   string `xml:"serial" json:"serial"`
	InvSlots []Slot `xml:"inventory>slot" json:"inv-slots"`
	BarSlots []Slot `xml:"bar>slot" json:"bar-slots"`
}

Struct for HUD player data (avatar, inventory layout, etc.).

type SkillGraphicData

type SkillGraphicData struct {
	SkillID         string `xml:"id,attr" json:"id"`
	Icon            string `xml:"icon,attr" json:"icon"`
	ActivationAudio string `xml:"activation-audio,attr" json:"activation-audio"`
	ActivationAnim  string `xml:"activation-anim,attr" json:"actvation-anim"`
}

Struct for skill graphical data.

func Skill

func Skill(id string) *SkillGraphicData

Skill returns graphic data for skill with specified ID.

type SkillGraphicsData

type SkillGraphicsData struct {
	XMLName xml.Name           `xml:"skill-graphics" json:"-"`
	Skills  []SkillGraphicData `xml:"skill-graphic" json:"skill-graphics"`
}

type Slot

type Slot struct {
	ID      int    `xml:"id,attr", json:"id"`
	Content string `xml:"content,attr", json:"content"`
}

Struct for HUD slot data.

type SpritesheetData

type SpritesheetData struct {
	Texture string `xml:"texture,attr" json:"texture"`
	Race    string `xml:"race,attr" json:"race"`
	Gender  string `xml:"gender,attr" json:"gender"`
}

Struct for avatar spritesheet data.

Directories

Path Synopsis
Package with pre-loaded audio buffers.
Package with pre-loaded audio buffers.
Package with pre-loaded game graphics.
Package with pre-loaded game graphics.

Jump to

Keyboard shortcuts

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