This topic is now archived and is closed to further replies.

moving rect

This topic is 5306 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

hi i want a little white moving rectangle, so i so: int secure=4; while((ddrval=surf->Blt(&act->pos,NULL,NULL,DDBLT_COLORFILL |DDBLT_ASYNC ,&fxblank))!=DD_OK) { secure--; if(!secure) break; Sleep(0); } now for the next frame, i want the little rect to move, so i do: lastpos=act->pos; act->; act->pos.left+=fixvx+.5f; act->pos.bottom+=fixvy+.5f; act->pos.right+=fixvx+.5f; now i want to erase the first rect, before drawing the new rect, so i do: secure=4; while(((ddrval=surf->Blt(&lastpos,NULL,NULL,DDBLT_COLORFILL |DDBLT_ASYNC ,&fxblank))!=DD_OK)) { secure--; if(!secure) break; Sleep(0); } but this does not work. what i am doing wrong?

Share this post

Link to post
Share on other sites