/** * Perform the basic "close" command * * Assume there is no monster blocking the destination * * Returns true if repeated commands may continue */ static bool do_cmd_close_aux(int y, int x) { bool more = false; /* Verify legality */ if (!do_cmd_close_test(y, x)) return (false); /* Broken door */ if (square_isbrokendoor(cave, y, x)) { msg("The door appears to be broken."); } else { /* Close door */ square_close_door(cave, y, x); square_memorize(cave, y, x); square_light_spot(cave, y, x); player->upkeep->update |= (PU_UPDATE_VIEW | PU_MONSTERS); sound(MSG_SHUTDOOR); } /* Result */ return (more); }
/** * Perform the basic "close" command * * Assume there is no monster blocking the destination * * Returns TRUE if repeated commands may continue */ static bool do_cmd_close_aux(int y, int x) { bool more = FALSE; /* Verify legality */ if (!do_cmd_close_test(y, x)) return (FALSE); /* Broken door */ if (square_isbrokendoor(cave, y, x)) { msg("The door appears to be broken."); } else { /* Close door */ square_close_door(cave, y, x); sqinfo_on(cave->squares[y][x].info, SQUARE_MARK); square_light_spot(cave, y, x); player->upkeep->update |= (PU_UPDATE_VIEW | PU_MONSTERS); sound(MSG_SHUTDOOR); } /* Result */ return (more); }