Return NULL if an invalid tile is requested
Fix crash in certain conditions:
if the area is smaller than the vieport, fAreaOffset could become negative.
Clamp the value to 0 in that case.
Also check for a tilenum value bigger than the maximum allowed.