Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "stdafx.h"
- #include "gamemgr.h"
- #include <ctime>
- int main(){
- srand(time(NULL));
- }
- int xPos = rand() % 500;
- int yPos = 25;
- int xInc = XBALLINC, yInc = YBALLINC;
- void DrawEnclosure(HWND hwnd, HDC hdc) {
- MoveToEx(hdc, 25, 25, NULL); LineTo(hdc, 475, 25);
- MoveToEx(hdc, 25, 25, NULL); LineTo(hdc, 25, 475);
- MoveToEx(hdc, 25, 475, NULL); LineTo(hdc, 475, 475);
- MoveToEx(hdc, 475, 475, NULL); LineTo(hdc, 475, 25);
- }
- void DrawBlocks(HWND hwnd, HDC hdc) {
- RECT r;
- GetClientRect(hwnd, &r);
- if (yPos < 25)
- yInc = XBALLINC;
- if (yPos > 475 - BALLHEIGHT)
- yInc = -YBALLINC;
- yPos += yInc;
- RoundRect(hdc, xPos, yPos,
- xPos + BALLWIDTH, yPos + BALLHEIGHT, 2, 2);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement