Home
last modified time | relevance | path

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

123

/netbsd-src/games/hack/
H A Dhack.mon.c91 struct monst *mtmp; in movemon() local
103 for (mtmp = fmon; mtmp; mtmp = mtmp->nmon) in movemon()
104 if (mtmp->mlstmv < moves) in movemon()
110 mtmp->mlstmv = moves; in movemon()
116 inpool = (levl[mtmp->mx][mtmp->my].typ == POOL); in movemon()
117 iseel = (mtmp->data->mlet == ';'); in movemon()
119 if (cansee(mtmp->mx, mtmp->my)) in movemon()
120 pline("%s drowns.", Monnam(mtmp)); in movemon()
121 mondead(mtmp); in movemon()
126 if (mtmp->mhp > 1) in movemon()
[all …]
H A Dhack.mhitu.c77 mhitu(struct monst *mtmp) in mhitu() argument
79 const struct permonst *mdat = mtmp->data; in mhitu()
86 if (mtmp != u.ustuck) { in mhitu()
89 monnam(mtmp)); in mhitu()
93 done_in_by(mtmp); in mhitu()
100 youswld(mtmp, (u.uac > 0) ? u.uac + 4 : 4, in mhitu()
104 youswld(mtmp, rnd(6), 7, "The lurker above"); in mhitu()
107 youswld(mtmp, d(2, 4), 12, "The purple worm"); in mhitu()
115 done_in_by(mtmp); in mhitu()
122 if (mdat->mlet == ';' && mtmp->minvis && cansee(mtmp->mx, mtmp->my)) { in mhitu()
[all …]
H A Dhack.wizard.c90 struct monst *mtmp; in amulet() local
95 for (mtmp = fmon; mtmp; mtmp = mtmp->nmon) in amulet()
96 if (mtmp->data->mlet == '1' && mtmp->msleep && !rn2(40)) in amulet()
99 mtmp->msleep = 0; in amulet()
100 if (dist(mtmp->mx, mtmp->my) > 2) in amulet()
109 wiz_hit(struct monst *mtmp) in wiz_hit() argument
112 if (mtmp->minvent && mtmp->minvent->olet == AMULET_SYM && in wiz_hit()
113 mtmp->minvent->spe == 0) { in wiz_hit()
115 fall_down(mtmp); in wiz_hit()
128 mtmp->mx = otmp->ox; in wiz_hit()
[all …]
H A Dhack.dog.c88 struct monst *mtmp = makemon(&li_dog, u.ux, u.uy); in makedog() local
89 if (!mtmp) in makedog()
91 initedog(mtmp); in makedog()
95 initedog(struct monst *mtmp) in initedog() argument
97 mtmp->mtame = mtmp->mpeaceful = 1; in initedog()
98 EDOG(mtmp)->hungrytime = 1000 + moves; in initedog()
99 EDOG(mtmp)->eattime = 0; in initedog()
100 EDOG(mtmp)->droptime = 0; in initedog()
101 EDOG(mtmp)->dropdist = 10000; in initedog()
102 EDOG(mtmp)->apport = 10; in initedog()
[all …]
H A Dhack.steal.c86 stealgold(struct monst *mtmp) in stealgold() argument
91 mtmp->mgold += gold->amount; in stealgold()
96 Monnam(mtmp)); in stealgold()
98 rloc(mtmp); in stealgold()
99 mtmp->mflee = 1; in stealgold()
104 mtmp->mgold += tmp; in stealgold()
105 rloc(mtmp); in stealgold()
106 mtmp->mflee = 1; in stealgold()
117 struct monst *mtmp; in stealarm() local
122 for (mtmp = fmon; mtmp; mtmp = mtmp->nmon) in stealarm()
[all …]
H A Dhack.makemon.c85 struct monst *mtmp; in makemon() local
119 mtmp = newmonst(ptr->pxlth); in makemon()
120 *mtmp = zeromonst; /* clear all entries in structure */ in makemon()
122 ((char *) &(mtmp->mextra[0]))[i] = 0; in makemon()
123 mtmp->nmon = fmon; in makemon()
124 fmon = mtmp; in makemon()
125 mtmp->m_id = flags.ident++; in makemon()
126 mtmp->data = ptr; in makemon()
127 mtmp->mxlth = ptr->pxlth; in makemon()
129 mtmp->mhpmax = mtmp->mhp = 80; in makemon()
[all …]
H A Dhack.do_name.c125 struct monst *mtmp, *mtmp2; in do_mname() local
131 mtmp = m_at(cx, cy); in do_mname()
132 if (!mtmp) { in do_mname()
140 if (mtmp->mimic) { in do_mname()
148 pline("What do you want to call %s? ", lmonnam(mtmp)); in do_mname()
158 mtmp2 = newmonst(mtmp->mxlth + lth); in do_mname()
159 *mtmp2 = *mtmp; in do_mname()
160 for (i = 0; i < mtmp->mxlth; i++) in do_mname()
161 ((char *) mtmp2->mextra)[i] = ((char *) mtmp->mextra)[i]; in do_mname()
164 replmon(mtmp, mtmp2); in do_mname()
[all …]
H A Dhack.apply.c141 struct monst *mtmp; in use_camera() local
155 if ((mtmp = bchit(u.dx, u.dy, COLNO, '!')) != NULL) { in use_camera()
156 if (mtmp->msleep) { in use_camera()
157 mtmp->msleep = 0; in use_camera()
158 pline("The flash awakens %s.", monnam(mtmp)); /* a3 */ in use_camera()
159 } else if (mtmp->data->mlet != 'y') in use_camera()
160 if (mtmp->mcansee || mtmp->mblinded) { in use_camera()
161 int tmp = dist(mtmp->mx, mtmp->my); in use_camera()
163 if (cansee(mtmp->mx, mtmp->my)) in use_camera()
164 pline("%s is blinded by the flash!", Monnam(mtmp)); in use_camera()
[all …]
H A Dhack.worm.c82 getwn(struct monst *mtmp) in getwn() argument
87 mtmp->wormno = tmp; in getwn()
95 initworm(struct monst *mtmp) in initworm() argument
98 int tmp = mtmp->wormno; in initworm()
103 wtmp->wx = mtmp->mx; in initworm()
104 wtmp->wy = mtmp->my; in initworm()
110 worm_move(struct monst *mtmp) in worm_move() argument
113 int tmp = mtmp->wormno; in worm_move()
115 wtmp->wx = mtmp->mx; in worm_move()
116 wtmp->wy = mtmp->my; in worm_move()
[all …]
H A Dhack.fight.c179 fightm(struct monst *mtmp) in fightm() argument
183 if (mon != mtmp) { in fightm()
184 if (DIST(mon->mx, mon->my, mtmp->mx, mtmp->my) < 3) in fightm()
186 return (hitmm(mtmp, mon)); in fightm()
346 attack(struct monst *mtmp) in attack() argument
351 mdat = mtmp->data; in attack()
356 if (mdat->mlet == 'L' && !mtmp->mfroz && !mtmp->msleep && in attack()
357 !mtmp->mconf && mtmp->mcansee && !rn2(7) && in attack()
358 (m_move(mtmp, 0) == 2 /* he died */ || /* he moved: */ in attack()
359 mtmp->mx != u.ux + u.dx || mtmp->my != u.uy + u.dy)) in attack()
[all …]
H A Dhack.trap.c211 mintrap(struct monst *mtmp) in mintrap() argument
213 struct trap *trap = t_at(mtmp->mx, mtmp->my); in mintrap()
214 int wasintrap = mtmp->mtrapped; in mintrap()
217 mtmp->mtrapped = 0; /* perhaps teleported? */ in mintrap()
220 mtmp->mtrapped = 0; in mintrap()
223 int in_sight = cansee(mtmp->mx, mtmp->my); in mintrap()
225 if (mtmp->mtrapseen & (1 << tt)) { in mintrap()
230 mtmp->mtrapseen |= (1 << tt); in mintrap()
233 if (strchr(mlarge, mtmp->data->mlet)) { in mintrap()
236 Monnam(mtmp)); in mintrap()
[all …]
H A Dhack.bones.c83 struct monst *mtmp; in savebones() local
112 if (!(mtmp = makemon(PM_GHOST, u.ux, u.uy))) in savebones()
114 mtmp->mx = u.ux; in savebones()
115 mtmp->my = u.uy; in savebones()
116 mtmp->msleep = 1; in savebones()
117 (void) strcpy((char *) mtmp->mextra, plname); in savebones()
119 for (mtmp = fmon; mtmp; mtmp = mtmp->nmon) { in savebones()
120 mtmp->m_id = 0; in savebones()
121 if (mtmp->mtame) { in savebones()
122 mtmp->mtame = 0; in savebones()
[all …]
H A Dhack.lev.c160 savemonchn(int fd, struct monst *mtmp) in savemonchn() argument
169 while (mtmp) { in savemonchn()
170 mtmp2 = mtmp->nmon; in savemonchn()
171 xl = mtmp->mxlth + mtmp->mnamelth; in savemonchn()
173 bwrite(fd, mtmp, xl + sizeof(struct monst)); in savemonchn()
174 if (mtmp->minvent) in savemonchn()
175 saveobjchn(fd, mtmp->minvent); in savemonchn()
176 free(mtmp); in savemonchn()
177 mtmp = mtmp2; in savemonchn()
244 struct monst *mtmp, *mtmp2; in getlev() local
[all …]
H A Dhack.zap.c91 bhitm(struct monst *mtmp, struct obj *otmp) in bhitm() argument
93 wakeup(mtmp); in bhitm()
96 if (u.uswallow || rnd(20) < 10 + mtmp->data->ac) { in bhitm()
98 hit("wand", mtmp, exclam(tmp)); in bhitm()
99 mtmp->mhp -= tmp; in bhitm()
100 if (mtmp->mhp < 1) in bhitm()
101 killed(mtmp); in bhitm()
103 miss("wand", mtmp); in bhitm()
106 mtmp->mspeed = MSLOW; in bhitm()
109 mtmp->mspeed = MFAST; in bhitm()
[all …]
H A Dhack.pri.c276 struct monst *mtmp; in docrt() local
296 for (mtmp = fmon; mtmp; mtmp = mtmp->nmon) in docrt()
297 mtmp->mdispl = 0; in docrt()
323 struct monst *mtmp; in docorner() local
330 for (mtmp = fmon; mtmp; mtmp = mtmp->nmon) in docorner()
331 if (mtmp->mx >= xmin && mtmp->my < ymax) in docorner()
332 mtmp->mdispl = 0; in docorner()
393 struct monst *mtmp; in prl() local
406 if ((mtmp = m_at(x, y)) && !mtmp->mhide && in prl()
407 (!mtmp->minvis || See_invisible)) { in prl()
[all …]
H A Dhack.search.c78 struct monst *mtmp; in findit() local
109 } else if ((mtmp = m_at(zx, zy)) != NULL) in findit()
110 if (mtmp->mimic) { in findit()
111 seemimic(mtmp); in findit()
123 struct monst *mtmp; in dosearch() local
151 if ((mtmp = m_at(x, y)) != NULL) in dosearch()
152 if (mtmp->mimic) { in dosearch()
153 seemimic(mtmp); in dosearch()
198 wakeup(struct monst *mtmp) in wakeup() argument
200 mtmp->msleep = 0; in wakeup()
[all …]
H A Dhack.read.c167 struct monst *mtmp; in doread() local
169 for (mtmp = fmon; mtmp; mtmp = mtmp->nmon) in doread()
170 if (cansee(mtmp->mx, mtmp->my)) { in doread()
172 mtmp->mflee = mtmp->mfroz = in doread()
173 mtmp->msleep = 0; in doread()
175 mtmp->mflee = 1; in doread()
246 struct monst *mtmp; in doread() local
250 if ((mtmp = m_at(u.ux + i, u.uy + j)) != NULL) in doread()
251 (void) tamedog(mtmp, (struct obj *) 0); in doread()
257 struct monst *mtmp, *mtmp2; in doread() local
[all …]
H A Dhack.save.c225 struct monst *mtmp; in dorecover() local
227 for (mtmp = fmon; mtmp; mtmp = mtmp->nmon) in dorecover()
228 if (mtmp->m_id == mid) in dorecover()
232 u.ustuck = mtmp; in dorecover()
273 struct monst *mtmp, *mtmp2 = NULL; in restmonchn() local
291 mtmp = newmonst(xl); in restmonchn()
293 first = mtmp; in restmonchn()
295 mtmp2->nmon = mtmp; in restmonchn()
296 mread(fd, mtmp, (unsigned) xl + sizeof(struct monst)); in restmonchn()
297 if (!mtmp->m_id) in restmonchn()
[all …]
H A Dhack.shk.c143 replshk(struct monst *mtmp, struct monst *mtmp2) in replshk() argument
191 shkname(struct monst *mtmp) /* called in do_name.c */ in shkname() argument
193 return (ESHK(mtmp)->shknam); in shkname()
197 shkdead(struct monst *mtmp) /* called in mon.c */ in shkdead() argument
199 struct eshk *eshk = ESHK(mtmp); in shkdead()
203 if (mtmp == shopkeeper) { in shkdead()
212 replshk(struct monst *mtmp, struct monst *mtmp2) in replshk() argument
214 if (mtmp == shopkeeper) { in replshk()
225 struct monst *mtmp; in setpaid() local
232 for (mtmp = fmon; mtmp; mtmp = mtmp->nmon) in setpaid()
[all …]
H A Dhack.potion.c78 struct monst *mtmp; in dodrink() local
150 for (mtmp = fmon; mtmp; mtmp = mtmp->nmon) in dodrink()
151 if (mtmp->mx > 0) in dodrink()
152 at(mtmp->mx, mtmp->my, mtmp->data->mlet); in dodrink()
453 struct monst *mtmp; in ghost_from_bottle() local
455 if (!(mtmp = makemon(PM_GHOST, u.ux, u.uy))) { in ghost_from_bottle()
459 mnexto(mtmp); in ghost_from_bottle()
H A Dhack.end.c133 done_in_by(struct monst *mtmp) in done_in_by() argument
137 if (mtmp->data->mlet == ' ') { in done_in_by()
139 "the ghost of %s", (char *) mtmp->mextra); in done_in_by()
141 } else if (mtmp->mnamelth) { in done_in_by()
143 mtmp->data->mname, NAME(mtmp)); in done_in_by()
145 } else if (mtmp->minvis) { in done_in_by()
146 Snprintf(buf, sizeof(buf), "invisible %s", mtmp->data->mname); in done_in_by()
149 killer = mtmp->data->mname; in done_in_by()
225 struct monst *mtmp; in done() local
233 mtmp = mydogs; in done()
[all …]
H A Dhack.vault.c89 replgd(struct monst *mtmp __unused, struct monst *mtmp2 __unused) in replgd()
163 struct monst *mtmp; in setgd() local
164 for (mtmp = fmon; mtmp; mtmp = mtmp->nmon) in setgd()
165 if (mtmp->isgd) { in setgd()
166 guard = mtmp; in setgd()
378 replgd(struct monst *mtmp, struct monst *mtmp2) in replgd() argument
380 if (mtmp == guard) in replgd()
H A Dhack.c150 struct monst *mtmp = NULL; in domove() local
199 if (u.uswallow || (mtmp = m_at(u.ux + u.dx, u.uy + u.dy))) { in domove()
208 if (attack(u.uswallow ? u.ustuck : mtmp)) in domove()
568 struct monst *mtmp; in lookaround() local
583 if ((mtmp = m_at(x, y)) && !mtmp->mimic && in lookaround()
584 (!mtmp->minvis || See_invisible)) { in lookaround()
585 if (!mtmp->mtame || (x == u.ux + u.dx && y == u.uy + u.dy)) in lookaround()
588 mtmp = 0; /* invisible M cannot in lookaround()
616 m0 = mtmp ? 1 : 0; in lookaround()
630 if (mtmp) in lookaround()
[all …]
/netbsd-src/lib/libpam/modules/pam_nologin/
H A Dpam_nologin.c79 char *mtmp; in pam_sm_authenticate() local
136 mtmp = malloc(len + 1); in pam_sm_authenticate()
137 if (mtmp != NULL) { in pam_sm_authenticate()
138 read(fd, mtmp, len); in pam_sm_authenticate()
139 mtmp[len] = '\0'; in pam_sm_authenticate()
140 pam_error(pamh, "%s", mtmp); in pam_sm_authenticate()
141 free(mtmp); in pam_sm_authenticate()
/netbsd-src/sys/arch/hppa/spmath/
H A Dfpudispatch.c667 } mtmp, atmp; in decode_06() local
690 if (dbl_fmpy(&fpregs[rm1],&fpregs[rm2],(unsigned *) &mtmp, in decode_06()
703 if (dbl_fmpy(&fpregs[rm1],&fpregs[rm2],(unsigned *) &mtmp, in decode_06()
716 fpregs[tm] = mtmp.ints.i1; in decode_06()
717 fpregs[tm+1] = mtmp.ints.i2; in decode_06()
745 if (sgl_fmpy(&fpregs[rm1],&fpregs[rm2],(unsigned *) &mtmp, in decode_06()
758 if (sgl_fmpy(&fpregs[rm1],&fpregs[rm2],(unsigned *) &mtmp, in decode_06()
769 fpregs[tm] = mtmp.ints.i1; in decode_06()
791 } mtmp, atmp; in decode_26() local
813 if (dbl_fmpy(&fpregs[rm1],&fpregs[rm2],(unsigned *) &mtmp, in decode_26()
[all …]

123