Два перса в одном мульте
This commit is contained in:
parent
344484e9ab
commit
5b3e27ba34
1 changed files with 23 additions and 0 deletions
|
@ -22,6 +22,7 @@ struct Person
|
|||
};
|
||||
|
||||
Person per;
|
||||
Person per1;
|
||||
|
||||
|
||||
int main()
|
||||
|
@ -37,6 +38,18 @@ int main()
|
|||
per.ampl_y = 150;
|
||||
per.ampl_x = 10;
|
||||
|
||||
|
||||
per1.x = 50;
|
||||
per1.y = 50;
|
||||
per1.angle = 0;
|
||||
per1.nomer_kadra = 0;
|
||||
per1.texture = txLoadImage("Pictures\\Personaj.bmp");
|
||||
per1.MID_x = 500;
|
||||
per1.MID_y = 300;
|
||||
per1.rad = 200;
|
||||
per1.skorost = 10;
|
||||
|
||||
|
||||
while (!GetAsyncKeyState(VK_ESCAPE))
|
||||
{
|
||||
txSetColor(TX_RED);
|
||||
|
@ -55,10 +68,20 @@ int main()
|
|||
per.nomer_kadra = 0;
|
||||
}
|
||||
|
||||
|
||||
per1.angle++;
|
||||
per1.x = per1.MID_x + per1.rad * cos (per1.angle / per1.skorost);
|
||||
per1.y = per1.MID_y + per1.rad * sin (per1.angle / per1.skorost);
|
||||
|
||||
txTransparentBlt(txDC(), per1.x, per1.y, 55, 86, per1.texture, 0, 0, RGB(0, 255, 255));
|
||||
|
||||
|
||||
txSleep(10);
|
||||
txSleep(10);
|
||||
}
|
||||
|
||||
txDeleteDC(per.texture);
|
||||
txDeleteDC(per1.texture);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue