ready to ecs

This commit is contained in:
anton.gurov
2019-10-31 18:33:37 +03:00
parent 2bb7cae632
commit fa3e3ee786
5 changed files with 43 additions and 15 deletions

View File

@ -8,7 +8,7 @@ import (
//fixme move to config
var minRoomSize = 3
var maxRoomSize = 22
var maxrooms = 30
var maxrooms = 50
//fixme make closure to stack them
func DefaultGen(l *gamemap.Level) *gamemap.Level {
@ -70,18 +70,31 @@ func DefaultGen(l *gamemap.Level) *gamemap.Level {
// Body: func() *gamemap.Tile {return gamemap.NewFloor()},
//}
//fillage := types.RectFill{
// Top: func() *gamemap.Tile {return gamemap.NewWaterTile()},
// Bottom: func() *gamemap.Tile {return gamemap.NewWaterTile()},
// Left: func() *gamemap.Tile {return gamemap.NewWaterTile()},
// Right: func() *gamemap.Tile {return gamemap.NewWaterTile()},
// BottomLeft: func() *gamemap.Tile {return gamemap.NewWaterTile()},
// BottomRight: func() *gamemap.Tile {return gamemap.NewWaterTile()},
// TopLeft: func() *gamemap.Tile {return gamemap.NewWaterTile()},
// TopRight: func() *gamemap.Tile {return gamemap.NewWaterTile()},
// Body: func() *gamemap.Tile {return gamemap.NewDeepWaterTile()},
//}
fillage := types.RectFill{
Top: func() *gamemap.Tile {return gamemap.NewWaterTile()},
Bottom: func() *gamemap.Tile {return gamemap.NewWaterTile()},
Left: func() *gamemap.Tile {return gamemap.NewWaterTile()},
Right: func() *gamemap.Tile {return gamemap.NewWaterTile()},
BottomLeft: func() *gamemap.Tile {return gamemap.NewWaterTile()},
BottomRight: func() *gamemap.Tile {return gamemap.NewWaterTile()},
TopLeft: func() *gamemap.Tile {return gamemap.NewWaterTile()},
TopRight: func() *gamemap.Tile {return gamemap.NewWaterTile()},
Body: func() *gamemap.Tile {return gamemap.NewDeepWaterTile()},
Top: func() *gamemap.Tile {return gamemap.NewFloor()},
Bottom: func() *gamemap.Tile {return gamemap.NewFloor()},
Left: func() *gamemap.Tile {return gamemap.NewFloor()},
Right: func() *gamemap.Tile {return gamemap.NewFloor()},
BottomLeft: func() *gamemap.Tile {return gamemap.NewFloor()},
BottomRight: func() *gamemap.Tile {return gamemap.NewFloor()},
TopLeft: func() *gamemap.Tile {return gamemap.NewFloor()},
TopRight: func() *gamemap.Tile {return gamemap.NewFloor()},
Body: func() *gamemap.Tile {return gamemap.NewFloor()},
}
for idx, room := range rooms {
room.Blit(fillage, l)
if idx > 0 {