Beginnings of a WH40K.EXE implementation

So far, we just play the opening credits on an external video player.
I want to start loading and displaying the menus next. Perhaps I can
get the entire non-gameplay flow working?
This commit is contained in:
2018-10-13 03:24:10 +01:00
parent 019108bff8
commit 73804519b0
5 changed files with 88 additions and 2 deletions

30
internal/wh40k/wh40k.go Normal file
View File

@@ -0,0 +1,30 @@
// package wh40k implements the full WH40K.EXE functionality, and is used from
// cmd/wh40k/main.go
//
// Entrypoint is Run()
package wh40k
import (
"fmt"
"ur.gs/ordoor/internal/config"
)
type WH40K struct {
Config *config.Config
}
func Run(configFile string) error {
cfg, err := config.Load(configFile)
if err != nil {
return fmt.Errorf("Couldn't load config file: %v", err)
}
wh40k := &WH40K{
Config: cfg,
}
wh40k.PlayUnskippableVideo("LOGOS")
return nil
}