예제 #1
0
 private void fill(int y0, int x0, int y1, int x1, int c) {
   int d0 = width * y0 + x0;
   int d1 = width * (y1 - 1) + x1;
   if (d0 <= d1) {
     Arrays.fill(screen, width * y0 + x0, width * (y1 - 1) + x1, c);
     setDirty();
   }
 }
예제 #2
0
 private void cursor_set_y(int y) {
   cy = Math.max(0, Math.min(height - 1, y));
   setDirty();
 }
예제 #3
0
 private void cursor_set_x(int x) {
   eol = false;
   cx = Math.max(0, x);
   setDirty();
 }
예제 #4
0
 private void cursor_right(int n) {
   eol = cx + n >= width;
   cx = Math.min(width - 1, cx + n);
   setDirty();
 }
예제 #5
0
 private void cursor_left(int n) {
   eol = false;
   cx = Math.max(0, cx - n);
   setDirty();
 }
예제 #6
0
 private void cursor_down(int n) {
   cy = Math.min(scroll_area_y1 - 1, cy + n);
   setDirty();
 }
예제 #7
0
 private void cursor_up(int n) {
   cy = Math.max(scroll_area_y0, cy - n);
   setDirty();
 }
예제 #8
0
 private void poke(int y, int x, int[] s) {
   System.arraycopy(s, 0, screen, width * y + x, s.length);
   setDirty();
 }