예제 #1
0
static void Init() {
  custom->dmacon = DMAF_SETCLR | DMAF_BLITTER;

  MakeCopperList(&cp[0], 0);
  MakeCopperList(&cp[1], 1);

  UpdateSprite(left[0], X(0), Y(0));
  UpdateSprite(left[1], X(16), Y(0));
  UpdateSprite(right[0], X(320 - 32), Y(0));
  UpdateSprite(right[1], X(320 - 16), Y(0));

  CopListActivate(cp[1]);
  custom->dmacon = DMAF_SETCLR | DMAF_RASTER | DMAF_SPRITE;
}
예제 #2
0
static void Init() {
  scroll = NewBitmap(WIDTH, HEIGHT + 16, 1);

  custom->dmacon = DMAF_SETCLR | DMAF_BLITTER;
  BitmapClear(scroll);

  line_start = text;

  cp[0] = MakeCopperList(0);
  cp[1] = MakeCopperList(1);

  CopListActivate(cp[active]);

  custom->dmacon = DMAF_SETCLR | DMAF_RASTER;
}
예제 #3
0
파일: uvmap.c 프로젝트: frost242/demoscene
static void Init() {
  static PixmapT recycled[2];

  chunky[0] = &recycled[0];
  chunky[1] = &recycled[1];

  InitSharedPixmap(chunky[0], WIDTH, HEIGHT, PM_GRAY4, screen[0]->planes[1]);
  InitSharedPixmap(chunky[1], WIDTH, HEIGHT, PM_GRAY4, screen[1]->planes[1]);

  UVMapRender = MemAlloc(UVMapRenderSize, MEMF_PUBLIC);
  textureHi = NewPixmap(texture->width, texture->height * 2,
                        PM_CMAP, MEMF_PUBLIC);
  textureLo = NewPixmap(texture->width, texture->height * 2,
                        PM_CMAP, MEMF_PUBLIC);

  MakeUVMapRenderCode();
  PixmapScramble(texture, textureHi, textureLo);

  custom->dmacon = DMAF_SETCLR | DMAF_BLITTER;

  ITER(i, 0, 4, BlitterClearSync(screen[0], i));
  ITER(i, 0, 4, BlitterClearSync(screen[1], i));

  memset(screen[0]->planes[4], 0x55, WIDTH * HEIGHT * 4 / 8);
  memset(screen[1]->planes[4], 0x55, WIDTH * HEIGHT * 4 / 8);

  cp = NewCopList(1024);

  MakeCopperList(cp);
  CopListActivate(cp);
  custom->dmacon = DMAF_SETCLR | DMAF_RASTER;
  custom->intena = INTF_SETCLR | INTF_BLIT;
}