wimpy

package
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2022 License: BSD-3-Clause Imports: 8 Imported by: 0

Documentation

Overview

Package wimpy reads and writes wimpy files.

Index

Constants

View Source
const (
	DirRight = Direction(1 << iota)
	DirLeft
	DirFront
	DirBack
)

Variables

This section is empty.

Functions

func Write

func Write(w io.Writer, r *Room) (n int, err error)

Types

type Animation

type Animation struct {
	Name     string
	FPS      float64
	Triggers []string
	Frames   []string
	Loop     bool

	Flags  int
	Layers []Animation
}

type Direction

type Direction int

func (Direction) String

func (d Direction) String() string

type Layer

type Layer struct {
	Name     []string
	Parallax PointF
	ZSort    int
}

type Object

type Object struct {
	Name       string
	Parent     string
	Animations []Animation
	HotSpot    image.Rectangle
	Pos        image.Point
	UseDir     Direction
	UsePos     image.Point
	ZSort      int
	Prop       bool
	Spot       bool
	Trigger    bool
}

type PointF

type PointF struct {
	X, Y float64
}

type Room

type Room struct {
	Name       string
	Sheet      string
	Background []string
	Fullscreen int
	Height     int
	Layers     []Layer
	Objects    []Object
	RoomSize   image.Point
	Scaling    []Scalings
	WalkBoxes  []WalkBox
}

func Read

func Read(r io.Reader) (*Room, error)

type Scaling

type Scaling struct {
	Factor float64
	At     int
}

type Scalings

type Scalings struct {
	Scaling []Scaling
	Trigger string
}

type WalkBox

type WalkBox struct {
	Name    string
	Polygon []image.Point
}

Jump to

Keyboard shortcuts

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