EY> The following works well and is also fairly fast:
EY> void Plot_Pixel(int x, int y, char color)
EY> {
EY> // using the fact that 320*y = 256*y + 64*y = y<<8 +y<<6.
EY> video_buffer[((Y<<8) + (y<<6)) + x] = color;
EY> }
You should actually #define a similar Plot_Pixel as this one has too
much overhead for some cpu's. (ie. a far jump, pushing and popping the
stack etc). The #define is usually a lot faster method.
Danial.
___
X SLMR 2.1a X
--- Maximus/2 3.00
---------------
* Origin: Hunter Connection OS/2 BBS 24hrs (049) 57-1801 (3:622/403)
|