示例#1
0
static void MakeCopperList(CopListT *cp) {
  WORD i;

  CopInit(cp);
  CopMakeDispWin(cp, X(0), Y(28), WIDTH * 2, HEIGHT * 2);
  CopMakePlayfield(cp, bplptr, screen[active], DEPTH);
  CopLoadColor(cp, 0, 15, 0);
  CopLoadPal(cp, texture->palette, 16);
  for (i = 0; i < HEIGHT * 2; i++) {
    CopWaitMask(cp, Y(i + 28), 0, 0xff, 0);
    CopMove16(cp, bplcon1, (i & 1) ? 0x0021 : 0x0010);
    CopMove16(cp, bpl1mod, (i & 1) ? -40 : 0);
    CopMove16(cp, bpl2mod, (i & 1) ? -40 : 0);
  }
  CopEnd(cp);
}
示例#2
0
static void MakeCopperList(CopListT **ptr, WORD n) {
  CopListT *cp = NewCopList(100 + HEIGHT * 5 + (31 * HEIGHT / 3));
  WORD *pixels = texture->pixels;
  WORD i, j, k;

  CopInit(cp);
  CopSetupGfxSimple(cp, MODE_LORES, DEPTH, X(STARTX), Y(0), WIDTH, HEIGHT);
  CopSetupBitplanes(cp, bplptr[n], twister, DEPTH);
  CopSetupSprites(cp, sprptr[n]);
  CopMove16(cp, dmacon, DMAF_SETCLR|DMAF_RASTER);
  CopMove16(cp, diwstrt, 0x2c81);
  CopMove16(cp, diwstop, 0x2bc1);
  CopSetColor(cp, 0, &gradient->colors[0]);

  for (i = 0, k = 0; i < HEIGHT; i++) {
    CopWait(cp, Y(i), 0);
    bplmod[n][i] = CopMove16(cp, bpl1mod, -32);
    CopMove16(cp, bpl2mod, -32);
    CopMove16(cp, bpldat[0], 0);

    CopSetColor(cp, 0, &gradient->colors[i]);

    if ((i % 3) == 0) {
      colors[n][k++] = CopSetRGB(cp, 1, *pixels++);
      for (j = 2; j < 32; j++)
        CopSetRGB(cp, j, *pixels++);
    }
  }

  CopEnd(cp);

  CopInsSet32(sprptr[n][4], left[0]->data);
  CopInsSet32(sprptr[n][5], left[1]->data);
  CopInsSet32(sprptr[n][6], right[0]->data);
  CopInsSet32(sprptr[n][7], right[1]->data);

  *ptr = cp;
}