data

package
v0.0.0-...-bf68151 Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2019 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const MaxVolume = 100
View Source
const (
	SelfSwitchNum = 10
)

Variables

This section is empty.

Functions

func CreditsPath

func CreditsPath() string

func InterfaceToInt

func InterfaceToInt(v interface{}) (int, bool)

func LanguagePath

func LanguagePath() string

func Load

func Load(projectionLocation string, progress chan<- LoadProgress)

func PermanentPath

func PermanentPath() string

func PricesPath

func PricesPath() string

func PurchasesPath

func PurchasesPath() string

func SavePath

func SavePath() string

func SetData

func SetData(project []byte, assets [][]byte, progress []byte, purchases []byte, language string)

Types

type Achievement

type Achievement struct {
	ID    int    `msgpack:"id"`
	Name  UUID   `msgpack:"name"`
	Desc  UUID   `msgpack:"desc"`
	Image string `msgpack:"image"`
}

type AssetMetadata

type AssetMetadata struct {
	PassageTypes []PassageType `msgpack:"passageTypes"`
	IsAutoTile   bool          `msgpack:"isAutoTile"`
}

type BGM

type BGM struct {
	Name   string `msgpack:"name"`
	Volume int    `msgpack:"volume"`
}

type BalloonType

type BalloonType string
const (
	BalloonTypeNormal BalloonType = "normal"
	BalloonTypeThink  BalloonType = "think"
	BalloonTypeShout  BalloonType = "shout"
)

type CharacterAnim

type CharacterAnim struct {
	Image         string            `msgpack:"image"`
	ImageType     ImageType         `msgpack:"imageType"`
	Speed         Speed             `msgpack:"speed"`
	FinishTrigger FinishTriggerType `msgpack:"finishTrigger"`
}

type ChoiceCondition

type ChoiceCondition struct {
	Visible *Condition `msgpack:"visible"`
	Checked *Condition `msgpack:"checked"`
}

type Combine

type Combine struct {
	ID       int         `msgpack:"id"`
	Item1    int         `msgpack:"item1"`
	Item2    int         `msgpack:"item2"`
	Type     CombineType `msgpack:"type"`
	Commands []*Command  `msgpack:"commands"`
}

type CombineType

type CombineType string
const (
	CombineTypeUse     CombineType = "use"
	CombineTypeCombine CombineType = "combine"
)

type Command

type Command struct {
	Name     CommandName
	Args     CommandArgs
	Branches [][]*Command
	IsFolded bool
}

func (*Command) DecodeMsgpack

func (c *Command) DecodeMsgpack(dec *msgpack.Decoder) error

func (*Command) EncodeMsgpack

func (c *Command) EncodeMsgpack(enc *msgpack.Encoder) error

type CommandArgs

type CommandArgs interface{}

type CommandArgsAddItem

type CommandArgsAddItem struct {
	ID          int       `msgpack:"id"`
	IDValueType ValueType `msgpack:"idValueType"`
}

type CommandArgsAutoSave

type CommandArgsAutoSave struct {
	Enabled bool `msgpack:"enabled"`
}

type CommandArgsCallCommonEvent

type CommandArgsCallCommonEvent struct {
	EventID int `msgpack:"eventId"`
}

type CommandArgsCallEvent

type CommandArgsCallEvent struct {
	EventID   int `msgpack:"eventId"`
	PageIndex int `msgpack:"pageIndex"`
}

type CommandArgsChangeBackground

type CommandArgsChangeBackground struct {
	Image          interface{}
	ImageValueType FileValueType
}

func (*CommandArgsChangeBackground) DecodeMsgpack

func (c *CommandArgsChangeBackground) DecodeMsgpack(dec *msgpack.Decoder) error

func (*CommandArgsChangeBackground) EncodeMsgpack

func (c *CommandArgsChangeBackground) EncodeMsgpack(enc *msgpack.Encoder) error

type CommandArgsChangeForeground

type CommandArgsChangeForeground struct {
	Image          interface{}
	ImageValueType FileValueType
}

func (*CommandArgsChangeForeground) DecodeMsgpack

func (c *CommandArgsChangeForeground) DecodeMsgpack(dec *msgpack.Decoder) error

func (*CommandArgsChangeForeground) EncodeMsgpack

func (c *CommandArgsChangeForeground) EncodeMsgpack(enc *msgpack.Encoder) error

type CommandArgsChangePictureImage

type CommandArgsChangePictureImage struct {
	ID             int
	IDValueType    ValueType
	Image          interface{}
	ImageValueType FileValueType
}

func (*CommandArgsChangePictureImage) DecodeMsgpack

func (c *CommandArgsChangePictureImage) DecodeMsgpack(dec *msgpack.Decoder) error

func (*CommandArgsChangePictureImage) EncodeMsgpack

func (c *CommandArgsChangePictureImage) EncodeMsgpack(enc *msgpack.Encoder) error

type CommandArgsControlHint

type CommandArgsControlHint struct {
	ID   int             `msgpack:"id"`
	Type ControlHintType `msgpack:"type"`
}

type CommandArgsErasePicture

type CommandArgsErasePicture struct {
	ID          interface{} `msgpack:"id"`
	IDValueType ValueType   `msgpack:"idValueType"`
	SelectType  SelectType  `msgpack:"selectType"`
}

type CommandArgsFadePicture

type CommandArgsFadePicture struct {
	ID               int       `msgpack:"id"`
	IDValueType      ValueType `msgpack:"idValueType"`
	Opacity          int       `msgpack:"opacity"`
	OpacityValueType ValueType `msgpack:"opacityValueType"`
	Time             int       `msgpack:"time"`
	Wait             bool      `msgpack:"wait"`
}

type CommandArgsGoto

type CommandArgsGoto struct {
	Label string `msgpack:"label"`
}

type CommandArgsGotoTitle

type CommandArgsGotoTitle struct {
	Save bool `msgpack:"save"`
}

type CommandArgsGroup

type CommandArgsGroup struct {
	Name string `msgpack:"name"`
}

type CommandArgsIf

type CommandArgsIf struct {
	Conditions []*Condition `msgpack:"conditions"`
}

type CommandArgsLabel

type CommandArgsLabel struct {
	Name string `msgpack:"name"`
}

type CommandArgsLoadPermanent

type CommandArgsLoadPermanent struct {
	VariableID          int `msgpack:"variableId"`
	PermanentVariableID int `msgpack:"permanentVariableId"`
}

type CommandArgsMemo

type CommandArgsMemo struct {
	Content string `msgpack:"content"`
	Log     bool   `msgpack:"log"`
}

type CommandArgsMoveCharacter

type CommandArgsMoveCharacter struct {
	Type             MoveCharacterType `msgpack:"type"`
	Dir              Dir               `msgpack:"dir"`
	Distance         int               `msgpack:"distance"`
	X                int               `msgpack:"x"`
	Y                int               `msgpack:"y"`
	ValueType        ValueType         `msgpack:"valueType"`
	IgnoreCharacters bool              `msgpack:"ignoreCharacters"`
}

func (*CommandArgsMoveCharacter) DecodeMsgpack

func (c *CommandArgsMoveCharacter) DecodeMsgpack(dec *msgpack.Decoder) error

func (*CommandArgsMoveCharacter) EncodeMsgpack

func (c *CommandArgsMoveCharacter) EncodeMsgpack(enc *msgpack.Encoder) error

type CommandArgsMovePicture

type CommandArgsMovePicture struct {
	ID           int       `msgpack:"id"`
	IDValueType  ValueType `msgpack:"idValueType"`
	X            int       `msgpack:"x"`
	Y            int       `msgpack:"y"`
	PosValueType ValueType `msgpack:"posValueType"`
	Time         int       `msgpack:"time"`
	Wait         bool      `msgpack:"wait"`
}
type CommandArgsOpenLink struct {
	Type OpenLinkType `msgpack:"type"`
	Data string       `msgpack:"data"`
}

type CommandArgsPlayBGM

type CommandArgsPlayBGM struct {
	Name          interface{}
	NameValueType FileValueType
	Volume        int
	FadeTime      int
}

func (*CommandArgsPlayBGM) DecodeMsgpack

func (c *CommandArgsPlayBGM) DecodeMsgpack(dec *msgpack.Decoder) error

func (*CommandArgsPlayBGM) EncodeMsgpack

func (c *CommandArgsPlayBGM) EncodeMsgpack(enc *msgpack.Encoder) error

type CommandArgsPlaySE

type CommandArgsPlaySE struct {
	Name   string `msgpack:"name"`
	Volume int    `msgpack:"volume"`
}

type CommandArgsPlayerControl

type CommandArgsPlayerControl struct {
	Enabled bool `msgpack:"enabled"`
}

type CommandArgsPlayerSpeed

type CommandArgsPlayerSpeed struct {
	Value Speed `msgpack:"value"`
}

type CommandArgsPurchase

type CommandArgsPurchase struct {
	ID int `msgpack:"id"`
}

type CommandArgsRemoveItem

type CommandArgsRemoveItem struct {
	ID          int       `msgpack:"id"`
	IDValueType ValueType `msgpack:"idValueType"`
}

type CommandArgsReplaceItem

type CommandArgsReplaceItem struct {
	ID         int   `msgpack:"id"`
	ReplaceIDs []int `msgpack:"replaceIds"`
}

type CommandArgsRotateCharacter

type CommandArgsRotateCharacter struct {
	Angle int `msgpack:"angle"`
}

type CommandArgsRotatePicture

type CommandArgsRotatePicture struct {
	ID             int       `msgpack:"id"`
	IDValueType    ValueType `msgpack:"idValueType"`
	Angle          int       `msgpack:"angle"`
	AngleValueType ValueType `msgpack:"angleValueType"`
	Time           int       `msgpack:"time"`
	Wait           bool      `msgpack:"wait"`
}

type CommandArgsSavePermanent

type CommandArgsSavePermanent struct {
	VariableID          int `msgpack:"variableId"`
	PermanentVariableID int `msgpack:"permanentVariableId"`
}

type CommandArgsScalePicture

type CommandArgsScalePicture struct {
	ID             int       `msgpack:"id"`
	IDValueType    ValueType `msgpack:"idValueType"`
	ScaleX         int       `msgpack:"scaleX"`
	ScaleY         int       `msgpack:"scaleY"`
	ScaleValueType ValueType `msgpack:"scaleValueType"`
	Time           int       `msgpack:"time"`
	Wait           bool      `msgpack:"wait"`
}

type CommandArgsSendAnalytics

type CommandArgsSendAnalytics struct {
	EventName string `msgpack:"eventName"`
}

type CommandArgsSetCharacterImage

type CommandArgsSetCharacterImage struct {
	Image          interface{}
	ImageType      ImageType
	ImageValueType FileValueType
	Frame          int
	Dir            Dir
	UseFrameAndDir bool
}

func (*CommandArgsSetCharacterImage) DecodeMsgpack

func (c *CommandArgsSetCharacterImage) DecodeMsgpack(dec *msgpack.Decoder) error

func (*CommandArgsSetCharacterImage) EncodeMsgpack

func (c *CommandArgsSetCharacterImage) EncodeMsgpack(enc *msgpack.Encoder) error

type CommandArgsSetCharacterOpacity

type CommandArgsSetCharacterOpacity struct {
	Opacity int  `msgpack:"opacity"`
	Time    int  `msgpack:"time"`
	Wait    bool `msgpack:"wait"`
}

type CommandArgsSetCharacterProperty

type CommandArgsSetCharacterProperty struct {
	Type  SetCharacterPropertyType `msgpack:"type"`
	Value interface{}              `msgpack:"value"`
}

func (*CommandArgsSetCharacterProperty) DecodeMsgpack

func (c *CommandArgsSetCharacterProperty) DecodeMsgpack(dec *msgpack.Decoder) error

func (*CommandArgsSetCharacterProperty) EncodeMsgpack

func (c *CommandArgsSetCharacterProperty) EncodeMsgpack(enc *msgpack.Encoder) error

type CommandArgsSetRoute

type CommandArgsSetRoute struct {
	EventID  int        `msgpack:"eventId"`
	Repeat   bool       `msgpack:"repeat"`
	Skip     bool       `msgpack:"skip"`
	Wait     bool       `msgpack:"wait"`
	Internal bool       `msgpack:"internal"`
	Commands []*Command `msgpack:"commands"`
}

type CommandArgsSetSelfSwitch

type CommandArgsSetSelfSwitch struct {
	ID    int  `msgpack:"id"`
	Value bool `msgpack:"value"`
}

type CommandArgsSetSwitch

type CommandArgsSetSwitch struct {
	ID       int             `msgpack:"id"`
	IDType   SetSwitchIDType `msgpack:"idType"`
	Value    bool            `msgpack:"value"`
	Internal bool            `msgpack:"internal"`
}

type CommandArgsSetVariable

type CommandArgsSetVariable struct {
	ID        int                  `msgpack:"id"`
	IDType    SetVariableIDType    `msgpack:"idType"`
	Op        SetVariableOp        `msgpack:"op"`
	ValueType SetVariableValueType `msgpack:"valueType"`
	Value     interface{}          `msgpack:"value"`
	Internal  bool                 `msgpack:"internal"`
}

func (*CommandArgsSetVariable) DecodeMsgpack

func (c *CommandArgsSetVariable) DecodeMsgpack(dec *msgpack.Decoder) error

func (*CommandArgsSetVariable) EncodeMsgpack

func (c *CommandArgsSetVariable) EncodeMsgpack(enc *msgpack.Encoder) error

type CommandArgsShake

type CommandArgsShake struct {
	Power     int            `msgpack:"power"`
	Speed     int            `msgpack:"speed"`
	Time      int            `msgpack:"time"`
	Wait      bool           `msgpack:"wait"`
	Direction ShakeDirection `msgpack:"direction"`
}

type CommandArgsShare

type CommandArgsShare struct {
	TextID UUID   `msgpack:"text"`
	Image  string `msgpack:"image"`
}

type CommandArgsShowAds

type CommandArgsShowAds struct {
	Type     ShowAdsType `msgpack:"type"`
	ForceAds bool        `msgpack:"forceAds"`
}

type CommandArgsShowBalloon

type CommandArgsShowBalloon struct {
	EventID        int         `msgpack:"eventId"`
	ContentID      UUID        `msgpack:"content"`
	BalloonType    BalloonType `msgpack:"balloonType"`
	MessageStyleID int         `msgpack:"messageStyleId"`
}

type CommandArgsShowChoices

type CommandArgsShowChoices struct {
	ChoiceIDs  []UUID             `msgpack:"choices"`
	Conditions []*ChoiceCondition `msgpack:"conditions"`
}

type CommandArgsShowInventory

type CommandArgsShowInventory struct {
	Group      int  `msgpack:"group"`
	Wait       bool `msgpack:"wait"`
	Cancelable bool `msgpack:"cancelable"`
}

type CommandArgsShowItem

type CommandArgsShowItem struct {
	ID          int       `msgpack:"id"`
	IDValueType ValueType `msgpack:"idValueType"`
}

type CommandArgsShowMainShop

type CommandArgsShowMainShop struct {
	Tabs []bool `msgpack:"tabs"`
}

type CommandArgsShowMessage

type CommandArgsShowMessage struct {
	EventID        int                 `msgpack:"eventId"`
	ContentID      UUID                `msgpack:"content"`
	Background     MessageBackground   `msgpack:"background"`
	PositionType   MessagePositionType `msgpack:"positionType"`
	TextAlign      TextAlign           `msgpack:"textAlign"`
	MessageStyleID int                 `msgpack:"messageStyleId"`
}

type CommandArgsShowMinigame

type CommandArgsShowMinigame struct {
	ID       int `msgpack:"id"`
	ReqScore int `msgpack:"reqScore"`
}

type CommandArgsShowPicture

type CommandArgsShowPicture struct {
	ID           int                  `msgpack:"id"`
	IDValueType  ValueType            `msgpack:"idValueType"`
	Image        string               `msgpack:"image"`
	OriginX      float64              `msgpack:"originX"`
	OriginY      float64              `msgpack:"originY"`
	X            int                  `msgpack:"x"`
	Y            int                  `msgpack:"y"`
	PosValueType ValueType            `msgpack:"posValueType"`
	ScaleX       int                  `msgpack:"scaleX"`
	ScaleY       int                  `msgpack:"scaleY"`
	Angle        int                  `msgpack:"angle"`
	Opacity      int                  `msgpack:"opacity"`
	Priority     PicturePriorityType  `msgpack:"priority"`
	BlendType    ShowPictureBlendType `msgpack:"blendType"`
	Touchable    bool                 `msgpack:"touchable"`
}

type CommandArgsShowShop

type CommandArgsShowShop struct {
	Products []int `msgpack:"products"`
}

type CommandArgsSpecial

type CommandArgsSpecial struct {
	Content string `msgpack:"content"`
}

type CommandArgsStopBGM

type CommandArgsStopBGM struct {
	FadeTime int `msgpack:"fadeTime"`
}

type CommandArgsTintPicture

type CommandArgsTintPicture struct {
	ID          int       `msgpack:"id"`
	IDValueType ValueType `msgpack:"idValueType"`
	Red         int       `msgpack:"red"`
	Green       int       `msgpack:"green"`
	Blue        int       `msgpack:"blue"`
	Gray        int       `msgpack:"gray"`
	Time        int       `msgpack:"time"`
	Wait        bool      `msgpack:"wait"`
}

type CommandArgsTintScreen

type CommandArgsTintScreen struct {
	Red   int  `msgpack:"red"`
	Green int  `msgpack:"green"`
	Blue  int  `msgpack:"blue"`
	Gray  int  `msgpack:"gray"`
	Time  int  `msgpack:"time"`
	Wait  bool `msgpack:"wait"`
}

type CommandArgsTransfer

type CommandArgsTransfer struct {
	ValueType  ValueType              `msgpack:"valueType"`
	RoomID     int                    `msgpack:"roomId"`
	X          int                    `msgpack:"x"`
	Y          int                    `msgpack:"y"`
	Dir        Dir                    `msgpack:"dir"`
	Transition TransferTransitionType `msgpack:"transition"`
}

type CommandArgsTurnCharacter

type CommandArgsTurnCharacter struct {
	Dir Dir `msgpack:"dir"`
}

type CommandArgsUnlockAchievement

type CommandArgsUnlockAchievement struct {
	ID int `msgpack:"id"`
}

type CommandArgsVibrate

type CommandArgsVibrate struct {
	Type string `msgpack:"type"`
}

type CommandArgsWait

type CommandArgsWait struct {
	Time int `msgpack:"time"`
}

type CommandArgsWeather

type CommandArgsWeather struct {
	Type WeatherType `msgpack:"type"`
}

type CommandName

type CommandName string
const (
	CommandNameNop               CommandName = "nop"
	CommandNameMemo              CommandName = "memo"
	CommandNameIf                CommandName = "if"
	CommandNameGroup             CommandName = "group"
	CommandNameLabel             CommandName = "label"
	CommandNameGoto              CommandName = "goto"
	CommandNameCallEvent         CommandName = "call_event"
	CommandNameCallCommonEvent   CommandName = "call_common_event"
	CommandNameReturn            CommandName = "return"
	CommandNameEraseEvent        CommandName = "erase_event"
	CommandNameWait              CommandName = "wait"
	CommandNameShowBalloon       CommandName = "show_balloon"
	CommandNameShowMessage       CommandName = "show_message"
	CommandNameShowHint          CommandName = "show_hint"
	CommandNameShowChoices       CommandName = "show_choices"
	CommandNameSetSwitch         CommandName = "set_switch"
	CommandNameSetSelfSwitch     CommandName = "set_self_switch"
	CommandNameSetVariable       CommandName = "set_variable"
	CommandNameSavePermanent     CommandName = "save_permanent"
	CommandNameLoadPermanent     CommandName = "load_permanent"
	CommandNameTransfer          CommandName = "transfer"
	CommandNameSetRoute          CommandName = "set_route"
	CommandNameTintScreen        CommandName = "tint_screen"
	CommandNameShake             CommandName = "shake"
	CommandNamePlaySE            CommandName = "play_se"
	CommandNamePlayBGM           CommandName = "play_bgm"
	CommandNameStopBGM           CommandName = "stop_bgm"
	CommandNameSave              CommandName = "save"
	CommandNameGotoTitle         CommandName = "goto_title"
	CommandNameAutoSave          CommandName = "autosave"
	CommandNameGameClear         CommandName = "game_clear"
	CommandNamePlayerControl     CommandName = "player_control"
	CommandNamePlayerSpeed       CommandName = "player_speed"
	CommandNameWeather           CommandName = "weather"
	CommandNameUnlockAchievement CommandName = "unlock_achievement"
	CommandNameControlHint       CommandName = "control_hint"
	CommandNamePurchase          CommandName = "start_iap"
	CommandNameShowAds           CommandName = "show_ads"
	CommandNameOpenLink          CommandName = "open_link"
	CommandNameShare             CommandName = "share"
	CommandNameRequestReview     CommandName = "request_review"
	CommandNameSendAnalytics     CommandName = "send_analytics"
	CommandNameShowShop          CommandName = "show_shop"
	CommandNameShowMainShop      CommandName = "show_main_shop"
	CommandNameShowMinigame      CommandName = "show_minigame"
	CommandNameVibrate           CommandName = "vibrate"

	CommandNameAddItem       CommandName = "add_item"
	CommandNameRemoveItem    CommandName = "remove_item"
	CommandNameReplaceItem   CommandName = "replace_item"
	CommandNameShowItem      CommandName = "show_item"
	CommandNameHideItem      CommandName = "hide_item"
	CommandNameShowInventory CommandName = "show_inventory"
	CommandNameHideInventory CommandName = "hide_inventory"

	CommandNameShowPicture        CommandName = "show_picture"
	CommandNameErasePicture       CommandName = "erase_picture"
	CommandNameMovePicture        CommandName = "move_picture"
	CommandNameScalePicture       CommandName = "scale_picture"
	CommandNameRotatePicture      CommandName = "rotate_picture"
	CommandNameFadePicture        CommandName = "fade_picture"
	CommandNameTintPicture        CommandName = "tint_picture"
	CommandNameChangePictureImage CommandName = "change_picture_image"
	CommandNameChangeBackground   CommandName = "change_background"
	CommandNameChangeForeground   CommandName = "change_foreground"

	// Route commands
	CommandNameMoveCharacter        CommandName = "move_character"
	CommandNameTurnCharacter        CommandName = "turn_character"
	CommandNameRotateCharacter      CommandName = "rotate_character"
	CommandNameSetCharacterProperty CommandName = "set_character_property"
	CommandNameSetCharacterImage    CommandName = "set_character_image"
	CommandNameSetCharacterOpacity  CommandName = "set_character_opacity"

	// Special commands
	CommandNameSpecial                       CommandName = "special"
	CommandNameFinishPlayerMovingByUserInput CommandName = "finish_player_moving_by_user_input"
	CommandNameExecEventHere                 CommandName = "exec_event_here"
)

type CommonEvent

type CommonEvent struct {
	ID       int        `msgpack:"id"`
	Name     string     `msgpack:"name"`
	Commands []*Command `msgpack:"commands"`
}

type Condition

type Condition struct {
	Type      ConditionType      `msgpack:"type"`
	ID        int                `msgpack:"id"`
	Comp      ConditionComp      `msgpack:"comp"`
	ValueType ConditionValueType `msgpack:"valueType"`
	Value     interface{}        `msgpack:"value"`
}

type ConditionComp

type ConditionComp string
const (
	ConditionCompEqualTo              ConditionComp = "=="
	ConditionCompNotEqualTo           ConditionComp = "!="
	ConditionCompGreaterThanOrEqualTo ConditionComp = ">="
	ConditionCompGreaterThan          ConditionComp = ">"
	ConditionCompLessThanOrEqualTo    ConditionComp = "<="
	ConditionCompLessThan             ConditionComp = "<"
)

type ConditionItemValue

type ConditionItemValue string
const (
	ConditionItemOwn    ConditionItemValue = "own"
	ConditionItemNotOwn ConditionItemValue = "not_own"
	ConditionItemActive ConditionItemValue = "active"
)

type ConditionType

type ConditionType string
const (
	ConditionTypeSwitch     ConditionType = "switch"
	ConditionTypeSelfSwitch ConditionType = "self_switch"
	ConditionTypeVariable   ConditionType = "variable"
	ConditionTypeItem       ConditionType = "item"
	ConditionTypeSpecial    ConditionType = "special" // This type is intended for inner only.
)

type ConditionValueType

type ConditionValueType string
const (
	ConditionValueTypeConstant ConditionValueType = "constant"
	ConditionValueTypeVariable ConditionValueType = "variable"
)

type ControlHintType

type ControlHintType string
const (
	ControlHintPause    ControlHintType = "pause"
	ControlHintStart    ControlHintType = "start"
	ControlHintComplete ControlHintType = "complete"
)

type Credits

type Credits struct {
	Sections []CreditsSection `json:"sections"`
}

type CreditsSection

type CreditsSection struct {
	Header      string   `json:"header"`
	HeaderColor string   `json:"headerColor"`
	Body        []string `json:"body"`
}

type Dir

type Dir int
const (
	DirNone  Dir = -1
	DirUp    Dir = 0
	DirRight Dir = 1
	DirDown  Dir = 2
	DirLeft  Dir = 3
)

type Event

type Event struct {
	// contains filtered or unexported fields
}

func (*Event) ID

func (e *Event) ID() int

func (*Event) Pages

func (e *Event) Pages() []*Page

func (*Event) Position

func (e *Event) Position() (int, int)

func (*Event) UnmarshalMsgpack

func (e *Event) UnmarshalMsgpack(data []byte) error

type EventImpl

type EventImpl struct {
	ID    int     `msgpack:"id"`
	X     int     `msgpack:"x"`
	Y     int     `msgpack:"y"`
	Pages []*Page `msgpack:"pages"`
}

type FileValueType

type FileValueType string
const (
	FileValueTypeConstant FileValueType = "constant"
	FileValueTypeTable    FileValueType = "table"
)

type FinishTriggerType

type FinishTriggerType string
const (
	FinishTriggerTypeNone    FinishTriggerType = "none"
	FinishTriggerTypeMessage FinishTriggerType = "message"
	FinishTriggerTypeWindow  FinishTriggerType = "window"
)

type Game

type Game struct {
	Maps          []*Map          `msgpack:"maps"`
	Texts         *Texts          `msgpack:"texts"`
	Tables        []*Table        `msgpack:"tables"`
	TileSets      []*TileSet      `msgpack:"tileSets"`
	Achievements  []*Achievement  `msgpack:"achievements"`
	Hints         []*Hint         `msgpack:"hints"`
	IAPProducts   []*IAPProduct   `msgpack:"iapProducts"`
	Items         []*Item         `msgpack:"items"`
	Combines      []*Combine      `msgpack:"combines"`
	CommonEvents  []*CommonEvent  `msgpack:"commonEvents"`
	System        *System         `msgpack:"system"`
	MessageStyles []*MessageStyle `msgpack:"messageStyles"`
	Shops         []*Shop         `msgpack:"shops"`
}

func (*Game) CreateChoicesMessageStyle

func (g *Game) CreateChoicesMessageStyle() *MessageStyle

func (*Game) CreateCombine

func (g *Game) CreateCombine(itemID1, itemID2 int) *Combine

func (*Game) CreateDefaultMessageStyle

func (g *Game) CreateDefaultMessageStyle() *MessageStyle

func (*Game) GetIAPProduct

func (g *Game) GetIAPProduct(key string) *IAPProduct

func (*Game) GetIAPProductByType

func (g *Game) GetIAPProductByType(t string) *IAPProduct

func (*Game) GetShop

func (g *Game) GetShop(name ShopType, tab int) *Shop

func (*Game) GetShopProducts

func (g *Game) GetShopProducts(products []int) []*ShopProduct

func (*Game) GetTableValue

func (g *Game) GetTableValue(tableName string, recordID int, attrName string) interface{}

func (*Game) GetTableValueType

func (g *Game) GetTableValueType(tableName string, attrName string) TableValueType

func (*Game) IAPProductByID

func (g *Game) IAPProductByID(id int) *IAPProduct

func (*Game) IsCombineAvailable

func (g *Game) IsCombineAvailable() bool

func (*Game) IsShopAvailable

func (g *Game) IsShopAvailable(name ShopType) bool

type Hint

type Hint struct {
	ID       int        `msgpack:"id"`
	Commands []*Command `msgpack:"commands"`
}

type IAPProduct

type IAPProduct struct {
	ID      int    `msgpack:"id"`
	Bundles []int  `msgpack:"bundles"`
	Key     string `msgpack:"key"`
	Name    UUID   `msgpack:"name"`
	Desc    UUID   `msgpack:"desc"`
	Details UUID   `msgpack:"details"`
	Type    string `msgpack:"type"`
}

type ImageType

type ImageType string
const (
	ImageTypeCharacters ImageType = "character"
	ImageTypeIcons      ImageType = "icon"
)

type InitialPlayerState

type InitialPlayerState struct {
	Image     string    `msgpack:"image"`
	ImageType ImageType `msgpack:"imageType"`
	MapID     int       `msgpack:"mapId"`
	RoomID    int       `msgpack:"roomId"`
	X         int       `msgpack:"x"`
	Y         int       `msgpack:"y"`
}

type Item

type Item struct {
	ID       int        `msgpack:"id"`
	Group    int        `msgpack:"group"`
	Name     UUID       `msgpack:"name"`
	Icon     string     `msgpack:"icon"`
	Commands []*Command `msgpack:"commands"`
}

type Language

type Language languagepkg.Tag

func (*Language) DecodeMsgpack

func (l *Language) DecodeMsgpack(dec *msgpack.Decoder) error

func (*Language) String

func (l *Language) String() string

type LoadProgress

type LoadProgress struct {
	Progress   float64
	LoadedData *LoadedData
	Error      error
}

type LoadedData

type LoadedData struct {
	Game           *Game
	Assets         map[string][]byte
	AssetsMetadata map[string]*AssetMetadata
	Progress       []byte
	Permanent      []byte
	Purchases      []string
	Language       language.Tag
}

type Map

type Map struct {
	// contains filtered or unexported fields
}

func (*Map) ID

func (m *Map) ID() int

func (*Map) Name

func (m *Map) Name() string

func (*Map) Rooms

func (m *Map) Rooms() []*Room

func (*Map) UnmarshalMsgpack

func (m *Map) UnmarshalMsgpack(data []byte) error

type MapImpl

type MapImpl struct {
	ID    int     `msgpack:"id"`
	Name  string  `msgpack:"name"`
	Rooms []*Room `msgpack:"rooms"`
}

type MapSprite

type MapSprite struct {
	Name    string `msgpack:"name"`
	ScrollX int    `msgpack:"scrollX"`
	ScrollY int    `msgpack:"scrollY"`
}

type MessageBackground

type MessageBackground string
const (
	MessageBackgroundDim         MessageBackground = "dim"
	MessageBackgroundTransparent MessageBackground = "transparent"
	MessageBackgroundBanner      MessageBackground = "banner"
)

type MessagePositionType

type MessagePositionType string
const (
	MessagePositionBottom MessagePositionType = "bottom"
	MessagePositionMiddle MessagePositionType = "middle"
	MessagePositionTop    MessagePositionType = "top"
	MessagePositionAuto   MessagePositionType = "auto"
)

type MessageStyle

type MessageStyle struct {
	ID                int            `msgpack:"id"`
	Name              UUID           `msgpack:"name"`
	TypingEffectDelay int            `msgpack:"typingEffectDelay"`
	SoundEffect       string         `msgpack:"soundEffect"`
	CharacterAnim     *CharacterAnim `msgpack:"characterAnim"`
}

type MoveCharacterType

type MoveCharacterType string
const (
	MoveCharacterTypeDirection MoveCharacterType = "direction"
	MoveCharacterTypeTarget    MoveCharacterType = "target"
	MoveCharacterTypeForward   MoveCharacterType = "forward"
	MoveCharacterTypeBackward  MoveCharacterType = "backward"
	MoveCharacterTypeToward    MoveCharacterType = "toward"
	MoveCharacterTypeAgainst   MoveCharacterType = "against"
	MoveCharacterTypeRandom    MoveCharacterType = "random"
)

type News

type News struct {
	ID            int64  `json:id`
	Title         string `json:title`
	Message       string `json:message`
	SubTitleText  string `json:subTitleText`
	SubTitleColor string `json:subTitleColor`
	BannerURL     string `json:bannerUrl`
}

type OpenLinkType

type OpenLinkType string
const (
	OpenLinkTypeApp        OpenLinkType = "app"
	OpenLinkTypeURL        OpenLinkType = "url"
	OpenLinkTypeReview     OpenLinkType = "review"
	OpenLinkTypeShowCredit OpenLinkType = "show_credit"
	OpenLinkTypePostCredit OpenLinkType = "post_credit"
	OpenLinkTypeMore       OpenLinkType = "more"
	OpenLinkTypeFacebook   OpenLinkType = "fb"
	OpenLinkTypeTwitter    OpenLinkType = "twitter"
)

type Page

type Page struct {
	Conditions []*Condition         `msgpack:"conditions"`
	Image      string               `msgpack:"image"`
	ImageType  ImageType            `msgpack:"imageType"`
	Frame      int                  `msgpack:"frame"`
	Dir        Dir                  `msgpack:"dir"`
	DirFix     bool                 `msgpack:"dirFix"`
	Walking    bool                 `msgpack:"walking"`
	Stepping   bool                 `msgpack:"stepping"`
	Through    bool                 `msgpack:"through"`
	Priority   Priority             `msgpack:"priority"`
	Speed      Speed                `msgpack:"speed"`
	Trigger    Trigger              `msgpack:"trigger"`
	Opacity    int                  `msgpack:"opacity"`
	Route      *CommandArgsSetRoute `msgpack:"route"`
	Commands   []*Command           `msgpack:"commands"`
}

type PassageType

type PassageType int
const (
	PassageTypePassable PassageType = iota
	PassageTypeOver
	PassageTypeBlock
)

type PicturePriorityType

type PicturePriorityType string
const (
	PicturePriorityBottom  PicturePriorityType = "bottom"
	PicturePriorityTop     PicturePriorityType = "top"
	PicturePriorityOverlay PicturePriorityType = "overlay"
)

type Priority

type Priority string
const (
	PriorityBottom Priority = "bottom"
	PriorityMiddle Priority = "middle"
	PriorityTop    Priority = "top"
)

type Project

type Project struct {
	Data *Game `msgpack:"data"`
}

type Room

type Room struct {
	ID                   int            `msgpack:"id"`
	X                    int            `msgpack:"x"`
	Y                    int            `msgpack:"y"`
	Tiles                [][]int        `msgpack:"tiles"`
	Events               []*Event       `msgpack:"events"`
	Background           MapSprite      `msgpack:"background"`
	Foreground           MapSprite      `msgpack:"foreground"`
	PassageTypeOverrides []PassageType  `msgpack:"passageTypeOverrides"`
	AutoBGM              bool           `msgpack:"autoBGM"`
	BGM                  BGM            `msgpack:"bgm"`
	LayoutMode           RoomLayoutMode `msgpack:"layoutMode"`
}

type RoomLayoutMode

type RoomLayoutMode string
const (
	RoomLayoutModeFixBottom RoomLayoutMode = "fix_bottom"
	RoomLayoutModeFixCenter RoomLayoutMode = "fix_center"
	RoomLayoutModeScroll    RoomLayoutMode = "scroll"
)

type SelectType

type SelectType string
const (
	SelectTypeSingle SelectType = "single"
	SelectTypeMulti  SelectType = "multi"
)

type SetCharacterPropertyType

type SetCharacterPropertyType string
const (
	SetCharacterPropertyTypeVisibility SetCharacterPropertyType = "visibility"
	SetCharacterPropertyTypeDirFix     SetCharacterPropertyType = "dir_fix"
	SetCharacterPropertyTypeStepping   SetCharacterPropertyType = "stepping"
	SetCharacterPropertyTypeThrough    SetCharacterPropertyType = "through"
	SetCharacterPropertyTypeWalking    SetCharacterPropertyType = "walking"
	SetCharacterPropertyTypeSpeed      SetCharacterPropertyType = "speed"
)

type SetSwitchIDType

type SetSwitchIDType string
const (
	SetSwitchIDTypeVal SetSwitchIDType = "val"
	SetSwitchIDTypeRef SetSwitchIDType = "ref"
)

type SetVariableCharacterArgs

type SetVariableCharacterArgs struct {
	Type    SetVariableCharacterType `msgpack:"type"`
	EventID int                      `msgpack:"eventId"`
}

TODO: Rename?

type SetVariableCharacterType

type SetVariableCharacterType string
const (
	SetVariableCharacterTypeDirection SetVariableCharacterType = "direction"
	SetVariableCharacterTypeRoomX     SetVariableCharacterType = "room_x"
	SetVariableCharacterTypeRoomY     SetVariableCharacterType = "room_y"
	SetVariableCharacterTypeScreenX   SetVariableCharacterType = "screen_x"
	SetVariableCharacterTypeScreenY   SetVariableCharacterType = "screen_y"
	SetVariableCharacterTypeIsPressed SetVariableCharacterType = "pressed"
)

type SetVariableIDType

type SetVariableIDType string
const (
	SetVariableIDTypeVal SetVariableIDType = "val"
	SetVariableIDTypeRef SetVariableIDType = "ref"
)

type SetVariableItemGroupArgs

type SetVariableItemGroupArgs struct {
	Type  SetVariableItemGroupType `msgpack:"type"`
	Group int                      `msgpack:"group"`
}

type SetVariableItemGroupType

type SetVariableItemGroupType string
const (
	SetVariableItemGroupTypeOwned SetVariableItemGroupType = "owned"
	SetVariableItemGroupTypeTotal SetVariableItemGroupType = "total"
)

type SetVariableOp

type SetVariableOp string
const (
	SetVariableOpAssign SetVariableOp = "=" // TODO: Rename
	SetVariableOpAdd    SetVariableOp = "+"
	SetVariableOpSub    SetVariableOp = "-"
	SetVariableOpMul    SetVariableOp = "*"
	SetVariableOpDiv    SetVariableOp = "/"
	SetVariableOpMod    SetVariableOp = "%"
)

type SetVariableSystem

type SetVariableSystem struct {
	Type    SetVariableCharacterType `msgpack:"type"`
	EventID int                      `msgpack:"eventId"`
}

type SetVariableValueRandom

type SetVariableValueRandom struct {
	Begin int `msgpack:"begin"`
	End   int `msgpack:"end"`
}

type SetVariableValueType

type SetVariableValueType string
const (
	SetVariableValueTypeConstant    SetVariableValueType = "constant"
	SetVariableValueTypeVariable    SetVariableValueType = "variable"
	SetVariableValueTypeVariableRef SetVariableValueType = "variable_ref"
	SetVariableValueTypeSwitch      SetVariableValueType = "switch"
	SetVariableValueTypeSwitchRef   SetVariableValueType = "switch_ref"
	SetVariableValueTypeRandom      SetVariableValueType = "random"
	SetVariableValueTypeCharacter   SetVariableValueType = "character"
	SetVariableValueTypeItemGroup   SetVariableValueType = "item_group"
	SetVariableValueTypeIAPProduct  SetVariableValueType = "iap_product"
	SetVariableValueTypeSystem      SetVariableValueType = "system"
	SetVariableValueTypeTable       SetVariableValueType = "table"
)

type ShakeDirection

type ShakeDirection string
const (
	ShakeDirectionHorizontal ShakeDirection = "horizontal"
	ShakeDirectionVertical   ShakeDirection = "vertical"
)

type Shop

type Shop struct {
	Name     ShopType `msgpack:"name"`
	Tab      int      `msgpack:"tab"`
	TabName  UUID     `msgpack:"tabName"`
	Products []int    `msgpack:"products"`
}

type ShopPopup

type ShopPopup struct {
	Tabs []*ShopPopupTab `json:"tabs"`
}

type ShopPopupTab

type ShopPopupTab struct {
	Name     string         `json:"name"`
	Products []*ShopProduct `json:"products"`
}

type ShopProduct

type ShopProduct struct {
	ID       int    `json:"id"`
	Key      string `json:"key"`
	Name     string `json:"name"`
	Desc     string `json:"desc"`
	Details  string `json:"details"`
	Type     string `json:"type"`
	Unlocked bool   `json:"unlocked"`
}

type ShopType

type ShopType string
const (
	ShopTypeMain ShopType = "main"
	ShopTypeHome ShopType = "home"
)

type ShowAdsType

type ShowAdsType string
const (
	ShowAdsTypeRewarded     ShowAdsType = "rewarded"
	ShowAdsTypeInterstitial ShowAdsType = "interstitial"
)

type ShowPictureBlendType

type ShowPictureBlendType string
const (
	ShowPictureBlendTypeNormal ShowPictureBlendType = "normal"
	ShowPictureBlendTypeAdd    ShowPictureBlendType = "add"
)

type Speed

type Speed int
const (
	Speed1 Speed = 1
	Speed2 Speed = 2
	Speed3 Speed = 3
	Speed4 Speed = 4
	Speed5 Speed = 5
	Speed6 Speed = 6
)

func (Speed) Frames

func (s Speed) Frames() int

func (Speed) SteppingIncrementFrames

func (s Speed) SteppingIncrementFrames() int

type System

type System struct {
	Title              *Title              `msgpack:"title"`
	InitialPlayerState *InitialPlayerState `msgpack:"player"`
	DefaultLanguage    Language            `msgpack:"defaultLanguage"`
	TitleBGM           BGM                 `msgpack:"titleBgm"`
	GameName           UUID                `msgpack:"gameName"`
	ScreenshotMessage  UUID                `msgpack:"screenshotMessage"`
	TitleTextColor     string              `msgpack:"titleTextColor"`
	Switches           []*VariableData     `msgpack:"switches"`
	Variables          []*VariableData     `msgpack:"variables"`
	Vibration          bool                `msgpack:"vibration"`
}

type SystemVariableType

type SystemVariableType string
const (
	SystemVariableInterstitialAdsLoaded SystemVariableType = "interstitial_ads_loaded"
	SystemVariableRewardedAdsLoaded     SystemVariableType = "rewarded_ads_loaded"
	SystemVariableHintCount             SystemVariableType = "active_hint_count"
	SystemVariableRoomID                SystemVariableType = "room_id"
	SystemVariableCurrentTime           SystemVariableType = "current_time"
	SystemVariableActiveItemID          SystemVariableType = "active_item_id"
	SystemVariableEventItemID           SystemVariableType = "event_item_id"
	SystemVariableTriggeredPictureID    SystemVariableType = "triggered_picture_id"
	SystemVariablePressedPictureID      SystemVariableType = "pressed_picture_id"
	SystemVariableReleasedPictureID     SystemVariableType = "released_picture_id"
	SystemVariableSponsorTier           SystemVariableType = "sponsor_tier"
)

type Table

type Table struct {
	Name    string                    `msgpack:"name"`
	Schema  map[string]TableValueType `msgpack:"schema"`
	Records []*map[string]interface{} `msgpack:"records"`
}

type TableValueArgs

type TableValueArgs struct {
	Type ValueType `json:"type" msgpack:"type"`
	Name string    `json:"name" msgpack:"name"`
	ID   int       `json:"id" msgpack:"id"`
	Attr string    `json:"attr" msgpack:"attr"`
}

type TableValueType

type TableValueType string
const (
	TableValueTypeInt    TableValueType = "int"
	TableValueTypeString TableValueType = "string"
	TableValueTypeUUID   TableValueType = "uuid"
)

type TextAlign

type TextAlign string
const (
	TextAlignLeft   TextAlign = "left"
	TextAlignCenter TextAlign = "center"
	TextAlignRight  TextAlign = "right"
)

type Texts

type Texts struct {
	// contains filtered or unexported fields
}

func (*Texts) DecodeMsgpack

func (t *Texts) DecodeMsgpack(dec *msgpack.Decoder) error

func (*Texts) Get

func (t *Texts) Get(lang languagepkg.Tag, uuid UUID) string

func (*Texts) Languages

func (t *Texts) Languages() []languagepkg.Tag

type TileSet

type TileSet struct {
	ID   int    `msgpack:"id"`
	Name string `msgpack:"name"`
}

type Title

type Title struct {
	MapID  int `msgpack:"mapId"`
	RoomID int `msgpack:"roomId"`
}

type TransferTransitionType

type TransferTransitionType string
const (
	TransferTransitionTypeNone  TransferTransitionType = "none"
	TransferTransitionTypeBlack TransferTransitionType = "black"
	TransferTransitionTypeWhite TransferTransitionType = "white"
)

type Trigger

type Trigger string
const (
	TriggerPlayer   Trigger = "player"
	TriggerAuto     Trigger = "auto"
	TriggerParallel Trigger = "parallel"
	TriggerDirect   Trigger = "direct"
	TriggerNever    Trigger = "never"
)

type UUID

type UUID uuid.UUID

func NewUUID

func NewUUID() UUID

func UUIDFromString

func UUIDFromString(s string) (UUID, error)

func (*UUID) DecodeMsgpack

func (u *UUID) DecodeMsgpack(dec *msgpack.Decoder) error

func (*UUID) EncodeMsgpack

func (u *UUID) EncodeMsgpack(enc *msgpack.Encoder) error

func (*UUID) MarshalBinary

func (u *UUID) MarshalBinary() ([]byte, error)

func (*UUID) MarshalText

func (u *UUID) MarshalText() ([]byte, error)

func (*UUID) String

func (u *UUID) String() string

func (*UUID) UnmarshalBinary

func (u *UUID) UnmarshalBinary(data []byte) error

func (*UUID) UnmarshalText

func (u *UUID) UnmarshalText(data []byte) error

type ValueType

type ValueType string
const (
	ValueTypeConstant ValueType = "constant"
	ValueTypeVariable ValueType = "variable"
)

type VariableData

type VariableData struct {
	ID       int             `msgpack:"id"`
	Name     string          `msgpack:"name"`
	Items    []*VariableItem `msgpack:"items"`
	IsFolded bool            `msgpack:"isFolded"`
}

type VariableItem

type VariableItem struct {
	ID   int    `msgpack:"id"`
	Name string `msgpack:"name"`
}

type WeatherType

type WeatherType string
const (
	WeatherTypeNone WeatherType = "none"
	WeatherTypeSnow WeatherType = "snow"
	WeatherTypeRain WeatherType = "rain"
)

Jump to

Keyboard shortcuts

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