-
Notifications
You must be signed in to change notification settings - Fork 0
/
variables.c
47 lines (43 loc) · 1.73 KB
/
variables.c
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
44
45
46
47
#define titulo "pacman"
#define X 20
#define Y 20
#define BLOCKSIZE 20
#define JOSEO 2
#define COFFE 3
#define PJ 6
#define PLAYER 7
#define velocidad 0.05
int map[Y][X] = {
{1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1},
{1, 2, 0, 3, 0, 3, 0, 3, 0, 3, 0, 3, 0, 3, 0, 3, 0, 0, 2, 1},
{1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1},
{1, 3, 1, 2, 0, 3, 0, 3, 0, 3, 0, 3, 0, 3, 0, 0, 2, 1, 0, 1},
{1, 0, 1, 0, 1, 1, 1, 1, 0, 1, 1, 0, 1, 1, 1, 1, 0, 1, 3, 1},
{1, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 1},
{1, 0, 1, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 3, 1},
{1, 3, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 1, 0, 1},
{1, 0, 1, 3, 1, 1, 0, 1, 1, 0, 0, 1, 1, 0, 1, 1, 0, 1, 3, 1},
{1, 3, 1, 0, 1, 1, 7, 1, 0, 0, 0, 0, 1, 0, 1, 1, 3, 1, 0, 1},
{1, 0, 1, 3, 1, 1, 0, 1, 0, 0, 0, 0, 1, 0, 1, 1, 0, 1, 3, 1},
{1, 3, 1, 0, 1, 1, 0, 1, 1, 0, 0, 1, 1, 0, 1, 1, 3, 1, 0, 1},
{1, 0, 1, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 3, 1},
{1, 3, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, 0, 1},
{1, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 1},
{1, 3, 1, 0, 1, 1, 1, 1, 0, 1, 1, 0, 1, 1, 1, 1, 0, 1, 0, 1},
{1, 0, 1, 2, 0, 3, 0, 3, 0, 3, 0, 3, 0, 3, 0, 0, 2, 1, 3, 1},
{1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1},
{1, 2, 0, 3, 0, 3, 0, 3, 0, 3, 0, 3, 0, 3, 0, 3, 0, 0, 2, 1},
{1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}
};
int screenWidth = 800;
int screenHeight = 700;
int marginX = (800 - (BLOCKSIZE * X)) / 2;
int marginY = 150;
int rotation = 0;
int currentFrame = 0;
int framesCounter = 0;
int framesSpeed = 8;
int puntos = 0;
Texture2D phantonF;
Texture2D phantonR;
Texture2D phantonA;