viewport
This commit is contained in:
3
engine/gamemap/TODO
Normal file
3
engine/gamemap/TODO
Normal file
@ -0,0 +1,3 @@
|
||||
- load prefabs
|
||||
- compose from gens and prefabs
|
||||
- editor for prefabs
|
@ -1,20 +0,0 @@
|
||||
package gamemap
|
||||
|
||||
type mapGen interface {
|
||||
generate(l *Level) *Level
|
||||
}
|
||||
|
||||
type defaultGen struct{}
|
||||
|
||||
func (d defaultGen) generate(l *Level) *Level {
|
||||
|
||||
l.Tiles, rooms = addRooms(l)
|
||||
l.Tiles = connectRooms(rooms)
|
||||
l.Objects = populate(rooms)
|
||||
|
||||
return l
|
||||
}
|
||||
|
||||
func addRooms(l *Level) {
|
||||
|
||||
}
|
@ -10,6 +10,7 @@ var minRoomSize = 3
|
||||
var maxRoomSize = 11
|
||||
var maxrooms = 100
|
||||
|
||||
//fixme make closure to stack them
|
||||
func DefaultGen(l *gamemap.Level) *gamemap.Level {
|
||||
|
||||
rng := util.NewRNG()
|
||||
|
@ -40,6 +40,7 @@ type Tile struct {
|
||||
BlocksSight bool
|
||||
Explored bool
|
||||
MustDraw bool
|
||||
Colordance bool
|
||||
}
|
||||
|
||||
func NewWall() *Tile {
|
||||
@ -91,6 +92,7 @@ func NewWaterTile() *Tile {
|
||||
BlocksSight: false,
|
||||
Explored: false,
|
||||
MustDraw: true, //fixme debug
|
||||
Colordance: true,
|
||||
Appearance: &Appearance{
|
||||
Char: ".",
|
||||
ColorSet: &TileColorSet{
|
||||
@ -120,6 +122,7 @@ func NewDeepWaterTile() *Tile {
|
||||
BlocksSight: false,
|
||||
Explored: false,
|
||||
MustDraw: true, //fixme debug
|
||||
Colordance: true,
|
||||
Appearance: &Appearance{
|
||||
Char: " ",
|
||||
ColorSet: &TileColorSet{
|
||||
|
Reference in New Issue
Block a user