-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathStructs.hpp
63 lines (56 loc) · 915 Bytes
/
Structs.hpp
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
struct Player {
double x;
double y;
float velocity; // Up is +
float xvelocity; // Right is +
bool falling;
int charge;
int lastplatform;
uint16_t poweruptimer;
byte powerupstate;
bool jumpcharge;
float velocitymod;
int intX() {
return floor(x);
}
int intY() {
return floor(y);
}
};
struct Platform {
float x;
int y;
int len;
int type;
bool facingright;
byte sprite;
int intX() {
return floor(x);
}
};
#define POWERUP_TIME 660
#define MAX_POWERUPS 6
struct Powerup {
int x;
int y;
byte type;
bool hidden;
};
struct Star {
int x;
int y;
byte type;
};
#define MAX_PLATFORMS 28 // 'Not in the mood' for dynamic lists
struct Stage {
int num;
struct Platform platforms[MAX_PLATFORMS];
int totalplatforms;
struct Powerup powerups[MAX_POWERUPS];
int totalpowerups;
byte staroffset;
byte speed;
};
struct Zapfish {
int y;
};