Hot Cocoa Tycoon
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

45 lines
841 B

package main
import (
"log"
"os"
"os/signal"
"syscall"
"code.rocketnine.space/tslocum/hot-cocoa-tycoon/game"
"code.rocketnine.space/tslocum/hot-cocoa-tycoon/world"
"github.com/hajimehoshi/ebiten/v2"
)
func main() {
ebiten.SetWindowTitle("Hot Cocoa Tycoon")
ebiten.SetWindowResizingMode(ebiten.WindowResizingModeEnabled)
ebiten.SetWindowSize(world.ScreenWidth, world.ScreenHeight)
ebiten.SetFullscreen(true)
ebiten.SetWindowClosingHandled(true)
ebiten.SetFPSMode(ebiten.FPSModeVsyncOn)
ebiten.SetTPS(world.TPS)
ebiten.SetRunnableOnUnfocused(true)
//parseFlags()
g, err := game.NewGame()
if err != nil {
log.Fatal(err)
}
sigc := make(chan os.Signal, 1)
signal.Notify(sigc,
syscall.SIGINT,
syscall.SIGTERM)
go func() {
<-sigc
g.Exit()
}()
err = ebiten.RunGame(g)
if err != nil {
log.Fatal(err)
}
}