1
1
mirror of https://github.com/OpenDiablo2/OpenDiablo2 synced 2024-11-02 17:27:23 -04:00
OpenDiablo2/main.go
Julien Ganichot 1f2771e8bc
Resolves #874 and #892 (#894)
* Move engine initialization to d2app
* adding debug print of error returned from `App.Run`
* adding ClampInt utility function to d2math
* cleaned up argument parsing in app.go, dedicated server no longer starts a renderer

Co-authored-by: gravestench <dknuth0101@gmail.com>
2020-11-01 16:05:50 -08:00

29 lines
621 B
Go

package main
import (
"fmt"
"log"
"github.com/OpenDiablo2/OpenDiablo2/d2app"
)
// GitBranch is set by the CI build process to the name of the branch
//nolint:gochecknoglobals // This is filled in by the build system
var GitBranch string
// GitCommit is set by the CI build process to the commit hash
//nolint:gochecknoglobals // This is filled in by the build system
var GitCommit string
func main() {
log.SetFlags(log.Lshortfile)
log.Println("OpenDiablo2 - Open source Diablo 2 engine")
instance := d2app.Create(GitBranch, GitCommit)
if err := instance.Run(); err != nil {
fmt.Println(err)
return
}
}