mirror of
https://github.com/OpenDiablo2/OpenDiablo2
synced 2025-02-05 16:17:45 -05:00
473a0b3b19
* lint fixes for the game.go * lint fixes for the gui_testing.go * lint fixes for the blizzard_intro.go, map_engine_testing.go and select_hero_class.go * added package comment for the d2gamescreen package * fixes after merge
31 lines
786 B
Go
31 lines
786 B
Go
package d2gamescreen
|
|
|
|
import (
|
|
"github.com/OpenDiablo2/OpenDiablo2/d2common/d2data/d2video"
|
|
"github.com/OpenDiablo2/OpenDiablo2/d2core/d2asset"
|
|
"github.com/OpenDiablo2/OpenDiablo2/d2core/d2screen"
|
|
)
|
|
|
|
// BlizzardIntro represents the Blizzard Intro screen
|
|
type BlizzardIntro struct {
|
|
videoDecoder *d2video.BinkDecoder
|
|
}
|
|
|
|
// CreateBlizzardIntro creates a Blizzard Intro screen
|
|
func CreateBlizzardIntro() *BlizzardIntro {
|
|
return &BlizzardIntro{}
|
|
}
|
|
|
|
// OnLoad loads the resources for the Blizzard Intro screen
|
|
func (v *BlizzardIntro) OnLoad(loading d2screen.LoadingState) {
|
|
videoBytes, err := d2asset.LoadFile("/data/local/video/BlizNorth640x480.bik")
|
|
if err != nil {
|
|
loading.Error(err)
|
|
return
|
|
}
|
|
|
|
loading.Progress(0.5)
|
|
|
|
v.videoDecoder = d2video.CreateBinkDecoder(videoBytes)
|
|
}
|