2019-10-31 21:17:13 -04:00
|
|
|
package Scenes
|
|
|
|
|
|
|
|
import (
|
2019-11-02 17:38:39 -04:00
|
|
|
"github.com/OpenDiablo2/OpenDiablo2/Common"
|
|
|
|
"github.com/OpenDiablo2/OpenDiablo2/Video"
|
2019-10-31 21:17:13 -04:00
|
|
|
"github.com/hajimehoshi/ebiten"
|
|
|
|
)
|
|
|
|
|
|
|
|
type BlizzardIntro struct {
|
|
|
|
fileProvider Common.FileProvider
|
|
|
|
sceneProvider SceneProvider
|
|
|
|
videoDecoder *Video.BinkDecoder
|
|
|
|
}
|
|
|
|
|
|
|
|
func CreateBlizzardIntro(fileProvider Common.FileProvider, sceneProvider SceneProvider) *BlizzardIntro {
|
|
|
|
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")
|
|
|
|
v.videoDecoder = Video.CreateBinkDecoder(videoBytes)
|
|
|
|
},
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
func (v *BlizzardIntro) Unload() {
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
func (v *BlizzardIntro) Render(screen *ebiten.Image) {
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
func (v *BlizzardIntro) Update(tickTime float64) {
|
|
|
|
|
|
|
|
}
|