reorganize

This commit is contained in:
2019-11-01 18:21:27 +03:00
parent 1ac6ae4665
commit 529f5a5749
7 changed files with 56 additions and 49 deletions

View File

@ -5,6 +5,8 @@ import (
"github.com/rs/zerolog/log"
"lab.zaar.be/thefish/alchemyst-go/engine/gamemap"
"lab.zaar.be/thefish/alchemyst-go/engine/gamemap/mapgens"
"lab.zaar.be/thefish/alchemyst-go/engine/gamestate"
"lab.zaar.be/thefish/alchemyst-go/engine/mob"
"lab.zaar.be/thefish/alchemyst-go/engine/screens"
"lab.zaar.be/thefish/alchemyst-go/engine/types"
"lab.zaar.be/thefish/alchemyst-go/ui"
@ -37,7 +39,7 @@ func init() {
// ...
// }
var State = types.GameState{
var State = gamestate.GameState{
Mainfunc: make(chan func()),
Exit: make(chan struct{}, 1),
Input: make(chan string, 1),
@ -61,7 +63,8 @@ func main() {
//fixme
level, rooms := mapgens.DefaultGen(gamemap.NewLevel(mainCtx, "test", 1))
vp := mainwindow.NewViewPort(40, 0, 60, 47, level, mw.GetLayer("base"))
State.Level = level
vp := mainwindow.NewViewPort(40, 0, 60, 47, mw.GetLayer("base"))
screenMgr := types.NewScreenManager(mainCtx)
@ -72,8 +75,8 @@ func main() {
//fixme
player := &types.Player{
Mob: types.Mob{
player := &mob.Player{
Mob: mob.Mob{
Appearance: &types.Appearance{
Glyph: &types.PlainGlyphHolder{"@"},
ColorSet: &types.TileColorSet{