Example #1
0
static void RenderNextLineIfNeeded() {
  Area2D rect = {0, 0, WIDTH, SIZE};
  WORD s = frameCount / 16;

  if (s > last_line) {
    APTR ptr = scroll->planes[0];
    WORD line_num = (s % (LINES + 2)) * SIZE;
    char *line_end;
    WORD size;

    line_end = line_start;
    NextLine(&line_end);
    size = (line_end - line_start) - 1;

    ptr += line_num * scroll->bytesPerRow;

    rect.y = line_num;
    BitmapClearArea(scroll, &rect);
    WaitBlitter();
    RenderLine(ptr, line_start, min(size, COLUMNS));

    last_line = s;
    NextLine(&line_start);
  }
}
Example #2
0
static void Render() {
  BitmapClearArea(screen[active], 
                  STRUCT(Area2D, 0, 0, MAX_W * 2 + SIZE, MAX_H * 2 + SIZE));
  DrawPlotter();

  WaitVBlank();
  ITER(i, 0, DEPTH - 1, CopInsSet32(bplptr[i], screen[active]->planes[i]));
  active ^= 1;
}