1
1
mirror of https://github.com/OpenDiablo2/OpenDiablo2 synced 2024-11-06 18:27:20 -05:00
OpenDiablo2/d2game/d2gamescreen/blizzard_intro.go
2020-06-24 22:41:18 -04:00

27 lines
616 B
Go

package d2gamescreen
import (
"github.com/OpenDiablo2/OpenDiablo2/d2common/d2data/d2video"
"github.com/OpenDiablo2/OpenDiablo2/d2core/d2asset"
"github.com/OpenDiablo2/OpenDiablo2/d2core/d2screen"
)
type BlizzardIntro struct {
videoDecoder *d2video.BinkDecoder
}
func CreateBlizzardIntro() *BlizzardIntro {
return &BlizzardIntro{}
}
func (v *BlizzardIntro) OnLoad(loading d2screen.LoadingState) {
videoBytes, err := d2asset.LoadFile("/data/local/video/BlizNorth640x480.bik")
if err != nil {
loading.Error(err)
return
}
loading.Progress(0.5)
v.videoDecoder = d2video.CreateBinkDecoder(videoBytes)
}