Hi,
Im writing a program to diplay a brick wall, problem is I cant seem to get \\\" every other\\\" row to appear to shift to the right/left. To truly look like a wall of bricks. ( is this confusing?) here is my code
#include \\\"DarkGDK.h\\\"
void DarkGDK()
{
int x,y,z;
int Max_X= 639;
int Max_Y= 479;
int width= 60;
int height= 40;
const DWORD red = dbRGB(255,0,0);
const DWORD black = dbRGB(255,255,255);
for(y = 0; y <= Max_Y; y+= 43)
{
for(x = 0; x <= Max_X;x+= 63)
{
dbInk(red,black);
dbBox(x,y ,x+ width,y+ height);
}
}
dbWaitKey();
}
I though to add this to make every other row shift the x position to -30,
** if(y%2 != 0) **
{
x = -30;
}
it doesnt seem to work if I place it within the outer or inner loop, can anyone help?
AfterLife
AfterLife