scrdisp.cpp 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640
  1. /* $Id$
  2. * MegaZeux
  3. *
  4. * Copyright (C) 1996 Greg Janson
  5. * Copyright (C) 1998 Matthew D. Williams - dbwilli@scsn.net
  6. *
  7. * This program is free software; you can redistribute it and/or
  8. * modify it under the terms of the GNU General Public License as
  9. * published by the Free Software Foundation; either version 2 of
  10. * the License, or (at your option) any later version.
  11. *
  12. * This program is distributed in the hope that it will be useful,
  13. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  15. * General Public License for more details.
  16. *
  17. * You should have received a copy of the GNU General Public License
  18. * along with this program; if not, write to the Free Software
  19. * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  20. */
  21. /* Scroll display code */
  22. #include "palette.h"
  23. #include "arrowkey.h"
  24. #include "string.h"
  25. #include <stdio.h>
  26. #include "data.h"
  27. #include "scrdisp.h"
  28. #include "window.h"
  29. #include "graphics.h"
  30. #include "error.h"
  31. #include "getkey.h"
  32. #include "intake.h"
  33. #include "mouse.h"
  34. #include "roballoc.h"
  35. #include "beep.h"
  36. int scroll_base_color=143;
  37. int scroll_corner_color=135;
  38. int scroll_pointer_color=128;
  39. int scroll_title_color=143;
  40. int scroll_arrow_color=142;
  41. char lower_fix[32]={//Changes 0-31 ascii to printable codes
  42. ' ','o','o','*','*','*','*','ù','Û','o','Û','o','+','&','&',
  43. '*','>','<','|','!','&','$','_','|','^','v','>','<','-','-',
  44. '^','v' };
  45. char print(unsigned char far *str) {
  46. int pos=0,t1;
  47. //Prints. Shuffles out <32 chars and color codes.
  48. do {
  49. t1=str[pos++];
  50. if((t1=='~')||(t1=='@')) {
  51. t1=str[pos++];
  52. if((t1>='0')&&(t1<='9')) continue;
  53. if((t1>='a')&&(t1<='f')) continue;
  54. if((t1>='A')&&(t1<='F')) continue;
  55. if(fputc(t1,stdprn)!=t1) return 1;
  56. }
  57. else if(t1==5) fwrite(" ",1,5,stdprn);
  58. else if(t1==0) {
  59. fputc(10,stdprn);
  60. fputc(13,stdprn);
  61. fflush(stdprn);
  62. }
  63. else if(t1<32) fputc(lower_fix[t1],stdprn);
  64. else if(t1==127) fputc('þ',stdprn);
  65. else if(t1==255) fputc(' ',stdprn);
  66. else if(fputc(t1,stdprn)!=t1) return 1;
  67. } while(t1);
  68. return 0;
  69. }
  70. //Also used to display scrolls. Use a type of 0 for Show Scroll, 1 for Show
  71. //Sign, 2 for Edit Scroll.
  72. void scroll_edit(int id,char type) {
  73. //Important status vars (insert kept in intake.cpp)
  74. unsigned int pos=1,old_pos;//Where IN scroll?
  75. int currx=0;//X position in line
  76. int key;//Key returned by intake()
  77. int t1,t2,t3;
  78. char far *where;//Where scroll is
  79. char line[80];//For editing
  80. //Draw screen
  81. save_screen(current_pg_seg);
  82. scroll_edging(type);
  83. //Loop
  84. prepare_robot_mem(!id);
  85. where=&robot_mem[scrolls[id].mesg_location];
  86. do {
  87. //Display scroll
  88. scroll_frame(id,pos);
  89. if(type==2) {
  90. //Figure length
  91. for(t1=0;t1<80;t1++)
  92. if(where[pos+t1]=='\n') break;
  93. //t1==length
  94. //Edit line
  95. where[pos+t1]=0;
  96. str_cpy(line,&where[pos]);
  97. where[pos+t1]='\n';
  98. key=intake(line,64,8,12,current_pg_seg,scroll_base_color,2,0,0,&currx);
  99. //Modify scroll to hold new line (give errors here)
  100. t2=str_len(line);//Get length of NEW line
  101. //Resize and move- Resize FIRST if moving >, LAST if <.
  102. if(t2>t1) {
  103. if(reallocate_robot_mem(T_SCROLL,id,(t3=scrolls[id].mesg_size)+t2-t1)) {
  104. //Too big.
  105. if(error("Code/message is too large to fit into robot memory",1,25,
  106. current_pg_seg,0x2201)==1) return;
  107. //Shorten to orig. length
  108. t2=t1;
  109. line[t2]=0;
  110. if(key!=27) key=0;//Non-ESC is cancelled.
  111. }
  112. //Now move.
  113. mem_mov(&where[pos+t2],&where[pos+t1],t3-pos-t1,1);
  114. }
  115. else if(t2<t1) {
  116. mem_mov(&where[pos+t2],&where[pos+t1],(t3=scrolls[id].mesg_size)-pos-t1,0);
  117. reallocate_robot_mem(T_SCROLL,id,t3+t2-t1);
  118. }
  119. //Copy in new line
  120. str_cpy(&where[pos],line);
  121. where[pos+t2]='\n';
  122. //Act upon key...
  123. if(key==MOUSE_EVENT) acknowledge_mouse();
  124. }
  125. else key=getkey();
  126. old_pos=pos;
  127. switch(key) {
  128. case MOUSE_EVENT:
  129. //Move to line clicked on if mouse is in scroll, else exit
  130. if((mouse_event.cy>=6)&&(mouse_event.cy<=18)&&
  131. (mouse_event.cx>=8)&&(mouse_event.cx<=71)) {
  132. t1=mouse_event.cy-12;
  133. if(t1==0) break;
  134. //t1<0 = PGUP t1 lines
  135. //t1>0 = PGDN t1 lines
  136. if(t1<0) goto pgup;
  137. goto pgdn;
  138. }
  139. key=27;
  140. break;
  141. case -72://Up
  142. up_a_line:
  143. //Go back a line (if possible)
  144. if(where[pos-1]==1) break;//Can't.
  145. pos--;
  146. //Go to start of this line.
  147. do {
  148. pos--;
  149. } while((where[pos]!='\n')&&(where[pos]!=1));
  150. pos++;
  151. //Done.
  152. break;
  153. case -80://Down
  154. down_a_line:
  155. //Go forward a line (if possible)
  156. while(where[pos]!='\n') pos++;
  157. //At end of current. Is there a next line?
  158. if(where[++pos]==0) {
  159. //Nope.
  160. pos=old_pos;
  161. break;
  162. }
  163. //Yep. Done.
  164. break;
  165. case 13://Enter
  166. if(type<2) {
  167. key=27;
  168. break;
  169. }
  170. //Add in new line below. Need only add one byte.
  171. if(reallocate_robot_mem(T_SCROLL,id,(t3=scrolls[id].mesg_size)+1)) {
  172. //Too big.
  173. if(error("Code/message is too large to fit into robot memory",1,25,
  174. current_pg_seg,0x2202)==1) return;
  175. //Forget it.
  176. break;
  177. }
  178. //Move all at pos+currx up a space
  179. mem_mov(&where[pos+currx+1],&where[pos+currx],t3-pos-currx,1);
  180. //Insert a \n
  181. where[pos+currx]='\n';
  182. //Change pos and currx
  183. pos=pos+currx+1;
  184. currx=0;
  185. scrolls[id].num_lines++;
  186. //Done.
  187. break;
  188. case 8://Backspace
  189. if(type<2) goto nope;
  190. //We are at the start of the current line and we are trying to
  191. //append it to the end of the previous line. First, remember
  192. //the size of the current line is in t2. Now we go back a line,
  193. //if there is one.
  194. if(where[pos-1]==1) break;//Nope.
  195. pos--;
  196. //Go to start of this line, COUNTING CHARACTERS.
  197. t1=0;
  198. do {
  199. pos--; t1++;
  200. } while((where[pos]!='\n')&&(where[pos]!=1));
  201. //pos is at one before the start of this line. WHO CARES!? :)
  202. //Now we have to see if the size, t2, is over 64 characters.
  203. //t2+t1 is currently one too many so check for >65 for error.
  204. if((t2+t1)>65) {
  205. pos=old_pos;
  206. break;//Too long. Reset position.
  207. }
  208. //OKAY! Just copy backwards over the \n in the middle to
  209. //append...
  210. mem_mov(&where[old_pos-1],&where[old_pos],
  211. (t3=scrolls[id].mesg_size)-old_pos,0);
  212. //...and reallocate to one space less!
  213. reallocate_robot_mem(T_SCROLL,id,t3-1);
  214. //pos is one before this start. Fix to the start of this new
  215. //line. Set currx to the length of the old line this was.
  216. pos++; currx=t1-1;
  217. scrolls[id].num_lines--;
  218. //Done.
  219. break;
  220. case -81://Pagedown (by 6 lines)
  221. for(t1=6;t1>0;t1--) {
  222. pgdn:
  223. //Go forward a line (if possible)
  224. old_pos=pos;
  225. while(where[pos]!='\n') pos++;
  226. //At end of current. Is there a next line?
  227. if(where[++pos]==0) {
  228. //Nope.
  229. pos=old_pos;
  230. break;
  231. }
  232. //Yep. Done.
  233. }
  234. break;
  235. case -73://Pageup (by 6 lines)
  236. for(t1=-6;t1<0;t1++) {
  237. pgup:
  238. //Go back a line (if possible)
  239. if(where[pos-1]==1) break;//Can't.
  240. pos--;
  241. //Go to start of this line.
  242. do {
  243. pos--;
  244. } while((where[pos]!='\n')&&(where[pos]!=1));
  245. pos++;
  246. //Done.
  247. }
  248. break;
  249. case -71://Home
  250. t1=-30000;
  251. goto pgup;
  252. case -79://End
  253. t1=30000;
  254. goto pgdn;
  255. default:
  256. nope:
  257. beep();
  258. case 27:
  259. case 0:
  260. break;
  261. }
  262. //Continue?
  263. } while(key!=27);
  264. //Restore screen and exit
  265. restore_screen(current_pg_seg);
  266. }
  267. void scroll_frame(int id,unsigned int pos) {
  268. //Displays one frame of a scroll. The scroll edging, arrows, and title
  269. //must already be shown. Simply prints each line. POS is the position
  270. //of the scroll's line in the text. This is of the center line.
  271. int t1;
  272. unsigned int old_pos=pos;
  273. char far *where;
  274. prepare_robot_mem(!id);
  275. where=&robot_mem[scrolls[id].mesg_location];
  276. m_hide();
  277. //Display center line
  278. fill_line(64,8,12,32+(scroll_base_color<<8),current_pg_seg);
  279. write_line(&where[pos],8,12,scroll_base_color,current_pg_seg);
  280. //Display lines above center line
  281. for(t1=11;t1>=6;t1--) {
  282. fill_line(64,8,t1,32+(scroll_base_color<<8),current_pg_seg);
  283. //Go backward to previous line
  284. if(where[pos]!=1) {
  285. if(where[--pos]=='\n') {
  286. do {
  287. pos--;
  288. } while((where[pos]!='\n')&&(where[pos]!=1));
  289. //At start of prev. line -1. Display.
  290. write_line(&where[++pos],8,t1,scroll_base_color,current_pg_seg);
  291. }
  292. }
  293. //Next line...
  294. }
  295. //Display lines below center line
  296. pos=old_pos;
  297. for(t1=13;t1<=18;t1++) {
  298. fill_line(64,8,t1,32+(scroll_base_color<<8),current_pg_seg);
  299. if(where[pos]==0) continue;
  300. //Go forward to next line
  301. while(where[pos]!='\n') pos++;
  302. //At end of current. If next is a 0, don't show nuthin'.
  303. if(where[++pos])
  304. write_line(&where[pos],8,t1,scroll_base_color,current_pg_seg);
  305. //Next line...
  306. }
  307. m_show();
  308. }
  309. char far scr_nm_strs[5][12]={ " Scroll "," Sign ","Edit Scroll",
  310. " Help ","" };
  311. void scroll_edging(char type) {
  312. //Displays the edging box of scrolls. Type=0 for Scroll, 1 for Sign, 2
  313. //for Edit Scroll, 3 for Help, 4 for Robot (w/o title)
  314. //Doesn't save the screen.
  315. m_hide();
  316. //Box for the title
  317. draw_window_box(5,3,74,5,current_pg_seg,scroll_base_color&240,
  318. scroll_base_color,scroll_corner_color);
  319. //Main box
  320. draw_window_box(5,5,74,19,current_pg_seg,scroll_base_color,
  321. scroll_base_color&240,scroll_corner_color);/* Text on 6 - 18 */
  322. //Shows keys in a box at the bottom
  323. draw_window_box(5,19,74,21+(type==3),current_pg_seg,scroll_base_color&240,
  324. scroll_base_color,scroll_corner_color);
  325. //Fix chars on edging
  326. draw_char(217,scroll_base_color,74,5,current_pg_seg);
  327. draw_char(217,scroll_base_color&240,74,19,current_pg_seg);
  328. //Add arrows
  329. draw_char(16,scroll_pointer_color,6,12,current_pg_seg);
  330. draw_char(17,scroll_pointer_color,73,12,current_pg_seg);
  331. //Write title
  332. write_string(scr_nm_strs[type],34,4,scroll_title_color,current_pg_seg);
  333. //Write key reminders
  334. if(type==2) write_string(": Move cursor Alt+C: Character Esc: Done editing",
  335. 13,20,scroll_corner_color,current_pg_seg);
  336. else if(type<2) write_string(": Scroll text Esc/Enter: End reading",
  337. 21,20,scroll_corner_color,current_pg_seg);
  338. else if(type==3) {
  339. write_string(":Scroll text Esc:Exit help Enter:Select Alt+P:Print",
  340. 13,20,scroll_corner_color,current_pg_seg);
  341. write_string("F1:Help on Help Alt+F1:Table of Contents",
  342. 20,21,scroll_corner_color,current_pg_seg);
  343. }
  344. else write_string(":Scroll text Esc:Exit Enter:Select",21,20,
  345. scroll_corner_color,current_pg_seg);
  346. m_show();
  347. }
  348. void help_display(unsigned char far *help,unsigned int offs,char far *file,
  349. char far *label) {
  350. //Display a help file
  351. unsigned int pos=offs,old_pos,next_pos;//Where
  352. int key,fad=is_faded();
  353. int t1,t2;
  354. char old_keyb=curr_table;
  355. char mclick;
  356. switch_keyb_table(1);
  357. allow_help=0;
  358. //Draw screen
  359. save_screen(current_pg_seg);
  360. if(fad) {
  361. clear_screen(1824,current_pg_seg);
  362. insta_fadein();
  363. }
  364. scroll_edging(3);
  365. //Loop
  366. file[0]=label[0]=0;
  367. do {
  368. //Display scroll
  369. help_frame(help,pos);
  370. mclick=0;
  371. key=getkey();
  372. old_pos=pos;
  373. switch(key) {
  374. case -25://Alt+P
  375. //Print this section
  376. //Find start....
  377. do {
  378. pos--;
  379. } while(help[pos]!=1);
  380. pos++;
  381. if(fputc(10,stdprn)!=10) break;//Error on printer
  382. if(fputc(13,stdprn)!=13) break;//Error on printer
  383. //Print ea. line
  384. do {
  385. next_pos=pos;
  386. while(help[next_pos]!='\n') next_pos++;
  387. //Temp 0 ]
  388. help[next_pos]=0;
  389. if(help[pos]!=255) {
  390. //Normal line.
  391. if(print(&help[pos])) break;
  392. }
  393. else {
  394. pos++;
  395. //Special
  396. switch(help[pos++]) {
  397. case '>':
  398. case '<':
  399. if(fputc('>',stdprn)!='>') break;
  400. if(fputc(' ',stdprn)!=' ') break;
  401. case ':':
  402. pos+=help[pos]+2;
  403. if(print(&help[pos])) break;
  404. break;
  405. case '$':
  406. t1=str_len_color(&help[pos]);
  407. if(t1<80)
  408. for(t2=0;t2<(40-(t1>>1));t2++)
  409. if(fputc(' ',stdprn)!=' ') break;
  410. if(print(&help[pos])) break;
  411. break;
  412. }
  413. }
  414. //Next line?
  415. help[next_pos++]='\n';
  416. pos=next_pos;
  417. } while(help[pos]!=0);
  418. pos=old_pos;
  419. break;
  420. case -59://F1
  421. //Jump to label 000 in HELPONHE.HLP
  422. str_cpy(file,"HELPONHE.HLP");
  423. str_cpy(label,"000");
  424. goto ex;
  425. case -104://Alt+F1
  426. //Jump to label 072 in MAIN.HLP
  427. str_cpy(file,"MAIN.HLP");
  428. str_cpy(label,"072");
  429. goto ex;
  430. case MOUSE_EVENT:
  431. //Move to line clicked on if mouse is in scroll, else exit
  432. if((mouse_event.cy>=6)&&(mouse_event.cy<=18)&&
  433. (mouse_event.cx>=8)&&(mouse_event.cx<=71)) {
  434. mclick=1;
  435. t1=mouse_event.cy-12;
  436. if(t1==0) goto option;
  437. //t1<0 = PGUP t1 lines
  438. //t1>0 = PGDN t1 lines
  439. if(t1<0) goto pgup;
  440. goto pgdn;
  441. }
  442. key=27;
  443. break;
  444. case -72://Up
  445. up_a_line:
  446. //Go back a line (if possible)
  447. if(help[pos-1]==1) break;//Can't.
  448. pos--;
  449. //Go to start of this line.
  450. do {
  451. pos--;
  452. } while((help[pos]!='\n')&&(help[pos]!=1));
  453. pos++;
  454. //Done.
  455. break;
  456. case -80://Down
  457. down_a_line:
  458. //Go forward a line (if possible)
  459. while(help[pos]!='\n') pos++;
  460. //At end of current. Is there a next line?
  461. if(help[++pos]==0) {
  462. //Nope.
  463. pos=old_pos;
  464. break;
  465. }
  466. //Yep. Done.
  467. break;
  468. case 13://Enter
  469. option:
  470. //Option?
  471. if((help[pos]==255)&&((help[pos+1]=='>')||
  472. (help[pos+1]=='<'))) {
  473. //Yep!
  474. if(help[++pos]=='<') {
  475. //Get file and label and exit
  476. t1=0;
  477. pos++;
  478. do {
  479. file[t1++]=help[++pos];
  480. } while(help[pos]!=':');
  481. file[t1-1]=0;
  482. str_cpy(label,&help[pos+1]);
  483. goto ex;
  484. }
  485. //Get label and jump
  486. str_cpy(label,&help[pos+2]);
  487. //Search backwards for a 1
  488. do {
  489. pos--;
  490. } while(help[pos]!=1);
  491. //Search for label OR a \n followed by a \0
  492. do {
  493. pos++;
  494. if(help[pos]==255)
  495. if(help[pos+1]==':')
  496. if(!str_cmp(&help[pos+3],label))
  497. //pos is correct!
  498. goto labdone;
  499. if(help[pos]=='\n')
  500. if(help[pos+1]==0) break;
  501. } while(1);
  502. }
  503. //If there WAS an option, any existing label was found.
  504. labdone:
  505. break;
  506. case -81://Pagedown (by 6 lines)
  507. for(t1=6;t1>0;t1--) {
  508. pgdn:
  509. //Go forward a line (if possible)
  510. old_pos=pos;
  511. while(help[pos]!='\n') pos++;
  512. //At end of current. Is there a next line?
  513. if(help[++pos]==0) {
  514. //Nope.
  515. pos=old_pos;
  516. break;
  517. }
  518. //Yep. Done.
  519. }
  520. if(mclick) goto option;
  521. break;
  522. case -73://Pageup (by 6 lines)
  523. for(t1=-6;t1<0;t1++) {
  524. pgup:
  525. //Go back a line (if possible)
  526. if(help[pos-1]==1) break;//Can't.
  527. pos--;
  528. //Go to start of this line.
  529. do {
  530. pos--;
  531. } while((help[pos]!='\n')&&(help[pos]!=1));
  532. pos++;
  533. //Done.
  534. }
  535. if(mclick) goto option;
  536. break;
  537. case -71://Home
  538. t1=-30000;
  539. goto pgup;
  540. case -79://End
  541. t1=30000;
  542. goto pgdn;
  543. default:
  544. beep();
  545. case 27:
  546. case 0:
  547. break;
  548. }
  549. //Continue?
  550. } while(key!=27);
  551. //Restore screen and exit
  552. ex:
  553. if(fad) insta_fadeout();
  554. restore_screen(current_pg_seg);
  555. allow_help=1;
  556. switch_keyb_table(old_keyb);
  557. }
  558. void help_frame(unsigned char far *help,unsigned int pos) {
  559. //Displays one frame of the help. Simply prints each line. POS is the
  560. //position of the center line.
  561. int t1,t2;
  562. int first=12;
  563. unsigned int next_pos;
  564. m_hide();
  565. //Work backwards to line
  566. do {
  567. if(help[pos-1]==1) break;//Can't.
  568. pos--;
  569. //Go to start of this line.
  570. do {
  571. pos--;
  572. } while((help[pos]!='\n')&&(help[pos]!=1));
  573. pos++;
  574. //Back a line!
  575. first--;
  576. } while(first>6);
  577. //First holds first line pos (6-12) to draw
  578. if(first>6) {
  579. for(t1=6;t1<first;t1++)
  580. fill_line(64,8,t1,32+(scroll_base_color<<8),current_pg_seg);
  581. }
  582. //Display from First to either 18 or end of help
  583. for(t1=first;t1<19;t1++) {
  584. //Fill...
  585. fill_line(64,8,t1,32+(scroll_base_color<<8),current_pg_seg);
  586. //Find NEXT line NOW - Actually get end of this one.
  587. next_pos=pos;
  588. while(help[next_pos]!='\n') next_pos++;
  589. //Temp. make a 0
  590. help[next_pos]=0;
  591. //Write- What TYPE is it?
  592. if(help[pos]!=255) //Normal
  593. color_string(&help[pos],8,t1,scroll_base_color,current_pg_seg);
  594. else {
  595. switch(help[++pos]) {
  596. case '$':
  597. //Centered. :)
  598. t2=str_len_color(&help[++pos]);
  599. color_string(&help[pos],40-(t2>>1),t1,scroll_base_color,
  600. current_pg_seg);
  601. break;
  602. case '>':
  603. case '<':
  604. //Option- Jump to AFTER dest. label/file
  605. pos+=help[++pos]+2;
  606. //Now show, two spaces over
  607. color_string(&help[pos],10,t1,scroll_base_color,current_pg_seg);
  608. //Add arrow
  609. draw_char('',scroll_arrow_color,8,t1,current_pg_seg);
  610. break;
  611. case ':':
  612. //Label- Jump to mesg and show
  613. pos+=help[++pos]+2;
  614. color_string(&help[pos],8,t1,scroll_base_color,current_pg_seg);
  615. break;
  616. }
  617. }
  618. //Now fix EOS to be a \n
  619. help[next_pos]='\n';
  620. //Next line...
  621. if(help[(pos=(++next_pos))]==0) break;
  622. }
  623. if(t1<19) {
  624. for(t1+=1;t1<19;t1++)
  625. fill_line(64,8,t1,32+(scroll_base_color<<8),current_pg_seg);
  626. }
  627. m_show();
  628. }