tr@thumper.UUCP (03/28/87)
[] I am cross-posting this to comp.sys.ibm.pc, mod.graphics and comp.graphics. I am having a problem with the HALO graphics function package. My system includes: IBM PC/AT JRAM card with 2 MB memory; 512 KB is devoted to DOS Talltree's JRAM and JLASER device driver software, version 3.8 Canon LBP8 laser printer IBM EGA card with 256 KB memory Lattice C compiler version 3.1 using large memory model IBM DOS version 3.20 (the disk says version 3.21) Version 2.26b of the file HALOIBME.DEV Version 2.26 of the rest of Halo for Lattice C version 3. The problem is that I try to use two separate video pages of EGA memory and the package does not seem to support this, regardless of what the manual and the tech support person claim. Calls to display page 1 result in displaying the same old page. These pages are said to be numbered from 1 to 2 by the tech support person, not 0 to 1. I have tried using what the she said but the enclosed program uses 0 and 1. Calls to inqscreen and inqpage sometimes result in numbers such as 300. They don't seem to be reproducible. Yes, I know enough to pass addresses of values to Halo functions, not the values. Halo functions work this way. I want to be able to display something on the inactive page, then swap that page into the active screen memory. This would make for fast screen updates. Many commercial programs have succeeded in doing this. Is the Halo package at fault or is it my code or configuration? The code below displays two boxes on the screen at the same time! They should instead swap between keystrokes. #include <stdio.h> main() { int color, x1, y1, x2, y2; int pri_scr = 0, alt_scr = 1, pri_dis = 0, alt_dis = 1; int c, i; tr_initgr(); /* This just calls the initgraphics routine. */ x1 = 10, y1 = 10, x2 = 100, y2 = 100; color = 2; setscreen(&pri_scr); display(&pri_dis); setcolor(&color); bar(&x1, &y1, &x2, &y2); setscreen(&alt_scr); color = 4; x1 = 100, y1 = 100, x2 = 300, y2 = 300; setcolor(&color); bar(&x1, &y1, &x2, &y2); display(&alt_dis); for (i = 0; i < 8; i++) { c = getch(); display(&pri_dis); c = getch(); display(&alt_dis); } tr_closegraphics(); /* This just calls the closegraphics routine. */ } Tom Reingold INTERNET: tr@bellcore.com -------- UUCP: ---- watmath!clyde!bellcore\ ucbvax\ \ lll-lcc\ ihnp4!mhuxt!ulysses!faline!flash!tr seismo!rutgers!mit-eddie!allegra/ -- Tom Reingold Internet: tr@bellcore.com Uucp: ..!allegra!ulysses!faline!flash!tr -- Tom Reingold Internet: tr@bellcore.com Uucp: ..!allegra!ulysses!faline!flash!tr