fix some global declare warnings and improve testing if a swamp is in a mapchunk