Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void animationK(void)
- {
- int x = 1, y = 1;
- DWORD t1, t2;
- t1 = GetTickCount(); // Checks the PC time
- do { // Next, set up a while loop that only ends when key_pressed is ESC
- t2 = GetTickCount(); // Checks the PC time
- if (t2 - t1 > 50)
- { // If t2 take t1 are less than onehundred...
- t1 = t2; // ... make T1 the same as T2 and continue
- if (KEY_DOWN(VK_UP))
- { // If the key down is vk_up...
- y--; // ... incriment down y
- }
- if (KEY_DOWN(VK_DOWN))
- { // If the key down is vk_down...
- y++; // ... incriment up y
- }
- if (KEY_DOWN(VK_LEFT))
- { // If the key down is vk_left...
- x--; // ... incriment down x
- }
- if (KEY_DOWN(VK_RIGHT))
- { // If the key down is vk_right...
- x++; // ... incriment up x
- }
- if (x > 80)
- { // if x is greater than 110...
- x = 80; // ... set x to 110
- }
- if (y > 25)
- { // if y is greater than 15...
- y = 25; // ... set y to 15
- }
- if (x < 1)
- { // if x is less than 1...
- x = 1; // ... set x to 1
- }
- if (y < 1)
- { // if y is less than 1...
- y = 1; // ... set y to 1
- }
- clrscr();
- Kiby(x, y);
- }
- } while (!KEY_DOWN(VK_ESCAPE)); clrscr();
- }
- void Kiby(int,int )
- {
- //outline
- hline(10, 3, 10, 10);
- hline(20, 4, 10, 1);
- hline(21, 5, 10, 1);
- hline(22, 6, 10, 2);//hunle
- vline(24, 7, 10, 2); //hubble
- hline(22, 9, 10, 2);//hubble
- //inside the hat thing
- hline(10, 4, 12, 10);
- hline(10, 5, 12, 11);
- hline(9, 5, 12, 12);
- hline(9, 6, 12, 13);
- //hline(17, 6, 15, 3);
- hline(11, 7, 15, 7);
- hline(18, 7, 12, 4);
- hline(18, 8, 12, 2);
- hline(17, 8, 15, 1);
- //pinkish bosy
- hline(8, 7, 13, 3);
- hline(6, 8, 13, 11);
- hline(7, 9, 13, 1);
- hline(9, 9, 13, 6);
- hline(16, 9, 13, 4);
- hline(7, 10, 13, 6);
- hline(7, 11, 13, 6);
- hline(7, 12, 13, 4);
- hline(7, 13, 13, 7);
- hline(15, 13, 13, 6);
- hline(16, 11, 13, 4);
- hline(16, 10, 13, 3);
- hline(18, 12, 13, 4);
- hline(15, 14, 13, 6);
- hline(8, 14, 13, 6);
- vline(14, 10, 13, 2);
- hline(13, 12, 13, 3);
- //eys
- vline(13, 9, 10, 3);
- vline(15, 9, 10, 3);
- // bottom half
- hline(7, 15, 13, 11);
- hline(7, 16, 13, 10);
- hline(8, 17, 13, 9);
- hline(9, 18, 13, 8);
- hline(11, 19, 13, 4);
- //mouths
- vline(14, 13, 10, 2);
- //cheeks
- hline(11, 12, 12, 2);
- hline(16, 12, 12, 2);
- // right foot
- hline(20, 8, 10, 2);
- vline(19, 9, 10, 2);
- hline(20, 11, 10, 1);
- vline(21, 12, 10, 7);
- hline(18, 15, 10, 4);
- hline(17, 16, 10, 1);
- vline(16, 17, 10, 5);
- hline(15, 19, 10, 1);
- hline(17, 21, 10, 2);
- hline(20, 19, 10, 1);
- hline(19, 20, 10, 1);
- hline(12, 20, 10, 4);
- //inside the foot
- hline(18, 16, 13, 3);
- hline(17, 17, 13, 4);
- hline(17, 18, 13, 4);
- hline(17, 19, 13, 3);
- hline(17, 20, 13, 2);
- /// inside of the foot
- hline(8, 19, 13, 2);
- hline(7, 20, 13, 5);
- // left foot
- hline(10, 19, 10, 2);
- hline(8, 17, 10, 1);
- hline(8, 18, 10, 2);
- hline(7, 19, 10, 1);
- hline(6, 20, 10, 1);
- hline(7, 21, 10, 5);
- //system("color c6");
- //left side
- vline(7, 14, 10, 3);
- vline(6, 8, 10, 6);
- hline(7, 7, 10, 2);
- hline(8, 9, 10, 1);
- vline(9, 4, 10, 3);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement