scummatlas

package
v0.0.0-...-32dd2ce Latest Latest
Warning

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

Go to latest
Published: May 11, 2017 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const DEBUG_SAVE_DECODED = true
View Source
const V5_KEY = 0x69

Variables

View Source
var GamesHashes = map[string]GameMetaData{
	"2d1e891fe52df707c30185e52c50cd92": GameMetaData{5, "The Secret of Monkey Island", "CD", "en"},
	"c0c9de81fb965e6cbe77f6e5631ca705": GameMetaData{5, "The Secret of Monkey Island", "Talkie", "en"},
	"3686cf8f89e102ececf4366e1d2c8126": GameMetaData{5, "Monkey Island: Lechuck's Revenge", "Floppy", "en"},
	"182344899c2e2998fca0bebcd82aa81a": GameMetaData{5, "Indiana Jones and the Fate of Atlantis", "CD", "en"},
	"4167a92a1d46baa4f4127d918d561f88": GameMetaData{6, "The Day of the Tentacle", "CD", "en"},
	"d917f311a448e3cc7239c31bddb00dd2": GameMetaData{6, "Sam & Max Hit the Road", "CD", "en"},
	"d8323015ecb8b10bf53474f6e6b0ae33": GameMetaData{7, "The Dig", "CD", "en"},
}

Functions

This section is empty.

Types

type AnimDefinition

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

type Box

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

func NewBox

func NewBox(data []byte) (box Box)

func (Box) Corners

func (self Box) Corners() [4]Point

type BoxMatrix

type BoxMatrix bool

type Costume

type Costume struct {
	AnimCount   int
	PaletteSize int
	Mirrored    bool
	Palette     color.Palette
	Animations  []CostumeAnim
	Limbs       []Limb
	Commands    []byte

	HexMap
	// contains filtered or unexported fields
}

func NewCostume

func NewCostume(data []byte, roomPalette color.Palette) *Costume

func (Costume) Debug

func (c Costume) Debug()

func (*Costume) ProcessCostumeAnim

func (c *Costume) ProcessCostumeAnim(i int)

type CostumeAnim

type CostumeAnim struct {
	LimbMask    []int
	Definitions []AnimDefinition
}

type Exit

type Exit struct {
	Path string
	Room int
}

type Game

type Game struct {
	RoomOffsets  []RoomOffset
	CostumeIndex []IndexItem
	RoomNames    []RoomName
	RoomIndexes  []int
	Rooms        []Room
	Scripts      []s.Script
	Costumes     []Costume

	GameMetaData
	// contains filtered or unexported fields
}

func NewGame

func NewGame(gamedir string) *Game

func (*Game) DumpDecoded

func (self *Game) DumpDecoded(outputdir string)

func (*Game) ProcessAllRooms

func (self *Game) ProcessAllRooms(outputdir string)

func (*Game) ProcessSingleRoom

func (self *Game) ProcessSingleRoom(i int, outputdir string)

type GameMetaData

type GameMetaData struct {
	ScummVersion int
	Name         string
	Variant      string
	Language     string
}

type HexMap

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

func (*HexMap) AddSection

func (h *HexMap) AddSection(start int, end int, name string, description string)

func (HexMap) Data

func (h HexMap) Data() []byte

func (HexMap) Sections

func (h HexMap) Sections() []HexMapSection

type HexMapSection

type HexMapSection struct {
	Start       int
	Length      int
	Type        string
	Description string
}

func (HexMapSection) IncludesOffset

func (s HexMapSection) IncludesOffset(offset int) bool

type IndexFile

type IndexFile struct {
	RoomNames      []RoomName
	MaximumValues  map[string]int
	RoomIndexes    []RoomIndex
	SoundIndexes   []IndexItem
	CostumeIndexes []IndexItem
	CharsetIndexes []IndexItem
	ObjectOwners   []ObjectOwner
}

type IndexItem

type IndexItem struct {
	RoomNumber int
	Offset     int
}

func ParseIndexBlock

func ParseIndexBlock(data []byte) (index []IndexItem)

type Limb

type Limb struct {
	Width  int
	Height int
	RelX   int
	RelY   int
	MoveX  int
	MoveY  int
	Image  *image.Paletted
}

func DecodeLimb

func DecodeLimb(data []byte, offset int, palette color.Palette) (limb Limb, length int)

type MainScummData

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

func NewMainScummData

func NewMainScummData(data []byte) *MainScummData

func (MainScummData) GetCostumes

func (d MainScummData) GetCostumes() (costumes []Costume)

func (*MainScummData) GetRoomsOffset

func (d *MainScummData) GetRoomsOffset() (offsets []RoomOffset)

func (MainScummData) GetScripts

func (d MainScummData) GetScripts() (scripts []s.Script)

func (*MainScummData) ParseRoom

func (d *MainScummData) ParseRoom(offset int, order int) Room

type Object

type Object struct {
	Id     int
	Name   string
	Flags  uint8
	Parent uint8
	Image  ObjectImage
	Width  int
	Height int
	Verbs  []Verb
	//TODO Direction uint8
	Point
}

func NewObjectFromOBCD

func NewObjectFromOBCD(data []byte) Object

func (Object) CalledScripts

func (self Object) CalledScripts() []int

func (Object) HasExit

func (self Object) HasExit() bool

func (Object) IdHex

func (self Object) IdHex() string

func (Object) LabelPosition

func (self Object) LabelPosition() Point

func (Object) PrintVerbs

func (self Object) PrintVerbs()

type ObjectImage

type ObjectImage struct {
	Width    int
	Height   int
	States   int
	Planes   int
	Hotspots int
	Frames   []*goimage.RGBA
	Point
}

func NewObjectImageFromOBIM

func NewObjectImageFromOBIM(data []byte, r *Room) (objImg ObjectImage, id int)

func (ObjectImage) FramesIndexes

func (self ObjectImage) FramesIndexes() (out []string)

type ObjectOwner

type ObjectOwner struct {
	Owner int
	State int
	Class int
}

type Point

type Point struct {
	X int `json:"x"`
	Y int `json:"y"`
}

type Room

type Room struct {
	Id           int
	Name         string
	Width        int
	Height       int
	ObjCount     int
	TranspIndex  uint8
	Palette      color.Palette
	Image        *image.RGBA
	Zplanes      []*image.RGBA
	Boxes        []Box
	BoxMatrix    BoxMatrix
	ExitScript   s.Script
	EntryScript  s.Script
	LocalScripts map[int]s.Script
	Objects      map[int]Object
	// contains filtered or unexported fields
}

func NewRoom

func NewRoom(data []byte) *Room

func (Room) BoxCount

func (r Room) BoxCount() int

func (Room) Exits

func (r Room) Exits() (exits []Exit)

func (Room) LocalScriptCount

func (r Room) LocalScriptCount() int

func (Room) PaletteHex

func (r Room) PaletteHex() []string

func (Room) PaletteLength

func (r Room) PaletteLength() int

func (Room) Print

func (r Room) Print()

func (Room) TwoDigitNumber

func (r Room) TwoDigitNumber() string

type RoomIndex

type RoomIndex IndexItem

func ParseRoomIndex

func ParseRoomIndex(data []byte) (index []RoomIndex)

type RoomName

type RoomName struct {
	Id   int
	Name string
}

func ParseRoomNames

func ParseRoomNames(data []byte) []RoomName

type RoomOffset

type RoomOffset struct {
	Id     int
	Offset int
}

type Verb

type Verb struct {
	Name string

	Script s.Script
	// contains filtered or unexported fields
}

func (Verb) PrintScript

func (self Verb) PrintScript() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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