in reply to Re: Optimizing a Text Canvas: An inner loop and a cloner
in thread Optimizing a Text Canvas: An inner loop and a cloner
Wow - great ideas...I'll work in trying them out ASAP.
BTW, the AS_BG and AS_FG fields hold standard ANSI FG/BG color codes - e.g. ^[Xm, where X is 30-37 for FG and 40-47 for BG. So, yes, the BG and FG fields could be converted to an integer 0-7 or 10-17, then just add 30 to the resulting output. (Or just use 30-37, 40-47 for the values themselves - doesn't save any bytes to use 0-17.)
However, I've never been very good with bitfields - could you be so kind as to offer a code example of how using bitfields would work? (My apologies for the simplistic question.)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Optimizing a Text Canvas: An inner loop and a cloner
by dsheroh (Monsignor) on Jul 06, 2007 at 16:00 UTC | |
by dsheroh (Monsignor) on Jul 06, 2007 at 17:51 UTC | |
by JosiahBryan (Novice) on Jul 06, 2007 at 16:10 UTC | |
|
Re^3: Optimizing a Text Canvas: An inner loop and a cloner
by JosiahBryan (Novice) on Jul 06, 2007 at 17:27 UTC |