|
1 |
| -/* $NetBSD: movem.c,v 1.7 2009/08/12 08:04:05 dholland Exp $ */ |
| 1 | +/* $NetBSD: movem.c,v 1.8 2011/08/16 11:19:41 christos Exp $ */ |
2 | 2 |
|
3 | 3 | /*
|
4 | 4 | * movem.c (move monster) Larn is copyrighted 1986 by Noah Morgan.
|
|
12 | 12 | */
|
13 | 13 | #include <sys/cdefs.h>
|
14 | 14 | #ifndef lint
|
15 |
| -__RCSID("$NetBSD: movem.c,v 1.7 2009/08/12 08:04:05 dholland Exp $"); |
| 15 | +__RCSID("$NetBSD: movem.c,v 1.8 2011/08/16 11:19:41 christos Exp $"); |
16 | 16 | #endif /* not lint */
|
17 | 17 |
|
18 | 18 | #include "header.h"
|
@@ -278,7 +278,7 @@ mmove(aa, bb, cc, dd)
|
278 | 278 | int aa, bb, cc, dd;
|
279 | 279 | {
|
280 | 280 | int tmp, i, flag;
|
281 |
| - const char *who = NULL, *p; |
| 281 | + const char *who = NULL; |
282 | 282 |
|
283 | 283 | flag = 0; /* set to 1 if monster hit by arrow trap */
|
284 | 284 | if ((cc == playerx) && (dd == playery)) {
|
@@ -364,24 +364,22 @@ mmove(aa, bb, cc, dd)
|
364 | 364 | if (c[BLINDCOUNT])
|
365 | 365 | return; /* if blind don't show where monsters are */
|
366 | 366 | if (know[cc][dd] & 1) {
|
367 |
| - p = 0; |
368 | 367 | if (flag)
|
369 | 368 | cursors();
|
370 | 369 | switch (flag) {
|
371 | 370 | case 1:
|
372 |
| - p = "\n%s hits the %s"; |
| 371 | + lprintf("\n%s hits the %s", who, monster[tmp].name); |
| 372 | + beep(); |
373 | 373 | break;
|
374 | 374 | case 2:
|
375 |
| - p = "\n%s hits and kills the %s"; |
| 375 | + lprintf("\n%s hits and kills the %s", |
| 376 | + who, monster[tmp].name); |
| 377 | + beep(); |
376 | 378 | break;
|
377 | 379 | case 3:
|
378 |
| - p = "\nThe %s%s gets teleported"; |
379 |
| - who = ""; |
380 |
| - break; |
381 |
| - }; |
382 |
| - if (p) { |
383 |
| - lprintf(p, who, monster[tmp].name); |
| 380 | + lprintf("\nThe %s gets teleported", monster[tmp].name); |
384 | 381 | beep();
|
| 382 | + break; |
385 | 383 | }
|
386 | 384 | }
|
387 | 385 | /*
|
|
0 commit comments