2019-11-06 22:12:15 -05:00
|
|
|
package scenes
|
2019-10-31 21:17:13 -04:00
|
|
|
|
|
|
|
import (
|
2019-11-10 03:36:53 -05:00
|
|
|
"github.com/OpenDiablo2/OpenDiablo2/d2common/d2interface"
|
|
|
|
"github.com/OpenDiablo2/OpenDiablo2/d2data/video"
|
2019-10-31 21:17:13 -04:00
|
|
|
"github.com/hajimehoshi/ebiten"
|
|
|
|
)
|
|
|
|
|
|
|
|
type BlizzardIntro struct {
|
2019-11-10 03:36:53 -05:00
|
|
|
fileProvider d2interface.FileProvider
|
|
|
|
sceneProvider d2interface.SceneProvider
|
2019-11-06 22:12:15 -05:00
|
|
|
videoDecoder *video.BinkDecoder
|
2019-10-31 21:17:13 -04:00
|
|
|
}
|
|
|
|
|
2019-11-10 03:36:53 -05:00
|
|
|
func CreateBlizzardIntro(fileProvider d2interface.FileProvider, sceneProvider d2interface.SceneProvider) *BlizzardIntro {
|
2019-10-31 21:17:13 -04:00
|
|
|
result := &BlizzardIntro{
|
|
|
|
fileProvider: fileProvider,
|
|
|
|
sceneProvider: sceneProvider,
|
|
|
|
}
|
|
|
|
|
|
|
|
return result
|
|
|
|
}
|
|
|
|
|
|
|
|
func (v *BlizzardIntro) Load() []func() {
|
|
|
|
return []func(){
|
|
|
|
func() {
|
|
|
|
videoBytes := v.fileProvider.LoadFile("/data/local/video/BlizNorth640x480.bik")
|
2019-11-06 22:12:15 -05:00
|
|
|
v.videoDecoder = video.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) {
|
|
|
|
|
|
|
|
}
|