//Displays current room name and score at top of screen. void DispScoreBoard () { /* Display status */ //CBM version. #ifdef __CBM__ //Get the current screen line; column is assumed to be 0. //wherey() shouldn't be needed; I need to optimize later. #if defined __PLUS4__ || defined __C128__ c=taby; #else c=taby; #endif //Home and set reverse mode. //home2(); printc (0x13); reverson(); //For the C128 (80 column version) #ifdef __C128__ //clear to row. for (i=79; i; --i) printc (32); //If using far memory, special memory access functions are needed. #ifdef __USEFARMEM__ //Display room name. prints ("\x13Room: "); printh (hidereadw((void*)&CRm->Name)); //Display score at right edge of screen. tabx=69; prints ("Score "); printu (Player.Score); printcr (); //Using only Bank 0, access is more direct. #else //Display room name. prints ("\x13Room: "); prints (Room[CRoom].Name); //Display score at right edge of screen. tabx=69; prints ("Score "); printu (Player.Score); printcr (); #endif //40-column CBM computers: #else //reverson(); //Clear status bar. for (i=39; i; --i) printc (32); //If using far or hiddem memory #ifdef __USEFARMEM__ //Display room name. prints ("\x13Room: "); printh (hidereadw((void*)&CRm->Name)); //Display score at right edge of screen. tabx=29; prints ("Score "); printu (Player.Score); printcr (); //Otherwise: #else //Display room name. prints ("\x13Room: "); prints (CRm->Name); //Display score at right edge of screen. tabx=29; prints ("Score "); printu (Player.Score); printcr (); #endif #endif //Return to row before the call to DispScoreBoard(). goline (c); //Atari8 version: #elif defined __ATARIXL__ //Preserve current cursor row; column is assumed to be 0. c=wherey(); //Home the cursor. gotoxy (0, 0); //Clear the score board with reversed spaces. for (i=39; i; --i) printc (32|128); //Reset the X pos. to print score board. tabx=0; //Write the score board. Note that, due to an unsupported feature of //AtaSimpleIO, some information will not be printed in reverse. #ifdef __USEFARMEM__ printrs ("Room: "); printh (hidereadw((void*)&CRm->Name)); tabx=29; printrs ("Score "); printu (Player.Score); printcr (); #else printrs ("Room: "); printrs (CRm->Name); tabx=29; printrs ("Score "); printu (Player.Score); printcr (); #endif //Return to orig. row. goline (c); //Apple2enh version. #elif defined __APPLE2ENH__ //Get row #. c=wherey(); //Home the cursor and turn reverse mode on. //home2(); gotoxy (0, 0); reverson (); //Clear score board. for (i=79; i; --i) printc (32); //Return to left of score board. tabx=0; //Print score board. #ifdef __USEFARMEM__ prints ("Room: "); printh (hidereadw((void*)&CRm->Name)); tabx=69; prints ("Score "); printu (Player.Score); //printcr (); #else prints ("Room: "); prints (CRm->Name); tabx=69; prints ("Score "); printu (Player.Score); //printcr (); #endif //Clear reverse mode and return to orig. row. reversoff(); printcr (); gotoy (c); #else //For other computers. I don't remember the purpose of this code. #ifdef __USEFARMEM__ prints ("\x13Room: "); printh (hidereadw((void*)&CRm->Name)); tabx=29; prints ("Score "); printu (Player.Score); printcr (); #else prints ("\x13Room: "); prints (CRm->Name); tabx=29; prints ("Score "); printu (Player.Score); printcr (); #endif goline (c); #endif }