make style consistent for function ptr arguments
This commit is contained in:
@@ -568,7 +568,7 @@ ckmailstatus(void)
|
||||
void
|
||||
read_simplemail(const char *mbox, boolean adminmsg)
|
||||
{
|
||||
FILE* mb = fopen(mbox, "r");
|
||||
FILE *mb = fopen(mbox, "r");
|
||||
char curline[128], *msg;
|
||||
boolean seen_one_already = FALSE;
|
||||
#ifdef SIMPLE_MAIL
|
||||
|
||||
@@ -449,7 +449,7 @@ litstate_rnd(int litstate)
|
||||
}
|
||||
|
||||
void
|
||||
mkmap(lev_init* init_lev)
|
||||
mkmap(lev_init *init_lev)
|
||||
{
|
||||
schar bg_typ = init_lev->bg, fg_typ = init_lev->fg;
|
||||
boolean smooth = init_lev->smoothed, join = init_lev->joined;
|
||||
|
||||
@@ -715,7 +715,7 @@ migrate_orc(struct monst *mtmp, unsigned long mflags)
|
||||
}
|
||||
|
||||
static void
|
||||
shiny_orc_stuff(struct monst* mtmp)
|
||||
shiny_orc_stuff(struct monst *mtmp)
|
||||
{
|
||||
int gemprob, goldprob, otyp;
|
||||
struct obj *otmp;
|
||||
@@ -747,7 +747,7 @@ shiny_orc_stuff(struct monst* mtmp)
|
||||
}
|
||||
|
||||
static void
|
||||
migr_booty_item(int otyp, const char* gang)
|
||||
migr_booty_item(int otyp, const char *gang)
|
||||
{
|
||||
struct obj *otmp;
|
||||
|
||||
@@ -1672,7 +1672,7 @@ water_friction(void)
|
||||
}
|
||||
|
||||
void
|
||||
save_waterlevel(NHFILE* nhfp)
|
||||
save_waterlevel(NHFILE *nhfp)
|
||||
{
|
||||
struct bubble *b;
|
||||
|
||||
@@ -1882,7 +1882,7 @@ mk_bubble(coordxy x, coordxy y, int n)
|
||||
* This property also makes leaving a bubble slightly difficult.
|
||||
*/
|
||||
static void
|
||||
mv_bubble(struct bubble* b, coordxy dx, coordxy dy, boolean ini)
|
||||
mv_bubble(struct bubble *b, coordxy dx, coordxy dy, boolean ini)
|
||||
{
|
||||
int i, j, colli = 0;
|
||||
coordxy x, y;
|
||||
|
||||
@@ -3571,7 +3571,7 @@ obj_absorb(struct obj **obj1, struct obj **obj2)
|
||||
* cleanly (since we don't know which we want to stay around)
|
||||
*/
|
||||
struct obj *
|
||||
obj_meld(struct obj** obj1, struct obj** obj2)
|
||||
obj_meld(struct obj **obj1, struct obj **obj2)
|
||||
{
|
||||
struct obj *otmp1, *otmp2, *result = 0;
|
||||
int ox, oy;
|
||||
|
||||
24
src/mkroom.c
24
src/mkroom.c
@@ -34,7 +34,7 @@ static boolean invalid_shop_shape(struct mkroom *sroom);
|
||||
extern const struct shclass shtypes[]; /* defined in shknam.c */
|
||||
|
||||
static boolean
|
||||
isbig(struct mkroom* sroom)
|
||||
isbig(struct mkroom *sroom)
|
||||
{
|
||||
int area = (sroom->hx - sroom->lx + 1)
|
||||
* (sroom->hy - sroom->ly + 1);
|
||||
@@ -268,7 +268,7 @@ mk_zoo_thronemon(coordxy x, coordxy y)
|
||||
}
|
||||
|
||||
void
|
||||
fill_zoo(struct mkroom* sroom)
|
||||
fill_zoo(struct mkroom *sroom)
|
||||
{
|
||||
struct monst *mon;
|
||||
int sx, sy, i;
|
||||
@@ -628,7 +628,7 @@ nexttodoor(int sx, int sy)
|
||||
}
|
||||
|
||||
boolean
|
||||
has_dnstairs(struct mkroom* sroom)
|
||||
has_dnstairs(struct mkroom *sroom)
|
||||
{
|
||||
stairway *stway = gs.stairs;
|
||||
|
||||
@@ -641,7 +641,7 @@ has_dnstairs(struct mkroom* sroom)
|
||||
}
|
||||
|
||||
boolean
|
||||
has_upstairs(struct mkroom* sroom)
|
||||
has_upstairs(struct mkroom *sroom)
|
||||
{
|
||||
stairway *stway = gs.stairs;
|
||||
|
||||
@@ -654,19 +654,19 @@ has_upstairs(struct mkroom* sroom)
|
||||
}
|
||||
|
||||
int
|
||||
somex(struct mkroom* croom)
|
||||
somex(struct mkroom *croom)
|
||||
{
|
||||
return rn1(croom->hx - croom->lx + 1, croom->lx);
|
||||
}
|
||||
|
||||
int
|
||||
somey(struct mkroom* croom)
|
||||
somey(struct mkroom *croom)
|
||||
{
|
||||
return rn1(croom->hy - croom->ly + 1, croom->ly);
|
||||
}
|
||||
|
||||
boolean
|
||||
inside_room(struct mkroom* croom, coordxy x, coordxy y)
|
||||
inside_room(struct mkroom *croom, coordxy x, coordxy y)
|
||||
{
|
||||
if (croom->irregular) {
|
||||
int i = (int) ((croom - gr.rooms) + ROOMOFFSET);
|
||||
@@ -682,7 +682,7 @@ inside_room(struct mkroom* croom, coordxy x, coordxy y)
|
||||
can return a non-accessible location, eg. inside a wall
|
||||
if a themed room is not irregular, but has some non-room terrain */
|
||||
boolean
|
||||
somexy(struct mkroom *croom,coord *c)
|
||||
somexy(struct mkroom *croom, coord *c)
|
||||
{
|
||||
int try_cnt = 0;
|
||||
int i;
|
||||
@@ -832,7 +832,7 @@ squadmon(void)
|
||||
* (if any).
|
||||
*/
|
||||
static void
|
||||
save_room(NHFILE* nhfp, struct mkroom* r)
|
||||
save_room(NHFILE *nhfp, struct mkroom *r)
|
||||
{
|
||||
short i;
|
||||
|
||||
@@ -852,7 +852,7 @@ save_room(NHFILE* nhfp, struct mkroom* r)
|
||||
* save_rooms : Save all the rooms on disk!
|
||||
*/
|
||||
void
|
||||
save_rooms(NHFILE* nhfp)
|
||||
save_rooms(NHFILE *nhfp)
|
||||
{
|
||||
short i;
|
||||
|
||||
@@ -864,7 +864,7 @@ save_rooms(NHFILE* nhfp)
|
||||
}
|
||||
|
||||
static void
|
||||
rest_room(NHFILE* nhfp, struct mkroom* r)
|
||||
rest_room(NHFILE *nhfp, struct mkroom *r)
|
||||
{
|
||||
short i;
|
||||
|
||||
@@ -883,7 +883,7 @@ rest_room(NHFILE* nhfp, struct mkroom* r)
|
||||
* the disk.
|
||||
*/
|
||||
void
|
||||
rest_rooms(NHFILE* nhfp)
|
||||
rest_rooms(NHFILE *nhfp)
|
||||
{
|
||||
short i;
|
||||
|
||||
|
||||
60
src/mon.c
60
src/mon.c
@@ -282,7 +282,7 @@ mon_sanity_check(void)
|
||||
/* Does not check for actual poison gas at the location. */
|
||||
/* Returns one of M_POISONGAS_foo */
|
||||
int
|
||||
m_poisongas_ok(struct monst* mtmp)
|
||||
m_poisongas_ok(struct monst *mtmp)
|
||||
{
|
||||
int px, py;
|
||||
boolean is_you = (mtmp == &gy.youmonst);
|
||||
@@ -733,7 +733,7 @@ make_corpse(struct monst *mtmp, unsigned int corpseflags)
|
||||
|
||||
/* check mtmp and water/lava for compatibility, 0 (survived), 1 (died) */
|
||||
int
|
||||
minliquid(struct monst* mtmp)
|
||||
minliquid(struct monst *mtmp)
|
||||
{
|
||||
int res;
|
||||
|
||||
@@ -747,7 +747,7 @@ minliquid(struct monst* mtmp)
|
||||
|
||||
/* guts of minliquid() */
|
||||
static int
|
||||
minliquid_core(struct monst* mtmp)
|
||||
minliquid_core(struct monst *mtmp)
|
||||
{
|
||||
boolean inpool, inlava, infountain;
|
||||
boolean waterwall = is_waterwall(mtmp->mx,mtmp->my);
|
||||
@@ -1594,7 +1594,7 @@ mon_givit(struct monst *mtmp, struct permonst *ptr)
|
||||
}
|
||||
|
||||
void
|
||||
mpickgold(struct monst* mtmp)
|
||||
mpickgold(struct monst *mtmp)
|
||||
{
|
||||
struct obj *gold;
|
||||
int mat_idx;
|
||||
@@ -1681,7 +1681,7 @@ mpickstuff(struct monst *mtmp)
|
||||
}
|
||||
|
||||
int
|
||||
curr_mon_load(struct monst* mtmp)
|
||||
curr_mon_load(struct monst *mtmp)
|
||||
{
|
||||
int curload = 0;
|
||||
struct obj *obj;
|
||||
@@ -1695,7 +1695,7 @@ curr_mon_load(struct monst* mtmp)
|
||||
}
|
||||
|
||||
int
|
||||
max_mon_load(struct monst* mtmp)
|
||||
max_mon_load(struct monst *mtmp)
|
||||
{
|
||||
long maxload;
|
||||
|
||||
@@ -1758,7 +1758,7 @@ can_touch_safely(struct monst *mtmp, struct obj *otmp)
|
||||
* likesgold handling m_move results in picking up the whole stack.
|
||||
*/
|
||||
int
|
||||
can_carry(struct monst* mtmp, struct obj* otmp)
|
||||
can_carry(struct monst *mtmp, struct obj *otmp)
|
||||
{
|
||||
int iquan, otyp = otmp->otyp, newload = otmp->owt;
|
||||
struct permonst *mdat = mtmp->data;
|
||||
@@ -1832,7 +1832,7 @@ monlineu(struct monst *mon, int nx, int ny)
|
||||
|
||||
/* return flags based on monster data, for mfndpos() */
|
||||
long
|
||||
mon_allowflags(struct monst* mtmp)
|
||||
mon_allowflags(struct monst *mtmp)
|
||||
{
|
||||
long allowflags = 0L;
|
||||
boolean can_open = !(nohands(mtmp->data) || verysmall(mtmp->data));
|
||||
@@ -2336,7 +2336,7 @@ relmon(
|
||||
}
|
||||
|
||||
void
|
||||
copy_mextra(struct monst* mtmp2, struct monst* mtmp1)
|
||||
copy_mextra(struct monst *mtmp2, struct monst *mtmp1)
|
||||
{
|
||||
if (!mtmp2 || !mtmp1 || !mtmp1->mextra)
|
||||
return;
|
||||
@@ -2382,7 +2382,7 @@ copy_mextra(struct monst* mtmp2, struct monst* mtmp1)
|
||||
}
|
||||
|
||||
void
|
||||
dealloc_mextra(struct monst* m)
|
||||
dealloc_mextra(struct monst *m)
|
||||
{
|
||||
struct mextra *x = m->mextra;
|
||||
|
||||
@@ -2556,7 +2556,7 @@ set_mon_min_mhpmax(
|
||||
|
||||
/* find the worn amulet of life saving which will save a monster */
|
||||
struct obj *
|
||||
mlifesaver(struct monst* mon)
|
||||
mlifesaver(struct monst *mon)
|
||||
{
|
||||
if (!nonliving(mon->data) || is_vampshifter(mon)) {
|
||||
struct obj *otmp = which_armor(mon, W_AMUL);
|
||||
@@ -2568,7 +2568,7 @@ mlifesaver(struct monst* mon)
|
||||
}
|
||||
|
||||
static void
|
||||
lifesaved_monster(struct monst* mtmp)
|
||||
lifesaved_monster(struct monst *mtmp)
|
||||
{
|
||||
boolean surviver;
|
||||
struct obj *lifesave = mlifesaver(mtmp);
|
||||
@@ -2936,7 +2936,7 @@ corpse_chance(
|
||||
|
||||
/* drop (perhaps) a cadaver and remove monster */
|
||||
void
|
||||
mondied(struct monst* mdef)
|
||||
mondied(struct monst *mdef)
|
||||
{
|
||||
mondead(mdef);
|
||||
if (!DEADMONSTER(mdef))
|
||||
@@ -2950,7 +2950,7 @@ mondied(struct monst* mdef)
|
||||
|
||||
/* monster disappears, not dies */
|
||||
void
|
||||
mongone(struct monst* mdef)
|
||||
mongone(struct monst *mdef)
|
||||
{
|
||||
mdef->mhp = 0; /* can skip some inventory bookkeeping */
|
||||
|
||||
@@ -2970,7 +2970,7 @@ mongone(struct monst* mdef)
|
||||
|
||||
/* drop a statue or rock and remove monster */
|
||||
void
|
||||
monstone(struct monst* mdef)
|
||||
monstone(struct monst *mdef)
|
||||
{
|
||||
struct obj *otmp, *obj, *oldminvent;
|
||||
coordxy x = mdef->mx, y = mdef->my;
|
||||
@@ -3152,7 +3152,7 @@ unstuck(struct monst *mtmp)
|
||||
}
|
||||
|
||||
void
|
||||
killed(struct monst* mtmp)
|
||||
killed(struct monst *mtmp)
|
||||
{
|
||||
xkilled(mtmp, XKILL_GIVEMSG);
|
||||
}
|
||||
@@ -3414,7 +3414,7 @@ xkilled(
|
||||
/* changes the monster into a stone monster of the same type
|
||||
this should only be called when poly_when_stoned() is true */
|
||||
void
|
||||
mon_to_stone(struct monst* mtmp)
|
||||
mon_to_stone(struct monst *mtmp)
|
||||
{
|
||||
if (mtmp->data->mlet == S_GOLEM) {
|
||||
/* it's a golem, and not a stone golem */
|
||||
@@ -3756,7 +3756,7 @@ mnearto(
|
||||
/* monster responds to player action; not the same as a passive attack;
|
||||
assumes reason for response has been tested, and response _must_ be made */
|
||||
void
|
||||
m_respond(struct monst* mtmp)
|
||||
m_respond(struct monst *mtmp)
|
||||
{
|
||||
if (mtmp->data->msound == MS_SHRIEK) {
|
||||
if (!Deaf) {
|
||||
@@ -3910,7 +3910,7 @@ peacefuls_respond(struct monst *mtmp)
|
||||
where mtmp was already hostile; it checks for situations where the player
|
||||
shouldn't be attacking and any ramifications /that/ might have. */
|
||||
void
|
||||
setmangry(struct monst* mtmp, boolean via_attack)
|
||||
setmangry(struct monst *mtmp, boolean via_attack)
|
||||
{
|
||||
if (via_attack && sengr_at("Elbereth", u.ux, u.uy, TRUE)
|
||||
/* only hypocritical if monster is vulnerable to Elbereth (or
|
||||
@@ -3977,7 +3977,7 @@ wake_msg(struct monst *mtmp, boolean interesting)
|
||||
|
||||
/* wake up a monster, possibly making it angry in the process */
|
||||
void
|
||||
wakeup(struct monst* mtmp, boolean via_attack)
|
||||
wakeup(struct monst *mtmp, boolean via_attack)
|
||||
{
|
||||
boolean was_sleeping = mtmp->msleeping;
|
||||
|
||||
@@ -4047,7 +4047,7 @@ wake_nearto(coordxy x, coordxy y, int distance)
|
||||
|
||||
/* NOTE: we must check for mimicry before calling this routine */
|
||||
void
|
||||
seemimic(struct monst* mtmp)
|
||||
seemimic(struct monst *mtmp)
|
||||
{
|
||||
boolean is_blocker_appear = (is_lightblocker_mappear(mtmp));
|
||||
|
||||
@@ -4395,7 +4395,7 @@ hideunder(struct monst *mtmp)
|
||||
|
||||
/* called when returning to a previously visited level */
|
||||
void
|
||||
hide_monst(struct monst* mon)
|
||||
hide_monst(struct monst *mon)
|
||||
{
|
||||
boolean hider_under = hides_under(mon->data) || mon->data->mlet == S_EEL;
|
||||
|
||||
@@ -4566,7 +4566,7 @@ pickvampshape(struct monst *mon)
|
||||
|
||||
/* nonshapechangers who warrant special polymorph handling */
|
||||
static boolean
|
||||
isspecmon(struct monst* mon)
|
||||
isspecmon(struct monst *mon)
|
||||
{
|
||||
return (mon->isshk || mon->ispriest || mon->isgd
|
||||
|| mon->m_id == gq.quest_status.leader_m_id);
|
||||
@@ -4576,7 +4576,7 @@ isspecmon(struct monst* mon)
|
||||
vault guards) to forms that allow them to behave sensibly (catching
|
||||
gold, speaking?) so that they don't need too much extra code */
|
||||
static boolean
|
||||
validspecmon(struct monst* mon, int mndx)
|
||||
validspecmon(struct monst *mon, int mndx)
|
||||
{
|
||||
if (mndx == NON_PM)
|
||||
return TRUE; /* caller wants random */
|
||||
@@ -4611,7 +4611,7 @@ valid_vampshiftform(int base, int form)
|
||||
/* prevent wizard mode user from specifying invalid vampshifter shape
|
||||
when using monpolycontrol to assign a new form to a vampshifter */
|
||||
boolean
|
||||
validvamp(struct monst* mon, int* mndx_p, int monclass)
|
||||
validvamp(struct monst *mon, int *mndx_p, int monclass)
|
||||
{
|
||||
/* simplify caller's usage */
|
||||
if (!is_vampshifter(mon))
|
||||
@@ -4739,7 +4739,7 @@ wiz_force_cham_form(struct monst *mon)
|
||||
}
|
||||
|
||||
int
|
||||
select_newcham_form(struct monst* mon)
|
||||
select_newcham_form(struct monst *mon)
|
||||
{
|
||||
int mndx = NON_PM, tryct;
|
||||
|
||||
@@ -5169,7 +5169,7 @@ dead_species(int m_idx, boolean egg)
|
||||
|
||||
/* kill off any eggs of genocided monsters */
|
||||
static void
|
||||
kill_eggs(struct obj* obj_list)
|
||||
kill_eggs(struct obj *obj_list)
|
||||
{
|
||||
struct obj *otmp;
|
||||
|
||||
@@ -5240,7 +5240,7 @@ kill_genocided_monsters(void)
|
||||
}
|
||||
|
||||
void
|
||||
golemeffects(struct monst* mon, int damtype, int dam)
|
||||
golemeffects(struct monst *mon, int damtype, int dam)
|
||||
{
|
||||
int heal = 0, slow = 0;
|
||||
|
||||
@@ -5339,7 +5339,7 @@ pacify_guards(void)
|
||||
}
|
||||
|
||||
void
|
||||
mimic_hit_msg(struct monst* mtmp, short otyp)
|
||||
mimic_hit_msg(struct monst *mtmp, short otyp)
|
||||
{
|
||||
short ap = mtmp->mappearance;
|
||||
|
||||
@@ -5359,7 +5359,7 @@ mimic_hit_msg(struct monst* mtmp, short otyp)
|
||||
}
|
||||
|
||||
boolean
|
||||
usmellmon(struct permonst* mdat)
|
||||
usmellmon(struct permonst *mdat)
|
||||
{
|
||||
int mndx;
|
||||
boolean nonspecific = FALSE;
|
||||
|
||||
@@ -102,7 +102,7 @@ monhaskey(
|
||||
}
|
||||
|
||||
void
|
||||
mon_yells(struct monst* mon, const char* shout)
|
||||
mon_yells(struct monst *mon, const char *shout)
|
||||
{
|
||||
if (Deaf) {
|
||||
if (canspotmon(mon))
|
||||
@@ -158,7 +158,7 @@ m_break_boulder(struct monst *mtmp, coordxy x, coordxy y)
|
||||
}
|
||||
|
||||
static void
|
||||
watch_on_duty(struct monst* mtmp)
|
||||
watch_on_duty(struct monst *mtmp)
|
||||
{
|
||||
coordxy x, y;
|
||||
|
||||
@@ -366,7 +366,7 @@ find_pmmonst(int pm)
|
||||
will eat it if there is no queen bee on the level; return 1: mon died,
|
||||
0: mon ate jelly and lived; -1: mon didn't eat jelly to use its move */
|
||||
int
|
||||
bee_eat_jelly(struct monst* mon, struct obj* obj)
|
||||
bee_eat_jelly(struct monst *mon, struct obj *obj)
|
||||
{
|
||||
int m_delay;
|
||||
struct monst *mtmp = find_pmmonst(PM_QUEEN_BEE);
|
||||
@@ -519,7 +519,7 @@ distfleeck(
|
||||
/* perform a special one-time action for a monster; returns -1 if nothing
|
||||
special happened, 0 if monster uses up its turn, 1 if monster is killed */
|
||||
static int
|
||||
m_arrival(struct monst* mon)
|
||||
m_arrival(struct monst *mon)
|
||||
{
|
||||
mon->mstrategy &= ~STRAT_ARRIVE; /* always reset */
|
||||
|
||||
@@ -528,7 +528,7 @@ m_arrival(struct monst* mon)
|
||||
|
||||
/* a mind flayer unleashes a mind blast */
|
||||
static void
|
||||
mind_blast(struct monst* mtmp)
|
||||
mind_blast(struct monst *mtmp)
|
||||
{
|
||||
struct monst *m2, *nmon = (struct monst *) 0;
|
||||
|
||||
@@ -597,7 +597,7 @@ mind_blast(struct monst* mtmp)
|
||||
* code. --KAA
|
||||
*/
|
||||
int
|
||||
dochug(struct monst* mtmp)
|
||||
dochug(struct monst *mtmp)
|
||||
{
|
||||
struct permonst *mdat;
|
||||
int status = MMOVE_NOTHING;
|
||||
@@ -964,7 +964,7 @@ mon_would_consume_item(struct monst *mtmp, struct obj *otmp)
|
||||
}
|
||||
|
||||
boolean
|
||||
itsstuck(struct monst* mtmp)
|
||||
itsstuck(struct monst *mtmp)
|
||||
{
|
||||
if (sticks(gy.youmonst.data) && mtmp == u.ustuck && !u.uswallow) {
|
||||
pline("%s cannot escape from you!", Monnam(mtmp));
|
||||
@@ -1088,7 +1088,7 @@ leppie_stash(struct monst *mtmp)
|
||||
|
||||
/* does monster want to avoid you? */
|
||||
static boolean
|
||||
m_balks_at_approaching(struct monst* mtmp)
|
||||
m_balks_at_approaching(struct monst *mtmp)
|
||||
{
|
||||
/* peaceful, far away, or can't see you */
|
||||
if (mtmp->mpeaceful
|
||||
@@ -2156,7 +2156,7 @@ undesirable_disp(
|
||||
* Used by can_ooze() and can_fog().
|
||||
*/
|
||||
static boolean
|
||||
stuff_prevents_passage(struct monst* mtmp)
|
||||
stuff_prevents_passage(struct monst *mtmp)
|
||||
{
|
||||
struct obj *chain, *obj;
|
||||
|
||||
@@ -2193,7 +2193,7 @@ stuff_prevents_passage(struct monst* mtmp)
|
||||
}
|
||||
|
||||
boolean
|
||||
can_ooze(struct monst* mtmp)
|
||||
can_ooze(struct monst *mtmp)
|
||||
{
|
||||
if (!amorphous(mtmp->data) || stuff_prevents_passage(mtmp))
|
||||
return FALSE;
|
||||
@@ -2202,7 +2202,7 @@ can_ooze(struct monst* mtmp)
|
||||
|
||||
/* monster can change form into a fog if necessary */
|
||||
boolean
|
||||
can_fog(struct monst* mtmp)
|
||||
can_fog(struct monst *mtmp)
|
||||
{
|
||||
if (!(gm.mvitals[PM_FOG_CLOUD].mvflags & G_GENOD) && is_vampshifter(mtmp)
|
||||
&& !Protection_from_shape_changers && !stuff_prevents_passage(mtmp))
|
||||
|
||||
@@ -92,7 +92,7 @@ get_mplname(struct monst* mtmp, char *nam)
|
||||
}
|
||||
|
||||
static void
|
||||
mk_mplayer_armor(struct monst* mon, short typ)
|
||||
mk_mplayer_armor(struct monst *mon, short typ)
|
||||
{
|
||||
struct obj *obj;
|
||||
|
||||
@@ -351,7 +351,7 @@ create_mplayers(int num, boolean special)
|
||||
}
|
||||
|
||||
void
|
||||
mplayer_talk(struct monst* mtmp)
|
||||
mplayer_talk(struct monst *mtmp)
|
||||
{
|
||||
static const char
|
||||
*same_class_msg[3] = {
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
static int monmulti(struct monst *, struct obj *, struct obj *);
|
||||
static void monshoot(struct monst *, struct obj *, struct obj *);
|
||||
static boolean ucatchgem(struct obj *, struct monst *);
|
||||
static const char* breathwep_name(int);
|
||||
static const char *breathwep_name(int);
|
||||
static boolean drop_throw(struct obj *, boolean, coordxy, coordxy);
|
||||
static boolean blocking_terrain(coordxy, coordxy);
|
||||
static int m_lined_up(struct monst *, struct monst *) NONNULLARG12;
|
||||
@@ -53,7 +53,7 @@ rnd_hallublast(void)
|
||||
}
|
||||
|
||||
boolean
|
||||
m_has_launcher_and_ammo(struct monst* mtmp)
|
||||
m_has_launcher_and_ammo(struct monst *mtmp)
|
||||
{
|
||||
struct obj *mwep = MON_WEP(mtmp);
|
||||
|
||||
@@ -196,7 +196,7 @@ drop_throw(
|
||||
/* calculate multishot volley count for mtmp throwing otmp (if not ammo) or
|
||||
shooting otmp with mwep (if otmp is ammo and mwep appropriate launcher) */
|
||||
static int
|
||||
monmulti(struct monst* mtmp, struct obj* otmp, struct obj* mwep)
|
||||
monmulti(struct monst *mtmp, struct obj *otmp, struct obj *mwep)
|
||||
{
|
||||
int multishot = 1;
|
||||
|
||||
@@ -255,7 +255,7 @@ monmulti(struct monst* mtmp, struct obj* otmp, struct obj* mwep)
|
||||
|
||||
/* mtmp throws otmp, or shoots otmp with mwep, at hero or at monster mtarg */
|
||||
static void
|
||||
monshoot(struct monst* mtmp, struct obj* otmp, struct obj* mwep)
|
||||
monshoot(struct monst *mtmp, struct obj *otmp, struct obj *mwep)
|
||||
{
|
||||
struct monst *mtarg = gm.mtarget;
|
||||
int dm = distmin(mtmp->mx, mtmp->my,
|
||||
@@ -776,7 +776,7 @@ m_throw(
|
||||
|
||||
/* Monster throws item at another monster */
|
||||
int
|
||||
thrwmm(struct monst* mtmp, struct monst* mtarg)
|
||||
thrwmm(struct monst *mtmp, struct monst *mtarg)
|
||||
{
|
||||
struct obj *otmp, *mwep;
|
||||
coordxy x, y;
|
||||
@@ -823,7 +823,7 @@ thrwmm(struct monst* mtmp, struct monst* mtarg)
|
||||
|
||||
/* monster spits substance at monster */
|
||||
int
|
||||
spitmm(struct monst* mtmp, struct attack* mattk, struct monst* mtarg)
|
||||
spitmm(struct monst *mtmp, struct attack *mattk, struct monst *mtarg)
|
||||
{
|
||||
struct obj *otmp;
|
||||
|
||||
@@ -899,7 +899,7 @@ breathwep_name(int typ)
|
||||
|
||||
/* monster breathes at monster (ranged) */
|
||||
int
|
||||
breamm(struct monst* mtmp, struct attack* mattk, struct monst* mtarg)
|
||||
breamm(struct monst *mtmp, struct attack *mattk, struct monst *mtarg)
|
||||
{
|
||||
int typ = get_atkdam_type(mattk->adtyp);
|
||||
|
||||
@@ -960,7 +960,7 @@ breamm(struct monst* mtmp, struct attack* mattk, struct monst* mtarg)
|
||||
|
||||
/* remove an entire item from a monster's inventory; destroy that item */
|
||||
void
|
||||
m_useupall(struct monst* mon, struct obj* obj)
|
||||
m_useupall(struct monst *mon, struct obj *obj)
|
||||
{
|
||||
extract_from_minvent(mon, obj, TRUE, FALSE);
|
||||
obfree(obj, (struct obj *) 0);
|
||||
@@ -968,7 +968,7 @@ m_useupall(struct monst* mon, struct obj* obj)
|
||||
|
||||
/* remove one instance of an item from a monster's inventory */
|
||||
void
|
||||
m_useup(struct monst* mon, struct obj* obj)
|
||||
m_useup(struct monst *mon, struct obj *obj)
|
||||
{
|
||||
if (obj->quan > 1L) {
|
||||
obj->quan--;
|
||||
@@ -980,7 +980,7 @@ m_useup(struct monst* mon, struct obj* obj)
|
||||
|
||||
/* monster attempts ranged weapon attack against player */
|
||||
void
|
||||
thrwmu(struct monst* mtmp)
|
||||
thrwmu(struct monst *mtmp)
|
||||
{
|
||||
struct obj *otmp, *mwep;
|
||||
coordxy x, y;
|
||||
@@ -1065,14 +1065,14 @@ thrwmu(struct monst* mtmp)
|
||||
|
||||
/* monster spits substance at you */
|
||||
int
|
||||
spitmu(struct monst* mtmp, struct attack* mattk)
|
||||
spitmu(struct monst *mtmp, struct attack *mattk)
|
||||
{
|
||||
return spitmm(mtmp, mattk, &gy.youmonst);
|
||||
}
|
||||
|
||||
/* monster breathes at you (ranged) */
|
||||
int
|
||||
breamu(struct monst* mtmp, struct attack* mattk)
|
||||
breamu(struct monst *mtmp, struct attack *mattk)
|
||||
{
|
||||
return breamm(mtmp, mattk, &gy.youmonst);
|
||||
}
|
||||
@@ -1173,7 +1173,7 @@ linedup(
|
||||
}
|
||||
|
||||
static int
|
||||
m_lined_up(struct monst* mtarg, struct monst* mtmp)
|
||||
m_lined_up(struct monst *mtarg, struct monst *mtmp)
|
||||
{
|
||||
boolean utarget = (mtarg == &gy.youmonst);
|
||||
coordxy tx = utarget ? mtmp->mux : mtarg->mx;
|
||||
@@ -1195,7 +1195,7 @@ m_lined_up(struct monst* mtarg, struct monst* mtmp)
|
||||
|
||||
/* is mtmp in position to use ranged attack on hero? */
|
||||
boolean
|
||||
lined_up(struct monst* mtmp)
|
||||
lined_up(struct monst *mtmp)
|
||||
{
|
||||
return m_lined_up(&gy.youmonst, mtmp) ? TRUE : FALSE;
|
||||
}
|
||||
|
||||
@@ -481,7 +481,7 @@ const char *beats[] = {
|
||||
* The player is trying to extract something from his/her instrument.
|
||||
*/
|
||||
static int
|
||||
do_improvisation(struct obj* instr)
|
||||
do_improvisation(struct obj *instr)
|
||||
{
|
||||
int damage, mode, do_spec = !(Stunned || Confusion);
|
||||
struct obj itmp;
|
||||
@@ -736,7 +736,7 @@ improvised_notes(boolean *same_as_last_time)
|
||||
* So you want music...
|
||||
*/
|
||||
int
|
||||
do_play_instrument(struct obj* instr)
|
||||
do_play_instrument(struct obj *instr)
|
||||
{
|
||||
char buf[BUFSZ] = DUMMY, c = 'y';
|
||||
char *s;
|
||||
|
||||
@@ -49,7 +49,7 @@ shuffle_tiles(void)
|
||||
#endif /* TILES_IN_GLYPHMAP */
|
||||
|
||||
static void
|
||||
setgemprobs(d_level* dlev)
|
||||
setgemprobs(d_level *dlev)
|
||||
{
|
||||
int j, first, lev, sum = 0;
|
||||
|
||||
@@ -365,7 +365,7 @@ oinit(void)
|
||||
}
|
||||
|
||||
void
|
||||
savenames(NHFILE* nhfp)
|
||||
savenames(NHFILE *nhfp)
|
||||
{
|
||||
int i;
|
||||
unsigned int len;
|
||||
@@ -398,7 +398,7 @@ savenames(NHFILE* nhfp)
|
||||
}
|
||||
|
||||
void
|
||||
restnames(NHFILE* nhfp)
|
||||
restnames(NHFILE *nhfp)
|
||||
{
|
||||
int i;
|
||||
unsigned int len = 0;
|
||||
|
||||
24
src/objnam.c
24
src/objnam.c
@@ -321,7 +321,7 @@ safe_typename(int otyp)
|
||||
}
|
||||
|
||||
boolean
|
||||
obj_is_pname(struct obj* obj)
|
||||
obj_is_pname(struct obj *obj)
|
||||
{
|
||||
if (!obj->oartifact || !has_oname(obj))
|
||||
return FALSE;
|
||||
@@ -1687,21 +1687,21 @@ doname_base(
|
||||
}
|
||||
|
||||
char *
|
||||
doname(struct obj* obj)
|
||||
doname(struct obj *obj)
|
||||
{
|
||||
return doname_base(obj, (unsigned) 0);
|
||||
}
|
||||
|
||||
/* Name of object including price. */
|
||||
char *
|
||||
doname_with_price(struct obj* obj)
|
||||
doname_with_price(struct obj *obj)
|
||||
{
|
||||
return doname_base(obj, DONAME_WITH_PRICE);
|
||||
}
|
||||
|
||||
/* "some" instead of precise quantity if obj->dknown not set */
|
||||
char *
|
||||
doname_vague_quan(struct obj* obj)
|
||||
doname_vague_quan(struct obj *obj)
|
||||
{
|
||||
/* Used by farlook.
|
||||
* If it hasn't been seen up close and quantity is more than one,
|
||||
@@ -1720,7 +1720,7 @@ doname_vague_quan(struct obj* obj)
|
||||
|
||||
/* used from invent.c */
|
||||
boolean
|
||||
not_fully_identified(struct obj* otmp)
|
||||
not_fully_identified(struct obj *otmp)
|
||||
{
|
||||
/* gold doesn't have any interesting attributes [yet?] */
|
||||
if (otmp->oclass == COIN_CLASS)
|
||||
@@ -1857,7 +1857,7 @@ corpse_xname(
|
||||
|
||||
/* xname doesn't include monster type for "corpse"; cxname does */
|
||||
char *
|
||||
cxname(struct obj* obj)
|
||||
cxname(struct obj *obj)
|
||||
{
|
||||
if (obj->otyp == CORPSE)
|
||||
return corpse_xname(obj, (const char *) 0, CXN_NORMAL);
|
||||
@@ -1866,7 +1866,7 @@ cxname(struct obj* obj)
|
||||
|
||||
/* like cxname, but ignores quantity */
|
||||
char *
|
||||
cxname_singular(struct obj* obj)
|
||||
cxname_singular(struct obj *obj)
|
||||
{
|
||||
if (obj->otyp == CORPSE)
|
||||
return corpse_xname(obj, (const char *) 0, CXN_SINGULAR);
|
||||
@@ -1875,7 +1875,7 @@ cxname_singular(struct obj* obj)
|
||||
|
||||
/* treat an object as fully ID'd when it might be used as reason for death */
|
||||
char *
|
||||
killer_xname(struct obj* obj)
|
||||
killer_xname(struct obj *obj)
|
||||
{
|
||||
struct obj save_obj;
|
||||
unsigned save_ocknown;
|
||||
@@ -2023,7 +2023,7 @@ short_oname(
|
||||
* Used if only one of a collection of objects is named (e.g. in eat.c).
|
||||
*/
|
||||
const char *
|
||||
singular(struct obj* otmp, char* (*func)(OBJ_P))
|
||||
singular(struct obj *otmp, char *(*func)(OBJ_P))
|
||||
{
|
||||
long savequan;
|
||||
char *nam;
|
||||
@@ -2103,7 +2103,7 @@ An(const char *str)
|
||||
* Use type_is_pname() for monster names, not the(). the() is idempotent.
|
||||
*/
|
||||
char *
|
||||
the(const char* str)
|
||||
the(const char *str)
|
||||
{
|
||||
const char *aname;
|
||||
char *buf = nextobuf();
|
||||
@@ -2725,7 +2725,7 @@ singplur_compound(char *str)
|
||||
* 3.6.0: made case-insensitive.
|
||||
*/
|
||||
char *
|
||||
makeplural(const char* oldstr)
|
||||
makeplural(const char *oldstr)
|
||||
{
|
||||
char *spot;
|
||||
char lo_c, *str = nextobuf();
|
||||
@@ -2926,7 +2926,7 @@ makeplural(const char* oldstr)
|
||||
* 3.6.0: made case-insensitive.
|
||||
*/
|
||||
char *
|
||||
makesingular(const char* oldstr)
|
||||
makesingular(const char *oldstr)
|
||||
{
|
||||
char *p, *bp;
|
||||
const char *excess = 0;
|
||||
|
||||
28
src/read.c
28
src/read.c
@@ -65,7 +65,7 @@ learnscrolltyp(short scrolltyp)
|
||||
|
||||
/* also called from teleport.c for scroll of teleportation */
|
||||
void
|
||||
learnscroll(struct obj* sobj)
|
||||
learnscroll(struct obj *sobj)
|
||||
{
|
||||
/* it's implied that sobj->dknown is set;
|
||||
we couldn't be reading this scroll otherwise */
|
||||
@@ -75,7 +75,7 @@ learnscroll(struct obj* sobj)
|
||||
|
||||
/* max spe is +99, min is -99 */
|
||||
static void
|
||||
cap_spe(struct obj* obj)
|
||||
cap_spe(struct obj *obj)
|
||||
{
|
||||
if (obj) {
|
||||
if (abs(obj->spe) > SPE_LIM)
|
||||
@@ -84,7 +84,7 @@ cap_spe(struct obj* obj)
|
||||
}
|
||||
|
||||
static char *
|
||||
erode_obj_text(struct obj* otmp, char* buf)
|
||||
erode_obj_text(struct obj *otmp, char *buf)
|
||||
{
|
||||
int erosion = greatest_erosion(otmp);
|
||||
|
||||
@@ -95,7 +95,7 @@ erode_obj_text(struct obj* otmp, char* buf)
|
||||
}
|
||||
|
||||
char *
|
||||
tshirt_text(struct obj* tshirt, char* buf)
|
||||
tshirt_text(struct obj *tshirt, char *buf)
|
||||
{
|
||||
static const char *const shirt_msgs[] = {
|
||||
/* Scott Bigham */
|
||||
@@ -248,7 +248,7 @@ hawaiian_design(struct obj *shirt, char *buf)
|
||||
}
|
||||
|
||||
char *
|
||||
apron_text(struct obj* apron, char* buf)
|
||||
apron_text(struct obj *apron, char *buf)
|
||||
{
|
||||
static const char *const apron_msgs[] = {
|
||||
"Kiss the cook",
|
||||
@@ -290,7 +290,7 @@ static const char *const candy_wrappers[] = {
|
||||
|
||||
/* return the text of a candy bar's wrapper */
|
||||
const char *
|
||||
candy_wrapper_text(struct obj* obj)
|
||||
candy_wrapper_text(struct obj *obj)
|
||||
{
|
||||
/* modulo operation is just bullet proofing; 'spe' is already in range */
|
||||
return candy_wrappers[obj->spe % SIZE(candy_wrappers)];
|
||||
@@ -298,7 +298,7 @@ candy_wrapper_text(struct obj* obj)
|
||||
|
||||
/* assign a wrapper to a candy bar stack */
|
||||
void
|
||||
assign_candy_wrapper(struct obj* obj)
|
||||
assign_candy_wrapper(struct obj *obj)
|
||||
{
|
||||
if (obj->otyp == CANDY_BAR) {
|
||||
/* skips candy_wrappers[0] */
|
||||
@@ -309,7 +309,7 @@ assign_candy_wrapper(struct obj* obj)
|
||||
|
||||
/* getobj callback for object to read */
|
||||
static int
|
||||
read_ok(struct obj* obj)
|
||||
read_ok(struct obj *obj)
|
||||
{
|
||||
if (!obj)
|
||||
return GETOBJ_EXCLUDE;
|
||||
@@ -644,7 +644,7 @@ doread(void)
|
||||
RESTORE_WARNING_FORMAT_NONLITERAL
|
||||
|
||||
static void
|
||||
stripspe(struct obj* obj)
|
||||
stripspe(struct obj *obj)
|
||||
{
|
||||
if (obj->blessed || obj->spe <= 0) {
|
||||
pline1(nothing_happens);
|
||||
@@ -659,13 +659,13 @@ stripspe(struct obj* obj)
|
||||
}
|
||||
|
||||
static void
|
||||
p_glow1(struct obj* otmp)
|
||||
p_glow1(struct obj *otmp)
|
||||
{
|
||||
pline("%s briefly.", Yobjnam2(otmp, Blind ? "vibrate" : "glow"));
|
||||
}
|
||||
|
||||
static void
|
||||
p_glow2(struct obj* otmp, const char* color)
|
||||
p_glow2(struct obj *otmp, const char *color)
|
||||
{
|
||||
pline("%s%s%s for a moment.", Yobjnam2(otmp, Blind ? "vibrate" : "glow"),
|
||||
Blind ? "" : " ", Blind ? "" : hcolor(color));
|
||||
@@ -673,7 +673,7 @@ p_glow2(struct obj* otmp, const char* color)
|
||||
|
||||
/* getobj callback for object to charge */
|
||||
int
|
||||
charge_ok(struct obj* obj)
|
||||
charge_ok(struct obj *obj)
|
||||
{
|
||||
if (!obj)
|
||||
return GETOBJ_EXCLUDE;
|
||||
@@ -713,7 +713,7 @@ charge_ok(struct obj* obj)
|
||||
/* recharge an object; curse_bless is -1 if the recharging implement
|
||||
was cursed, +1 if blessed, 0 otherwise. */
|
||||
void
|
||||
recharge(struct obj* obj, int curse_bless)
|
||||
recharge(struct obj *obj, int curse_bless)
|
||||
{
|
||||
int n;
|
||||
boolean is_cursed, is_blessed;
|
||||
@@ -2882,7 +2882,7 @@ do_genocide(
|
||||
}
|
||||
|
||||
void
|
||||
punish(struct obj* sobj)
|
||||
punish(struct obj *sobj)
|
||||
{
|
||||
/* angrygods() calls this with NULL sobj arg */
|
||||
struct obj *reuse_ball = (sobj && sobj->otyp == HEAVY_IRON_BALL)
|
||||
|
||||
12
src/rect.c
12
src/rect.c
@@ -56,7 +56,7 @@ free_rect(void)
|
||||
*/
|
||||
|
||||
int
|
||||
get_rect_ind(NhRect* r)
|
||||
get_rect_ind(NhRect *r)
|
||||
{
|
||||
NhRect *rectp;
|
||||
int lx, ly, hx, hy;
|
||||
@@ -78,7 +78,7 @@ get_rect_ind(NhRect* r)
|
||||
*/
|
||||
|
||||
NhRect *
|
||||
get_rect(NhRect* r)
|
||||
get_rect(NhRect *r)
|
||||
{
|
||||
NhRect *rectp;
|
||||
int lx, ly, hx, hy;
|
||||
@@ -112,7 +112,7 @@ rnd_rect(void)
|
||||
*/
|
||||
|
||||
static boolean
|
||||
intersect(NhRect* r1, NhRect* r2, NhRect* r3)
|
||||
intersect(NhRect *r1, NhRect *r2, NhRect *r3)
|
||||
{
|
||||
if (r2->lx > r1->hx || r2->ly > r1->hy || r2->hx < r1->lx
|
||||
|| r2->hy < r1->ly)
|
||||
@@ -143,7 +143,7 @@ rect_bounds(NhRect r1, NhRect r2, NhRect *r3)
|
||||
*/
|
||||
|
||||
void
|
||||
remove_rect(NhRect* r)
|
||||
remove_rect(NhRect *r)
|
||||
{
|
||||
int ind;
|
||||
|
||||
@@ -157,7 +157,7 @@ remove_rect(NhRect* r)
|
||||
*/
|
||||
|
||||
void
|
||||
add_rect(NhRect* r)
|
||||
add_rect(NhRect *r)
|
||||
{
|
||||
if (rect_cnt >= n_rects) {
|
||||
impossible("n_rects may be too small.");
|
||||
@@ -178,7 +178,7 @@ add_rect(NhRect* r)
|
||||
*/
|
||||
|
||||
void
|
||||
split_rects(NhRect* r1, NhRect* r2)
|
||||
split_rects(NhRect *r1, NhRect *r2)
|
||||
{
|
||||
NhRect r, old_r;
|
||||
int i;
|
||||
|
||||
@@ -2106,7 +2106,7 @@ role_init(void)
|
||||
}
|
||||
|
||||
const char *
|
||||
Hello(struct monst* mtmp)
|
||||
Hello(struct monst *mtmp)
|
||||
{
|
||||
switch (Role_switch) {
|
||||
case PM_KNIGHT:
|
||||
|
||||
48
src/shk.c
48
src/shk.c
@@ -105,7 +105,7 @@ static const char *const angrytexts[] = {
|
||||
* if the monster kept the change.
|
||||
*/
|
||||
long
|
||||
money2mon(struct monst* mon, long amount)
|
||||
money2mon(struct monst *mon, long amount)
|
||||
{
|
||||
struct obj *ygold = findgold(gi.invent);
|
||||
|
||||
@@ -134,7 +134,7 @@ money2mon(struct monst* mon, long amount)
|
||||
* the priest gives you money for an ale.
|
||||
*/
|
||||
void
|
||||
money2u(struct monst* mon, long amount)
|
||||
money2u(struct monst *mon, long amount)
|
||||
{
|
||||
struct obj *mongold = findgold(mon->minvent);
|
||||
|
||||
@@ -565,7 +565,7 @@ remote_burglary(coordxy x, coordxy y)
|
||||
/* shop merchandise has been taken; pay for it with any credit available;
|
||||
return false if the debt is fully covered by credit, true otherwise */
|
||||
static boolean
|
||||
rob_shop(struct monst* shkp)
|
||||
rob_shop(struct monst *shkp)
|
||||
{
|
||||
struct eshk *eshkp;
|
||||
long total;
|
||||
@@ -601,7 +601,7 @@ rob_shop(struct monst* shkp)
|
||||
|
||||
/* give a message when entering an untended shop (caller has verified that) */
|
||||
static void
|
||||
deserted_shop(/*const*/ char* enterstring)
|
||||
deserted_shop(/*const*/ char *enterstring)
|
||||
{
|
||||
struct monst *mtmp;
|
||||
struct mkroom *r = &gr.rooms[(int) *enterstring - ROOMOFFSET];
|
||||
@@ -799,7 +799,7 @@ u_entered_shop(char *enterstring)
|
||||
|
||||
/* called when removing a pick-axe or mattock from a container */
|
||||
void
|
||||
pick_pick(struct obj* obj)
|
||||
pick_pick(struct obj *obj)
|
||||
{
|
||||
struct monst *shkp;
|
||||
|
||||
@@ -833,7 +833,7 @@ pick_pick(struct obj* obj)
|
||||
quoted by the shopkeeper and also that they both belong to the same shk.
|
||||
*/
|
||||
boolean
|
||||
same_price(struct obj* obj1, struct obj* obj2)
|
||||
same_price(struct obj *obj1, struct obj *obj2)
|
||||
{
|
||||
struct monst *shkp1, *shkp2;
|
||||
struct bill_x *bp1 = 0, *bp2 = 0;
|
||||
@@ -868,7 +868,7 @@ same_price(struct obj* obj1, struct obj* obj2)
|
||||
* level is bones data which has a shk on the warpath.
|
||||
*/
|
||||
static long
|
||||
shop_debt(struct eshk* eshkp)
|
||||
shop_debt(struct eshk *eshkp)
|
||||
{
|
||||
struct bill_x *bp;
|
||||
int ct;
|
||||
@@ -1035,7 +1035,7 @@ onshopbill(struct obj *obj, struct monst *shkp, boolean silent)
|
||||
|
||||
/* check whether an object or any of its contents belongs to a shop */
|
||||
boolean
|
||||
is_unpaid(struct obj* obj)
|
||||
is_unpaid(struct obj *obj)
|
||||
{
|
||||
return (boolean) (obj->unpaid
|
||||
|| (Has_contents(obj) && count_unpaid(obj->cobj)));
|
||||
@@ -1043,7 +1043,7 @@ is_unpaid(struct obj* obj)
|
||||
|
||||
/* Delete the contents of the given object. */
|
||||
void
|
||||
delete_contents(struct obj* obj)
|
||||
delete_contents(struct obj *obj)
|
||||
{
|
||||
struct obj *curr;
|
||||
|
||||
@@ -1055,7 +1055,7 @@ delete_contents(struct obj* obj)
|
||||
|
||||
/* called with two args on merge */
|
||||
void
|
||||
obfree(struct obj* obj, struct obj* merge)
|
||||
obfree(struct obj *obj, struct obj *merge)
|
||||
{
|
||||
struct bill_x *bp;
|
||||
struct bill_x *bpm;
|
||||
@@ -1151,7 +1151,7 @@ obfree(struct obj* obj, struct obj* merge)
|
||||
}
|
||||
|
||||
static long
|
||||
check_credit(long tmp, struct monst* shkp)
|
||||
check_credit(long tmp, struct monst *shkp)
|
||||
{
|
||||
long credit = ESHK(shkp)->credit;
|
||||
|
||||
@@ -1170,7 +1170,7 @@ check_credit(long tmp, struct monst* shkp)
|
||||
}
|
||||
|
||||
static void
|
||||
pay(long tmp, struct monst* shkp)
|
||||
pay(long tmp, struct monst *shkp)
|
||||
{
|
||||
long robbed = ESHK(shkp)->robbed;
|
||||
long balance = ((tmp <= 0L) ? tmp : check_credit(tmp, shkp));
|
||||
@@ -2296,7 +2296,7 @@ get_cost_of_shop_item(
|
||||
}
|
||||
|
||||
static long
|
||||
get_pricing_units(struct obj* obj)
|
||||
get_pricing_units(struct obj *obj)
|
||||
{
|
||||
long units = obj->quan;
|
||||
|
||||
@@ -2314,7 +2314,7 @@ get_pricing_units(struct obj* obj)
|
||||
/* decide whether to apply a surcharge (or hypothetically, a discount) to obj
|
||||
if it had ID number 'oid'; returns 1: increase, 0: normal, -1: decrease */
|
||||
int
|
||||
oid_price_adjustment(struct obj* obj, unsigned int oid)
|
||||
oid_price_adjustment(struct obj *obj, unsigned int oid)
|
||||
{
|
||||
int res = 0, otyp = obj->otyp;
|
||||
|
||||
@@ -2528,7 +2528,7 @@ dropped_container(
|
||||
}
|
||||
|
||||
void
|
||||
picked_container(struct obj* obj)
|
||||
picked_container(struct obj *obj)
|
||||
{
|
||||
struct obj *otmp;
|
||||
|
||||
@@ -2591,7 +2591,7 @@ special_stock(
|
||||
|
||||
/* calculate how much the shk will pay when buying [all of] an object */
|
||||
static long
|
||||
set_cost(struct obj* obj, struct monst* shkp)
|
||||
set_cost(struct obj *obj, struct monst *shkp)
|
||||
{
|
||||
long tmp, unit_price = getprice(obj, TRUE), multiplier = 1L, divisor = 1L;
|
||||
|
||||
@@ -2794,7 +2794,7 @@ add_one_tobill(struct obj *obj, boolean dummy, struct monst *shkp)
|
||||
}
|
||||
|
||||
static void
|
||||
add_to_billobjs(struct obj* obj)
|
||||
add_to_billobjs(struct obj *obj)
|
||||
{
|
||||
if (obj->where != OBJ_FREE)
|
||||
panic("add_to_billobjs: obj not free");
|
||||
@@ -3126,7 +3126,7 @@ sub_one_frombill(struct obj* obj, struct monst* shkp)
|
||||
|
||||
/* recursive check of unpaid objects within nested containers. */
|
||||
void
|
||||
subfrombill(struct obj* obj, struct monst* shkp)
|
||||
subfrombill(struct obj *obj, struct monst *shkp)
|
||||
{
|
||||
struct obj *otmp;
|
||||
|
||||
@@ -3745,7 +3745,7 @@ corpsenm_price_adj(struct obj *obj)
|
||||
}
|
||||
|
||||
static long
|
||||
getprice(struct obj* obj, boolean shk_buying)
|
||||
getprice(struct obj *obj, boolean shk_buying)
|
||||
{
|
||||
long tmp = (long) objects[obj->otyp].oc_cost;
|
||||
|
||||
@@ -4539,7 +4539,7 @@ shopdig(int fall)
|
||||
}
|
||||
|
||||
static void
|
||||
makekops(coord* mm)
|
||||
makekops(coord *mm)
|
||||
{
|
||||
static const short k_mndx[4] = { PM_KEYSTONE_KOP, PM_KOP_SERGEANT,
|
||||
PM_KOP_LIEUTENANT, PM_KOP_KAPTAIN };
|
||||
@@ -4883,7 +4883,7 @@ price_quote(struct obj *first_obj)
|
||||
}
|
||||
|
||||
static const char *
|
||||
shk_embellish(struct obj* itm, long cost)
|
||||
shk_embellish(struct obj *itm, long cost)
|
||||
{
|
||||
if (!rn2(3)) {
|
||||
int o, choice = rn2(5);
|
||||
@@ -4936,7 +4936,7 @@ const char *Izchak_speaks[] = {
|
||||
};
|
||||
|
||||
void
|
||||
shk_chat(struct monst* shkp)
|
||||
shk_chat(struct monst *shkp)
|
||||
{
|
||||
struct eshk *eshk;
|
||||
long shkmoney;
|
||||
@@ -5103,7 +5103,7 @@ DISABLE_WARNING_FORMAT_NONLITERAL
|
||||
* when an object is completely used.
|
||||
*/
|
||||
void
|
||||
check_unpaid_usage(struct obj* otmp, boolean altusage)
|
||||
check_unpaid_usage(struct obj *otmp, boolean altusage)
|
||||
{
|
||||
struct monst *shkp;
|
||||
const char *fmt, *arg1, *arg2;
|
||||
@@ -5391,7 +5391,7 @@ sasc_bug(struct obj *op, unsigned x)
|
||||
* 4. player_owned glob merging into player_owned glob
|
||||
*/
|
||||
void
|
||||
globby_bill_fixup(struct obj* obj_absorber, struct obj* obj_absorbed)
|
||||
globby_bill_fixup(struct obj *obj_absorber, struct obj *obj_absorbed)
|
||||
{
|
||||
int x = 0, y = 0;
|
||||
struct bill_x *bp, *bp_absorber = (struct bill_x *) 0;
|
||||
|
||||
24
src/shknam.c
24
src/shknam.c
@@ -447,7 +447,7 @@ mkveggy_at(int sx, int sy)
|
||||
|
||||
/* make an object of the appropriate type for a shop square */
|
||||
static void
|
||||
mkshobj_at(const struct shclass* shp, int sx, int sy, boolean mkspecl)
|
||||
mkshobj_at(const struct shclass *shp, int sx, int sy, boolean mkspecl)
|
||||
{
|
||||
struct monst *mtmp;
|
||||
struct permonst *ptr;
|
||||
@@ -480,7 +480,7 @@ mkshobj_at(const struct shclass* shp, int sx, int sy, boolean mkspecl)
|
||||
|
||||
/* extract a shopkeeper name for the given shop type */
|
||||
static void
|
||||
nameshk(struct monst* shk, const char* const* nlp)
|
||||
nameshk(struct monst *shk, const char *const *nlp)
|
||||
{
|
||||
int i, trycnt, names_avail;
|
||||
const char *shname = 0;
|
||||
@@ -550,7 +550,7 @@ nameshk(struct monst* shk, const char* const* nlp)
|
||||
}
|
||||
|
||||
void
|
||||
neweshk(struct monst* mtmp)
|
||||
neweshk(struct monst *mtmp)
|
||||
{
|
||||
if (!mtmp->mextra)
|
||||
mtmp->mextra = newmextra();
|
||||
@@ -561,7 +561,7 @@ neweshk(struct monst* mtmp)
|
||||
}
|
||||
|
||||
void
|
||||
free_eshk(struct monst* mtmp)
|
||||
free_eshk(struct monst *mtmp)
|
||||
{
|
||||
if (mtmp->mextra && ESHK(mtmp)) {
|
||||
free((genericptr_t) ESHK(mtmp));
|
||||
@@ -620,7 +620,7 @@ good_shopdoor(struct mkroom *sroom, coordxy *sx, coordxy *sy)
|
||||
|
||||
/* create a new shopkeeper in the given room */
|
||||
static int
|
||||
shkinit(const struct shclass* shp, struct mkroom* sroom)
|
||||
shkinit(const struct shclass *shp, struct mkroom *sroom)
|
||||
{
|
||||
int sh;
|
||||
coordxy sx, sy;
|
||||
@@ -683,7 +683,7 @@ shkinit(const struct shclass* shp, struct mkroom* sroom)
|
||||
}
|
||||
|
||||
static boolean
|
||||
stock_room_goodpos(struct mkroom* sroom, int rmno, int sh, int sx, int sy)
|
||||
stock_room_goodpos(struct mkroom *sroom, int rmno, int sh, int sx, int sy)
|
||||
{
|
||||
if (sroom->irregular) {
|
||||
if (levl[sx][sy].edge
|
||||
@@ -706,7 +706,7 @@ stock_room_goodpos(struct mkroom* sroom, int rmno, int sh, int sx, int sy)
|
||||
|
||||
/* stock a newly-created room with objects */
|
||||
void
|
||||
stock_room(int shp_indx, struct mkroom* sroom)
|
||||
stock_room(int shp_indx, struct mkroom *sroom)
|
||||
{
|
||||
/*
|
||||
* Someday soon we'll dispatch on the shdist field of shclass to do
|
||||
@@ -793,7 +793,7 @@ stock_room(int shp_indx, struct mkroom* sroom)
|
||||
|
||||
/* does shkp's shop stock this item type? */
|
||||
boolean
|
||||
saleable(struct monst* shkp, struct obj* obj)
|
||||
saleable(struct monst *shkp, struct obj *obj)
|
||||
{
|
||||
int i, shp_indx = ESHK(shkp)->shoptype - SHOPBASE;
|
||||
const struct shclass *shp = &shtypes[shp_indx];
|
||||
@@ -831,7 +831,7 @@ get_shop_item(int type)
|
||||
|
||||
/* version of shkname() for beginning of sentence */
|
||||
char *
|
||||
Shknam(struct monst* mtmp)
|
||||
Shknam(struct monst *mtmp)
|
||||
{
|
||||
char *nam = shkname(mtmp);
|
||||
|
||||
@@ -844,7 +844,7 @@ Shknam(struct monst* mtmp)
|
||||
will yield some other shopkeeper's name (not necessarily one residing
|
||||
in the current game's dungeon, or who keeps same type of shop) */
|
||||
char *
|
||||
shkname(struct monst* mtmp)
|
||||
shkname(struct monst *mtmp)
|
||||
{
|
||||
char *nam;
|
||||
unsigned save_isshk = mtmp->isshk;
|
||||
@@ -888,7 +888,7 @@ shkname(struct monst* mtmp)
|
||||
}
|
||||
|
||||
boolean
|
||||
shkname_is_pname(struct monst* mtmp)
|
||||
shkname_is_pname(struct monst *mtmp)
|
||||
{
|
||||
const char *shknm = ESHK(mtmp)->shknam;
|
||||
|
||||
@@ -896,7 +896,7 @@ shkname_is_pname(struct monst* mtmp)
|
||||
}
|
||||
|
||||
boolean
|
||||
is_izchak(struct monst* shkp, boolean override_hallucination)
|
||||
is_izchak(struct monst *shkp, boolean override_hallucination)
|
||||
{
|
||||
const char *shknm;
|
||||
|
||||
|
||||
24
src/sounds.c
24
src/sounds.c
@@ -17,7 +17,7 @@ static int mon_in_room(struct monst *, int);
|
||||
|
||||
/* this easily could be a macro, but it might overtax dumb compilers */
|
||||
static int
|
||||
mon_in_room(struct monst* mon, int rmtyp)
|
||||
mon_in_room(struct monst *mon, int rmtyp)
|
||||
{
|
||||
int rno = levl[mon->mx][mon->my].roomno;
|
||||
if (rno >= ROOMOFFSET)
|
||||
@@ -346,7 +346,7 @@ static const char *const h_sounds[] = {
|
||||
};
|
||||
|
||||
const char *
|
||||
growl_sound(struct monst* mtmp)
|
||||
growl_sound(struct monst *mtmp)
|
||||
{
|
||||
const char *ret;
|
||||
|
||||
@@ -397,7 +397,7 @@ growl_sound(struct monst* mtmp)
|
||||
|
||||
/* the sounds of a seriously abused pet, including player attacking it */
|
||||
void
|
||||
growl(struct monst* mtmp)
|
||||
growl(struct monst *mtmp)
|
||||
{
|
||||
const char *growl_verb = 0;
|
||||
|
||||
@@ -422,7 +422,7 @@ growl(struct monst* mtmp)
|
||||
|
||||
/* the sounds of mistreated pets */
|
||||
void
|
||||
yelp(struct monst* mtmp)
|
||||
yelp(struct monst *mtmp)
|
||||
{
|
||||
const char *yelp_verb = 0;
|
||||
enum sound_effect_entries se = se_yelp;
|
||||
@@ -474,7 +474,7 @@ yelp(struct monst* mtmp)
|
||||
|
||||
/* the sounds of distressed pets */
|
||||
void
|
||||
whimper(struct monst* mtmp)
|
||||
whimper(struct monst *mtmp)
|
||||
{
|
||||
const char *whimper_verb = 0;
|
||||
enum sound_effect_entries se = se_canine_whine;
|
||||
@@ -514,7 +514,7 @@ whimper(struct monst* mtmp)
|
||||
|
||||
/* pet makes "I'm hungry" noises */
|
||||
void
|
||||
beg(struct monst* mtmp)
|
||||
beg(struct monst *mtmp)
|
||||
{
|
||||
if (helpless(mtmp)
|
||||
|| !(carnivorous(mtmp->data) || herbivorous(mtmp->data)))
|
||||
@@ -541,7 +541,7 @@ beg(struct monst* mtmp)
|
||||
|
||||
/* hero has attacked a peaceful monster within 'mon's view */
|
||||
const char *
|
||||
maybe_gasp(struct monst* mon)
|
||||
maybe_gasp(struct monst *mon)
|
||||
{
|
||||
static const char *const Exclam[] = {
|
||||
"Gasp!", "Uh-oh.", "Oh my!", "What?", "Why?",
|
||||
@@ -675,7 +675,7 @@ mon_is_gecko(struct monst *mon)
|
||||
DISABLE_WARNING_FORMAT_NONLITERAL
|
||||
|
||||
static int /* check calls to this */
|
||||
domonnoise(struct monst* mtmp)
|
||||
domonnoise(struct monst *mtmp)
|
||||
{
|
||||
char verbuf[BUFSZ];
|
||||
const char *pline_msg = 0, /* Monnam(mtmp) will be prepended */
|
||||
@@ -1546,7 +1546,7 @@ char *sounddir = 0; /* set in files.c */
|
||||
|
||||
/* adds a sound file mapping, returns 0 on failure, 1 on success */
|
||||
int
|
||||
add_sound_mapping(const char* mapping)
|
||||
add_sound_mapping(const char *mapping)
|
||||
{
|
||||
char text[256];
|
||||
char filename[256];
|
||||
@@ -1616,7 +1616,7 @@ add_sound_mapping(const char* mapping)
|
||||
}
|
||||
|
||||
static audio_mapping *
|
||||
sound_matches_message(const char* msg)
|
||||
sound_matches_message(const char *msg)
|
||||
{
|
||||
audio_mapping *snd = soundmap;
|
||||
|
||||
@@ -1629,7 +1629,7 @@ sound_matches_message(const char* msg)
|
||||
}
|
||||
|
||||
void
|
||||
play_sound_for_message(const char* msg)
|
||||
play_sound_for_message(const char *msg)
|
||||
{
|
||||
audio_mapping *snd;
|
||||
|
||||
@@ -1646,7 +1646,7 @@ play_sound_for_message(const char* msg)
|
||||
}
|
||||
|
||||
void
|
||||
maybe_play_sound(const char* msg)
|
||||
maybe_play_sound(const char *msg)
|
||||
{
|
||||
audio_mapping *snd;
|
||||
|
||||
|
||||
16
src/spell.c
16
src/spell.c
@@ -121,7 +121,7 @@ spell_let_to_idx(char ilet)
|
||||
|
||||
/* TRUE: book should be destroyed by caller */
|
||||
static boolean
|
||||
cursed_book(struct obj* bp)
|
||||
cursed_book(struct obj *bp)
|
||||
{
|
||||
boolean was_in_use;
|
||||
int lev = objects[bp->otyp].oc_level;
|
||||
@@ -180,7 +180,7 @@ cursed_book(struct obj* bp)
|
||||
|
||||
/* study while confused: returns TRUE if the book is destroyed */
|
||||
static boolean
|
||||
confused_book(struct obj* spellbook)
|
||||
confused_book(struct obj *spellbook)
|
||||
{
|
||||
boolean gone = FALSE;
|
||||
|
||||
@@ -222,7 +222,7 @@ deadbook_pacify_undead(struct monst *mtmp)
|
||||
/* special effects for The Book of the Dead; reading it while blind is
|
||||
allowed so that needs to be taken into account too */
|
||||
static void
|
||||
deadbook(struct obj* book2)
|
||||
deadbook(struct obj *book2)
|
||||
{
|
||||
struct monst *mtmp;
|
||||
coord mm;
|
||||
@@ -448,7 +448,7 @@ learn(void)
|
||||
RESTORE_WARNING_FORMAT_NONLITERAL
|
||||
|
||||
int
|
||||
study_book(struct obj* spellbook)
|
||||
study_book(struct obj *spellbook)
|
||||
{
|
||||
int booktype = spellbook->otyp, i;
|
||||
boolean confused = (Confusion != 0);
|
||||
@@ -624,7 +624,7 @@ study_book(struct obj* spellbook)
|
||||
/* a spellbook has been destroyed or the character has changed levels;
|
||||
the stored address for the current book is no longer valid */
|
||||
void
|
||||
book_disappears(struct obj* obj)
|
||||
book_disappears(struct obj *obj)
|
||||
{
|
||||
if (obj == gc.context.spbook.book) {
|
||||
gc.context.spbook.book = (struct obj *) 0;
|
||||
@@ -636,7 +636,7 @@ book_disappears(struct obj* obj)
|
||||
so the sequence start reading, get interrupted, name the book, resume
|
||||
reading would read the "new" book from scratch */
|
||||
void
|
||||
book_substitution(struct obj* old_obj, struct obj* new_obj)
|
||||
book_substitution(struct obj *old_obj, struct obj *new_obj)
|
||||
{
|
||||
if (old_obj == gc.context.spbook.book) {
|
||||
gc.context.spbook.book = new_obj;
|
||||
@@ -693,7 +693,7 @@ rejectcasting(void)
|
||||
* parameter. Otherwise return FALSE.
|
||||
*/
|
||||
static boolean
|
||||
getspell(int* spell_no)
|
||||
getspell(int *spell_no)
|
||||
{
|
||||
int nspells, idx;
|
||||
char ilet, lets[BUFSZ], qbuf[QBUFSZ];
|
||||
@@ -2252,7 +2252,7 @@ spellretention(int idx, char * outbuf)
|
||||
|
||||
/* Learn a spell during creation of the initial inventory */
|
||||
void
|
||||
initialspell(struct obj* obj)
|
||||
initialspell(struct obj *obj)
|
||||
{
|
||||
int i, otyp = obj->otyp;
|
||||
|
||||
|
||||
@@ -55,7 +55,7 @@ somegold(long lmoney)
|
||||
* Deals in gold only, as leprechauns don't care for lesser coins.
|
||||
*/
|
||||
struct obj *
|
||||
findgold(struct obj* argchain)
|
||||
findgold(struct obj *argchain)
|
||||
{
|
||||
struct obj *chain = argchain; /* allow arg to be nonnull */
|
||||
|
||||
@@ -68,7 +68,7 @@ findgold(struct obj* argchain)
|
||||
* Steal gold coins only. Leprechauns don't care for lesser coins.
|
||||
*/
|
||||
void
|
||||
stealgold(struct monst* mtmp)
|
||||
stealgold(struct monst *mtmp)
|
||||
{
|
||||
struct obj *fgold = g_at(u.ux, u.uy);
|
||||
struct obj *ygold;
|
||||
@@ -356,7 +356,7 @@ worn_item_removal(
|
||||
* doesn't become a superset of leprechaun's "steal gold" attack).
|
||||
*/
|
||||
int
|
||||
steal(struct monst* mtmp, char* objnambuf)
|
||||
steal(struct monst *mtmp, char *objnambuf)
|
||||
{
|
||||
struct obj *otmp;
|
||||
char Monnambuf[BUFSZ];
|
||||
@@ -699,7 +699,7 @@ mpickobj(struct monst *mtmp, struct obj *otmp)
|
||||
|
||||
/* called for AD_SAMU (the Wizard and quest nemeses) */
|
||||
void
|
||||
stealamulet(struct monst* mtmp)
|
||||
stealamulet(struct monst *mtmp)
|
||||
{
|
||||
char buf[BUFSZ];
|
||||
struct obj *otmp = 0, *obj = 0;
|
||||
|
||||
12
src/steed.c
12
src/steed.c
@@ -23,7 +23,7 @@ rider_cant_reach(void)
|
||||
|
||||
/* Can this monster wear a saddle? */
|
||||
boolean
|
||||
can_saddle(struct monst* mtmp)
|
||||
can_saddle(struct monst *mtmp)
|
||||
{
|
||||
struct permonst *ptr = mtmp->data;
|
||||
|
||||
@@ -33,7 +33,7 @@ can_saddle(struct monst* mtmp)
|
||||
}
|
||||
|
||||
int
|
||||
use_saddle(struct obj* otmp)
|
||||
use_saddle(struct obj *otmp)
|
||||
{
|
||||
struct monst *mtmp;
|
||||
struct permonst *ptr;
|
||||
@@ -138,7 +138,7 @@ use_saddle(struct obj* otmp)
|
||||
}
|
||||
|
||||
void
|
||||
put_saddle_on_mon(struct obj* saddle, struct monst* mtmp)
|
||||
put_saddle_on_mon(struct obj *saddle, struct monst *mtmp)
|
||||
{
|
||||
if (!can_saddle(mtmp) || which_armor(mtmp, W_SADDLE))
|
||||
return;
|
||||
@@ -154,7 +154,7 @@ put_saddle_on_mon(struct obj* saddle, struct monst* mtmp)
|
||||
|
||||
/* Can we ride this monster? Caller should also check can_saddle() */
|
||||
boolean
|
||||
can_ride(struct monst* mtmp)
|
||||
can_ride(struct monst *mtmp)
|
||||
{
|
||||
return (mtmp->mtame && humanoid(gy.youmonst.data)
|
||||
&& !verysmall(gy.youmonst.data) && !bigmonst(gy.youmonst.data)
|
||||
@@ -811,7 +811,7 @@ dismount_steed(
|
||||
/* when attempting to saddle or mount a sleeping steed, try to wake it up
|
||||
(for the saddling case, it won't be u.usteed yet) */
|
||||
static void
|
||||
maybewakesteed(struct monst* steed)
|
||||
maybewakesteed(struct monst *steed)
|
||||
{
|
||||
int frozen = (int) steed->mfrozen;
|
||||
boolean wasimmobile = helpless(steed);
|
||||
@@ -882,7 +882,7 @@ stucksteed(boolean checkfeeding)
|
||||
}
|
||||
|
||||
void
|
||||
place_monster(struct monst* mon, coordxy x, coordxy y)
|
||||
place_monster(struct monst *mon, coordxy x, coordxy y)
|
||||
{
|
||||
struct monst *othermon;
|
||||
const char *monnm, *othnm;
|
||||
|
||||
@@ -295,25 +295,25 @@ switch_symbols(int nondefault)
|
||||
}
|
||||
|
||||
void
|
||||
update_ov_primary_symset(const struct symparse* symp, int val)
|
||||
update_ov_primary_symset(const struct symparse *symp, int val)
|
||||
{
|
||||
go.ov_primary_syms[symp->idx] = val;
|
||||
}
|
||||
|
||||
void
|
||||
update_ov_rogue_symset(const struct symparse* symp, int val)
|
||||
update_ov_rogue_symset(const struct symparse *symp, int val)
|
||||
{
|
||||
go.ov_rogue_syms[symp->idx] = val;
|
||||
}
|
||||
|
||||
void
|
||||
update_primary_symset(const struct symparse* symp, int val)
|
||||
update_primary_symset(const struct symparse *symp, int val)
|
||||
{
|
||||
gp.primary_syms[symp->idx] = val;
|
||||
}
|
||||
|
||||
void
|
||||
update_rogue_symset(const struct symparse* symp, int val)
|
||||
update_rogue_symset(const struct symparse *symp, int val)
|
||||
{
|
||||
gr.rogue_syms[symp->idx] = val;
|
||||
}
|
||||
|
||||
@@ -26,7 +26,7 @@ m_blocks_teleporting(struct monst *mtmp)
|
||||
|
||||
/* teleporting is prevented on this level for this monster? */
|
||||
boolean
|
||||
noteleport_level(struct monst* mon)
|
||||
noteleport_level(struct monst *mon)
|
||||
{
|
||||
/* demon court in Gehennom prevent others from teleporting */
|
||||
if (In_hell(&u.uz) && !(is_dlord(mon->data) || is_dprince(mon->data)))
|
||||
@@ -759,7 +759,7 @@ vault_tele(void)
|
||||
}
|
||||
|
||||
boolean
|
||||
teleport_pet(struct monst* mtmp, boolean force_it)
|
||||
teleport_pet(struct monst *mtmp, boolean force_it)
|
||||
{
|
||||
struct obj *otmp;
|
||||
|
||||
@@ -794,7 +794,7 @@ tele(void)
|
||||
|
||||
/* teleport the hero; usually discover scroll of teleportation if via scroll */
|
||||
void
|
||||
scrolltele(struct obj* scroll)
|
||||
scrolltele(struct obj *scroll)
|
||||
{
|
||||
coord cc;
|
||||
|
||||
@@ -1836,7 +1836,7 @@ control_mon_tele(
|
||||
}
|
||||
|
||||
static void
|
||||
mvault_tele(struct monst* mtmp)
|
||||
mvault_tele(struct monst *mtmp)
|
||||
{
|
||||
struct mkroom *croom = search_special(VAULT);
|
||||
coord c;
|
||||
@@ -1849,7 +1849,7 @@ mvault_tele(struct monst* mtmp)
|
||||
}
|
||||
|
||||
boolean
|
||||
tele_restrict(struct monst* mon)
|
||||
tele_restrict(struct monst *mon)
|
||||
{
|
||||
if (noteleport_level(mon)) {
|
||||
if (canseemon(mon))
|
||||
@@ -1861,7 +1861,7 @@ tele_restrict(struct monst* mon)
|
||||
}
|
||||
|
||||
void
|
||||
mtele_trap(struct monst* mtmp, struct trap* trap, int in_sight)
|
||||
mtele_trap(struct monst *mtmp, struct trap *trap, int in_sight)
|
||||
{
|
||||
char *monname;
|
||||
|
||||
@@ -2141,7 +2141,7 @@ random_teleport_level(void)
|
||||
/* you teleport a monster (via wand, spell, or poly'd q.mechanic attack);
|
||||
return false iff the attempt fails */
|
||||
boolean
|
||||
u_teleport_mon(struct monst* mtmp, boolean give_feedback)
|
||||
u_teleport_mon(struct monst *mtmp, boolean give_feedback)
|
||||
{
|
||||
coord cc;
|
||||
|
||||
|
||||
@@ -449,7 +449,7 @@ burn_away_slime(void)
|
||||
|
||||
/* countdown timer for turning into green slime has run out; kill our hero */
|
||||
static void
|
||||
slimed_to_death(struct kinfo* kptr)
|
||||
slimed_to_death(struct kinfo *kptr)
|
||||
{
|
||||
uchar save_mvflags;
|
||||
|
||||
@@ -929,7 +929,7 @@ fall_asleep(int how_long, boolean wakeup_msg)
|
||||
* existing hatch timer. Pass 0L for random hatch time.
|
||||
*/
|
||||
void
|
||||
attach_egg_hatch_timeout(struct obj* egg, long when)
|
||||
attach_egg_hatch_timeout(struct obj *egg, long when)
|
||||
{
|
||||
int i;
|
||||
|
||||
@@ -957,7 +957,7 @@ attach_egg_hatch_timeout(struct obj* egg, long when)
|
||||
|
||||
/* prevent an egg from ever hatching */
|
||||
void
|
||||
kill_egg(struct obj* egg)
|
||||
kill_egg(struct obj *egg)
|
||||
{
|
||||
/* stop previous timer, if any */
|
||||
(void) stop_timer(HATCH_EGG, obj_to_any(egg));
|
||||
@@ -1943,7 +1943,7 @@ kind_name(short kind)
|
||||
}
|
||||
|
||||
static void
|
||||
print_queue(winid win, timer_element* base)
|
||||
print_queue(winid win, timer_element *base)
|
||||
{
|
||||
timer_element *curr;
|
||||
char buf[BUFSZ];
|
||||
@@ -2249,7 +2249,7 @@ peek_timer(short type, anything *arg)
|
||||
* Move all object timers from src to dest, leaving src untimed.
|
||||
*/
|
||||
void
|
||||
obj_move_timers(struct obj* src, struct obj* dest)
|
||||
obj_move_timers(struct obj *src, struct obj *dest)
|
||||
{
|
||||
int count;
|
||||
timer_element *curr;
|
||||
@@ -2269,7 +2269,7 @@ obj_move_timers(struct obj* src, struct obj* dest)
|
||||
* Find all object timers and duplicate them for the new object "dest".
|
||||
*/
|
||||
void
|
||||
obj_split_timers(struct obj* src, struct obj* dest)
|
||||
obj_split_timers(struct obj *src, struct obj *dest)
|
||||
{
|
||||
timer_element *curr, *next_timer = 0;
|
||||
|
||||
@@ -2287,7 +2287,7 @@ obj_split_timers(struct obj* src, struct obj* dest)
|
||||
* all object pointers are unique.
|
||||
*/
|
||||
void
|
||||
obj_stop_timers(struct obj* obj)
|
||||
obj_stop_timers(struct obj *obj)
|
||||
{
|
||||
timeout_proc cleanup_func;
|
||||
timer_element *curr, *prev, *next_timer = 0;
|
||||
@@ -2313,7 +2313,7 @@ obj_stop_timers(struct obj* obj)
|
||||
* Check whether object has a timer of type timer_type.
|
||||
*/
|
||||
boolean
|
||||
obj_has_timer(struct obj* object, short timer_type)
|
||||
obj_has_timer(struct obj *object, short timer_type)
|
||||
{
|
||||
long timeout = peek_timer(timer_type, obj_to_any(object));
|
||||
|
||||
@@ -2375,7 +2375,7 @@ spot_time_left(coordxy x, coordxy y, short func_index)
|
||||
|
||||
/* Insert timer into the global queue */
|
||||
static void
|
||||
insert_timer(timer_element* gnu)
|
||||
insert_timer(timer_element *gnu)
|
||||
{
|
||||
timer_element *curr, *prev;
|
||||
|
||||
@@ -2413,7 +2413,7 @@ remove_timer(
|
||||
}
|
||||
|
||||
static void
|
||||
write_timer(NHFILE* nhfp, timer_element* timer)
|
||||
write_timer(NHFILE *nhfp, timer_element *timer)
|
||||
{
|
||||
anything arg_save;
|
||||
|
||||
@@ -2473,7 +2473,7 @@ DISABLE_WARNING_UNREACHABLE_CODE
|
||||
* saved.
|
||||
*/
|
||||
boolean
|
||||
obj_is_local(struct obj* obj)
|
||||
obj_is_local(struct obj *obj)
|
||||
{
|
||||
switch (obj->where) {
|
||||
case OBJ_INVENT:
|
||||
@@ -2497,7 +2497,7 @@ obj_is_local(struct obj* obj)
|
||||
* level is saved.
|
||||
*/
|
||||
static boolean
|
||||
mon_is_local(struct monst* mon)
|
||||
mon_is_local(struct monst *mon)
|
||||
{
|
||||
struct monst *curr;
|
||||
|
||||
@@ -2516,7 +2516,7 @@ mon_is_local(struct monst* mon)
|
||||
* level when the level is saved.
|
||||
*/
|
||||
static boolean
|
||||
timer_is_local(timer_element* timer)
|
||||
timer_is_local(timer_element *timer)
|
||||
{
|
||||
switch (timer->kind) {
|
||||
case TIMER_LEVEL:
|
||||
@@ -2540,7 +2540,7 @@ RESTORE_WARNING_UNREACHABLE_CODE
|
||||
* be written. If write_it is true, actually write the timer.
|
||||
*/
|
||||
static int
|
||||
maybe_write_timer(NHFILE* nhfp, int range, boolean write_it)
|
||||
maybe_write_timer(NHFILE *nhfp, int range, boolean write_it)
|
||||
{
|
||||
int count = 0;
|
||||
timer_element *curr;
|
||||
@@ -2581,7 +2581,7 @@ maybe_write_timer(NHFILE* nhfp, int range, boolean write_it)
|
||||
* + timeouts that stay with the level (obj & monst)
|
||||
*/
|
||||
void
|
||||
save_timers(NHFILE* nhfp, int range)
|
||||
save_timers(NHFILE *nhfp, int range)
|
||||
{
|
||||
timer_element *curr, *prev, *next_timer = 0;
|
||||
int count;
|
||||
@@ -2620,7 +2620,7 @@ save_timers(NHFILE* nhfp, int range)
|
||||
* monster pointers.
|
||||
*/
|
||||
void
|
||||
restore_timers(NHFILE* nhfp, int range, long adjust)
|
||||
restore_timers(NHFILE *nhfp, int range, long adjust)
|
||||
{
|
||||
int count = 0;
|
||||
timer_element *curr;
|
||||
|
||||
Reference in New Issue
Block a user