-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpatterns.c
30 lines (25 loc) · 943 Bytes
/
patterns.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
#include "patterns.h"
const uint8_t pmba_black = 0;
const uint8_t pmba_white = 1;
const uint8_t pmfa_tank_up = 1;
const uint8_t pmfa_tank_right = 2;
const uint8_t pmfa_tank_upright = 3;
const uint8_t pmfa_projectile = 4;
void load_background_pattern(const pattern_t pattern, const uint8_t pmba) {
uint8_t i;
for (i = 0; i < 16; i++)
PMB[pmba][i] = pattern[i];
}
void load_foreground_pattern(const pattern_t pattern, const uint8_t pmfa) {
uint8_t i;
for (i = 0; i < 16; i++)
PMF[pmfa][i] = pattern[i];
}
void load_patterns(void) {
load_background_pattern(pattern_black, pmba_black);
load_background_pattern(pattern_white, pmba_white);
load_foreground_pattern(pattern_tank_up, pmfa_tank_up);
load_foreground_pattern(pattern_tank_right, pmfa_tank_right);
load_foreground_pattern(pattern_tank_upright, pmfa_tank_upright);
load_foreground_pattern(pattern_projectile, pmfa_projectile);
}