static bool rectContains(int x1, int y1, int w, int h, Pt p) { ret p.x >= x1 && p.y >= y1 && p.x < x1+w && p.y < y1+h; }