britown, I can't stress enough how important it is to have a central API for coordinate transformations.
Tile grid coords, pixel coords, internal buffer pixel, screen pixel, viewport, world, zoomed/unzoomed, you never want to just transform these in-line anywhere. Take the time to write functions for going between them all especially if you're making a something like a map editor.
I also use typedefs to help document what function signatures expect and return.