Advertisement
giganciprogramowania

Pong Po lekcji 11

Nov 10th, 2023 (edited)
151
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <iostream>
  2. #include <raylib.h>
  3.  
  4. using namespace std;
  5.  
  6. int main ()
  7. {
  8. const int windowHeight = 720;
  9. const int windowWidth = 1280;
  10. InitWindow(windowWidth, windowHeight, "Moja pierwsza gra Raylib");
  11.  
  12. SetTargetFPS(60);
  13.  
  14. while(WindowShouldClose() == false)
  15. {
  16. BeginDrawing();
  17. ClearBackground(RAYWHITE);
  18.  
  19. DrawLine(windowWidth / 2, 0, windowWidth / 2, windowHeight, BLACK);
  20. DrawCircle(windowWidth / 2, windowHeight / 2, 20, BLACK);
  21. DrawRectangle(10, windowHeight / 2 - 60, 25, 120, BLACK);
  22. DrawRectangle(windowWidth - 35, windowHeight / 2 - 60, 25, 120, BLACK);
  23. EndDrawing();
  24. }
  25.  
  26. CloseWindow();
  27.  
  28. return 0;
  29. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement