diff options
Diffstat (limited to 'rogue/move.c')
-rw-r--r-- | rogue/move.c | 35 |
1 files changed, 18 insertions, 17 deletions
diff --git a/rogue/move.c b/rogue/move.c index 91adf0f1..e518f1ae 100644 --- a/rogue/move.c +++ b/rogue/move.c @@ -1,4 +1,4 @@ -/* $NetBSD: move.c,v 1.9 2007/12/27 23:53:00 dholland Exp $ */ +/* $NetBSD: move.c,v 1.10 2008/01/14 00:23:52 dholland Exp $ */ /* * Copyright (c) 1988, 1993 @@ -37,7 +37,7 @@ #if 0 static char sccsid[] = "@(#)move.c 8.1 (Berkeley) 5/31/93"; #else -__RCSID("$NetBSD: move.c,v 1.9 2007/12/27 23:53:00 dholland Exp $"); +__RCSID("$NetBSD: move.c,v 1.10 2008/01/14 00:23:52 dholland Exp $"); #endif #endif /* not lint */ @@ -74,7 +74,7 @@ one_move_rogue(dirch, pickup) if (confused) { dirch = gr_dir(); } - (void) is_direction(dirch, &d); + (void)is_direction(dirch, &d); get_dir_rc(d, &row, &col, 1); if (!can_move(rogue.row, rogue.col, row, col)) { @@ -86,7 +86,7 @@ one_move_rogue(dirch, pickup) messagef(1, "you are being held"); } else { messagef(0, "you are still stuck in the bear trap"); - (void) reg_move(); + (void)reg_move(); } return(MOVE_FAILED); } @@ -99,7 +99,7 @@ one_move_rogue(dirch, pickup) } if (dungeon[row][col] & MONSTER) { rogue_hit(object_at(&level_monsters, row, col), 0); - (void) reg_move(); + (void)reg_move(); return(MOVE_FAILED); } if (dungeon[row][col] & DOOR) { @@ -155,14 +155,14 @@ MOVE_ON: } messagef(1, "%s(%c)", desc, obj->ichar); NOT_IN_PACK: - (void) reg_move(); + (void)reg_move(); return(STOPPED_ON_SOMETHING); } if (dungeon[row][col] & (DOOR | STAIRS | TRAP)) { if ((!levitate) && (dungeon[row][col] & TRAP)) { trap_player(row, col); } - (void) reg_move(); + (void)reg_move(); return(STOPPED_ON_SOMETHING); } MVED: if (reg_move()) { /* fainted from hunger */ @@ -209,7 +209,8 @@ multiple_move_rogue(dirch) case 'Y': case 'U': case 'N': - while ((!interrupted) && (one_move_rogue((dirch + 32), 1) == MOVED)) ; + while ((!interrupted) && (one_move_rogue((dirch + 32), 1) == MOVED)) + ; if ( (!interrupted) && passgo && (dungeon[rogue.row][rogue.col] & TUNNEL)) { @@ -296,7 +297,7 @@ next_to_something(drow, dcol) } boolean -can_move(row1, col1, row2, col2) +can_move(row1, col1, row2, col2) int row1, col1, row2, col2; { if (!is_passable(row2, col2)) { @@ -328,7 +329,7 @@ move_onto() } check_message(); if (ch != CANCEL) { - (void) one_move_rogue(ch, 0); + (void)one_move_rogue(ch, 0); } } @@ -378,18 +379,18 @@ check_hunger(msg_only) boolean fainted = 0; if (rogue.moves_left == HUNGRY) { - (void) strlcpy(hunger_str, "hungry", sizeof(hunger_str)); + (void)strlcpy(hunger_str, "hungry", sizeof(hunger_str)); messagef(0, "%s", hunger_str); print_stats(STAT_HUNGER); } if (rogue.moves_left == WEAK) { - (void) strlcpy(hunger_str, "weak", sizeof(hunger_str)); + (void)strlcpy(hunger_str, "weak", sizeof(hunger_str)); messagef(1, "%s", hunger_str); print_stats(STAT_HUNGER); } if (rogue.moves_left <= FAINT) { if (rogue.moves_left == FAINT) { - (void) strlcpy(hunger_str, "faint", sizeof(hunger_str)); + (void)strlcpy(hunger_str, "faint", sizeof(hunger_str)); messagef(1, "%s", hunger_str); print_stats(STAT_HUNGER); } @@ -412,7 +413,7 @@ check_hunger(msg_only) return(fainted); } if (rogue.moves_left <= STARVE) { - killed_by((object *) 0, STARVATION); + killed_by((object *)0, STARVATION); } switch(e_rings) { @@ -427,12 +428,12 @@ check_hunger(msg_only) break; case 1: rogue.moves_left--; - (void) check_hunger(1); + (void)check_hunger(1); rogue.moves_left -= (rogue.moves_left % 2); break; case 2: rogue.moves_left--; - (void) check_hunger(1); + (void)check_hunger(1); rogue.moves_left--; break; } @@ -508,7 +509,7 @@ rest(count) if (interrupted) { break; } - (void) reg_move(); + (void)reg_move(); } } |