-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdisplayGame.c
More file actions
44 lines (41 loc) · 735 Bytes
/
displayGame.c
File metadata and controls
44 lines (41 loc) · 735 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#include <pic32mx.h>
#include <stdint.h>
#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
#include "header.h"
void displayPlayer(int playerNumber, int posY)
{
int x;
if (playerNumber == 1)
{
x = 1;
}
else if (playerNumber == 2)
{
x = 123;
}
else
{
}
int i;
for (i = 0; i < playerHeight; i++)
{
enablePixel(x, posY + i);
enablePixel(x + 1, posY + i);
enablePixel(x + 2, posY + i);
}
}
void displayBall(int posX, int posY)
{
int size = getBallSize();
int i;
for (i = 0; i < size; i++)
{
int j;
for (j = 0; j < size; j++)
{
enablePixel(posX + i, posY + j);
}
}
}