public void renderTile(int xp, int yp, Tile tile) {
        for (int y = 0; y < 32; y++) {
            int ya = yp + y;
            for (int x = 0; x < 32; x++) {
                int xa = xp + x;
                if (xa < -32 || xa >= WIDTH || ya < 0 || ya >= HEIGHT) {
                    break;
                }
                pixels[xa + ya * WIDTH] = tile.sprite.pixels[x + y * 32];
            }
        }
    }