2020-02-01 18:55:56 -05:00
|
|
|
package d2gamescene
|
2020-01-31 23:18:11 -05:00
|
|
|
|
|
|
|
import (
|
|
|
|
"github.com/OpenDiablo2/OpenDiablo2/d2common/d2data/d2video"
|
2020-02-01 18:55:56 -05:00
|
|
|
"github.com/OpenDiablo2/OpenDiablo2/d2core/d2asset"
|
2020-01-31 23:18:11 -05:00
|
|
|
)
|
|
|
|
|
|
|
|
type BlizzardIntro struct {
|
|
|
|
videoDecoder *d2video.BinkDecoder
|
|
|
|
}
|
|
|
|
|
|
|
|
func CreateBlizzardIntro() *BlizzardIntro {
|
2020-02-08 21:02:37 -05:00
|
|
|
return &BlizzardIntro{}
|
2020-01-31 23:18:11 -05:00
|
|
|
}
|
|
|
|
|
2020-02-08 21:02:37 -05:00
|
|
|
func (v *BlizzardIntro) OnLoad() error {
|
|
|
|
videoBytes, err := d2asset.LoadFile("/data/local/video/BlizNorth640x480.bik")
|
|
|
|
if err != nil {
|
|
|
|
return err
|
2020-01-31 23:18:11 -05:00
|
|
|
}
|
|
|
|
|
2020-02-08 21:02:37 -05:00
|
|
|
v.videoDecoder = d2video.CreateBinkDecoder(videoBytes)
|
|
|
|
return nil
|
2020-01-31 23:18:11 -05:00
|
|
|
}
|