precomputed shade algo, viewport basic render
This commit is contained in:
@ -26,7 +26,9 @@ func (l *Level) Put (x, y int, tileFunc interface{}) {
|
||||
if tf == nil {
|
||||
l.ctx.Logger().Fatal().Msgf("Got non-tile type to put into level: %v", tf)
|
||||
}
|
||||
l.Tiles[x][y] = tf
|
||||
if l.InBounds(types.Coords{x, y}) {
|
||||
l.Tiles[x][y] = tf
|
||||
}
|
||||
}
|
||||
|
||||
func NewLevel(ctx util.ClientCtx, branch string, depth int) *Level {
|
||||
@ -46,5 +48,5 @@ func NewLevel(ctx util.ClientCtx, branch string, depth int) *Level {
|
||||
|
||||
type Room struct {
|
||||
*types.Rect
|
||||
Center *types.Coords
|
||||
Center types.Coords
|
||||
}
|
Reference in New Issue
Block a user