What to do if I want to return color of a pixel....
byte get_pixel(int x, int y)
{
/* y*320 = y*256 + y*64 = y*2^8 + y*2^6 */
return VGA[(y<<8)+(y<<6)+x];
}
I have the pixel but I want to get the color of the pixel ! ! ? ? ! ! !
What to do if I want to return color of a pixel....
byte get_pixel(int x, int y)
{
/* y*320 = y*256 + y*64 = y*2^8 + y*2^6 */
return VGA[(y<<8)+(y<<6)+x];
}
I have the pixel but I want to get the color of the pixel ! ! ? ? ! ! !
I use Borland 5.02
ummm....that function you posted should totally work...is it not working for some reason? make sure that VGA is the buffer you are working off of...
maybe there is another problem... what errors are you getting?
hasafraggin shizigishin oppashigger...