 
 #include "chess_assets.h"
 
+byte sf = 1;
+
 static byte sinus(byte x)
 {
   return 128 + GD.rsin(128, -16384 + (x << 7));

    if (c[0])
      moving = 16 * ('8' - c[3]) + (c[2] - 'a');

    GD.Begin(BITMAPS);
    GD.ColorRGB(0xe0e0e0);
    for (int y = 0; y < 8; y++)
      for (int x = 0; x < 8; x++) {
        int pos = 16 * y + x;
        byte piece = b[pos] & 15;
        if (pos != moving && piece != 0)
          GD.Vertex2ii(32 + 32 * x, 8 + 32 * y, 0, xlat[piece]);
      }

    if (c[0]) {

  byte xlat[] = { 0, 0, 0, 1, 5, 2, 3, 4, 0, 6, 0, 7, 11,8, 9,10 };

  for (int i = 0; i < MOVETIME; i++) {
    GD.cmd_gradient(0, 0, 0x101010, GD.w, GD.h, 0x202060);
    GD.cmd_bgcolor(0x101020);

    GD.Begin(BITMAPS);
    GD.SaveContext();
    GD.ColorRGB(0xfff0c0);
    GD.ColorA(0xc0);
    GD.cmd_scale(F16(sf * 32), F16(sf * 32));
    GD.cmd_setmatrix();
    GD.Vertex2ii(32, 8, 1, 0);
    GD.RestoreContext();
