/* * Copy a "term_win" from another */ public int copy(Term_Win f, int w, int h) { int x, y; /* Copy contents */ for (y = 0; y < h; y++) { ConsoleColor[] f_aa = f.a[y]; char[] f_cc = f.c[y]; ConsoleColor[] s_aa = a[y]; char[] s_cc = c[y]; ConsoleColor[] f_taa = f.ta[y]; char[] f_tcc = f.tc[y]; ConsoleColor[] s_taa = ta[y]; char[] s_tcc = tc[y]; for (x = 0; x < w; x++) { s_aa[x] = f_aa[x]; s_cc[x] = f_cc[x]; s_taa[x] = f_taa[x]; s_tcc[x] = f_tcc[x]; } } /* Copy cursor */ cx = f.cx; cy = f.cy; cu = f.cu; cv = f.cv; /* Success */ return (0); }
/* * Copy a "term_win" from another */ public int copy(Term_Win f, int w, int h) { int x, y; /* Copy contents */ for (y = 0; y < h; y++) { ConsoleColor[] f_aa = f.a[y]; char[] f_cc = f.c[y]; ConsoleColor[] s_aa = a[y]; char[] s_cc = c[y]; ConsoleColor[] f_taa = f.ta[y]; char[] f_tcc = f.tc[y]; ConsoleColor[] s_taa = ta[y]; char[] s_tcc = tc[y]; for (x = 0; x < w; x++) { s_aa[x] = f_aa[x]; s_cc[x] = f_cc[x]; s_taa[x] = f_taa[x]; s_tcc[x] = f_tcc[x]; } } /* Copy cursor */ cx = f.cx; cy = f.cy; cu = f.cu; cv = f.cv; /* Success */ return(0); }