2019-11-10 08:51:02 -05:00
|
|
|
package d2scene
|
2019-10-31 21:17:13 -04:00
|
|
|
|
|
|
|
import (
|
2019-11-17 00:16:33 -05:00
|
|
|
"github.com/OpenDiablo2/D2Shared/d2data/d2video"
|
2019-12-21 20:53:18 -05:00
|
|
|
"github.com/OpenDiablo2/OpenDiablo2/d2asset"
|
|
|
|
"github.com/OpenDiablo2/OpenDiablo2/d2corecommon/d2coreinterface"
|
2019-10-31 21:17:13 -04:00
|
|
|
"github.com/hajimehoshi/ebiten"
|
|
|
|
)
|
|
|
|
|
|
|
|
type BlizzardIntro struct {
|
2019-11-17 00:16:33 -05:00
|
|
|
sceneProvider d2coreinterface.SceneProvider
|
2019-11-10 08:51:02 -05:00
|
|
|
videoDecoder *d2video.BinkDecoder
|
2019-10-31 21:17:13 -04:00
|
|
|
}
|
|
|
|
|
2019-12-21 20:53:18 -05:00
|
|
|
func CreateBlizzardIntro(sceneProvider d2coreinterface.SceneProvider) *BlizzardIntro {
|
|
|
|
result := &BlizzardIntro{sceneProvider: sceneProvider}
|
2019-10-31 21:17:13 -04:00
|
|
|
|
|
|
|
return result
|
|
|
|
}
|
|
|
|
|
|
|
|
func (v *BlizzardIntro) Load() []func() {
|
|
|
|
return []func(){
|
|
|
|
func() {
|
2019-12-24 01:48:45 -05:00
|
|
|
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)
|
2019-10-31 21:17:13 -04:00
|
|
|
},
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
func (v *BlizzardIntro) Unload() {
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
func (v *BlizzardIntro) Render(screen *ebiten.Image) {
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
func (v *BlizzardIntro) Update(tickTime float64) {
|
|
|
|
|
|
|
|
}
|