Defines | Functions | Variables

mkroom.c File Reference

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

Defines

#define sq(x)   ((x)*(x))
#define NSTYPES   (PM_CAPTAIN - PM_SOLDIER + 1)

Functions

STATIC_DCL boolean FDECL (isbig,(struct mkroom *))
STATIC_DCL void NDECL (mkshop)
STATIC_DCL void FDECL (mkzoo,(int))
STATIC_DCL void NDECL (mkswamp)
STATIC_DCL void NDECL (mktemple)
STATIC_DCL void FDECL (mkgarden,(struct mkroom *))
STATIC_DCL coordFDECL (shrine_pos,(int))
STATIC_DCL struct permonstNDECL (morguemon)
STATIC_DCL struct permonstNDECL (antholemon)
STATIC_DCL struct permonstNDECL (squadmon)
STATIC_DCL void FDECL (save_room,(int, struct mkroom *))
STATIC_DCL void FDECL (rest_room,(int, struct mkroom *))
STATIC_OVL boolean isbig (struct mkroom *sroom)
void mkroom (int roomtype)
STATIC_OVL void mkshop ()
struct mkroompick_room (boolean strict)
STATIC_OVL void mkzoo (int type)
void fill_zoo (struct mkroom *sroom)
void mkundead (coord *mm, boolean revive_corpses, int mm_flags)
STATIC_OVL struct permonstmorguemon ()
STATIC_OVL struct permonstantholemon ()
STATIC_OVL void mkgarden (struct mkroom *croom)
STATIC_OVL void mkswamp ()
STATIC_OVL coordshrine_pos (int roomno)
STATIC_OVL void mktemple ()
boolean nexttodoor (int sx, int sy)
boolean has_dnstairs (struct mkroom *sroom)
boolean has_upstairs (struct mkroom *sroom)
int somex (struct mkroom *croom)
int somey (struct mkroom *croom)
boolean inside_room (struct mkroom *croom, xchar x, xchar y)
boolean somexy (struct mkroom *croom, coord *c)
struct mkroomsearch_special (schar type)
struct permonstcourtmon ()
STATIC_OVL struct permonstsquadmon ()
STATIC_OVL void save_room (int fd, struct mkroom *r)
void save_rooms (int fd)
STATIC_OVL void rest_room (int fd, struct mkroom *r)
void rest_rooms (int fd)

Variables

struct shclass shtypes []
struct {
   unsigned   pm
   unsigned   prob
squadprob [NSTYPES]

Define Documentation

#define NSTYPES   (PM_CAPTAIN - PM_SOLDIER + 1)

Referenced by squadmon().

#define sq (   x )    ((x)*(x))

Referenced by fill_zoo().


Function Documentation

STATIC_OVL struct permonst* antholemon (  ) [read]

References G_GONE, level_difficulty(), mons, PM_FIRE_ANT, PM_GIANT_ANT, PM_SNOW_ANT, PM_SOLDIER_ANT, u, and you::ubirthday.

Referenced by fill_zoo().

Here is the call graph for this function:

Here is the caller graph for this function:

struct permonst* courtmon (  ) [read]

References level_difficulty(), mkclass(), mons, PM_BUGBEAR, PM_HOBGOBLIN, rn2(), S_CENTAUR, S_DRAGON, S_GIANT, S_GNOME, S_KOBOLD, S_ORC, and S_TROLL.

Referenced by doloot(), dosit(), and fill_zoo().

Here is the call graph for this function:

Here is the caller graph for this function:

STATIC_DCL boolean FDECL ( isbig  ,
(struct mkroom *)   
)
STATIC_DCL void FDECL ( save_room  ,
(int, struct mkroom *)   
)
STATIC_DCL void FDECL ( mkzoo  ,
(int)   
)
STATIC_DCL void FDECL ( mkgarden  ,
(struct mkroom *)   
)
STATIC_DCL void FDECL ( rest_room  ,
(int, struct mkroom *)   
)
STATIC_DCL coord* FDECL ( shrine_pos  ,
(int)   
)
void fill_zoo ( struct mkroom sroom )
boolean has_dnstairs ( struct mkroom sroom )

References dnstairs_room, FALSE, sstairs, sstairs_room, stairway::sx, TRUE, and stairway::up.

Referenced by mkgarden(), mkshop(), mkswamp(), and pick_room().

Here is the caller graph for this function:

boolean has_upstairs ( struct mkroom sroom )

References FALSE, sstairs, sstairs_room, stairway::sx, TRUE, stairway::up, and upstairs_room.

Referenced by mkgarden(), mkshop(), mkswamp(), and pick_room().

Here is the caller graph for this function:

boolean inside_room ( struct mkroom croom,
xchar  x,
xchar  y 
)

Referenced by in_town(), pos_to_room(), and somexy().

Here is the caller graph for this function:

STATIC_OVL boolean isbig ( struct mkroom sroom )

Referenced by mkshop().

Here is the caller graph for this function:

STATIC_OVL void mkgarden ( struct mkroom croom )

Create a special room with trees, fountains and nymphs.

Author:
Pasi Kallinen

References FALSE, dlevel_t::flags, FOUNTAIN, GARDEN, has_dnstairs(), has_upstairs(), mkroom::hx, level, levl, makemon(), mkclass(), MON_AT, nexttodoor(), levelflags::nfountains, NO_MM_FLAGS, nroom, OROOM, mkroom::rlit, rn1, rn2(), ROOM, rooms, mkroom::rtype, S_NYMPH, somexy(), TREE, TRUE, nhcoord::x, and nhcoord::y.

Referenced by fill_zoo(), mkroom(), and mkshop().

Here is the call graph for this function:

Here is the caller graph for this function:

void mkroom ( int  roomtype )

References ANTHOLE, ARMORY, BARRACKS, BEEHIVE, COCKNEST, COURT, GARDEN, LEMUREPIT, LEPREHALL, mkgarden(), mkpoolroom(), mkshop(), mkswamp(), mktemple(), mkzoo(), MORGUE, POOLROOM, SHOPBASE, SWAMP, TEMPLE, and ZOO.

Referenced by makelevel().

Here is the call graph for this function:

Here is the caller graph for this function:

STATIC_OVL void mkshop (  )
STATIC_OVL void mkswamp (  )

References dlevel_t::flags, has_dnstairs(), has_upstairs(), mkroom::hx, mkroom::hy, level, levl, mkroom::lx, mkroom::ly, makemon(), mkclass(), MON_AT, mons, nexttodoor(), NO_MM_FLAGS, nroom, OBJ_AT, OROOM, PM_ELECTRIC_EEL, PM_GIANT_EEL, PM_PIRANHA, POOL, rn2(), rooms, mkroom::rtype, S_FUNGUS, SWAMP, and t_at().

Referenced by mkroom(), and mkshop().

Here is the call graph for this function:

Here is the caller graph for this function:

STATIC_OVL void mktemple (  )

References ALTAR, AM_SHRINE, FALSE, dlevel_t::flags, induced_align(), level, levl, pick_room(), priestini(), ROOMOFFSET, rooms, mkroom::rtype, shrine_pos(), TEMPLE, TRUE, rm::typ, u, you::uz, nhcoord::x, and nhcoord::y.

Referenced by mkroom(), and mkshop().

Here is the call graph for this function:

Here is the caller graph for this function:

void mkundead ( coord mm,
boolean  revive_corpses,
int  mm_flags 
)

References CORPSE, enexto(), dlevel_t::flags, level, level_difficulty(), makemon(), morguemon(), otmp, revive(), rnd(), sobj_at(), TRUE, nhcoord::x, and nhcoord::y.

Referenced by deadbook(), and use_bell().

Here is the call graph for this function:

Here is the caller graph for this function:

STATIC_OVL void mkzoo ( int  type )

References FALSE, fill_zoo(), pick_room(), and mkroom::rtype.

Referenced by mkroom(), and mkshop().

Here is the call graph for this function:

Here is the caller graph for this function:

STATIC_OVL struct permonst* morguemon (  ) [read]

References A_NONE, In_endgame, Inhell, level_difficulty(), mkclass(), mons, ndemon(), PM_GHOST, PM_WRAITH, rn2(), S_DEMON, S_VAMPIRE, S_ZOMBIE, u, and you::uz.

Referenced by fill_zoo(), and mkundead().

Here is the call graph for this function:

Here is the caller graph for this function:

STATIC_DCL void NDECL ( mkswamp   )
STATIC_DCL struct permonst* NDECL ( morguemon   ) [read]
STATIC_DCL struct permonst* NDECL ( antholemon   ) [read]
STATIC_DCL void NDECL ( mkshop   )
STATIC_DCL struct permonst* NDECL ( squadmon   ) [read]
STATIC_DCL void NDECL ( mktemple   )
boolean nexttodoor ( int  sx,
int  sy 
)

References FALSE, IS_DOOR, isok(), levl, SDOOR, TRUE, and rm::typ.

Referenced by do_flood(), gush(), mkgarden(), and mkswamp().

Here is the call graph for this function:

Here is the caller graph for this function:

struct mkroom* pick_room ( boolean  strict ) [read]

References mkroom::doorct, has_dnstairs(), has_upstairs(), mkroom::hx, nroom, OROOM, rn2(), rooms, mkroom::rtype, wizard, and WIZARD.

Referenced by mkpoolroom(), mktemple(), and mkzoo().

Here is the call graph for this function:

Here is the caller graph for this function:

STATIC_OVL void rest_room ( int  fd,
struct mkroom r 
)

References mread(), nsubroom, mkroom::resident, and subrooms.

Referenced by rest_rooms().

Here is the call graph for this function:

Here is the caller graph for this function:

void rest_rooms ( int  fd )

References mkroom::hx, mread(), nroom, nsubroom, mkroom::resident, rest_room(), rooms, and subrooms.

Referenced by getlev().

Here is the call graph for this function:

Here is the caller graph for this function:

STATIC_OVL void save_room ( int  fd,
struct mkroom r 
)

References bwrite().

Referenced by save_rooms().

Here is the call graph for this function:

Here is the caller graph for this function:

void save_rooms ( int  fd )

References bwrite(), nroom, rooms, and save_room().

Referenced by savelev().

Here is the call graph for this function:

Here is the caller graph for this function:

struct mkroom* search_special ( schar  type ) [read]

References ANY_SHOP, ANY_TYPE, mkroom::hx, OROOM, rooms, mkroom::rtype, SHOPBASE, and subrooms.

Referenced by check_special_room(), dosounds(), fixup_special(), mvault_tele(), shkgone(), and vault_tele().

Here is the caller graph for this function:

STATIC_OVL coord* shrine_pos ( int  roomno )

References mkroom::hx, mkroom::hy, mkroom::lx, mkroom::ly, ROOMOFFSET, rooms, nhcoord::x, and nhcoord::y.

Referenced by mktemple().

Here is the caller graph for this function:

int somex ( struct mkroom croom )

References rn2().

Referenced by fixup_special(), makelevel(), place_random_engraving(), and somexy().

Here is the call graph for this function:

Here is the caller graph for this function:

boolean somexy ( struct mkroom croom,
coord c 
)

References FALSE, inside_room(), IS_WALL, levl, ROOMOFFSET, rooms, somex(), somey(), TRUE, nhcoord::x, and nhcoord::y.

Referenced by fill_zoo(), find_branch_room(), get_location(), get_room_loc(), join_map(), mkaltar(), mkfount(), mkgarden(), mkgrave(), mktrap(), mon_arrive(), mvault_tele(), and vault_tele().

Here is the call graph for this function:

Here is the caller graph for this function:

int somey ( struct mkroom croom )

References rn2().

Referenced by fixup_special(), makelevel(), place_random_engraving(), and somexy().

Here is the call graph for this function:

Here is the caller graph for this function:

STATIC_OVL struct permonst* squadmon (  ) [read]

References G_GONE, level_difficulty(), mons, NSTYPES, rn2(), rnd(), and squadprob.

Referenced by fill_zoo().

Here is the call graph for this function:

Here is the caller graph for this function:


Variable Documentation

unsigned pm
unsigned prob

Referenced by mkobj().

struct shclass shtypes[]
struct { ... } squadprob[NSTYPES] [static]

Referenced by squadmon().