Shaped and themed rooms

Allows creating shaped or themed rooms for the Dungeons of Doom
via lua script.

Invalidates bones and saves.

Makefiles updated for unix/linux by adding themerms.lua, but other
OSes need to have that added.
This commit is contained in:
Pasi Kallinen
2020-04-09 07:22:22 +03:00
parent 2d43c6d62a
commit 9b74ea0b22
16 changed files with 842 additions and 53 deletions

View File

@@ -713,6 +713,23 @@ coord *c;
return TRUE;
}
boolean
somexyspace(croom, c)
struct mkroom *croom;
coord *c;
{
int trycnt = 0;
boolean okay;
do {
okay = somexy(croom, c) && isok(c->x, c->y) && !occupied(c->x, c->y)
&& (levl[c->x][c->y].typ == ROOM
|| levl[c->x][c->y].typ == CORR
|| levl[c->x][c->y].typ == ICE);
} while (trycnt++ < 100 && !okay);
return okay;
}
/*
* Search for a special room given its type (zoo, court, etc...)
* Special values :