Adicionei as constantes MAXX e MAXY nos defines.