TIP: Click on subject to list as thread! ANSI
echo: c_plusplus
to: ERIC YALE
from: DANIAL GIBSON
date: 1997-04-11 21:00:00
subject: Video

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)

SOURCE: echomail via exec-pc

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.