
import net.mikekohn.java_grinder.amiga.Blitter;
import net.mikekohn.java_grinder.amiga.Copper;

/*
 ---------- BMP Info Header ----------
           width: 64 + 16
          height: 56

Total Colors: 4
*/

public class ImageCommodoreLogo
{
  static public void init(Copper copper, Blitter blitter)
  {
    int n;

    for (n = 8; n < palette.length + 8; n++)
    {
      Display.setPalette(copper, n, palette[n - 8]);
    }

    // 320 / 8 = 40, 40 - (width / 8) = 32.
    blitter.setModuloDestination(30);
  }

  static public int getCenter()
  {
    return 8000 + (4000 - (30 * 40)) + (20 - 3);
  }

  static public short[] palette =
  {
    0xfff, 0x025, 0xf00, 0x000,
  };

  static public byte[] bitplane_0 =
  {
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
    0, 0, 0, -1, -4, 0, 0, 0, 0, 0,
    0, 0, 15, -1, -1, -128, 0, 0, 0, 0,
    0, 0, 63, -1, -1, -128, 0, 0, 0, 0,
    0, 0, -1, -1, -1, -128, 0, 0, 0, 0,
    0, 3, -1, -1, -1, -128, 0, 0, 0, 0,
    0, 15, -1, -1, -1, -128, 0, 0, 0, 0,
    0, 31, -1, -1, -1, -128, 0, 0, 0, 0,
    0, 63, -1, -1, -1, -128, 0, 0, 0, 0,
    0, 127, -1, -1, -1, -128, 0, 0, 0, 0,
    0, -1, -1, -1, -1, -128, 0, 0, 0, 0,
    1, -1, -1, -1, -1, -128, 0, 0, 0, 0,
    3, -1, -1, -1, -1, -128, 0, 0, 0, 0,
    7, -1, -1, -1, -1, -128, 0, 0, 0, 0,
    7, -1, -1, -64, 3, -128, 0, 0, 0, 0,
    15, -1, -1, 0, 0, -128, 0, 0, 0, 0,
    31, -1, -4, 0, 0, 0, 0, 0, 0, 0,
    31, -1, -16, 0, 0, 0, 0, 0, 0, 0,
    63, -1, -32, 0, 0, 127, -1, -2, 0, 0,
    63, -1, -64, 0, 0, 127, -1, -4, 0, 0,
    63, -1, -128, 0, 0, 127, -1, -8, 0, 0,
    127, -1, -128, 0, 0, 127, -1, -16, 0, 0,
    127, -1, 0, 0, 0, 127, -1, -32, 0, 0,
    127, -1, 0, 0, 0, 127, -1, -64, 0, 0,
    127, -1, 0, 0, 0, 127, -1, 0, 0, 0,
    -1, -2, 0, 0, 0, 127, -2, 0, 0, 0,
    -1, -2, 0, 0, 0, 127, -4, 0, 0, 0,
    -1, -2, 0, 0, 0, 0, 0, 0, 0, 0,
    -1, -2, 0, 0, 0, 0, 0, 0, 0, 0,
    -1, -2, 0, 0, 0, 0, 0, 0, 0, 0,
    -1, -2, 0, 0, 0, 0, 0, 0, 0, 0,
    127, -1, 0, 0, 0, 0, 0, 0, 0, 0,
    127, -1, 0, 0, 0, 0, 0, 0, 0, 0,
    127, -1, 0, 0, 0, 0, 0, 0, 0, 0,
    127, -1, -128, 0, 0, 0, 0, 0, 0, 0,
    63, -1, -128, 0, 0, 0, 0, 0, 0, 0,
    63, -1, -64, 0, 0, 0, 0, 0, 0, 0,
    63, -1, -32, 0, 0, 0, 0, 0, 0, 0,
    31, -1, -16, 0, 0, 0, 0, 0, 0, 0,
    31, -1, -8, 0, 0, 0, 0, 0, 0, 0,
    15, -1, -2, 0, 0, 0, 0, 0, 0, 0,
    15, -1, -1, -128, 1, -128, 0, 0, 0, 0,
    7, -1, -1, -2, 127, -128, 0, 0, 0, 0,
    3, -1, -1, -1, -1, -128, 0, 0, 0, 0,
    1, -1, -1, -1, -1, -128, 0, 0, 0, 0,
    1, -1, -1, -1, -1, -128, 0, 0, 0, 0,
    0, -1, -1, -1, -1, -128, 0, 0, 0, 0,
    0, 127, -1, -1, -1, -128, 0, 0, 0, 0,
    0, 31, -1, -1, -1, -128, 0, 0, 0, 0,
    0, 15, -1, -1, -1, -128, 0, 0, 0, 0,
    0, 3, -1, -1, -1, -128, 0, 0, 0, 0,
    0, 1, -1, -1, -1, -128, 0, 0, 0, 0,
    0, 0, 127, -1, -1, -128, 0, 0, 0, 0,
    0, 0, 15, -1, -1, -128, 0, 0, 0, 0,
    0, 0, 1, -1, -1, 0, 0, 0, 0, 0,
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  };

  static public byte[] bitplane_1 =
  {
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
    0, 0, 0, 0, 0, 127, -4, 0, 0, 0,
    0, 0, 0, 0, 0, 127, -2, 0, 0, 0,
    0, 0, 0, 0, 0, 127, -1, 0, 0, 0,
    0, 0, 0, 0, 0, 127, -1, -128, 0, 0,
    0, 0, 0, 0, 0, 127, -1, -64, 0, 0,
    0, 0, 0, 0, 0, 127, -1, -32, 0, 0,
    0, 0, 0, 0, 0, 127, -1, -16, 0, 0,
    0, 0, 0, 0, 0, 127, -1, -4, 0, 0,
    0, 0, 0, 0, 0, 127, -1, -2, 0, 0,
    0, 0, 0, 0, 0, 127, -1, -1, 0, 0,
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  };

/*
  static public void show(Copper copper)
  {
    copper.stop();
    copper.resetIndex();
    copper.appendSetBitplane(0, bitplane_0);
    copper.appendSetBitplane(1, bitplane_1);
    copper.appendSetColor(0, palette[0]);
    copper.appendSetColor(1, palette[1]);
    copper.appendSetColor(2, palette[2]);
    copper.appendEnd();
    copper.run();
  }
*/
}

