-+-+-+-+-+-+-+-+ START OF PART 8 -+-+-+-+-+-+-+-+ X (long)c`5BHP`5D,(long)c`5BHPMAX`5D,(long)(c`5BSTRENGTH`5D+c`5BST VREXTRA`5D),(long)c`5BINTELLIGENCE`5D); X lprintf("WIS=%-2d CON=%-2d DEX=%-2d CHA=%-2d LV:", X (long)c`5BWISDOM`5D,(long)c`5BCONSTITUTION`5D,(long)c`5BDEXTERIT VY`5D,(long)c`5BCHARISMA`5D); X X if ((level==0) `7C`7C (wizard)) c`5BTELEFLAG`5D=0; X if (c`5BTELEFLAG`5D) lprcat(" ?"); else lprcat(levelname`5Blevel` V5D); X lprintf(" Gold: %-6d",(long)c`5BGOLD`5D); X always=1; botside(); X c`5BTMP`5D = c`5BSTRENGTH`5D+c`5BSTREXTRA`5D; X for (i=0; i<100; i++) cbak`5Bi`5D=c`5Bi`5D; X return; X `7D X X botsub(SPELLS,8,18,"%3d"); X if (c`5BSPELLMAX`5D>99) X `7B X botsub(SPELLMAX,12,18,"%3d)"); X `7D X else X botsub(SPELLMAX,12,18,"%2d) "); X botsub(HP,5,19,"%3d"); X botsub(HPMAX,9,19,"%3d"); X botsub(AC,21,18,"%-3d"); X botsub(WCLASS,30,18,"%-3d"); X botsub(EXPERIENCE,49,18,"%-9d"); X if (c`5BLEVEL`5D != cbak`5BLEVEL`5D) X `7B X cursor(59,18); X lprcat(class`5Bc`5BLEVEL`5D-1`5D); X `7D X if (c`5BLEVEL`5D>99) X `7B X botsub(LEVEL,40,18,"%3d"); X `7D X else X botsub(LEVEL,40,18," %-2d"); X c`5BTMP`5D = c`5BSTRENGTH`5D+c`5BSTREXTRA`5D; X botsub(TMP,18,19,"%-2d"); X botsub(INTELLIGENCE,25,19,"%-2d"); X botsub(WISDOM,32,19,"%-2d"); X botsub(CONSTITUTION,39,19,"%-2d"); X botsub(DEXTERITY,46,19,"%-2d"); X botsub(CHARISMA,53,19,"%-2d"); X if ((level != cbak`5BCAVELEVEL`5D) `7C`7C (c`5BTELEFLAG`5D != cbak`5BTEL VEFLAG`5D)) X `7B X if ((level==0) `7C`7C (wizard)) X c`5BTELEFLAG`5D=0; X cbak`5BTELEFLAG`5D = c`5BTELEFLAG`5D; X cbak`5BCAVELEVEL`5D = level; X cursor(59,19); X if (c`5BTELEFLAG`5D) X lprcat(" ?"); X else X lprcat(levelname`5Blevel`5D); X `7D X botsub(GOLD,69,19,"%-6d"); X botside(); X `7D X X/* X special subroutine to update only the gold number on the bottomlines X called from ogold() X */ Xbottomgold() X `7B X botsub(GOLD,69,19,"%-6d"); X `7D X X/* X special routine to update hp and level fields on bottom lines X called in monster.c hitplayer() and spattack() X */ Xstatic bot_hpx() X `7B X if (c`5BEXPERIENCE`5D != cbak`5BEXPERIENCE`5D) X `7B X recalc(); X bot_linex(); X `7D X else X botsub(HP,5,19,"%3d"); X `7D X X/* X special routine to update number of spells called from regen() X */ Xstatic bot_spellx() X `7B X botsub(SPELLS,9,18,"%2d"); X `7D X X/* X common subroutine for a more economical bottomline() X */ Xstatic struct bot_side_def X `7B X int typ; X char *string; X `7D X bot_data`5B`5D = X `7B X STEALTH,"stealth", UNDEADPRO,"undead pro", SPIRITPRO,"spirit pr Vo", X CHARMCOUNT,"Charm", TIMESTOP,"Time Stop", HOLDMONST,"Hold Mons Vt", X GIANTSTR,"Giant Str", FIRERESISTANCE,"Fire Resit", DEXCOUNT,"Dexterity V", X STRCOUNT,"Strength", SCAREMONST,"Scare", HASTESELF,"Haste Sel Vf", X CANCELLATION,"Cancel", INVISIBILITY,"Invisible", ALTPRO,"Protect 3", X PROTECTIONTIME,"Protect 2", WTW,"Wall-Walk" X `7D; X Xstatic botside() X `7B X register int i,idx; X for (i=0; i<17; i++) X `7B X idx = bot_data`5Bi`5D.typ; X if ((always) `7C`7C (c`5Bidx`5D != cbak`5Bidx`5D)) X `7B X if ((always) `7C`7C (cbak`5Bidx`5D == 0)) X `7B if (c`5Bidx`5D) `7B cursor(70,i+1); lprcat(bot_data`5Bi` V5D.string); `7D `7D else X if (c`5Bidx`5D==0) `7B cursor(70,i+1); lprcat(" "); V `7D X cbak`5Bidx`5D=c`5Bidx`5D; X `7D X `7D X always=0; X `7D X X/* X * subroutine to draw only a section of the screen X * only the top section of the screen is updated. If entire lines are bein Vg X * drawn, then they will be cleared first. X */ Xstatic int d_xmin=0,d_xmax=MAXX,d_ymin=0,d_ymax=MAXY; /* for limited screen V drawing */ Xdraws(xmin,xmax,ymin,ymax) X int xmin,xmax,ymin,ymax; X `7B X register int i,idx; X if (xmin==0 && xmax==MAXX) /* clear section of screen as needed */ X `7B X if (ymin==0) cl_up(79,ymax); X else for (i=ymin; i ileft ) X if (know`5Biright`5D`5Bj`5D) X break ; /* exitloop while */ X X /* now print the line, after positioning the cursor. X print the line with bold objects in a different X loop for effeciency X */ X cursor( ileft+1, j+1 ); X if (boldobjects) X for ( i=ileft ; i <= iright ; i++ ) X X /* we still need to check for the location being known, X for we might have an unknown spot in the middle of X an otherwise known line. X */ X if ( know`5Bi`5D`5Bj`5D == 0 ) X nlprc( ' ' ); X else if ( know`5Bi`5D`5Bj`5D & HAVESEEN ) X `7B X /* if monster there and the user still knows the pla Vce, X then show the monster. Otherwise, show what was X there before. X */ X if (( i == playerx ) && X ( j == playery )) X nlprc('@'); X else if (( k = mitem`5Bi`5D`5Bj`5D ) && X ( know`5Bi`5D`5Bj`5D & KNOWHERE )) X nlprc( monstnamelist`5Bk`5D ); X else if (((k=item`5Bi`5D`5Bj`5D) == OWALL ) `7C`7C X (objnamelist`5Bk`5D == floorc)) X nlprc( objnamelist`5Bk`5D ); X else X `7B X setbold(); X nlprc( objnamelist`5Bk`5D ); X resetbold(); X `7D X `7D X else X /* error condition. recover by resetting location X to an 'unknown' state. X */ X `7B X nlprc( ' ' ); X mitem`5Bi`5D`5Bj`5D = item`5Bi`5D`5Bj`5D = 0 ; X `7D X else /* non-bold objects here */ X for ( i=ileft ; i <= iright ; i++ ) X X /* we still need to check for the location being known, X for we might have an unknown spot in the middle of X an otherwise known line. X */ X if ( know`5Bi`5D`5Bj`5D == 0 ) X nlprc( ' ' ); X else if ( know`5Bi`5D`5Bj`5D & HAVESEEN ) X `7B X /* if monster there and the user still knows the pla Vce, X then show the monster. Otherwise, show what was X there before. X */ X if (( i == playerx ) && X ( j == playery )) X nlprc('@'); X else if (( k = mitem`5Bi`5D`5Bj`5D ) && X ( know`5Bi`5D`5Bj`5D & KNOWHERE )) X nlprc( monstnamelist`5Bk`5D ); X else X nlprc( objnamelist`5Bitem`5Bi`5D`5Bj`5D`5D ); X `7D X else X /* error condition. recover by resetting location X to an 'unknown' state. X */ X `7B X nlprc( ' ' ); X mitem`5Bi`5D`5Bj`5D = item`5Bi`5D`5Bj`5D = 0 ; X `7D X `7D /* if (ileft < d_xmax ) */ X `7D /* for (j) */ X X#ifdef DECRainbow X if (DECRainbow) X DECgraphicsOFF(); X#endif DECRainbow X resetbold(); X if (d_flag) `7B always=1; botside(); always=1; bot_linex(); `7D X/* X oldx=99; X*/ X d_xmin = d_ymin = 0; d_xmax = MAXX; d_ymax = MAXY; /* for limited screen V drawing */ X `7D X`0C X/* X showcell(x,y) X X subroutine to display a cell location on the screen X */ Xshowcell(x,y) X int x,y; X `7B X register int i,j,k,m; X if (c`5BBLINDCOUNT`5D) return; /* see nothing if blind */ X if (c`5BAWARENESS`5D) `7B minx = x-3; maxx = x+3; miny = y-3; maxy = y+3 V; `7D X else `7B minx = x-1; maxx = x+1; miny = y-1; maxy = y+1; `7 VD X X if (minx < 0) minx=0; if (maxx > MAXX-1) maxx = MAXX-1; X if (miny < 0) miny=0; if (maxy > MAXY-1) maxy = MAXY-1; X X for (j=miny; j<=maxy; j++) X for (m=minx; m<=maxx; m++) X if ((know`5Bm`5D`5Bj`5D & KNOWHERE) == 0) X `7B X cursor(m+1,j+1); X x=maxx; X while (know`5Bx`5D`5Bj`5D & KNOWHERE) X --x; X for (i=m; i<=x; i++) X `7B X if ((k=mitem`5Bi`5D`5Bj`5D) != 0) lprc(monstnamelist`5Bk`5D V); X else switch(k=item`5Bi`5D`5Bj`5D) X `7B X case OWALL: case 0: case OIVTELETRAP: case OTRAPARROWI VV: X case OIVDARTRAP: case OIVTRAPDOOR: X#ifdef DECRainbow X if (DECRainbow) `7B X DEClprc(objnamelist`5Bk`5D); X `7D else X#endif DECRainbow X lprc(objnamelist`5Bk`5D); `20 X break; X default: X if (boldobjects) X setbold(); X lprc(objnamelist`5Bk`5D); X if (boldobjects) X resetbold(); X break; X `7D; X know`5Bi`5D`5Bj`5D = KNOWALL; X `7D X m = maxx; X#ifdef DECRainbow X if (DECRainbow) X DECgraphicsOFF(); X#endif DECRainbow X `7D X `7D X X/* X this routine shows only the spot that is given it. the spaces around X these coordinated are not shown X used in godirect() in monster.c for missile weapons display X */ Xshow1cell(x,y) X int x,y; X `7B X cursor(x+1,y+1); X X /* see nothing if blind, but clear previous player position X */ X if (c`5BBLINDCOUNT`5D) X `7B X if ((x == oldx) && (y == oldy)) X lprc(' '); X return; X `7D X X if ((k=mitem`5Bx`5D`5By`5D)) X lprc(monstnamelist`5Bk`5D); X else switch(k=item`5Bx`5D`5By`5D) X `7B X case OWALL: case 0: case OIVTELETRAP: case OTRAPARROWIV: X case OIVDARTRAP: case OIVTRAPDOOR: X# ifdef DECRainbow X if (DECRainbow) `7B X DEClprc(objnamelist`5Bk`5D); +-+-+-+-+-+-+-+- END OF PART 8 +-+-+-+-+-+-+-+-