Consider the code below written in C for bltting images
I am writing a graphics library for mode 13h (320x200x256)
for(y=0; y<diff_y; y++)
for(x=0; x<diff_x; x++)
pixel = image_buffer[x];
if(pixel!=transprant) // tests for transprancy
video_buffer[xs] = pixel;
there is some more code that does the clipping but this code actually performs bltting. B'cos i have to test for transprancy the inner loop is required which is really a overhead. Is there a way to optimize this fuction. I don't think we can use hardware accleration in DOS to perform bltting, like in DirectX's (Blt() function).
Is there any better / fast method to blt images.i don't know assembly language so i want to do it with C only.