ui starting, menu screen, ingame help

This commit is contained in:
2019-11-08 03:36:26 +03:00
parent 4532320ce3
commit cb7718860a
11 changed files with 271 additions and 40 deletions

View File

@ -24,6 +24,9 @@ func DefaultGen(l *gamemap.Level) (*gamemap.Level, []*gamemap.Room) {
rooms := make([]*gamemap.Room, 0)
//one wall around whole level guaranteed
levelBoundary := types.NewRect(l.X + 1, l.Y + 1, l.W - 2, l.H - 2)
for i := 0; i < maxrooms; i++ {
newRoom := &gamemap.Room{
Rect: types.NewRect(
@ -36,7 +39,7 @@ func DefaultGen(l *gamemap.Level) (*gamemap.Level, []*gamemap.Room) {
failed := false
if !l.InBounds(types.Coords{newRoom.X, newRoom.Y}) {
if !levelBoundary.InBounds(types.Coords{newRoom.X, newRoom.Y}) {
failed = true
}