I've read http://stackoverflow.com/questions/217578/point-in-polygon-aka-hit-test but I'm not sure if the solution would apply to a polygon that is divided down the middle by an interior segment. Think of a squared-off figure 8 or simply two squares stacked on one another. A point inside either square would surely be "inside" the polygon but the crossing count would differ depending on which direction you went (and whether you crossed that interior segment).
I suppose one way of dealing with this is to treat the polygon as two separate polygons... (in which case I'll need an algorithm to divide a complex polygon into a set of simpler ones?)
Or is there a refinement to the ray-casting algorithm, or another point-in-polygon algorithm, to deal with the case I described?