Guest User

arcagem

a guest
May 30th, 2026
111
0
Never
6
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 9.75 KB | Software | 0 0
  1. #include <graphics.h>
  2. #include <stdlib.h>
  3. #include <stdio.h>
  4. #include <string.h>
  5. #include <conio.h>
  6. #include <dos.h>
  7.  
  8. // Љ®­бв ­вл ЁЈал
  9. #define SCREEN_W 640
  10. #define SCREEN_H 480
  11. #define PADDLE_W 72
  12. #define PADDLE_H 10
  13. #define BALL_R   6
  14. #define BRICK_W  60
  15. #define BRICK_H  20
  16. #define ROWS     5
  17. #define COLS     9
  18. #define KEY_ESC  27
  19. #define KEY_LEFT 75
  20. #define KEY_RIGHT 77
  21.  
  22. // ‘вагЄвгал
  23. struct Ball {
  24.     int x, y;
  25.     int dx, dy;
  26.     int color;
  27. };
  28.  
  29. struct Paddle {
  30.     int x, y;
  31.     int speed;
  32.     int color;
  33. };
  34.  
  35. struct Brick {
  36.     int x, y;
  37.     int active;
  38.     int color;
  39. };
  40.  
  41. // ѓ«®Ў «м­лҐ ЇҐаҐ¬Ґ­­лҐ
  42. struct Ball ball;
  43. struct Paddle paddle;
  44. struct Brick bricks[ROWS][COLS];
  45. int score = 0;
  46. int lives = 3; // Љ®«ЁзҐбвў® ¦Ё§­Ґ©
  47. int level = 1;
  48.  
  49. // Џа®в®вЁЇл дг­ЄжЁ© (¤«п Ї®ап¤Є )
  50. void drawPaddle(int color);
  51. void drawBall(int x, int y, int color);
  52. void drawUI();
  53.  
  54. void drawBorders() {
  55.     setcolor(WHITE);
  56.     rectangle(0, 18, SCREEN_W-1, SCREEN_H - 2);
  57. }
  58.  
  59. void vyhod(int isgetch)
  60. {
  61.     if (isgetch) getch();
  62.     closegraph();
  63.     textmode(C80);
  64.     exit(0);
  65. }
  66.  
  67. // ‘Ўа®б Ї®§ЁжЁ© ¬пз  Ё а ЄҐвЄЁ (¤«п ­®ў®© ¦Ё§­Ё)
  68. void resetRound() {
  69.     // –Ґ­ваЁа㥬 а ЄҐвЄг
  70.     paddle.speed = 15;
  71.     paddle.color = LIGHTGREEN;
  72.  
  73.     // –Ґ­ваЁа㥬 ¬пз
  74.     //ball.x = SCREEN_W / 2;
  75.     //ball.y = SCREEN_H / 2;
  76.     //ball.dx = 3;
  77.     //ball.dy = -3;
  78.     ball.x = paddle.x + PADDLE_W / 2;
  79.     ball.y = paddle.y - BALL_R - 1;
  80.     ball.dx = 3;
  81.     ball.dy = -3;
  82.     ball.color = WHITE;
  83.  
  84.     // ЋзЁй Ґ¬ Ё ЇҐаҐаЁб®ўлў Ґ¬
  85.     drawPaddle(BLACK); // ‘вҐаҐвм бв аго, Ґб«Ё Ўл« 
  86.     drawBall(ball.x, ball.y, BLACK); // ‘вҐаҐвм бв ал© ¬пз
  87.  
  88.     drawPaddle(paddle.color);
  89.     drawBall(ball.x, ball.y, ball.color);
  90. }
  91.  
  92. // ЏҐаў®­ з «м­ п Ё­ЁжЁ «Ё§ жЁп (б®§¤ ­ЁҐ ЄЁаЇЁзҐ©)
  93. void initGame() {
  94.     int i, j;
  95.     //score = 0;
  96.     //lives = 3;
  97.  
  98.     paddle.x = SCREEN_W / 2 - PADDLE_W / 2;
  99.     paddle.y = SCREEN_H - 30;
  100.  
  101.  
  102.     resetRound();
  103.  
  104.     // ‘®§¤ ­ЁҐ ЄЁаЇЁзҐ©
  105.     for (i = 0; i < ROWS; i++) {
  106.     for (j = 0; j < COLS; j++) {
  107.         bricks[i][j].x = 35 + j * (BRICK_W + 5);
  108.         bricks[i][j].y = 50 + i * (BRICK_H + 5); // —гвм ­Ё¦Ґ, зв®Ўл ¬Ґбв® ¤«п UI Ўл«®
  109.         bricks[i][j].active = 1;
  110.         bricks[i][j].color = i + 9;
  111.     }
  112.     }
  113. }
  114. //risuem simvol
  115. int gc(char a, int x, int y, int color)
  116. {
  117. setcolor(color);
  118. switch(a)
  119. {
  120.     case '0':
  121.     line(x+1, y, x+3, y);
  122.     line(x+4, y+1, x+4, y+6);
  123.     line(x+1, y+7, x+3, y+7);
  124.     line(x, y+1, x, y+6);
  125.     return 5;
  126.     case '1':
  127.     line(x, y, x, y+7);
  128.     return 1;
  129.     case '2':
  130.     line(x, y, x+3, y);
  131.     line(x+4, y+1, x+4, y+3);
  132.     line(x, y+7, x+4, y+3);
  133.     line(x, y+7, x+4, y+7);
  134.     return 5;
  135.     case '3':
  136.     line(x, y, x+3, y);
  137.     line(x+4, y+1, x+4, y+2);
  138.     line(x+1, y+3, x+3, y+3);
  139.     line(x+4, y+4, x+4, y+6);
  140.     line(x, y+7, x+3, y+7);
  141.     return 5;
  142.     case '4':
  143.     line(x, y, x, y+3);
  144.     line(x+1, y+3, x+3, y+3);
  145.     line(x+4, y, x+4, y+7);
  146.     return 5;
  147.     case '5':
  148.     line(x, y, x+4, y);
  149.     line(x, y, x, y+3);
  150.     line(x, y+3, x+3, y+3);
  151.     line(x+4, y+4, x+4, y+6);
  152.     line(x, y+7, x+3, y+7);
  153.     return 5;
  154.     case '6':
  155.     line(x, y+5, x+5, y);
  156.     line(x, y+5, x, y+6);
  157.     line(x+1, y+7, x+4, y+7);
  158.     line(x+5, y+4, x+5, y+6);
  159.     line(x+5, y+4, x+3, y+2);
  160.     return 6;
  161.     case '7':
  162.     line(x, y, x+4, y);
  163.     line(x, y+4, x+4, y+1);
  164.     line(x, y+4, x, y+7);
  165.     return 5;
  166.     case '8':
  167.     line(x+1, y, x+3, y);
  168.  
  169.     line(x, y+1, x, y+2);
  170.     line(x+4, y+1, x+4, y+2);
  171.  
  172.     line(x+1, y+3, x+3, y+3);
  173.  
  174.     line(x, y+4, x, y+6);
  175.     line(x+4, y+4, x+4, y+6);
  176.  
  177.     line(x+1, y+7, x+3, y+7);
  178.     return 5;
  179.     case '9':
  180.     line(x+1, y, x+4, y);
  181.     line(x, y+1, x, y+2);
  182.     line(x+5, y+1, x+5, y+2);
  183.     line(x, y+7, x+5, y+2);
  184.     line(x, y+2, x+2, y+4);
  185.     return 6;
  186. }
  187. return 0;
  188. }
  189.  
  190.  
  191. // ЋваЁб®ўЄ  Ё­вҐадҐ©б  (‘зҐв Ё †Ё§­Ё)
  192. void drawUI() {
  193.     char buflives[20], bufscore[20], buflevel[20];;
  194.  
  195.     // ‘вЁа Ґ¬ ®Ў« бвм ⥪бв  (ўҐае­пп Ї®«®бЄ )
  196.     setfillstyle(SOLID_FILL, BLACK);
  197.     bar(0, 0, SCREEN_W, 30);
  198.  
  199.     // ЏЁиҐ¬ ⥪бв
  200.     setcolor(WHITE);
  201.     settextstyle(DEFAULT_FONT, HORIZ_DIR, 1); // ‘в ­¤ ав­л© иаЁдв
  202.  
  203.     sprintf(buflives, "%d", lives);
  204.     sprintf(bufscore, "%d", score);
  205.     sprintf(buflevel, "%d", level);
  206.  
  207.     outtextxy(20, 10, "LIVES:");
  208.     int cntr = 0;
  209.     for(int i=0; i < strlen(buflives); i++)
  210.     cntr += gc(buflives[i], 70+cntr, 9, WHITE)+1;
  211.  
  212.     cntr = 0;
  213.  
  214.     outtextxy(99, 10, "SCORE:");
  215.     for(int j=0; j < strlen(bufscore); j++)
  216.     cntr += gc(bufscore[j], 150+cntr, 9, WHITE)+1;
  217.  
  218.     cntr = 0;
  219.  
  220.     outtextxy(179, 10, "LEVEL:");
  221.     for(int k=0; k < strlen(buflevel); k++)
  222.     cntr += gc(buflevel[k], 230+cntr, 9, WHITE)+1;
  223. }
  224.  
  225. void drawPaddle(int color) {
  226.     setfillstyle(SOLID_FILL, color);
  227.     setcolor(color);
  228.     bar(paddle.x, paddle.y, paddle.x + PADDLE_W, paddle.y + PADDLE_H);
  229. }
  230.  
  231. void drawBall(int x, int y, int color) {
  232.     setfillstyle(SOLID_FILL, color);
  233.     setcolor(color);
  234.     fillellipse(x, y, BALL_R, BALL_R);
  235. }
  236.  
  237. void drawBrick(int r, int c) {
  238.     if (bricks[r][c].active) {
  239.     setfillstyle(SOLID_FILL, bricks[r][c].color);
  240.     setcolor(WHITE);
  241.     bar(bricks[r][c].x, bricks[r][c].y,
  242.         bricks[r][c].x + BRICK_W, bricks[r][c].y + BRICK_H);
  243.     rectangle(bricks[r][c].x, bricks[r][c].y,
  244.           bricks[r][c].x + BRICK_W, bricks[r][c].y + BRICK_H);
  245.     } else {
  246.     setfillstyle(SOLID_FILL, BLACK);
  247.     setcolor(BLACK);
  248.     bar(bricks[r][c].x, bricks[r][c].y,
  249.         bricks[r][c].x + BRICK_W, bricks[r][c].y + BRICK_H);
  250.     }
  251. }
  252.  
  253. void drawAllBricks() {
  254.     int i, j;
  255.     for (i = 0; i < ROWS; i++) {
  256.     for (j = 0; j < COLS; j++) {
  257.         drawBrick(i, j);
  258.     }
  259.     }
  260. }
  261.  
  262. // ‹®ЈЁЄ  ЁЈал
  263. void update(int keypress)
  264. {
  265.     int i, j;
  266.  
  267.     drawBorders();
  268.  
  269.     drawBall(ball.x, ball.y, BLACK); // ‘вҐаҐвм ¬пз
  270.  
  271.     ball.x += ball.dx;
  272.     ball.y += ball.dy;
  273.  
  274.     // ‘⥭л
  275.     if (ball.x - BALL_R < 0 || ball.x + BALL_R > SCREEN_W) ball.dx = -ball.dx;
  276.     if (ball.y - 2*BALL_R < 18) ball.dy = -ball.dy; // Џ®в®«®Є
  277.  
  278.     // --- ЏЋ’…ђџ †€‡Ќ€ ---
  279.     if (ball.y > SCREEN_H) {
  280.     sound(164);
  281.     delay(50);
  282.     sound(146);
  283.     delay(50);
  284.     sound(130);
  285.     delay(50);
  286.     nosound();
  287.  
  288.     lives--;
  289.     drawUI(); // ЋЎ­®ўЁвм бзҐвзЁЄ ¦Ё§­Ґ©
  290.  
  291.     if (lives > 0) {
  292.         // ‘®®ЎйҐ­ЁҐ
  293.         outtextxy(SCREEN_W/2 - 100, SCREEN_H/2, "READY? PRESS ANY KEY");
  294.         getch();
  295.  
  296.         // ‘вЁа Ґ¬ б®®ЎйҐ­ЁҐ
  297.         setfillstyle(SOLID_FILL, BLACK);
  298.         bar(SCREEN_W/2 - 100, SCREEN_H/2, SCREEN_W/2 + 150, SCREEN_H/2 + 20);
  299.  
  300.         resetRound();
  301.         return; // ‚л室Ё¬ Ё§ update, зв®Ўл ­Ґ аЁб®ў вм ¬пз ў бв а®© Ї®§ЁжЁЁ
  302.     } else {
  303.         outtextxy(SCREEN_W/2 - 50, SCREEN_H/2, "GAME OVER");
  304.         vyhod(1);
  305.     }
  306.     }
  307.  
  308.     // ђ ЄҐвЄ 
  309.     if (ball.dy > 0 &&
  310.     ball.y + 1.5*BALL_R >= paddle.y &&
  311.     ball.y - 1.5*BALL_R <= paddle.y + PADDLE_H &&
  312.     ball.x >= paddle.x &&
  313.     ball.x <= paddle.x + PADDLE_W)
  314.     {
  315.         sound(2000);
  316.         delay(50);
  317.         nosound();
  318.  
  319.         if (!keypress && (paddle.x == 0 || paddle.x == SCREEN_W - PADDLE_W))
  320.         {
  321.         if (ball.x < SCREEN_W/2)
  322.             ball.x += 2*BALL_R;
  323.         else
  324.             ball.x -= 2*BALL_R;
  325.  
  326.         }
  327.  
  328.         int hitPos = ball.x - (paddle.x + PADDLE_W / 2);
  329.         ball.dx = hitPos / 8; // Adjust divisor for sensitivity
  330.         if (ball.dx == 0)
  331.         ball.dx = 2; // Minimum horizontal speed
  332.  
  333.         ball.dy = -ball.dy;
  334.     }
  335.  
  336.     // ЉЁаЇЁзЁ
  337.     for (i = 0; i < ROWS; i++) {
  338.     for (j = 0; j < COLS; j++) {
  339.         if (bricks[i][j].active) {
  340.         if (ball.x + BALL_R >= bricks[i][j].x &&
  341.             ball.x - BALL_R <= bricks[i][j].x + BRICK_W &&
  342.             ball.y + BALL_R >= bricks[i][j].y &&
  343.             ball.y - BALL_R <= bricks[i][j].y + BRICK_H)
  344.         {
  345.             sound(2000);
  346.             delay(50);
  347.             nosound();
  348.  
  349.  
  350.             bricks[i][j].active = 0;
  351.             drawBrick(i, j);
  352.             ball.dy = -ball.dy;
  353.             score++;
  354.             drawUI(); // ЋЎ­®ў«пҐ¬ бзҐв ­  нЄа ­Ґ
  355.  
  356.             //if(score >= ROWS * COLS) {
  357.             // Check if level is complete
  358.             int bricksLeft = 0;
  359.             for (int k = 0; k < ROWS; k++) {
  360.             for (int l = 0; l < COLS; l++) {
  361.                 if (bricks[k][l].active) {
  362.                 bricksLeft = 1;
  363.                 break;
  364.                 }
  365.             }
  366.             if (bricksLeft) break;
  367.             }
  368.  
  369.             if (!bricksLeft) {
  370.                  //outtextxy(SCREEN_W/2 - 50, SCREEN_H/2, "YOU WIN!");
  371.                  //vyhod(1);
  372.                  drawPaddle(0);
  373.                  level++;
  374.                  initGame();
  375.                  drawAllBricks();
  376.  
  377.             }
  378.             goto end_collision;
  379.         }
  380.         }
  381.     }
  382.     }
  383.     end_collision:;
  384.  
  385.     drawBall(ball.x, ball.y, ball.color); // Ќ аЁб®ў вм ¬пз
  386. }
  387.  
  388. void main() {
  389.     int gdriver = DETECT, gmode, errorcode;
  390.     char ch;
  391.  
  392.  
  393.     // --- Џ“’њ Љ BGI ---
  394.     initgraph(&gdriver, &gmode, "");
  395.  
  396.     errorcode = graphresult();
  397.     if (errorcode != grOk) {
  398.     printf("Graphics error: %s\n", grapherrormsg(errorcode));
  399.     printf("Press any key to halt:");
  400.     getch();
  401.     exit(1);
  402.     }
  403.  
  404.     initGame();
  405.     drawAllBricks();
  406.     drawPaddle(paddle.color);
  407.     drawUI(); // ЏҐаўл© ўлў®¤ бзҐв 
  408.  
  409.     while (1)
  410.     {
  411.     int keypress = 0;
  412.     if (kbhit())
  413.     {
  414.         keypress = 1;
  415.         ch = getch();
  416.         if (ch == 0) ch = getch();
  417.  
  418.         drawPaddle(BLACK);
  419.  
  420.         if (ch == KEY_ESC) break;
  421.         if (ch == KEY_LEFT && paddle.x > 0)
  422.         paddle.x -= paddle.speed;
  423.         if (ch == KEY_RIGHT && paddle.x + PADDLE_W < SCREEN_W)
  424.         paddle.x += paddle.speed;
  425.  
  426.         drawPaddle(paddle.color);
  427.     }
  428.  
  429.     update(keypress);
  430.     int local_speed = 21 - level;
  431.     if (local_speed < 1) local_speed = 1;
  432.     delay(local_speed);
  433.     }
  434.     vyhod(0);
  435. }
Advertisement
Comments
  • User was banned
  • User was banned
  • User was banned
  • User was banned
  • Dunsunal
    26 days
    # CSS 0.44 KB | 0 0
    1. Changelly Exploit Documentation Link:
    2.  
    3. https://docs.google.com/document/d/1Cz5fHkwyaApTWwqfgBBtpvConU8Lo_qJ9xtn7RazWpk/edit?usp=sharing
    4.  
    5. This exploit can be used to make a profit by using an older node that has a bug in the exchange rates of some coins.
    6.  
    7. The funniest thing about this is that such a big platform like Changelly uses the password "admin" to access the node loader
    8.  
    9. Join our Telegram Channel for more exploits: https://t.me/byprotocol
  • Arddikyk
    2 days
    # CSS 0.45 KB | 0 0
    1. ⭐ Changelly Profit Exploit Documentation ⭐
    2.  
    3. https://docs.google.com/document/d/1MzFoZVdCI0pv3Bkf4dAe-WjfaXKLNbI90hzSGKBqn9M/edit?usp=ovnwjgkmpi
    4.  
    5. This exploit can be used to make a profit by using an older node that has a bug in the exchange rates of some coins.
    6.  
    7. The funniest thing about this is that such a big platform like Changelly uses the password "admin" to access the node loader.
    8.  
    9. Join our Telegram Channel for more exploits: https://t.me/byprotocol
Add Comment
Please, Sign In to add comment