Hello. I am having trouble with this little test program I made. It involves some rectangles, checks collisions and other stuff. Everything works fine, except that after a while, All the rectangles on screen go blank, leaving only their lines. I dont know what causes this, but I guess it may be a leak because when I see the program in Task Manager the memory that is dedicated to it continuously grows, until the glitch happens, then it stays the same.
Done in C, using windows.h and Dev-C++
Here is my Paint routine, I assume the trouble is here, but in case I included the whole code as an attachment.
HDC hdc,hdcBuffer;
PAINTSTRUCT ps;
static RECT re,re2,check,check2,bala,cr,arrast,drop,screen;
static int xx;
static int yy;
static int contador,scon;
static int disparo;
static int xdis,ydis,dx,dy;
static int flag1=0,flag2=0,flag3=0,flag4=0,flag5=0,flag6=0,flag7=0,flag8=0,flag9=0;
static HBRUSH brs;
static HBITMAP hbmBuffer,hbmOldBuffer;
static HINSTANCE hInstance;
static POINTS maus;
static POINT mauss;
Sorry if its a mess, but I was just testing around, and I got tired of not figuring this out. Thanks.