1
1
mirror of https://github.com/OpenDiablo2/OpenDiablo2 synced 2024-11-02 09:17:19 -04:00
OpenDiablo2/d2game/d2gamescene/blizzard_intro.go

25 lines
510 B
Go
Raw Normal View History

package d2gamescene
import (
"github.com/OpenDiablo2/OpenDiablo2/d2common/d2data/d2video"
"github.com/OpenDiablo2/OpenDiablo2/d2core/d2asset"
)
type BlizzardIntro struct {
videoDecoder *d2video.BinkDecoder
}
func CreateBlizzardIntro() *BlizzardIntro {
2020-02-08 21:02:37 -05:00
return &BlizzardIntro{}
}
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-02-08 21:02:37 -05:00
v.videoDecoder = d2video.CreateBinkDecoder(videoBytes)
return nil
}