Defines | Functions | Variables

rect.c File Reference

#include "hack.h"
Include dependency graph for rect.c:

Defines

#define MAXRECT   50
#define XLIM   4
#define YLIM   3

Functions

int FDECL (get_rect_ind,(NhRect *))
static boolean FDECL (intersect,(NhRect *, NhRect *, NhRect *))
void init_rect ()
int get_rect_ind (NhRect *r)
NhRectget_rect (NhRect *r)
NhRectrnd_rect ()
static boolean intersect (NhRect *r1, NhRect *r2, NhRect *r3)
void remove_rect (NhRect *r)
void add_rect (NhRect *r)
void split_rects (NhRect *r1, NhRect *r2)

Variables

static NhRect rect [MAXRECT+1]
static int rect_cnt

Define Documentation

#define MAXRECT   50

Referenced by add_rect().

#define XLIM   4

Referenced by split_rects().

#define YLIM   3

Referenced by split_rects().


Function Documentation

void add_rect ( NhRect r )

References get_rect(), MAXRECT, pline(), rect_cnt, and wizard.

Referenced by split_rects().

Here is the call graph for this function:

Here is the caller graph for this function:

int FDECL ( get_rect_ind  ,
(NhRect *)   
)
static boolean FDECL ( intersect  ,
(NhRect *, NhRect *, NhRect *)   
) [static]
NhRect* get_rect ( NhRect r )

References nhrect::lx, nhrect::ly, and rect_cnt.

Referenced by add_rect(), and create_room().

Here is the caller graph for this function:

int get_rect_ind ( NhRect r )

References nhrect::hx, nhrect::hy, nhrect::lx, nhrect::ly, and rect_cnt.

Referenced by remove_rect().

Here is the caller graph for this function:

void init_rect (  )

References COLNO, nhrect::hx, nhrect::hy, nhrect::lx, nhrect::ly, and ROWNO.

Referenced by clear_level_structures().

Here is the caller graph for this function:

static boolean intersect ( NhRect r1,
NhRect r2,
NhRect r3 
) [static]

References FALSE, and TRUE.

Referenced by split_rects().

Here is the caller graph for this function:

void remove_rect ( NhRect r )

References get_rect_ind(), and rect_cnt.

Referenced by split_rects().

Here is the call graph for this function:

Here is the caller graph for this function:

NhRect* rnd_rect (  )

References rn2().

Referenced by create_room(), makelevel(), makerooms(), and mk_split_room().

Here is the call graph for this function:

Here is the caller graph for this function:

void split_rects ( NhRect r1,
NhRect r2 
)

References add_rect(), COLNO, nhrect::hx, nhrect::hy, intersect(), nhrect::lx, nhrect::ly, remove_rect(), ROWNO, XLIM, and YLIM.

Referenced by create_room(), and mk_split_room().

Here is the call graph for this function:

Here is the caller graph for this function:


Variable Documentation

NhRect rect[MAXRECT+1] [static]

Referenced by add_rect_to_reg().

int rect_cnt [static]