1
1
mirror of https://github.com/OpenDiablo2/OpenDiablo2 synced 2024-11-19 02:46:35 -05:00

Made animation loaders public. (#481)

* Updated ebiten reference

* Made animation loaders public
This commit is contained in:
Tim Sarbin 2020-06-28 12:10:25 -04:00 committed by GitHub
parent a86f27bf0f
commit 1b614ddb3a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 5 deletions

View File

@ -53,7 +53,7 @@ type Animation struct {
subEndingFrame int subEndingFrame int
} }
func createAnimationFromDCC(dcc *d2dcc.DCC, palette *d2dat.DATPalette, transparency int) (*Animation, error) { func CreateAnimationFromDCC(dcc *d2dcc.DCC, palette *d2dat.DATPalette, transparency int) (*Animation, error) {
animation := &Animation{ animation := &Animation{
playLength: 1.0, playLength: 1.0,
playLoop: true, playLoop: true,
@ -108,14 +108,13 @@ func createAnimationFromDCC(dcc *d2dcc.DCC, palette *d2dat.DATPalette, transpare
offsetY: minY, offsetY: minY,
image: image, image: image,
}) })
} }
} }
return animation, nil return animation, nil
} }
func createAnimationFromDC6(dc6 *d2dc6.DC6File, palette *d2dat.DATPalette) (*Animation, error) { func CreateAnimationFromDC6(dc6 *d2dc6.DC6File, palette *d2dat.DATPalette) (*Animation, error) {
animation := &Animation{ animation := &Animation{
playLength: 1.0, playLength: 1.0,
playLoop: true, playLoop: true,

View File

@ -40,7 +40,7 @@ func (am *animationManager) loadAnimation(animationPath, palettePath string, tra
return nil, err return nil, err
} }
animation, err = createAnimationFromDC6(dc6, palette) animation, err = CreateAnimationFromDC6(dc6, palette)
if err != nil { if err != nil {
return nil, err return nil, err
} }
@ -55,7 +55,7 @@ func (am *animationManager) loadAnimation(animationPath, palettePath string, tra
return nil, err return nil, err
} }
animation, err = createAnimationFromDCC(dcc, palette, transparency) animation, err = CreateAnimationFromDCC(dcc, palette, transparency)
if err != nil { if err != nil {
return nil, err return nil, err
} }