check to make sure flood fill doesn't crash when pmap is errored (?)
add defines for window resolution