mirror of
https://github.com/OpenDiablo2/OpenDiablo2
synced 2024-11-02 17:27:23 -04:00
c1a88c9cf7
* abstracted palettes, colors, and palette manager * make asset manager use the palette manager interface * added BGRA setter/getter, fixed lint errors * abstraction for animation and animation manager
40 lines
931 B
Go
40 lines
931 B
Go
package d2interface
|
|
|
|
import (
|
|
"image"
|
|
"image/color"
|
|
)
|
|
|
|
// Animation is an animation
|
|
type Animation interface {
|
|
Clone() Animation
|
|
SetSubLoop(startFrame, EndFrame int)
|
|
Advance(elapsed float64) error
|
|
Render(target Surface) error
|
|
RenderFromOrigin(target Surface) error
|
|
RenderSection(sfc Surface, bound image.Rectangle) error
|
|
GetFrameSize(frameIndex int) (int, int, error)
|
|
GetCurrentFrameSize() (int, int)
|
|
GetFrameBounds() (int, int)
|
|
GetCurrentFrame() int
|
|
GetFrameCount() int
|
|
IsOnFirstFrame() bool
|
|
IsOnLastFrame() bool
|
|
GetDirectionCount() int
|
|
SetDirection(directionIndex int) error
|
|
GetDirection() int
|
|
SetCurrentFrame(frameIndex int) error
|
|
Rewind()
|
|
PlayForward()
|
|
PlayBackward()
|
|
Pause()
|
|
SetPlayLoop(loop bool)
|
|
SetPlaySpeed(playSpeed float64)
|
|
SetPlayLength(playLength float64)
|
|
SetPlayLengthMs(playLengthMs int)
|
|
SetColorMod(colorMod color.Color)
|
|
GetPlayedCount() int
|
|
ResetPlayedCount()
|
|
SetBlend(blend bool)
|
|
}
|