/*********** DRAWING FUNCTIONS ************/ void Window::draw_section(vector<Coordinate *>coordinates, char value) { for (int z = coordinates.size() - 1; z >= 0; z--) mvinsch(coordinates[z]->y, coordinates[z]->x, value); refresh(); }
cell pp_curs_mvinsch(cell x) { char name[] = "curs:mvinsch"; if (!Running) return UNSPECIFIC; mvinsch(integer_value(name, car(x)), integer_value(name, cadr(x)), char_value(caddr(x))); return UNSPECIFIC; }
static int MvInsCh(int y, int x, chtype ch) { int code; cchar_t tmp_cchar; if (ConvertCh(ch, &tmp_cchar)) { code = mvins_wch(y, x, &tmp_cchar); } else { code = mvinsch(y, x, ch); } return code; }
int c,h, v,x,y,s, i,b; int main () { initscr( ); P(cb, rea, k)() ;/// P(n, oec, ho)( )/* */ ;for (curs_set(0); s= x=COLS/2 ; P( flu, shi, np)()){ timeout(y=c= v=0);/// P(c, lea, r)() ;for (P ( mva, d, dstr )(2, 3+x, G) ; ; P( usl, eep, )(U)){// P(m, vad, dstr )( y >>8,x,// " "); for(i=LINES; /* */ i -->0 ; mvinsch(i,0,0>(~c|i-h-H &h-i )?' ' :(i- h|h- i+H) <0?'|' :'=' )); if(( i=( y +=v= getch( )>0?I:v+ A)>>8)>=LINES||mvinch(i*= 0<i, x)!=' '||' ' !=mvinch(i,3+x))break/*&% &*/; mvaddstr(y >>8, x,0>v ?F:B ); i=--s /-W; P(m, vpr, intw)(0, COLS-9," %u/%u ",(0<i)* i,b=b<i?i: b); refresh(); if(++ c==D){ c -=W; h=rand()%(LINES-H-6 )+2; } } flash(); }}
int main(void) { char text[] = "Elvis found alive *** Stock market tops 20,000 *** Rocky XII big box office hit *** Congressman indicted *** "; char *t; initscr(); noecho(); nodelay(stdscr,TRUE); t = text; while( getch() == ERR ) { if( *t == '\0') t = text; mvinsch(Y,X2,*t); mvdelch(Y,X1); refresh(); napms(DELAY); t++; } endwin(); return 0; }