[fpc-pascal]ocrt question

Alex Dingle adingle at crud.net
Sat Jun 28 18:13:19 CEST 2003


Hello.  I'm currently in the process of porting an old DOS game to
linux using fpc and the ocrt module.  The game makes extensive use of
high ascii characters.

Sometimes, if I do : nwriteAC(nscreen, x, y, color, char1); char2 :=
byte((nReadScr(x,y,1))[1]);

char2 will be different from char1, because free pascal or ncurses is
remapping the character before displaying it to the screen.

Unfortunately this breaks the program in certain places, as the
program frequently relies on data read from the screen in its internal
logic.

I am wondering if perhaps there is some method of querying for the
"original character value" that was last written to some x,y position
of a text window using an output procedure (such as write, writeln, or
nwriteAC) and not the remapped value that was actually displayed there
via ncurses.

Thanks.

-Alex




More information about the fpc-pascal mailing list