I'm still a little new to evc++,
and I thought the following code would work? draw_object return a bool, as is "d"
but instead I had to:
why?
and I thought the following code would work? draw_object return a bool, as is "d"
- Code:
d = draw_object(sx+dirx,sy+diry) || draw_object(sx,sy);
//update screen
if (d)
{
update_screen();
//wait a little more....
wait_msec(40);
}
but instead I had to:
- Code:
d = draw_object(sx+dirx,sy+diry);
if (d) draw_object(sx,sy); else d = draw_object(sx,sy);
//update screen
if (d)
{
update_screen();
//wait a little more....
wait_msec(40);
}
why?