Esempio n. 1
0
 public static int getClipping(int x, int y, int height) {
   if (height > 3) height = 0;
   int regionX = x >> 3;
   int regionY = y >> 3;
   int regionId = ((regionX / 8) << 8) + (regionY / 8);
   for (Region r : regions) {
     if (r.id() == regionId) {
       return r.getClip(x, y, height);
     }
   }
   return 0;
 }
Esempio n. 2
0
  private void addClipping(int x, int y, int height, int shift) {
    int regionX = x >> 3;
    int regionY = y >> 3;
    int regionId = ((regionX / 8) << 8) + (regionY / 8);

    for (Region r : regions) {
      if (r.id() == regionId) {
        r.addClip(x, y, height, shift);
        break;
      }
    }
  }