void display_board(board *b) { int x, y; if (alt_video_page) { outpage(2); } else { outpage(4); } textcolour(7); clearscr(); movecur(30, 7); os_long_int_to_string(&score, 10, conv_buffer); strout("Score: "); strout(conv_buffer); for (y = 0; y < brd_h; y++) { movecur(30, y * 2 + 8); strout(seperator); movecur(30, y * 2 + 9); for (x = 0; x < brd_w; x++) { charout('|'); if ((*b)[y][x] < 10000) charout(' '); if ((*b)[y][x] < 1000) charout(' '); if ((*b)[y][x] < 100) charout(' '); if ((*b)[y][x] < 10) charout(' '); if ((*b)[y][x] == 0) { charout(' '); } else { strout(os_int_to_string((*b)[y][x])); } } charout('|'); } movecur(30, 16); strout(seperator); if (alt_video_page) { viewpage(2); alt_video_page = 0; } else { viewpage(4); alt_video_page = 1; } }
void init_display() { os_hide_cursor(); textio_init(); viewpage(2); outpage(2); clearscr(); }
void HTMLGenerator::addWord(Word* word, ostream &outword) { outword << "<a href=" << word->word << ".htm" << ">" << word->word << "</a><br>" << endl; ofstream outpage((outdir + word->word + ".htm").c_str()); outpage << "<html><head><title>" << endl << "Ged Crimsonclaw's " << word->word << " page" << endl << "</title></head><body>" << endl << "Here Ged has compiled, for your enjoyment " << "a list of all the webpages containing " <<endl << "the word " << word->word << ".<br>" << endl << "Please enjoy browsing the various " << endl << "links found on these pages.<br><br>" << endl; Webpage* temp = word->pop(); while(temp != 0) { addPage(temp, outpage); delete temp; temp = word->pop(); } outpage << "</body></html>" << endl; }