Ok heres some more detail...
I break at MoveSnake;Code:case WM_TIMER: InvalidateRect(hwnd,NULL,TRUE); SetRect(&rect,pt[0][0].x,pt[0][0].y,pt[0][1].x,pt[0][1].y); int check; check = CheckHit(pt,iSnakeSize,rect); MoveSnake(pt,iDirect,iSnakeSize); if((check==0) | WallHit(pt[0] )) { KillTimer(hwnd,1); MessageBox(hwnd,szBuffer,szAppName,MB_OK|MB_ICONINFORMATION); iDirect = 4; NewGame(&bFoodOnScreen,&iDirect,&iSnakeSize,pt,&iScore); } return 0;
Everythings normal;
Everything normal upto return 0;
"No source code available"
Breakpoint at switch (msg) of WndProc
Step Into;
Takes me to WM_PAINT:
Step Into : hdc = BeginPaint(hwnd,&ps);
Step Into again : I am returned back to switch(msg) (??) (The rest of the code of WM_PAINT is not executed)(??)
Step Into again : msg = 20;
Step Into : DefWindowProc();
Step Into again : At this time pt[0][0].x is -256




Reply With Quote