🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

VBE/AF coding problem

Started by
-1 comments, last by FlyFire 24 years, 10 months ago
Hi
I have some problems using VBE/AF driver:
I'v load the driver, map all needed memory and initiate it.
Then i initiate video mode 640x480x8 with the following code:
int res = af_driver->SetVideoMode(0x4101,640,480,&bpp,1,NULL);
Mode seems to be initiated ok, but when i'm trying to fill it with random pixels using this code:
char *surface = af_driver->LinearMem;
for(int i = 0; i<(640*480); i++)
surface = rand()%255;<BR>i get screen filled on ~25% (like vertical screen size is larger 4 times than 480 pixels)<BR>Also i can't get DrawLine function to work. I call it but don't see results.<P>Anybody can help?<BR>Thanx,<BR>FlyFire/CodeX<BR> <A HREF="http://codexorg.webjump.com" TARGET=_blank>http://codexorg.webjump.com</A> <BR>

This topic is closed to new replies.

Advertisement