Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DoomPicture ¶
type DoomPicture struct {
// contains filtered or unexported fields
}
DoomPicture holds an image in the doom picture format
func NewDoomPicture ¶
func NewDoomPicture(buff []byte) *DoomPicture
NewDoomPicture gets picture from buffer
func (*DoomPicture) Left ¶
func (p *DoomPicture) Left() int
Left offset. The number of pixels to the left of the center; where the first column gets drawn.
func (*DoomPicture) ToPng ¶
func (p *DoomPicture) ToPng(out string, palette [256]color.RGBA) error
ToPng exports picture to PNG
func (*DoomPicture) ToRGBA ¶
func (p *DoomPicture) ToRGBA(palette [256]color.RGBA) *image.RGBA
ToRGBA converts picture to go image
func (*DoomPicture) Top ¶
func (p *DoomPicture) Top() int
Top offset. The number of pixels above the origin; where the top row is.
type Flat ¶
type Flat struct { *DoomPicture // contains filtered or unexported fields }
Flat floor / ceiling texture
type FontBook ¶
type FontBook map[FontName]font
FontBook is a collection of fonts
func NewFontBook ¶
func NewFontBook() FontBook
NewFontBook initializes a new fontBook with the defined fonts
func (*FontBook) GetAllGraphics ¶
func (fb *FontBook) GetAllGraphics() map[string]*DoomPicture
GetAllGraphics return a map of all DoomGraphics contained in the Fontbook
type FontName ¶
type FontName int
FontName helps identifing the several embedded fonts in a WAD file
type Image ¶
type Image interface { ToRGBA(palette [256]color.RGBA) *image.RGBA ToPng(out string, palette [256]color.RGBA) error Width() int Height() int Top() int Left() int }
Image generic Image
type Patch ¶
type Patch struct { *DoomPicture // contains filtered or unexported fields }
Patch fragment of a wall texture
type Sprite ¶
type Sprite struct { Name string // contains filtered or unexported fields }
Sprite DOOM sprite
func (*Sprite) AddSpriteFrame ¶
func (s *Sprite) AddSpriteFrame(lump *wad.Lump) *SpriteFrame
AddSpriteFrame Creates new sprite from lump
func (*Sprite) FirstFrame ¶
func (s *Sprite) FirstFrame() *SpriteFrame
func (*Sprite) Frames ¶
func (s *Sprite) Frames(cb func(sf *SpriteFrame))
func (*Sprite) GetFrame ¶
func (s *Sprite) GetFrame(angle, frame byte) *SpriteFrame
type SpriteFrame ¶
type SpriteFrame struct {
// contains filtered or unexported fields
}
SpriteFrame DOOM sprite frame
func (*SpriteFrame) Angles ¶
func (sf *SpriteFrame) Angles() [9]Image
func (*SpriteFrame) FrameID ¶
func (sf *SpriteFrame) FrameID() byte
func (*SpriteFrame) Image ¶
func (sf *SpriteFrame) Image(angle int) Image
func (*SpriteFrame) Name ¶
func (sf *SpriteFrame) Name() string
type SpriteStore ¶
SpriteStore string map of sprites
func (SpriteStore) LoadWAD ¶
func (ss SpriteStore) LoadWAD(w *wad.WAD)
type Texture ¶
type Texture struct {
// contains filtered or unexported fields
}
Texture - DOOM texture definition
func NewTexture ¶
NewTexture create a new DOOM texture
func (*Texture) Left ¶
Left offset. The number of pixels to the left of the center; where the first column gets drawn.
type TextureStore ¶
TextureStore string map of textures
func NewTextureStore ¶
func NewTextureStore() TextureStore
NewTextureStore creates new texture store
func (TextureStore) InitPatches ¶
func (ts TextureStore) InitPatches()
func (TextureStore) LoadWAD ¶
func (ts TextureStore) LoadWAD(w *wad.WAD)