Home
last modified time | relevance | path

Searched refs:mtmp (Results 1 – 25 of 40) sorted by relevance

12

/dragonfly/games/hack/
HDhack.mon.c86 struct monst *mtmp; in movemon() local
98 for (mtmp = fmon; mtmp; mtmp = mtmp->nmon) in movemon()
99 if (mtmp->mlstmv < moves) in movemon()
105 mtmp->mlstmv = moves; in movemon()
111 inpool = (levl[mtmp->mx][mtmp->my].typ == POOL); in movemon()
112 iseel = (mtmp->data->mlet == ';'); in movemon()
114 if (cansee(mtmp->mx, mtmp->my)) in movemon()
115 pline("%s drowns.", Monnam(mtmp)); in movemon()
116 mondead(mtmp); in movemon()
121 if (mtmp->mhp > 1) in movemon()
[all …]
HDhack.mhitu.c72 mhitu(struct monst *mtmp) in mhitu() argument
74 const struct permonst *mdat = mtmp->data; in mhitu()
81 if (mtmp != u.ustuck) { in mhitu()
84 monnam(mtmp)); in mhitu()
88 done_in_by(mtmp); in mhitu()
95 youswld(mtmp, (u.uac > 0) ? u.uac + 4 : 4, in mhitu()
99 youswld(mtmp, rnd(6), 7, "The lurker above"); in mhitu()
102 youswld(mtmp, d(2, 4), 12, "The purple worm"); in mhitu()
110 done_in_by(mtmp); in mhitu()
117 if (mdat->mlet == ';' && mtmp->minvis && cansee(mtmp->mx, mtmp->my)) { in mhitu()
[all …]
HDhack.wizard.c85 struct monst *mtmp; in amulet() local
90 for (mtmp = fmon; mtmp; mtmp = mtmp->nmon) in amulet()
91 if (mtmp->data->mlet == '1' && mtmp->msleep && !rn2(40)) in amulet()
94 mtmp->msleep = 0; in amulet()
95 if (dist(mtmp->mx, mtmp->my) > 2) in amulet()
104 wiz_hit(struct monst *mtmp) in wiz_hit() argument
107 if (mtmp->minvent && mtmp->minvent->olet == AMULET_SYM && in wiz_hit()
108 mtmp->minvent->spe == 0) { in wiz_hit()
110 fall_down(mtmp); in wiz_hit()
123 mtmp->mx = otmp->ox; in wiz_hit()
[all …]
HDhack.dog.c83 struct monst *mtmp = makemon(&li_dog, u.ux, u.uy); in makedog() local
84 if (!mtmp) in makedog()
86 initedog(mtmp); in makedog()
90 initedog(struct monst *mtmp) in initedog() argument
92 mtmp->mtame = mtmp->mpeaceful = 1; in initedog()
93 EDOG(mtmp)->hungrytime = 1000 + moves; in initedog()
94 EDOG(mtmp)->eattime = 0; in initedog()
95 EDOG(mtmp)->droptime = 0; in initedog()
96 EDOG(mtmp)->dropdist = 10000; in initedog()
97 EDOG(mtmp)->apport = 10; in initedog()
[all …]
HDhack.steal.c81 stealgold(struct monst *mtmp) in stealgold() argument
86 mtmp->mgold += gold->amount; in stealgold()
91 Monnam(mtmp)); in stealgold()
93 rloc(mtmp); in stealgold()
94 mtmp->mflee = 1; in stealgold()
99 mtmp->mgold += tmp; in stealgold()
100 rloc(mtmp); in stealgold()
101 mtmp->mflee = 1; in stealgold()
112 struct monst *mtmp; in stealarm() local
117 for (mtmp = fmon; mtmp; mtmp = mtmp->nmon) in stealarm()
[all …]
HDhack.makemon.c80 struct monst *mtmp; in makemon() local
114 mtmp = newmonst(ptr->pxlth); in makemon()
115 *mtmp = zeromonst; /* clear all entries in structure */ in makemon()
117 ((char *) &(mtmp->mextra[0]))[i] = 0; in makemon()
118 mtmp->nmon = fmon; in makemon()
119 fmon = mtmp; in makemon()
120 mtmp->m_id = flags.ident++; in makemon()
121 mtmp->data = ptr; in makemon()
122 mtmp->mxlth = ptr->pxlth; in makemon()
124 mtmp->mhpmax = mtmp->mhp = 80; in makemon()
[all …]
HDhack.do_name.c120 struct monst *mtmp, *mtmp2; in do_mname() local
126 mtmp = m_at(cx, cy); in do_mname()
127 if (!mtmp) { in do_mname()
135 if (mtmp->mimic) { in do_mname()
143 pline("What do you want to call %s? ", lmonnam(mtmp)); in do_mname()
153 mtmp2 = newmonst(mtmp->mxlth + lth); in do_mname()
154 *mtmp2 = *mtmp; in do_mname()
155 for (i = 0; i < mtmp->mxlth; i++) in do_mname()
156 ((char *) mtmp2->mextra)[i] = ((char *) mtmp->mextra)[i]; in do_mname()
159 replmon(mtmp, mtmp2); in do_mname()
[all …]
HDhack.apply.c136 struct monst *mtmp; in use_camera() local
150 if ((mtmp = bchit(u.dx, u.dy, COLNO, '!')) != NULL) { in use_camera()
151 if (mtmp->msleep) { in use_camera()
152 mtmp->msleep = 0; in use_camera()
153 pline("The flash awakens %s.", monnam(mtmp)); /* a3 */ in use_camera()
154 } else if (mtmp->data->mlet != 'y') in use_camera()
155 if (mtmp->mcansee || mtmp->mblinded) { in use_camera()
156 int tmp = dist(mtmp->mx, mtmp->my); in use_camera()
158 if (cansee(mtmp->mx, mtmp->my)) in use_camera()
159 … pline("%s is blinded by the flash!", Monnam(mtmp)); in use_camera()
[all …]
HDhack.worm.c77 getwn(struct monst *mtmp) in getwn() argument
82 mtmp->wormno = tmp; in getwn()
90 initworm(struct monst *mtmp) in initworm() argument
93 int tmp = mtmp->wormno; in initworm()
98 wtmp->wx = mtmp->mx; in initworm()
99 wtmp->wy = mtmp->my; in initworm()
105 worm_move(struct monst *mtmp) in worm_move() argument
108 int tmp = mtmp->wormno; in worm_move()
110 wtmp->wx = mtmp->mx; in worm_move()
111 wtmp->wy = mtmp->my; in worm_move()
[all …]
HDhack.fight.c174 fightm(struct monst *mtmp) in fightm() argument
178 if (mon != mtmp) { in fightm()
179 if (DIST(mon->mx, mon->my, mtmp->mx, mtmp->my) < 3) in fightm()
181 return (hitmm(mtmp, mon)); in fightm()
341 attack(struct monst *mtmp) in attack() argument
346 mdat = mtmp->data; in attack()
351 if (mdat->mlet == 'L' && !mtmp->mfroz && !mtmp->msleep && in attack()
352 !mtmp->mconf && mtmp->mcansee && !rn2(7) && in attack()
353 (m_move(mtmp, 0) == 2 /* he died */ || /* he moved: */ in attack()
354 mtmp->mx != u.ux + u.dx || mtmp->my != u.uy + u.dy)) in attack()
[all …]
HDhack.trap.c206 mintrap(struct monst *mtmp) in mintrap() argument
208 struct trap *trap = t_at(mtmp->mx, mtmp->my); in mintrap()
209 int wasintrap = mtmp->mtrapped; in mintrap()
212 mtmp->mtrapped = 0; /* perhaps teleported? */ in mintrap()
215 mtmp->mtrapped = 0; in mintrap()
218 int in_sight = cansee(mtmp->mx, mtmp->my); in mintrap()
220 if (mtmp->mtrapseen & (1 << tt)) { in mintrap()
225 mtmp->mtrapseen |= (1 << tt); in mintrap()
228 if (strchr(mlarge, mtmp->data->mlet)) { in mintrap()
231 Monnam(mtmp)); in mintrap()
[all …]
HDhack.bones.c78 struct monst *mtmp; in savebones() local
107 if (!(mtmp = makemon(PM_GHOST, u.ux, u.uy))) in savebones()
109 mtmp->mx = u.ux; in savebones()
110 mtmp->my = u.uy; in savebones()
111 mtmp->msleep = 1; in savebones()
112 (void) strcpy((char *) mtmp->mextra, plname); in savebones()
114 for (mtmp = fmon; mtmp; mtmp = mtmp->nmon) { in savebones()
115 mtmp->m_id = 0; in savebones()
116 if (mtmp->mtame) { in savebones()
117 mtmp->mtame = 0; in savebones()
[all …]
HDhack.lev.c155 savemonchn(int fd, struct monst *mtmp) in savemonchn() argument
164 while (mtmp) { in savemonchn()
165 mtmp2 = mtmp->nmon; in savemonchn()
166 xl = mtmp->mxlth + mtmp->mnamelth; in savemonchn()
168 bwrite(fd, mtmp, xl + sizeof(struct monst)); in savemonchn()
169 if (mtmp->minvent) in savemonchn()
170 saveobjchn(fd, mtmp->minvent); in savemonchn()
171 free(mtmp); in savemonchn()
172 mtmp = mtmp2; in savemonchn()
239 struct monst *mtmp, *mtmp2; in getlev() local
[all …]
HDhack.zap.c86 bhitm(struct monst *mtmp, struct obj *otmp) in bhitm() argument
88 wakeup(mtmp); in bhitm()
91 if (u.uswallow || rnd(20) < 10 + mtmp->data->ac) { in bhitm()
93 hit("wand", mtmp, exclam(tmp)); in bhitm()
94 mtmp->mhp -= tmp; in bhitm()
95 if (mtmp->mhp < 1) in bhitm()
96 killed(mtmp); in bhitm()
98 miss("wand", mtmp); in bhitm()
101 mtmp->mspeed = MSLOW; in bhitm()
104 mtmp->mspeed = MFAST; in bhitm()
[all …]
HDhack.pri.c271 struct monst *mtmp; in docrt() local
291 for (mtmp = fmon; mtmp; mtmp = mtmp->nmon) in docrt()
292 mtmp->mdispl = 0; in docrt()
318 struct monst *mtmp; in docorner() local
325 for (mtmp = fmon; mtmp; mtmp = mtmp->nmon) in docorner()
326 if (mtmp->mx >= xmin && mtmp->my < ymax) in docorner()
327 mtmp->mdispl = 0; in docorner()
388 struct monst *mtmp; in prl() local
401 if ((mtmp = m_at(x, y)) && !mtmp->mhide && in prl()
402 (!mtmp->minvis || See_invisible)) { in prl()
[all …]
HDhack.search.c73 struct monst *mtmp; in findit() local
104 } else if ((mtmp = m_at(zx, zy)) != NULL) in findit()
105 if (mtmp->mimic) { in findit()
106 seemimic(mtmp); in findit()
118 struct monst *mtmp; in dosearch() local
146 if ((mtmp = m_at(x, y)) != NULL) in dosearch()
147 if (mtmp->mimic) { in dosearch()
148 seemimic(mtmp); in dosearch()
193 wakeup(struct monst *mtmp) in wakeup() argument
195 mtmp->msleep = 0; in wakeup()
[all …]
HDhack.read.c162 struct monst *mtmp; in doread() local
164 for (mtmp = fmon; mtmp; mtmp = mtmp->nmon) in doread()
165 if (cansee(mtmp->mx, mtmp->my)) { in doread()
167 mtmp->mflee = mtmp->mfroz = in doread()
168 mtmp->msleep = 0; in doread()
170 mtmp->mflee = 1; in doread()
241 struct monst *mtmp; in doread() local
245 if ((mtmp = m_at(u.ux + i, u.uy + j)) != NULL) in doread()
246 (void) tamedog(mtmp, (struct obj *) 0); in doread()
252 struct monst *mtmp, *mtmp2; in doread() local
[all …]
HDhack.save.c220 struct monst *mtmp; in dorecover() local
222 for (mtmp = fmon; mtmp; mtmp = mtmp->nmon) in dorecover()
223 if (mtmp->m_id == mid) in dorecover()
227 u.ustuck = mtmp; in dorecover()
268 struct monst *mtmp, *mtmp2 = NULL; in restmonchn() local
286 mtmp = newmonst(xl); in restmonchn()
288 first = mtmp; in restmonchn()
290 mtmp2->nmon = mtmp; in restmonchn()
291 mread(fd, mtmp, (unsigned) xl + sizeof(struct monst)); in restmonchn()
292 if (!mtmp->m_id) in restmonchn()
[all …]
HDhack.shk.c138 replshk(struct monst *mtmp, struct monst *mtmp2) in replshk() argument
186 shkname(struct monst *mtmp) /* called in do_name.c */ in shkname() argument
188 return (ESHK(mtmp)->shknam); in shkname()
192 shkdead(struct monst *mtmp) /* called in mon.c */ in shkdead() argument
194 struct eshk *eshk = ESHK(mtmp); in shkdead()
198 if (mtmp == shopkeeper) { in shkdead()
207 replshk(struct monst *mtmp, struct monst *mtmp2) in replshk() argument
209 if (mtmp == shopkeeper) { in replshk()
220 struct monst *mtmp; in setpaid() local
227 for (mtmp = fmon; mtmp; mtmp = mtmp->nmon) in setpaid()
[all …]
HDhack.potion.c73 struct monst *mtmp; in dodrink() local
145 for (mtmp = fmon; mtmp; mtmp = mtmp->nmon) in dodrink()
146 if (mtmp->mx > 0) in dodrink()
147 at(mtmp->mx, mtmp->my, mtmp->data->mlet); in dodrink()
448 struct monst *mtmp; in ghost_from_bottle() local
450 if (!(mtmp = makemon(PM_GHOST, u.ux, u.uy))) { in ghost_from_bottle()
454 mnexto(mtmp); in ghost_from_bottle()
HDhack.end.c128 done_in_by(struct monst *mtmp) in done_in_by() argument
132 if (mtmp->data->mlet == ' ') { in done_in_by()
134 "the ghost of %s", (char *) mtmp->mextra); in done_in_by()
136 } else if (mtmp->mnamelth) { in done_in_by()
138 mtmp->data->mname, NAME(mtmp)); in done_in_by()
140 } else if (mtmp->minvis) { in done_in_by()
141 Snprintf(buf, sizeof(buf), "invisible %s", mtmp->data->mname); in done_in_by()
144 killer = mtmp->data->mname; in done_in_by()
220 struct monst *mtmp; in done() local
228 mtmp = mydogs; in done()
[all …]
HDhack.vault.c84 replgd(struct monst *mtmp __unused, struct monst *mtmp2 __unused) in replgd()
158 struct monst *mtmp; in setgd() local
159 for (mtmp = fmon; mtmp; mtmp = mtmp->nmon) in setgd()
160 if (mtmp->isgd) { in setgd()
161 guard = mtmp; in setgd()
373 replgd(struct monst *mtmp, struct monst *mtmp2) in replgd() argument
375 if (mtmp == guard) in replgd()
HDhack.c145 struct monst *mtmp = NULL; in domove() local
194 if (u.uswallow || (mtmp = m_at(u.ux + u.dx, u.uy + u.dy))) { in domove()
203 if (attack(u.uswallow ? u.ustuck : mtmp)) in domove()
563 struct monst *mtmp; in lookaround() local
578 if ((mtmp = m_at(x, y)) && !mtmp->mimic && in lookaround()
579 (!mtmp->minvis || See_invisible)) { in lookaround()
580 if (!mtmp->mtame || (x == u.ux + u.dx && y == u.uy + u.dy)) in lookaround()
583 mtmp = 0; /* invisible M cannot in lookaround()
611 m0 = mtmp ? 1 : 0; in lookaround()
625 if (mtmp) in lookaround()
[all …]
/dragonfly/lib/libpam/modules/pam_nologin/
HDpam_nologin.c70 char *mtmp; in pam_sm_acct_mgmt() local
109 mtmp = malloc(st.st_size + 1); in pam_sm_acct_mgmt()
110 if (mtmp != NULL) { in pam_sm_acct_mgmt()
111 ss = read(fd, mtmp, st.st_size); in pam_sm_acct_mgmt()
113 mtmp[ss] = '\0'; in pam_sm_acct_mgmt()
114 pam_error(pamh, "%s", mtmp); in pam_sm_acct_mgmt()
116 free(mtmp); in pam_sm_acct_mgmt()
/dragonfly/crypto/libressl/crypto/ecdh/
HDecdh_kdf.c85 unsigned char mtmp[EVP_MAX_MD_SIZE]; in ecdh_KDF_X9_63() local
106 if (!EVP_DigestFinal(mctx, mtmp, NULL)) in ecdh_KDF_X9_63()
108 memcpy(out, mtmp, outlen); in ecdh_KDF_X9_63()
109 explicit_bzero(mtmp, mdlen); in ecdh_KDF_X9_63()

12