Devilution
Diablo devolved - magic behind the 1996 computer game

◆ CreateRoom()

static void CreateRoom ( int  nX1,
int  nY1,
int  nX2,
int  nY2,
int  nRDest,
int  nHDir,
BOOL  ForceHW,
int  nH,
int  nW 
)
static

Draws a random room rectangle, and then subdivides the rest of the passed in rectangle into 4 and recurses.

Parameters
nX1Lower X boundary of the area to draw into.
nY1Lower Y boundary of the area to draw into.
nX2Upper X boundary of the area to draw into.
nY2Upper Y boundary of the area to draw into.
nRDestThe room number of the parent room this call was invoked for. Zero for empty
nHDirThe direction of the hall from nRDest to this room.
ForceHWIf set, nH and nW are used for room size instead of random values.
nHHeight of the room, if ForceHW is set.
nWWidth of the room, if ForceHW is set.

Definition at line 635 of file drlg_l2.cpp.