static public bool CheckForGoodPathEnds(ref AreaMap new_map, int room_index, int sqr_index, ref Point sqr_point) { if (!new_map.ChkAdjacentForRoomID(ref new_map, ref sqr_point, room_index, Globals.AllDirItr, 4)) // is corner? { return(false); } else if (new_map.ChkMSForState(ref new_map.MSGrid[sqr_point.Y][sqr_point.X], MSFlag.ENT, MSFlagIndex.WALL_RM_ENT)) // is entrance? { return(false); } else if (!new_map.ChkAdjacentForMState(ref new_map, ref sqr_point, MSFlag.BL, MSFlagIndex.BL_ST, Globals.NESWItr, 1)) // is blocked off? { return(false); } return(true); }
static public bool CheckForGoodPathEnds(ref AreaMap new_map, int room_index, int sqr_index, ref Point sqr_point) { if (new_map.RoomList[room_index].IsCorner(sqr_index)) { return(false); } else if (new_map.ChkMSForState(ref new_map.MSGrid[sqr_point.Y][sqr_point.X], MSFlag.ENT, MSFlagIndex.WALL_RM_ENT)) { return(false); } else if (!new_map.ChkAdjacentForMState(ref new_map, ref sqr_point, MSFlag.BL, MSFlagIndex.BL_ST, Globals.NESWItr, 1)) { return(false); } return(true); }