Character redefinition

new topic     » topic index » view thread      » older message » newer message

>Here's a chance for me to show my ignorance: how do you redefine the
>character set in graphics mode? I know that it can be done, but it's a
>little bit different than text mode, and I can't quite figure it out.
>
>Thanks.
>
> -- David Cuny

David, I only know how to do so in two ways.

The first way, and my preferred method, is to do it on graphic mode terms.
This means treating it like a tiny graphic image. In my putsxy() routine,
each character of a string I am trying to "print" is scanned against
a character table using the find() command. If the returned value
from find() is nonzero, that value is used to index a specific
display_image() sequence in a 3-D sequence. That image
is then displayed on the screen. The beauty of this method is that
remapping is done at the application level. I can redefine any
"character-image" with a custom character or even a graphic image like
one of those yellow round "smile!" faces without changing the character
table. The disadvantage is, because you are playing with small graphic
images and not actual text, it can be quite slow (unless you batch the
images into fewer display_image() operations).

The second is a more efficient way, but not my preference because it
involves accessing the system at a lower level. It is possible to remap
the keyboard characters by altering the actual bits that make up a
character shape. I am not sure where at the machine level this is stored,
so I will let someone jump in at this point to offer suggestions. I'm not
as fluent in Assembler as I am in Euphoria. However, I once had a friend's
assembler program that allowed me to do this but I misplaced his code. But
I know it can be done at the hardware level. If you like, I'll ask a few
friends who are ASsembler giants to tell me how to do this.

Thanks

David Gay
http://www.interlog.com/~moggie/Euphoria
"A Beginner's Guide To Euphoria"

new topic     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu