|
DataMuseum.dkPresents historical artifacts from the history of: DKUUG/EUUG Conference tapes |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about DKUUG/EUUG Conference tapes Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - metrics - downloadIndex: T d
Length: 2478 (0x9ae) Types: TextFile Names: »display.c.orig«
└─⟦b20c6495f⟧ Bits:30007238 EUUGD18: Wien-båndet, efterår 1987 └─⟦this⟧ »EUUGD18/General/Wanderer/display.c.orig«
#include "wand_head.h" extern int debug_disp; void map(row_ptr) char (*row_ptr)[ROWLEN+1]; { int x,y; char ch; move(0,0); addch('+'); for(x = 0;x < ROWLEN; x++) addch('-'); addch('+'); for(y = 0;y < NOOFROWS; y++) { move(y+1,0); addch('|'); for(x = 0; x < ROWLEN; x++) { ch = (*row_ptr)[x]; if(!debug_disp) { if((ch == 'M')||(ch == 'S')) ch = ' '; addch(ch); } else if(ch==' '||ch=='#'||ch=='<'||ch=='>'||ch=='O'||ch==':'|| ch=='/'||ch=='\\'||ch=='*'||ch=='='||ch=='@'||ch=='T'|| ch=='X'||ch=='!'||ch=='M'||ch=='S'||ch=='C'||ch=='+'|| ch=='A') addch(ch); else addch('"'); } addch('|'); row_ptr++; } move(y+1,0); addch('+'); for(x = 0;x < ROWLEN; x++) addch('-'); addch('+'); if(!debug_disp) { move(18,0); addstr("Press any key to return to the game."); refresh(); (void) getchar(); move(18,0); addstr(" "); refresh(); for(y=0;y<=(NOOFROWS+1);y++) { move(y,0); for(x=0;x<=(ROWLEN+2);x++) addch(' '); } } else refresh(); } void display(cx,cy,row_ptr,score) char (*row_ptr)[ROWLEN+1]; int cx,cy,score; { int x,y = 0, x_coord,y_coord; char ch; while(y<(cy-3)) { y++; row_ptr++; }; move(0,0); addstr("+---------------------------------+"); move(15,0); addstr("+---------------------------------+"); for(y=(cy-3);y<=(cy+3);y++) { y_coord = (y+3-cy)*2; if ((y<0) || (y>=NOOFROWS)) { move(y_coord+1,0); addstr("|#################################|"); move(y_coord+2,0); addstr("|#################################|"); } else { move(y_coord+1,0); addch('|'); move(y_coord+1,34); addch('|'); move(y_coord+2,0); addch('|'); move(y_coord+2,34); addch('|'); for(x=(cx-5);x<=(cx+5);x++) { x_coord = (x+5-cx)*3; if ((x<0) || (x>ROWLEN-1)) draw_symbol(x_coord,y_coord,'#'); else { ch = (*row_ptr)[x]; draw_symbol(x_coord,y_coord,ch); } }; row_ptr++; } /* end if */ } /* end y loop */ move(16,0); refresh(); }