move to terrain render system

This commit is contained in:
2019-11-16 03:40:26 +03:00
parent 7b4a3c3200
commit 7e9f7686a9
17 changed files with 158 additions and 62 deletions

View File

@ -5,6 +5,7 @@ import (
"lab.zaar.be/thefish/alchemyst-go/engine/gamemap"
"lab.zaar.be/thefish/alchemyst-go/engine/types"
"lab.zaar.be/thefish/alchemyst-go/util"
"lab.zaar.be/thefish/alchemyst-go/util/appctx"
)
//fixme move to config
@ -101,6 +102,15 @@ func GetRandomRoomList(ctx context.Context, rng *util.RNG, l *gamemap.Level, max
return rooms
}
func BlitToLevel (ctx context.Context, l *gamemap.Level, rooms[]gamemap.Room) {
for _, room := range rooms {
err := room.BlitToLevel(ctx, l)
if err != nil {
appctx.Logger(ctx).Err(err)
}
}
}
//delaunay helper funcs
func MedianStraight(rng *util.RNG, l *gamemap.Level, rooms []gamemap.Room, centers []types.Coords, edge types.Edge) {
//find connected rooms