Merge pull request #3 from IngenerkaTeamCenter/2-заготовки-мульта
2 заготовки мульта
This commit is contained in:
commit
ce35402bff
2 changed files with 79 additions and 0 deletions
35
WindowsFormsApplication1/WindowsFormsApplication1/Mult.cpp
Normal file
35
WindowsFormsApplication1/WindowsFormsApplication1/Mult.cpp
Normal file
|
@ -0,0 +1,35 @@
|
||||||
|
#include "TXLib.h"
|
||||||
|
|
||||||
|
int main()
|
||||||
|
{
|
||||||
|
txCreateWindow(800, 600);
|
||||||
|
|
||||||
|
HDC texture = txLoadImage("Pictures\\Personaj.bmp");
|
||||||
|
|
||||||
|
int textureX = 10;
|
||||||
|
int textureY = 10;
|
||||||
|
int nomer_kadra = 0;
|
||||||
|
|
||||||
|
while (textureX < 1000)
|
||||||
|
{
|
||||||
|
txSetColor(TX_RED);
|
||||||
|
txSetFillColor(TX_RED);
|
||||||
|
txRectangle(0, 0, txGetExtentX(), txGetExtentY());
|
||||||
|
|
||||||
|
txTransparentBlt(txDC(), textureX, textureY, 55, 86, texture, 55 * nomer_kadra, 0, RGB(0, 255, 255));
|
||||||
|
textureX++;
|
||||||
|
nomer_kadra++;
|
||||||
|
|
||||||
|
if (nomer_kadra > 2)
|
||||||
|
{
|
||||||
|
nomer_kadra = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
txSleep(10);
|
||||||
|
}
|
||||||
|
|
||||||
|
txDeleteDC(texture);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
|
@ -0,0 +1,44 @@
|
||||||
|
#include "TXLib.h"
|
||||||
|
|
||||||
|
int main()
|
||||||
|
{
|
||||||
|
txCreateWindow(800, 600);
|
||||||
|
|
||||||
|
HDC texture = txLoadImage("Pictures\\Personaj.bmp");
|
||||||
|
|
||||||
|
double textureX = 50;
|
||||||
|
double textureY = 50;
|
||||||
|
double angle = 0;
|
||||||
|
double nomer_kadra = 0;
|
||||||
|
|
||||||
|
while (!GetAsyncKeyState(VK_ESCAPE))
|
||||||
|
{
|
||||||
|
txSetColor(TX_RED);
|
||||||
|
txSetFillColor(TX_RED);
|
||||||
|
txRectangle(0, 0, txGetExtentX(), txGetExtentY());
|
||||||
|
/*textureX++;
|
||||||
|
textureY = 300 + 150 * sin(textureX / 10);*/
|
||||||
|
|
||||||
|
angle++;
|
||||||
|
textureX = 500 + 200 * cos (angle / 10);
|
||||||
|
textureY = 300 + 200 * sin (angle / 10);
|
||||||
|
|
||||||
|
txTransparentBlt(txDC(), textureX, textureY, 55, 86, texture, 55 * nomer_kadra, 0, RGB(0, 255, 255));
|
||||||
|
|
||||||
|
|
||||||
|
////////////////////////////////////////////////
|
||||||
|
nomer_kadra++;
|
||||||
|
|
||||||
|
if (nomer_kadra > 2)
|
||||||
|
{
|
||||||
|
nomer_kadra = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
txSleep(10);
|
||||||
|
}
|
||||||
|
|
||||||
|
txDeleteDC(texture);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue