Page 1 of 1

New function: draw_array()

PostPosted: Tue Sep 27, 2011 2:35 pm
by Game A Gogo
Currently, drawing images with for loops and putpixel and painfully CPU demanding, limiting our (Maybe mostly mine...) creativity in games.
Imagine having great effects like gradual fuzziness being drawn very quickly with codes!

Perhaps allow us to draw a whole array at once
Code: Select all
draw_array(unsigned int Width,unsigned int Height, unsigned char Red,unsigned char Green, unsigned char Blue, unsigned char Alpha)

Red,Green,Blue and Alpha would be arrays

exemple would be:
Code: Select all
unsigned char IMG[4][128][128];
draw_array(128,128,IMG[0],IMG[1],IMG[2],IMG[3]);


of course, I can create a function in global code that would do this, but the CPU processing is very painful.
Like I noticed distance(x1,y1,x2,y2); takes almost half the CPU processing needed than doing sqrt(pow(x2-x1,2)+pow(y2-y1,2));
so having a GE function would most likely increase performance!

Re: New function: draw_array()

PostPosted: Tue Sep 27, 2011 10:35 pm
by SuperSonic
That would be cool :D

Re: New function: draw_array()

PostPosted: Fri Sep 30, 2011 6:11 pm
by lcl
That'd be very useful! :)