-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathcompycore.h
executable file
·35 lines (31 loc) · 1.01 KB
/
compycore.h
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
typedef struct Compycore {
bool introduced = false;
bool winked = false;
uint8_t x = 29;
int8_t y = -46;
bool introduce() {
// skip the intro if the right button is pressed
if (introduced || arduboy.pressed(RIGHT_BUTTON)) {
introduced = true;
return true;
} else if (y < 5) {
y++;
arduboy.drawCompressed(x, y, MICHAEL, WHITE);
} else {
if (arduboy.everyXFrames(150)) {
introduced = true;
return true;
}
if (!winked) {
sound.tone(1046, 50, 2093, 100);
winked = true;
}
arduboy.drawCompressed(x, y, MICHAEL, WHITE);
sprites.drawOverwrite(x + 32, y + 25, WINK, 0);
arduboy.fillRect(30, 47, WIDTH, 5, BLACK); // mask the logo text
arduboy.drawCompressed(30, 46, COMPYCORE, WHITE);
}
arduboy.display(CLEAR_BUFFER);
return false;
}
} Compycore;