mirror of
https://github.com/OpenDiablo2/OpenDiablo2
synced 2024-11-10 14:26:15 -05:00
25 lines
511 B
Go
25 lines
511 B
Go
package d2gamescreen
|
|
|
|
import (
|
|
"github.com/OpenDiablo2/OpenDiablo2/d2common/d2data/d2video"
|
|
"github.com/OpenDiablo2/OpenDiablo2/d2core/d2asset"
|
|
)
|
|
|
|
type BlizzardIntro struct {
|
|
videoDecoder *d2video.BinkDecoder
|
|
}
|
|
|
|
func CreateBlizzardIntro() *BlizzardIntro {
|
|
return &BlizzardIntro{}
|
|
}
|
|
|
|
func (v *BlizzardIntro) OnLoad() error {
|
|
videoBytes, err := d2asset.LoadFile("/data/local/video/BlizNorth640x480.bik")
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
v.videoDecoder = d2video.CreateBinkDecoder(videoBytes)
|
|
return nil
|
|
}
|