Два перса в одном мульте

This commit is contained in:
Voltronormu 2018-03-06 16:19:12 +03:00 committed by GitHub
parent 344484e9ab
commit 5b3e27ba34
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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;
}