more checking rooms
This commit is contained in:
@ -93,7 +93,7 @@ func (layer Layer) Print(x, y int, txt string) (w, h int) {
|
||||
return w, h
|
||||
}
|
||||
|
||||
func (layer Layer) PrintInside(rect *types.Rect, text string, alignment int) (width int, height int) {
|
||||
func (layer Layer) PrintInside(rect types.Rect, text string, alignment int) (width int, height int) {
|
||||
return blt.PrintExt(rect.X + 2, rect.Y + 2, rect.W - 4, rect.H - 4, alignment, text)
|
||||
}
|
||||
|
||||
@ -105,7 +105,7 @@ func (layer *Layer) Decorate(f func(args ...interface{})) func(args ...interface
|
||||
}
|
||||
}
|
||||
|
||||
func (layer *Layer) ClearRect(r *types.Rect) {
|
||||
func (layer *Layer) ClearRect(r types.Rect) {
|
||||
prevLayer := int(blt.State(blt.TK_LAYER))
|
||||
blt.Layer(layer.Idx)
|
||||
blt.ClearArea(r.X, r.Y, r.W, r.H)
|
||||
|
@ -8,7 +8,7 @@ import (
|
||||
)
|
||||
|
||||
type MainWindow struct {
|
||||
*types.Rect
|
||||
types.Rect
|
||||
ctx util.ClientCtx
|
||||
layers map[string]types.Renderable
|
||||
}
|
||||
|
@ -38,12 +38,12 @@ var doubleBorder = types.RectFill{
|
||||
}
|
||||
|
||||
type UiWindow struct {
|
||||
*types.Rect
|
||||
types.Rect
|
||||
layer *Layer
|
||||
fillage types.RectFill
|
||||
}
|
||||
|
||||
func (layer *Layer) NewWindow(rect *types.Rect) *UiWindow {
|
||||
func (layer *Layer) NewWindow(rect types.Rect) *UiWindow {
|
||||
return &UiWindow{
|
||||
Rect: rect,
|
||||
layer: layer,
|
||||
|
@ -14,7 +14,7 @@ import (
|
||||
var NotInViewError = errors.New("not in ViewPort")
|
||||
|
||||
type ViewPort struct {
|
||||
*types.Rect
|
||||
types.Rect
|
||||
cameraCoords types.Coords
|
||||
layer *Layer
|
||||
Fov fov.Fov
|
||||
@ -27,7 +27,7 @@ func NewViewPort(x, y, w, h int, layer *Layer) *ViewPort {
|
||||
computedFov := precomputed_shade.NewPrecomputedShade(15)
|
||||
computedFov.Init()
|
||||
vp := ViewPort{
|
||||
Rect: &types.Rect{x, y, w, h},
|
||||
Rect: types.Rect{x, y, w, h},
|
||||
layer: layer,
|
||||
Fov: computedFov,
|
||||
}
|
||||
|
Reference in New Issue
Block a user