1
1
mirror of https://github.com/OpenDiablo2/OpenDiablo2 synced 2024-11-06 18:27:20 -05:00
OpenDiablo2/d2core/d2scene/blizzard_intro.go

44 lines
911 B
Go
Raw Normal View History

2019-11-10 08:51:02 -05:00
package d2scene
import (
"github.com/OpenDiablo2/D2Shared/d2data/d2video"
"github.com/OpenDiablo2/OpenDiablo2/d2asset"
"github.com/OpenDiablo2/OpenDiablo2/d2corecommon/d2coreinterface"
"github.com/hajimehoshi/ebiten"
)
type BlizzardIntro struct {
sceneProvider d2coreinterface.SceneProvider
2019-11-10 08:51:02 -05:00
videoDecoder *d2video.BinkDecoder
}
func CreateBlizzardIntro(sceneProvider d2coreinterface.SceneProvider) *BlizzardIntro {
result := &BlizzardIntro{sceneProvider: sceneProvider}
return result
}
func (v *BlizzardIntro) Load() []func() {
return []func(){
func() {
videoBytes, err := d2asset.LoadFile("/data/local/video/BlizNorth640x480.bik")
if err != nil {
panic(err)
}
2019-11-10 08:51:02 -05:00
v.videoDecoder = d2video.CreateBinkDecoder(videoBytes)
},
}
}
func (v *BlizzardIntro) Unload() {
}
func (v *BlizzardIntro) Render(screen *ebiten.Image) {
}
func (v *BlizzardIntro) Update(tickTime float64) {
}