package net.minecraft.src;

import java.io.File;
import java.nio.IntBuffer;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Date;

public class ScreenShotHelper
{
    private static final DateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd_HH.mm.ss");
    private static IntBuffer field_74293_b;
    private static int[] field_74294_c;

    /**
     * Takes a screenshot and saves it to the screenshots directory. Returns the filename of the screenshot.
     */
    public static String saveScreenshot(File par0File, int par1, int par2)
    {
        return func_74292_a(par0File, (String)null, par1, par2);
    }

    public static String func_74292_a(File par0File, String par1Str, int par2, int par3)
    {
        return "Cannot save screenshots dumbass";
    }

    private static File func_74290_a(File par0File)
    {
        String var2 = dateFormat.format(new Date()).toString();
        int var3 = 1;

        while (true)
        {
            File var1 = new File(par0File, var2 + (var3 == 1 ? "" : "_" + var3) + ".png");

            if (!var1.exists())
            {
                return var1;
            }

            ++var3;
        }
    }

    private static void func_74289_a(int[] par0ArrayOfInteger, int par1, int par2)
    {
        int[] var3 = new int[par1];
        int var4 = par2 / 2;

        for (int var5 = 0; var5 < var4; ++var5)
        {
            System.arraycopy(par0ArrayOfInteger, var5 * par1, var3, 0, par1);
            System.arraycopy(par0ArrayOfInteger, (par2 - 1 - var5) * par1, par0ArrayOfInteger, var5 * par1, par1);
            System.arraycopy(var3, 0, par0ArrayOfInteger, (par2 - 1 - var5) * par1, par1);
        }
    }
}
